Feature Lifecycle Skill
Phase-gated feature workflow: DESIGN > PLAN > IMPLEMENT > VALIDATE > RELEASE. Each phase must pass its gate before the next begins.
Phase Routing
Determine which phase to execute based on feature state:
If .feature/ exists, check current phase:
python3 ~/.claude/scripts/feature-state.py status
Route to the phase indicated by the state machine.
If no feature state exists, determine entry point from user intent:
- "design", "think through", "explore approaches" -> DESIGN
- "plan", "break down", "create tasks" -> PLAN (requires completed design)
- "implement", "execute plan", "start building" -> IMPLEMENT (requires completed plan)
- "validate", "quality gates", "check feature" -> VALIDATE (requires completed implementation)
- "release", "merge", "ship it" -> RELEASE (requires passed validation)
- "end to end", "full lifecycle", "from scratch" -> DESIGN (start from beginning)
Load the phase reference for the current phase:
- DESIGN: Read
references/design.md
- PLAN: Read
references/plan.md
- IMPLEMENT: Read
references/implement.md
- VALIDATE: Read
references/validate.md — run quality gate commands, do not reason about whether they would pass. Paste exit codes and output.
- RELEASE: Read
references/release.md
- END-TO-END: Read
references/pipeline.md
Follow the loaded reference exactly. Each reference contains the full phase instructions, gates, and checkpoints.
State Conventions
Read references/shared.md for directory structure, state management commands, context loading rules, and naming conventions. All state operations go through python3 ~/.claude/scripts/feature-state.py -- never manipulate state files directly.
Phase Ordering
DESIGN -> PLAN -> IMPLEMENT -> VALIDATE -> RELEASE
| | | | |
v v v v v
design.md plan.md impl.md report.md PR merged
Each phase produces an artifact consumed by the next. Skipping phases is not supported because downstream phases depend on artifacts from earlier phases.
Reference Loading Table
| Signal |
Load These Files |
Why |
| Phase 1 DESIGN: idea to design document |
design.md |
Loads detailed guidance from design.md. |
| errors, error handling |
error-handling.md |
Loads detailed guidance from error-handling.md. |
| Phase 3 IMPLEMENT: dispatching task waves to domain agents |
implement.md |
Loads detailed guidance from implement.md. |
| running the full design-to-release pipeline |
pipeline.md |
Loads detailed guidance from pipeline.md. |
| Phase 2 PLAN: decomposing design into wave-ordered tasks |
plan.md |
Loads detailed guidance from plan.md. |
| Phase 5 RELEASE: PR merge, tagging, worktree cleanup |
release.md |
Loads detailed guidance from release.md. |
| feature state directory layout, naming, write protection |
shared.md |
Loads detailed guidance from shared.md. |
| Phase 4 VALIDATE: running quality gates |
validate.md |
Loads detailed guidance from validate.md. |
Error Handling
| Error |
Cause |
Solution |
| Phase mismatch |
User requests phase N but state is at phase M |
Report current state, suggest correct next phase |
| Missing artifact |
Previous phase did not produce expected output |
Route back to previous phase |
| Gate failure |
Phase requirements not met |
Report what failed, suggest fixes |
References
| Task Signal |
Load |
| Phase routing (design/plan/implement/validate/release) |
Phase reference (design.md, plan.md, implement.md, validate.md, release.md) |
| End-to-end or full pipeline |
references/pipeline.md |
| State commands, directory structure, naming |
references/shared.md |
| Error, failure, blocked, gate fail, retry, deviation |
references/error-handling.md |
references/design.md -- Design phase: explore requirements, discuss trade-offs
references/plan.md -- Plan phase: break design into wave-ordered tasks
references/implement.md -- Implement phase: dispatch tasks to domain agents
references/validate.md -- Validate phase: run quality gates
references/release.md -- Release phase: merge, tag, cleanup
references/pipeline.md -- End-to-end orchestration across all phases
references/shared.md -- State conventions shared across all phases
references/error-handling.md -- Recovery patterns for phase errors, gate failures, agent dispatch failures
1---2name: feature-lifecycle3description: Feature lifecycle: design, plan, implement, validate, release. Phase-gated workflow.4---5
6# Feature Lifecycle Skill
7
8Phase-gated feature workflow: DESIGN > PLAN > IMPLEMENT > VALIDATE > RELEASE. Each phase must pass its gate before the next begins.
9
10## Phase Routing
11
12Determine which phase to execute based on feature state:
13
141. **If `.feature/` exists**, check current phase:
15 ```bash
16 python3 ~/.claude/scripts/feature-state.py status
17 ```
18 Route to the phase indicated by the state machine.
19
202. **If no feature state exists**, determine entry point from user intent:
21 - "design", "think through", "explore approaches" -> DESIGN
22 - "plan", "break down", "create tasks" -> PLAN (requires completed design)
23 - "implement", "execute plan", "start building" -> IMPLEMENT (requires completed plan)
24 - "validate", "quality gates", "check feature" -> VALIDATE (requires completed implementation)
25 - "release", "merge", "ship it" -> RELEASE (requires passed validation)
26 - "end to end", "full lifecycle", "from scratch" -> DESIGN (start from beginning)
27
283. **Load the phase reference** for the current phase:
29 - DESIGN: Read `references/design.md`
30 - PLAN: Read `references/plan.md`
31 - IMPLEMENT: Read `references/implement.md`
32 - VALIDATE: Read `references/validate.md` — **run quality gate commands, do not reason about whether they would pass. Paste exit codes and output.**
33 - RELEASE: Read `references/release.md`
34 - END-TO-END: Read `references/pipeline.md`
35
364. **Follow the loaded reference** exactly. Each reference contains the full phase instructions, gates, and checkpoints.
37
38## State Conventions
39
40Read `references/shared.md` for directory structure, state management commands, context loading rules, and naming conventions. All state operations go through `python3 ~/.claude/scripts/feature-state.py` -- never manipulate state files directly.
41
42## Phase Ordering
43
44```
45DESIGN -> PLAN -> IMPLEMENT -> VALIDATE -> RELEASE
46 | | | | |
47 v v v v v
48design.md plan.md impl.md report.md PR merged
49```
50
51Each phase produces an artifact consumed by the next. Skipping phases is not supported because downstream phases depend on artifacts from earlier phases.
52
53## Reference Loading Table
54
55| Signal | Load These Files | Why |
56|---|---|---|
57| Phase 1 DESIGN: idea to design document | `design.md` | Loads detailed guidance from `design.md`. |
58| errors, error handling | `error-handling.md` | Loads detailed guidance from `error-handling.md`. |
59| Phase 3 IMPLEMENT: dispatching task waves to domain agents | `implement.md` | Loads detailed guidance from `implement.md`. |
60| running the full design-to-release pipeline | `pipeline.md` | Loads detailed guidance from `pipeline.md`. |
61| Phase 2 PLAN: decomposing design into wave-ordered tasks | `plan.md` | Loads detailed guidance from `plan.md`. |
62| Phase 5 RELEASE: PR merge, tagging, worktree cleanup | `release.md` | Loads detailed guidance from `release.md`. |
63| feature state directory layout, naming, write protection | `shared.md` | Loads detailed guidance from `shared.md`. |
64| Phase 4 VALIDATE: running quality gates | `validate.md` | Loads detailed guidance from `validate.md`. |
65
66## Error Handling
67
68| Error | Cause | Solution |
69|-------|-------|----------|
70| Phase mismatch | User requests phase N but state is at phase M | Report current state, suggest correct next phase |
71| Missing artifact | Previous phase did not produce expected output | Route back to previous phase |
72| Gate failure | Phase requirements not met | Report what failed, suggest fixes |
73
74## References
75
76| Task Signal | Load |
77|-------------|------|
78| Phase routing (design/plan/implement/validate/release) | Phase reference (design.md, plan.md, implement.md, validate.md, release.md) |
79| End-to-end or full pipeline | `references/pipeline.md` |
80| State commands, directory structure, naming | `references/shared.md` |
81| Error, failure, blocked, gate fail, retry, deviation | `references/error-handling.md` |
82
83- `references/design.md` -- Design phase: explore requirements, discuss trade-offs
84- `references/plan.md` -- Plan phase: break design into wave-ordered tasks
85- `references/implement.md` -- Implement phase: dispatch tasks to domain agents
86- `references/validate.md` -- Validate phase: run quality gates
87- `references/release.md` -- Release phase: merge, tag, cleanup
88- `references/pipeline.md` -- End-to-end orchestration across all phases
89- `references/shared.md` -- State conventions shared across all phases
90- `references/error-handling.md` -- Recovery patterns for phase errors, gate failures, agent dispatch failures