TEA Knowledge Base Index
TEA Knowledge Base Index
Section titled â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.
What is Context Engineering?
Section titled âWhat is Context Engineering?â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:
- Reads
tea-index.csvto identify relevant fragments for the workflow - Loads only the fragments needed (keeps context focused)
- Operates with domain-specific standards, not generic knowledge
- 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 standardsHow Knowledge Loading Works
Section titled âHow Knowledge Loading Worksâ1. Workflow Trigger
Section titled â1. Workflow TriggerâUser runs a TEA workflow (e.g., test-design)
2. Manifest Lookup
Section titled â2. Manifest LookupâTEA reads src/bmm/testarch/tea-index.csv:
id,name,description,tags,fragment_filetest-quality,Test Quality,Execution limits and isolation rules,quality;standards,knowledge/test-quality.mdrisk-governance,Risk Governance,Risk scoring and gate decisions,risk;governance,knowledge/risk-governance.md3. Dynamic Loading
Section titled â3. Dynamic LoadingâOnly fragments needed for the workflow are loaded into context
4. Consistent Output
Section titled â4. Consistent OutputâAI operates with established patterns, producing consistent results
Fragment Categories
Section titled âFragment CategoriesâArchitecture & Fixtures
Section titled âArchitecture & FixturesâCore patterns for test infrastructure and fixture composition.
| Fragment | Description | Key Topics |
|---|---|---|
| fixture-architecture | Pure function â Fixture â mergeTests composition with auto-cleanup | Testability, composition, reusability |
| network-first | Intercept-before-navigate workflow, HAR capture, deterministic waits | Flakiness prevention, network patterns |
| playwright-config | Environment switching, timeout standards, artifact outputs | Configuration, environments, CI |
| fixtures-composition | mergeTests composition patterns for combining utilities | Fixture merging, utility composition |
Used in: framework, test-design, atdd, automate, test-review
Data & Setup
Section titled âData & SetupâPatterns for test data generation, authentication, and setup.
| Fragment | Description | Key Topics |
|---|---|---|
| data-factories | Factory patterns with faker, overrides, API seeding, cleanup | Test data, factories, cleanup |
| email-auth | Magic link extraction, state preservation, negative flows | Authentication, email testing |
| auth-session | Token persistence, multi-user, API/browser authentication | Auth patterns, session management |
Used in: framework, atdd, automate, test-review
Network & Reliability
Section titled âNetwork & ReliabilityâNetwork interception, error handling, and reliability patterns.
| Fragment | Description | Key Topics |
|---|---|---|
| network-recorder | HAR record/playback, CRUD detection for offline testing | Offline testing, network replay |
| intercept-network-call | Network spy/stub, JSON parsing for UI tests | Mocking, interception, stubbing |
| error-handling | Scoped exception handling, retry validation, telemetry logging | Error patterns, resilience |
| network-error-monitor | HTTP 4xx/5xx detection for UI tests | Error detection, monitoring |
Used in: atdd, automate, test-review
Test Execution & CI
Section titled âTest Execution & CIâCI/CD patterns, burn-in testing, and selective test execution.
| Fragment | Description | Key Topics |
|---|---|---|
| ci-burn-in | Staged jobs, shard orchestration, burn-in loops | CI/CD, flakiness detection |
| burn-in | Smart test selection, git diff for CI optimization | Test selection, performance |
| selective-testing | Tag/grep usage, spec filters, diff-based runs | Test filtering, optimization |
Used in: ci, test-review
Quality & Standards
Section titled âQuality & StandardsâTest quality standards, test level selection, and TDD patterns.
| Fragment | Description | Key Topics |
|---|---|---|
| test-quality | Execution limits, isolation rules, green criteria | DoD, best practices, anti-patterns |
| test-levels-framework | Guidelines for unit, integration, E2E selection | Test pyramid, level selection |
| test-priorities-matrix | P0-P3 criteria, coverage targets, execution ordering | Prioritization, risk-based testing |
| test-healing-patterns | Common failure patterns and automated fixes | Debugging, healing, fixes |
| component-tdd | Redâgreenârefactor workflow, provider isolation | TDD, component testing |
Used in: test-design, atdd, automate, test-review, trace
Risk & Gates
Section titled âRisk & GatesâRisk assessment, governance, and gate decision frameworks.
| Fragment | Description | Key Topics |
|---|---|---|
| risk-governance | Scoring matrix, category ownership, gate decision rules | Risk assessment, governance |
| probability-impact | Probability Ă impact scale for scoring matrix | Risk scoring, impact analysis |
| nfr-criteria | Security, performance, reliability, maintainability status | NFRs, compliance, enterprise |
Used in: test-design, nfr-assess, trace
Selectors & Timing
Section titled âSelectors & TimingâSelector resilience, race condition debugging, and visual debugging.
| Fragment | Description | Key Topics |
|---|---|---|
| selector-resilience | Robust selector strategies and debugging | Selectors, locators, resilience |
| timing-debugging | Race condition identification and deterministic fixes | Race conditions, timing issues |
| visual-debugging | Trace viewer usage, artifact expectations | Debugging, trace viewer, artifacts |
Used in: atdd, automate, test-review
Feature Flags & Testing Patterns
Section titled âFeature Flags & Testing PatternsâFeature flag testing, contract testing, and API testing patterns.
| Fragment | Description | Key Topics |
|---|---|---|
| feature-flags | Enum management, targeting helpers, cleanup, checklists | Feature flags, toggles |
| contract-testing | Pact publishing, provider verification, resilience | Contract testing, Pact |
| api-testing-patterns | Pure API patterns without browser | API testing, backend testing |
Used in: test-design, atdd, automate
Playwright-Utils Integration
Section titled âPlaywright-Utils IntegrationâPatterns for using @seontechnologies/playwright-utils package (9 utilities).
| Fragment | Description | Key Topics |
|---|---|---|
| api-request | Typed HTTP client, schema validation, retry logic | API calls, HTTP, validation |
| auth-session | Token persistence, multi-user, API/browser authentication | Auth patterns, session management |
| network-recorder | HAR record/playback, CRUD detection for offline testing | Offline testing, network replay |
| intercept-network-call | Network spy/stub, JSON parsing for UI tests | Mocking, interception, stubbing |
| recurse | Async polling for API responses, background jobs | Polling, eventual consistency |
| log | Structured logging for API and UI tests | Logging, debugging, reporting |
| file-utils | CSV/XLSX/PDF/ZIP handling with download support | File validation, exports |
| burn-in | Smart test selection with git diff analysis | CI optimization, selective testing |
| network-error-monitor | Auto-detect HTTP 4xx/5xx errors during tests | Error 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/
Fragment Manifest (tea-index.csv)
Section titled âFragment Manifest (tea-index.csv)âLocation: src/bmm/testarch/tea-index.csv
Purpose: Tracks all knowledge fragments and their usage in workflows
Structure:
id,name,description,tags,fragment_filetest-quality,Test Quality,Execution limits and isolation rules,quality;standards,knowledge/test-quality.mdrisk-governance,Risk Governance,Risk scoring and gate decisions,risk;governance,knowledge/risk-governance.mdColumns:
id- Unique fragment identifier (kebab-case)name- Human-readable fragment namedescription- What the fragment coverstags- 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
Workflow Fragment Loading
Section titled âWorkflow Fragment LoadingâEach TEA workflow loads specific fragments:
framework
Section titled âframeworkâ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).
test-design
Section titled âtest-designâ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.
automate
Section titled âautomateâ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.
test-review
Section titled âtest-reviewâ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
nfr-assess
Section titled ânfr-assessâ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.
Related
Section titled âRelatedâ- TEA Overview - How knowledge base fits in TEA
- Testing as Engineering - Context engineering philosophy
- TEA Command Reference - Workflows that use fragments
Generated with BMad Method - TEA (Test Architect)