# Tracing Requirements

> Validates the SYS→PRD→SW requirement traceability chain by reconciling database entries with code docstring tags. Use when checking requirement coverage, finding orphaned code, or generating a coverage matrix.

- **Type:** Skill
- **Install:** `agentstack add skill-qte77-claude-code-plugins-tracing-requirements`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [qte77](https://agentstack.voostack.com/s/qte77)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [qte77](https://github.com/qte77)
- **Source:** https://github.com/qte77/claude-code-plugins/tree/main/plugins/embedded-dev/skills/tracing-requirements
- **Website:** https://qte77.github.io/claude-code-plugins/

## Install

```sh
agentstack add skill-qte77-claude-code-plugins-tracing-requirements
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Requirement Traceability Validation

**Target**: $ARGUMENTS

Validate the full requirement hierarchy by reconciling the requirements source with code docstring tags.

## References (MUST READ)

Read these before proceeding:

- `references/requirement-tagging.md` — `@requirement`/`@parent`/`@test` spec, reconciliation algorithm

## Workflow

1. **Grep all C files** for `@requirement`, `@parent`, and `@test` tags → build tag inventory
2. **Read requirements source** — `docs/requirements.md`, CSV, or SQL dump
3. **Validate 3-level hierarchy:**
   - Every SW-REQ has a `@parent` PRD-REQ
   - Every PRD-REQ traces to a SYS-REQ
   - No broken parent links
4. **Generate findings report** with categories:
   - **Unimplemented:** SW-REQ in database but no `@requirement` tag in code
   - **Orphaned code:** `@requirement` tag in code but no matching DB entry
   - **Broken parents:** `@parent` references a non-existent PRD-REQ
   - **Untested:** SW-REQ without matching `@test` tag
   - **Dead code candidates:** Functions without any requirement tag
5. **Output coverage matrix:**

   ```
   | Requirement | Code File:Line | Test ID | Status |
   |-------------|---------------|---------|--------|
   | SW-REQ-001  | src/emv.c:42  | TEST-001| OK     |
   | SW-REQ-002  | —             | —       | MISSING|
   ```

## Output Format

```markdown
# Traceability Report

## Summary
- Total SW-REQ: N
- Implemented: N (N%)
- Tested: N (N%)
- Orphaned code tags: N
- Broken parent links: N

## Unimplemented Requirements
...

## Orphaned Code
...

## Coverage Matrix
...
```

## Rules

- Scan all `*.c` and `*.h` files, not just `src/`
- Report findings — do not auto-fix requirement files
- Include file path and line number for every code finding
- Sort coverage matrix by requirement ID

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [qte77](https://github.com/qte77)
- **Source:** [qte77/claude-code-plugins](https://github.com/qte77/claude-code-plugins)
- **License:** Apache-2.0
- **Homepage:** https://qte77.github.io/claude-code-plugins/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-qte77-claude-code-plugins-tracing-requirements
- Seller: https://agentstack.voostack.com/s/qte77
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
