Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

traceability-check

БесплатноБез исполняемых скриптовНе проверен

Verify bidirectional traceability from requirements to code to tests and identify coverage gaps and orphan artifacts

jmaglyот jmagly★ 233 звезды на GitHub

Об этом скилле

traceability-check

Verify bidirectional traceability from requirements to code to tests.

Triggers

Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):

  • "RTM" → Requirements Traceability Matrix check
  • "V&V matrix" → Verification & Validation coverage
  • "coverage holes" in requirements context → traceability gap analysis
  • "are requirements covered" → traceability validation

Purpose

This skill ensures complete traceability across the SDLC by:

  • Extracting requirement IDs from documentation
  • Scanning code for requirement references
  • Mapping tests to requirements
  • Identifying coverage gaps
  • Detecting orphan artifacts

Behavior

When 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.

Step 1: Ensure Index Available

# Check if index exists, build if needed
aiwg index stats --json || aiwg index build

Step 2: Query Requirements Inventory

# Get all requirement artifacts from the index
aiwg index query --type use-case --json
aiwg index query --type requirement --json
aiwg index query --type nfr --json

Step 3: Check Dependencies for Each Artifact

# For each requirement, check what depends on it (downstream = code, tests)
aiwg index deps .aiwg/requirements/UC-001.md --direction downstream --json

Step 4: Build Traceability Matrix

Using the dependency graph from aiwg index deps, build:

  • Bidirectional mapping: requirement <-> code <-> tests
  • Calculate coverage percentages
  • Identify gaps in each direction

Step 5: Identify Issues

  • Orphan requirements (no downstream code references)
  • Untested code (code without test dependents)
  • Untested requirements (requirements without test coverage)
  • Code without requirements (no upstream requirement references)

Step 6: Generate Report

  • Traceability matrix with coverage statistics
  • Gap analysis with prioritized recommendations
  • Save to .aiwg/reports/traceability-{date}.md

Fallback Behavior

If aiwg index is not available (not installed or index not built), fall back to direct scanning:

  • Scan .aiwg/requirements/ for IDs (UC-, REQ-, NFR-*)
  • Search source files for requirement ID references
  • Search test files for requirement coverage
  • Build matrix from raw file scanning results

Traceability Model

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  REQUIREMENTS   │────▶│      CODE       │────▶│     TESTS       │
│                 │     │                 │     │                 │
│ UC-001          │     │ auth.ts         │     │ auth.test.ts    │
│ UC-002          │     │ user.ts         │     │ user.test.ts    │
│ REQ-001         │     │ api/routes.ts   │     │ api.test.ts     │
│ NFR-001         │     │ perf/cache.ts   │     │ perf.test.ts    │
└─────────────────┘     └─────────────────┘     └─────────────────┘
         │                      │                       │
         │                      │                       │
         └──────────────────────┴───────────────────────┘
                     TRACEABILITY MATRIX

ID Patterns

Requirement ID Formats

Type Pattern Example
Use Case UC-NNN UC-001, UC-042
Requirement REQ-NNN REQ-001, REQ-123
Non-Functional NFR-NNN NFR-001, NFR-015
User Story US-NNN US-001, US-089
Feature FEAT-NNN FEAT-001

Code Reference Patterns

// In code comments
// Implements: UC-001
// Related: REQ-003, REQ-004

// In JSDoc
/**
 * @requirement UC-001
 * @requirement REQ-003
 */

// In function names
function handleAuthUC001() {}

// In test descriptions
describe('UC-001: User Authentication', () => {
  it('should validate credentials (REQ-001)', () => {});
});

Traceability Matrix Format

Full Matrix

| Requirement | Description | Code Files | Test Files | Status |
|-------------|-------------|------------|------------|--------|
| UC-001 | User login | auth.ts, session.ts | auth.test.ts | ✅ Covered |
| UC-002 | User logout | auth.ts | auth.test.ts | ✅ Covered |
| UC-003 | Password reset | - | - | ❌ Not Implemented |
| REQ-001 | Validate email | user.ts | user.test.ts | ✅ Covered |
| REQ-002 | Hash passwords | auth.ts | - | ⚠️ Untested |
| NFR-001 | < 200ms response | cache.ts | perf.test.ts | ✅ Covered |

Coverage Summary

## Coverage Summary

| Category | Total | Implemented | Tested | Coverage |
|----------|-------|-------------|--------|----------|
| Use Cases | 15 | 14 | 12 | 80% |
| Requirements | 42 | 40 | 35 | 83% |
| NFRs | 8 | 6 | 4 | 50% |
| **Total** | **65** | **60** | **51** | **78%** |

Gap Analysis

Orphan Requirements

Requirements with no code implementation:

### Orphan Requirements (No Implementation)

| ID | Description | Priority | Action |
|
Полный SKILL.md на GitHub

Установить traceability-check в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл traceability-check?

Verify bidirectional traceability from requirements to code to tests and identify coverage gaps and orphan artifacts

Как установить скилл traceability-check?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл traceability-check запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить traceability-check с