@atlashub/smartstack-cli 2.7.3 → 2.7.4
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/.documentation/agents.html +0 -4
- package/.documentation/business-analyse.html +0 -4
- package/.documentation/cli-commands.html +0 -4
- package/.documentation/commands.html +0 -77
- package/.documentation/css/styles.css +0 -8
- package/.documentation/efcore.html +0 -4
- package/.documentation/gitflow.html +0 -4
- package/.documentation/hooks.html +0 -4
- package/.documentation/index.html +2 -28
- package/.documentation/init.html +8 -14
- package/.documentation/installation.html +0 -11
- package/.documentation/js/app.js +2 -16
- package/.documentation/ralph-loop.html +0 -4
- package/.documentation/test-web.html +0 -4
- package/README.md +0 -1
- package/dist/index.js +3 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/templates/agents/docs-sync-checker.md +2 -2
- package/templates/hooks/docs-drift-check.md +4 -5
- package/templates/skills/_resources/context-digest-template.md +2 -2
- package/templates/skills/_resources/doc-context-cache.md +0 -2
- package/templates/skills/_resources/docs-manifest-schema.md +1 -3
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +1 -3
- package/templates/skills/_shared.md +24 -25
- package/templates/skills/application/steps/step-04-backend.md +185 -11
- package/templates/skills/application/steps/step-06-migration.md +41 -2
- package/templates/skills/application/templates-seed.md +151 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +59 -17
- package/templates/skills/controller/steps/step-01-analyze.md +1 -1
- package/templates/skills/ralph-loop/steps/step-01-task.md +21 -1
- package/templates/skills/ralph-loop/steps/step-02-execute.md +75 -3
- package/.documentation/apex.html +0 -1027
- package/templates/skills/apex/SKILL.md +0 -297
- package/templates/skills/apex/steps/step-00-init.md +0 -212
- package/templates/skills/apex/steps/step-01-analyze.md +0 -263
- package/templates/skills/apex/steps/step-02-plan.md +0 -255
- package/templates/skills/apex/steps/step-03-execute.md +0 -217
- package/templates/skills/apex/steps/step-04-validate.md +0 -273
- package/templates/skills/apex/steps/step-04b-doc-sync.md +0 -162
- package/templates/skills/apex/steps/step-05-examine.md +0 -214
- package/templates/skills/apex/steps/step-06-resolve.md +0 -181
- package/templates/skills/apex/steps/step-07-tests.md +0 -206
- package/templates/skills/apex/steps/step-08-run-tests.md +0 -207
- package/templates/skills/apex/templates/00-context.md +0 -46
- package/templates/skills/apex/templates/01-analyze.md +0 -63
- package/templates/skills/apex/templates/02-plan.md +0 -63
- package/templates/skills/apex/templates/03-execute.md +0 -34
- package/templates/skills/apex/templates/04-validate.md +0 -61
- package/templates/skills/apex/templates/04b-doc-sync.md +0 -31
- package/templates/skills/apex/templates/05-examine.md +0 -58
- package/templates/skills/apex/templates/06-resolve.md +0 -39
- package/templates/skills/apex/templates/07-tests.md +0 -56
- package/templates/skills/apex/templates/08-run-tests.md +0 -41
- package/templates/skills/apex/templates/README.md +0 -69
- package/templates/skills/apex/templates/context-digest.md +0 -35
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: step-01-analyze
|
|
3
|
-
description: Pure context gathering - explore codebase to understand WHAT EXISTS
|
|
4
|
-
next_step: steps/step-02-plan.md
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Step 1: Analyze (Context Gathering)
|
|
8
|
-
|
|
9
|
-
## MANDATORY EXECUTION RULES:
|
|
10
|
-
|
|
11
|
-
- NEVER plan or design solutions - that's step 2
|
|
12
|
-
- NEVER create todos or implementation tasks
|
|
13
|
-
- NEVER decide HOW to implement anything
|
|
14
|
-
- ALWAYS focus on discovering WHAT EXISTS
|
|
15
|
-
- ALWAYS report findings with file paths and line numbers
|
|
16
|
-
- YOU ARE AN EXPLORER, not a planner
|
|
17
|
-
- FORBIDDEN to suggest implementations or approaches
|
|
18
|
-
|
|
19
|
-
## YOUR TASK:
|
|
20
|
-
|
|
21
|
-
Gather ALL relevant context about WHAT CURRENTLY EXISTS in the codebase related to the task.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
<available_state>
|
|
26
|
-
From step-00-init:
|
|
27
|
-
|
|
28
|
-
| Variable | Description |
|
|
29
|
-
|----------|-------------|
|
|
30
|
-
| `{task_description}` | What to implement |
|
|
31
|
-
| `{task_id}` | Kebab-case identifier |
|
|
32
|
-
| `{auto_mode}` | Skip confirmations |
|
|
33
|
-
| `{examine_mode}` | Auto-proceed to review |
|
|
34
|
-
| `{save_mode}` | Save outputs to files |
|
|
35
|
-
| `{test_mode}` | Include test steps |
|
|
36
|
-
| `{economy_mode}` | No subagents, direct tools |
|
|
37
|
-
| `{output_dir}` | Path to output (if save_mode) |
|
|
38
|
-
</available_state>
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## EXECUTION SEQUENCE:
|
|
43
|
-
|
|
44
|
-
### 1. Extract Search Keywords
|
|
45
|
-
|
|
46
|
-
From the task description, identify:
|
|
47
|
-
- **Domain terms**: auth, user, payment, etc.
|
|
48
|
-
- **Technical terms**: API, route, component, etc.
|
|
49
|
-
- **Action hints**: create, update, fix, add, etc.
|
|
50
|
-
|
|
51
|
-
These keywords guide exploration - NOT planning.
|
|
52
|
-
|
|
53
|
-
### 2. SmartStack MCP Context (if available)
|
|
54
|
-
|
|
55
|
-
**Use MCP tools for SmartStack-specific context:**
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
mcp__smartstack__api_docs:
|
|
59
|
-
format: "markdown"
|
|
60
|
-
# Récupère la documentation API existante
|
|
61
|
-
# Identifie les endpoints, DTOs, et patterns utilisés
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
This provides:
|
|
65
|
-
- Existing API endpoints and their structure
|
|
66
|
-
- DTOs and request/response models
|
|
67
|
-
- Controller patterns and conventions
|
|
68
|
-
- NavRoute hierarchy
|
|
69
|
-
|
|
70
|
-
### 3. Explore Codebase
|
|
71
|
-
|
|
72
|
-
**If `{economy_mode}` = true:**
|
|
73
|
-
|
|
74
|
-
Use direct tools only:
|
|
75
|
-
1. Glob to find files: `**/*{keyword}*`
|
|
76
|
-
2. Grep to search content in likely locations
|
|
77
|
-
3. Read the most relevant 3-5 files
|
|
78
|
-
4. Skip web research unless stuck
|
|
79
|
-
|
|
80
|
-
**If `{economy_mode}` = false:**
|
|
81
|
-
|
|
82
|
-
Launch parallel exploration agents in a SINGLE message:
|
|
83
|
-
|
|
84
|
-
**Agent 1: Codebase Exploration** (`explore-codebase`)
|
|
85
|
-
```
|
|
86
|
-
Find existing code related to: {task_description}
|
|
87
|
-
|
|
88
|
-
Report ONLY what exists:
|
|
89
|
-
1. Files that contain related code (with paths and line numbers)
|
|
90
|
-
2. Existing patterns used for similar features
|
|
91
|
-
3. Utility functions that might be relevant
|
|
92
|
-
4. How similar features are currently structured
|
|
93
|
-
5. Test file locations and patterns
|
|
94
|
-
|
|
95
|
-
DO NOT suggest what to build. Just report what's there.
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
**Agent 2: Documentation Research** (`explore-docs`)
|
|
99
|
-
```
|
|
100
|
-
Research documentation for libraries used in: {task_description}
|
|
101
|
-
|
|
102
|
-
Find:
|
|
103
|
-
1. How the relevant libraries/frameworks work
|
|
104
|
-
2. API documentation for tools being used
|
|
105
|
-
3. Best practices from official docs
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**Agent 3: Web Research** (`websearch`)
|
|
109
|
-
```
|
|
110
|
-
Search for context about: {task_description}
|
|
111
|
-
|
|
112
|
-
Find:
|
|
113
|
-
1. How this is typically implemented
|
|
114
|
-
2. Common patterns and approaches
|
|
115
|
-
3. Known pitfalls or gotchas
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### 4. Synthesize Findings
|
|
119
|
-
|
|
120
|
-
Combine results into structured context:
|
|
121
|
-
|
|
122
|
-
```markdown
|
|
123
|
-
## Codebase Context
|
|
124
|
-
|
|
125
|
-
### Related Files Found
|
|
126
|
-
| File | Lines | Contains |
|
|
127
|
-
|------|-------|----------|
|
|
128
|
-
| `src/auth/login.ts` | 1-150 | Existing login implementation |
|
|
129
|
-
| `src/utils/validate.ts` | 20-45 | Email validation helper |
|
|
130
|
-
|
|
131
|
-
### Patterns Observed
|
|
132
|
-
- **Route pattern**: Uses Next.js App Router with `route.ts`
|
|
133
|
-
- **Validation**: Uses zod schemas in `schemas/` folder
|
|
134
|
-
- **Error handling**: Throws custom ApiError classes
|
|
135
|
-
|
|
136
|
-
### Utilities Available
|
|
137
|
-
- `src/lib/auth.ts` - JWT sign/verify functions
|
|
138
|
-
- `src/lib/db.ts` - Prisma client instance
|
|
139
|
-
|
|
140
|
-
### Similar Implementations
|
|
141
|
-
- `src/auth/login.ts:42` - Login flow (reference for patterns)
|
|
142
|
-
|
|
143
|
-
### Test Patterns
|
|
144
|
-
- Tests in `__tests__/` folders
|
|
145
|
-
- Uses vitest with testing-library
|
|
146
|
-
|
|
147
|
-
## Documentation Insights
|
|
148
|
-
|
|
149
|
-
### Libraries Used
|
|
150
|
-
- **jose**: JWT library - uses `SignJWT` class
|
|
151
|
-
- **prisma**: ORM - uses `prisma.user.create()` pattern
|
|
152
|
-
|
|
153
|
-
## Research Findings
|
|
154
|
-
|
|
155
|
-
### Common Approaches
|
|
156
|
-
- Registration: validate -> hash -> create -> issue token
|
|
157
|
-
- Use httpOnly cookies for tokens
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### 5. Infer Acceptance Criteria
|
|
161
|
-
|
|
162
|
-
Based on task and context, infer success criteria:
|
|
163
|
-
|
|
164
|
-
```markdown
|
|
165
|
-
## Inferred Acceptance Criteria
|
|
166
|
-
|
|
167
|
-
Based on "{task_description}" and existing patterns:
|
|
168
|
-
|
|
169
|
-
- [ ] AC1: [specific measurable outcome]
|
|
170
|
-
- [ ] AC2: [specific measurable outcome]
|
|
171
|
-
- [ ] AC3: [specific measurable outcome]
|
|
172
|
-
|
|
173
|
-
_These will be refined in the planning step._
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### 6. Save Output (if save_mode)
|
|
177
|
-
|
|
178
|
-
**If `{save_mode}` = true:**
|
|
179
|
-
|
|
180
|
-
Write findings to `{output_dir}/01-analyze.md`:
|
|
181
|
-
- Include all sections above
|
|
182
|
-
- Add timestamp at the end
|
|
183
|
-
- Update 00-context.md Progress table: 01-analyze -> Complete
|
|
184
|
-
|
|
185
|
-
### 6b. Generate Context Digest (if save_mode)
|
|
186
|
-
|
|
187
|
-
**If `{save_mode}` = true:**
|
|
188
|
-
|
|
189
|
-
Generate a compact digest (max 50 lines) for inter-step context transfer.
|
|
190
|
-
Use the template from `_resources/context-digest-template.md`.
|
|
191
|
-
|
|
192
|
-
```markdown
|
|
193
|
-
## Context Digest — step-01-analyze
|
|
194
|
-
|
|
195
|
-
### Changes
|
|
196
|
-
- N/A (analysis only)
|
|
197
|
-
|
|
198
|
-
### Decisions
|
|
199
|
-
- {key architectural or approach decisions from analysis}
|
|
200
|
-
|
|
201
|
-
### Findings
|
|
202
|
-
- {most important files found with paths}
|
|
203
|
-
- {patterns identified, utilities available}
|
|
204
|
-
|
|
205
|
-
### State
|
|
206
|
-
- {acceptance_criteria}: [inferred list]
|
|
207
|
-
- Files analyzed: {count}
|
|
208
|
-
|
|
209
|
-
### Blockers
|
|
210
|
-
- {open questions or ambiguities}
|
|
211
|
-
|
|
212
|
-
### Next
|
|
213
|
-
- Step-02 should focus on: {key areas for planning}
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
Write digest to `{output_dir}/01-analyze-digest.md`
|
|
217
|
-
|
|
218
|
-
**Purpose:** Step-02 reads ONLY this digest (not the full 01-analyze.md) to minimize token usage.
|
|
219
|
-
Exception: If `{resume_task}` is set, read the full output instead.
|
|
220
|
-
|
|
221
|
-
### 7. Present Context Summary
|
|
222
|
-
|
|
223
|
-
```
|
|
224
|
-
**Context Gathering Complete**
|
|
225
|
-
|
|
226
|
-
**Files analyzed:** {count}
|
|
227
|
-
**Patterns identified:** {count}
|
|
228
|
-
**Utilities found:** {count}
|
|
229
|
-
|
|
230
|
-
**Key findings:**
|
|
231
|
-
- {summary of relevant files}
|
|
232
|
-
- {patterns that will guide implementation}
|
|
233
|
-
|
|
234
|
-
-> Proceeding to planning phase...
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
**Always proceed directly to step-02-plan.md**
|
|
238
|
-
|
|
239
|
-
---
|
|
240
|
-
|
|
241
|
-
## SUCCESS METRICS:
|
|
242
|
-
|
|
243
|
-
- Related files identified with paths and line numbers
|
|
244
|
-
- Existing patterns documented with specific examples
|
|
245
|
-
- Available utilities noted
|
|
246
|
-
- Dependencies listed
|
|
247
|
-
- Acceptance criteria inferred
|
|
248
|
-
- NO planning or implementation decisions made
|
|
249
|
-
|
|
250
|
-
## FAILURE MODES:
|
|
251
|
-
|
|
252
|
-
- Starting to plan or design (that's step 2!)
|
|
253
|
-
- Suggesting implementations or approaches
|
|
254
|
-
- Missing obvious related files
|
|
255
|
-
- Not documenting patterns with file:line references
|
|
256
|
-
- Launching agents sequentially instead of parallel
|
|
257
|
-
- Using subagents when economy_mode is true
|
|
258
|
-
|
|
259
|
-
---
|
|
260
|
-
|
|
261
|
-
## NEXT STEP:
|
|
262
|
-
|
|
263
|
-
Always proceed directly to `./step-02-plan.md` after presenting context summary.
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: step-02-plan
|
|
3
|
-
description: Strategic planning - create detailed file-by-file implementation strategy
|
|
4
|
-
prev_step: steps/step-01-analyze.md
|
|
5
|
-
next_step: steps/step-03-execute.md
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Step 2: Plan (Strategic Design)
|
|
9
|
-
|
|
10
|
-
## MANDATORY EXECUTION RULES:
|
|
11
|
-
|
|
12
|
-
- NEVER start implementing - that's step 3
|
|
13
|
-
- NEVER write or modify code in this step
|
|
14
|
-
- ALWAYS structure plan by FILE, not by feature
|
|
15
|
-
- ALWAYS include specific line numbers from analysis
|
|
16
|
-
- ALWAYS map acceptance criteria to file changes
|
|
17
|
-
- YOU ARE A PLANNER, not an implementer
|
|
18
|
-
- FORBIDDEN to use Edit, Write, or Bash tools
|
|
19
|
-
|
|
20
|
-
## YOUR TASK:
|
|
21
|
-
|
|
22
|
-
Transform analysis findings into a comprehensive, executable, file-by-file implementation plan.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
<available_state>
|
|
27
|
-
From previous steps:
|
|
28
|
-
|
|
29
|
-
| Variable | Description |
|
|
30
|
-
|----------|-------------|
|
|
31
|
-
| `{task_description}` | What to implement |
|
|
32
|
-
| `{task_id}` | Kebab-case identifier |
|
|
33
|
-
| `{acceptance_criteria}` | Success criteria from step-01 |
|
|
34
|
-
| `{auto_mode}` | Skip confirmations |
|
|
35
|
-
| `{save_mode}` | Save outputs to files |
|
|
36
|
-
| `{output_dir}` | Path to output (if save_mode) |
|
|
37
|
-
| Files found | From step-01 codebase exploration |
|
|
38
|
-
| Patterns | From step-01 pattern analysis |
|
|
39
|
-
| Utilities | From step-01 utility discovery |
|
|
40
|
-
</available_state>
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## EXECUTION SEQUENCE:
|
|
45
|
-
|
|
46
|
-
### 1. ULTRA THINK: Design Complete Strategy
|
|
47
|
-
|
|
48
|
-
**CRITICAL: Think through ENTIRE implementation before writing any plan.**
|
|
49
|
-
|
|
50
|
-
Mental simulation:
|
|
51
|
-
- Walk through the implementation step by step
|
|
52
|
-
- Identify all files that need changes
|
|
53
|
-
- Determine logical order (dependencies first)
|
|
54
|
-
- Consider edge cases and error handling
|
|
55
|
-
- Plan test coverage
|
|
56
|
-
|
|
57
|
-
### 2. Clarify Ambiguities
|
|
58
|
-
|
|
59
|
-
**If `{auto_mode}` = true:**
|
|
60
|
-
Use recommended option for any ambiguity, proceed automatically.
|
|
61
|
-
|
|
62
|
-
**If `{auto_mode}` = false AND multiple valid approaches exist:**
|
|
63
|
-
|
|
64
|
-
```yaml
|
|
65
|
-
questions:
|
|
66
|
-
- header: "Approach"
|
|
67
|
-
question: "Multiple approaches are possible. Which should we use?"
|
|
68
|
-
options:
|
|
69
|
-
- label: "Approach A (Recommended)"
|
|
70
|
-
description: "Description and tradeoffs of A"
|
|
71
|
-
- label: "Approach B"
|
|
72
|
-
description: "Description and tradeoffs of B"
|
|
73
|
-
- label: "Approach C"
|
|
74
|
-
description: "Description and tradeoffs of C"
|
|
75
|
-
multiSelect: false
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### 3. Create Detailed Plan
|
|
79
|
-
|
|
80
|
-
**Structure by FILE, not by feature:**
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
## Implementation Plan: {task_description}
|
|
84
|
-
|
|
85
|
-
### Overview
|
|
86
|
-
[1-2 sentences: High-level strategy and approach]
|
|
87
|
-
|
|
88
|
-
### Prerequisites
|
|
89
|
-
- [ ] Prerequisite 1 (if any)
|
|
90
|
-
- [ ] Prerequisite 2 (if any)
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
### File Changes
|
|
95
|
-
|
|
96
|
-
#### `src/path/file1.ts`
|
|
97
|
-
- Add `functionName` that handles X
|
|
98
|
-
- Extract logic from Y (follow pattern in `example.ts:45`)
|
|
99
|
-
- Handle error case: [specific scenario]
|
|
100
|
-
- Consider: [edge case or important context]
|
|
101
|
-
|
|
102
|
-
#### `src/path/file2.ts`
|
|
103
|
-
- Update imports to include new module
|
|
104
|
-
- Call `functionName` in existing flow at line ~42
|
|
105
|
-
- Update types: Add `NewType` interface
|
|
106
|
-
|
|
107
|
-
#### `src/path/file3.ts` (NEW FILE)
|
|
108
|
-
- Create utility for Z
|
|
109
|
-
- Export: `utilityFunction`, `HelperType`
|
|
110
|
-
- Pattern: Follow `similar-util.ts` structure
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
### Testing Strategy
|
|
115
|
-
|
|
116
|
-
**New tests:**
|
|
117
|
-
- `src/path/file1.test.ts` - Test functionName with:
|
|
118
|
-
- Happy path
|
|
119
|
-
- Error case
|
|
120
|
-
- Edge case
|
|
121
|
-
|
|
122
|
-
**Update existing:**
|
|
123
|
-
- `src/path/existing.test.ts` - Add test for new flow
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
### Acceptance Criteria Mapping
|
|
128
|
-
- [ ] AC1: Satisfied by changes in `file1.ts`
|
|
129
|
-
- [ ] AC2: Satisfied by changes in `file2.ts`
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
### Risks & Considerations
|
|
134
|
-
- Risk 1: [potential issue and mitigation]
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### 4. Verify Plan Completeness
|
|
138
|
-
|
|
139
|
-
Checklist:
|
|
140
|
-
- [ ] All files identified - nothing missing
|
|
141
|
-
- [ ] Logical order - dependencies handled first
|
|
142
|
-
- [ ] Clear actions - every step specific and actionable
|
|
143
|
-
- [ ] Test coverage - all paths have test strategy
|
|
144
|
-
- [ ] In scope - no scope creep
|
|
145
|
-
- [ ] AC mapped - every criterion has implementation
|
|
146
|
-
|
|
147
|
-
### 5. Save Plan (if save_mode)
|
|
148
|
-
|
|
149
|
-
**If `{save_mode}` = true:**
|
|
150
|
-
|
|
151
|
-
Write plan to `{output_dir}/02-plan.md`:
|
|
152
|
-
- Include full plan above
|
|
153
|
-
- Add timestamp
|
|
154
|
-
- Update 00-context.md Progress table: 02-plan -> Complete
|
|
155
|
-
|
|
156
|
-
### 5b. Generate Context Digest (if save_mode)
|
|
157
|
-
|
|
158
|
-
**If `{save_mode}` = true:**
|
|
159
|
-
|
|
160
|
-
Generate a compact digest (max 50 lines) for inter-step context transfer.
|
|
161
|
-
Use the template from `_resources/context-digest-template.md`.
|
|
162
|
-
|
|
163
|
-
```markdown
|
|
164
|
-
## Context Digest — step-02-plan
|
|
165
|
-
|
|
166
|
-
### Changes
|
|
167
|
-
- {files planned for modification with summary}
|
|
168
|
-
|
|
169
|
-
### Decisions
|
|
170
|
-
- {approach chosen and why}
|
|
171
|
-
- {key design decisions}
|
|
172
|
-
|
|
173
|
-
### Findings
|
|
174
|
-
- {risks identified}
|
|
175
|
-
- {dependencies between files}
|
|
176
|
-
|
|
177
|
-
### State
|
|
178
|
-
- Plan approved: {yes/no}
|
|
179
|
-
- Files to modify: {count}
|
|
180
|
-
- New files: {count}
|
|
181
|
-
|
|
182
|
-
### Blockers
|
|
183
|
-
- {any user questions pending}
|
|
184
|
-
|
|
185
|
-
### Next
|
|
186
|
-
- Step-03 should implement files in this order: {ordered list}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Write digest to `{output_dir}/02-plan-digest.md`
|
|
190
|
-
|
|
191
|
-
**Purpose:** Step-03 reads ONLY this digest + the plan structure (not full analysis) to minimize token usage.
|
|
192
|
-
Exception: If `{resume_task}` is set, read the full outputs instead.
|
|
193
|
-
|
|
194
|
-
### 6. Present Plan for Approval
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
**Implementation Plan Ready**
|
|
198
|
-
|
|
199
|
-
**Overview:** [1 sentence summary]
|
|
200
|
-
|
|
201
|
-
**Files to modify:** {count} files
|
|
202
|
-
**New files:** {count} files
|
|
203
|
-
**Tests:** {count} test files
|
|
204
|
-
|
|
205
|
-
**Estimated changes:**
|
|
206
|
-
- `file1.ts` - Major changes (add function, handle errors)
|
|
207
|
-
- `file2.ts` - Minor changes (imports, single call)
|
|
208
|
-
- `file1.test.ts` - New test file
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
**If `{auto_mode}` = true:**
|
|
212
|
-
Skip confirmation, proceed directly to execution.
|
|
213
|
-
|
|
214
|
-
**If `{auto_mode}` = false:**
|
|
215
|
-
|
|
216
|
-
```yaml
|
|
217
|
-
questions:
|
|
218
|
-
- header: "Plan"
|
|
219
|
-
question: "Review the implementation plan. Ready to proceed?"
|
|
220
|
-
options:
|
|
221
|
-
- label: "Approve and execute (Recommended)"
|
|
222
|
-
description: "Plan looks good, start implementation"
|
|
223
|
-
- label: "Adjust plan"
|
|
224
|
-
description: "I want to modify specific parts"
|
|
225
|
-
- label: "Ask questions"
|
|
226
|
-
description: "I have questions about the plan"
|
|
227
|
-
- label: "Start over"
|
|
228
|
-
description: "Revise the entire plan"
|
|
229
|
-
multiSelect: false
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
---
|
|
233
|
-
|
|
234
|
-
## SUCCESS METRICS:
|
|
235
|
-
|
|
236
|
-
- Complete file-by-file plan created
|
|
237
|
-
- Logical dependency order established
|
|
238
|
-
- All acceptance criteria mapped to changes
|
|
239
|
-
- Test strategy defined
|
|
240
|
-
- User approved plan (or auto-approved)
|
|
241
|
-
- NO code written or modified
|
|
242
|
-
|
|
243
|
-
## FAILURE MODES:
|
|
244
|
-
|
|
245
|
-
- Organizing by feature instead of file
|
|
246
|
-
- Vague actions like "add feature" or "fix issue"
|
|
247
|
-
- Missing test strategy
|
|
248
|
-
- Not mapping to acceptance criteria
|
|
249
|
-
- Starting to write code (that's step 3!)
|
|
250
|
-
|
|
251
|
-
---
|
|
252
|
-
|
|
253
|
-
## NEXT STEP:
|
|
254
|
-
|
|
255
|
-
After user approves (or auto-proceed), load `./step-03-execute.md`
|