[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C2Z0PFATPF7WAAEBF7VX79":3,"skill-same:01M6C2Z0PFATPF7WAAEBF7VX79":87},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":58,"ownerDescription":59,"updatedAt":60,"install":61,"resources":74},"01M6C2Z0PFATPF7WAAEBF7VX79","traceability-check","需求代码测试追溯检查","Verify bidirectional traceability from requirements to code to tests and identify coverage gaps and orphan artifacts","验证从需求到代码再到测试的双向可追溯性，识别覆盖缺口与孤立（孤儿）工件。","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fcodex-sdlc\u002Fskills\u002Ftraceability-check\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42],"check","traceability check","traceability","coverage gaps","code","artifacts","verify","coverage","requirements","orphan","tests","gaps","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: traceability-check\nplatforms: [all]\ndescription: Verify bidirectional traceability from requirements to code to tests and identify coverage gaps and orphan artifacts\n\n---\n\n# traceability-check\n\nVerify bidirectional traceability from requirements to code to tests.\n\n## Triggers\n\n\nAlternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):\n\n- \"RTM\" → Requirements Traceability Matrix check\n- \"V&V matrix\" → Verification & Validation coverage\n- \"coverage holes\" in requirements context → traceability gap analysis\n- \"are requirements covered\" → traceability validation\n\n## Purpose\n\nThis skill ensures complete traceability across the SDLC by:\n- Extracting requirement IDs from documentation\n- Scanning code for requirement references\n- Mapping tests to requirements\n- Identifying coverage gaps\n- Detecting orphan artifacts\n\n## Behavior\n\nWhen triggered, this skill uses the `aiwg index` CLI as its primary backend for artifact discovery, falling back to direct file scanning only when the index is unavailable.\n\n### Step 1: Ensure Index Available\n\n```bash\n# Check if index exists, build if needed\naiwg index stats --json || aiwg index build\n```\n\n### Step 2: Query Requirements Inventory\n\n```bash\n# Get all requirement artifacts from the index\naiwg index query --type use-case --json\naiwg index query --type requirement --json\naiwg index query --type nfr --json\n```\n\n### Step 3: Check Dependencies for Each Artifact\n\n```bash\n# For each requirement, check what depends on it (downstream = code, tests)\naiwg index deps .aiwg\u002Frequirements\u002FUC-001.md --direction downstream --json\n```\n\n### Step 4: Build Traceability Matrix\n\nUsing the dependency graph from `aiwg index deps`, build:\n- Bidirectional mapping: requirement \u003C-> code \u003C-> tests\n- Calculate coverage percentages\n- Identify gaps in each direction\n\n### Step 5: Identify Issues\n\n- Orphan requirements (no downstream code references)\n- Untested code (code without test dependents)\n- Untested requirements (requirements without test coverage)\n- Code without requirements (no upstream requirement references)\n\n### Step 6: Generate Report\n\n- Traceability matrix with coverage statistics\n- Gap analysis with prioritized recommendations\n- Save to `.aiwg\u002Freports\u002Ftraceability-{date}.md`\n\n### Fallback Behavior\n\nIf `aiwg index` is not available (not installed or index not built), fall back to direct scanning:\n- Scan `.aiwg\u002Frequirements\u002F` for IDs (UC-*, REQ-*, NFR-*)\n- Search source files for requirement ID references\n- Search test files for requirement coverage\n- Build matrix from raw file scanning results\n\n## Traceability Model\n\n```\n┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐\n│  REQUIREMENTS   │────▶│      CODE       │────▶│     TESTS       │\n│                 │     │                 │     │                 │\n│ UC-001          │     │ auth.ts         │     │ auth.test.ts    │\n│ UC-002          │     │ user.ts         │     │ user.test.ts    │\n│ REQ-001         │     │ api\u002Froutes.ts   │     │ api.test.ts     │\n│ NFR-001         │     │ perf\u002Fcache.ts   │     │ perf.test.ts    │\n└─────────────────┘     └─────────────────┘     └─────────────────┘\n         │                      │                       │\n         │                      │                       │\n         └──────────────────────┴───────────────────────┘\n                     TRACEABILITY MATRIX\n```\n\n## ID Patterns\n\n### Requirement ID Formats\n\n| Type | Pattern | Example |\n|------|---------|---------|\n| Use Case | UC-NNN | UC-001, UC-042 |\n| Requirement | REQ-NNN | REQ-001, REQ-123 |\n| Non-Functional | NFR-NNN | NFR-001, NFR-015 |\n| User Story | US-NNN | US-001, US-089 |\n| Feature | FEAT-NNN | FEAT-001 |\n\n### Code Reference Patterns\n\n```typescript\n\u002F\u002F In code comments\n\u002F\u002F Implements: UC-001\n\u002F\u002F Related: REQ-003, REQ-004\n\n\u002F\u002F In JSDoc\n\u002F**\n * @requirement UC-001\n * @requirement REQ-003\n *\u002F\n\n\u002F\u002F In function names\nfunction handleAuthUC001() {}\n\n\u002F\u002F In test descriptions\ndescribe('UC-001: User Authentication', () => {\n  it('should validate credentials (REQ-001)', () => {});\n});\n```\n\n## Traceability Matrix Format\n\n### Full Matrix\n\n```markdown\n| Requirement | Description | Code Files | Test Files | Status |\n|-------------|-------------|------------|------------|--------|\n| UC-001 | User login | auth.ts, session.ts | auth.test.ts | ✅ Covered |\n| UC-002 | User logout | auth.ts | auth.test.ts | ✅ Covered |\n| UC-003 | Password reset | - | - | ❌ Not Implemented |\n| REQ-001 | Validate email | user.ts | user.test.ts | ✅ Covered |\n| REQ-002 | Hash passwords | auth.ts | - | ⚠️ Untested |\n| NFR-001 | \u003C 200ms response | cache.ts | perf.test.ts | ✅ Covered |\n```\n\n### Coverage Summary\n\n```markdown\n## Coverage Summary\n\n| Category | Total | Implemented | Tested | Coverage |\n|----------|-------|-------------|--------|----------|\n| Use Cases | 15 | 14 | 12 | 80% |\n| Requirements | 42 | 40 | 35 | 83% |\n| NFRs | 8 | 6 | 4 | 50% |\n| **Total** | **65** | **60** | **51** | **78%** |\n```\n\n## Gap Analysis\n\n### Orphan Requirements\n\nRequirements with no code implementation:\n\n```markdown\n### Orphan Requirements (No Implementation)\n\n| ID | Description | Priority | Action |\n|----|-------------|----------|--------|\n| UC-003 | Password reset | High | Implement in Sprint 5 |\n| REQ-015 | Export to PDF | Medium | Backlogged |\n| NFR-008 | 99.9% uptime | High | Infrastructure ticket |\n```\n\n### Untested Code\n\nCode without test coverage:\n\n```markdown\n### Untested Code\n\n| File | Functions | Linked Requirements | Action |\n|------|-----------|---------------------|--------|\n| utils\u002Fcrypto.ts | hashPassword, verifyHash | REQ-002 | Add unit tests |\n| api\u002Fexport.ts | generateReport | REQ-010 | Add integration test |\n```\n\n### Rogue Code\n\nCode with no requirement linkage:\n\n```markdown\n### Code Without Requirements (Potential Rogue Features)\n\n| File | Functions | Notes |\n|------|-----------|-------|\n| legacy\u002Fold-auth.ts | * | Deprecated, remove |\n| experiments\u002Ffeature-x.ts | * | Experimental, document or remove |\n```\n\n## Validation Rules\n\n### Required Traceability\n\n```yaml\nrules:\n  requirements_to_code:\n    required: true\n    min_coverage: 90%\n    exceptions:\n      - deferred features\n      - infrastructure requirements\n\n  code_to_tests:\n    required: true\n    min_coverage: 80%\n    exceptions:\n      - generated code\n      - type definitions\n\n  requirements_to_tests:\n    required: true\n    min_coverage: 80%\n    exceptions:\n      - manual test procedures\n```\n\n### Validation Checks\n\n```yaml\nchecks:\n  - name: no_orphan_requirements\n    description: All requirements must have implementation\n    severity: warning\n\n  - name: no_untested_requirements\n    description: All requirements must have tests\n    severity: warning\n\n  - name: no_rogue_code\n    description: All code must trace to requirements\n    severity: info\n\n  - name: coverage_threshold\n    description: Meet minimum coverage thresholds\n    severity: error\n```\n\n## Usage Examples\n\n### Full Traceability Check\n\n```\nUser: \"Check traceability\"\n\nSkill scans:\n1. Extract 65 requirements from .aiwg\u002Frequirements\u002F\n2. Scan src\u002F for requirement references\n3. Scan test\u002F for requirement coverage\n4. Build matrix\n\nOutput:\n\"Traceability Analysis Complete\n\nRequirements: 65\nImplemented: 60 (92%)\nTested: 51 (78%)\n\nGaps Found:\n- 5 orphan requirements (no code)\n- 9 untested requirements\n- 3 code files with no requirement links\n\nReport: .aiwg\u002Freports\u002Ftraceability-20251208.md\"\n```\n\n### Check Specific Requirement\n\n```\nUser: \"Trace UC-001\"\n\nSkill returns:\n\"UC-001: User Authentication\n\nImplementation:\n- src\u002Fauth\u002Flogin.ts (lines 45-120)\n- src\u002Fauth\u002Fsession.ts (lines 10-50)\n\nTests:\n- test\u002Fauth\u002Flogin.test.ts (8 test cases)\n- test\u002Fintegration\u002Fauth.test.ts (3 scenarios)\n\nCoverage: ✅ Fully traced\"\n```\n\n### Find Orphans\n\n```\nUser: \"Find orphan requirements\"\n\nSkill returns:\n\"Orphan Requirements (No Implementation):\n\n1. UC-003: Password reset flow\n   Priority: High\n   Sprint: Backlog\n\n2. REQ-015: Export to PDF\n   Priority: Medium\n   Sprint: Backlog\n\n3. NFR-008: 99.9% uptime SLA\n   Priority: High\n   Type: Infrastructure\n\nTotal: 3 orphan requirements\"\n```\n\n## Report Format\n\n```markdown\n# Traceability Analysis Report\n\n**Date**: 2025-12-08\n**Scope**: Full Project\n**Tool**: traceability-check skill\n\n## Executive Summary\n\n| Metric | Value | Target | Status |\n|--------|-------|--------|--------|\n| Requirements Coverage | 92% | 90% | ✅ Pass |\n| Test Coverage | 78% | 80% | ⚠️ Below Target |\n| Orphan Requirements | 5 | 0 | ⚠️ Action Needed |\n| Rogue Code Files | 3 | 0 | ℹ️ Review |\n\n## Traceability Matrix\n\n[Full matrix table...]\n\n## Gap Analysis\n\n### Critical Gaps\n- NFR-001 (Performance) has no test coverage\n- UC-012 (Payment) missing integration tests\n\n### Action Items\n1. Add performance tests for NFR-001\n2. Implement UC-003 (Password reset)\n3. Add tests for UC-012\n\n## Recommendations\n\n1. **Immediate**: Address critical test gaps\n2. **Short-term**: Implement orphan requirements\n3. **Process**: Add traceability to PR checklist\n```\n\n## Integration\n\nThis skill uses:\n- `aiwg index query`: Discover requirement artifacts by type and phase\n- `aiwg index deps`: Navigate upstream\u002Fdownstream dependency graphs\n- `aiwg index stats`: Check index health and coverage metrics\n- `artifact-metadata`: Get requirement artifact info (fallback)\n- `project-awareness`: Find source and test directories (fallback)\n\n## Scanning Configuration\n\nConfigure scanning behavior in `.aiwg\u002Fconfig\u002Ftraceability.yaml`:\n\n```yaml\ntraceability:\n  requirements_dir: .aiwg\u002Frequirements\u002F\n  source_dirs:\n    - src\u002F\n    - lib\u002F\n  test_dirs:\n    - test\u002F\n    - __tests__\u002F\n\n  id_patterns:\n    - \"UC-\\\\d{3}\"\n    - \"REQ-\\\\d{3}\"\n    - \"NFR-\\\\d{3}\"\n    - \"US-\\\\d{3}\"\n\n  code_patterns:\n    - \"\u002F\u002F Implements: {id}\"\n    - \"\u002F\u002F Related: {id}\"\n    - \"@requirement {id}\"\n    - \"\\\\b{id}\\\\b\"  # bare reference\n\n  test_patterns:\n    - \"describe\\\\(['\\\"].*{id}.*['\\\"]\"\n    - \"it\\\\(['\\\"].*{id}.*['\\\"]\"\n    - \"@covers {id}\"\n\n  exclusions:\n    - node_modules\u002F\n    - dist\u002F\n    - \"*.generated.*\"\n```\n\n## Output Locations\n\n- Traceability report: `.aiwg\u002Freports\u002Ftraceability-{date}.md`\n- Traceability matrix: `.aiwg\u002Freports\u002Ftraceability-matrix.csv`\n- Gap analysis: `.aiwg\u002Freports\u002Fcoverage-gaps.md`\n\n## References\n\n- Requirements artifacts: .aiwg\u002Frequirements\u002F\n- Traceability template: templates\u002Fmanagement\u002Ftraceability-matrix-template.md\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Frules\u002Fartifact-discovery.md — Agent protocol for index usage\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Fskills\u002Fartifact-lookup\u002FSKILL.md — Artifact search skill\n- @$AIWG_ROOT\u002Fsrc\u002Fartifacts\u002Fcli.ts — CLI implementation\n","# traceability-check\n\nVerify bidirectional traceability from requirements to code to tests.\n\n## Triggers\n\n\nAlternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):\n\n- \"RTM\" → Requirements Traceability Matrix check\n- \"V&V matrix\" → Verification & Validation coverage\n- \"coverage holes\" in requirements context → traceability gap analysis\n- \"are requirements covered\" → traceability validation\n\n## Purpose\n\nThis skill ensures complete traceability across the SDLC by:\n- Extracting requirement IDs from documentation\n- Scanning code for requirement references\n- Mapping tests to requirements\n- Identifying coverage gaps\n- Detecting orphan artifacts\n\n## Behavior\n\nWhen triggered, this skill uses the `aiwg index` CLI as its primary backend for artifact discovery, falling back to direct file scanning only when the index is unavailable.\n\n### Step 1: Ensure Index Available\n\n```bash\n# Check if index exists, build if needed\naiwg index stats --json || aiwg index build\n```\n\n### Step 2: Query Requirements Inventory\n\n```bash\n# Get all requirement artifacts from the index\naiwg index query --type use-case --json\naiwg index query --type requirement --json\naiwg index query --type nfr --json\n```\n\n### Step 3: Check Dependencies for Each Artifact\n\n```bash\n# For each requirement, check what depends on it (downstream = code, tests)\naiwg index deps .aiwg\u002Frequirements\u002FUC-001.md --direction downstream --json\n```\n\n### Step 4: Build Traceability Matrix\n\nUsing the dependency graph from `aiwg index deps`, build:\n- Bidirectional mapping: requirement \u003C-> code \u003C-> tests\n- Calculate coverage percentages\n- Identify gaps in each direction\n\n### Step 5: Identify Issues\n\n- Orphan requirements (no downstream code references)\n- Untested code (code without test dependents)\n- Untested requirements (requirements without test coverage)\n- Code without requirements (no upstream requirement references)\n\n### Step 6: Generate Report\n\n- Traceability matrix with coverage statistics\n- Gap analysis with prioritized recommendations\n- Save to `.aiwg\u002Freports\u002Ftraceability-{date}.md`\n\n### Fallback Behavior\n\nIf `aiwg index` is not available (not installed or index not built), fall back to direct scanning:\n- Scan `.aiwg\u002Frequirements\u002F` for IDs (UC-*, REQ-*, NFR-*)\n- Search source files for requirement ID references\n- Search test files for requirement coverage\n- Build matrix from raw file scanning results\n\n## Traceability Model\n\n```\n┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐\n│  REQUIREMENTS   │────▶│      CODE       │────▶│     TESTS       │\n│                 │     │                 │     │                 │\n│ UC-001          │     │ auth.ts         │     │ auth.test.ts    │\n│ UC-002          │     │ user.ts         │     │ user.test.ts    │\n│ REQ-001         │     │ api\u002Froutes.ts   │     │ api.test.ts     │\n│ NFR-001         │     │ perf\u002Fcache.ts   │     │ perf.test.ts    │\n└─────────────────┘     └─────────────────┘     └─────────────────┘\n         │                      │                       │\n         │                      │                       │\n         └──────────────────────┴───────────────────────┘\n                     TRACEABILITY MATRIX\n```\n\n## ID Patterns\n\n### Requirement ID Formats\n\n| Type | Pattern | Example |\n|------|---------|---------|\n| Use Case | UC-NNN | UC-001, UC-042 |\n| Requirement | REQ-NNN | REQ-001, REQ-123 |\n| Non-Functional | NFR-NNN | NFR-001, NFR-015 |\n| User Story | US-NNN | US-001, US-089 |\n| Feature | FEAT-NNN | FEAT-001 |\n\n### Code Reference Patterns\n\n```typescript\n\u002F\u002F In code comments\n\u002F\u002F Implements: UC-001\n\u002F\u002F Related: REQ-003, REQ-004\n\n\u002F\u002F In JSDoc\n\u002F**\n * @requirement UC-001\n * @requirement REQ-003\n *\u002F\n\n\u002F\u002F In function names\nfunction handleAuthUC001() {}\n\n\u002F\u002F In test descriptions\ndescribe('UC-001: User Authentication', () => {\n  it('should validate credentials (REQ-001)', () => {});\n});\n```\n\n## Traceability Matrix Format\n\n### Full Matrix\n\n```markdown\n| Requirement | Description | Code Files | Test Files | Status |\n|-------------|-------------|------------|------------|--------|\n| UC-001 | User login | auth.ts, session.ts | auth.test.ts | ✅ Covered |\n| UC-002 | User logout | auth.ts | auth.test.ts | ✅ Covered |\n| UC-003 | Password reset | - | - | ❌ Not Implemented |\n| REQ-001 | Validate email | user.ts | user.test.ts | ✅ Covered |\n| REQ-002 | Hash passwords | auth.ts | - | ⚠️ Untested |\n| NFR-001 | \u003C 200ms response | cache.ts | perf.test.ts | ✅ Covered |\n```\n\n### Coverage Summary\n\n```markdown\n## Coverage Summary\n\n| Category | Total | Implemented | Tested | Coverage |\n|----------|-------|-------------|--------|----------|\n| Use Cases | 15 | 14 | 12 | 80% |\n| Requirements | 42 | 40 | 35 | 83% |\n| NFRs | 8 | 6 | 4 | 50% |\n| **Total** | **65** | **60** | **51** | **78%** |\n```\n\n## Gap Analysis\n\n### Orphan Requirements\n\nRequirements with no code implementation:\n\n```markdown\n### Orphan Requirements (No Implementation)\n\n| ID | Description | Priority | Action |\n|----|-------------|----------|--------|\n| UC-003 | Password reset | High | Implement in Sprint 5 |\n| REQ-015 | Export to PDF | Medium | Backlogged |\n| NFR-008 | 99.9% uptime | High | Infrastructure ticket |\n```\n\n### Untested Code\n\nCode without test coverage:\n\n```markdown\n### Untested Code\n\n| File | Functions | Linked Requirements | Action |\n|------|-----------|---------------------|--------|\n| utils\u002Fcrypto.ts | hashPassword, verifyHash | REQ-002 | Add unit tests |\n| api\u002Fexport.ts | generateReport | REQ-010 | Add integration test |\n```\n\n### Rogue Code\n\nCode with no requirement linkage:\n\n```markdown\n### Code Without Requirements (Potential Rogue Features)\n\n| File | Functions | Notes |\n|------|-----------|-------|\n| legacy\u002Fold-auth.ts | * | Deprecated, remove |\n| experiments\u002Ffeature-x.ts | * | Experimental, document or remove |\n```\n\n## Validation Rules\n\n### Required Traceability\n\n```yaml\nrules:\n  requirements_to_code:\n    required: true\n    min_coverage: 90%\n    exceptions:\n      - deferred features\n      - infrastructure requirements\n\n  code_to_tests:\n    required: true\n    min_coverage: 80%\n    exceptions:\n      - generated code\n      - type definitions\n\n  requirements_to_tests:\n    required: true\n    min_coverage: 80%\n    exceptions:\n      - manual test procedures\n```\n\n### Validation Checks\n\n```yaml\nchecks:\n  - name: no_orphan_requirements\n    description: All requirements must have implementation\n    severity: warning\n\n  - name: no_untested_requirements\n    description: All requirements must have tests\n    severity: warning\n\n  - name: no_rogue_code\n    description: All code must trace to requirements\n    severity: info\n\n  - name: coverage_threshold\n    description: Meet minimum coverage thresholds\n    severity: error\n```\n\n## Usage Examples\n\n### Full Traceability Check\n\n```\nUser: \"Check traceability\"\n\nSkill scans:\n1. Extract 65 requirements from .aiwg\u002Frequirements\u002F\n2. Scan src\u002F for requirement references\n3. Scan test\u002F for requirement coverage\n4. Build matrix\n\nOutput:\n\"Traceability Analysis Complete\n\nRequirements: 65\nImplemented: 60 (92%)\nTested: 51 (78%)\n\nGaps Found:\n- 5 orphan requirements (no code)\n- 9 untested requirements\n- 3 code files with no requirement links\n\nReport: .aiwg\u002Freports\u002Ftraceability-20251208.md\"\n```\n\n### Check Specific Requirement\n\n```\nUser: \"Trace UC-001\"\n\nSkill returns:\n\"UC-001: User Authentication\n\nImplementation:\n- src\u002Fauth\u002Flogin.ts (lines 45-120)\n- src\u002Fauth\u002Fsession.ts (lines 10-50)\n\nTests:\n- test\u002Fauth\u002Flogin.test.ts (8 test cases)\n- test\u002Fintegration\u002Fauth.test.ts (3 scenarios)\n\nCoverage: ✅ Fully traced\"\n```\n\n### Find Orphans\n\n```\nUser: \"Find orphan requirements\"\n\nSkill returns:\n\"Orphan Requirements (No Implementation):\n\n1. UC-003: Password reset flow\n   Priority: High\n   Sprint: Backlog\n\n2. REQ-015: Export to PDF\n   Priority: Medium\n   Sprint: Backlog\n\n3. NFR-008: 99.9% uptime SLA\n   Priority: High\n   Type: Infrastructure\n\nTotal: 3 orphan requirements\"\n```\n\n## Report Format\n\n```markdown\n# Traceability Analysis Report\n\n**Date**: 2025-12-08\n**Scope**: Full Project\n**Tool**: traceability-check skill\n\n## Executive Summary\n\n| Metric | Value | Target | Status |\n|--------|-------|--------|--------|\n| Requirements Coverage | 92% | 90% | ✅ Pass |\n| Test Coverage | 78% | 80% | ⚠️ Below Target |\n| Orphan Requirements | 5 | 0 | ⚠️ Action Needed |\n| Rogue Code Files | 3 | 0 | ℹ️ Review |\n\n## Traceability Matrix\n\n[Full matrix table...]\n\n## Gap Analysis\n\n### Critical Gaps\n- NFR-001 (Performance) has no test coverage\n- UC-012 (Payment) missing integration tests\n\n### Action Items\n1. Add performance tests for NFR-001\n2. Implement UC-003 (Password reset)\n3. Add tests for UC-012\n\n## Recommendations\n\n1. **Immediate**: Address critical test gaps\n2. **Short-term**: Implement orphan requirements\n3. **Process**: Add traceability to PR checklist\n```\n\n## Integration\n\nThis skill uses:\n- `aiwg index query`: Discover requirement artifacts by type and phase\n- `aiwg index deps`: Navigate upstream\u002Fdownstream dependency graphs\n- `aiwg index stats`: Check index health and coverage metrics\n- `artifact-metadata`: Get requirement artifact info (fallback)\n- `project-awareness`: Find source and test directories (fallback)\n\n## Scanning Configuration\n\nConfigure scanning behavior in `.aiwg\u002Fconfig\u002Ftraceability.yaml`:\n\n```yaml\ntraceability:\n  requirements_dir: .aiwg\u002Frequirements\u002F\n  source_dirs:\n    - src\u002F\n    - lib\u002F\n  test_dirs:\n    - test\u002F\n    - __tests__\u002F\n\n  id_patterns:\n    - \"UC-\\\\d{3}\"\n    - \"REQ-\\\\d{3}\"\n    - \"NFR-\\\\d{3}\"\n    - \"US-\\\\d{3}\"\n\n  code_patterns:\n    - \"\u002F\u002F Implements: {id}\"\n    - \"\u002F\u002F Related: {id}\"\n    - \"@requirement {id}\"\n    - \"\\\\b{id}\\\\b\"  # bare reference\n\n  test_patterns:\n    - \"describe\\\\(['\\\"].*{id}.*['\\\"]\"\n    - \"it\\\\(['\\\"].*{id}.*['\\\"]\"\n    - \"@covers {id}\"\n\n  exclusions:\n    - node_modules\u002F\n    - dist\u002F\n    - \"*.generated.*\"\n```\n\n## Output Locations\n\n- Traceability report: `.aiwg\u002Freports\u002Ftraceability-{date}.md`\n- Traceability matrix: `.aiwg\u002Freports\u002Ftraceability-matrix.csv`\n- Gap analysis: `.aiwg\u002Freports\u002Fcoverage-gaps.md`\n\n## References\n\n- Requirements artifacts: .aiwg\u002Frequirements\u002F\n- Traceability template: templates\u002Fmanagement\u002Ftraceability-matrix-template.md\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Frules\u002Fartifact-discovery.md — Agent protocol for index usage\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsdlc-complete\u002Fskills\u002Fartifact-lookup\u002FSKILL.md — Artifact search skill\n- @$AIWG_ROOT\u002Fsrc\u002Fartifacts\u002Fcli.ts — CLI implementation\n",{"name":5,"namespace":48,"platforms":49,"description":7},"aiwg",[50],"all","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Fplugins\u002Fcodex-sdlc\u002Fskills\u002Ftraceability-check",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":9,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add jmagly\u002Faiwg --skill traceability-check",{"tool":67,"command":68},"bunx","bunx skills add jmagly\u002Faiwg --skill traceability-check",{"tool":70,"command":71},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill traceability-check","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fcodex-sdlc\u002Fskills\u002Ftraceability-check\u002FSKILL.md",true,[75,81],{"path":76,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"resources\u002Fimplementation-playbook.md","REFERENCE","参考文档",1180,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-kpi-dashboard-design\u002Fresources\u002Fimplementation-playbook.md",{"path":82,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"resources\u002Fmetric-queries.sql","OTHER","其他",1376,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-kpi-dashboard-design\u002Fresources\u002Fmetric-queries.sql",[88,96,101,128,148,153],{"skillNo":89,"name":90,"nameZh":17,"description":91,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":95},"01M78KW7PZJ9YQZQMW84SN2YD4","plugin-search","Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":97,"name":90,"nameZh":17,"description":91,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":95},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":17,"description":104,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":43},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127],"hardening","host","host hardening","verification","secrets","read","request","remediation","recommendations","audit","plan","port","bind","Bash","access","only","retention","re","never","firewall",{"skillNo":129,"name":130,"nameZh":17,"description":131,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":43},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[135,136,137,138,139,140,113,141,119,126,121,142,109,143,123,144,145,127,146,147],"analysis","exposure analysis","collection","reconstruction","operator","write","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":149,"name":103,"nameZh":17,"description":104,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":43},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[108,109,110,125,126,127,120,124,116,112,113,114,115,117,118,119,111,121,122,123],{"skillNo":154,"name":130,"nameZh":17,"description":131,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":43},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[135,136,147,146,139,145,144,123,138,140,113,141,119,137,121,142,109,127,126,143]]