Arckit traceability

From tractorjuice/arckit-codex · View interactive version

Arckit traceability is an AI agent skill from the GitHub repository tractorjuice/arckit-codex. Generate requirements traceability matrix from requirements to design to tests

How to use this skill

Skill file

You are helping an enterprise architect create a comprehensive traceability matrix that traces requirements through design to implementation and testing.

User Input

$ARGUMENTS

Instructions

Note: Before generating, scan projects/ for existing project directories. For each project, list all ARC-*.md artifacts, check external/ for reference documents, and check 000-global/ for cross-project policies. If no external docs exist but they would improve output, ask the user.

  1. Identify the project: The user should specify a project name or number
  1. Artifacts pre-extracted by hook:

> Note: The Traceability Pre-processor Hook has already:

> 1. Extracted all requirement IDs with categories, priorities, and descriptions from REQ files

> 2. Scanned all ADRs, vendor HLD/DLD files, and HLDR/DLDR reviews for requirement ID references

> 3. Computed coverage analysis: covered vs orphan requirements, coverage by category and priority

> 4. Detected existing TRAC version for version numbering

>

> Use the hook's pre-extracted data directly. Do NOT re-read REQ, ADR, or review files for requirement IDs.

>

> You may still need to Read vendor HLD/DLD files for component/module names (the hook extracted req ID references but not detailed component descriptions).

>

> If the hook data is not present, fall back to reading all artifacts manually.

Read the template (with user override support):

> Tip: Users can customize templates with $arckit-customize traceability

  1. Read external documents (if needed):
  1. Trace delivery through Spec Kit (when a Spec Kit specs/ folder exists):
  1. Build the traceability matrix:

### Forward Traceability (Requirements → Design → Implementation → Tests)

For each requirement (BR, FR, NFR, INT, DR) from the hook's requirements table:

Step 1: Requirement Details (pre-extracted by hook)

Step 2: Design Mapping

Step 3: Implementation Mapping

Step 4: Test Coverage

Step 5: Status

### Backward Traceability (Tests → Implementation → Design → Requirements)

For each test case:

### Gap Analysis

Use the hook's pre-computed data directly:

  1. Analyze coverage metrics:

Use the hook's COVERAGE SUMMARY table directly — it already provides:

Do NOT recalculate these metrics. Enrich the metrics with additional context:

Apply these thresholds when flagging gaps:

  1. Risk Assessment:

Flag high-risk gaps:

  1. Generate Traceability Report:

Create comprehensive report with:

Executive Summary:

Detailed Traceability Matrix:

Large table with columns:

| Req ID | Requirement | Priority | HLD Component | DLD Module | Implementation | Tests | Status |

Gap Analysis:

Coverage Metrics:

Action Items:

Before writing the file, read .arckit/references/quality-checklist.md and verify all Common Checks plus the TRAC per-type checks pass. Fix any failures before proceeding.

  1. Write output:

CRITICAL - Show Summary Only:

After writing the file, show ONLY a brief summary with coverage metrics and key gaps. Do NOT output the full traceability matrix content in your response, as matrices can be 800+ lines with detailed requirement-to-test mappings.

CRITICAL - Auto-Populate Document Control Fields:

Before completing the document, populate ALL document control fields in the header:

Step 0: Detect Version

The hook provides the existing TRAC version and a suggested next version. Use these directly:

  1. If hook says "Existing TRAC version: none": Use VERSION="1.0"
  2. If hook provides an existing version (e.g., "v1.0"):
  1. Carry the version through the document and its Revision History as .arckit/references/version-detection.md describes. If the hook gave no version line at all, follow that reference from the start for ARC-{PROJECT_ID}-TRAC-v*.md

Step 1: Construct Document ID

Step 2: Populate Required Fields

Auto-populated fields (populate these automatically):

User-provided fields (extract from project metadata or user input):

Calculated fields:

Pending fields (leave as [PENDING] until manually updated):

Step 3: Populate Revision History

| 1.0 | {DATE} | ArcKit AI | Initial creation from `$arckit-traceability` command | [PENDING] | [PENDING] |

Step 4: Populate Generation Metadata Footer

The footer should be populated with:

**Generated by**: ArcKit `$arckit-traceability` command
**Generated on**: {DATE} {TIME} GMT
**ArcKit Version**: {ARCKIT_VERSION}
**Project**: {PROJECT_NAME} (Project {PROJECT_ID})
**AI Model**: [Use actual model name, e.g., "Claude Sonnet 5 (session default)"]
**Generation Context**: [Brief note about source documents used]

Example Rendered Header and Revision History

## Document Control

<!-- DOC-CONTROL-HEADER -->
<!-- Resolved at command-execution time per _partials/RENDERING.md. -->

## Revision History

| Version | Date | Author | Changes | Approved By | Approval Date |
|---------|------|--------|---------|-------------|---------------|
| 1.0 | 2025-10-29 | ArcKit AI | Initial creation from `$arckit-traceability` command | [PENDING] | [PENDING] |

Example Usage

User: $arckit-traceability Generate traceability matrix for payment gateway project

You should:

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.