ArcKit’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tractorjuice/arc-kit/llms.txt
Use this file to discover all available pages before exploring further.
/arckit.traceability command generates comprehensive traceability matrices that trace requirements through design to implementation and testing, ensuring complete coverage and identifying gaps.
What This Command Does
The/arckit.traceability command automatically:
- Forward Traceability: Requirements → Design → Implementation → Tests
- Backward Traceability: Tests → Implementation → Design → Requirements
- Gap Analysis: Identifies orphan requirements, orphan design elements, and untested requirements
- Coverage Metrics: Calculates coverage by requirement type and priority
- Risk Assessment: Flags high-risk gaps (MUST requirements without coverage)
- Audit Trail: Creates compliance-ready documentation for ISO, FDA, automotive, etc.
When to Run This Command
Timing: Multiple times throughout the project lifecycle- After HLD Review: Verify all requirements mapped to high-level components
- After DLD Review: Verify all requirements mapped to detailed modules
- Before Each Sprint: Ensure sprint backlog traces to requirements
- Before Release: Go/no-go decision based on traceability score
- During Audits: Provide compliance evidence
- MANDATORY: Requirements document (
ARC-*-REQ-*.md) - RECOMMENDED:
- HLD files (
vendors/*/hld-v*.md) - DLD files (
vendors/*/dld-v*.md) - ADRs (
vendors/*/decisions/adr-*.md) - Test plans or test case references
- HLD files (
Basic Usage
How It Works
Step 1: Requirements Extraction
The command uses a pre-processor hook that automatically:- Extracts all requirement IDs (BR, FR, NFR, INT, DR) from
ARC-*-REQ-*.md - Captures categories, priorities, descriptions for each requirement
- Scans all ADRs, HLD/DLD files for requirement ID references
- Computes coverage: covered vs orphan requirements
- Detects existing TRAC version for version numbering
The hook runs before the command executes, so traceability data is pre-extracted and ready to use. You don’t need to manually scan files.
Step 2: Forward Traceability
For each requirement, the matrix shows:| Requirement | Description | Priority | HLD Component | DLD Module | Implementation | Tests | Status |
|---|---|---|---|---|---|---|---|
| FR-001 | User Registration | Must Have | User Service | UserController.register() | /api/users/register | TC-001, TC-002 | ✅ Fully covered |
| NFR-S-001 | PCI-DSS compliance | Must Have | Security Architecture | TokenVault, Encryption | security/vault.ts | SEC-001 to SEC-015 | ✅ Fully covered |
| BR-003 | Cost savings | Should Have | — | — | — | — | ❌ Not covered (GAP!) |
- ✅ Fully implemented and tested
- 🔄 In progress (design exists, implementation partial)
- ⏳ Planned (design exists, no implementation yet)
- ❌ Not covered (GAP - no design reference)
Step 3: Backward Traceability
For each test case:| Test ID | Test Description | Requirements Verified | Component Tested | Expected Outcome |
|---|---|---|---|---|
| TC-001 | User registration happy path | FR-001 | User Service | 201 Created with user ID |
| TC-002 | User registration invalid email | FR-001 | User Service | 400 Bad Request |
| SEC-015 | PCI-DSS token storage | NFR-S-001 | Token Vault | Tokens encrypted at rest |
Step 4: Gap Analysis
The command identifies:Orphan Requirements
Requirements with NO design references:Orphan Design Elements
IDs referenced in design docs but absent from REQ files (scope creep?):Orphan Tests
Tests not linked to requirements (what are they testing?):Coverage Gaps
Requirements without adequate test coverage:Coverage Metrics
The command provides detailed coverage analysis:Overall Coverage
Priority Coverage
- ✅ MUST requirements: Should be 100% covered (blocking if < 100%)
- ⚠️ SHOULD requirements: Should be > 80% covered
- ℹ️ MAY requirements: Can be < 50% covered
Risk Assessment
The command flags high-risk gaps:Risk Levels
| Risk | Description | Example |
|---|---|---|
| 🔴 CRITICAL | MUST requirements not covered | BR-003: Cost savings has no success metrics |
| 🟠 HIGH | Security/compliance requirements without tests | NFR-S-001: PCI-DSS compliance not validated |
| 🟡 MEDIUM | Performance requirements without validation | NFR-P-002: Response time not load tested |
| 🟢 LOW | Optional features not implemented | NFR-U-008: Dark mode theme (Could Have) |
Example Risk Matrix
Traceability Score
The command calculates an overall traceability score (0-100):- 90-100: Excellent - Ready for release
- 75-89: Good - Gaps must be addressed before release
- 60-74: Fair - Significant rework needed
- < 60: Poor - Not ready for release
Output File
File:ARC-{PROJECT_ID}-TRAC-v1.0.md
Contents:
- Executive summary with traceability score
- Coverage metrics (overall, by category, by priority)
- Detailed traceability matrix (all requirements)
- Gap analysis (orphan requirements, orphan design, orphan tests)
- Risk assessment with action items
- Appendices (dependency graph, glossary)
Version Numbering
The hook automatically detects existing TRAC versions:- First run:
v1.0 - Subsequent runs:
- Minor increment (
v1.0→v1.1) if scope unchanged - Major increment (
v1.0→v2.0) if scope materially changed
- Minor increment (
- New requirement categories traced
- Fundamentally different coverage approach
- Significant new artifacts added
Best Practices
1. Run Traceability Regularly
Weekly during active development:2. Use for Go/No-Go Decisions
Before phase gates (Alpha → Beta → Live):- Alpha gate: 70%+ coverage acceptable (proof of concept)
- Beta gate: 85%+ coverage required (production-ready)
- Live gate: 95%+ coverage required (all MUST requirements covered)
3. Link to Sprint Planning
Use traceability to identify sprint priorities:4. Include in Design Reviews
Before HLD/DLD approval:5. Use for Audit Compliance
For ISO 9001, ISO 13485, IEC 62304, FDA, automotive (ISO 26262):- Traceability matrix proves requirements → design → implementation → tests
- Orphan requirements prove nothing was missed
- Coverage metrics prove adequate testing
Real-World Examples
Example 1: NHS Appointment Booking
Command:- 87 requirements traced
- 85.9% coverage (73 covered, 14 orphan)
- 1 critical gap: BR-006 (Cost savings) has no success metrics
- 2 high-risk gaps: NFR-R-002 (99.99% uptime), NFR-S-008 (NHS Spine auth)
- Traceability score: 82/100 (Good)
- Recommendation: Address 3 gaps before Beta gate
Example 2: Payment Gateway
Command:- 52 requirements traced
- 96.2% coverage (50 covered, 2 orphan)
- 0 critical gaps
- 1 high-risk gap: NFR-S-001 (PCI-DSS) missing penetration test evidence
- Traceability score: 94/100 (Excellent)
- Recommendation: Address 1 gap, then ready for Live
Compliance Use Cases
ISO 9001 (Quality Management)
Required: Documented traceability from customer requirements to verification ArcKit provides:- Requirements → Design → Implementation → Tests traceability
- Gap analysis proves completeness
- Audit trail for change management
ISO 13485 (Medical Devices)
Required: Design and development outputs traceable to inputs ArcKit provides:- Forward traceability: Requirements → Design outputs
- Backward traceability: Tests → Requirements
- Risk analysis for safety requirements
IEC 62304 (Medical Device Software)
Required: Software requirements → architecture → detailed design → tests ArcKit provides:- Multi-level traceability (BR → FR → NFR → HLD → DLD → Tests)
- Verification evidence for each requirement
- Hazard analysis linkage (via risk register)
FDA 21 CFR Part 11 (Electronic Records)
Required: Traceability of changes and audit trail ArcKit provides:- Version-controlled traceability documents
- Document control metadata (reviewer, approver, dates)
- Revision history
Automotive ISO 26262 (Functional Safety)
Required: Safety requirements → safety goals → implementation → validation ArcKit provides:- ASIL-rated requirements traceability
- Safety requirements mapped to design elements
- Verification matrix (requirement → test case)
Troubleshooting
Low Coverage Score
Symptom: Coverage < 80%, many orphan requirements Causes:- Requirements not referenced in HLD/DLD
- HLD/DLD use different requirement IDs
- Requirements changed after design
- Update HLD/DLD to reference requirements explicitly
- Ensure requirement IDs match exactly (case-sensitive)
- Re-run traceability after design updates
Orphan Design Elements
Symptom: Design references IDs not in requirements Causes:- Scope creep (new features added without requirements)
- Typos in HLD/DLD (FR-042 vs FR-043)
- Requirements deleted but design not updated
- Add missing requirements to
ARC-*-REQ-*.md - Fix typos in HLD/DLD
- Remove obsolete design sections
Orphan Tests
Symptom: Tests not linked to requirements Causes:- Test cases don’t reference requirement IDs
- Exploratory tests without formal requirements
- Add requirement IDs to test case descriptions
- Create requirements for exploratory findings
Further Reading
- Sprint Planning Guide - Link traceability to user stories
- Customizing Templates - Customize traceability template
- Upgrading Guide - Preserve traceability during upgrades