Skip to content

mattgierhart/PRD-driven-context-engineering / .claude/skills/prd-v07-test-planning

prd-v07-test-planning

Verified

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

FileKindSize
SKILL.mdskill md13.5 KB
assets/test.mdmarkdown1.9 KB
references/examples.mdmarkdown5.7 KB
references/test-types.mdmarkdown6.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?
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall