bmad-testarch-trace

Generate requirements-to-tests traceability matrices and quality gate decisions for test coverage analysis.

1|Updated Sep 18, 2026
One-click install
npx skills add https://github.com/PastaSus/egg-defender --skill bmad-testarch-trace-pastasus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bmad-testarch-trace
Source: https://github.com/PastaSus/egg-defender/tree/main/.agents/skills/bmad-testarch-trace
Command: npx skills add https://github.com/PastaSus/egg-defender --skill bmad-testarch-trace-pastasus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often lack visibility into which requirements are actually covered by tests and whether a release is safe to ship. This Skill builds a requirements-to-tests traceability matrix, classifies coverage per criterion, identifies gaps, and produces a deterministic quality gate decision (PASS / CONCERNS / FAIL / WAIVED). ## Core Features & Use Cases - Traceability Matrix Generation: Maps acceptance criteria, OpenAPI endpoints, or inferred user journeys to discovered tests across E2E, API, component, unit, and live verification levels, with FULL / PARTIAL / NONE / UNIT-ONLY / INTEGRATION-ONLY coverage statuses. - Gap Analysis & Risk Prioritization: Flags uncovered P0-P3 criteria, endpoint gaps, missing auth negative-path tests, and happy-path-only coverage, with concrete test recommendations. - Quality Gate Decision: Applies deterministic rules over test results, coverage, NFR evidence, and waiver registers to emit gate-decision.json and e2e-trace-summary.json for CI/CD enforcement. - Use Case: Before merging a story, ask the agent to analyze test coverage; it discovers tests, maps them to acceptance criteria, reports that a P0 criterion has only unit coverage, and blocks the release with a FAIL gate decision. ## Quick Start Ask the agent to create a traceability matrix and analyze test coverage for the current story or release.

Frequently Asked Questions about bmad-testarch-trace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a requirements traceability matrix for my tests?

Invoke the workflow and it resolves a coverage oracle from acceptance criteria, OpenAPI specs, or inferred user journeys, then discovers tests in your test directory and maps each criterion to matching tests. The result is a traceability-matrix.md with coverage status per criterion.

What is a quality gate decision in CI/CD testing?

A quality gate decision is a deterministic PASS, CONCERNS, FAIL, or WAIVED verdict computed from P0/P1 coverage thresholds, test pass rates, security issues, and flaky test counts. This workflow emits gate-decision.json so pipelines can block or allow deployments automatically.

Can traceability work without formal requirements documents?

Yes. When no formal oracle exists, the workflow resolves contract artifacts like OpenAPI specs, follows external pointers to trackers such as Jira when adapters exist, or infers synthetic user journeys from source code as a fallback.

Does this workflow generate missing tests automatically?

No. It only analyzes coverage and recommends specific tests with suggested IDs, levels, and Given-When-Then descriptions. To create the missing tests, it directs you to run the companion ATDD or automate workflows.

How are live verification results counted as coverage?

Live results are read from a live-verification-results.json file and count as coverage only when the record has a unique ID, a recognized requirement, status pass, and a source SHA matching the commit under trace. Stale, failed, or unverifiable records become blockers.

When can a FAIL gate decision be waived?

A waiver requires business justification, a named approver with authority, an expiry date, and a remediation plan with a due date. Security vulnerabilities can never be waived, and invalid waivers leave their gaps in the analysis.