specsmd 0.0.0-dev.6 → 0.0.0-dev.61
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 +10 -2
- package/flows/aidlc/commands/construction-agent.md +5 -1
- package/flows/aidlc/commands/inception-agent.md +4 -0
- package/flows/aidlc/commands/master-agent.md +4 -0
- package/flows/aidlc/commands/operations-agent.md +4 -0
- package/flows/aidlc/memory-bank.yaml +2 -1
- package/{scripts → flows/aidlc/scripts}/artifact-validator.js +3 -3
- package/{scripts → flows/aidlc/scripts}/bolt-complete.js +35 -4
- package/{scripts → flows/aidlc/scripts}/status-integrity.js +4 -4
- package/flows/aidlc/skills/construction/bolt-list.md +1 -1
- package/flows/aidlc/skills/construction/bolt-start.md +2 -2
- package/flows/aidlc/skills/construction/bolt-status.md +1 -1
- package/flows/aidlc/skills/construction/prototype-apply.md +305 -0
- package/flows/aidlc/skills/inception/bolt-plan.md +15 -2
- package/flows/aidlc/skills/inception/vibe-to-spec.md +406 -0
- package/flows/aidlc/skills/master/analyze-context.md +1 -1
- package/flows/aidlc/templates/construction/bolt-template.md +22 -1
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +73 -11
- package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +5 -0
- package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
- package/flows/fire/README.md +19 -0
- package/flows/fire/agents/builder/agent.md +275 -0
- package/flows/fire/agents/builder/skills/code-review/SKILL.md +266 -0
- package/flows/fire/agents/builder/skills/code-review/references/auto-fix-rules.md +212 -0
- package/flows/fire/agents/builder/skills/code-review/references/review-categories.md +154 -0
- package/flows/fire/agents/builder/skills/code-review/templates/review-report.md.hbs +120 -0
- package/flows/fire/agents/builder/skills/run-execute/SKILL.md +503 -0
- package/flows/fire/agents/builder/skills/run-execute/scripts/complete-run.js +549 -0
- package/flows/fire/agents/builder/skills/run-execute/scripts/init-run.js +454 -0
- package/flows/fire/agents/builder/skills/run-execute/templates/plan.md.hbs +61 -0
- package/flows/fire/agents/builder/skills/run-execute/templates/test-report.md.hbs +81 -0
- package/flows/fire/agents/builder/skills/run-plan/SKILL.md +376 -0
- package/flows/fire/agents/builder/skills/run-status/SKILL.md +94 -0
- package/flows/fire/agents/builder/skills/walkthrough-generate/SKILL.md +140 -0
- package/flows/fire/agents/builder/skills/walkthrough-generate/scripts/render-walkthrough.ts +755 -0
- package/flows/fire/agents/builder/skills/walkthrough-generate/templates/walkthrough.md.hbs +77 -0
- package/flows/fire/agents/orchestrator/agent.md +113 -0
- package/flows/fire/agents/orchestrator/skills/project-init/SKILL.md +150 -0
- package/flows/fire/agents/orchestrator/skills/project-init/templates/coding-standards.md.hbs +149 -0
- package/flows/fire/agents/orchestrator/skills/project-init/templates/system-architecture.md.hbs +101 -0
- package/flows/fire/agents/orchestrator/skills/project-init/templates/tech-stack.md.hbs +136 -0
- package/flows/fire/agents/orchestrator/skills/project-init/templates/testing-standards.md.hbs +94 -0
- package/flows/fire/agents/orchestrator/skills/route/SKILL.md +123 -0
- package/flows/fire/agents/orchestrator/skills/status/SKILL.md +99 -0
- package/flows/fire/agents/planner/agent.md +122 -0
- package/flows/fire/agents/planner/skills/design-doc-generate/SKILL.md +213 -0
- package/flows/fire/agents/planner/skills/design-doc-generate/templates/design.md.hbs +76 -0
- package/flows/fire/agents/planner/skills/intent-capture/SKILL.md +155 -0
- package/flows/fire/agents/planner/skills/intent-capture/templates/brief.md.hbs +40 -0
- package/flows/fire/agents/planner/skills/work-item-decompose/SKILL.md +194 -0
- package/flows/fire/agents/planner/skills/work-item-decompose/templates/work-item.md.hbs +40 -0
- package/flows/fire/commands/fire-builder.md +56 -0
- package/flows/fire/commands/fire-planner.md +48 -0
- package/flows/fire/commands/fire.md +46 -0
- package/flows/fire/memory-bank.yaml +164 -0
- package/flows/fire/quick-start.md +130 -0
- package/flows/simple/README.md +190 -0
- package/flows/simple/agents/agent.md +404 -0
- package/flows/simple/commands/agent.md +60 -0
- package/flows/simple/context-config.yaml +34 -0
- package/flows/simple/memory-bank.yaml +66 -0
- package/flows/simple/quick-start.md +231 -0
- package/flows/simple/skills/design.md +96 -0
- package/flows/simple/skills/execute.md +190 -0
- package/flows/simple/skills/requirements.md +94 -0
- package/flows/simple/skills/tasks.md +136 -0
- package/flows/simple/templates/design-template.md +138 -0
- package/flows/simple/templates/requirements-template.md +85 -0
- package/flows/simple/templates/tasks-template.md +104 -0
- package/lib/analytics/tracker.js +6 -2
- package/lib/constants.js +17 -8
- package/lib/installer.js +5 -15
- package/lib/installers/KiroInstaller.js +55 -0
- package/lib/installers/OpenCodeInstaller.js +9 -1
- package/lib/installers/ToolInstaller.js +4 -1
- package/lib/installers/WindsurfInstaller.js +0 -54
- package/package.json +3 -52
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
# Skill: Run Execute
|
|
2
|
+
|
|
3
|
+
Execute work items based on their assigned mode (autopilot, confirm, validate).
|
|
4
|
+
Supports both single-item and multi-item (batch/wide) runs.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
Before executing scripts, ensure required dependencies are installed:
|
|
11
|
+
|
|
12
|
+
```xml
|
|
13
|
+
<prerequisite-check>
|
|
14
|
+
<step n="1" title="Check yaml Package">
|
|
15
|
+
<action>Run: npm list yaml --depth=0 2>/dev/null || echo "NOT_FOUND"</action>
|
|
16
|
+
<check if="output contains NOT_FOUND">
|
|
17
|
+
<output>
|
|
18
|
+
Installing required dependency: yaml
|
|
19
|
+
</output>
|
|
20
|
+
<action>Run: npm install yaml</action>
|
|
21
|
+
</check>
|
|
22
|
+
</step>
|
|
23
|
+
</prerequisite-check>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Required packages:**
|
|
27
|
+
| Package | Purpose | Install Command |
|
|
28
|
+
|---------|---------|-----------------|
|
|
29
|
+
| `yaml` | Parse/stringify state.yaml | `npm install yaml` |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Trigger
|
|
34
|
+
|
|
35
|
+
- Pending work item ready for execution
|
|
36
|
+
- Resumed from interrupted run
|
|
37
|
+
- Batch of work items passed from run-plan
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Degrees of Freedom
|
|
42
|
+
|
|
43
|
+
**Varies by mode**:
|
|
44
|
+
- Autopilot: LOW — Execute standard patterns decisively
|
|
45
|
+
- Confirm: MEDIUM — Present plan, adjust based on feedback
|
|
46
|
+
- Validate: LOW — Follow approved design precisely
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Critical Requirements
|
|
51
|
+
|
|
52
|
+
### MUST Use Scripts - Never Bypass
|
|
53
|
+
|
|
54
|
+
**CRITICAL**: You MUST call the scripts. DO NOT use mkdir or manual file creation.
|
|
55
|
+
|
|
56
|
+
| Action | CORRECT | WRONG |
|
|
57
|
+
|--------|---------|-------|
|
|
58
|
+
| Initialize run | `node scripts/init-run.js ...` | `mkdir .specs-fire/runs/run-001` |
|
|
59
|
+
| Complete item | `node scripts/complete-run.js ... --complete-item` | Manual state editing |
|
|
60
|
+
| Complete run | `node scripts/complete-run.js ... --complete-run` | Manual state editing |
|
|
61
|
+
|
|
62
|
+
The scripts:
|
|
63
|
+
- Create run folder AND run.md together
|
|
64
|
+
- Update state.yaml atomically
|
|
65
|
+
- Track run history in runs.completed
|
|
66
|
+
- Handle batch run state transitions
|
|
67
|
+
|
|
68
|
+
### Batch Run Execution Flow
|
|
69
|
+
|
|
70
|
+
For runs with multiple work items:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
1. Call init-run.js ONCE at start (creates run.md with ALL items)
|
|
74
|
+
2. Execute each work item sequentially:
|
|
75
|
+
- Load item context
|
|
76
|
+
- Execute based on mode (autopilot/confirm/validate)
|
|
77
|
+
- Call complete-run.js --complete-item after each
|
|
78
|
+
3. Call complete-run.js --complete-run after final item
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Workflow
|
|
84
|
+
|
|
85
|
+
```xml
|
|
86
|
+
<skill name="run-execute">
|
|
87
|
+
|
|
88
|
+
<mandate>
|
|
89
|
+
USE SCRIPTS — Never bypass init-run.js or complete-run.js.
|
|
90
|
+
ALWAYS CREATE plan.md — Create plan BEFORE implementation starts (all modes).
|
|
91
|
+
ALWAYS CREATE test-report.md — Create test report AFTER tests complete.
|
|
92
|
+
TRACK ALL FILE OPERATIONS — Every create, modify must be recorded.
|
|
93
|
+
NEVER skip tests — Tests are mandatory, not optional.
|
|
94
|
+
FOLLOW BROWNFIELD RULES — Read before write, match existing patterns.
|
|
95
|
+
</mandate>
|
|
96
|
+
|
|
97
|
+
<artifact-timing critical="true">
|
|
98
|
+
Artifacts MUST be created at these points:
|
|
99
|
+
| Artifact | When Created | Created By |
|
|
100
|
+
|----------|--------------|------------|
|
|
101
|
+
| run.md | Start of run | init-run.js script |
|
|
102
|
+
| plan.md | BEFORE implementation (Step 4) | Agent using template |
|
|
103
|
+
| test-report.md | AFTER tests pass (Step 6) | Agent using template |
|
|
104
|
+
| walkthrough.md | After run completes (Step 8) | walkthrough-generate skill |
|
|
105
|
+
|
|
106
|
+
For batch runs: Append each work item's section to plan.md and test-report.md.
|
|
107
|
+
</artifact-timing>
|
|
108
|
+
|
|
109
|
+
<step n="1" title="Initialize Run">
|
|
110
|
+
<critical>
|
|
111
|
+
MUST call init-run.js script. DO NOT use mkdir directly.
|
|
112
|
+
The script creates BOTH the folder AND run.md file.
|
|
113
|
+
</critical>
|
|
114
|
+
|
|
115
|
+
<action>Prepare work items JSON array:</action>
|
|
116
|
+
<code>
|
|
117
|
+
# For single item:
|
|
118
|
+
node scripts/init-run.js {rootPath} {workItemId} {intentId} {mode}
|
|
119
|
+
|
|
120
|
+
# For batch/wide (multiple items):
|
|
121
|
+
node scripts/init-run.js {rootPath} --batch '[
|
|
122
|
+
{"id": "item-1", "intent": "intent-1", "mode": "autopilot"},
|
|
123
|
+
{"id": "item-2", "intent": "intent-1", "mode": "confirm"}
|
|
124
|
+
]' --scope=batch
|
|
125
|
+
</code>
|
|
126
|
+
|
|
127
|
+
<action>Parse script output for runId and runPath</action>
|
|
128
|
+
<action>Verify run.md was created in .specs-fire/runs/{run-id}/</action>
|
|
129
|
+
|
|
130
|
+
<check if="run.md not found">
|
|
131
|
+
<error>init-run.js failed to create run.md. Check script output.</error>
|
|
132
|
+
</check>
|
|
133
|
+
</step>
|
|
134
|
+
|
|
135
|
+
<step n="2" title="Execute Work Items Loop">
|
|
136
|
+
<note>For batch runs, repeat steps 2-6 for each work item</note>
|
|
137
|
+
|
|
138
|
+
<action>Get current_item from state.yaml active_run</action>
|
|
139
|
+
<action>Load work item from .specs-fire/intents/{intent}/work-items/{id}.md</action>
|
|
140
|
+
<action>Read intent brief for broader context</action>
|
|
141
|
+
<action>Load ALL project standards:</action>
|
|
142
|
+
<substep>.specs-fire/standards/tech-stack.md — Technology choices</substep>
|
|
143
|
+
<substep>.specs-fire/standards/coding-standards.md — Code style and patterns</substep>
|
|
144
|
+
<substep>.specs-fire/standards/testing-standards.md — Testing strategy and coverage</substep>
|
|
145
|
+
<substep>.specs-fire/standards/system-architecture.md — Architecture context and constraints</substep>
|
|
146
|
+
<action>Determine execution mode from work item</action>
|
|
147
|
+
</step>
|
|
148
|
+
|
|
149
|
+
<step n="3a" title="Autopilot Mode" if="mode == autopilot">
|
|
150
|
+
<output>
|
|
151
|
+
Executing in Autopilot mode (0 checkpoints).
|
|
152
|
+
Work item: {title}
|
|
153
|
+
</output>
|
|
154
|
+
<goto step="4"/>
|
|
155
|
+
</step>
|
|
156
|
+
|
|
157
|
+
<step n="3b" title="Confirm Mode" if="mode == confirm">
|
|
158
|
+
<action>Generate implementation plan</action>
|
|
159
|
+
<action>Save plan IMMEDIATELY using template: templates/plan.md.hbs</action>
|
|
160
|
+
<action>Write to: .specs-fire/runs/{run-id}/plan.md</action>
|
|
161
|
+
<output>
|
|
162
|
+
Plan saved to: .specs-fire/runs/{run-id}/plan.md
|
|
163
|
+
</output>
|
|
164
|
+
<checkpoint>
|
|
165
|
+
<output>
|
|
166
|
+
## Implementation Plan for "{title}"
|
|
167
|
+
|
|
168
|
+
### Approach
|
|
169
|
+
{describe approach}
|
|
170
|
+
|
|
171
|
+
### Files to Create
|
|
172
|
+
{list files}
|
|
173
|
+
|
|
174
|
+
### Files to Modify
|
|
175
|
+
{list files}
|
|
176
|
+
|
|
177
|
+
### Tests
|
|
178
|
+
{list test files}
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
Approve plan? [Y/n/edit]
|
|
182
|
+
</output>
|
|
183
|
+
</checkpoint>
|
|
184
|
+
<check if="response == edit">
|
|
185
|
+
<ask>What changes to the plan?</ask>
|
|
186
|
+
<action>Adjust plan</action>
|
|
187
|
+
<action>Update plan.md with changes</action>
|
|
188
|
+
<goto step="3b"/>
|
|
189
|
+
</check>
|
|
190
|
+
<goto step="5"/>
|
|
191
|
+
</step>
|
|
192
|
+
|
|
193
|
+
<step n="3c" title="Validate Mode" if="mode == validate">
|
|
194
|
+
<action>Load design doc from .specs-fire/intents/{intent}/work-items/{id}-design.md</action>
|
|
195
|
+
<action>Generate implementation plan based on design</action>
|
|
196
|
+
<action>Save plan IMMEDIATELY using template: templates/plan.md.hbs</action>
|
|
197
|
+
<action>Write to: .specs-fire/runs/{run-id}/plan.md</action>
|
|
198
|
+
<action>Include reference to design doc in plan</action>
|
|
199
|
+
<output>
|
|
200
|
+
Plan saved to: .specs-fire/runs/{run-id}/plan.md
|
|
201
|
+
</output>
|
|
202
|
+
<checkpoint>
|
|
203
|
+
<output>
|
|
204
|
+
## Implementation Plan for "{title}"
|
|
205
|
+
|
|
206
|
+
Based on approved design document.
|
|
207
|
+
|
|
208
|
+
### Implementation Checklist
|
|
209
|
+
{from design doc}
|
|
210
|
+
|
|
211
|
+
### Files to Create
|
|
212
|
+
{list files}
|
|
213
|
+
|
|
214
|
+
### Files to Modify
|
|
215
|
+
{list files}
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
This is Checkpoint 2 of Validate mode.
|
|
219
|
+
Approve implementation plan? [Y/n/edit]
|
|
220
|
+
</output>
|
|
221
|
+
</checkpoint>
|
|
222
|
+
<check if="response == edit">
|
|
223
|
+
<ask>What changes to the plan?</ask>
|
|
224
|
+
<action>Adjust plan</action>
|
|
225
|
+
<action>Update plan.md with changes</action>
|
|
226
|
+
<goto step="3c"/>
|
|
227
|
+
</check>
|
|
228
|
+
<goto step="5"/>
|
|
229
|
+
</step>
|
|
230
|
+
|
|
231
|
+
<step n="4" title="Generate Plan (Autopilot Only)" if="mode == autopilot">
|
|
232
|
+
<note>Confirm and Validate modes already saved plan in Step 3b/3c</note>
|
|
233
|
+
<action>Generate implementation plan</action>
|
|
234
|
+
<action>Save plan using template: templates/plan.md.hbs</action>
|
|
235
|
+
<action>Write to: .specs-fire/runs/{run-id}/plan.md</action>
|
|
236
|
+
<output>
|
|
237
|
+
Plan saved to: .specs-fire/runs/{run-id}/plan.md
|
|
238
|
+
(Autopilot mode - continuing without checkpoint)
|
|
239
|
+
</output>
|
|
240
|
+
<note>No checkpoint in autopilot - human can review plan.md while agent works</note>
|
|
241
|
+
</step>
|
|
242
|
+
|
|
243
|
+
<step n="5" title="Execute Implementation">
|
|
244
|
+
<action>For each planned change:</action>
|
|
245
|
+
<substep n="5a">Implement the change</substep>
|
|
246
|
+
<substep n="5b">Track file operation (create/modify)</substep>
|
|
247
|
+
<substep n="5c">Record decisions made</substep>
|
|
248
|
+
|
|
249
|
+
<brownfield-rules>
|
|
250
|
+
<rule>READ existing code before modifying</rule>
|
|
251
|
+
<rule>MATCH existing naming conventions</rule>
|
|
252
|
+
<rule>FOLLOW existing patterns in the codebase</rule>
|
|
253
|
+
<rule>PRESERVE existing tests</rule>
|
|
254
|
+
</brownfield-rules>
|
|
255
|
+
</step>
|
|
256
|
+
|
|
257
|
+
<step n="6" title="Run Tests">
|
|
258
|
+
<action>Load testing standards from .specs-fire/standards/testing-standards.md</action>
|
|
259
|
+
<action>Write tests following testing standards:</action>
|
|
260
|
+
<substep>Unit tests for new/modified functions</substep>
|
|
261
|
+
<substep>Integration tests for API endpoints or workflows</substep>
|
|
262
|
+
<substep>Follow test naming and structure conventions</substep>
|
|
263
|
+
|
|
264
|
+
<action>Run test suite</action>
|
|
265
|
+
<check if="tests fail">
|
|
266
|
+
<output>
|
|
267
|
+
Tests failed. Fixing issues...
|
|
268
|
+
</output>
|
|
269
|
+
<action>Fix failing tests</action>
|
|
270
|
+
<action>Re-run tests</action>
|
|
271
|
+
</check>
|
|
272
|
+
|
|
273
|
+
<action>Validate acceptance criteria from work item</action>
|
|
274
|
+
|
|
275
|
+
<critical>Create test report AFTER tests pass</critical>
|
|
276
|
+
<action>Generate test report using template: templates/test-report.md.hbs</action>
|
|
277
|
+
<action>Write to: .specs-fire/runs/{run-id}/test-report.md</action>
|
|
278
|
+
<action>Include in test report:</action>
|
|
279
|
+
<substep>Test results summary (passed/failed/skipped)</substep>
|
|
280
|
+
<substep>Code coverage percentage</substep>
|
|
281
|
+
<substep>Acceptance criteria validation results</substep>
|
|
282
|
+
<substep>Any test warnings or notes</substep>
|
|
283
|
+
<output>
|
|
284
|
+
Test report saved to: .specs-fire/runs/{run-id}/test-report.md
|
|
285
|
+
</output>
|
|
286
|
+
</step>
|
|
287
|
+
|
|
288
|
+
<step n="6b" title="Code Review">
|
|
289
|
+
<note>Run code review as subagent after tests pass</note>
|
|
290
|
+
|
|
291
|
+
<action>Invoke code-review skill with context:</action>
|
|
292
|
+
<code>
|
|
293
|
+
invoke-skill: code-review
|
|
294
|
+
context:
|
|
295
|
+
files_created: {files_created}
|
|
296
|
+
files_modified: {files_modified}
|
|
297
|
+
run_id: {run_id}
|
|
298
|
+
intent_id: {intent_id}
|
|
299
|
+
</code>
|
|
300
|
+
|
|
301
|
+
<invoke-skill>code-review</invoke-skill>
|
|
302
|
+
|
|
303
|
+
<note>
|
|
304
|
+
Code review skill will:
|
|
305
|
+
1. Review all files created/modified in this work item
|
|
306
|
+
2. Auto-fix no-brainer issues (unused imports, console.log, etc.)
|
|
307
|
+
3. Present suggestions requiring approval
|
|
308
|
+
4. Create review-report.md artifact
|
|
309
|
+
</note>
|
|
310
|
+
|
|
311
|
+
<check if="code-review returns suggestions">
|
|
312
|
+
<note>User interaction happens within code-review skill</note>
|
|
313
|
+
<action>Wait for code-review skill to complete</action>
|
|
314
|
+
</check>
|
|
315
|
+
|
|
316
|
+
<check if="code-review applied fixes">
|
|
317
|
+
<action>Re-run tests to verify fixes didn't break anything</action>
|
|
318
|
+
<check if="tests fail">
|
|
319
|
+
<output>
|
|
320
|
+
Code review fixes caused test failure. Reverting...
|
|
321
|
+
</output>
|
|
322
|
+
<action>Revert code review changes</action>
|
|
323
|
+
<action>Re-run tests to confirm passing</action>
|
|
324
|
+
</check>
|
|
325
|
+
</check>
|
|
326
|
+
|
|
327
|
+
<output>
|
|
328
|
+
Code review complete.
|
|
329
|
+
Review report: .specs-fire/runs/{run-id}/review-report.md
|
|
330
|
+
</output>
|
|
331
|
+
</step>
|
|
332
|
+
|
|
333
|
+
<step n="7" title="Complete Current Work Item">
|
|
334
|
+
<critical>
|
|
335
|
+
MUST call complete-run.js script. Check if more items remain.
|
|
336
|
+
</critical>
|
|
337
|
+
|
|
338
|
+
<check if="batch run with more items pending">
|
|
339
|
+
<action>Call complete-run.js with --complete-item flag:</action>
|
|
340
|
+
<code>
|
|
341
|
+
node scripts/complete-run.js {rootPath} {runId} --complete-item
|
|
342
|
+
</code>
|
|
343
|
+
<action>Parse output for nextItem</action>
|
|
344
|
+
<output>
|
|
345
|
+
Work item {current_item} complete.
|
|
346
|
+
Next: {nextItem}
|
|
347
|
+
</output>
|
|
348
|
+
<goto step="2">Continue with next work item</goto>
|
|
349
|
+
</check>
|
|
350
|
+
|
|
351
|
+
<check if="last item or single item run">
|
|
352
|
+
<action>Call complete-run.js with --complete-run flag:</action>
|
|
353
|
+
<code>
|
|
354
|
+
node scripts/complete-run.js {rootPath} {runId} --complete-run \
|
|
355
|
+
--files-created='[{"path":"...","purpose":"..."}]' \
|
|
356
|
+
--files-modified='[{"path":"...","changes":"..."}]' \
|
|
357
|
+
--tests=5 --coverage=85
|
|
358
|
+
</code>
|
|
359
|
+
<goto step="8"/>
|
|
360
|
+
</check>
|
|
361
|
+
</step>
|
|
362
|
+
|
|
363
|
+
<step n="8" title="Generate Walkthrough">
|
|
364
|
+
<invoke-skill>walkthrough-generate</invoke-skill>
|
|
365
|
+
</step>
|
|
366
|
+
|
|
367
|
+
<step n="9" title="Report Completion">
|
|
368
|
+
<output>
|
|
369
|
+
Run {run-id} completed.
|
|
370
|
+
|
|
371
|
+
Work items completed: {count}
|
|
372
|
+
Files created: {count}
|
|
373
|
+
Files modified: {count}
|
|
374
|
+
Tests added: {count}
|
|
375
|
+
|
|
376
|
+
Artifacts:
|
|
377
|
+
- Run Log: .specs-fire/runs/{run-id}/run.md
|
|
378
|
+
- Plan: .specs-fire/runs/{run-id}/plan.md
|
|
379
|
+
- Test Report: .specs-fire/runs/{run-id}/test-report.md
|
|
380
|
+
- Code Review: .specs-fire/runs/{run-id}/review-report.md
|
|
381
|
+
- Walkthrough: .specs-fire/runs/{run-id}/walkthrough.md
|
|
382
|
+
</output>
|
|
383
|
+
</step>
|
|
384
|
+
|
|
385
|
+
</skill>
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## Scripts
|
|
391
|
+
|
|
392
|
+
| Script | Purpose | Usage |
|
|
393
|
+
|--------|---------|-------|
|
|
394
|
+
| `scripts/init-run.js` | Initialize run record and folder | Creates run.md with all work items |
|
|
395
|
+
| `scripts/complete-run.js` | Finalize run and update state | `--complete-item` or `--complete-run` |
|
|
396
|
+
|
|
397
|
+
### init-run.js Usage
|
|
398
|
+
|
|
399
|
+
```bash
|
|
400
|
+
# Single work item
|
|
401
|
+
node scripts/init-run.js /project work-item-id intent-id autopilot
|
|
402
|
+
|
|
403
|
+
# Batch/wide (multiple items)
|
|
404
|
+
node scripts/init-run.js /project --batch '[
|
|
405
|
+
{"id": "wi-1", "intent": "int-1", "mode": "autopilot"},
|
|
406
|
+
{"id": "wi-2", "intent": "int-1", "mode": "confirm"}
|
|
407
|
+
]' --scope=batch
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
**Output:**
|
|
411
|
+
```json
|
|
412
|
+
{
|
|
413
|
+
"success": true,
|
|
414
|
+
"runId": "run-001",
|
|
415
|
+
"runPath": "/project/.specs-fire/runs/run-001",
|
|
416
|
+
"scope": "batch",
|
|
417
|
+
"workItems": [...],
|
|
418
|
+
"currentItem": "wi-1"
|
|
419
|
+
}
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### complete-run.js Usage
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
# Complete current item (batch runs - moves to next item)
|
|
426
|
+
node scripts/complete-run.js /project run-001 --complete-item
|
|
427
|
+
|
|
428
|
+
# Complete entire run (single runs or final item in batch)
|
|
429
|
+
node scripts/complete-run.js /project run-001 --complete-run \
|
|
430
|
+
--files-created='[{"path":"src/new.ts","purpose":"New feature"}]' \
|
|
431
|
+
--files-modified='[{"path":"src/old.ts","changes":"Added import"}]' \
|
|
432
|
+
--tests=5 --coverage=85
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
**--complete-item Output:**
|
|
436
|
+
```json
|
|
437
|
+
{
|
|
438
|
+
"success": true,
|
|
439
|
+
"runId": "run-001",
|
|
440
|
+
"completedItem": "wi-1",
|
|
441
|
+
"nextItem": "wi-2",
|
|
442
|
+
"remainingItems": 1,
|
|
443
|
+
"allItemsCompleted": false
|
|
444
|
+
}
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
**--complete-run Output:**
|
|
448
|
+
```json
|
|
449
|
+
{
|
|
450
|
+
"success": true,
|
|
451
|
+
"runId": "run-001",
|
|
452
|
+
"scope": "batch",
|
|
453
|
+
"workItemsCompleted": 2,
|
|
454
|
+
"completedAt": "2026-01-20T..."
|
|
455
|
+
}
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
460
|
+
## File Tracking Format
|
|
461
|
+
|
|
462
|
+
```yaml
|
|
463
|
+
files_created:
|
|
464
|
+
- path: src/auth/login.ts
|
|
465
|
+
purpose: Login endpoint handler
|
|
466
|
+
|
|
467
|
+
files_modified:
|
|
468
|
+
- path: src/routes/index.ts
|
|
469
|
+
changes: Added login route
|
|
470
|
+
|
|
471
|
+
decisions:
|
|
472
|
+
- decision: Use JWT for tokens
|
|
473
|
+
rationale: Stateless, works with load balancer
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## Run Folder Structure
|
|
479
|
+
|
|
480
|
+
After init-run.js creates a run:
|
|
481
|
+
|
|
482
|
+
```
|
|
483
|
+
.specs-fire/runs/run-001/
|
|
484
|
+
├── run.md # Created by init-run.js, updated by complete-run.js
|
|
485
|
+
├── plan.md # Created BEFORE implementation (ALL modes - required)
|
|
486
|
+
├── test-report.md # Created AFTER tests pass (required)
|
|
487
|
+
├── review-report.md # Created by code-review skill (Step 6b)
|
|
488
|
+
└── walkthrough.md # Created by walkthrough-generate skill
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
**Artifact Creation Timeline:**
|
|
492
|
+
1. `run.md` — Created at run start by init-run.js
|
|
493
|
+
2. `plan.md` — Created BEFORE implementation begins (Step 4)
|
|
494
|
+
3. `test-report.md` — Created AFTER tests pass (Step 6)
|
|
495
|
+
4. `review-report.md` — Created by code-review skill (Step 6b)
|
|
496
|
+
5. `walkthrough.md` — Created after run completes (Step 8)
|
|
497
|
+
|
|
498
|
+
The run.md contains:
|
|
499
|
+
- All work items with their statuses
|
|
500
|
+
- Current item being executed
|
|
501
|
+
- Files created/modified (after completion)
|
|
502
|
+
- Decisions made (after completion)
|
|
503
|
+
- Summary (after completion)
|