5-phase-workflow 3.0.0 → 3.1.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 +31 -101
- package/bin/install.js +168 -176
- package/bin/sync-agents.js +59 -54
- package/docs/workflow-guide.md +35 -79
- package/package.json +2 -2
- package/src/agents/step-executor-agent.md +5 -4
- package/src/agents/step-orchestrator-agent.md +12 -12
- package/src/agents/verification-agent.md +7 -8
- package/src/codex-commands/plan.md +65 -0
- package/src/commands/5/address-review-findings.md +43 -52
- package/src/commands/5/analyze-feature.md +1 -1
- package/src/commands/5/configure.md +75 -179
- package/src/commands/5/eject.md +0 -1
- package/src/commands/5/implement.md +78 -68
- package/src/commands/5/lean-check.md +75 -0
- package/src/commands/5/reconfigure.md +48 -129
- package/src/commands/5/review.md +42 -14
- package/src/commands/5/synchronize-agents.md +1 -1
- package/src/commands/5/update.md +2 -2
- package/src/hooks/dependency-guard.js +150 -0
- package/src/hooks/statusline.js +5 -3
- package/src/references/configure-tables.md +0 -33
- package/src/settings.json +3 -4
- package/src/skills/baseline-conventions/SKILL.md +37 -0
- package/src/skills/cognitive-load/SKILL.md +52 -0
- package/src/skills/configure-agents-md/SKILL.md +72 -0
- package/src/skills/configure-rules/SKILL.md +146 -0
- package/src/skills/documentation-style/SKILL.md +32 -0
- package/src/skills/fowler-code-smells/SKILL.md +25 -0
- package/src/skills/review-style/SKILL.md +142 -0
- package/src/templates/AGENTS.md +31 -31
- package/src/templates/workflow/REVIEW-FINDINGS.md +2 -9
- package/src/workflows/5-implement.js +67 -92
- package/docs/findings.md +0 -361
- package/docs/progress.md +0 -102
- package/src/commands/5/apply-review-findings.md +0 -66
- package/src/commands/5/commit.md +0 -43
- package/src/commands/5/plan.md +0 -189
- package/src/commands/5/reply-pr-comments.md +0 -48
- package/src/commands/5/split.md +0 -86
- package/src/commands/5/triage-pr-comments.md +0 -70
- package/src/hooks/config-guard.js +0 -30
- package/src/skills/configure-docs-index/SKILL.md +0 -243
- package/src/skills/configure-skills/SKILL.md +0 -311
- package/src/skills/generate-readme/EXAMPLES.md +0 -168
- package/src/skills/generate-readme/SKILL.md +0 -122
- package/src/skills/generate-readme/TEMPLATE.md +0 -141
- package/src/skills/use-index/SKILL.md +0 -49
- package/src/templates/ARCHITECTURE.md +0 -33
- package/src/templates/CONCERNS.md +0 -33
- package/src/templates/CONVENTIONS.md +0 -74
- package/src/templates/TESTING.md +0 -24
- package/src/templates/workflow/FIX-PLAN.md +0 -55
- package/src/templates/workflow/PLAN-COMPACT.md +0 -42
- package/src/templates/workflow/PLAN.md +0 -76
- package/src/templates/workflow/REVIEW-SUMMARY.md +0 -53
package/docs/findings.md
DELETED
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
# Critical Analysis: dev-workflow System
|
|
2
|
-
|
|
3
|
-
## Executive Summary
|
|
4
|
-
|
|
5
|
-
dev-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
|
-
dev-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
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
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
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 5:apply-review-findings
|
|
3
|
-
description: Applies approved local review findings and approved PR fixes for one feature.
|
|
4
|
-
allowed-tools: Read, Edit, Write, Glob, Bash, AskUserQuestion, Agent
|
|
5
|
-
user-invocable: false
|
|
6
|
-
model: haiku
|
|
7
|
-
argument-hint: [feature-name] [--decisions path] [--pr-approved]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<role>
|
|
11
|
-
You are a Review Fix Applicator. Apply only approved fixes. Do not review code, broaden scope, or refactor unrelated code.
|
|
12
|
-
</role>
|
|
13
|
-
|
|
14
|
-
# Apply Review Findings
|
|
15
|
-
|
|
16
|
-
## Inputs
|
|
17
|
-
|
|
18
|
-
- Feature directory: `.5/features/{feature}/`
|
|
19
|
-
- Local decisions: the `--decisions` JSON file written by `/5:address-review-findings`, or the latest `.5/features/{feature}/review-decisions-*.json` unless `--pr-approved` is passed.
|
|
20
|
-
- Approved PR fixes: decisions recorded by `/5:triage-pr-comments` when `--pr-approved` is passed.
|
|
21
|
-
|
|
22
|
-
## Process
|
|
23
|
-
|
|
24
|
-
1. Parse approved items:
|
|
25
|
-
- Local decision records where `decision` is `fix`.
|
|
26
|
-
- Use `customInstructions` when present; otherwise use `suggestedFix`.
|
|
27
|
-
- Treat `wont_fix` and `wait` as skipped.
|
|
28
|
-
- Approved PR comments where decision is `fix`.
|
|
29
|
-
2. Group fixes by target file.
|
|
30
|
-
3. Before editing a file, read it and keep an in-memory snapshot for rollback of this command's edits only.
|
|
31
|
-
4. Apply fixes:
|
|
32
|
-
- 1-3 simple fixes in a file: edit directly, highest line number first.
|
|
33
|
-
- 4+ fixes or complex logic: spawn one focused agent for that file with only the file path and grouped fix list.
|
|
34
|
-
5. Track each item as `APPLIED`, `FAILED`, or `SKIPPED`.
|
|
35
|
-
6. If verification fails and rollback is requested, restore only this command's in-memory snapshots. Never restore from `HEAD`.
|
|
36
|
-
|
|
37
|
-
## Agent Prompt For Grouped Fixes
|
|
38
|
-
|
|
39
|
-
```text
|
|
40
|
-
Apply only these approved review fixes.
|
|
41
|
-
|
|
42
|
-
File: {file}
|
|
43
|
-
Fixes:
|
|
44
|
-
{compact numbered list}
|
|
45
|
-
|
|
46
|
-
Rules:
|
|
47
|
-
- Read the file first.
|
|
48
|
-
- Apply from highest line to lowest.
|
|
49
|
-
- Do not introduce unrelated changes.
|
|
50
|
-
- Report each item as APPLIED or FAILED.
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Output
|
|
54
|
-
|
|
55
|
-
End with:
|
|
56
|
-
|
|
57
|
-
```text
|
|
58
|
-
---APPLY-FINDINGS---
|
|
59
|
-
STATUS: success | partial | failed
|
|
60
|
-
APPLIED: {N}
|
|
61
|
-
FAILED: {N}
|
|
62
|
-
SKIPPED: {N}
|
|
63
|
-
FILES_MODIFIED: [comma-separated paths]
|
|
64
|
-
ERRORS: none | {compact summary}
|
|
65
|
-
---END-APPLY-FINDINGS---
|
|
66
|
-
```
|
package/src/commands/5/commit.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 5:commit
|
|
3
|
-
description: Create a git commit using the configured commit message template from .5/config.json.
|
|
4
|
-
allowed-tools: Bash, AskUserQuestion
|
|
5
|
-
user-invocable: true
|
|
6
|
-
model: haiku
|
|
7
|
-
argument-hint: [short-description]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
<role>
|
|
11
|
-
You are a Commit Assistant. You create exactly one git commit using the project's configured commit message template.
|
|
12
|
-
You do NOT modify files. You do NOT stage unrelated changes. After reporting the commit result, you are DONE.
|
|
13
|
-
</role>
|
|
14
|
-
|
|
15
|
-
# Commit
|
|
16
|
-
|
|
17
|
-
Current branch: !`git branch --show-current 2>/dev/null || echo ""`
|
|
18
|
-
Commit message pattern: !`node -e "try{const c=JSON.parse(require('fs').readFileSync('.5/config.json','utf8'));console.log(c?.git?.commitMessage?.pattern||'{ticket-id} {short-description}')}catch(e){console.log('{ticket-id} {short-description}')}" 2>/dev/null`
|
|
19
|
-
Ticket pattern: !`node -e "try{const c=JSON.parse(require('fs').readFileSync('.5/config.json','utf8'));const p=c?.ticket?.pattern;console.log(p!=null?p:'(none)')}catch(e){console.log('(none)')}" 2>/dev/null`
|
|
20
|
-
Extract ticket from branch: !`node -e "try{const c=JSON.parse(require('fs').readFileSync('.5/config.json','utf8'));console.log(c?.ticket?.extractFromBranch!==false)}catch(e){console.log(true)}" 2>/dev/null`
|
|
21
|
-
|
|
22
|
-
## Step 1: Stage
|
|
23
|
-
|
|
24
|
-
Run `git status --short`. With no changed files, say "No changes to commit." and stop.
|
|
25
|
-
|
|
26
|
-
Ask the user which files to include, then stage only those with explicit paths. **Never use `git add .` or `git add -A`.** If nothing ends up staged, say "No staged changes to commit." and stop.
|
|
27
|
-
|
|
28
|
-
## Step 2: Build the Message
|
|
29
|
-
|
|
30
|
-
Use the injected values above — do not re-read the config.
|
|
31
|
-
|
|
32
|
-
- If `extractFromBranch` is true and the ticket pattern is not `(none)`, match it against the injected branch to get `{ticket-id}`. No match means an empty string.
|
|
33
|
-
- `{short-description}` is the command argument if given, otherwise propose one from the staged diff and have the user confirm it.
|
|
34
|
-
- Apply the injected commit message pattern, then trim redundant whitespace. When `{ticket-id}` is empty, remove the empty wrapper it leaves behind:
|
|
35
|
-
- `feat({ticket-id}): {short-description}` → `feat: {short-description}`
|
|
36
|
-
- `{ticket-id}: {short-description}` → `{short-description}`
|
|
37
|
-
- `{ticket-id} {short-description}` → `{short-description}`
|
|
38
|
-
|
|
39
|
-
Add a body of 1-5 bullets only when the change is not self-explanatory, including the reason for the change when you know it from the conversation. No raw diff excerpts.
|
|
40
|
-
|
|
41
|
-
## Step 3: Commit
|
|
42
|
-
|
|
43
|
-
Commit with `git commit -m "{subject}"`, adding a second `-m "{body}"` when there is a body. Then report the subject and the output of `git rev-parse --short HEAD`.
|