Create a test plan mapping EARS requirements and Critical Constraints to specific tests
Create a test plan that systematically maps requirements and constraints to concrete tests. This ensures every requirement has verification and guides test implementation.
./docs/features/NNNN-feature-name/concept.md./docs/features/NNNN-feature-name/requirements.md./docs/features/NNNN-feature-name/design.md (contains Critical Constraints)ls ./docs/features/NNNN-feature-name/concept.md
ls ./docs/features/NNNN-feature-name/requirements.md
ls ./docs/features/NNNN-feature-name/design.md
If any don't exist, complete those steps first.
Review requirements.md for all REQ-* identifiers. Review design.md for all CC-* Critical Constraints.
Create ./docs/features/NNNN-feature-name/test-plan.md with this structure:
# Test Plan: Feature Name
## Overview
Brief description of testing approach.
## Test Types
- **Unit**: Test internal logic in isolation, mocks allowed
- **Integration**: Touch real external resources (filesystem, network), NO mocks
- **Not testable**: Cannot be verified by automated test (explain why)
- **Out of scope**: Requires external authentication - document but do not implement
## Requirements Coverage
| Req ID | Test Type | Test Name | Description |
|--------|-----------|-----------|-------------|
| REQ-1 | unit | test_xxx | What it verifies |
| REQ-2 | integration | test_yyy | What it verifies |
| REQ-3 | not-testable | - | Why not testable |
| REQ-4 | out-of-scope | - | Why out of scope |
## Critical Constraints Verification
| CC ID | Verification Approach | Test Name(s) |
|-------|----------------------|--------------|
| CC-1 | How constraint is verified | test_xxx |
## Integration Test Requirements
For CLI programs, integration tests MUST:
- Exercise the actual CLI binary/commands users run
- NOT test internal APIs directly
- Do what the user/customer will actually do
## Test Implementation Notes
Any specific guidance for implementing these tests.
For each REQ-* in requirements.md:
Determine test type:
Name the test descriptively (e.g., test_parses_valid_config)
Write brief description of what it verifies
For each CC-* in design.md:
If the feature includes CLI commands:
For tests requiring external authentication:
# Check file exists
ls ./docs/features/NNNN-feature-name/test-plan.md
# Verify all requirements are covered
grep -c "REQ-" ./docs/features/NNNN-feature-name/test-plan.md
grep -c "REQ-" ./docs/features/NNNN-feature-name/requirements.md
# Counts should be comparable
# Verify all constraints are covered
grep -c "CC-" ./docs/features/NNNN-feature-name/test-plan.md
grep -c "CC-" ./docs/features/NNNN-feature-name/design.md
# Counts should be comparable
Missing coverage: Every REQ-* and CC-* must appear in the test plan. Use the validation grep commands to check.
Wrong test type: Unit tests should not touch filesystem/network. Integration tests should not use mocks.
Testing internals instead of behavior: For CLI tools, test the CLI commands users run, not internal functions.
Vague descriptions: Test descriptions should state what specific behavior is verified.
After creating the test plan:
propose-implementation-plan skill to plan implementation