Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Check Traceability

ASecurity

Verify the full refinement chain from use cases through behavioral specs, pseudo-code specs, code, and tests — report coverage at each layer and identify gaps

211 stars
0 votes
0 copies
0 views
Added 9/21/2026
ai-agentsgosecuritydocumentation

Security Analysis

A100/100

Scanned 9/21/2026

$npx -y skills add jmagly/ai-writing-guide --skill check-traceability --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Check Traceability?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Check Traceability
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jmagly-check-traceability-be3fdbee/badge)](https://www.skillsdirectory.com/skills/jmagly-check-traceability-be3fdbee)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
namespace: aiwg
name: check-traceability
platforms: [all]
description: Verify the full refinement chain from use cases through behavioral specs, pseudo-code specs, code, and tests — report coverage at each layer and identify gaps
commandHint:
  argumentHint: '[path-to-project] [--layer all|uc|behavioral|pseudo|code|test] [--format table|csv|json] [--interactive] [--guidance "text"]'
  allowedTools: 'Read, Write, Glob, Grep'
  model: haiku
  category: documentation-tracking
  modelRole: efficiency
  modelTier: economy
---

# Check Traceability

## Task

Verify the full specification-to-code refinement chain and report coverage at each layer. The traceability chain has 5 layers:

```
Layer 1: Use Cases (UC-NNN)
    └── Layer 2: Behavioral Specs (DES-UCR-NNN, DES-SM-NNN, DES-DT-NNN, DES-MIC-NNN)
         └── Layer 3: Pseudo-Code Specs (DES-PSC-NNN)
              └── Layer 4: Source Code (src/*)
                   └── Layer 5: Tests (test/*)
```

## Natural Language Triggers

Users may say:
- "Check traceability"
- "Are all requirements traced?"
- "Show traceability coverage"
- "What use cases are missing specs?"
- "Traceability report"
- "Are there gaps in the spec chain?"
- "Which UCs don't have realizations?"

## Parameters

### --layer (optional, default: all)
Check a specific layer or all layers:
- `all` — full chain (default)
- `uc` — use cases only (are they well-formed?)
- `behavioral` — UC → behavioral spec coverage
- `pseudo` — behavioral → pseudo-code coverage
- `code` — pseudo-code → source code coverage
- `test` — code → test coverage

### --format (optional, default: table)
Output format: `table` (markdown), `csv`, or `json`.

### --guidance (optional)
Focus traceability on specific areas:
```
--guidance "Focus on authentication module"
--guidance "Only check high-priority use cases"
--guidance "Exclude test layer, just check specs"
```

### --interactive (optional)
Ask questions before starting:
1. Which use cases should we check? (all, by priority, by module)
2. Should we check the full chain or specific layers?
3. Are there known gaps we should flag as expected?

## Execution Steps

### Step 1: Discover Artifacts

Scan `.aiwg/` for artifacts at each layer:

```
Layer 1 — Use Cases:
  Glob: .aiwg/requirements/UC-*.md
  Glob: .aiwg/requirements/use-case-*.md

Layer 2 — Behavioral Specs:
  Glob: .aiwg/requirements/realizations/DES-UCR-*.md
  Glob: .aiwg/architecture/state-machines/DES-SM-*.md
  Glob: .aiwg/architecture/decision-tables/DES-DT-*.md
  Glob: .aiwg/architecture/method-contracts/DES-MIC-*.md
  Glob: .aiwg/architecture/activity-diagrams/DES-ACT-*.md
  Glob: .aiwg/architecture/data-flows/DES-DFS-*.md

Layer 3 — Pseudo-Code Specs:
  Glob: .aiwg/architecture/pseudo-code/DES-PSC-*.md
  Also check: Traceability section of DES-MIC files for PSC references

Layer 4 — Source Code:
  Read pseudo-code spec Traceability sections for "Source Code:" references
  Grep source files for traceability comments (e.g., @spec DES-PSC-NNN)

Layer 5 — Tests:
  Read pseudo-code spec Traceability sections for "Tests:" references
  Grep test files for traceability comments (e.g., @spec DES-PSC-NNN)
```

### Step 2: Build Traceability Matrix

For each use case found, trace forward through all layers:

```
UC-001 (Place Order)
  ├── DES-UCR-001 (realization) ✓
  │    ├── DES-SM-001 (Order state machine) ✓
  │    ├── DES-DT-001 (Discount calculation) ✓
  │    ├── DES-MIC-010 (calculateOrderTotal) ✓
  │    │    ├── DES-PSC-010 (pseudo-code) ✓
  │    │    │    ├── src/order/pricing.ts ✓
  │    │    │    └── test/order/pricing.test.ts ✓
  │    │    └── DES-PSC-011 (pseudo-code) ✗ MISSING
  │    └── DES-MIC-013 (submitOrder) ✓
  │         └── DES-PSC-013 (pseudo-code) ✓
  │              ├── src/order/service.ts ✓
  │              └── test/order/service.test.ts ✗ MISSING
  └── DES-ACT-001 (activity diagram) ✓
```

### Step 3: Calculate Coverage

Report coverage percentage at each layer:

| Layer | Total | Covered | Coverage | Status |
|-------|-------|---------|----------|--------|
| UC → Behavioral | 12 UCs | 10 have realizations | 83% | PASS (≥80%) |
| Behavioral → Pseudo-code | 25 methods | 20 have specs | 80% | PASS (≥80%) |
| Pseudo-code → Code | 20 specs | 18 have source | 90% | PASS |
| Code → Test | 18 modules | 15 have tests | 83% | PASS (≥80%) |

### Step 4: Identify Gaps

For each gap, report:
- **What's missing**: specific artifact ID and type
- **Parent artifact**: what it should trace from
- **Priority**: based on parent UC priority
- **Impact**: what's affected downstream

### Step 5: Generate Report

Output to `.aiwg/reports/traceability-report.md`:

```markdown
# Traceability Report

**Date**: YYYY-MM-DD
**Scope**: All use cases / filtered set
**Overall Status**: PASS | GAPS | FAIL

## Coverage Summary

| Layer Transition | Total | Covered | Gaps | Coverage | Threshold | Status |
|-----------------|-------|---------|------|----------|-----------|--------|
| UC → Behavioral | N | N | N | N% | 80% | PASS/FAIL |
| Behavioral → Pseudo-code | N | N | N | N% | 80% | PASS/FAIL |
| Pseudo-code → Code | N | N | N | N% | — | INFO |
| Code → Test | N | N | N | N% | 80% | PASS/FAIL |

## Gap Details

### Missing Behavioral Specs
| Use Case | Priority | Expected Artifact | Status |
|----------|----------|-------------------|--------|
| UC-NNN | High | DES-UCR-NNN | MISSING |

### Missing Pseudo-Code Specs
| Interface Contract | Method | Expected Artifact | Status |
|-------------------|--------|-------------------|--------|
| DES-MIC-NNN | methodName | DES-PSC-NNN | MISSING |

### Missing Tests
| Source File | Pseudo-Code Spec | Expected Test | Status |
|-------------|-----------------|---------------|--------|
| src/path.ts | DES-PSC-NNN | test/path.test.ts | MISSING |

## Direct-Jump Detection

Use cases that skip specification layers (jump from UC directly to code):
| Use Case | Has Behavioral? | Has Pseudo-code? | Has Code? | Has Tests? | Issue |
|----------|-----------------|------------------|-----------|------------|-------|
| UC-NNN | NO | NO | YES | YES | Skips Layer 2+3 |

## Recommendations
- Priority 1: Create behavioral specs for high-priority UCs missing them
- Priority 2: Create pseudo-code specs for methods in critical paths
- Priority 3: Add tests for untested code files
```

## Backward Compatibility

Projects without the specification-complete layer (no behavioral or pseudo-code specs) continue to work:
- If no `.aiwg/requirements/realizations/` directory exists, skip Layer 2 check
- If no pseudo-code specs exist, skip Layer 3 check
- Report the simpler UC → code → test chain with a note that spec layers are not present
- Never fail a project for missing spec layers if they haven't adopted the specification-complete workflow

## Output

- `.aiwg/reports/traceability-report.md` — full traceability report with coverage and gaps

## References

- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/research-before-decision.md — Read the traceability matrix and all linked artifacts before reporting gaps
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/human-authorization.md — Report gaps and await owner assignment; do not autonomously close or resolve traceability issues
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/rules/provenance-tracking.md — Traceability requirements and provenance standards this skill enforces
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/skills/security-gate/SKILL.md — Security gate references traceability as a prerequisite criterion
- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/flows/gate-criteria-by-phase.md — Gate criteria that reference traceability thresholds

Attribution

jmaglyjmagly
View sourceSee grades on GitHubMore from jmagly →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →