원클릭으로
speckit-spectest-coverage
Map spec requirements to test files and calculate requirement-level coverage
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Map spec requirements to test files and calculate requirement-level coverage
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Generate a human-readable diff between two spec versions showing exactly what changed
Generate a full changelog from spec git history showing all requirement changes over time
Generate stakeholder notifications summarizing spec changes for team communication
Generate release notes for a specific version or tag from spec changes
Generate a custom checklist for the current feature based on user requirements.
Identify underspecified areas in the current feature spec by asking up
| name | speckit-spectest-coverage |
| description | Map spec requirements to test files and calculate requirement-level coverage |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"spectest:commands/speckit.spectest.coverage.md"} |
Analyze the relationship between spec requirements and existing test files. Unlike code coverage tools that measure line/branch coverage, this command measures requirement coverage — what percentage of spec requirements have at least one corresponding test.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). The user may specify:
.specify/scripts/bash/check-prerequisites.sh --json from the repo root and parsing FEATURE_DIR and AVAILABLE_DOCS. The spec lives at $FEATURE_DIR/spec.md (under specs/<feature>/), not under .specify/.spec.md to extract all requirements, scenarios, and success criteria.**/*.test.*, **/*.spec.*, **/test_*, tests/, __tests__/)./speckit.spectest.generate.Extract All Testable Requirements: Build the complete requirement list from spec artifacts.
spec.md ## Requirements sectionspec.md ## User Scenarios & Testing sectionspec.md ## Success Criteria sectionplan.md (if exists)Discover Test Files: Find all test files in the project.
Map Requirements to Tests: For each requirement, determine if matching tests exist.
Calculate Coverage Metrics: Produce quantitative coverage scores.
## Requirement Coverage Summary
| Category | Total | Covered | Percentage |
|----------|-------|---------|------------|
| Requirements | 8 | 6 | 75.0% |
| User Scenarios | 3 | 2 | 66.7% |
| Success Criteria | 5 | 4 | 80.0% |
| Technical Decisions | 4 | 3 | 75.0% |
| **Overall** | **20** | **15** | **75.0%** |
Generate Detailed Mapping: Show each requirement and its test status.
## Detailed Coverage Map
| ID | Requirement | Test File | Confidence | Status |
|----|------------|-----------|------------|--------|
| REQ-001 | User signup | `signup.test.ts` | Strong | ✅ Covered |
| REQ-002 | User login | `login.test.ts` | Strong | ✅ Covered |
| REQ-003 | Rate limiting | — | — | ❌ No tests |
| SCENARIO-001 | Registration flow | `auth-flow.test.ts` | Medium | ⚠️ Partial |
Coverage by Test Type: Break down by unit, integration, and E2E.
## Coverage by Test Type
| Requirement | Unit | Integration | E2E |
|-------------|------|-------------|-----|
| REQ-001 | ✅ | ✅ | ❌ |
| REQ-002 | ✅ | ❌ | ❌ |
| REQ-003 | ❌ | ❌ | ❌ |
Output Report: Deliver the complete coverage analysis.