mattgierhart/PRD-driven-context-engineering / .claude/skills/prd-v07-test-planning
prd-v07-test-planning
VerifiedDefine test cases BEFORE implementation, ensuring every API, business rule, and user journey has verifiable acceptance criteria during PRD v0.7 Build Execution. Triggers on requests to define tests, plan test coverage, create test cases, or when user asks "define tests", "test planning", "what to test?", "test cases", "test coverage", "TEST-", "test-first". Consumes EPIC- (scope), API-, DBT-, BR-, UJ-. Outputs TEST- entries with Given-When-Then format. Feeds v0.7 Implementation Loop.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.5 KB |
| assets/test.md | markdown | 1.9 KB |
| references/examples.md | markdown | 5.7 KB |
| references/test-types.md | markdown | 6.0 KB |
assets/test.md
View on GitHub# TEST- Template
Copy and fill for each test case:
```
TEST-XXX: [Test Name]
Type: [Unit | Integration | E2E | Contract | Performance]
Tests: [API-XXX | BR-XXX | UJ-XXX | DBT-XXX]
EPIC: [EPIC-XXX]
Given: [Preconditions]
When: [Action/trigger]
Then: [Expected outcome]
Validation Method: [Automated | Manual | Both]
Automation: [Test file path]
Priority: [Critical | High | Medium | Low]
```
## Type Selection Guide
| If testing... | Type is... | Example |
|---------------|------------|---------|
| A single function in isolation | Unit | Password validation |
| An API endpoint with database | Integration | POST /users creates record |
| A complete user workflow | E2E | Signup → verify → dashboard |
| API response shape | Contract | Response matches schema |
| Speed or load handling | Performance | API responds in <200ms |
## Priority Selection Guide
| If failure would... | Priority is... |
|---------------------|----------------|
| Cause data loss or security breach | Critical |
| Block core user journey | Critical |
| Break main product features | High |
| Degrade experience with workaround | Medium |
| Affect edge cases or admin features | Low |
## Given-When-Then Tips
**Given** (Preconditions):
- Database state (records exist/don't exist)
- User state (logged in/out, role)
- System state (feature flags, config)
**When** (Trigger):
- User action (click, submit, navigate)
- API call (method, path, body)
- System event (cron, webhook)
**Then** (Outcome):
- Response status and body
- Database changes
- UI state changes
- Side effects (email sent, event tracked)
## Checklist Before Adding
- [ ] Is this test linked to an API-, BR-, UJ-, or DBT-?
- [ ] Is the Given specific enough to reproduce?
- [ ] Is the When a single, clear action?
- [ ] Is the Then measurable and specific?
- [ ] Is the priority appropriate?
- [ ] For Critical tests: Is automation path defined?
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |