5-phase-workflow 1.0.1 → 1.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 +62 -6
- package/bin/install.js +375 -29
- package/docs/workflow-guide.md +34 -7
- package/package.json +5 -1
- package/src/agents/integration-agent.md +1 -0
- package/src/agents/review-processor.md +1 -0
- package/src/agents/step-executor.md +1 -0
- package/src/agents/step-fixer.md +1 -0
- package/src/agents/step-verifier.md +1 -0
- package/src/agents/verification-agent.md +47 -13
- package/src/commands/5/configure.md +5 -3
- package/src/commands/5/discuss-feature.md +4 -4
- package/src/commands/5/implement-feature.md +65 -19
- package/src/commands/5/plan-feature.md +5 -3
- package/src/commands/5/plan-implementation.md +115 -52
- package/src/commands/5/quick-implement.md +4 -0
- package/src/commands/5/review-code.md +4 -3
- package/src/commands/5/verify-implementation.md +43 -13
- package/src/hooks/check-updates.js +105 -0
- package/src/settings.json +3 -0
|
@@ -3,6 +3,7 @@ name: step-executor
|
|
|
3
3
|
description: Executes all components of a single implementation step by following pre-built prompts. Runs in forked context with haiku for token efficiency.
|
|
4
4
|
tools: Skill, Read, Write, Edit, Glob, Grep, mcp__jetbrains__get_file_problems, mcp__jetbrains__rename_refactoring
|
|
5
5
|
model: haiku
|
|
6
|
+
color: green
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Step Executor Agent
|
package/src/agents/step-fixer.md
CHANGED
|
@@ -3,6 +3,7 @@ name: step-fixer
|
|
|
3
3
|
description: Diagnoses and fixes errors reported by step-verifier after a failed step execution. Analyzes root cause, applies targeted fixes, and runs local verification. Runs in forked context.
|
|
4
4
|
tools: Read, Edit, Write, Glob, Grep, mcp__jetbrains__get_file_problems, mcp__jetbrains__rename_refactoring
|
|
5
5
|
model: sonnet
|
|
6
|
+
color: red
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Step Fixer Agent
|
|
@@ -3,6 +3,7 @@ name: step-verifier
|
|
|
3
3
|
description: Compiles affected modules and checks new files for problems after a step execution. Runs in forked context.
|
|
4
4
|
tools: Bash, Read, Glob, Skill, mcp__jetbrains__get_file_problems
|
|
5
5
|
model: sonnet
|
|
6
|
+
color: yellow
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Step Verifier Agent
|
|
@@ -3,6 +3,7 @@ name: verification-agent
|
|
|
3
3
|
description: Performs complete verification of a feature implementation including file existence, problem detection, compilation, and tests. Runs in forked context.
|
|
4
4
|
tools: Bash, Read, Glob, Skill, mcp__jetbrains__get_file_problems
|
|
5
5
|
model: sonnet
|
|
6
|
+
color: cyan
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Verification Agent
|
|
@@ -17,41 +18,59 @@ The spawning command provides:
|
|
|
17
18
|
|
|
18
19
|
```
|
|
19
20
|
Feature Name: {feature-name}
|
|
20
|
-
Implementation Plan Path: .5/{feature-name}/plan
|
|
21
|
+
Implementation Plan Path: .5/{feature-name}/plan/
|
|
21
22
|
Expected Files:
|
|
22
23
|
- {path/to/file1.{ext}}
|
|
23
24
|
- {path/to/file2.{ext}}
|
|
24
25
|
- {path/to/file3.{ext}}
|
|
26
|
+
(aggregated from all step files by verify-implementation command)
|
|
25
27
|
Affected Modules:
|
|
26
28
|
- {module-path-1}
|
|
27
29
|
- {module-path-2}
|
|
30
|
+
(from verification.md)
|
|
28
31
|
Test Modules:
|
|
29
32
|
- {module-path-for-tests}
|
|
33
|
+
(from verification.md)
|
|
34
|
+
Build Command: {from verification.md}
|
|
35
|
+
Test Command: {from verification.md}
|
|
30
36
|
```
|
|
31
37
|
|
|
32
38
|
## Process
|
|
33
39
|
|
|
34
40
|
### 0. Parse Implementation Plan
|
|
35
41
|
|
|
36
|
-
Read the implementation plan from the provided path and extract:
|
|
42
|
+
Read the implementation plan from the provided path (`.5/{feature-name}/plan/`) and extract:
|
|
37
43
|
|
|
38
|
-
**
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
**Plan Metadata:**
|
|
45
|
+
- Read `plan/meta.md` for overview and risks
|
|
46
|
+
|
|
47
|
+
**Component Checklist (from each step file):**
|
|
48
|
+
- For each step file (`plan/step-1.md`, `plan/step-2.md`, etc.):
|
|
49
|
+
- Parse YAML frontmatter for step metadata
|
|
50
|
+
- Extract YAML components block
|
|
51
|
+
- Parse each component's expected action, file, and prompt
|
|
52
|
+
- Extract "Expected Outputs" section for files created/modified
|
|
53
|
+
- Note any specific implementation requirements or test coverage expectations
|
|
42
54
|
|
|
43
55
|
**Verification Steps:**
|
|
44
|
-
-
|
|
45
|
-
-
|
|
56
|
+
- Read `plan/verification.md` for:
|
|
57
|
+
- Build command
|
|
58
|
+
- Test command
|
|
59
|
+
- Expected new files
|
|
60
|
+
- Expected modified files
|
|
61
|
+
- Build targets
|
|
62
|
+
- Test modules
|
|
46
63
|
|
|
47
64
|
**Acceptance Criteria:**
|
|
48
|
-
- Look for AC (Acceptance Criteria) references in
|
|
65
|
+
- Look for AC (Acceptance Criteria) references in component prompts
|
|
49
66
|
- Extract expected behavior that needs to be verified through tests
|
|
50
67
|
|
|
51
68
|
**Technical Decisions:**
|
|
52
|
-
- Note any key implementation requirements or constraints
|
|
69
|
+
- Note any key implementation requirements or constraints from component prompts
|
|
53
70
|
- These inform what to look for in the code
|
|
54
71
|
|
|
72
|
+
**Note:** The verify-implementation command aggregates expected files and passes them to you, so you can use that list directly rather than reading all step files yourself. However, reading step files is useful for understanding detailed requirements in component prompts.
|
|
73
|
+
|
|
55
74
|
Store this information for use in subsequent verification steps.
|
|
56
75
|
|
|
57
76
|
### 1. Check File Existence
|
|
@@ -393,12 +412,27 @@ When verifying implementation completeness:
|
|
|
393
412
|
|
|
394
413
|
### Reading Implementation Plans
|
|
395
414
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
-
|
|
415
|
+
**Atomic Plan Structure (Format Version 2.0):**
|
|
416
|
+
|
|
417
|
+
The plan is organized as a directory (`.5/{feature-name}/plan/`) with multiple files:
|
|
418
|
+
- `meta.md`: YAML frontmatter with feature metadata + risks section
|
|
419
|
+
- `step-N.md` files: Each contains YAML frontmatter + components YAML block + expected outputs
|
|
420
|
+
- `verification.md`: Build/test commands and expected file lists
|
|
421
|
+
|
|
422
|
+
To extract information:
|
|
423
|
+
1. Read `meta.md` YAML frontmatter for: feature, ticket, total_steps, total_components
|
|
424
|
+
2. For each step file:
|
|
425
|
+
- Parse YAML frontmatter: step, name, mode, components (count)
|
|
426
|
+
- Extract components YAML block (between ` ```yaml` and ` ``` `)
|
|
427
|
+
- Parse components array with: id, action, file, skill, depends_on, prompt
|
|
428
|
+
- Read "Expected Outputs" section for created/modified files
|
|
429
|
+
3. Read `verification.md` for build/test config
|
|
430
|
+
|
|
431
|
+
Look for in component prompts:
|
|
399
432
|
- Acceptance criteria (often labeled AC1, AC2, etc.)
|
|
400
433
|
- Method signatures in code blocks
|
|
401
434
|
- Technical decisions that constrain implementation
|
|
435
|
+
- Test coverage expectations
|
|
402
436
|
|
|
403
437
|
## DO NOT
|
|
404
438
|
|
|
@@ -254,8 +254,10 @@ Each skill should:
|
|
|
254
254
|
Tell the user:
|
|
255
255
|
|
|
256
256
|
1. "Configuration feature planned at `.5/CONFIGURE/feature.md`"
|
|
257
|
-
2. "Next
|
|
258
|
-
|
|
257
|
+
2. "Next steps:"
|
|
258
|
+
- "Run `/clear` to reset context"
|
|
259
|
+
- "Then run `/5:plan-implementation CONFIGURE`"
|
|
260
|
+
3. "After that: Continue with `/5:implement-feature CONFIGURE` -> `/5:verify-implementation` -> `/5:review-code` (clearing context between each phase)"
|
|
259
261
|
|
|
260
262
|
## DO NOT
|
|
261
263
|
|
|
@@ -298,7 +300,7 @@ User: "Use these"
|
|
|
298
300
|
|
|
299
301
|
Claude: [Writes .5/CONFIGURE/feature.md]
|
|
300
302
|
Claude: "Configuration feature planned at `.5/CONFIGURE/feature.md`"
|
|
301
|
-
Claude: "Next: Run `/5:plan-implementation CONFIGURE`"
|
|
303
|
+
Claude: "Next: Run `/clear` followed by `/5:plan-implementation CONFIGURE`"
|
|
302
304
|
```
|
|
303
305
|
|
|
304
306
|
## Related Documentation
|
|
@@ -190,8 +190,8 @@ After updating the spec, tell the developer:
|
|
|
190
190
|
- "Modified: {Y}"
|
|
191
191
|
- "Removed: {Z}"
|
|
192
192
|
3. Ask: "Would you like to:"
|
|
193
|
-
- "Discuss more (run /discuss-feature again)"
|
|
194
|
-
- "Proceed to implementation planning (run
|
|
193
|
+
- "Discuss more (run /5:discuss-feature again)"
|
|
194
|
+
- "Proceed to implementation planning (run `/clear` followed by `/5:plan-implementation {feature-name}`)"
|
|
195
195
|
- "Review the updated spec first"
|
|
196
196
|
|
|
197
197
|
## Instructions Summary
|
|
@@ -299,7 +299,7 @@ Skill: [Updates Requirements and Acceptance Criteria sections]
|
|
|
299
299
|
Skill: "Feature specification updated. Changes:
|
|
300
300
|
- Clarified: Single emergency window per product (not multiple)
|
|
301
301
|
- Added: Full CRUD operations for emergency windows
|
|
302
|
-
Would you like to proceed to implementation planning? Run:
|
|
302
|
+
Would you like to proceed to implementation planning? Run `/clear` followed by `/5:plan-implementation PROJ-1234-add-feature`"
|
|
303
303
|
```
|
|
304
304
|
|
|
305
305
|
### Example 2: Adding Requirements
|
|
@@ -341,7 +341,7 @@ Skill: [Updates Acceptance Criteria, adds notification verification]
|
|
|
341
341
|
Skill: "Feature specification updated. Changes:
|
|
342
342
|
- Added: Email notification when emergency window starts
|
|
343
343
|
- Added: Integration with email service
|
|
344
|
-
Review the changes and run:
|
|
344
|
+
Review the changes and run `/clear` followed by `/5:plan-implementation PROJ-1234-add-feature` when ready"
|
|
345
345
|
```
|
|
346
346
|
|
|
347
347
|
### Example 3: Simplification
|
|
@@ -35,7 +35,10 @@ This command is a **thin orchestrator** that:
|
|
|
35
35
|
|
|
36
36
|
Before using this skill, ensure:
|
|
37
37
|
1. Feature spec exists at `.5/{TICKET-ID}-{description}/feature.md`
|
|
38
|
-
2. Implementation plan exists at `.5/{TICKET-ID}-{description}/plan
|
|
38
|
+
2. Implementation plan exists at `.5/{TICKET-ID}-{description}/plan/` directory with:
|
|
39
|
+
- plan/meta.md (metadata)
|
|
40
|
+
- plan/step-N.md files (one per step)
|
|
41
|
+
- plan/verification.md (verification config)
|
|
39
42
|
3. Implementation plan has been reviewed and approved by developer
|
|
40
43
|
4. You have the feature name (e.g., "PROJ-1234-add-emergency-schedule") ready
|
|
41
44
|
|
|
@@ -43,14 +46,23 @@ Before using this skill, ensure:
|
|
|
43
46
|
|
|
44
47
|
### Step 1: Load Implementation Plan
|
|
45
48
|
|
|
46
|
-
Read the implementation plan from `.5/{feature-name}/plan.md` where `{feature-name}` is the argument provided by the user.
|
|
49
|
+
Read the implementation plan metadata from `.5/{feature-name}/plan/meta.md` where `{feature-name}` is the argument provided by the user.
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
- From `## Verification`: build_command, test_command, expected file lists
|
|
51
|
+
**Error Handling:** If the plan directory or meta.md file is missing:
|
|
52
|
+
- Report error immediately: "Error: Implementation plan not found at `.5/{feature-name}/plan/`. Please run /5:plan-implementation first."
|
|
53
|
+
- Do not proceed to Step 2
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
Parse the YAML frontmatter from meta.md to extract:
|
|
56
|
+
- `feature`: feature name
|
|
57
|
+
- `ticket`: ticket ID
|
|
58
|
+
- `total_steps`: number of steps in the plan
|
|
59
|
+
- `total_components`: total component count
|
|
60
|
+
- `new_files`: count of new files
|
|
61
|
+
- `modified_files`: count of modified files
|
|
62
|
+
|
|
63
|
+
Store this metadata for state file initialization.
|
|
64
|
+
|
|
65
|
+
**Note:** Individual step files (plan/step-N.md) will be loaded on-demand during Step 4 when executing each step.
|
|
54
66
|
|
|
55
67
|
### Step 2: Initialize State Tracking (MANDATORY)
|
|
56
68
|
|
|
@@ -89,15 +101,39 @@ Create TaskCreate entries for all steps defined in the implementation plan. Step
|
|
|
89
101
|
|
|
90
102
|
### Step 4: Execute Steps via Agents
|
|
91
103
|
|
|
92
|
-
For each step
|
|
104
|
+
For each step (1 to total_steps from meta.md), follow this pattern:
|
|
105
|
+
|
|
106
|
+
#### 4a. Load and Parse Step File
|
|
107
|
+
|
|
108
|
+
For the current step number N:
|
|
109
|
+
|
|
110
|
+
1. **Read step file:** `.5/{feature-name}/plan/step-{N}.md`
|
|
93
111
|
|
|
94
|
-
|
|
112
|
+
**Error Handling:** If the step file is missing:
|
|
113
|
+
- Report error: "Error: Step {N} plan file not found at `.5/{feature-name}/plan/step-{N}.md`. Plan may be incomplete."
|
|
114
|
+
- Stop execution and escalate to user
|
|
95
115
|
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
- Components with action, file, skill, depends_on, and complete prompt
|
|
116
|
+
2. **Parse YAML frontmatter** (between `---` markers):
|
|
117
|
+
- Extract: `step`, `name`, `mode`, `components` (count)
|
|
99
118
|
|
|
100
|
-
|
|
119
|
+
3. **Extract YAML components block:**
|
|
120
|
+
- Find the `## Components` section
|
|
121
|
+
- Extract the YAML block (between ` ```yaml` and ` ``` `)
|
|
122
|
+
- Parse the YAML to get the `components` array
|
|
123
|
+
|
|
124
|
+
**Error Handling:** If YAML parsing fails:
|
|
125
|
+
- Report error: "Error: Malformed step plan file at `.5/{feature-name}/plan/step-{N}.md`. Check YAML syntax in components block."
|
|
126
|
+
- Stop execution and escalate to user
|
|
127
|
+
|
|
128
|
+
4. **Build step block object:**
|
|
129
|
+
```yaml
|
|
130
|
+
step: {from frontmatter}
|
|
131
|
+
name: "{from frontmatter}"
|
|
132
|
+
mode: {from frontmatter}
|
|
133
|
+
components: {from YAML block}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
This step block is now ready to pass to the step-executor agent (same format as before).
|
|
101
137
|
|
|
102
138
|
#### 4b. Spawn step-executor Agent (haiku)
|
|
103
139
|
|
|
@@ -230,6 +266,12 @@ If a step-executor or step-verifier reports failure:
|
|
|
230
266
|
|
|
231
267
|
3. **Spawn step-fixer agent** (sonnet) — read `.claude/agents/step-fixer.md` for agent instructions, then spawn via Task tool:
|
|
232
268
|
|
|
269
|
+
To retrieve the original component prompt:
|
|
270
|
+
- Read `.5/{feature-name}/plan/step-{N}.md`
|
|
271
|
+
- Parse the YAML components block
|
|
272
|
+
- Find the component by ID
|
|
273
|
+
- Extract the `prompt` field
|
|
274
|
+
|
|
233
275
|
```
|
|
234
276
|
Task tool call:
|
|
235
277
|
subagent_type: general-purpose
|
|
@@ -247,7 +289,7 @@ If a step-executor or step-verifier reports failure:
|
|
|
247
289
|
Attempt: {M}
|
|
248
290
|
|
|
249
291
|
Original Prompt:
|
|
250
|
-
{The component prompt from
|
|
292
|
+
{The component prompt extracted from plan/step-{N}.md}
|
|
251
293
|
|
|
252
294
|
Step Verifier Output:
|
|
253
295
|
{Complete output from step-verifier}
|
|
@@ -330,7 +372,9 @@ Tell the developer:
|
|
|
330
372
|
3. "Compilation: Successful"
|
|
331
373
|
4. "Tests: All passing ({N} tests)"
|
|
332
374
|
5. **"State file: `.5/{feature-name}/state.json`"** (this is critical for resume capability)
|
|
333
|
-
6. "Next
|
|
375
|
+
6. "Next steps:"
|
|
376
|
+
- "Run `/clear` to reset context"
|
|
377
|
+
- "Then run `/5:verify-implementation {feature-name}` to validate completeness"
|
|
334
378
|
|
|
335
379
|
**Note:** The verification step will automatically prompt the developer to commit changes, which is recommended before running CodeRabbit review.
|
|
336
380
|
|
|
@@ -423,17 +467,19 @@ User: /implement-feature PROJ-1234-add-emergency-schedule
|
|
|
423
467
|
|
|
424
468
|
## Instructions Summary
|
|
425
469
|
|
|
426
|
-
1. **Load implementation plan** from `.5/{feature-name}/plan.md`
|
|
470
|
+
1. **Load implementation plan metadata** from `.5/{feature-name}/plan/meta.md` - parse YAML frontmatter for total_steps, total_components
|
|
427
471
|
2. **Initialize state file** (MANDATORY) in `.5/{feature-name}/state.json` - verify creation
|
|
428
472
|
3. **Create tasks** for all steps defined in the plan
|
|
429
|
-
4. **For each step:**
|
|
430
|
-
-
|
|
473
|
+
4. **For each step (1 to total_steps):**
|
|
474
|
+
- Load and parse step file: `.5/{feature-name}/plan/step-{N}.md` (parse YAML frontmatter + components block)
|
|
475
|
+
- Build step block object from parsed data
|
|
476
|
+
- Spawn step-executor with step block
|
|
431
477
|
- Process results
|
|
432
478
|
- Spawn step-verifier
|
|
433
479
|
- Process results
|
|
434
480
|
- **Update state file** (MANDATORY - Step 4f) - verify update
|
|
435
481
|
5. **For final integration step (if configured):** Spawn integration-agent, process results, **update state file** (MANDATORY)
|
|
436
|
-
6. **Handle failures** - record in state file (MANDATORY), spawn step-fixer to diagnose and fix, re-verify after fix, escalate if stuck
|
|
482
|
+
6. **Handle failures** - record in state file (MANDATORY), extract original prompt from plan/step-{N}.md, spawn step-fixer to diagnose and fix, re-verify after fix, escalate if stuck
|
|
437
483
|
7. **Monitor context** - warn at 50%, stop at 80%
|
|
438
484
|
8. **Update state file to completed** (MANDATORY - Step 8) - verify final update
|
|
439
485
|
9. **Report completion** with summary including state file location
|
|
@@ -212,7 +212,9 @@ Write a comprehensive feature spec to `.5/{TICKET-ID}-{description}/feature.md`
|
|
|
212
212
|
...
|
|
213
213
|
|
|
214
214
|
## Next Steps
|
|
215
|
-
After approval
|
|
215
|
+
After approval:
|
|
216
|
+
1. Run `/clear` to reset context
|
|
217
|
+
2. Run `/5:plan-implementation {TICKET-ID}-{description}`
|
|
216
218
|
```
|
|
217
219
|
|
|
218
220
|
## Instructions
|
|
@@ -277,8 +279,8 @@ After approval, run: `/plan-implementation {TICKET-ID}-{description}`
|
|
|
277
279
|
7. Skill challenges: "Could we reuse existing scheduling infrastructure instead of creating new one?"
|
|
278
280
|
8. Skill determines: Feature name `add-emergency-schedule`
|
|
279
281
|
9. Skill creates: `.5/PROJ-1234-add-emergency-schedule/feature.md`
|
|
280
|
-
10. Skill tells user: "Feature spec created. Please review and then run `/plan-implementation PROJ-1234-add-emergency-schedule`"
|
|
281
|
-
11. Skill tells user: "If the feature needs refinements, run `/discuss-feature PROJ-1234-add-emergency-schedule`"
|
|
282
|
+
10. Skill tells user: "Feature spec created. Please review and then run `/clear` followed by `/5:plan-implementation PROJ-1234-add-emergency-schedule`"
|
|
283
|
+
11. Skill tells user: "If the feature needs refinements, run `/5:discuss-feature PROJ-1234-add-emergency-schedule`"
|
|
282
284
|
|
|
283
285
|
## Related Documentation
|
|
284
286
|
|
|
@@ -116,82 +116,142 @@ Group components by dependencies:
|
|
|
116
116
|
|
|
117
117
|
### Step 7: Write Implementation Plan
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
Create the plan directory `.5/{feature-name}/plan/` and write atomic plan files:
|
|
120
120
|
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
#### 7a. Create plan directory
|
|
122
|
+
|
|
123
|
+
Use Bash to create the directory:
|
|
124
|
+
```bash
|
|
125
|
+
mkdir -p .5/{feature-name}/plan
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### 7b. Write plan/meta.md
|
|
129
|
+
|
|
130
|
+
Write metadata file using this format:
|
|
123
131
|
|
|
124
|
-
|
|
132
|
+
```markdown
|
|
133
|
+
---
|
|
125
134
|
feature: {feature-name}
|
|
126
135
|
ticket: {ticket-id}
|
|
127
136
|
total_steps: {N}
|
|
128
137
|
total_components: {N}
|
|
129
138
|
new_files: {N}
|
|
130
139
|
modified_files: {N}
|
|
140
|
+
created_at: {ISO timestamp}
|
|
141
|
+
format_version: "2.0"
|
|
142
|
+
---
|
|
131
143
|
|
|
132
|
-
|
|
133
|
-
{1-2 sentences: what this plan builds and why}
|
|
144
|
+
# Plan Metadata: {TICKET-ID} - {Title}
|
|
134
145
|
|
|
135
|
-
|
|
146
|
+
{1-2 sentence summary of what this plan builds}
|
|
136
147
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
148
|
+
## Steps Overview
|
|
149
|
+
- Step 1: {Name} ({N} components)
|
|
150
|
+
- Step 2: {Name} ({N} components)
|
|
151
|
+
- Step N: {Name} ({N} components)
|
|
140
152
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
{Complete, self-contained execution instructions.
|
|
148
|
-
For create: include full file content or reference snippet + modifications.
|
|
149
|
-
For modify: include exact old_string and new_string.
|
|
150
|
-
Include all imports. Include all types.
|
|
151
|
-
This prompt is passed directly to a haiku agent that cannot explore the codebase.}
|
|
152
|
-
|
|
153
|
-
#### component: {component-id-2}
|
|
154
|
-
action: create | modify
|
|
155
|
-
file: "{exact/path/to/file.ext}"
|
|
156
|
-
skill: "{skill-name}" | null
|
|
157
|
-
depends_on: []
|
|
158
|
-
prompt: |
|
|
159
|
-
{Complete instructions}
|
|
153
|
+
## Risks
|
|
154
|
+
- {risk 1}: {mitigation}
|
|
155
|
+
- {risk 2}: {mitigation}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### 7c. Write plan/step-N.md files (one per step)
|
|
160
159
|
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
For each step, create a separate file `plan/step-{N}.md` using this format:
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
---
|
|
164
|
+
step: {N}
|
|
165
|
+
feature: {feature-name}
|
|
166
|
+
name: "{Step Name}"
|
|
163
167
|
mode: parallel | sequential
|
|
168
|
+
components: {N}
|
|
169
|
+
---
|
|
164
170
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
# Step {N}: {Step Name}
|
|
172
|
+
|
|
173
|
+
{Brief description of what this step accomplishes}
|
|
174
|
+
|
|
175
|
+
## Components
|
|
176
|
+
|
|
177
|
+
```yaml
|
|
178
|
+
components:
|
|
179
|
+
- id: {component-id}
|
|
180
|
+
action: create | modify
|
|
181
|
+
file: "{exact/path/to/file.ext}"
|
|
182
|
+
skill: "{skill-name}" | null
|
|
183
|
+
depends_on: []
|
|
184
|
+
prompt: |
|
|
185
|
+
{Complete, self-contained execution instructions.
|
|
186
|
+
|
|
187
|
+
For create: include full file content or reference snippet.
|
|
188
|
+
For modify: include exact old_string and new_string.
|
|
189
|
+
Include all imports, types, and context.}
|
|
190
|
+
|
|
191
|
+
- id: {component-id-2}
|
|
192
|
+
action: create | modify
|
|
193
|
+
file: "{exact/path/to/file.ext}"
|
|
194
|
+
skill: "{skill-name}" | null
|
|
195
|
+
depends_on: ["{component-id}"]
|
|
196
|
+
prompt: |
|
|
197
|
+
{Complete instructions}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Expected Outputs
|
|
201
|
+
**Files Created:**
|
|
202
|
+
- {path1}
|
|
203
|
+
- {path2}
|
|
204
|
+
|
|
205
|
+
**Files Modified:**
|
|
206
|
+
- {path3}
|
|
207
|
+
|
|
208
|
+
## Verification Targets
|
|
209
|
+
**Build Targets:**
|
|
210
|
+
- {module1}
|
|
211
|
+
- {module2}
|
|
212
|
+
|
|
213
|
+
**Test Targets:**
|
|
214
|
+
- {test-module-1}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
**Important:** Use YAML block within Markdown for components. This provides easy parsing while maintaining readability.
|
|
218
|
+
|
|
219
|
+
#### 7d. Write plan/verification.md
|
|
220
|
+
|
|
221
|
+
Write verification configuration file:
|
|
222
|
+
|
|
223
|
+
```markdown
|
|
224
|
+
# Verification Configuration
|
|
172
225
|
|
|
173
|
-
## Verification
|
|
174
226
|
build_command: "{from config}"
|
|
175
227
|
test_command: "{from config}"
|
|
176
|
-
expected_new_files:
|
|
177
|
-
- "{path1}"
|
|
178
|
-
- "{path2}"
|
|
179
|
-
expected_modified_files:
|
|
180
|
-
- "{path3}"
|
|
181
228
|
|
|
182
|
-
##
|
|
183
|
-
-
|
|
184
|
-
-
|
|
229
|
+
## Expected New Files
|
|
230
|
+
- {path1}
|
|
231
|
+
- {path2}
|
|
232
|
+
|
|
233
|
+
## Expected Modified Files
|
|
234
|
+
- {path3}
|
|
235
|
+
- {path4}
|
|
236
|
+
|
|
237
|
+
## Build Targets
|
|
238
|
+
- {module1}
|
|
239
|
+
- {module2}
|
|
240
|
+
|
|
241
|
+
## Test Modules
|
|
242
|
+
- {test-module-1}
|
|
185
243
|
```
|
|
186
244
|
|
|
187
245
|
### Step 8: Inform Developer
|
|
188
246
|
|
|
189
247
|
After creating the implementation plan, tell the developer:
|
|
190
248
|
|
|
191
|
-
1. "Implementation plan created at `.5/{feature-name}/plan
|
|
249
|
+
1. "Implementation plan created at `.5/{feature-name}/plan/`"
|
|
192
250
|
2. "{N} components across {M} steps"
|
|
193
|
-
3. "
|
|
194
|
-
4. "
|
|
251
|
+
3. "Atomic plan structure: meta.md, step-1.md, step-2.md, ..., verification.md"
|
|
252
|
+
4. "Each component has a self-contained execution prompt for haiku agents"
|
|
253
|
+
5. "Please review the plan files"
|
|
254
|
+
6. "Then run `/clear` followed by `/5:implement-feature {feature-name}`"
|
|
195
255
|
|
|
196
256
|
## Component Prompt Examples
|
|
197
257
|
|
|
@@ -367,8 +427,11 @@ Skill:
|
|
|
367
427
|
5. Maps components to skills (or null for direct execution)
|
|
368
428
|
6. Groups into steps by dependencies
|
|
369
429
|
7. Builds self-contained prompts with inline code and exact paths
|
|
370
|
-
8. Creates .5/PROJ-1234-add-emergency-schedule/plan
|
|
371
|
-
9.
|
|
430
|
+
8. Creates .5/PROJ-1234-add-emergency-schedule/plan/ directory
|
|
431
|
+
9. Writes plan/meta.md with metadata and risks
|
|
432
|
+
10. Writes plan/step-1.md, plan/step-2.md, plan/step-3.md with YAML components
|
|
433
|
+
11. Writes plan/verification.md with build/test config
|
|
434
|
+
12. Tells user: "Plan created with 7 components across 3 steps. Atomic plan structure at `.5/PROJ-1234-add-emergency-schedule/plan/`. Review the plan files, then run `/clear` followed by `/5:implement-feature PROJ-1234-add-emergency-schedule`"
|
|
372
435
|
```
|
|
373
436
|
|
|
374
437
|
## Related Documentation
|
|
@@ -557,10 +557,11 @@ Action: Please review the suggested fix manually.
|
|
|
557
557
|
```
|
|
558
558
|
1. Make code changes
|
|
559
559
|
2. Stage changes: git add .
|
|
560
|
-
3. Run
|
|
561
|
-
4.
|
|
562
|
-
5.
|
|
560
|
+
3. Run `/clear` to reset context
|
|
561
|
+
4. Run review: /5:review-code
|
|
562
|
+
5. Address manual issues if needed
|
|
563
563
|
6. Commit: git commit -m "message"
|
|
564
|
+
7. For next feature: Run `/clear` before starting /5:plan-feature
|
|
564
565
|
```
|
|
565
566
|
|
|
566
567
|
## Configuration
|