Create comprehensive bidirectional requirements traceability matrix mapping acceptance criteria → implementation → tests with gap analysis, severity ratings, and coverage assessment. Maps each AC to implementation evidence (files, functions, code snippets) and test coverage (test files, scenarios, priorities). Use during quality review or for compliance audits to verify complete requirements coverage.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Create comprehensive bidirectional requirements traceability matrix mapping acceptance criteria → implementation → tests with gap analysis, severity ratings, and coverage assessment. Maps each AC to implementation evidence (files, functions, code snippets) and test coverage (test files, scenarios, priorities). Use during quality review or for compliance audits to verify complete requirements coverage.
version
2
category
Quality
acceptance
{"forward_traceability":"All acceptance criteria mapped to implementation evidence with file paths, line ranges, function names, and code snippets demonstrating implementation","backward_traceability":"All tests mapped to acceptance criteria they validate with test files, scenarios, types (unit/integration/E2E), and priorities (P0/P1/P2)","gaps_identified":"Coverage gaps identified and classified by type (implementation/test), severity (CRITICAL/HIGH/MEDIUM/LOW), and priority (P0/P1/P2) with required actions","traceability_report_generated":"Complete traceability report generated with matrix, detailed entries, gap analysis, recommendations, and quality gate impact assessment"}
inputs
{"task_id":{"type":"string","required":true,"description":"Task identifier for traceability analysis (e.g., 'task-007')"},"task_file":{"type":"string","required":true,"description":"Path to task specification file"},"implementation_path":{"type":"string","required":false,"description":"Path to implementation code (defaults to project root)"},"test_path":{"type":"string","required":false,"description":"Path to test files (defaults to test directory)"},"risk_profile_file":{"type":"string","required":false,"description":"Path to risk profile file (for risk-informed gap severity)"},"test_design_file":{"type":"string","required":false,"description":"Path to test design file (for expected test scenarios)"}}
outputs
{"total_acceptance_criteria":{"type":"number","description":"Total number of acceptance criteria analyzed"},"implementation_coverage_percentage":{"type":"number","description":"Percentage of ACs with implementation evidence (0-100)"},"test_coverage_percentage":{"type":"number","description":"Percentage of ACs with test coverage (0-100)"},"traceability_score":{"type":"number","description":"Overall traceability score (0-100)"},"total_gaps":{"type":"number","description":"Total number of coverage gaps identified"},"critical_gaps_count":{"type":"number","description":"Number of critical severity gaps"},"high_gaps_count":{"type":"number","description":"Number of high severity gaps"},"traceability_report_path":{"type":"string","description":"Path to generated traceability report"},"quality_gate_impact":{"type":"string","description":"Predicted quality gate status (PASS/CONCERNS/FAIL)"}}
Perform bidirectional requirements traceability analysis ensuring every acceptance criterion is implemented and tested. Creates audit-ready traceability matrix showing complete chain: Requirements → Implementation → Tests.
Purpose
Create comprehensive traceability documentation that demonstrates:
Forward traceability: AC → Implementation (with file/line evidence)
Backward traceability: Tests → AC (with test scenario mapping)
Gap identification: Missing implementation or test coverage
Severity assessment: CRITICAL/HIGH/MEDIUM/LOW based on risk and impact
Coverage metrics: Implementation coverage, test coverage, traceability score
Quality gate impact: Prediction of gate status (PASS/CONCERNS/FAIL)
Key Capabilities:
Evidence-based verification with file paths, line ranges, code snippets
Integration with risk-profile (risk-informed gap severity)
Integration with test-design (test-to-requirement mapping)
Audit-ready documentation for compliance
Actionable recommendations with effort estimates
When to Use This Skill
Best Used:
During implementation review to verify all requirements addressed
Before quality gate to ensure completeness
During audit preparation to demonstrate traceability
After test-design to map tests to requirements
When coverage gaps need identification and prioritization
Integration Points:
Reads task specification for acceptance criteria
Reads risk profile for risk-informed gap severity (optional)
Reads test design for test-to-requirement mapping (optional)
Reads actual implementation files for evidence
Reads test files for test coverage verification
Triggers:
User asks to "trace requirements", "check coverage", "verify AC implementation"
Before quality gate (proactively suggest)
During code review (verify completeness)
Traceability Concepts
Forward Traceability (AC → Implementation): Maps each AC to implementation evidence (file, function, code snippet) | Status: ✅ Implemented, ⚠️ Partial, ❌ Not Implemented, ❓ Unclear
Backward Traceability (Tests → AC): Maps each test to ACs it validates | Status: ✅ Tested, ⚠️ Partial, ❌ Not Tested, 🔄 Indirect
Gap Severity: CRITICAL (9): Security/data integrity/core functionality | HIGH (6-8): Important requirements/P0 tests | MEDIUM (3-5): Minor requirements/P1 tests | LOW (1-2): Nice-to-have/P2 tests
See:references/templates.md for complete examples and classification details
SEQUENTIAL Skill Execution
CRITICAL: Do not proceed to next step until current step is complete
Step 0: Load Configuration and Context
Purpose: Load project configuration, task specification, and related assessments
Actions:
Load configuration from .claude/config.yaml:
Extract quality settings (assessmentLocation)
Extract risk score threshold (for gap severity assessment)
Document missing test scenarios, identify edge cases/error cases
Classify gap severity:
Use risk profile (if available) to inform severity:
CRITICAL (Score 9):
Security requirement not implemented or tested
Data integrity requirement missing
Core functionality not implemented
High-risk area (from risk profile) not tested
HIGH (Score 6-8):
Important requirement not implemented
Security test missing (but implementation exists)
Performance requirement not validated
P0 test missing
MEDIUM (Score 3-5):
Minor requirement not implemented
Edge case test missing
P1 test missing
Partial implementation without full test coverage
LOW (Score 1-2):
Nice-to-have requirement missing
P2 test missing
Documentation-only gap
Cross-reference with risk profile (if available):
Gaps in high-risk areas → Increase severity
Gaps with existing mitigation → Decrease severity
Gaps without test coverage for high-risk area → CRITICAL
Calculate gap metrics:
Total Gaps = Implementation Gaps + Test Gaps
Critical Gaps = Gaps with severity CRITICAL
High Gaps = Gaps with severity HIGH
Medium Gaps = Gaps with severity MEDIUM
Low Gaps = Gaps with severity LOW
Gap Coverage = (Total AC - Total Gaps) / Total AC × 100%
Present concise summary: Task metadata, coverage metrics (implementation/test/gap/traceability score), gap breakdown by severity, quality gate impact + reasoning, actions to achieve PASS with estimates, report path, next steps
Output: Report generated at output path, summary presented
Halt If: File write fails
See:references/templates.md#step-4-complete-summary-format for full summary output
Integration with Other Skills
Integration with risk-profile
Input: Risk scores for high-risk areas | Usage: Gaps in high-risk areas → increase severity (e.g., HIGH → CRITICAL), missing tests for high-risk → CRITICAL
Integration with test-design
Input: Test scenarios with priorities (P0/P1/P2), AC-to-test mappings | Usage: Validate test-to-AC mappings, identify missing test scenarios, use test priorities for gap severity
// Implements AC-1: User signup with email and passwordexportasyncfunctionhandleSignup(req: Request, res: Response) {
// ...
}
Reference AC IDs in Commits:
git commit -m "feat: implement user signup (AC-1, AC-2, AC-3)"
Reference AC IDs in Test Names:
it('should satisfy AC-1: user can sign up with email and password', async () => {
// ...
});
Run Before Code Review:
Check traceability before marking task as "Review"
Close gaps before requesting review
Re-run trace-requirements after closing gaps
Use for Audit Trail:
Demonstrate requirements → implementation → test chain
Show evidence for compliance
Cross-reference with risk profile for risk coverage
Configuration
In .claude/config.yaml
quality:# Quality assessment locationassessmentLocation:".claude/quality/assessments"# Risk score threshold for gap severity amplificationriskScoreThreshold:6# Gaps in areas with risk ≥6 get higher severity# Traceability thresholdstraceability:implementationCoverage:90# Minimum implementation coveragetestCoverage:85# Minimum test coveragetraceabilityScore:80# Minimum overall traceability score
Template File
.claude/templates/trace-requirements.md - Template for traceability report output (optional)
Version: 2.0 (Refactored for skill-creator compliance and Minimal V2 architecture)
Category: Quality
Depends On: risk-profile (optional, enhances gap severity), test-design (optional, enhances test mapping)
Used By: quality-gate (uses traceability score and gaps for gate decision)