Files
BMAD-METHOD/src/modules/bmm/testarch/tea-commands.csv
2025-09-28 23:17:07 -05:00

11 KiB

1commandtitlewhen_to_usepreflightflow_cuesdeliverableshalt_rulesnotesknowledge_tags
2*frameworkInitialize test architectureRun once per repo or when no production-ready harness existspackage.json present|no existing E2E framework detected|architectural context availableIdentify stack from package.json (React/Vue/Angular/Next.js); detect bundler (Vite/Webpack/Rollup/esbuild); match test language to source (JS/TS frontend -> JS/TS tests); choose Playwright for large or performance-critical repos, Cypress for small DX-first teams; create {framework}/tests/ and {framework}/support/fixtures/ and {framework}/support/helpers/; configure config files with timeouts (action 15s, navigation 30s, test 60s) and reporters (HTML + JUnit); create .env.example with TEST_ENV, BASE_URL, API_URL; implement pure function->fixture->mergeTests pattern and faker-based data factories; enable failure-only screenshots/videos and ensure .nvmrc recordedplaywright/ or cypress/ folder with config + support tree; .env.example; .nvmrc; example tests; README with setup instructionsIf package.json missing OR framework already configured, halt and instruct manual reviewPlaywright: worker parallelism, trace viewer, multi-language support; Cypress: avoid if many dependent API calls; Component testing: Vitest (large) or Cypress CT (small); Contract testing: Pact for microservices; always use data-cy/data-testid selectorsphilosophy/core|patterns/fixtures|patterns/selectors
3*tddAcceptance Test Driven DevelopmentBefore implementation when team commits to TDDstory approved with acceptance criteria|dev sandbox ready|framework scaffolding in placeClarify acceptance criteria and affected systems; pick appropriate test level (E2E/API/Component); write failing acceptance tests using Given-When-Then with network interception first then navigation; create data factories and fixture stubs for required entities; outline mocks/fixtures infrastructure the dev team must supply; generate component tests for critical UI logic; compile implementation checklist mapping each test to source work; share failing tests with dev agent and maintain red -> green -> refactor loopFailing acceptance test files; component test stubs; fixture/mocks skeleton; implementation checklist with test-to-code mapping; documented data-testid requirementsIf criteria ambiguous or framework missing, halt for clarificationStart red; one assertion per test; use beforeEach for visible setup (no shared state); remind devs to run tests before writing production code; update checklist as each test goes greenphilosophy/core|patterns/test-structure
4*automateAutomation expansionAfter implementation or when reforging coverageall acceptance criteria satisfied|code builds locally|framework configuredReview story source/diff to confirm automation target; ensure fixture architecture exists (mergeTests for Playwright, commands for Cypress) and implement apiRequest/network/auth/log fixtures if missing; map acceptance criteria with test-levels-framework.md guidance and avoid duplicate coverage; assign priorities using test-priorities-matrix.md; generate unit/integration/E2E specs with naming convention feature-name.spec.ts, covering happy, negative, and edge paths; enforce deterministic waits, self-cleaning factories, and <=1.5 minute execution per test; run suite and capture Definition of Done results; update package.json scripts and README instructionsNew or enhanced spec files grouped by level; fixture modules under support/; data factory utilities; updated package.json scripts and README notes; DoD summary with remaining gaps; gate-ready coverage summaryIf automation target unclear or framework missing, halt and request clarificationNever create page objects; keep tests <300 lines and stateless; forbid hard waits and conditional flow in tests; co-locate tests near source; flag flaky patterns immediatelyphilosophy/core|patterns/helpers|patterns/waits|patterns/dod
5*ciCI/CD quality pipelineOnce automation suite exists or needs optimizationgit repository initialized|tests pass locally|team agrees on target environments|access to CI platform settingsDetect CI platform (default GitHub Actions, ask if GitLab/CircleCI/etc); scaffold workflow (.github/workflows/test.yml or platform equivalent) with triggers; set Node.js version from .nvmrc and cache node_modules + browsers; stage jobs: lint -> unit -> component -> e2e with matrix parallelization (shard by file not test); add selective execution script for affected tests; create burn-in job that reruns changed specs 3x to catch flakiness; attach artifacts on failure (traces/videos/HAR); configure retries/backoff and concurrency controls; document required secrets and environment variables; add Slack/email notifications and local script mirroring CI.github/workflows/test.yml (or platform equivalent); scripts/test-changed.sh; scripts/burn-in-changed.sh; updated README/ci.md instructions; secrets checklist; dashboard or badge configurationIf git repo absent, test framework missing, or CI platform unspecified, halt and request setupTarget 20x speedups via parallel shards + caching; shard by file; keep jobs under 10 minutes; wait-on-timeout 120s for app startup; ensure npm test locally matches CI run; mention alternative platform paths when not on GitHubphilosophy/core|ci-strategy
6*risk-profileRisk profile analysisAfter story approval, before developmentstory markdown present|acceptance criteria clear|architecture/PRD accessibleFilter requirements so only genuine risks remain; review PRD/architecture/story for unresolved gaps; classify risks across TECH, SEC, PERF, DATA, BUS, OPS with category definitions; request clarification when evidence missing; score probability (1 unlikely, 2 possible, 3 likely) and impact (1 minor, 2 degraded, 3 critical) then compute totals; highlight risks >=6 and plan mitigations with owners and timelines; prepare gate summary with residual riskRisk assessment markdown in docs/qa/assessments; table of category/probability/impact/score; gate YAML snippet summarizing totals; mitigation matrix with owners and due datesIf story missing or criteria unclear, halt for clarificationCategory definitions: TECH=unmitigated architecture flaws, SEC=missing controls/vulnerabilities, PERF=SLA-breaking performance, DATA=loss/corruption scenarios, BUS=user/business harm, OPS=deployment/run failures; rely on evidence, not speculation; score 9 -> FAIL, 6-8 -> CONCERNS; most stories should have 0-1 high risksphilosophy/core|risk-model
7*test-designTest design playbookAfter risk profile, before codingrisk assessment completed|story acceptance criteria availableBreak acceptance criteria into atomic scenarios; reference test-levels-framework.md to pick unit/integration/E2E/component levels; avoid duplicate coverage and prefer lower levels when possible; assign priorities using test-priorities-matrix.md (P0 revenue/security, P1 core journeys, P2 secondary, P3 nice-to-have); map scenarios to risk mitigations and required data/tooling; follow naming {epic}.{story}-LEVEL-SEQ and plan execution orderTest-design markdown saved to docs/qa/assessments; scenario table with requirement/level/priority/mitigation; gate YAML block summarizing scenario counts and coverage; recommended execution orderIf risk profile missing or acceptance criteria unclear, request it and haltShift left: unit first, escalate only when needed; tie scenarios back to risk mitigations; keep scenarios independent and maintainablephilosophy/core|patterns/test-structure
8*traceRequirements traceabilityMid-development checkpoint or before reviewtests exist for story|access to source + specsGather acceptance criteria and implemented tests; map each criterion to concrete tests (file + describe/it) using Given-When-Then narrative; classify coverage status as FULL, PARTIAL, NONE, UNIT-ONLY, INTEGRATION-ONLY; flag severity based on priority (P0 gaps critical); recommend additional tests or refactors; generate gate YAML coverage summaryTraceability report saved under docs/qa/assessments; coverage matrix with status per criterion; gate YAML snippet for coverage totals and gapsIf story lacks implemented tests, pause and advise running *tdd or writing testsDefinitions: FULL=all scenarios validated, PARTIAL=some coverage exists, NONE=no validation, UNIT-ONLY=missing higher level, INTEGRATION-ONLY=lacks lower confidence; ensure assertions explicit and avoid duplicate coveragephilosophy/core|patterns/assertions
9*nfr-assessNFR validationLate development or pre-review for critical storiesimplementation deployed locally|non-functional goals defined or discoverableAsk which NFRs to assess; default to core four (security, performance, reliability, maintainability); gather thresholds from story/architecture/technical-preferences and mark unknown targets; inspect evidence (tests, telemetry, logs) for each NFR; classify status using deterministic pass/concerns/fail rules and list quick wins; produce gate block and assessment doc with recommended actionsNFR assessment markdown with findings; gate YAML block capturing statuses and notes; checklist of evidence gaps and follow-up ownersIf NFR targets undefined and no guidance available, request definition and haltUnknown thresholds -> CONCERNS, never guess; ensure each NFR has evidence or call it out; suggest monitoring hooks and fail-fast mechanisms when gaps existphilosophy/core|nfr
10*reviewComprehensive TEA reviewStory marked ready; tests passing locallytraceability complete|risk + design docs available|tests executed locallyDetermine review depth (deep if security/auth touched, no new tests, diff >500, prior gate FAIL/CONCERNS, >5 acceptance criteria); follow flow cues to inspect code quality, selectors, waits, and architecture alignment; map requirements to tests and ensure coverage matches trace report; perform safe refactors when low risk and record others as recommendations; prepare TEA Results summary and gate recommendationUpdated story markdown with TEA Results and recommendations; gate recommendation summary; list of refactors performed and outstanding issuesIf prerequisites missing (tests failing, docs absent), halt with checklistEvidence-focused: reference concrete files/lines; escalate security/performance issues immediately; distinguish must-fix vs optional improvements; reuse Murat patterns for helpers, waits, selectorsphilosophy/core|patterns/review
11*gateQuality gate decisionAfter review or mitigation updateslatest assessments gathered|team consensus on fixesAssemble story metadata (id, title); choose gate status using deterministic rules (PASS all critical issues resolved, CONCERNS minor residual risk, FAIL critical blockers, WAIVED approved by business); update YAML schema with sections: metadata, waiver status, top_issues, risk_summary totals, recommendations (must_fix, monitor), nfr_validation statuses, history; capture rationale, owners, due dates, and summary comment back to storydocs/qa/gates/{story}.yml updated with schema fields (schema, story, story_title, gate, status_reason, reviewer, updated, waiver, top_issues, risk_summary, recommendations, nfr_validation, history); summary message for teamIf review incomplete or risk data outdated, halt and request rerunFAIL whenever unresolved P0 risks/tests or security holes remain; CONCERNS when mitigations planned but residual risk exists; WAIVED requires reason, approver, and expiry; maintain audit trail in historyphilosophy/core|risk-model