Skip to content
🤖 Consolidated, AI-optimized BMAD docs: llms-full.txt. Fetch this plain text file for complete context.

TEA Knowledge Base Index

TEA uses 33 specialized knowledge fragments for context engineering. These fragments are loaded dynamically based on workflow needs via the tea-index.csv manifest.

Context engineering is the practice of loading domain-specific standards into AI context automatically rather than relying on prompts alone.

Instead of asking AI to “write good tests” every time, TEA:

  1. Reads tea-index.csv to identify relevant fragments for the workflow
  2. Loads only the fragments needed (keeps context focused)
  3. Operates with domain-specific standards, not generic knowledge
  4. Produces consistent, production-ready tests across projects

Example:

User runs: `test-design`
TEA reads tea-index.csv:
- Loads: test-quality.md, test-priorities-matrix.md, risk-governance.md
- Skips: network-recorder.md, burn-in.md (not needed for test design)
Result: Focused context, consistent quality standards

User runs a TEA workflow (e.g., test-design)

TEA reads src/bmm/testarch/tea-index.csv:

id,name,description,tags,fragment_file
test-quality,Test Quality,Execution limits and isolation rules,quality;standards,knowledge/test-quality.md
risk-governance,Risk Governance,Risk scoring and gate decisions,risk;governance,knowledge/risk-governance.md

Only fragments needed for the workflow are loaded into context

AI operates with established patterns, producing consistent results

Core patterns for test infrastructure and fixture composition.

FragmentDescriptionKey Topics
fixture-architecturePure function → Fixture → mergeTests composition with auto-cleanupTestability, composition, reusability
network-firstIntercept-before-navigate workflow, HAR capture, deterministic waitsFlakiness prevention, network patterns
playwright-configEnvironment switching, timeout standards, artifact outputsConfiguration, environments, CI
fixtures-compositionmergeTests 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.

FragmentDescriptionKey Topics
data-factoriesFactory patterns with faker, overrides, API seeding, cleanupTest data, factories, cleanup
email-authMagic link extraction, state preservation, negative flowsAuthentication, email testing
auth-sessionToken persistence, multi-user, API/browser authenticationAuth patterns, session management

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


Network interception, error handling, and reliability patterns.

FragmentDescriptionKey Topics
network-recorderHAR record/playback, CRUD detection for offline testingOffline testing, network replay
intercept-network-callNetwork spy/stub, JSON parsing for UI testsMocking, interception, stubbing
error-handlingScoped exception handling, retry validation, telemetry loggingError patterns, resilience
network-error-monitorHTTP 4xx/5xx detection for UI testsError detection, monitoring

Used in: atdd, automate, test-review


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

FragmentDescriptionKey Topics
ci-burn-inStaged jobs, shard orchestration, burn-in loopsCI/CD, flakiness detection
burn-inSmart test selection, git diff for CI optimizationTest selection, performance
selective-testingTag/grep usage, spec filters, diff-based runsTest filtering, optimization

Used in: ci, test-review


Test quality standards, test level selection, and TDD patterns.

FragmentDescriptionKey Topics
test-qualityExecution limits, isolation rules, green criteriaDoD, best practices, anti-patterns
test-levels-frameworkGuidelines for unit, integration, E2E selectionTest pyramid, level selection
test-priorities-matrixP0-P3 criteria, coverage targets, execution orderingPrioritization, risk-based testing
test-healing-patternsCommon failure patterns and automated fixesDebugging, healing, fixes
component-tddRed→green→refactor workflow, provider isolationTDD, component testing

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


Risk assessment, governance, and gate decision frameworks.

FragmentDescriptionKey Topics
risk-governanceScoring matrix, category ownership, gate decision rulesRisk assessment, governance
probability-impactProbability × impact scale for scoring matrixRisk scoring, impact analysis
nfr-criteriaSecurity, performance, reliability, maintainability statusNFRs, compliance, enterprise

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


Selector resilience, race condition debugging, and visual debugging.

FragmentDescriptionKey Topics
selector-resilienceRobust selector strategies and debuggingSelectors, locators, resilience
timing-debuggingRace condition identification and deterministic fixesRace conditions, timing issues
visual-debuggingTrace viewer usage, artifact expectationsDebugging, trace viewer, artifacts

Used in: atdd, automate, test-review


Feature flag testing, contract testing, and API testing patterns.

FragmentDescriptionKey Topics
feature-flagsEnum management, targeting helpers, cleanup, checklistsFeature flags, toggles
contract-testingPact publishing, provider verification, resilienceContract testing, Pact
api-testing-patternsPure API patterns without browserAPI testing, backend testing

Used in: test-design, atdd, automate


Patterns for using @seontechnologies/playwright-utils package (9 utilities).

FragmentDescriptionKey Topics
api-requestTyped HTTP client, schema validation, retry logicAPI calls, HTTP, validation
auth-sessionToken persistence, multi-user, API/browser authenticationAuth patterns, session management
network-recorderHAR record/playback, CRUD detection for offline testingOffline testing, network replay
intercept-network-callNetwork spy/stub, JSON parsing for UI testsMocking, interception, stubbing
recurseAsync polling for API responses, background jobsPolling, eventual consistency
logStructured logging for API and UI testsLogging, debugging, reporting
file-utilsCSV/XLSX/PDF/ZIP handling with download supportFile validation, exports
burn-inSmart test selection with git diff analysisCI optimization, selective testing
network-error-monitorAuto-detect HTTP 4xx/5xx errors during testsError monitoring, silent failures

Note: fixtures-composition is listed under Architecture & Fixtures (general Playwright mergeTests pattern, applies to all fixtures).

Used in: framework (if tea_use_playwright_utils: true), atdd, automate, test-review, ci

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


Location: src/bmm/testarch/tea-index.csv

Purpose: Tracks all knowledge fragments and their usage in workflows

Structure:

id,name,description,tags,fragment_file
test-quality,Test Quality,Execution limits and isolation rules,quality;standards,knowledge/test-quality.md
risk-governance,Risk Governance,Risk scoring and gate decisions,risk;governance,knowledge/risk-governance.md

Columns:

  • id - Unique fragment identifier (kebab-case)
  • name - Human-readable fragment name
  • description - What the fragment covers
  • tags - Searchable tags (semicolon-separated)
  • fragment_file - Relative path to fragment markdown file

Fragment Location: src/bmm/testarch/knowledge/ (all 33 fragments in single directory)

Manifest: src/bmm/testarch/tea-index.csv


Each TEA workflow loads specific fragments:

Key Fragments:

  • fixture-architecture.md
  • playwright-config.md
  • fixtures-composition.md

Purpose: Test infrastructure patterns and fixture composition

Note: Loads additional fragments based on framework choice (Playwright/Cypress) and config (tea_use_playwright_utils).


Key Fragments:

  • test-quality.md
  • test-priorities-matrix.md
  • test-levels-framework.md
  • risk-governance.md
  • probability-impact.md

Purpose: Risk assessment and test planning standards

Note: Loads additional fragments based on mode (system-level vs epic-level) and focus areas.


Key Fragments:

  • test-quality.md
  • component-tdd.md
  • fixture-architecture.md
  • network-first.md
  • data-factories.md
  • selector-resilience.md
  • timing-debugging.md
  • test-healing-patterns.md

Purpose: TDD patterns and test generation standards

Note: Loads auth, network, and utility fragments based on feature requirements.


Key Fragments:

  • test-quality.md
  • test-levels-framework.md
  • test-priorities-matrix.md
  • fixture-architecture.md
  • network-first.md
  • selector-resilience.md
  • test-healing-patterns.md
  • timing-debugging.md

Purpose: Comprehensive test generation with quality standards

Note: Loads additional fragments for data factories, auth, network utilities based on test needs.


Key Fragments:

  • test-quality.md
  • test-healing-patterns.md
  • selector-resilience.md
  • timing-debugging.md
  • visual-debugging.md
  • network-first.md
  • test-levels-framework.md
  • fixture-architecture.md

Purpose: Comprehensive quality review against all standards

Note: Loads all applicable playwright-utils fragments when tea_use_playwright_utils: true.


Key Fragments:

  • ci-burn-in.md
  • burn-in.md
  • selective-testing.md
  • playwright-config.md

Purpose: CI/CD best practices and optimization


Key Fragments:

  • nfr-criteria.md
  • risk-governance.md
  • probability-impact.md

Purpose: NFR assessment frameworks and decision rules


Key Fragments:

  • test-priorities-matrix.md
  • risk-governance.md
  • test-quality.md

Purpose: Traceability and gate decision standards

Note: Loads nfr-criteria.md if NFR assessment is part of gate decision.



Generated with BMad Method - TEA (Test Architect)