Skip to content
🤖 Consolidated, AI-optimized BMAD docs: llms-full.txt. Fetch this plain text file for complete context.
🚀 Build your own BMad modules and share them with the community! Get started or submit to the marketplace.

TEA Knowledge Base Index

TEA loads domain standards into context from 59 knowledge fragments, selected per workflow by the tea-index.csv manifest. Why that beats prompting, and how loading is wired: Knowledge Base System.

This page indexes every row of that manifest. Each entry is named by its manifest id, which differs from the file name for a few fragments; the link resolves to the file. The Tier column is the manifest’s own tier value and decides when the fragment loads (see Loading tiers).

Core patterns for test infrastructure and fixture composition.

FragmentTierDescriptionKey Topics
fixture-architecturecorePure function → Fixture → mergeTests composition with auto-cleanupTestability, composition, reusability
network-firstcoreIntercept-before-navigate workflow, HAR capture, deterministic waitsFlakiness prevention, network patterns
playwright-configextendedEnvironment switching, timeout standards, artifact outputsConfiguration, environments, CI
fixtures-compositionextendedmergeTests composition patterns for combining utilitiesFixture merging, utility composition

Used in: framework, test-design, atdd, automate, test-review


Patterns for test data generation, authentication, and setup.

FragmentTierDescriptionKey Topics
data-factoriescoreFactory patterns with faker, overrides, API seeding, cleanupTest data, factories, cleanup
auth-sessioncoreToken persistence, multi-user, API/browser authenticationAuth patterns, session management
email-authspecializedMagic link extraction, state preservation, negative flowsAuthentication, email testing

Used in: framework, atdd, automate, test-review


Network interception, error handling, and reliability patterns.

FragmentTierDescriptionKey Topics
network-recorderextendedHAR record/playback, CRUD detection for offline testingOffline testing, network replay
intercept-network-callextendedNetwork spy/stub, JSON parsing for UI testsMocking, interception, stubbing
error-handlingextendedScoped exception handling, retry validation, telemetry loggingError patterns, resilience
network-error-monitorextendedHTTP 4xx/5xx detection for UI testsError detection, monitoring

Used in: atdd, automate, test-review


CI/CD patterns, burn-in testing, and selective test execution.

FragmentTierDescriptionKey Topics
ci-burn-inextendedStaged jobs, shard orchestration, burn-in loopsCI/CD, flakiness detection
burn-inextendedSmart test selection, git diff for CI optimizationTest selection, performance
selective-testingextendedTag/grep usage, spec filters, diff-based runsTest filtering, optimization

Used in: ci, test-review


Test quality standards, test level selection, TDD patterns, and the generation-safety gate.

FragmentTierDescriptionKey Topics
test-qualitycoreExecution limits, isolation rules, green criteriaDoD, best practices, anti-patterns
test-levelscoreGuidelines for choosing unit, integration, or end-to-end coverageTest pyramid, level selection
test-prioritiescoreP0–P3 criteria, coverage targets, execution orderingPrioritization, risk-based testing
test-healing-patternscoreCommon failure patterns and automated fixesDebugging, healing, fixes
confidence-gatecore1-10 confidence score with a stop-and-ask rule below threshold, so the agent declares unknowns instead of fabricating themAgent safety, generation, governance
evidence-integritycoreChecks that cannot fail including assertions already true before the action, three-state diagnostics, probes that issue the client’s own request, verifying the outcome rather than the act, verifying framework properties before use, stating environment asymmetry including screen geometry and accumulated credentials, ranking hypotheses by the cost of the measurement that kills them, and recording what a change did rather than what it was forFalsifiability, hollow green, diagnostics
component-tddextendedRed→green→refactor workflow, provider isolationTDD, component testing

Used in: test-design, atdd, automate, test-review, trace

confidence-gate covers selectors, endpoints, risk classification, fixtures, schemas, and data factories. Any generation step that cannot establish a value from the repo records it as an unknown rather than inventing it.

evidence-integrity covers the other half of the same problem: a check that cannot go red, and a diagnostic that reports a verdict it could not measure. Both produce green with nothing behind it, which is why the review registry’s CRITICAL rows exist.


Risk assessment, governance, and gate decision frameworks.

FragmentTierDescriptionKey Topics
risk-governancecoreScoring matrix, category ownership, gate decision rulesRisk assessment, governance
probability-impactcoreProbability × impact scale for scoring matrixRisk scoring, impact analysis
nfr-criteriaextendedSecurity, performance, reliability, maintainability statusNFRs, compliance, enterprise
adr-quality-readiness-checklistextended8-category, 29-criteria framework for testability and NFR complianceQuality readiness, ADR, NFR checklist

Used in: test-design, nfr-assess, trace


Selector resilience, race condition debugging, and visual debugging.

FragmentTierDescriptionKey Topics
selector-resiliencecoreRobust selector strategies and debuggingSelectors, locators, resilience
timing-debuggingextendedRace condition identification and deterministic fixesRace conditions, timing issues
visual-debuggingspecializedTrace viewer usage, artifact expectationsDebugging, trace viewer, artifacts

Used in: atdd, automate, test-review


Feature flag testing and pure API testing patterns.

FragmentTierDescriptionKey Topics
feature-flagsspecializedEnum management, targeting helpers, cleanup, checklistsFeature flags, toggles
api-testing-patternsspecializedPure API patterns without browserAPI testing, backend testing

Used in: test-design, atdd, automate


Contract testing fundamentals plus Pact.js Utils, Pact MCP, and broker operations.

FragmentTierDescriptionKey Topics
contract-testingspecializedRaw Pact patterns, publishing, verification, resilience, PactV4 four-rule determinism and FFI safety blockContract testing, Pact fundamentals
pactjs-utils-overviewspecializedInstallation, flow decision tree, utility mappactjs-utils, CDCT/BDCT, integration strategy
pactjs-utils-mandatecoreThe binding rule when tea_use_pactjs_utils is true: substitution table, the relevance gate before scaffolding, banned patterns, pre-emit self-check, broker degradationStandards, contract testing, generation, review
pactjs-utils-zod-to-pactspecializedzodToPactMatchers for consumer-curated schemas, example precedence, Pact V3 matcher mapping, anti-patternspactjs-utils, zod, consumer schemas, matchers
pactjs-utils-consumer-helpersspecializedProvider-state helpers: createProviderState, toJsonMap; request/response callback helpers: setJsonBody, setJsonContentpactjs-utils, consumer testing, provider state
pactjs-utils-provider-verifierspecializedbuildVerifierOptions, buildMessageVerifierOptions, broker selectors, taggingpactjs-utils, provider verification, CI
pactjs-utils-request-filterspecializedcreateRequestFilter, noOpRequestFilter auth/header patternspactjs-utils, request filter, auth injection
pact-mcpspecializedSmartBear MCP tools for provider states, review, can-i-deploy, matrixpact-mcp, broker interaction, pactflow
pact-consumer-framework-setupspecializedConsumer CDC framework scaffolding: directory layout, scripts, CI workflow, and PactV4 test patternspactjs-utils, consumer CDC, framework setup
pact-broker-webhooksspecializedPactFlow → GitHub repository_dispatch auth via a dedicated machine user and classic PAT, staleness monitoring, PAT rotation runbookpact broker, webhooks, CI operations, security
pact-consumer-diextendedDependency-injection pattern for Pact consumer tests using real client codepact, consumer, DI, contract accuracy

Used in: framework, test-design, atdd, automate, test-review, ci (conditioned by tea_use_pactjs_utils and tea_pact_mcp)

An expired PAT on the PactFlow webhook is the most common non-code cause of can-i-deploy timing out with There is no verified pact between .... pact-broker-webhooks carries the rotation runbook.


Delivery-side testing for asynchronous, eventually-consistent webhook flows using the @seontechnologies/playwright-utils webhook module.

FragmentTierDescriptionKey Topics
webhook-fundamentalscoreWhy webhook delivery is hard: async arrival, parallel pollution, opaque timeouts, cleanup drift. Polling, typed matchers, rich errors, startedAt isolationAsync, event-driven, eventually consistent
webhook-setupcoreFixture wiring for WireMock/MockServer/Mockoon providers, matched-only vs full-reset cleanup, the fullyParallel race fixFixtures, providers, setup
webhook-matcherscorematchField (dot-path exact), matchPartial (deep subset), matchPredicate (arbitrary fn), AND semantics, template factories, clone, withTimeout, withIntervalMatchers, templates, patterns
webhook-waitingcorewaitFor, waitForCount, getReceived, the drain pattern for sequential events, parallel worker safety via ID-scoped templatesPolling, querying, parallel safety
webhook-riskcoreWhen webhook tests are required, the P2×I3 default risk score, the test checklist, failure patterns and mitigationsRisk assessment, governance, TA checklist
webhook-timeout-errorextendedWebhookTimeoutError fields (templateName, timeoutMs, totalReceived, receivedWebhooks, matcherDetails, toJSON) for inspecting what arrived against what was expectedDebugging, errors
webhook-providersextendedWireMock (deleteById supported), MockServer (deleteById no-op), Mockoon (deleteById no-op, 100-entry limit), the custom WebhookProvider interfaceProviders, capability differences

Used in: framework, test-design, atdd, automate, test-review, ci, trace


Maestro device flows and the level discipline that decides what becomes a flow at all. Loaded when test_stack_type is mobile or when the review set contains a Maestro flow (.yaml/.yml under maestro/ or .maestro/, or *.flow.yaml or *.flow.yml).

FragmentTierDescriptionKey Topics
mobile-test-strategyspecializedMobile test level framework, what belongs in a device flow, mobile risk categories, device matrix with a gate profile matching local, CI shape, no live third-party flag evaluation in the run pathLevels, risk, device matrix, permissions, lifecycle
maestro-flowsspecializedFlow structure, selector hierarchy, clearState isolation, synchronization without sleeps, subflow composition, command semantics that differ by platform, text: selectors as whole-element regex, taps that report COMPLETED without being handled, visible meaning inside the viewport, asserting the transition rather than a state that may already holdMaestro, selectors, isolation, regex selectors, anti-patterns
mobile-ci-device-labspecializedBuild artifact selection including why a debug-variant development build does not solve it, dev-server manifest signing in non-interactive CI, one device profile across local and CI, native modules that degrade silently in a shell, deep links reachable through the shell’s routed URL form, emulator snapshot caching, repairing locally created AVDs, per-device identity for sharded runs, runner version pinning, artifact layout and failure diagnosisBuild artifact, emulator, caching, pinning, sharding, artifacts

Used in: framework, automate, atdd, test-design, test-review, ci (when test_stack_type is mobile or a Maestro flow is present)

The browser fragments (network-first, playwright-config, intercept-network-call, selector-resilience) are deliberately NOT loaded for a mobile stack: a device flow has no DOM and no request interceptor.


CLI and MCP integration for AI-driven browser automation during test generation.

FragmentTierDescriptionKey Topics
playwright-clicoreToken-efficient CLI for AI coding agents: element refs, sessions, snapshots, browser automationCLI, browser, agent, automation, snapshot

Used in: atdd, automate, test-design, test-review, nfr-assess (when tea_browser_automation is cli or auto)


Patterns for the @seontechnologies/playwright-utils package (10 utility modules).

FragmentTierDescriptionKey Topics
overviewcoreInstallation, design principles, fixture-based utility patterns for API and UIOverview, architecture, principles
playwright-utils-mandatecoreThe binding rule when tea_use_playwright_utils is true: substitution table, REQUIRED vs RECOMMENDED levels, banned patterns, pre-emit self-check, deviation protocolStandards, generation, review, governance
library-integration-mandatecoreThe general contract every library mandate instantiates: two gates (flag plus install), enforcement levels, deviation protocol, scope discipline, the flag-to-mandate registry, and the ten places a new library must be wiredStandards, governance, extensibility
api-requestcoreTyped HTTP client, schema validation, retry logic, operation-based overloadAPI calls, HTTP, OpenAPI, codegen
recurseextendedAsync polling for API responses, background jobs, eventual consistencyPolling, eventual consistency
logextendedReport logging and structured output for API and UI testsLogging, debugging, reporting
file-utilsextendedCSV/XLSX/PDF/ZIP validation for API exports and UI downloadsFile validation, exports

The package’s remaining fragments are indexed under the category that matches what they do: auth-session (Data & Setup); network-recorder, intercept-network-call, and network-error-monitor (Network & Reliability); burn-in (Test Execution & CI); fixtures-composition (Architecture & Fixtures, since mergeTests applies to all fixtures); and the seven webhook-* fragments (Webhook Testing).

Used in: framework, test-design, atdd, automate, test-review, ci (all gated on tea_use_playwright_utils: true)

playwright-utils-mandate loads first on every one of them. It decides how the other fragments are applied: generation follows its substitution table by default, and test-review reads its REQUIRED list as the firing predicate for registry rows M9 and L9. pactjs-utils-mandate plays the same role for Pact suites and row M10. Both instantiate library-integration-mandate, which holds the contract they share and the checklist for wiring in the next library.

Official Docs: https://seontechnologies.github.io/playwright-utils/


Location: src/agents/bmad-tea/resources/tea-index.csv

Fragment location: src/agents/bmad-tea/resources/knowledge/ (all 59 fragments in a single directory)

Structure:

id,name,description,tags,tier,fragment_file
test-quality,Test Quality Definition of Done,"Execution limits, isolation rules, green criteria","quality,definition-of-done,tests",core,knowledge/test-quality.md
risk-governance,Risk Governance,"Scoring matrix, category ownership, gate decision rules","risk,governance,gates",core,knowledge/risk-governance.md

Columns:

  • id - Unique fragment identifier (kebab-case). This is the name workflows cite, and it is not always the file stem
  • name - Human-readable fragment name
  • description - What the fragment covers
  • tags - Searchable tags (comma-separated)
  • tier - Loading priority (see below)
  • fragment_file - Path to the fragment markdown file, relative to resources/

Workflows do not carry per-workflow fragment lists. Each workflow step declares knowledgeIndex: './resources/tea-index.csv' and selects fragments at run time by tier, then narrows by stack and config:

  • Core: loaded whenever the workflow starts.
  • Extended: loaded when the workflow’s context calls for it, such as auth-session once the tests involve authentication.
  • Specialized: loaded only on a matching use case, such as contract-testing for microservices or email-auth for email flows.

Loading core fragments alone cuts context usage 40-50% against loading everything.

Four config keys narrow the set further: tea_use_playwright_utils, tea_use_pactjs_utils, tea_pact_mcp, and tea_browser_automation. test_stack_type: mobile swaps the browser fragments for the Maestro pair. See TEA Configuration.