specsmd 0.0.0-dev.56 → 0.0.0-dev.57
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Skill: Run Execute
|
|
2
2
|
|
|
3
|
-
Execute
|
|
3
|
+
Execute work items based on their assigned mode (autopilot, confirm, validate).
|
|
4
|
+
Supports both single-item and multi-item (batch/wide) runs.
|
|
4
5
|
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -33,6 +34,7 @@ Before executing scripts, ensure required dependencies are installed:
|
|
|
33
34
|
|
|
34
35
|
- Pending work item ready for execution
|
|
35
36
|
- Resumed from interrupted run
|
|
37
|
+
- Batch of work items passed from run-plan
|
|
36
38
|
|
|
37
39
|
---
|
|
38
40
|
|
|
@@ -45,26 +47,82 @@ Before executing scripts, ensure required dependencies are installed:
|
|
|
45
47
|
|
|
46
48
|
---
|
|
47
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
|
+
|
|
48
83
|
## Workflow
|
|
49
84
|
|
|
50
85
|
```xml
|
|
51
86
|
<skill name="run-execute">
|
|
52
87
|
|
|
53
88
|
<mandate>
|
|
89
|
+
USE SCRIPTS — Never bypass init-run.js or complete-run.js.
|
|
54
90
|
TRACK ALL FILE OPERATIONS — Every create, modify must be recorded.
|
|
55
91
|
NEVER skip tests — Tests are mandatory, not optional.
|
|
56
92
|
FOLLOW BROWNFIELD RULES — Read before write, match existing patterns.
|
|
57
93
|
</mandate>
|
|
58
94
|
|
|
59
95
|
<step n="1" title="Initialize Run">
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
96
|
+
<critical>
|
|
97
|
+
MUST call init-run.js script. DO NOT use mkdir directly.
|
|
98
|
+
The script creates BOTH the folder AND run.md file.
|
|
99
|
+
</critical>
|
|
100
|
+
|
|
101
|
+
<action>Prepare work items JSON array:</action>
|
|
102
|
+
<code>
|
|
103
|
+
# For single item:
|
|
104
|
+
node scripts/init-run.js {rootPath} {workItemId} {intentId} {mode}
|
|
105
|
+
|
|
106
|
+
# For batch/wide (multiple items):
|
|
107
|
+
node scripts/init-run.js {rootPath} --batch '[
|
|
108
|
+
{"id": "item-1", "intent": "intent-1", "mode": "autopilot"},
|
|
109
|
+
{"id": "item-2", "intent": "intent-1", "mode": "confirm"}
|
|
110
|
+
]' --scope=batch
|
|
111
|
+
</code>
|
|
112
|
+
|
|
113
|
+
<action>Parse script output for runId and runPath</action>
|
|
114
|
+
<action>Verify run.md was created in .specs-fire/runs/{run-id}/</action>
|
|
115
|
+
|
|
116
|
+
<check if="run.md not found">
|
|
117
|
+
<error>init-run.js failed to create run.md. Check script output.</error>
|
|
118
|
+
</check>
|
|
64
119
|
</step>
|
|
65
120
|
|
|
66
|
-
<step n="2" title="
|
|
67
|
-
<
|
|
121
|
+
<step n="2" title="Execute Work Items Loop">
|
|
122
|
+
<note>For batch runs, repeat steps 2-6 for each work item</note>
|
|
123
|
+
|
|
124
|
+
<action>Get current_item from state.yaml active_run</action>
|
|
125
|
+
<action>Load work item from .specs-fire/intents/{intent}/work-items/{id}.md</action>
|
|
68
126
|
<action>Read intent brief for broader context</action>
|
|
69
127
|
<action>Load ALL project standards:</action>
|
|
70
128
|
<substep>.specs-fire/standards/tech-stack.md — Technology choices</substep>
|
|
@@ -183,15 +241,36 @@ Before executing scripts, ensure required dependencies are installed:
|
|
|
183
241
|
</check>
|
|
184
242
|
|
|
185
243
|
<action>Validate acceptance criteria from work item</action>
|
|
186
|
-
<action>Measure coverage against target from testing-standards.md</action>
|
|
187
|
-
<action>Generate test report using template: templates/test-report.md.hbs</action>
|
|
188
|
-
<action>Save to: .specs-fire/runs/{run-id}/test-report.md</action>
|
|
189
244
|
</step>
|
|
190
245
|
|
|
191
|
-
<step n="7" title="Complete
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
|
|
246
|
+
<step n="7" title="Complete Current Work Item">
|
|
247
|
+
<critical>
|
|
248
|
+
MUST call complete-run.js script. Check if more items remain.
|
|
249
|
+
</critical>
|
|
250
|
+
|
|
251
|
+
<check if="batch run with more items pending">
|
|
252
|
+
<action>Call complete-run.js with --complete-item flag:</action>
|
|
253
|
+
<code>
|
|
254
|
+
node scripts/complete-run.js {rootPath} {runId} --complete-item
|
|
255
|
+
</code>
|
|
256
|
+
<action>Parse output for nextItem</action>
|
|
257
|
+
<output>
|
|
258
|
+
Work item {current_item} complete.
|
|
259
|
+
Next: {nextItem}
|
|
260
|
+
</output>
|
|
261
|
+
<goto step="2">Continue with next work item</goto>
|
|
262
|
+
</check>
|
|
263
|
+
|
|
264
|
+
<check if="last item or single item run">
|
|
265
|
+
<action>Call complete-run.js with --complete-run flag:</action>
|
|
266
|
+
<code>
|
|
267
|
+
node scripts/complete-run.js {rootPath} {runId} --complete-run \
|
|
268
|
+
--files-created='[{"path":"...","purpose":"..."}]' \
|
|
269
|
+
--files-modified='[{"path":"...","changes":"..."}]' \
|
|
270
|
+
--tests=5 --coverage=85
|
|
271
|
+
</code>
|
|
272
|
+
<goto step="8"/>
|
|
273
|
+
</check>
|
|
195
274
|
</step>
|
|
196
275
|
|
|
197
276
|
<step n="8" title="Generate Walkthrough">
|
|
@@ -200,18 +279,16 @@ Before executing scripts, ensure required dependencies are installed:
|
|
|
200
279
|
|
|
201
280
|
<step n="9" title="Report Completion">
|
|
202
281
|
<output>
|
|
203
|
-
Run {run-id} completed
|
|
282
|
+
Run {run-id} completed.
|
|
204
283
|
|
|
284
|
+
Work items completed: {count}
|
|
205
285
|
Files created: {count}
|
|
206
286
|
Files modified: {count}
|
|
207
287
|
Tests added: {count}
|
|
208
|
-
Coverage: {percentage}%
|
|
209
288
|
|
|
210
289
|
Artifacts:
|
|
211
|
-
-
|
|
290
|
+
- Run Log: .specs-fire/runs/{run-id}/run.md
|
|
212
291
|
- Walkthrough: .specs-fire/runs/{run-id}/walkthrough.md
|
|
213
|
-
|
|
214
|
-
Continue to next work item? [Y/n]
|
|
215
292
|
</output>
|
|
216
293
|
</step>
|
|
217
294
|
|
|
@@ -222,10 +299,71 @@ Before executing scripts, ensure required dependencies are installed:
|
|
|
222
299
|
|
|
223
300
|
## Scripts
|
|
224
301
|
|
|
225
|
-
| Script | Purpose |
|
|
226
|
-
|
|
227
|
-
| `scripts/init-run.js` | Initialize run record and folder |
|
|
228
|
-
| `scripts/complete-run.js` | Finalize run and update state |
|
|
302
|
+
| Script | Purpose | Usage |
|
|
303
|
+
|--------|---------|-------|
|
|
304
|
+
| `scripts/init-run.js` | Initialize run record and folder | Creates run.md with all work items |
|
|
305
|
+
| `scripts/complete-run.js` | Finalize run and update state | `--complete-item` or `--complete-run` |
|
|
306
|
+
|
|
307
|
+
### init-run.js Usage
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
# Single work item
|
|
311
|
+
node scripts/init-run.js /project work-item-id intent-id autopilot
|
|
312
|
+
|
|
313
|
+
# Batch/wide (multiple items)
|
|
314
|
+
node scripts/init-run.js /project --batch '[
|
|
315
|
+
{"id": "wi-1", "intent": "int-1", "mode": "autopilot"},
|
|
316
|
+
{"id": "wi-2", "intent": "int-1", "mode": "confirm"}
|
|
317
|
+
]' --scope=batch
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
**Output:**
|
|
321
|
+
```json
|
|
322
|
+
{
|
|
323
|
+
"success": true,
|
|
324
|
+
"runId": "run-001",
|
|
325
|
+
"runPath": "/project/.specs-fire/runs/run-001",
|
|
326
|
+
"scope": "batch",
|
|
327
|
+
"workItems": [...],
|
|
328
|
+
"currentItem": "wi-1"
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### complete-run.js Usage
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
# Complete current item (batch runs - moves to next item)
|
|
336
|
+
node scripts/complete-run.js /project run-001 --complete-item
|
|
337
|
+
|
|
338
|
+
# Complete entire run (single runs or final item in batch)
|
|
339
|
+
node scripts/complete-run.js /project run-001 --complete-run \
|
|
340
|
+
--files-created='[{"path":"src/new.ts","purpose":"New feature"}]' \
|
|
341
|
+
--files-modified='[{"path":"src/old.ts","changes":"Added import"}]' \
|
|
342
|
+
--tests=5 --coverage=85
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
**--complete-item Output:**
|
|
346
|
+
```json
|
|
347
|
+
{
|
|
348
|
+
"success": true,
|
|
349
|
+
"runId": "run-001",
|
|
350
|
+
"completedItem": "wi-1",
|
|
351
|
+
"nextItem": "wi-2",
|
|
352
|
+
"remainingItems": 1,
|
|
353
|
+
"allItemsCompleted": false
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**--complete-run Output:**
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"success": true,
|
|
361
|
+
"runId": "run-001",
|
|
362
|
+
"scope": "batch",
|
|
363
|
+
"workItemsCompleted": 2,
|
|
364
|
+
"completedAt": "2026-01-20T..."
|
|
365
|
+
}
|
|
366
|
+
```
|
|
229
367
|
|
|
230
368
|
---
|
|
231
369
|
|
|
@@ -244,3 +382,23 @@ decisions:
|
|
|
244
382
|
- decision: Use JWT for tokens
|
|
245
383
|
rationale: Stateless, works with load balancer
|
|
246
384
|
```
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## Run Folder Structure
|
|
389
|
+
|
|
390
|
+
After init-run.js creates a run:
|
|
391
|
+
|
|
392
|
+
```
|
|
393
|
+
.specs-fire/runs/run-001/
|
|
394
|
+
├── run.md # Created by init-run.js, updated by complete-run.js
|
|
395
|
+
├── plan.md # Created during confirm/validate mode (optional)
|
|
396
|
+
└── walkthrough.md # Created by walkthrough-generate skill
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
The run.md contains:
|
|
400
|
+
- All work items with their statuses
|
|
401
|
+
- Current item being executed
|
|
402
|
+
- Files created/modified (after completion)
|
|
403
|
+
- Decisions made (after completion)
|
|
404
|
+
- Summary (after completion)
|
|
@@ -18,6 +18,29 @@ Plan the scope of a run by discovering available work items and suggesting group
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## Critical Clarifications
|
|
22
|
+
|
|
23
|
+
### Dependencies Mean Sequential Execution, NOT Separate Runs
|
|
24
|
+
|
|
25
|
+
**IMPORTANT**: When work items have dependencies:
|
|
26
|
+
- They execute **sequentially within the SAME run**
|
|
27
|
+
- They do **NOT** require separate runs
|
|
28
|
+
- The dependent item waits for its dependency to complete before starting
|
|
29
|
+
|
|
30
|
+
**Example**: If item 05 depends on item 04:
|
|
31
|
+
- **CORRECT**: ONE run with both items, 04 executes first, then 05
|
|
32
|
+
- **WRONG**: TWO separate runs
|
|
33
|
+
|
|
34
|
+
### All Options Can Include Multiple Items Per Run
|
|
35
|
+
|
|
36
|
+
| Option | Items Per Run | Execution |
|
|
37
|
+
|--------|---------------|-----------|
|
|
38
|
+
| Single | 1 item | One at a time, separate runs |
|
|
39
|
+
| Batch | Multiple items (same mode) | Sequential within run |
|
|
40
|
+
| Wide | All compatible items | Sequential within run |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
21
44
|
## Workflow
|
|
22
45
|
|
|
23
46
|
```xml
|
|
@@ -28,6 +51,7 @@ Plan the scope of a run by discovering available work items and suggesting group
|
|
|
28
51
|
SUGGEST smart groupings based on mode, dependencies, and user history.
|
|
29
52
|
LEARN from user choices to improve future recommendations.
|
|
30
53
|
NEVER force a scope - always let user choose.
|
|
54
|
+
DEPENDENCIES = SEQUENTIAL EXECUTION, NOT SEPARATE RUNS.
|
|
31
55
|
</mandate>
|
|
32
56
|
|
|
33
57
|
<step n="1" title="Discover Available Work">
|
|
@@ -71,10 +95,10 @@ Plan the scope of a run by discovering available work items and suggesting group
|
|
|
71
95
|
<action>Read workspace.run_scope_preference from state.yaml (if exists)</action>
|
|
72
96
|
|
|
73
97
|
<grouping-rules>
|
|
74
|
-
<rule>
|
|
75
|
-
<rule>
|
|
76
|
-
<rule>Cross-intent
|
|
77
|
-
<rule>Validate mode items
|
|
98
|
+
<rule>Dependencies = SEQUENTIAL execution in SAME run (NOT separate runs)</rule>
|
|
99
|
+
<rule>Different modes CAN be in same run (executed sequentially)</rule>
|
|
100
|
+
<rule>Cross-intent items allowed in same run if compatible</rule>
|
|
101
|
+
<rule>Validate mode items may benefit from running alone (more checkpoints)</rule>
|
|
78
102
|
</grouping-rules>
|
|
79
103
|
|
|
80
104
|
<generate-options>
|
|
@@ -84,22 +108,22 @@ Plan the scope of a run by discovering available work items and suggesting group
|
|
|
84
108
|
</option>
|
|
85
109
|
|
|
86
110
|
<option name="batch">
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
111
|
+
All pending items in ONE run
|
|
112
|
+
Execute sequentially (dependencies respected by order)
|
|
113
|
+
Checkpoints pause at confirm/validate items
|
|
114
|
+
Total runs: 1
|
|
90
115
|
</option>
|
|
91
116
|
|
|
92
117
|
<option name="wide">
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Total runs: {minimum possible}
|
|
118
|
+
Same as batch - all items in one run
|
|
119
|
+
Total runs: 1
|
|
96
120
|
</option>
|
|
97
121
|
</generate-options>
|
|
98
122
|
</step>
|
|
99
123
|
|
|
100
124
|
<step n="4" title="Present Options">
|
|
101
125
|
<action>Determine recommended option based on:</action>
|
|
102
|
-
<substep>autonomy_bias (autonomous→
|
|
126
|
+
<substep>autonomy_bias (autonomous→batch, controlled→single)</substep>
|
|
103
127
|
<substep>run_scope_preference (user's historical choice)</substep>
|
|
104
128
|
<substep>Number of pending items (few items→single is fine)</substep>
|
|
105
129
|
|
|
@@ -115,20 +139,24 @@ Plan the scope of a run by discovering available work items and suggesting group
|
|
|
115
139
|
{/for}
|
|
116
140
|
{/for}
|
|
117
141
|
|
|
142
|
+
{if dependencies exist}
|
|
143
|
+
**Dependencies** (determines execution order):
|
|
144
|
+
- {dependent_item} depends on {dependency_item}
|
|
145
|
+
{/if}
|
|
146
|
+
|
|
118
147
|
---
|
|
119
148
|
|
|
120
149
|
**How would you like to execute?**
|
|
121
150
|
|
|
122
151
|
**[1] One at a time** — {single_count} separate runs
|
|
123
|
-
Most controlled, review after each
|
|
152
|
+
Most controlled, review after each run
|
|
124
153
|
|
|
125
|
-
**[2]
|
|
126
|
-
{
|
|
127
|
-
|
|
128
|
-
{/for}
|
|
154
|
+
**[2] Sequential chain** — 1 run with {count} items (Recommended)
|
|
155
|
+
Execute in order: {item1} → {item2} → ...
|
|
156
|
+
Checkpoints pause at confirm/validate items
|
|
129
157
|
|
|
130
|
-
**[3] All together** —
|
|
131
|
-
|
|
158
|
+
**[3] All together** — Same as [2]
|
|
159
|
+
1 run, sequential execution
|
|
132
160
|
|
|
133
161
|
Choose [1/2/3]:
|
|
134
162
|
</output>
|
|
@@ -139,13 +167,9 @@ Plan the scope of a run by discovering available work items and suggesting group
|
|
|
139
167
|
<set>run_scope = single</set>
|
|
140
168
|
<set>work_items_for_run = [first_pending_item]</set>
|
|
141
169
|
</check>
|
|
142
|
-
<check if="response == 2">
|
|
170
|
+
<check if="response == 2 or response == 3">
|
|
143
171
|
<set>run_scope = batch</set>
|
|
144
|
-
<set>work_items_for_run =
|
|
145
|
-
</check>
|
|
146
|
-
<check if="response == 3">
|
|
147
|
-
<set>run_scope = wide</set>
|
|
148
|
-
<set>work_items_for_run = all_compatible_items</set>
|
|
172
|
+
<set>work_items_for_run = all_pending_items_in_dependency_order</set>
|
|
149
173
|
</check>
|
|
150
174
|
</step>
|
|
151
175
|
|
|
@@ -170,14 +194,12 @@ Plan the scope of a run by discovering available work items and suggesting group
|
|
|
170
194
|
Starting run with {count} work item(s):
|
|
171
195
|
|
|
172
196
|
{for each item in work_items_for_run}
|
|
173
|
-
|
|
197
|
+
{index}. {item.title} ({item.mode})
|
|
174
198
|
{/for}
|
|
175
199
|
|
|
176
|
-
{if run_scope == batch or wide}
|
|
177
200
|
Items will execute sequentially within this run.
|
|
178
201
|
{if any item is confirm or validate}
|
|
179
|
-
Checkpoints will pause for approval
|
|
180
|
-
{/if}
|
|
202
|
+
Checkpoints will pause for approval at confirm/validate items.
|
|
181
203
|
{/if}
|
|
182
204
|
|
|
183
205
|
---
|
|
@@ -185,7 +207,7 @@ Plan the scope of a run by discovering available work items and suggesting group
|
|
|
185
207
|
Begin execution? [Y/n]
|
|
186
208
|
</output>
|
|
187
209
|
<check if="response == y">
|
|
188
|
-
<invoke-skill args="work_items_for_run">run-execute</invoke-skill>
|
|
210
|
+
<invoke-skill args="work_items_for_run, run_scope">run-execute</invoke-skill>
|
|
189
211
|
</check>
|
|
190
212
|
</step>
|
|
191
213
|
|
|
@@ -255,14 +277,13 @@ active_run:
|
|
|
255
277
|
```
|
|
256
278
|
1. Collect all pending items with their modes
|
|
257
279
|
2. Build dependency graph
|
|
258
|
-
3.
|
|
259
|
-
|
|
260
|
-
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
5. Return groupings with run counts
|
|
280
|
+
3. Sort items in dependency order (dependencies first)
|
|
281
|
+
4. For "single" option:
|
|
282
|
+
- Each item is its own run
|
|
283
|
+
5. For "batch" or "wide" option:
|
|
284
|
+
- ALL items in ONE run
|
|
285
|
+
- Execution order follows dependency graph
|
|
286
|
+
- Checkpoints pause at confirm/validate items
|
|
266
287
|
```
|
|
267
288
|
|
|
268
289
|
---
|
|
@@ -274,7 +295,7 @@ IF run_scope_history has 3+ same choices:
|
|
|
274
295
|
pre_selected = most_common_choice
|
|
275
296
|
|
|
276
297
|
ELSE IF autonomy_bias == autonomous:
|
|
277
|
-
recommended =
|
|
298
|
+
recommended = batch (all in one run)
|
|
278
299
|
|
|
279
300
|
ELSE IF autonomy_bias == controlled:
|
|
280
301
|
recommended = single
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specsmd",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.57",
|
|
4
4
|
"description": "Multi-agent orchestration system for AI-native software development. Delivers AI-DLC, Agile, and custom SDLC flows as markdown-based agent systems.",
|
|
5
5
|
"main": "lib/installer.js",
|
|
6
6
|
"bin": {
|