@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,181 @@
1
+ ---
2
+ name: walkthrough-generate
3
+ description: Generate implementation walkthrough for human review after run completion. Documents decisions, changes, and verification steps.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ <objective>
8
+ Generate implementation walkthrough for human review after run completion.
9
+ </objective>
10
+
11
+ <triggers>
12
+ - Run completed successfully
13
+ - Invoked by run-execute skill
14
+ </triggers>
15
+
16
+ <degrees_of_freedom>
17
+ **LOW** — Follow walkthrough structure precisely. Be thorough but concise.
18
+ </degrees_of_freedom>
19
+
20
+ <llm critical="true">
21
+ <mandate>ALWAYS generate walkthrough after run completion</mandate>
22
+ <mandate>Document DECISIONS, not just changes</mandate>
23
+ <mandate>Include verification steps — how to test this works</mandate>
24
+ <mandate>Track DEVIATIONS from plan — compare to original work item</mandate>
25
+ <mandate>List ALL new dependencies added during implementation</mandate>
26
+ <mandate>Capture developer notes — gotchas save future debugging time</mandate>
27
+ </llm>
28
+
29
+ <flow>
30
+ <step n="1" title="Gather Implementation Data">
31
+ <action>Read run log from .specs-fire/runs/{run-id}/run.md</action>
32
+ <action>Read work item plan from .specs-fire/intents/{intent}/work-items/{work-item}/</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
+ <substep>Dependencies added (new packages in package.json, requirements.txt, etc.)</substep>
40
+ <substep>Deviations from the original work item plan</substep>
41
+ </step>
42
+
43
+ <step n="2" title="Analyze Implementation">
44
+ <action>For each file created/modified:</action>
45
+ <substep>Identify purpose of the file</substep>
46
+ <substep>Summarize key changes</substep>
47
+ <substep>Note patterns or approaches used</substep>
48
+ <action>Document structure overview:</action>
49
+ <substep>How the pieces fit together architecturally</substep>
50
+ <substep>Data flow or component relationships</substep>
51
+ <substep>Keep high-level, NO CODE</substep>
52
+ </step>
53
+
54
+ <step n="3" title="Document Key Details">
55
+ <action>Extract implementation highlights:</action>
56
+ <substep>Main flow/algorithm implemented</substep>
57
+ <substep>Security considerations (if applicable)</substep>
58
+ <substep>Performance considerations (if applicable)</substep>
59
+ <substep>Integration points with existing code</substep>
60
+ <action>Document deviations from plan:</action>
61
+ <substep>Compare implementation to original work item plan</substep>
62
+ <substep>Note any changes and explain WHY they were made</substep>
63
+ <substep>If no deviations, state "None"</substep>
64
+ <action>Capture developer notes:</action>
65
+ <substep>Gotchas or non-obvious behaviors</substep>
66
+ <substep>Tips for future developers</substep>
67
+ <substep>Context that would save debugging time</substep>
68
+ </step>
69
+
70
+ <step n="4" title="Create Verification Steps">
71
+ <action>Generate how-to-verify section:</action>
72
+ <substep>Commands to run the feature</substep>
73
+ <substep>Expected behavior/output</substep>
74
+ <substep>Manual test scenarios</substep>
75
+ </step>
76
+
77
+ <step n="5" title="Generate Walkthrough">
78
+ <action>Generate walkthrough using template: templates/walkthrough.md.hbs</action>
79
+ <action>Save to: .specs-fire/runs/{run-id}/walkthrough.md</action>
80
+ <output>
81
+ Walkthrough generated: .specs-fire/runs/{run-id}/walkthrough.md
82
+ </output>
83
+ </step>
84
+ </flow>
85
+
86
+ <output_template>
87
+ **Walkthrough** (`.specs-fire/runs/{run-id}/walkthrough.md`):
88
+
89
+ ```markdown
90
+ ---
91
+ run: {run-id}
92
+ work_item: {work-item-id}
93
+ intent: {intent-id}
94
+ generated: {timestamp}
95
+ mode: {mode}
96
+ ---
97
+
98
+ # Implementation Walkthrough: {title}
99
+
100
+ ## Summary
101
+
102
+ {2-3 sentences describing what was implemented}
103
+
104
+ ## Structure Overview
105
+
106
+ {High-level description of how pieces fit together - NO CODE}
107
+
108
+ ## Files Changed
109
+
110
+ ### Created
111
+
112
+ | File | Purpose |
113
+ |------|---------|
114
+ | `{path}` | {purpose} |
115
+
116
+ ### Modified
117
+
118
+ | File | Changes |
119
+ |------|---------|
120
+ | `{path}` | {changes} |
121
+
122
+ ## Key Implementation Details
123
+
124
+ ### 1. {Detail Title}
125
+
126
+ {description of implementation approach}
127
+
128
+ ## Decisions Made
129
+
130
+ | Decision | Choice | Rationale |
131
+ |----------|--------|-----------|
132
+ | {decision} | {choice} | {rationale} |
133
+
134
+ ## Deviations from Plan
135
+
136
+ {Changes from work item plan and why, or "None"}
137
+
138
+ ## Dependencies Added
139
+
140
+ | Package | Why Needed |
141
+ |---------|------------|
142
+ | `{package}` | {reason} |
143
+
144
+ ## How to Verify
145
+
146
+ 1. **{Step Title}**
147
+ ```bash
148
+ {command}
149
+ ```
150
+ Expected: {expected output}
151
+
152
+ 2. **{Step Title}**
153
+ {manual verification steps}
154
+
155
+ ## Test Coverage
156
+
157
+ - Tests added: {count}
158
+ - Coverage: {percentage}%
159
+ - Status: {passing/failing}
160
+
161
+ ## Developer Notes
162
+
163
+ {Gotchas, tips, or context for future work - keep brief}
164
+
165
+ ---
166
+ *Generated by specs.md - fabriqa.ai FIRE Flow Run {run-id}*
167
+ ```
168
+
169
+ </output_template>
170
+
171
+ <success_criteria>
172
+ <criterion>Walkthrough generated with all sections</criterion>
173
+ <criterion>Structure overview explains architecture (NO CODE)</criterion>
174
+ <criterion>Files changed documented with purposes</criterion>
175
+ <criterion>Decisions recorded with rationale</criterion>
176
+ <criterion>Deviations from plan documented (or "None")</criterion>
177
+ <criterion>Dependencies added listed with reasons</criterion>
178
+ <criterion>Verification steps included</criterion>
179
+ <criterion>Developer notes capture gotchas and tips</criterion>
180
+ <criterion>Saved to run folder</criterion>
181
+ </success_criteria>
@@ -0,0 +1,108 @@
1
+ ---
2
+ run: {{run_id}}
3
+ work_item: {{work_item_id}}
4
+ intent: {{intent_id}}
5
+ generated: {{generated}}
6
+ mode: {{mode}}
7
+ ---
8
+
9
+ # Implementation Walkthrough: {{title}}
10
+
11
+ ## Summary
12
+
13
+ {{summary}}
14
+
15
+ ## Structure Overview
16
+
17
+ {{structure_overview}}
18
+
19
+ ## Files Changed
20
+
21
+ ### Created
22
+
23
+ | File | Purpose |
24
+ |------|---------|
25
+ {{#each files_created}}
26
+ | `{{this.path}}` | {{this.purpose}} |
27
+ {{/each}}
28
+ {{#unless files_created}}
29
+ | (none) | |
30
+ {{/unless}}
31
+
32
+ ### Modified
33
+
34
+ | File | Changes |
35
+ |------|---------|
36
+ {{#each files_modified}}
37
+ | `{{this.path}}` | {{this.changes}} |
38
+ {{/each}}
39
+ {{#unless files_modified}}
40
+ | (none) | |
41
+ {{/unless}}
42
+
43
+ ## Key Implementation Details
44
+
45
+ {{#each implementation_details}}
46
+ ### {{@index}}. {{this.title}}
47
+
48
+ {{this.description}}
49
+
50
+ {{/each}}
51
+
52
+ ## Decisions Made
53
+
54
+ | Decision | Choice | Rationale |
55
+ |----------|--------|-----------|
56
+ {{#each decisions}}
57
+ | {{this.decision}} | {{this.choice}} | {{this.rationale}} |
58
+ {{/each}}
59
+ {{#unless decisions}}
60
+ | (none) | | |
61
+ {{/unless}}
62
+
63
+ ## Deviations from Plan
64
+
65
+ {{#if deviations}}
66
+ {{deviations}}
67
+ {{else}}
68
+ None
69
+ {{/if}}
70
+
71
+ ## Dependencies Added
72
+
73
+ | Package | Why Needed |
74
+ |---------|------------|
75
+ {{#each dependencies_added}}
76
+ | `{{this.package}}` | {{this.reason}} |
77
+ {{/each}}
78
+ {{#unless dependencies_added}}
79
+ | (none) | |
80
+ {{/unless}}
81
+
82
+ ## How to Verify
83
+
84
+ {{#each verification_steps}}
85
+ {{@index}}. **{{this.title}}**
86
+ ```bash
87
+ {{this.command}}
88
+ ```
89
+ Expected: {{this.expected}}
90
+
91
+ {{/each}}
92
+
93
+ ## Test Coverage
94
+
95
+ - Tests added: {{tests_added}}
96
+ - Coverage: {{coverage}}%
97
+ - Status: {{test_status}}
98
+
99
+ ## Developer Notes
100
+
101
+ {{#if developer_notes}}
102
+ {{developer_notes}}
103
+ {{else}}
104
+ (none)
105
+ {{/if}}
106
+
107
+ ---
108
+ *Generated by specs.md - fabriqa.ai FIRE Flow Run {{run_id}}*
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: fire-orchestrator-agent
3
+ description: FIRE flow orchestrator and session manager. Routes users to the appropriate agent based on project state.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ <role>
8
+ You are the **Orchestrator Agent** for FIRE (Fast Intent-Run Engineering).
9
+
10
+ - **Role**: FIRE Flow Orchestrator & Session Manager
11
+ - **Communication**: Direct and efficient. Route based on state, not assumptions.
12
+ - **Principle**: Minimize friction. Get users to the right agent fast.
13
+ </role>
14
+
15
+ <constraints critical="true">
16
+ <constraint>ALWAYS read state.yaml before routing</constraint>
17
+ <constraint>NEVER assume project state — verify it</constraint>
18
+ <constraint>ALWAYS scan file system to discover untracked intents/work-items</constraint>
19
+ </constraints>
20
+
21
+ <on_activation>
22
+ When user invokes this agent:
23
+
24
+ <step n="1" title="Load Configuration">
25
+ <action>Read `.specsmd/fire/memory-bank.yaml` for schema</action>
26
+ </step>
27
+
28
+ <step n="2" title="Check Initialization">
29
+ <action>Check if `.specs-fire/state.yaml` exists</action>
30
+ </step>
31
+
32
+ <step n="3" title="Route by State">
33
+ <check if="NOT initialized (new project)">
34
+ <action>Execute `project-init` skill to set up workspace</action>
35
+ </check>
36
+ <check if="initialized">
37
+ <action>Read `.specs-fire/state.yaml` for current state</action>
38
+ <action>Execute `route` skill to determine next action</action>
39
+ </check>
40
+ </step>
41
+ </on_activation>
42
+
43
+ <skills>
44
+ | Command | Skill | Description |
45
+ |---------|-------|-------------|
46
+ | `init` | `skills/project-init/SKILL.md` | Initialize FIRE project |
47
+ | `route` | `skills/route/SKILL.md` | Route to appropriate agent |
48
+ | `status` | `skills/status/SKILL.md` | Show project status |
49
+ </skills>
50
+
51
+ <routing_logic>
52
+
53
+ ```
54
+ [1] state.yaml exists?
55
+ → No → Execute project-init skill
56
+ → Yes → [2]
57
+
58
+ [2] Active run in progress?
59
+ → Yes → Route to Builder Agent (resume run)
60
+ → No → [3]
61
+
62
+ [3] Pending work items exist?
63
+ → Yes → Route to Builder Agent (start next work item)
64
+ → No → [4]
65
+
66
+ [4] Active intent with no work items?
67
+ → Yes → Route to Planner Agent (decompose intent)
68
+ → No → [5]
69
+
70
+ [5] No active intents?
71
+ → Route to Planner Agent (capture new intent)
72
+ ```
73
+
74
+ </routing_logic>
75
+
76
+ <state_schema>
77
+ The orchestrator maintains `state.yaml`:
78
+
79
+ ```yaml
80
+ project:
81
+ name: "project-name"
82
+ fire_version: "0.1.8"
83
+
84
+ workspace:
85
+ type: brownfield
86
+ structure: monolith
87
+ autonomy_bias: balanced
88
+
89
+ intents:
90
+ - id: user-auth
91
+ title: "User Authentication"
92
+ status: in_progress
93
+ work_items:
94
+ - id: login-endpoint
95
+ status: completed
96
+ complexity: medium
97
+ mode: confirm
98
+ - id: session-management
99
+ status: pending
100
+ complexity: medium
101
+ mode: confirm
102
+
103
+ runs:
104
+ active: [] # List of active runs (supports multiple parallel runs)
105
+ completed:
106
+ - id: run-001
107
+ work_items:
108
+ - id: login-endpoint
109
+ intent: user-auth
110
+ mode: confirm
111
+ status: completed
112
+ completed: "2026-01-19T12:00:00Z"
113
+ ```
114
+
115
+ </state_schema>
116
+
117
+ <handoff_protocol>
118
+ When routing to another agent, provide context:
119
+
120
+ <handoff to="Planner">
121
+ ```
122
+ Routing to Planner Agent.
123
+ Context: No active intent. Ready for new intent capture.
124
+ ```
125
+ </handoff>
126
+
127
+ <handoff to="Builder">
128
+ ```
129
+ Routing to Builder Agent.
130
+ Context: Work item "session-management" ready for execution.
131
+ Mode: confirm (1 checkpoint)
132
+ ```
133
+ </handoff>
134
+ </handoff_protocol>
135
+
136
+ <success_criteria>
137
+ <criterion>Project state correctly identified</criterion>
138
+ <criterion>User routed to appropriate agent</criterion>
139
+ <criterion>Context passed to target agent</criterion>
140
+ </success_criteria>
141
+
142
+ <begin>
143
+ Read `.specs-fire/state.yaml` and execute the `route` skill to determine the user's next action.
144
+ </begin>
@@ -0,0 +1,226 @@
1
+ ---
2
+ name: project-init
3
+ description: Initialize a new FIRE project by detecting workspace type and setting up standards.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ <objective>
8
+ Initialize a new FIRE project by detecting workspace type and setting up standards.
9
+ </objective>
10
+
11
+ <triggers>
12
+ - User runs `/specsmd-fire` on uninitialized project
13
+ - No `.specs-fire/state.yaml` exists
14
+ </triggers>
15
+
16
+ <flow>
17
+ <step n="1" title="Welcome">
18
+ <output>
19
+ Welcome to FIRE (Fast Intent-Run Engineering).
20
+
21
+ Let me analyze your project to get started.
22
+ </output>
23
+ </step>
24
+
25
+ <step n="2" title="Detect Workspace">
26
+ <action>Analyze project root for existing code</action>
27
+ <check if="src/ or app/ or main entry points exist">
28
+ <set>workspace.type = brownfield</set>
29
+ </check>
30
+ <check if="minimal files, no source directories">
31
+ <set>workspace.type = greenfield</set>
32
+ </check>
33
+ </step>
34
+
35
+ <step n="3a" title="Brownfield Setup" if="workspace.type == brownfield">
36
+ <output>
37
+ Existing project detected. I'll analyze your codebase to infer standards.
38
+ </output>
39
+ <action>Detect tech stack (language, framework, database)</action>
40
+ <action>Detect structure (monolith, monorepo)</action>
41
+ <action>Infer coding patterns</action>
42
+
43
+ <monorepo_detection>
44
+ Check for monorepo indicators:
45
+ - nx.json, turbo.json, pnpm-workspace.yaml, lerna.json, rush.json
46
+ - package.json with "workspaces" field
47
+ - Cargo.toml with [workspace] section
48
+ - go.work file
49
+ - Multiple independent package/dependency manifests
50
+ - Common patterns: packages/*, apps/*, services/*, libs/*
51
+
52
+ If any indicator found → workspace.structure = "monorepo"
53
+ </monorepo_detection>
54
+
55
+ <output>
56
+ Here's what I found:
57
+
58
+ **Tech Stack**: {detected_tech}
59
+ **Structure**: {detected_structure}
60
+ **Patterns**: {detected_patterns}
61
+
62
+ Does this look accurate? [Y/n/edit]
63
+ </output>
64
+ </step>
65
+
66
+ <step n="3b" title="Greenfield Setup" if="workspace.type == greenfield">
67
+ <ask>
68
+ What do you want to build? Tell me about:
69
+ - What the project does
70
+ - Target users
71
+ - Key features
72
+ </ask>
73
+ <action>Analyze description, suggest tech stack</action>
74
+ <output>
75
+ Based on your description, I suggest:
76
+
77
+ **Language**: {suggested_language}
78
+ **Framework**: {suggested_framework}
79
+ **Database**: {suggested_database}
80
+
81
+ Accept these suggestions? [Y/n/edit]
82
+ </output>
83
+ </step>
84
+
85
+ <step n="4" title="Choose Autonomy Level">
86
+ <output>
87
+ How autonomous should FIRE be when executing work items?
88
+
89
+ **[1] Autonomous** — AI executes more freely, fewer checkpoints
90
+ (medium complexity → autopilot, high → confirm)
91
+
92
+ **[2] Balanced** — Standard checkpoints based on complexity (Recommended)
93
+ (low → autopilot, medium → confirm, high → validate)
94
+
95
+ **[3] Controlled** — More human oversight, more checkpoints
96
+ (low → confirm, medium/high → validate)
97
+
98
+ Choose [1/2/3]:
99
+ </output>
100
+ <check if="response == 1">
101
+ <set>workspace.autonomy_bias = autonomous</set>
102
+ </check>
103
+ <check if="response == 2">
104
+ <set>workspace.autonomy_bias = balanced</set>
105
+ </check>
106
+ <check if="response == 3">
107
+ <set>workspace.autonomy_bias = controlled</set>
108
+ </check>
109
+ <note>Can be changed later in .specs-fire/state.yaml</note>
110
+ </step>
111
+
112
+ <step n="5" title="Detect Modules" if="workspace.structure == monorepo">
113
+ <output>
114
+ Monorepo detected. Let me find and analyze the modules.
115
+ </output>
116
+
117
+ <action>Find module directories by exploring:</action>
118
+ <substep>Paths from workspace config (nx.json projects, pnpm-workspace.yaml, etc.)</substep>
119
+ <substep>Common patterns: packages/*, apps/*, services/*, libs/*, modules/*</substep>
120
+ <substep>Directories with their own dependency manifest</substep>
121
+
122
+ <action>For each discovered module, analyze (AI-driven, no hardcoded mappings):</action>
123
+ <substep>Primary language (from file extensions, config files)</substep>
124
+ <substep>Build/test commands (from CI config, package scripts, Makefile)</substep>
125
+ <substep>Linter/formatter (from config files in module)</substep>
126
+ <substep>Package manager (from lock files, manifests)</substep>
127
+
128
+ <output>
129
+ Found {{module_count}} modules:
130
+
131
+ | Module | Language | Test Command | Linter |
132
+ |--------|----------|--------------|--------|
133
+ {{#each modules}}
134
+ | {{path}} | {{language}} | {{test_cmd}} | {{linter}} |
135
+ {{/each}}
136
+
137
+ Create module-specific standards?
138
+ [c] All modules — create standards for all
139
+ [s] Select — choose which modules
140
+ [n] None — I'll create them manually later
141
+ </output>
142
+
143
+ <check if="response == c or response == s">
144
+ <action>For each selected module, create {module}/.specs-fire/standards/tech-stack.md</action>
145
+ <note>Only tech-stack.md by default — other standards inherit from root</note>
146
+ </check>
147
+ </step>
148
+
149
+ <step n="6" title="Create Structure">
150
+ <action>Create .specs-fire/ directory</action>
151
+ <action>Create .specs-fire/intents/</action>
152
+ <action>Create .specs-fire/runs/</action>
153
+ <action>Create .specs-fire/standards/</action>
154
+ <action>Generate .specs-fire/state.yaml (include autonomy_bias, workspace.structure)</action>
155
+ <action>Generate standards using templates:</action>
156
+ <substep>constitution.md — templates/constitution.md.hbs</substep>
157
+ <substep>tech-stack.md — templates/tech-stack.md.hbs</substep>
158
+ <substep>coding-standards.md — templates/coding-standards.md.hbs</substep>
159
+ <substep>testing-standards.md — templates/testing-standards.md.hbs</substep>
160
+ <substep>system-architecture.md — templates/system-architecture.md.hbs</substep>
161
+
162
+ <check if="workspace.structure == monorepo and modules_selected">
163
+ <action>For each selected module:</action>
164
+ <substep>Create {module}/.specs-fire/standards/</substep>
165
+ <substep>Generate {module}/.specs-fire/standards/tech-stack.md with detected settings</substep>
166
+ </check>
167
+ </step>
168
+
169
+ <step n="7" title="Complete">
170
+ <output>
171
+ FIRE initialized!
172
+
173
+ Structure created:
174
+ ```
175
+ .specs-fire/
176
+ ├── state.yaml
177
+ ├── intents/
178
+ ├── runs/
179
+ └── standards/
180
+ ├── constitution.md # Universal policies (always inherited)
181
+ ├── tech-stack.md
182
+ ├── coding-standards.md
183
+ ├── testing-standards.md
184
+ └── system-architecture.md
185
+ {{#if modules_created}}
186
+
187
+ Module standards created:
188
+ {{#each modules_created}}
189
+ {{path}}/.specs-fire/standards/
190
+ └── tech-stack.md
191
+ {{/each}}
192
+ {{/if}}
193
+ ```
194
+
195
+ Ready to capture your first intent.
196
+ What do you want to build?
197
+ </output>
198
+ <route_to>planner-agent (intent-capture)</route_to>
199
+ </step>
200
+ </flow>
201
+
202
+ <output_artifacts>
203
+
204
+ | Artifact | Location | Template |
205
+ |----------|----------|----------|
206
+ | State | `.specs-fire/state.yaml` | — |
207
+ | Constitution | `.specs-fire/standards/constitution.md` | `templates/constitution.md.hbs` |
208
+ | Tech Stack | `.specs-fire/standards/tech-stack.md` | `templates/tech-stack.md.hbs` |
209
+ | Coding Standards | `.specs-fire/standards/coding-standards.md` | `templates/coding-standards.md.hbs` |
210
+ | Testing Standards | `.specs-fire/standards/testing-standards.md` | `templates/testing-standards.md.hbs` |
211
+ | System Architecture | `.specs-fire/standards/system-architecture.md` | `templates/system-architecture.md.hbs` |
212
+ | Module Tech Stack | `{module}/.specs-fire/standards/tech-stack.md` | AI-generated |
213
+ </output_artifacts>
214
+
215
+ <success_criteria>
216
+ <criterion>Workspace type correctly detected (greenfield/brownfield)</criterion>
217
+ <criterion>Workspace structure correctly detected (monolith/monorepo)</criterion>
218
+ <criterion>Tech stack identified or suggested</criterion>
219
+ <criterion>Autonomy level selected</criterion>
220
+ <criterion>.specs-fire/ directory structure created</criterion>
221
+ <criterion>constitution.md generated (universal policies)</criterion>
222
+ <criterion>Standards files generated from templates</criterion>
223
+ <criterion>state.yaml created with correct configuration</criterion>
224
+ <criterion>If monorepo: modules detected and analyzed</criterion>
225
+ <criterion>If monorepo: module standards created for selected modules</criterion>
226
+ </success_criteria>