specsmd 0.0.0-dev.5 → 0.0.0-dev.51

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.
Files changed (63) hide show
  1. package/README.md +10 -2
  2. package/flows/aidlc/commands/construction-agent.md +5 -1
  3. package/flows/aidlc/commands/inception-agent.md +4 -0
  4. package/flows/aidlc/commands/master-agent.md +4 -0
  5. package/flows/aidlc/commands/operations-agent.md +4 -0
  6. package/flows/aidlc/memory-bank.yaml +2 -1
  7. package/{scripts → flows/aidlc/scripts}/artifact-validator.js +3 -3
  8. package/{scripts → flows/aidlc/scripts}/bolt-complete.js +35 -4
  9. package/{scripts → flows/aidlc/scripts}/status-integrity.js +4 -4
  10. package/flows/aidlc/skills/construction/bolt-list.md +1 -1
  11. package/flows/aidlc/skills/construction/bolt-start.md +2 -2
  12. package/flows/aidlc/skills/construction/bolt-status.md +1 -1
  13. package/flows/aidlc/skills/construction/prototype-apply.md +305 -0
  14. package/flows/aidlc/skills/inception/bolt-plan.md +15 -2
  15. package/flows/aidlc/skills/inception/vibe-to-spec.md +406 -0
  16. package/flows/aidlc/skills/master/analyze-context.md +1 -1
  17. package/flows/aidlc/templates/construction/bolt-template.md +22 -1
  18. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +73 -11
  19. package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +5 -0
  20. package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
  21. package/flows/fire/README.md +19 -0
  22. package/flows/fire/agents/builder/agent.md +209 -0
  23. package/flows/fire/agents/builder/skills/run-execute/SKILL.md +221 -0
  24. package/flows/fire/agents/builder/skills/run-execute/scripts/complete-run.ts +806 -0
  25. package/flows/fire/agents/builder/skills/run-execute/scripts/init-run.ts +575 -0
  26. package/flows/fire/agents/builder/skills/run-plan/SKILL.md +287 -0
  27. package/flows/fire/agents/builder/skills/run-status/SKILL.md +94 -0
  28. package/flows/fire/agents/builder/skills/walkthrough-generate/SKILL.md +140 -0
  29. package/flows/fire/agents/builder/skills/walkthrough-generate/scripts/render-walkthrough.ts +755 -0
  30. package/flows/fire/agents/orchestrator/agent.md +113 -0
  31. package/flows/fire/agents/orchestrator/skills/project-init/SKILL.md +141 -0
  32. package/flows/fire/agents/orchestrator/skills/route/SKILL.md +123 -0
  33. package/flows/fire/agents/orchestrator/skills/status/SKILL.md +99 -0
  34. package/flows/fire/agents/planner/agent.md +122 -0
  35. package/flows/fire/agents/planner/skills/design-doc-generate/SKILL.md +212 -0
  36. package/flows/fire/agents/planner/skills/intent-capture/SKILL.md +155 -0
  37. package/flows/fire/agents/planner/skills/work-item-decompose/SKILL.md +193 -0
  38. package/flows/fire/commands/fire-builder.md +56 -0
  39. package/flows/fire/commands/fire-planner.md +48 -0
  40. package/flows/fire/commands/fire.md +46 -0
  41. package/flows/fire/memory-bank.yaml +154 -0
  42. package/flows/fire/quick-start.md +130 -0
  43. package/flows/simple/README.md +190 -0
  44. package/flows/simple/agents/agent.md +404 -0
  45. package/flows/simple/commands/agent.md +60 -0
  46. package/flows/simple/context-config.yaml +34 -0
  47. package/flows/simple/memory-bank.yaml +66 -0
  48. package/flows/simple/quick-start.md +231 -0
  49. package/flows/simple/skills/design.md +96 -0
  50. package/flows/simple/skills/execute.md +190 -0
  51. package/flows/simple/skills/requirements.md +94 -0
  52. package/flows/simple/skills/tasks.md +136 -0
  53. package/flows/simple/templates/design-template.md +138 -0
  54. package/flows/simple/templates/requirements-template.md +85 -0
  55. package/flows/simple/templates/tasks-template.md +104 -0
  56. package/lib/analytics/tracker.js +6 -2
  57. package/lib/constants.js +10 -7
  58. package/lib/installer.js +3 -14
  59. package/lib/installers/KiroInstaller.js +55 -0
  60. package/lib/installers/OpenCodeInstaller.js +9 -1
  61. package/lib/installers/ToolInstaller.js +4 -1
  62. package/lib/installers/WindsurfInstaller.js +0 -54
  63. package/package.json +3 -52
@@ -0,0 +1,287 @@
1
+ # Skill: Run Plan
2
+
3
+ Plan the scope of a run by discovering available work items and suggesting groupings.
4
+
5
+ ---
6
+
7
+ ## Trigger
8
+
9
+ - After work-item decomposition completes
10
+ - User wants to start execution
11
+ - Pending work items exist
12
+
13
+ ---
14
+
15
+ ## Degrees of Freedom
16
+
17
+ **MEDIUM** — Present smart grouping suggestions but let user choose scope.
18
+
19
+ ---
20
+
21
+ ## Workflow
22
+
23
+ ```xml
24
+ <skill name="run-plan">
25
+
26
+ <mandate>
27
+ DISCOVER all available work - both in state.yaml AND file system.
28
+ SUGGEST smart groupings based on mode, dependencies, and user history.
29
+ LEARN from user choices to improve future recommendations.
30
+ NEVER force a scope - always let user choose.
31
+ </mandate>
32
+
33
+ <step n="1" title="Discover Available Work">
34
+ <action>Read state.yaml for known intents and work items</action>
35
+ <action>Scan .specs-fire/intents/ for intent briefs not in state</action>
36
+ <action>Scan .specs-fire/intents/*/work-items/ for work items not in state</action>
37
+
38
+ <reconcile>
39
+ <check if="file exists but not in state">
40
+ <action>Parse file frontmatter for metadata</action>
41
+ <action>Add to state.yaml as pending</action>
42
+ <output>Discovered: {item} from {intent} (not in state)</output>
43
+ </check>
44
+ <check if="in state but file missing">
45
+ <output>Warning: {item} in state but file not found</output>
46
+ </check>
47
+ </reconcile>
48
+ </step>
49
+
50
+ <step n="2" title="Collect Pending Work Items">
51
+ <action>Filter work items with status == pending</action>
52
+ <action>Group by intent</action>
53
+ <action>Note mode (after autonomy_bias applied) for each</action>
54
+ <action>Identify dependencies within and across intents</action>
55
+
56
+ <check if="no pending work items">
57
+ <output>
58
+ No pending work items found.
59
+
60
+ Create a new intent? [Y/n]
61
+ </output>
62
+ <check if="response == y">
63
+ <route-to>planner-agent (intent-capture)</route-to>
64
+ </check>
65
+ <stop/>
66
+ </check>
67
+ </step>
68
+
69
+ <step n="3" title="Analyze Groupings">
70
+ <action>Read workspace.autonomy_bias from state.yaml</action>
71
+ <action>Read workspace.run_scope_preference from state.yaml (if exists)</action>
72
+
73
+ <grouping-rules>
74
+ <rule>Same mode items CAN be batched together</rule>
75
+ <rule>Items with dependencies CANNOT be in same batch</rule>
76
+ <rule>Cross-intent batching allowed if items are independent</rule>
77
+ <rule>Validate mode items should generally run alone</rule>
78
+ </grouping-rules>
79
+
80
+ <generate-options>
81
+ <option name="single">
82
+ Each work item in its own run
83
+ Total runs: {count of pending items}
84
+ </option>
85
+
86
+ <option name="batch">
87
+ Group by mode (autopilot together, confirm together)
88
+ Respect dependencies
89
+ Total runs: {count of mode groups}
90
+ </option>
91
+
92
+ <option name="wide">
93
+ All compatible items in one run
94
+ Only separate if dependencies require it
95
+ Total runs: {minimum possible}
96
+ </option>
97
+ </generate-options>
98
+ </step>
99
+
100
+ <step n="4" title="Present Options">
101
+ <action>Determine recommended option based on:</action>
102
+ <substep>autonomy_bias (autonomous→wide, controlled→single)</substep>
103
+ <substep>run_scope_preference (user's historical choice)</substep>
104
+ <substep>Number of pending items (few items→single is fine)</substep>
105
+
106
+ <output>
107
+ ## Run Planning
108
+
109
+ **Found**: {count} pending work items across {intent_count} intent(s)
110
+
111
+ {for each intent with pending items}
112
+ **{intent.title}**:
113
+ {for each pending item}
114
+ - {item.title} ({item.mode})
115
+ {/for}
116
+ {/for}
117
+
118
+ ---
119
+
120
+ **How would you like to execute?**
121
+
122
+ **[1] One at a time** — {single_count} separate runs
123
+ Most controlled, review after each
124
+
125
+ **[2] Batch by mode** — {batch_count} runs {if recommended}(Recommended){/if}
126
+ {for each batch}
127
+ Run {n}: {item_names} ({mode})
128
+ {/for}
129
+
130
+ **[3] All together** — {wide_count} run(s)
131
+ Fastest, minimal interruption
132
+
133
+ Choose [1/2/3]:
134
+ </output>
135
+ </step>
136
+
137
+ <step n="5" title="Process Choice">
138
+ <check if="response == 1">
139
+ <set>run_scope = single</set>
140
+ <set>work_items_for_run = [first_pending_item]</set>
141
+ </check>
142
+ <check if="response == 2">
143
+ <set>run_scope = batch</set>
144
+ <set>work_items_for_run = first_batch_items</set>
145
+ </check>
146
+ <check if="response == 3">
147
+ <set>run_scope = wide</set>
148
+ <set>work_items_for_run = all_compatible_items</set>
149
+ </check>
150
+ </step>
151
+
152
+ <step n="6" title="Learn Preference">
153
+ <action>Update workspace.run_scope_preference in state.yaml</action>
154
+ <action>Add to workspace.run_scope_history (keep last 10)</action>
155
+
156
+ <history-entry>
157
+ choice: {run_scope}
158
+ items_count: {count}
159
+ timestamp: {now}
160
+ </history-entry>
161
+
162
+ <note>
163
+ After 3+ consistent choices, start pre-selecting that option
164
+ and ask "Proceed with {preference}? [Y/n/change]" instead
165
+ </note>
166
+ </step>
167
+
168
+ <step n="7" title="Confirm Run">
169
+ <output>
170
+ Starting run with {count} work item(s):
171
+
172
+ {for each item in work_items_for_run}
173
+ - {item.title} ({item.mode})
174
+ {/for}
175
+
176
+ {if run_scope == batch or wide}
177
+ Items will execute sequentially within this run.
178
+ {if any item is confirm or validate}
179
+ Checkpoints will pause for approval as needed.
180
+ {/if}
181
+ {/if}
182
+
183
+ ---
184
+
185
+ Begin execution? [Y/n]
186
+ </output>
187
+ <check if="response == y">
188
+ <invoke-skill args="work_items_for_run">run-execute</invoke-skill>
189
+ </check>
190
+ </step>
191
+
192
+ </skill>
193
+ ```
194
+
195
+ ---
196
+
197
+ ## State Schema Updates
198
+
199
+ **workspace section additions**:
200
+ ```yaml
201
+ workspace:
202
+ # ... existing fields ...
203
+ run_scope_preference: batch # single | batch | wide (learned)
204
+ run_scope_history:
205
+ - choice: batch
206
+ items_count: 4
207
+ timestamp: 2026-01-19T10:00:00Z
208
+ ```
209
+
210
+ **active_run with multi-item support**:
211
+ ```yaml
212
+ active_run:
213
+ id: run-001
214
+ scope: batch # single | batch | wide
215
+ work_items:
216
+ - id: 01-stats-data-model
217
+ intent: session-stats
218
+ mode: autopilot
219
+ status: completed
220
+ - id: 02-stats-api-endpoint
221
+ intent: session-stats
222
+ mode: autopilot
223
+ status: in_progress
224
+ current_item: 02-stats-api-endpoint
225
+ started: 2026-01-19T10:00:00Z
226
+ ```
227
+
228
+ ---
229
+
230
+ ## File Discovery Logic
231
+
232
+ ```
233
+ .specs-fire/
234
+ ├── intents/
235
+ │ ├── user-auth/
236
+ │ │ ├── brief.md ← Parse frontmatter for intent metadata
237
+ │ │ └── work-items/
238
+ │ │ ├── login-endpoint.md ← Parse for work item metadata
239
+ │ │ └── session-mgmt.md
240
+ │ └── analytics/
241
+ │ ├── brief.md
242
+ │ └── work-items/
243
+ │ └── dashboard.md
244
+ ```
245
+
246
+ **Frontmatter parsing**:
247
+ - Extract `id`, `title`, `status` from YAML frontmatter
248
+ - If status missing, default to `pending`
249
+ - If in file but not state.yaml, add to state
250
+
251
+ ---
252
+
253
+ ## Grouping Algorithm
254
+
255
+ ```
256
+ 1. Collect all pending items with their modes
257
+ 2. Build dependency graph
258
+ 3. For "batch" option:
259
+ - Group by mode
260
+ - Within each mode group, check dependencies
261
+ - Split if dependency exists within group
262
+ 4. For "wide" option:
263
+ - Start with all items in one group
264
+ - Split only where dependencies require
265
+ 5. Return groupings with run counts
266
+ ```
267
+
268
+ ---
269
+
270
+ ## Recommendation Logic
271
+
272
+ ```
273
+ IF run_scope_history has 3+ same choices:
274
+ pre_selected = most_common_choice
275
+
276
+ ELSE IF autonomy_bias == autonomous:
277
+ recommended = wide
278
+
279
+ ELSE IF autonomy_bias == controlled:
280
+ recommended = single
281
+
282
+ ELSE: # balanced
283
+ IF pending_count <= 2:
284
+ recommended = single
285
+ ELSE:
286
+ recommended = batch
287
+ ```
@@ -0,0 +1,94 @@
1
+ # Skill: Run Status
2
+
3
+ Display current run status and progress.
4
+
5
+ ---
6
+
7
+ ## Trigger
8
+
9
+ - User asks about run status
10
+ - During long-running execution
11
+
12
+ ---
13
+
14
+ ## Workflow
15
+
16
+ ```xml
17
+ <skill name="run-status">
18
+
19
+ <step n="1" title="Check Active Run">
20
+ <action>Read state.yaml for active_run</action>
21
+ <check if="no active run">
22
+ <output>
23
+ No active run. Last completed run: {last-run-id}
24
+ </output>
25
+ <stop/>
26
+ </check>
27
+ </step>
28
+
29
+ <step n="2" title="Display Status">
30
+ <output>
31
+ ## Run Status: {run-id}
32
+
33
+ **Work Item**: {title}
34
+ **Intent**: {intent-title}
35
+ **Mode**: {mode}
36
+ **Started**: {started}
37
+ **Duration**: {elapsed}
38
+
39
+ ### Progress
40
+
41
+ - [x] Initialize run
42
+ - [x] Load context
43
+ {checkpoint status}
44
+ - [{status}] Execute implementation
45
+ - [ ] Run tests
46
+ - [ ] Generate walkthrough
47
+
48
+ ### Files Changed So Far
49
+
50
+ Created: {created-count}
51
+ Modified: {modified-count}
52
+
53
+ ### Recent Activity
54
+
55
+ {last 5 actions}
56
+ </output>
57
+ </step>
58
+
59
+ </skill>
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Example Output
65
+
66
+ ```
67
+ ## Run Status: run-003
68
+
69
+ **Work Item**: Add session management
70
+ **Intent**: User Authentication
71
+ **Mode**: confirm
72
+ **Started**: 2026-01-19T10:30:00Z
73
+ **Duration**: 12 minutes
74
+
75
+ ### Progress
76
+
77
+ - [x] Initialize run
78
+ - [x] Load context
79
+ - [x] Plan approved (Checkpoint 1)
80
+ - [~] Execute implementation
81
+ - [ ] Run tests
82
+ - [ ] Generate walkthrough
83
+
84
+ ### Files Changed So Far
85
+
86
+ Created: 2
87
+ Modified: 1
88
+
89
+ ### Recent Activity
90
+
91
+ - Created src/auth/session.ts
92
+ - Created src/auth/session.test.ts
93
+ - Modified src/auth/index.ts
94
+ ```
@@ -0,0 +1,140 @@
1
+ # Skill: Walkthrough Generate
2
+
3
+ Generate implementation walkthrough for human review after run completion.
4
+
5
+ ---
6
+
7
+ ## Trigger
8
+
9
+ - Run completed successfully
10
+ - Invoked by run-execute skill
11
+
12
+ ---
13
+
14
+ ## Degrees of Freedom
15
+
16
+ **LOW** — Follow walkthrough structure precisely. Be thorough but concise.
17
+
18
+ ---
19
+
20
+ ## Workflow
21
+
22
+ ```xml
23
+ <skill name="walkthrough-generate">
24
+
25
+ <mandate>
26
+ ALWAYS generate walkthrough after run completion.
27
+ Document DECISIONS, not just changes.
28
+ Include verification steps - how to test this works.
29
+ </mandate>
30
+
31
+ <step n="1" title="Gather Implementation Data">
32
+ <action>Read run log from .specs-fire/runs/{run-id}/run.md</action>
33
+ <action>Collect:</action>
34
+ <substep>Work item details (id, title, intent)</substep>
35
+ <substep>Files created during implementation</substep>
36
+ <substep>Files modified during implementation</substep>
37
+ <substep>Decisions made during execution</substep>
38
+ <substep>Tests added and coverage</substep>
39
+ </step>
40
+
41
+ <step n="2" title="Analyze Implementation">
42
+ <action>For each file created/modified:</action>
43
+ <substep>Identify purpose of the file</substep>
44
+ <substep>Summarize key changes</substep>
45
+ <substep>Note patterns or approaches used</substep>
46
+ </step>
47
+
48
+ <step n="3" title="Document Key Details">
49
+ <action>Extract implementation highlights:</action>
50
+ <substep>Main flow/algorithm implemented</substep>
51
+ <substep>Security considerations (if applicable)</substep>
52
+ <substep>Performance considerations (if applicable)</substep>
53
+ <substep>Integration points with existing code</substep>
54
+ </step>
55
+
56
+ <step n="4" title="Create Verification Steps">
57
+ <action>Generate how-to-verify section:</action>
58
+ <substep>Commands to run the feature</substep>
59
+ <substep>Expected behavior/output</substep>
60
+ <substep>Manual test scenarios</substep>
61
+ </step>
62
+
63
+ <step n="5" title="Generate Walkthrough">
64
+ <action script="scripts/render-walkthrough.ts">Render walkthrough from template</action>
65
+ <action>Save to: .specs-fire/runs/{run-id}/walkthrough.md</action>
66
+ <output>
67
+ Walkthrough generated: .specs-fire/runs/{run-id}/walkthrough.md
68
+ </output>
69
+ </step>
70
+
71
+ </skill>
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Output
77
+
78
+ **Walkthrough** (`.specs-fire/runs/{run-id}/walkthrough.md`):
79
+
80
+ ```markdown
81
+ ---
82
+ run: {run-id}
83
+ work_item: {work-item-id}
84
+ intent: {intent-id}
85
+ generated: {timestamp}
86
+ mode: {mode}
87
+ ---
88
+
89
+ # Implementation Walkthrough: {title}
90
+
91
+ ## Summary
92
+
93
+ {2-3 sentences describing what was implemented}
94
+
95
+ ## Files Changed
96
+
97
+ ### Created
98
+
99
+ | File | Purpose |
100
+ |------|---------|
101
+ | `{path}` | {purpose} |
102
+
103
+ ### Modified
104
+
105
+ | File | Changes |
106
+ |------|---------|
107
+ | `{path}` | {changes} |
108
+
109
+ ## Key Implementation Details
110
+
111
+ ### 1. {Detail Title}
112
+
113
+ {description of implementation approach}
114
+
115
+ ## Decisions Made
116
+
117
+ | Decision | Choice | Rationale |
118
+ |----------|--------|-----------|
119
+ | {decision} | {choice} | {rationale} |
120
+
121
+ ## How to Verify
122
+
123
+ 1. **{Step Title}**
124
+ ```bash
125
+ {command}
126
+ ```
127
+ Expected: {expected output}
128
+
129
+ 2. **{Step Title}**
130
+ {manual verification steps}
131
+
132
+ ## Test Coverage
133
+
134
+ - Tests added: {count}
135
+ - Coverage: {percentage}%
136
+ - Status: {passing/failing}
137
+
138
+ ---
139
+ *Generated by FIRE Run {run-id}*
140
+ ```