5-phase-workflow 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -16
- package/bin/install.js +20 -12
- package/docs/findings.md +361 -0
- package/docs/progress.md +102 -0
- package/docs/workflow-guide.md +39 -12
- package/package.json +1 -1
- package/src/commands/5/configure.md +16 -3
- package/src/commands/5/implement-feature.md +167 -493
- package/src/commands/5/plan-feature.md +18 -86
- package/src/commands/5/plan-implementation.md +136 -403
- package/src/commands/5/quick-implement.md +37 -28
- package/src/commands/5/review-code.md +221 -217
- package/src/commands/5/verify-implementation.md +279 -245
- package/src/skills/configure-project/SKILL.md +1 -1
- package/src/templates/workflow/FEATURE-SPEC.md +83 -0
- package/src/templates/workflow/FIX-PLAN.md +55 -0
- package/src/templates/workflow/PLAN.md +30 -0
- package/src/templates/workflow/QUICK-PLAN.md +17 -0
- package/src/templates/workflow/REVIEW-FINDINGS.md +58 -0
- package/src/templates/workflow/REVIEW-SUMMARY.md +35 -0
- package/src/templates/workflow/STATE.json +9 -0
- package/src/templates/workflow/VERIFICATION-REPORT.md +95 -0
- package/src/agents/integration-agent.md +0 -220
- package/src/agents/review-processor.md +0 -161
- package/src/agents/step-executor.md +0 -109
- package/src/agents/step-fixer.md +0 -133
- package/src/agents/step-verifier.md +0 -126
- package/src/agents/verification-agent.md +0 -445
package/README.md
CHANGED
|
@@ -67,6 +67,8 @@ Then start your first feature:
|
|
|
67
67
|
/5:review-code
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
**Tip:** Running `/clear` between phases resets context and keeps conversations focused. Each phase reads necessary artifacts from previous phases, so no context is lost.
|
|
71
|
+
|
|
70
72
|
## Supported Tech Stacks
|
|
71
73
|
|
|
72
74
|
The workflow auto-detects and supports:
|
|
@@ -230,12 +232,6 @@ After installation, your `.claude/` directory will contain:
|
|
|
230
232
|
│ ├── discuss-feature.md
|
|
231
233
|
│ ├── quick-implement.md
|
|
232
234
|
│ └── configure.md
|
|
233
|
-
├── agents/ # Specialized agents
|
|
234
|
-
│ ├── step-executor.md
|
|
235
|
-
│ ├── step-verifier.md
|
|
236
|
-
│ ├── integration-agent.md
|
|
237
|
-
│ ├── verification-agent.md
|
|
238
|
-
│ └── review-processor.md
|
|
239
235
|
├── skills/ # Atomic operations
|
|
240
236
|
│ ├── build-project/
|
|
241
237
|
│ ├── run-tests/
|
|
@@ -368,11 +364,6 @@ When adding new commands, agents, skills, hooks, or templates:
|
|
|
368
364
|
|
|
369
365
|
See `CLAUDE.md` for detailed development guidelines.
|
|
370
366
|
|
|
371
|
-
## Contributing
|
|
372
|
-
|
|
373
|
-
Found a bug or have a suggestion? Please open an issue or PR at:
|
|
374
|
-
https://github.com/anthropics/claude-code/issues
|
|
375
|
-
|
|
376
367
|
## License
|
|
377
368
|
|
|
378
369
|
MIT
|
|
@@ -381,8 +372,3 @@ MIT
|
|
|
381
372
|
|
|
382
373
|
- [Full Workflow Guide](./docs/workflow-guide.md) - Detailed documentation
|
|
383
374
|
- [Claude Code Docs](https://docs.anthropic.com/claude/docs/claude-code) - Claude Code features
|
|
384
|
-
- [Examples](./docs/examples/) - Real-world usage examples
|
|
385
|
-
|
|
386
|
-
## Credits
|
|
387
|
-
|
|
388
|
-
Built with [Claude Code](https://claude.com/claude-code) by Anthropic.
|
package/bin/install.js
CHANGED
|
@@ -199,15 +199,8 @@ function getWorkflowManagedFiles() {
|
|
|
199
199
|
// Commands: only the 5/ namespace
|
|
200
200
|
commands: ['5'],
|
|
201
201
|
|
|
202
|
-
// Agents:
|
|
203
|
-
agents: [
|
|
204
|
-
'step-executor.md',
|
|
205
|
-
'step-verifier.md',
|
|
206
|
-
'integration-agent.md',
|
|
207
|
-
'verification-agent.md',
|
|
208
|
-
'review-processor.md',
|
|
209
|
-
'step-fixer.md'
|
|
210
|
-
],
|
|
202
|
+
// Agents: none - instructions are now embedded inline in commands
|
|
203
|
+
agents: [],
|
|
211
204
|
|
|
212
205
|
// Skills: specific skill directories
|
|
213
206
|
skills: [
|
|
@@ -225,13 +218,23 @@ function getWorkflowManagedFiles() {
|
|
|
225
218
|
|
|
226
219
|
// Templates: specific template files
|
|
227
220
|
templates: [
|
|
221
|
+
// Project documentation templates
|
|
228
222
|
'ARCHITECTURE.md',
|
|
229
223
|
'CONCERNS.md',
|
|
230
224
|
'CONVENTIONS.md',
|
|
231
225
|
'INTEGRATIONS.md',
|
|
232
226
|
'STACK.md',
|
|
233
227
|
'STRUCTURE.md',
|
|
234
|
-
'TESTING.md'
|
|
228
|
+
'TESTING.md',
|
|
229
|
+
// Workflow output templates
|
|
230
|
+
'workflow/FEATURE-SPEC.md',
|
|
231
|
+
'workflow/PLAN.md',
|
|
232
|
+
'workflow/STATE.json',
|
|
233
|
+
'workflow/VERIFICATION-REPORT.md',
|
|
234
|
+
'workflow/REVIEW-FINDINGS.md',
|
|
235
|
+
'workflow/REVIEW-SUMMARY.md',
|
|
236
|
+
'workflow/QUICK-PLAN.md',
|
|
237
|
+
'workflow/FIX-PLAN.md'
|
|
235
238
|
]
|
|
236
239
|
};
|
|
237
240
|
}
|
|
@@ -299,7 +302,7 @@ function selectiveUpdate(targetPath, sourcePath) {
|
|
|
299
302
|
}
|
|
300
303
|
log.success('Updated hooks/ (workflow files only)');
|
|
301
304
|
|
|
302
|
-
// Update specific templates
|
|
305
|
+
// Update specific templates (including nested directories like workflow/)
|
|
303
306
|
const templatesSrc = path.join(sourcePath, 'templates');
|
|
304
307
|
const templatesDest = path.join(targetPath, 'templates');
|
|
305
308
|
if (!fs.existsSync(templatesDest)) {
|
|
@@ -309,6 +312,11 @@ function selectiveUpdate(targetPath, sourcePath) {
|
|
|
309
312
|
const src = path.join(templatesSrc, template);
|
|
310
313
|
const dest = path.join(templatesDest, template);
|
|
311
314
|
if (fs.existsSync(src)) {
|
|
315
|
+
// Ensure parent directory exists for nested paths (e.g., workflow/FEATURE-SPEC.md)
|
|
316
|
+
const destDir = path.dirname(dest);
|
|
317
|
+
if (!fs.existsSync(destDir)) {
|
|
318
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
319
|
+
}
|
|
312
320
|
fs.copyFileSync(src, dest);
|
|
313
321
|
}
|
|
314
322
|
}
|
|
@@ -365,7 +373,7 @@ function getDefaultConfig(projectType) {
|
|
|
365
373
|
command: 'auto',
|
|
366
374
|
testCommand: 'auto'
|
|
367
375
|
},
|
|
368
|
-
reviewTool: '
|
|
376
|
+
reviewTool: 'claude'
|
|
369
377
|
};
|
|
370
378
|
|
|
371
379
|
// Project-specific overrides
|
package/docs/findings.md
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
# Critical Analysis: 5-Phase Workflow System
|
|
2
|
+
|
|
3
|
+
## Executive Summary
|
|
4
|
+
|
|
5
|
+
The 5-Phase Workflow is an ambitious, well-intentioned system for structured AI-assisted feature development. While it demonstrates sophisticated architectural thinking, it suffers from significant over-engineering and complexity that may undermine its practical utility. This analysis identifies strengths, weaknesses, and concrete opportunities for improvement.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Strengths
|
|
10
|
+
|
|
11
|
+
### 1. Sound Architectural Foundation
|
|
12
|
+
The 4-layer architecture (Commands → Agents → Skills → Tools) is a solid design:
|
|
13
|
+
- **Clear separation of concerns**: Commands orchestrate, agents execute, skills encapsulate
|
|
14
|
+
- **Token efficiency**: Haiku model for executors, forked contexts for heavy work
|
|
15
|
+
- **Modularity**: Each layer can be modified independently
|
|
16
|
+
|
|
17
|
+
### 2. State Tracking and Resumability
|
|
18
|
+
The state file system (`state.json`) enables:
|
|
19
|
+
- Resuming interrupted work across sessions
|
|
20
|
+
- Debugging by inspecting progress
|
|
21
|
+
- Clear audit trail of what was completed
|
|
22
|
+
|
|
23
|
+
### 3. Selective Update System
|
|
24
|
+
The `getWorkflowManagedFiles()` approach in the installer:
|
|
25
|
+
- Preserves user-created content during upgrades
|
|
26
|
+
- Allows customization without fear of losing changes
|
|
27
|
+
- Deep merge for settings.json maintains user preferences
|
|
28
|
+
|
|
29
|
+
### 4. Clear Scope Boundaries
|
|
30
|
+
Each phase has explicit boundaries with "DO NOT" sections:
|
|
31
|
+
- Prevents scope creep during execution
|
|
32
|
+
- Makes behavior predictable
|
|
33
|
+
- Reduces chance of phases interfering with each other
|
|
34
|
+
|
|
35
|
+
### 5. Good Documentation Discipline
|
|
36
|
+
- Each file has clear purpose and input/output contracts
|
|
37
|
+
- Examples are provided in most commands
|
|
38
|
+
- Related documentation is cross-referenced
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Criticisms and Issues
|
|
43
|
+
|
|
44
|
+
### 1. Excessive Complexity and Over-Engineering
|
|
45
|
+
|
|
46
|
+
**Phase 2 (`plan-implementation.md`) is 400+ lines of instructions.**
|
|
47
|
+
|
|
48
|
+
This phase requires:
|
|
49
|
+
- Reading feature spec
|
|
50
|
+
- Deep codebase analysis
|
|
51
|
+
- Asking 3-5 technical questions
|
|
52
|
+
- Mapping components to skills
|
|
53
|
+
- Determining dependency steps
|
|
54
|
+
- Building "haiku-ready prompts" with complete code
|
|
55
|
+
- Writing meta.md, step-N.md files, verification.md
|
|
56
|
+
|
|
57
|
+
For a system designed to help developers, Phase 2 demands more effort to create "AI-executable prompts" than it would take to just implement the feature manually.
|
|
58
|
+
|
|
59
|
+
**The "Haiku-Ready Prompts" Concept is Impractical**
|
|
60
|
+
|
|
61
|
+
The plan-implementation phase must create prompts containing:
|
|
62
|
+
- Complete file content to write
|
|
63
|
+
- All import statements
|
|
64
|
+
- All type definitions
|
|
65
|
+
- Exact `old_string` and `new_string` for modifications
|
|
66
|
+
|
|
67
|
+
This essentially means writing the code twice - once in the prompt, then the agent copies it to a file. The value proposition is unclear.
|
|
68
|
+
|
|
69
|
+
### 2. Redundant Work and Token Waste
|
|
70
|
+
|
|
71
|
+
**Commands re-read files that agents will also read:**
|
|
72
|
+
- `implement-feature` reads `plan/meta.md`, then spawns agents that read the same files
|
|
73
|
+
- `verify-implementation` aggregates expected files, then agents parse the same plan files again
|
|
74
|
+
- Agent instructions (`.claude/agents/*.md`) are read fresh for every agent spawn
|
|
75
|
+
|
|
76
|
+
**Template References Without Actual Use:**
|
|
77
|
+
- Commands say "Use the structure from `.claude/templates/workflow/FEATURE-SPEC.md`"
|
|
78
|
+
- But agents never actually load these templates - they're just prose descriptions
|
|
79
|
+
- These templates add confusion about what format to use
|
|
80
|
+
|
|
81
|
+
**Verification Agent Duplicates Parent Work:**
|
|
82
|
+
```markdown
|
|
83
|
+
# From verification-agent.md
|
|
84
|
+
## Process
|
|
85
|
+
### 0. Parse Implementation Plan
|
|
86
|
+
Read the implementation plan from the provided path...
|
|
87
|
+
```
|
|
88
|
+
The verify-implementation command already parsed this and passed it to the agent. Why parse again?
|
|
89
|
+
|
|
90
|
+
### 3. Inconsistent Token Efficiency Claims
|
|
91
|
+
|
|
92
|
+
The system claims to be designed for token efficiency, but:
|
|
93
|
+
|
|
94
|
+
**Context monitoring is aspirational, not real:**
|
|
95
|
+
```markdown
|
|
96
|
+
### Step 7: Monitor Context Usage
|
|
97
|
+
After each step, estimate context usage:
|
|
98
|
+
- Warn developer at 50% usage
|
|
99
|
+
- Stop at 80% usage
|
|
100
|
+
```
|
|
101
|
+
There's no actual mechanism to measure context usage. This is theater.
|
|
102
|
+
|
|
103
|
+
**Agents load large instructions unnecessarily:**
|
|
104
|
+
- step-executor.md: 110 lines of instructions for what could be 30 lines
|
|
105
|
+
- verification-agent.md: 446 lines when verification could be much simpler
|
|
106
|
+
|
|
107
|
+
### 4. Fragile Design Assumptions
|
|
108
|
+
|
|
109
|
+
**YAML Parsing Requirements Are Error-Prone:**
|
|
110
|
+
|
|
111
|
+
Step files require parsing:
|
|
112
|
+
1. YAML frontmatter (between `---` markers)
|
|
113
|
+
2. YAML block (between ` ```yaml` and ` ``` `)
|
|
114
|
+
3. Markdown sections for expected outputs
|
|
115
|
+
|
|
116
|
+
Any formatting error breaks the entire system. LLMs generating YAML are notoriously unreliable.
|
|
117
|
+
|
|
118
|
+
**Ticket ID Extraction Assumes Branch Naming:**
|
|
119
|
+
```markdown
|
|
120
|
+
Branch format: `{TICKET-ID}-description` (ticket is prefix)
|
|
121
|
+
```
|
|
122
|
+
Many teams don't follow this convention. The fallback of "ask the developer" is weak.
|
|
123
|
+
|
|
124
|
+
**CodeRabbit Dependency in Phase 5:**
|
|
125
|
+
Phase 5 requires CodeRabbit CLI to be installed and authenticated. If it's not available, Phase 5 is useless.
|
|
126
|
+
|
|
127
|
+
### 5. User Experience Issues
|
|
128
|
+
|
|
129
|
+
**Mandatory `/clear` Between Phases:**
|
|
130
|
+
```markdown
|
|
131
|
+
Run `/clear` followed by `/5:implement-feature {feature-name}`
|
|
132
|
+
```
|
|
133
|
+
This friction adds nothing and breaks flow. If context management is the concern, handle it automatically.
|
|
134
|
+
|
|
135
|
+
**Excessive "CRITICAL" and "MANDATORY" Warnings:**
|
|
136
|
+
The documentation is filled with shouty warnings:
|
|
137
|
+
- "⚠️ CRITICAL SCOPE CONSTRAINT"
|
|
138
|
+
- "**CRITICAL**: You MUST create the state file"
|
|
139
|
+
- "🛑 STOP HERE. YOUR JOB IS COMPLETE."
|
|
140
|
+
|
|
141
|
+
This reads as defensive documentation rather than helpful guidance.
|
|
142
|
+
|
|
143
|
+
**No Flexibility or Customization:**
|
|
144
|
+
- Can't skip phases
|
|
145
|
+
- Can't customize the 5-phase flow
|
|
146
|
+
- Can't choose which agents to use
|
|
147
|
+
- Must follow the rigid structure even for simple features
|
|
148
|
+
|
|
149
|
+
### 6. The Quick-Implement Escape Hatch Isn't Enough
|
|
150
|
+
|
|
151
|
+
`quick-implement` exists for "1-5 files" but still requires:
|
|
152
|
+
- State file initialization
|
|
153
|
+
- Plan creation
|
|
154
|
+
- Plan approval
|
|
155
|
+
- Skill mappings
|
|
156
|
+
- State updates after each component
|
|
157
|
+
- Verification
|
|
158
|
+
|
|
159
|
+
For a "quick" path, this is still heavyweight.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## What Doesn't Work Well
|
|
164
|
+
|
|
165
|
+
### 1. Project Type Detection
|
|
166
|
+
The detection in `bin/install.js` is basic:
|
|
167
|
+
```javascript
|
|
168
|
+
if (pkg.dependencies?.['next']) return 'nextjs';
|
|
169
|
+
if (pkg.dependencies?.['express']) return 'express';
|
|
170
|
+
```
|
|
171
|
+
- Misses monorepos with multiple project types
|
|
172
|
+
- Doesn't handle mixed stacks (Next.js + Express in same repo)
|
|
173
|
+
- No way to specify project type manually during install
|
|
174
|
+
|
|
175
|
+
### 2. Build Command Assumptions
|
|
176
|
+
Default commands like:
|
|
177
|
+
```javascript
|
|
178
|
+
'gradle-java': {
|
|
179
|
+
build: { command: './gradlew build -x test -x javadoc --offline' }
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
- `--offline` fails if dependencies aren't cached
|
|
183
|
+
- No awareness of CI vs local environments
|
|
184
|
+
- No incremental build support
|
|
185
|
+
|
|
186
|
+
### 3. Agent Model Selection
|
|
187
|
+
```markdown
|
|
188
|
+
model: haiku
|
|
189
|
+
```
|
|
190
|
+
Haiku is specified for step-executor, but:
|
|
191
|
+
- Haiku may not exist or be available to all users
|
|
192
|
+
- No fallback if haiku fails
|
|
193
|
+
- No ability to override per-project
|
|
194
|
+
|
|
195
|
+
### 4. The Atomic Plan Structure Creates File Sprawl
|
|
196
|
+
A single feature creates:
|
|
197
|
+
```
|
|
198
|
+
.5/{feature-name}/
|
|
199
|
+
├── feature.md
|
|
200
|
+
├── state.json
|
|
201
|
+
├── verification.md
|
|
202
|
+
└── plan/
|
|
203
|
+
├── meta.md
|
|
204
|
+
├── step-1.md
|
|
205
|
+
├── step-2.md
|
|
206
|
+
├── step-3.md
|
|
207
|
+
└── verification.md
|
|
208
|
+
```
|
|
209
|
+
For a 7-component feature, you have 8+ files just for planning/state.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Token Usage Improvements
|
|
214
|
+
|
|
215
|
+
### 1. Embed Agent Instructions Instead of Reading Files
|
|
216
|
+
Instead of:
|
|
217
|
+
```markdown
|
|
218
|
+
Read `.claude/agents/step-executor.md` for agent instructions, then spawn...
|
|
219
|
+
```
|
|
220
|
+
Embed the essential instructions directly in the Task prompt. Agent files are ~100-400 lines when 20-30 lines would suffice.
|
|
221
|
+
|
|
222
|
+
### 2. Don't Parse the Same Files Multiple Times
|
|
223
|
+
The parent command should do all parsing and pass structured data to agents:
|
|
224
|
+
```yaml
|
|
225
|
+
# Good: Parent passes structured data
|
|
226
|
+
components:
|
|
227
|
+
- id: schedule-service
|
|
228
|
+
action: create
|
|
229
|
+
file: src/services/ScheduleService.ts
|
|
230
|
+
content: |
|
|
231
|
+
// Complete file content here
|
|
232
|
+
|
|
233
|
+
# Bad: Agent re-parses plan files
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### 3. Lazy Load Step Files
|
|
237
|
+
Don't load all step files upfront. Load only the current step when executing.
|
|
238
|
+
|
|
239
|
+
### 4. Simplify Verification
|
|
240
|
+
Instead of a 446-line verification agent:
|
|
241
|
+
1. Check files exist (Glob)
|
|
242
|
+
2. Run build command
|
|
243
|
+
3. Run test command
|
|
244
|
+
4. Report results
|
|
245
|
+
|
|
246
|
+
That's 4 steps, not 8 elaborate sections.
|
|
247
|
+
|
|
248
|
+
### 5. Remove Template Reference Indirection
|
|
249
|
+
Either:
|
|
250
|
+
- Make templates actual template files that get loaded and filled
|
|
251
|
+
- Or remove template references and inline the expected format
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Performance Improvements
|
|
256
|
+
|
|
257
|
+
### 1. Parallel Execution by Default
|
|
258
|
+
The system has `mode: parallel | sequential` but defaults to being conservative. Many steps could run in parallel.
|
|
259
|
+
|
|
260
|
+
### 2. Incremental Verification
|
|
261
|
+
After implementing Step 2, don't rebuild everything from Step 1. Build only affected modules.
|
|
262
|
+
|
|
263
|
+
### 3. Cache Build Results
|
|
264
|
+
If build passed in step-verifier, don't rebuild in verification-agent.
|
|
265
|
+
|
|
266
|
+
### 4. Skip Redundant Agent Spawns
|
|
267
|
+
If step-executor reports success with no issues, skip step-verifier.
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Simplification Opportunities
|
|
272
|
+
|
|
273
|
+
### 1. Collapse Agents
|
|
274
|
+
**Current:** step-executor → step-verifier → (on failure) step-fixer
|
|
275
|
+
**Simpler:** step-executor with built-in verification and retry
|
|
276
|
+
|
|
277
|
+
### 2. Remove Mandatory 5-Phase Constraint
|
|
278
|
+
Let users:
|
|
279
|
+
- Run just Phase 1 for spec creation
|
|
280
|
+
- Skip directly to implementation if they have a clear plan
|
|
281
|
+
- Skip code review if not using CodeRabbit
|
|
282
|
+
|
|
283
|
+
### 3. Simplify State File
|
|
284
|
+
Current state file has:
|
|
285
|
+
- ticketId, featureName, phase, status, currentStep, totalSteps
|
|
286
|
+
- completedComponents (array of objects)
|
|
287
|
+
- pendingComponents (array of objects)
|
|
288
|
+
- failedAttempts (array of objects)
|
|
289
|
+
- verificationResults (object)
|
|
290
|
+
- contextUsage, contextWarningIssued
|
|
291
|
+
- startedAt, lastUpdated, completedAt
|
|
292
|
+
|
|
293
|
+
Simpler version:
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"step": 2,
|
|
297
|
+
"completed": ["component-1", "component-2"],
|
|
298
|
+
"failed": ["component-3"],
|
|
299
|
+
"timestamp": "2026-01-28T10:30:00Z"
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### 4. Merge Plan Files
|
|
304
|
+
Instead of meta.md + step-1.md + step-2.md + verification.md:
|
|
305
|
+
One `plan.yaml` file:
|
|
306
|
+
```yaml
|
|
307
|
+
feature: add-emergency-schedule
|
|
308
|
+
ticket: PROJ-1234
|
|
309
|
+
steps:
|
|
310
|
+
- name: Foundation
|
|
311
|
+
components:
|
|
312
|
+
- id: schedule-model
|
|
313
|
+
file: src/models/Schedule.ts
|
|
314
|
+
prompt: |
|
|
315
|
+
Create file with this content...
|
|
316
|
+
verification:
|
|
317
|
+
build: npm run build
|
|
318
|
+
test: npm test
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### 5. Make Skills Optional
|
|
322
|
+
Current: Skills are assumed to exist and match project patterns
|
|
323
|
+
Better: If no matching skill, use direct Write/Edit with the prompt
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Recommendations Summary
|
|
328
|
+
|
|
329
|
+
| Priority | Recommendation | Impact |
|
|
330
|
+
|----------|---------------|--------|
|
|
331
|
+
| High | Simplify Phase 2 prompt generation - don't require complete code | Major UX improvement |
|
|
332
|
+
| High | Embed agent instructions inline instead of reading files | Token savings |
|
|
333
|
+
| High | Remove mandatory `/clear` between phases | UX improvement |
|
|
334
|
+
| High | Merge plan files into single YAML | Reduce file sprawl |
|
|
335
|
+
| Medium | Add `--skip-phase` flags | Flexibility |
|
|
336
|
+
| Medium | Make CodeRabbit optional in Phase 5 | Broader adoption |
|
|
337
|
+
| Medium | Collapse step-executor + step-verifier | Simpler flow |
|
|
338
|
+
| Medium | Implement actual context monitoring | Deliver on promise |
|
|
339
|
+
| Low | Improve project type detection | Edge case handling |
|
|
340
|
+
| Low | Add incremental verification | Performance |
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Conclusion
|
|
345
|
+
|
|
346
|
+
The 5-Phase Workflow demonstrates thoughtful design around token efficiency, state management, and separation of concerns. However, it has evolved into an over-engineered system that creates more friction than it removes.
|
|
347
|
+
|
|
348
|
+
The core insight - that AI-assisted development benefits from structured phases - is valid. But the implementation has become so complex that:
|
|
349
|
+
|
|
350
|
+
1. Phase 2 requires as much effort as manual implementation
|
|
351
|
+
2. The rigid 5-phase structure doesn't match real-world workflows
|
|
352
|
+
3. Token efficiency claims are undermined by redundant file reading
|
|
353
|
+
4. The system creates significant file overhead for tracking
|
|
354
|
+
|
|
355
|
+
**The fundamental question to answer:** Is the overhead of learning and using this workflow justified by the benefits?
|
|
356
|
+
|
|
357
|
+
For simple features (1-5 files): No. `quick-implement` still has too much ceremony.
|
|
358
|
+
|
|
359
|
+
For complex features (10+ files): Possibly, but Phase 2's requirement to write "haiku-ready prompts" with complete code makes the planning phase as expensive as implementation.
|
|
360
|
+
|
|
361
|
+
**The path forward** is simplification: fewer files, fewer phases, less ceremony, and letting the AI do more of the work rather than requiring developers to pre-compute everything in Phase 2.
|
package/docs/progress.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Simplification Progress Tracker
|
|
2
|
+
|
|
3
|
+
Tracking improvements based on `findings.md` analysis.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Completed
|
|
8
|
+
|
|
9
|
+
### 1. Merged Plan Files into Single Format
|
|
10
|
+
- **Before:** `meta.md` + `step-1.md` + `step-2.md` + `verification.md` (8+ files per feature)
|
|
11
|
+
- **After:** Single `plan.md` with YAML frontmatter + markdown table
|
|
12
|
+
- **Commit:** b26aff7
|
|
13
|
+
|
|
14
|
+
### 2. Removed "Haiku-Ready Prompts" Requirement
|
|
15
|
+
- **Before:** Phase 2 required complete code in prompts (writing code twice)
|
|
16
|
+
- **After:** Plan describes WHAT to build; agents figure out HOW
|
|
17
|
+
- **Evidence:** plan-implementation.md lines 208-209 explicitly forbid this
|
|
18
|
+
- **Commit:** b26aff7
|
|
19
|
+
|
|
20
|
+
### 3. Consolidated Agents (6 → 2)
|
|
21
|
+
- **Removed:** step-verifier.md (126 lines), step-fixer.md (133 lines), integration-agent.md (220 lines), verification-agent.md (446 lines)
|
|
22
|
+
- **Remaining at that point:** step-executor.md (75 lines), review-processor.md (161 lines)
|
|
23
|
+
- **Commit:** b26aff7
|
|
24
|
+
|
|
25
|
+
### 4. Simplified plan-implementation.md
|
|
26
|
+
- **Before:** 457 lines
|
|
27
|
+
- **After:** 213 lines (53% reduction)
|
|
28
|
+
- **Commit:** b26aff7
|
|
29
|
+
|
|
30
|
+
### 5. Simplified step-executor.md
|
|
31
|
+
- **Before:** 118 lines
|
|
32
|
+
- **After:** 75 lines (36% reduction)
|
|
33
|
+
- **Commit:** b26aff7
|
|
34
|
+
|
|
35
|
+
### 6. Simplified verify-implementation.md
|
|
36
|
+
- **Before:** 446 lines (via verification-agent.md)
|
|
37
|
+
- **After:** 138 lines, handles verification directly
|
|
38
|
+
- **Commit:** b26aff7
|
|
39
|
+
|
|
40
|
+
### 7. Removed Mandatory `/clear` Between Phases
|
|
41
|
+
- **Before:** Required `/clear` before each phase command
|
|
42
|
+
- **After:** No longer required
|
|
43
|
+
- **Commit:** b26aff7
|
|
44
|
+
|
|
45
|
+
### 8. Simplified State File Format
|
|
46
|
+
- **Before:** 10+ fields including contextUsage tracking
|
|
47
|
+
- **After:** 7 essential fields (ticket, feature, status, currentStep, completed, failed, startedAt)
|
|
48
|
+
- **Commit:** b26aff7
|
|
49
|
+
|
|
50
|
+
### 9. Added Parallel Component Execution
|
|
51
|
+
- **Before:** Sequential execution only
|
|
52
|
+
- **After:** Components within same step run in parallel
|
|
53
|
+
- **Commit:** 9106b6a
|
|
54
|
+
|
|
55
|
+
### 10. Removed Template Indirection for Workflows
|
|
56
|
+
- **Before:** Commands referenced templates that were never loaded
|
|
57
|
+
- **After:** Clean workflow templates in src/templates/workflow/
|
|
58
|
+
- **Commit:** 027faa2, b26aff7
|
|
59
|
+
|
|
60
|
+
### 11. Embedded Agent Instructions Inline (2 → 0 agent files)
|
|
61
|
+
- **Before:** Commands read separate agent .md files on every spawn (step-executor.md, review-processor.md)
|
|
62
|
+
- **After:** Instructions embedded directly in Task prompts within commands
|
|
63
|
+
- **Files removed:** `src/agents/step-executor.md`, `src/agents/review-processor.md`
|
|
64
|
+
- **Updated commands:** `quick-implement.md`, `review-code.md`
|
|
65
|
+
- **Token savings:** ~236 lines of agent instructions no longer read on each spawn
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Remaining (Not Yet Done)
|
|
70
|
+
|
|
71
|
+
### Medium Priority
|
|
72
|
+
|
|
73
|
+
| Item | Finding | Current State |
|
|
74
|
+
|------|---------|---------------|
|
|
75
|
+
| Add `--skip-phase` flags | Rigid 5-phase structure | No skip logic implemented |
|
|
76
|
+
| Make CodeRabbit truly optional | Phase 5 centered on CodeRabbit | Still somewhat required |
|
|
77
|
+
|
|
78
|
+
### Low Priority
|
|
79
|
+
|
|
80
|
+
| Item | Finding | Current State |
|
|
81
|
+
|------|---------|---------------|
|
|
82
|
+
| Implement actual context monitoring | "Monitor at 50%" is aspirational | No real mechanism |
|
|
83
|
+
| Incremental verification | Full rebuild each step | Runs full build/test |
|
|
84
|
+
| Improve project type detection | Basic dependency checks | Misses monorepos |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Metrics Summary
|
|
89
|
+
|
|
90
|
+
| Metric | Before | After | Change |
|
|
91
|
+
|--------|--------|-------|--------|
|
|
92
|
+
| plan-implementation.md | 457 lines | 213 lines | -53% |
|
|
93
|
+
| Agent files | 6 | 0 | -100% |
|
|
94
|
+
| Files per feature | 8+ | ~3 | -60% |
|
|
95
|
+
| Parallel execution | No | Yes | Added |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Next Steps
|
|
100
|
+
|
|
101
|
+
1. **Add phase skip flags** - Allow `/5:implement-feature --skip-planning` for users with existing plans
|
|
102
|
+
2. **Make CodeRabbit optional** - Phase 5 should work without CodeRabbit installed
|
package/docs/workflow-guide.md
CHANGED
|
@@ -541,7 +541,11 @@ Claude: What's the ticket ID for this feature?
|
|
|
541
541
|
You: PROJ-1234
|
|
542
542
|
|
|
543
543
|
Claude: Feature spec created at .5/PROJ-1234-add-user-profile/feature.md
|
|
544
|
-
|
|
544
|
+
|
|
545
|
+
Next steps:
|
|
546
|
+
1. Review the feature spec
|
|
547
|
+
2. Run `/clear` to reset context (recommended between phases)
|
|
548
|
+
3. Then run `/5:plan-implementation PROJ-1234-add-user-profile`
|
|
545
549
|
```
|
|
546
550
|
|
|
547
551
|
### Step 2: Review Feature Spec
|
|
@@ -552,11 +556,14 @@ Open `.5/PROJ-1234-add-user-profile/feature.md` and review:
|
|
|
552
556
|
- Acceptance criteria verifiable?
|
|
553
557
|
- Alternatives make sense?
|
|
554
558
|
|
|
555
|
-
If satisfied, proceed to next phase.
|
|
559
|
+
If satisfied, clear context and proceed to next phase.
|
|
556
560
|
|
|
557
|
-
### Step 3: Start Implementation Planning
|
|
561
|
+
### Step 3: Clear Context and Start Implementation Planning
|
|
558
562
|
|
|
559
563
|
```bash
|
|
564
|
+
You: /clear
|
|
565
|
+
[Context cleared]
|
|
566
|
+
|
|
560
567
|
You: /plan-implementation PROJ-1234-add-user-profile
|
|
561
568
|
|
|
562
569
|
Claude: Reading feature spec...
|
|
@@ -591,12 +598,17 @@ Step 1 (Foundation): User model update, ProfileValidator
|
|
|
591
598
|
Step 2 (Logic): ProfileService with business logic
|
|
592
599
|
Step 3 (Integration): API route registration, tests
|
|
593
600
|
|
|
594
|
-
|
|
601
|
+
Review the plan, then:
|
|
602
|
+
1. Run `/clear` to reset context (recommended between phases)
|
|
603
|
+
2. Run `/5:implement-feature PROJ-1234-add-user-profile`
|
|
595
604
|
```
|
|
596
605
|
|
|
597
|
-
### Step 4: Start Implementation (with Agents)
|
|
606
|
+
### Step 4: Clear Context and Start Implementation (with Agents)
|
|
598
607
|
|
|
599
608
|
```bash
|
|
609
|
+
You: /clear
|
|
610
|
+
[Context cleared]
|
|
611
|
+
|
|
600
612
|
You: /implement-feature PROJ-1234-add-user-profile
|
|
601
613
|
|
|
602
614
|
Claude: Reading implementation plan...
|
|
@@ -629,11 +641,18 @@ Feature implementation complete!
|
|
|
629
641
|
- All 4 components created/updated
|
|
630
642
|
- State file updated
|
|
631
643
|
- Ready for verification!
|
|
644
|
+
|
|
645
|
+
Next steps:
|
|
646
|
+
1. Run `/clear` to reset context (recommended between phases)
|
|
647
|
+
2. Run `/5:verify-implementation PROJ-1234-add-user-profile`
|
|
632
648
|
```
|
|
633
649
|
|
|
634
|
-
### Step 5: Verify Implementation
|
|
650
|
+
### Step 5: Clear Context and Verify Implementation
|
|
635
651
|
|
|
636
652
|
```bash
|
|
653
|
+
You: /clear
|
|
654
|
+
[Context cleared]
|
|
655
|
+
|
|
637
656
|
You: /verify-implementation
|
|
638
657
|
|
|
639
658
|
Claude: Loading implementation state...
|
|
@@ -647,11 +666,18 @@ Claude: Loading implementation state...
|
|
|
647
666
|
Verification Status: PASSED WITH WARNINGS
|
|
648
667
|
|
|
649
668
|
Would you like to commit these changes now?
|
|
669
|
+
|
|
670
|
+
Next steps:
|
|
671
|
+
1. Run `/clear` to reset context (recommended between phases)
|
|
672
|
+
2. Run `/5:review-code`
|
|
650
673
|
```
|
|
651
674
|
|
|
652
|
-
### Step 6: Code Review
|
|
675
|
+
### Step 6: Clear Context and Code Review
|
|
653
676
|
|
|
654
677
|
```bash
|
|
678
|
+
You: /clear
|
|
679
|
+
[Context cleared]
|
|
680
|
+
|
|
655
681
|
You: /review-code
|
|
656
682
|
|
|
657
683
|
Claude: Checking CodeRabbit CLI... installed
|
|
@@ -720,11 +746,12 @@ Tests: All passing
|
|
|
720
746
|
|
|
721
747
|
### General Tips
|
|
722
748
|
|
|
723
|
-
1. **
|
|
724
|
-
2. **
|
|
725
|
-
3. **
|
|
726
|
-
4. **
|
|
727
|
-
5. **
|
|
749
|
+
1. **Clear context between phases**: Run `/clear` before starting each new phase to reset context. This keeps conversations focused, prevents context pollution, and improves efficiency. Each phase reads necessary artifacts from previous phases.
|
|
750
|
+
2. **Use git branches**: Create feature branch before starting
|
|
751
|
+
3. **Commit often**: Commit after Phase 3 completes successfully
|
|
752
|
+
4. **Run verification manually**: Re-run /verify-implementation after fixes
|
|
753
|
+
5. **Review state files**: Check `.5/{feature-name}/state.json` for progress tracking
|
|
754
|
+
6. **Save verification reports**: Keep reports for documentation/debugging
|
|
728
755
|
|
|
729
756
|
---
|
|
730
757
|
|