@ydtb/specsmd 0.1.22

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 (143) hide show
  1. package/README.md +322 -0
  2. package/bin/cli.js +21 -0
  3. package/flows/aidlc/README.md +372 -0
  4. package/flows/aidlc/agents/construction-agent.md +80 -0
  5. package/flows/aidlc/agents/inception-agent.md +97 -0
  6. package/flows/aidlc/agents/master-agent.md +61 -0
  7. package/flows/aidlc/agents/operations-agent.md +89 -0
  8. package/flows/aidlc/commands/construction-agent.md +67 -0
  9. package/flows/aidlc/commands/inception-agent.md +59 -0
  10. package/flows/aidlc/commands/master-agent.md +51 -0
  11. package/flows/aidlc/commands/operations-agent.md +81 -0
  12. package/flows/aidlc/context-config.yaml +67 -0
  13. package/flows/aidlc/memory-bank.yaml +105 -0
  14. package/flows/aidlc/quick-start.md +322 -0
  15. package/flows/aidlc/scripts/artifact-validator.cjs +594 -0
  16. package/flows/aidlc/scripts/bolt-complete.cjs +606 -0
  17. package/flows/aidlc/scripts/status-integrity.cjs +598 -0
  18. package/flows/aidlc/skills/construction/bolt-list.md +163 -0
  19. package/flows/aidlc/skills/construction/bolt-replan.md +345 -0
  20. package/flows/aidlc/skills/construction/bolt-start.md +442 -0
  21. package/flows/aidlc/skills/construction/bolt-status.md +185 -0
  22. package/flows/aidlc/skills/construction/navigator.md +196 -0
  23. package/flows/aidlc/skills/construction/prototype-apply.md +311 -0
  24. package/flows/aidlc/skills/inception/bolt-plan.md +372 -0
  25. package/flows/aidlc/skills/inception/context.md +171 -0
  26. package/flows/aidlc/skills/inception/intent-create.md +211 -0
  27. package/flows/aidlc/skills/inception/intent-list.md +124 -0
  28. package/flows/aidlc/skills/inception/navigator.md +207 -0
  29. package/flows/aidlc/skills/inception/requirements.md +227 -0
  30. package/flows/aidlc/skills/inception/review.md +248 -0
  31. package/flows/aidlc/skills/inception/story-create.md +304 -0
  32. package/flows/aidlc/skills/inception/units.md +278 -0
  33. package/flows/aidlc/skills/inception/vibe-to-spec.md +410 -0
  34. package/flows/aidlc/skills/master/analyze-context.md +239 -0
  35. package/flows/aidlc/skills/master/answer-question.md +141 -0
  36. package/flows/aidlc/skills/master/explain-flow.md +158 -0
  37. package/flows/aidlc/skills/master/project-init.md +281 -0
  38. package/flows/aidlc/skills/master/route-request.md +126 -0
  39. package/flows/aidlc/skills/operations/build.md +237 -0
  40. package/flows/aidlc/skills/operations/deploy.md +259 -0
  41. package/flows/aidlc/skills/operations/monitor.md +265 -0
  42. package/flows/aidlc/skills/operations/navigator.md +209 -0
  43. package/flows/aidlc/skills/operations/verify.md +224 -0
  44. package/flows/aidlc/templates/construction/bolt-template.md +226 -0
  45. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +49 -0
  46. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +55 -0
  47. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +67 -0
  48. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +62 -0
  49. package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +590 -0
  50. package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +347 -0
  51. package/flows/aidlc/templates/construction/bolt-types/spike-bolt.md +240 -0
  52. package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
  53. package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
  54. package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
  55. package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
  56. package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
  57. package/flows/aidlc/templates/inception/project/README.md +55 -0
  58. package/flows/aidlc/templates/inception/requirements-template.md +144 -0
  59. package/flows/aidlc/templates/inception/stories-template.md +38 -0
  60. package/flows/aidlc/templates/inception/story-template.md +147 -0
  61. package/flows/aidlc/templates/inception/system-context-template.md +29 -0
  62. package/flows/aidlc/templates/inception/unit-brief-template.md +177 -0
  63. package/flows/aidlc/templates/inception/units-template.md +52 -0
  64. package/flows/aidlc/templates/standards/catalog.yaml +345 -0
  65. package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
  66. package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
  67. package/flows/aidlc/templates/standards/decision-index-template.md +32 -0
  68. package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
  69. package/flows/fire/README.md +19 -0
  70. package/flows/fire/agents/builder/agent.md +254 -0
  71. package/flows/fire/agents/builder/skills/code-review/SKILL.md +257 -0
  72. package/flows/fire/agents/builder/skills/code-review/references/auto-fix-rules.md +218 -0
  73. package/flows/fire/agents/builder/skills/code-review/references/review-categories.md +154 -0
  74. package/flows/fire/agents/builder/skills/code-review/templates/review-report.md.hbs +120 -0
  75. package/flows/fire/agents/builder/skills/commit-changes/SKILL.md +232 -0
  76. package/flows/fire/agents/builder/skills/commit-changes/scripts/commit-changes.cjs +447 -0
  77. package/flows/fire/agents/builder/skills/run-execute/SKILL.md +700 -0
  78. package/flows/fire/agents/builder/skills/run-execute/scripts/complete-run.cjs +748 -0
  79. package/flows/fire/agents/builder/skills/run-execute/scripts/init-run.cjs +457 -0
  80. package/flows/fire/agents/builder/skills/run-execute/scripts/update-phase.cjs +239 -0
  81. package/flows/fire/agents/builder/skills/run-execute/templates/plan.md.hbs +61 -0
  82. package/flows/fire/agents/builder/skills/run-execute/templates/test-report.md.hbs +81 -0
  83. package/flows/fire/agents/builder/skills/run-plan/SKILL.md +366 -0
  84. package/flows/fire/agents/builder/skills/run-status/SKILL.md +96 -0
  85. package/flows/fire/agents/builder/skills/walkthrough-generate/SKILL.md +181 -0
  86. package/flows/fire/agents/builder/skills/walkthrough-generate/templates/walkthrough.md.hbs +108 -0
  87. package/flows/fire/agents/orchestrator/agent.md +144 -0
  88. package/flows/fire/agents/orchestrator/skills/project-init/SKILL.md +226 -0
  89. package/flows/fire/agents/orchestrator/skills/project-init/templates/coding-standards.md.hbs +149 -0
  90. package/flows/fire/agents/orchestrator/skills/project-init/templates/constitution.md.hbs +43 -0
  91. package/flows/fire/agents/orchestrator/skills/project-init/templates/system-architecture.md.hbs +101 -0
  92. package/flows/fire/agents/orchestrator/skills/project-init/templates/tech-stack.md.hbs +136 -0
  93. package/flows/fire/agents/orchestrator/skills/project-init/templates/testing-standards.md.hbs +94 -0
  94. package/flows/fire/agents/orchestrator/skills/route/SKILL.md +146 -0
  95. package/flows/fire/agents/orchestrator/skills/status/SKILL.md +696 -0
  96. package/flows/fire/agents/planner/agent.md +143 -0
  97. package/flows/fire/agents/planner/skills/design-doc-generate/SKILL.md +156 -0
  98. package/flows/fire/agents/planner/skills/design-doc-generate/templates/design.md.hbs +124 -0
  99. package/flows/fire/agents/planner/skills/intent-capture/SKILL.md +125 -0
  100. package/flows/fire/agents/planner/skills/intent-capture/templates/brief.md.hbs +40 -0
  101. package/flows/fire/agents/planner/skills/work-item-decompose/SKILL.md +166 -0
  102. package/flows/fire/agents/planner/skills/work-item-decompose/templates/work-item.md.hbs +40 -0
  103. package/flows/fire/commands/fire-builder.md +56 -0
  104. package/flows/fire/commands/fire-planner.md +48 -0
  105. package/flows/fire/commands/fire.md +46 -0
  106. package/flows/fire/memory-bank.yaml +240 -0
  107. package/flows/fire/quick-start.md +146 -0
  108. package/flows/simple/README.md +190 -0
  109. package/flows/simple/agents/agent.md +404 -0
  110. package/flows/simple/commands/agent.md +60 -0
  111. package/flows/simple/context-config.yaml +34 -0
  112. package/flows/simple/memory-bank.yaml +66 -0
  113. package/flows/simple/quick-start.md +231 -0
  114. package/flows/simple/skills/design.md +96 -0
  115. package/flows/simple/skills/execute.md +190 -0
  116. package/flows/simple/skills/requirements.md +94 -0
  117. package/flows/simple/skills/tasks.md +136 -0
  118. package/flows/simple/templates/design-template.md +138 -0
  119. package/flows/simple/templates/requirements-template.md +85 -0
  120. package/flows/simple/templates/tasks-template.md +104 -0
  121. package/lib/InstallerFactory.js +36 -0
  122. package/lib/analytics/env-detector.js +92 -0
  123. package/lib/analytics/index.js +22 -0
  124. package/lib/analytics/machine-id.js +33 -0
  125. package/lib/analytics/tracker.js +232 -0
  126. package/lib/cli-utils.js +342 -0
  127. package/lib/constants.js +44 -0
  128. package/lib/installer.js +406 -0
  129. package/lib/installers/AntigravityInstaller.js +22 -0
  130. package/lib/installers/ClaudeInstaller.js +85 -0
  131. package/lib/installers/ClineInstaller.js +21 -0
  132. package/lib/installers/CodexInstaller.js +21 -0
  133. package/lib/installers/CopilotInstaller.js +113 -0
  134. package/lib/installers/CursorInstaller.js +63 -0
  135. package/lib/installers/GeminiInstaller.js +75 -0
  136. package/lib/installers/KiroInstaller.js +77 -0
  137. package/lib/installers/OpenCodeInstaller.js +30 -0
  138. package/lib/installers/RooInstaller.js +22 -0
  139. package/lib/installers/ToolInstaller.js +76 -0
  140. package/lib/installers/WindsurfInstaller.js +22 -0
  141. package/lib/markdown-validator.ts +175 -0
  142. package/lib/yaml-validator.ts +99 -0
  143. package/package.json +69 -0
@@ -0,0 +1,61 @@
1
+ ---
2
+ run: {{run_id}}
3
+ work_item: {{work_item_id}}
4
+ intent: {{intent_id}}
5
+ mode: {{mode}}
6
+ checkpoint: {{checkpoint_type}}
7
+ approved_at: {{approved_at}}
8
+ ---
9
+
10
+ # Implementation Plan: {{title}}
11
+
12
+ ## Approach
13
+
14
+ {{approach}}
15
+
16
+ ## Files to Create
17
+
18
+ | File | Purpose |
19
+ |------|---------|
20
+ {{#each files_to_create}}
21
+ | `{{this.path}}` | {{this.purpose}} |
22
+ {{/each}}
23
+ {{#unless files_to_create}}
24
+ | (none) | |
25
+ {{/unless}}
26
+
27
+ ## Files to Modify
28
+
29
+ | File | Changes |
30
+ |------|---------|
31
+ {{#each files_to_modify}}
32
+ | `{{this.path}}` | {{this.changes}} |
33
+ {{/each}}
34
+ {{#unless files_to_modify}}
35
+ | (none) | |
36
+ {{/unless}}
37
+
38
+ {{#if tests}}
39
+ ## Tests
40
+
41
+ | Test File | Coverage |
42
+ |-----------|----------|
43
+ {{#each tests}}
44
+ | `{{this.path}}` | {{this.coverage}} |
45
+ {{/each}}
46
+ {{/if}}
47
+
48
+ {{#if technical_details}}
49
+ ## Technical Details
50
+
51
+ {{technical_details}}
52
+ {{/if}}
53
+
54
+ {{#if design_doc}}
55
+ ## Based on Design Doc
56
+
57
+ Reference: `{{design_doc}}`
58
+ {{/if}}
59
+
60
+ ---
61
+ *Plan approved at checkpoint. Execution follows.*
@@ -0,0 +1,81 @@
1
+ ---
2
+ run: {{run_id}}
3
+ work_item: {{work_item_id}}
4
+ intent: {{intent_id}}
5
+ generated: {{generated_at}}
6
+ status: {{status}}
7
+ ---
8
+
9
+ # Test Report: {{title}}
10
+
11
+ ## Summary
12
+
13
+ | Category | Passed | Failed | Skipped | Coverage |
14
+ |----------|--------|--------|---------|----------|
15
+ | Unit | {{unit_passed}} | {{unit_failed}} | {{unit_skipped}} | {{unit_coverage}}% |
16
+ | Integration | {{integration_passed}} | {{integration_failed}} | {{integration_skipped}} | {{integration_coverage}}% |
17
+ | **Total** | {{total_passed}} | {{total_failed}} | {{total_skipped}} | {{total_coverage}}% |
18
+
19
+ ## Acceptance Criteria Validation
20
+
21
+ {{#each acceptance_criteria}}
22
+ - {{#if this.passed}}✅{{else}}❌{{/if}} **{{this.criterion}}** — {{this.status}}
23
+ {{/each}}
24
+
25
+ ## Tests Written
26
+
27
+ ### Unit Tests
28
+
29
+ {{#each unit_tests}}
30
+ - `{{this.file}}` — {{this.description}}
31
+ {{/each}}
32
+
33
+ ### Integration Tests
34
+
35
+ {{#each integration_tests}}
36
+ - `{{this.file}}` — {{this.description}}
37
+ {{/each}}
38
+
39
+ ## Test Commands
40
+
41
+ ```bash
42
+ # Run all tests
43
+ {{test_command}}
44
+
45
+ # Run with coverage
46
+ {{coverage_command}}
47
+ ```
48
+
49
+ ## Coverage Details
50
+
51
+ {{#if coverage_details}}
52
+ | Module | Statements | Branches | Functions | Lines |
53
+ |--------|------------|----------|-----------|-------|
54
+ {{#each coverage_details}}
55
+ | `{{this.module}}` | {{this.statements}}% | {{this.branches}}% | {{this.functions}}% | {{this.lines}}% |
56
+ {{/each}}
57
+ {{else}}
58
+ Coverage details not available.
59
+ {{/if}}
60
+
61
+ ## Issues Found
62
+
63
+ {{#if issues}}
64
+ | Issue | Severity | Status |
65
+ |-------|----------|--------|
66
+ {{#each issues}}
67
+ | {{this.description}} | {{this.severity}} | {{this.status}} |
68
+ {{/each}}
69
+ {{else}}
70
+ No issues found during testing.
71
+ {{/if}}
72
+
73
+ ## Ready for Completion
74
+
75
+ - [{{#if all_tests_pass}}x{{else}} {{/if}}] All tests passing
76
+ - [{{#if coverage_met}}x{{else}} {{/if}}] Coverage target met ({{coverage_target}}%)
77
+ - [{{#if acceptance_met}}x{{else}} {{/if}}] All acceptance criteria validated
78
+ - [{{#if no_critical_issues}}x{{else}} {{/if}}] No critical issues open
79
+
80
+ ---
81
+ *Generated by specs.md - fabriqa.ai FIRE Flow Run {{run_id}}*
@@ -0,0 +1,366 @@
1
+ ---
2
+ name: run-plan
3
+ description: Plan the scope of a run by discovering available work items and suggesting groupings. Invoked before run-execute.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ <objective>
8
+ Plan the scope of a run by discovering available work items and suggesting groupings.
9
+ </objective>
10
+
11
+ <triggers>
12
+ - After work-item decomposition completes
13
+ - User wants to start execution
14
+ - Pending work items exist
15
+ </triggers>
16
+
17
+ <degrees_of_freedom>
18
+ **MEDIUM** — Present smart grouping suggestions but let user choose scope.
19
+ </degrees_of_freedom>
20
+
21
+ <llm critical="true">
22
+ <mandate>DISCOVER all available work — both in state.yaml AND file system</mandate>
23
+ <mandate>FILE SYSTEM IS SOURCE OF TRUTH — state.yaml may be incomplete</mandate>
24
+ <mandate>ALWAYS SCAN FILE SYSTEM — even if state.yaml shows all completed</mandate>
25
+ <mandate>SUGGEST smart groupings based on mode, dependencies, and user history</mandate>
26
+ <mandate>LEARN from user choices to improve future recommendations</mandate>
27
+ <mandate>NEVER force a scope — always let user choose</mandate>
28
+ <mandate>DEPENDENCIES = SEQUENTIAL EXECUTION, NOT SEPARATE RUNS</mandate>
29
+ </llm>
30
+
31
+ <critical_clarifications>
32
+ <clarification title="Dependencies Mean Sequential Execution, NOT Separate Runs">
33
+ When work items have dependencies:
34
+ - They execute **sequentially within the SAME run**
35
+ - They do **NOT** require separate runs
36
+ - The dependent item waits for its dependency to complete before starting
37
+
38
+ **Example**: If item 05 depends on item 04:
39
+ - **CORRECT**: ONE run with both items, 04 executes first, then 05
40
+ - **WRONG**: TWO separate runs
41
+ </clarification>
42
+
43
+ <clarification title="All Options Can Include Multiple Items Per Run">
44
+ | Option | Items Per Run | Execution |
45
+ |--------|---------------|-----------|
46
+ | Single | 1 item | One at a time, separate runs |
47
+ | Batch | Multiple items (same mode) | Sequential within run |
48
+ | Wide | All compatible items | Sequential within run |
49
+ </clarification>
50
+ </critical_clarifications>
51
+
52
+ <flow>
53
+ <step n="1" title="Discover Available Work" critical="true">
54
+ <critical>
55
+ MUST scan file system BEFORE deciding if work exists.
56
+ state.yaml may be missing intents or work items that exist on disk.
57
+ DO NOT skip this step even if state.yaml shows all items completed.
58
+ </critical>
59
+
60
+ <substep n="1a" title="List All Intent Directories">
61
+ <action>Use Glob to list: .specs-fire/intents/*/brief.md</action>
62
+ <action>Extract intent IDs from directory names</action>
63
+ <output>Found intent directories: {list}</output>
64
+ </substep>
65
+
66
+ <substep n="1b" title="List All Work Item Files">
67
+ <action>Use Glob to list: .specs-fire/intents/*/work-items/*.md</action>
68
+ <action>Extract work item IDs and their parent intents</action>
69
+ <output>Found work item files: {list}</output>
70
+ </substep>
71
+
72
+ <substep n="1c" title="Compare with state.yaml">
73
+ <action>Read state.yaml for known intents and work items</action>
74
+ <action>Compare file system list against state.yaml entries</action>
75
+ </substep>
76
+
77
+ <substep n="1d" title="Reconcile Differences">
78
+ <check if="intent directory exists but not in state.yaml">
79
+ <output>
80
+ **Discovered new intent**: {intent-id}
81
+ (exists in file system but not in state.yaml)
82
+ </output>
83
+ <action>Parse brief.md frontmatter for intent metadata</action>
84
+ <action>Add intent to state.yaml with status: active</action>
85
+ <action>Scan its work-items/ folder</action>
86
+ </check>
87
+
88
+ <check if="work item file exists but not in state.yaml">
89
+ <output>
90
+ **Discovered new work item**: {work-item-id} in {intent-id}
91
+ (exists in file system but not in state.yaml)
92
+ </output>
93
+ <action>Parse work item frontmatter for metadata</action>
94
+ <action>Add work item to state.yaml with status: pending</action>
95
+ </check>
96
+
97
+ <check if="work item exists in both but status mismatch">
98
+ <note>
99
+ state.yaml is authoritative for status (tracks run history).
100
+ Frontmatter status may be stale from initial creation.
101
+ </note>
102
+ <output>
103
+ **Status mismatch**: {work-item-id}
104
+ - state.yaml: {state_status}
105
+ - frontmatter: {frontmatter_status}
106
+ (Using state.yaml as authoritative)
107
+ </output>
108
+ <action if="frontmatter says pending but state says completed">
109
+ Update work item frontmatter to match state.yaml
110
+ </action>
111
+ <action if="state says pending but frontmatter says completed">
112
+ Flag for review - work may have been done outside FIRE
113
+ </action>
114
+ </check>
115
+
116
+ <check if="in state.yaml but file missing">
117
+ <output>Warning: {item} in state but file not found on disk</output>
118
+ </check>
119
+ </substep>
120
+
121
+ <output>
122
+ ## File System Scan Complete
123
+
124
+ Intents on disk: {count}
125
+ Intents in state.yaml: {count}
126
+ Work items on disk: {count}
127
+ Work items in state.yaml: {count}
128
+
129
+ {if new items discovered}
130
+ **Newly discovered (added to state.yaml)**:
131
+ {list new items}
132
+ {/if}
133
+ </output>
134
+ </step>
135
+
136
+ <step n="2" title="Collect Pending Work Items">
137
+ <action>Filter work items with status == pending</action>
138
+ <action>Group by intent</action>
139
+ <action>Note mode (after autonomy_bias applied) for each</action>
140
+ <action>Identify dependencies within and across intents</action>
141
+
142
+ <check if="no pending work items">
143
+ <output>
144
+ No pending work items found.
145
+
146
+ Create a new intent? [Y/n]
147
+ </output>
148
+ <check if="response == y">
149
+ <route_to>planner-agent (intent-capture)</route_to>
150
+ </check>
151
+ <stop/>
152
+ </check>
153
+ </step>
154
+
155
+ <step n="3" title="Analyze Groupings">
156
+ <action>Read workspace.autonomy_bias from state.yaml</action>
157
+ <action>Read workspace.run_scope_preference from state.yaml (if exists)</action>
158
+
159
+ <grouping_rules>
160
+ <rule>Dependencies = SEQUENTIAL execution in SAME run (NOT separate runs)</rule>
161
+ <rule>batch mode: Group items BY mode type (autopilot together, confirm together, etc.)</rule>
162
+ <rule>wide mode: ALL items in ONE run regardless of mode (executed sequentially)</rule>
163
+ <rule>Cross-intent items allowed in same run if compatible</rule>
164
+ <rule>Validate mode items may benefit from batch (separate run with focused checkpoints)</rule>
165
+ </grouping_rules>
166
+
167
+ <generate_options>
168
+ <option name="single">
169
+ Each work item in its own run
170
+ Total runs: {count of pending items}
171
+ Maximum control, review after each item
172
+ </option>
173
+
174
+ <option name="batch">
175
+ Group items BY MODE into separate runs
176
+ Total runs: 1 per mode type present (e.g., autopilot run, confirm run, validate run)
177
+ Less context switching within each run
178
+ Example: 3 autopilot + 2 confirm + 1 validate = 3 runs
179
+ </option>
180
+
181
+ <option name="wide">
182
+ ALL items in ONE run regardless of mode
183
+ Total runs: 1
184
+ Execute sequentially, pause at confirm/validate checkpoints
185
+ Maximum throughput, minimum interruption between runs
186
+ </option>
187
+ </generate_options>
188
+ </step>
189
+
190
+ <step n="4" title="Present Options">
191
+ <action>Determine recommended option based on:</action>
192
+ <substep>autonomy_bias (autonomous→batch, controlled→single)</substep>
193
+ <substep>run_scope_preference (user's historical choice)</substep>
194
+ <substep>Number of pending items (few items→single is fine)</substep>
195
+
196
+ <template_output section="options">
197
+ ## Run Planning
198
+
199
+ **Found**: {count} pending work items across {intent_count} intent(s)
200
+
201
+ {for each intent with pending items}
202
+ **{intent.title}**:
203
+ {for each pending item}
204
+ - {item.title} ({item.mode})
205
+ {/for}
206
+ {/for}
207
+
208
+ {if dependencies exist}
209
+ **Dependencies** (determines execution order):
210
+ - {dependent_item} depends on {dependency_item}
211
+ {/if}
212
+
213
+ ---
214
+
215
+ **How would you like to execute?**
216
+
217
+ **[1] One at a time** — {single_count} separate runs
218
+ Most controlled, review after each run
219
+
220
+ **[2] Group by mode** — {batch_run_count} run(s)
221
+ {autopilot_count} autopilot items → Run A (no pauses)
222
+ {confirm_count} confirm items → Run B (1 checkpoint each)
223
+ {validate_count} validate items → Run C (2 checkpoints each)
224
+ Less context switching per run
225
+
226
+ **[3] All in one** — 1 run with all {count} items (Recommended)
227
+ Execute sequentially: {item1} → {item2} → ...
228
+ Pause at confirm/validate checkpoints
229
+ Maximum throughput
230
+
231
+ Choose [1/2/3]:
232
+ </template_output>
233
+ </step>
234
+
235
+ <step n="5" title="Process Choice">
236
+ <check if="response == 1">
237
+ <set>run_scope = single</set>
238
+ <set>work_items_for_run = [first_pending_item]</set>
239
+ <note>User will re-invoke run-plan after each run completes</note>
240
+ </check>
241
+
242
+ <check if="response == 2">
243
+ <set>run_scope = batch</set>
244
+ <action>Group pending items by mode:</action>
245
+ <substep>autopilot_items = items where mode == autopilot</substep>
246
+ <substep>confirm_items = items where mode == confirm</substep>
247
+ <substep>validate_items = items where mode == validate</substep>
248
+ <action>Start with first non-empty group (autopilot preferred)</action>
249
+ <set>work_items_for_run = first_mode_group_in_dependency_order</set>
250
+ <note>After this run, user re-invokes for next mode group</note>
251
+ </check>
252
+
253
+ <check if="response == 3">
254
+ <set>run_scope = wide</set>
255
+ <set>work_items_for_run = all_pending_items_in_dependency_order</set>
256
+ <note>All items in one run, sequential execution</note>
257
+ </check>
258
+ </step>
259
+
260
+ <step n="6" title="Learn Preference">
261
+ <action>Update workspace.run_scope_preference in state.yaml</action>
262
+ <action>Add to workspace.run_scope_history (keep last 10)</action>
263
+
264
+ <history_entry>
265
+ choice: {run_scope}
266
+ items_count: {count}
267
+ timestamp: {now}
268
+ </history_entry>
269
+
270
+ <note>
271
+ After 3+ consistent choices, start pre-selecting that option
272
+ and ask "Proceed with {preference}? [Y/n/change]" instead
273
+ </note>
274
+ </step>
275
+
276
+ <step n="7" title="Confirm Run">
277
+ <output>
278
+ Starting run with {count} work item(s):
279
+
280
+ {for each item in work_items_for_run}
281
+ {index}. {item.title} ({item.mode})
282
+ {/for}
283
+
284
+ Items will execute sequentially within this run.
285
+ {if any item is confirm or validate}
286
+ Checkpoints will pause for approval at confirm/validate items.
287
+ {/if}
288
+
289
+ ---
290
+
291
+ Begin execution? [Y/n]
292
+ </output>
293
+ <check if="response == y">
294
+ <invoke_skill args="work_items_for_run, run_scope">run-execute</invoke_skill>
295
+ </check>
296
+ </step>
297
+ </flow>
298
+
299
+
300
+ <file_discovery_logic>
301
+
302
+ ```
303
+ .specs-fire/
304
+ ├── intents/
305
+ │ ├── user-auth/
306
+ │ │ ├── brief.md ← Parse frontmatter for intent metadata
307
+ │ │ └── work-items/
308
+ │ │ ├── login-endpoint.md ← Parse for work item metadata
309
+ │ │ └── session-mgmt.md
310
+ │ └── analytics/
311
+ │ ├── brief.md
312
+ │ └── work-items/
313
+ │ └── dashboard.md
314
+ ```
315
+
316
+ **Frontmatter parsing**:
317
+
318
+ - Extract `id`, `title`, `status` from YAML frontmatter
319
+ - If status missing, default to `pending`
320
+ - If in file but not state.yaml, add to state
321
+ </file_discovery_logic>
322
+
323
+ <grouping_algorithm>
324
+
325
+ ```
326
+ 1. Collect all pending items with their modes
327
+ 2. Build dependency graph
328
+ 3. Sort items in dependency order (dependencies first)
329
+ 4. For "single" option:
330
+ - Each item is its own run
331
+ 5. For "batch" or "wide" option:
332
+ - ALL items in ONE run
333
+ - Execution order follows dependency graph
334
+ - Checkpoints pause at confirm/validate items
335
+ ```
336
+
337
+ </grouping_algorithm>
338
+
339
+ <recommendation_logic>
340
+
341
+ ```
342
+ IF run_scope_history has 3+ same choices:
343
+ pre_selected = most_common_choice
344
+
345
+ ELSE IF autonomy_bias == autonomous:
346
+ recommended = batch (all in one run)
347
+
348
+ ELSE IF autonomy_bias == controlled:
349
+ recommended = single
350
+
351
+ ELSE: # balanced
352
+ IF pending_count <= 2:
353
+ recommended = single
354
+ ELSE:
355
+ recommended = batch
356
+ ```
357
+
358
+ </recommendation_logic>
359
+
360
+ <success_criteria>
361
+ <criterion>File system scanned for all intents and work items</criterion>
362
+ <criterion>state.yaml reconciled with file system</criterion>
363
+ <criterion>Run scope options presented to user</criterion>
364
+ <criterion>User choice recorded for future recommendations</criterion>
365
+ <criterion>run-execute invoked with selected work items</criterion>
366
+ </success_criteria>
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: run-status
3
+ description: Display current run status and progress. Shows work item, mode, duration, and files changed.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ <objective>
8
+ Display current run status and progress.
9
+ </objective>
10
+
11
+ <triggers>
12
+ - User asks about run status
13
+ - During long-running execution
14
+ </triggers>
15
+
16
+ <flow>
17
+ <step n="1" title="Check Active Run">
18
+ <action>Read state.yaml for runs.active[] array</action>
19
+ <check if="no active run">
20
+ <output>
21
+ No active run. Last completed run: {last-run-id}
22
+ </output>
23
+ <stop/>
24
+ </check>
25
+ </step>
26
+
27
+ <step n="2" title="Display Status">
28
+ <output>
29
+ ## Run Status: {run-id}
30
+
31
+ **Work Item**: {title}
32
+ **Intent**: {intent-title}
33
+ **Mode**: {mode}
34
+ **Started**: {started}
35
+ **Duration**: {elapsed}
36
+
37
+ ### Progress
38
+
39
+ - [x] Initialize run
40
+ - [x] Load context
41
+ {checkpoint status}
42
+ - [{status}] Execute implementation
43
+ - [ ] Run tests
44
+ - [ ] Generate walkthrough
45
+
46
+ ### Files Changed So Far
47
+
48
+ Created: {created-count}
49
+ Modified: {modified-count}
50
+
51
+ ### Recent Activity
52
+
53
+ {last 5 actions}
54
+ </output>
55
+ </step>
56
+ </flow>
57
+
58
+ <example_output>
59
+
60
+ ```
61
+ ## Run Status: run-003
62
+
63
+ **Work Item**: Add session management
64
+ **Intent**: User Authentication
65
+ **Mode**: confirm
66
+ **Started**: 2026-01-19T10:30:00Z
67
+ **Duration**: 12 minutes
68
+
69
+ ### Progress
70
+
71
+ - [x] Initialize run
72
+ - [x] Load context
73
+ - [x] Plan approved (Checkpoint 1)
74
+ - [~] Execute implementation
75
+ - [ ] Run tests
76
+ - [ ] Generate walkthrough
77
+
78
+ ### Files Changed So Far
79
+
80
+ Created: 2
81
+ Modified: 1
82
+
83
+ ### Recent Activity
84
+
85
+ - Created src/auth/session.ts
86
+ - Created src/auth/session.test.ts
87
+ - Modified src/auth/index.ts
88
+ ```
89
+
90
+ </example_output>
91
+
92
+ <success_criteria>
93
+ <criterion>Current run status displayed</criterion>
94
+ <criterion>Progress indicators accurate</criterion>
95
+ <criterion>Files changed shown</criterion>
96
+ </success_criteria>