specsmd 0.0.0-dev.70 → 0.0.0-dev.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/flows/fire/agents/builder/skills/run-execute/SKILL.md +73 -5
- package/flows/fire/agents/orchestrator/skills/project-init/SKILL.md +76 -4
- package/flows/fire/agents/orchestrator/skills/project-init/templates/constitution.md.hbs +43 -0
- package/flows/fire/agents/orchestrator/skills/project-migrate/SKILL.md +234 -0
- package/flows/fire/agents/orchestrator/skills/route/SKILL.md +15 -2
- package/flows/fire/memory-bank.yaml +61 -2
- package/package.json +1 -1
|
@@ -132,11 +132,60 @@ Supports both single-item and multi-item (batch/wide) runs.
|
|
|
132
132
|
<action>Get current_item from state.yaml active_run</action>
|
|
133
133
|
<action>Load work item from .specs-fire/intents/{intent}/work-items/{id}.md</action>
|
|
134
134
|
<action>Read intent brief for broader context</action>
|
|
135
|
-
<action>Load
|
|
136
|
-
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
<action>Load project standards using hierarchical resolution:</action>
|
|
136
|
+
|
|
137
|
+
<standards_resolution critical="true">
|
|
138
|
+
<substep n="2a" title="Discover Standards Locations">
|
|
139
|
+
<action>Scan repository for: **/.specs-fire/standards/</action>
|
|
140
|
+
<action>Build list sorted by path depth (root = depth 0)</action>
|
|
141
|
+
<example>
|
|
142
|
+
depth 0: .specs-fire/standards/
|
|
143
|
+
depth 2: packages/api/.specs-fire/standards/
|
|
144
|
+
depth 2: apps/mobile/.specs-fire/standards/
|
|
145
|
+
</example>
|
|
146
|
+
</substep>
|
|
147
|
+
|
|
148
|
+
<substep n="2b" title="Load Constitution (Root Only)">
|
|
149
|
+
<action>Load .specs-fire/standards/constitution.md from ROOT</action>
|
|
150
|
+
<critical>IGNORE any constitution.md in nested directories</critical>
|
|
151
|
+
<critical>Constitution is ALWAYS inherited, NEVER overridden</critical>
|
|
152
|
+
<note>If constitution.md doesn't exist, skip gracefully</note>
|
|
153
|
+
</substep>
|
|
154
|
+
|
|
155
|
+
<substep n="2c" title="Resolve Module Standards">
|
|
156
|
+
<action>For each discovered standards location (excluding root):</action>
|
|
157
|
+
|
|
158
|
+
<resolution_algorithm>
|
|
159
|
+
FOR each standard_file IN [tech-stack.md, coding-standards.md,
|
|
160
|
+
testing-standards.md, system-architecture.md]:
|
|
161
|
+
|
|
162
|
+
IF {location}/standards/{standard_file} EXISTS:
|
|
163
|
+
→ USE this file for scope {location.parent_path}/**
|
|
164
|
+
ELSE:
|
|
165
|
+
→ Walk UP to find nearest ancestor with this file
|
|
166
|
+
→ USE ancestor's file (ultimately root if none found)
|
|
167
|
+
</resolution_algorithm>
|
|
168
|
+
</substep>
|
|
169
|
+
|
|
170
|
+
<substep n="2d" title="Present Standards with Scoping">
|
|
171
|
+
<action>Present loaded standards with clear path-based scoping:</action>
|
|
172
|
+
|
|
173
|
+
<output_format>
|
|
174
|
+
## Constitution (applies to ALL files)
|
|
175
|
+
[content of root constitution.md]
|
|
176
|
+
|
|
177
|
+
## Standards for {module_path}/** files
|
|
178
|
+
When editing files under {module_path}/, apply:
|
|
179
|
+
- Tech Stack: [resolved tech-stack.md for this scope]
|
|
180
|
+
- Coding Standards: [resolved coding-standards.md for this scope]
|
|
181
|
+
- Testing Standards: [resolved testing-standards.md for this scope]
|
|
182
|
+
|
|
183
|
+
## Default Standards (paths without specific scope)
|
|
184
|
+
For all other files, apply root standards.
|
|
185
|
+
</output_format>
|
|
186
|
+
</substep>
|
|
187
|
+
</standards_resolution>
|
|
188
|
+
|
|
140
189
|
<action>Determine execution mode from work item</action>
|
|
141
190
|
</step>
|
|
142
191
|
|
|
@@ -240,11 +289,27 @@ Supports both single-item and multi-item (batch/wide) runs.
|
|
|
240
289
|
<substep n="5b">Track file operation (create/modify)</substep>
|
|
241
290
|
<substep n="5c">Record decisions made</substep>
|
|
242
291
|
|
|
292
|
+
<standards_application critical="true">
|
|
293
|
+
When editing a file at path X:
|
|
294
|
+
1. Find the LONGEST matching standards scope (most specific)
|
|
295
|
+
2. Apply those standards to the file
|
|
296
|
+
3. If no specific scope matches, apply root standards
|
|
297
|
+
|
|
298
|
+
<example>
|
|
299
|
+
Editing packages/api/src/handler.go
|
|
300
|
+
→ Apply "Standards for packages/api/**"
|
|
301
|
+
|
|
302
|
+
Editing scripts/deploy.sh
|
|
303
|
+
→ Apply "Default Standards" (root)
|
|
304
|
+
</example>
|
|
305
|
+
</standards_application>
|
|
306
|
+
|
|
243
307
|
<brownfield_rules>
|
|
244
308
|
<rule>READ existing code before modifying</rule>
|
|
245
309
|
<rule>MATCH existing naming conventions</rule>
|
|
246
310
|
<rule>FOLLOW existing patterns in the codebase</rule>
|
|
247
311
|
<rule>PRESERVE existing tests</rule>
|
|
312
|
+
<rule>USE module-specific standards when editing module files</rule>
|
|
248
313
|
</brownfield_rules>
|
|
249
314
|
</step>
|
|
250
315
|
|
|
@@ -487,6 +552,9 @@ Supports both single-item and multi-item (batch/wide) runs.
|
|
|
487
552
|
|
|
488
553
|
<success_criteria>
|
|
489
554
|
<criterion>Run initialized via init-run.js script</criterion>
|
|
555
|
+
<criterion>Standards loaded with hierarchical resolution</criterion>
|
|
556
|
+
<criterion>Constitution loaded from root (if exists)</criterion>
|
|
557
|
+
<criterion>Module-specific standards applied to module files</criterion>
|
|
490
558
|
<criterion>plan.md created BEFORE implementation</criterion>
|
|
491
559
|
<criterion>All work items implemented</criterion>
|
|
492
560
|
<criterion>All tests pass</criterion>
|
|
@@ -39,6 +39,19 @@ Initialize a new FIRE project by detecting workspace type and setting up standar
|
|
|
39
39
|
<action>Detect tech stack (language, framework, database)</action>
|
|
40
40
|
<action>Detect structure (monolith, monorepo)</action>
|
|
41
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
|
+
|
|
42
55
|
<output>
|
|
43
56
|
Here's what I found:
|
|
44
57
|
|
|
@@ -96,20 +109,64 @@ Initialize a new FIRE project by detecting workspace type and setting up standar
|
|
|
96
109
|
<note>Can be changed later in .specs-fire/state.yaml</note>
|
|
97
110
|
</step>
|
|
98
111
|
|
|
99
|
-
<step n="5" title="
|
|
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">
|
|
100
150
|
<action>Create .specs-fire/ directory</action>
|
|
101
151
|
<action>Create .specs-fire/intents/</action>
|
|
102
152
|
<action>Create .specs-fire/runs/</action>
|
|
103
153
|
<action>Create .specs-fire/standards/</action>
|
|
104
|
-
<action>Generate .specs-fire/state.yaml (include autonomy_bias)</action>
|
|
154
|
+
<action>Generate .specs-fire/state.yaml (include autonomy_bias, workspace.structure)</action>
|
|
105
155
|
<action>Generate standards using templates:</action>
|
|
156
|
+
<substep>constitution.md — templates/constitution.md.hbs</substep>
|
|
106
157
|
<substep>tech-stack.md — templates/tech-stack.md.hbs</substep>
|
|
107
158
|
<substep>coding-standards.md — templates/coding-standards.md.hbs</substep>
|
|
108
159
|
<substep>testing-standards.md — templates/testing-standards.md.hbs</substep>
|
|
109
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>
|
|
110
167
|
</step>
|
|
111
168
|
|
|
112
|
-
<step n="
|
|
169
|
+
<step n="7" title="Complete">
|
|
113
170
|
<output>
|
|
114
171
|
FIRE initialized!
|
|
115
172
|
|
|
@@ -120,10 +177,19 @@ Initialize a new FIRE project by detecting workspace type and setting up standar
|
|
|
120
177
|
├── intents/
|
|
121
178
|
├── runs/
|
|
122
179
|
└── standards/
|
|
180
|
+
├── constitution.md # Universal policies (always inherited)
|
|
123
181
|
├── tech-stack.md
|
|
124
182
|
├── coding-standards.md
|
|
125
183
|
├── testing-standards.md
|
|
126
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}}
|
|
127
193
|
```
|
|
128
194
|
|
|
129
195
|
Ready to capture your first intent.
|
|
@@ -137,17 +203,23 @@ Initialize a new FIRE project by detecting workspace type and setting up standar
|
|
|
137
203
|
| Artifact | Location | Template |
|
|
138
204
|
|----------|----------|----------|
|
|
139
205
|
| State | `.specs-fire/state.yaml` | — |
|
|
206
|
+
| Constitution | `.specs-fire/standards/constitution.md` | `templates/constitution.md.hbs` |
|
|
140
207
|
| Tech Stack | `.specs-fire/standards/tech-stack.md` | `templates/tech-stack.md.hbs` |
|
|
141
208
|
| Coding Standards | `.specs-fire/standards/coding-standards.md` | `templates/coding-standards.md.hbs` |
|
|
142
209
|
| Testing Standards | `.specs-fire/standards/testing-standards.md` | `templates/testing-standards.md.hbs` |
|
|
143
210
|
| System Architecture | `.specs-fire/standards/system-architecture.md` | `templates/system-architecture.md.hbs` |
|
|
211
|
+
| Module Tech Stack | `{module}/.specs-fire/standards/tech-stack.md` | AI-generated |
|
|
144
212
|
</output_artifacts>
|
|
145
213
|
|
|
146
214
|
<success_criteria>
|
|
147
|
-
<criterion>Workspace type correctly detected</criterion>
|
|
215
|
+
<criterion>Workspace type correctly detected (greenfield/brownfield)</criterion>
|
|
216
|
+
<criterion>Workspace structure correctly detected (monolith/monorepo)</criterion>
|
|
148
217
|
<criterion>Tech stack identified or suggested</criterion>
|
|
149
218
|
<criterion>Autonomy level selected</criterion>
|
|
150
219
|
<criterion>.specs-fire/ directory structure created</criterion>
|
|
220
|
+
<criterion>constitution.md generated (universal policies)</criterion>
|
|
151
221
|
<criterion>Standards files generated from templates</criterion>
|
|
152
222
|
<criterion>state.yaml created with correct configuration</criterion>
|
|
223
|
+
<criterion>If monorepo: modules detected and analyzed</criterion>
|
|
224
|
+
<criterion>If monorepo: module standards created for selected modules</criterion>
|
|
153
225
|
</success_criteria>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Project Constitution
|
|
2
|
+
|
|
3
|
+
> Universal policies that apply to ALL code in this project.
|
|
4
|
+
> This file is always inherited from root — modules cannot override it.
|
|
5
|
+
|
|
6
|
+
## Git Workflow
|
|
7
|
+
|
|
8
|
+
- **Commit Style**: {{#if commit_style}}{{commit_style}}{{else}}Conventional commits (feat:, fix:, chore:, docs:, refactor:, test:){{/if}}
|
|
9
|
+
- **Branch Strategy**: {{#if branch_strategy}}{{branch_strategy}}{{else}}Feature branches merged via pull request{{/if}}
|
|
10
|
+
- **Main Branch**: {{#if main_branch}}{{main_branch}}{{else}}main{{/if}} is always deployable
|
|
11
|
+
|
|
12
|
+
## Code Review
|
|
13
|
+
|
|
14
|
+
- All changes require pull request review
|
|
15
|
+
- {{#if approval_count}}{{approval_count}}{{else}}At least one{{/if}} approval required before merge
|
|
16
|
+
- No self-merging to main/master
|
|
17
|
+
- Security-sensitive changes require additional review
|
|
18
|
+
|
|
19
|
+
## CI/CD
|
|
20
|
+
|
|
21
|
+
{{#if ci_platform}}
|
|
22
|
+
- **Platform**: {{ci_platform}}
|
|
23
|
+
{{else}}
|
|
24
|
+
- All PRs must pass CI checks before merge
|
|
25
|
+
{{/if}}
|
|
26
|
+
- Automated tests run on every push
|
|
27
|
+
- Main branch deployments are automated
|
|
28
|
+
|
|
29
|
+
## Security Policies
|
|
30
|
+
|
|
31
|
+
- **No secrets in code** — use environment variables or secret management
|
|
32
|
+
- Dependencies must be from trusted sources
|
|
33
|
+
- Security vulnerabilities addressed within SLA
|
|
34
|
+
- No credentials, API keys, or tokens in source control
|
|
35
|
+
|
|
36
|
+
## Documentation
|
|
37
|
+
|
|
38
|
+
- Public APIs must be documented
|
|
39
|
+
- Breaking changes require migration notes
|
|
40
|
+
- README kept up to date with setup instructions
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
*Generated by specs.md - fabriqa.ai FIRE Flow*
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-migrate
|
|
3
|
+
description: Migrate existing FIRE project to latest version. Adds constitution.md, updates schema, and optionally detects monorepo modules.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<objective>
|
|
8
|
+
Upgrade an existing FIRE project to the latest version, adding new features
|
|
9
|
+
(constitution.md, hierarchical standards) while preserving all existing work.
|
|
10
|
+
</objective>
|
|
11
|
+
|
|
12
|
+
<triggers>
|
|
13
|
+
- User runs `/fire-migrate`
|
|
14
|
+
- Orchestrator detects outdated project version
|
|
15
|
+
</triggers>
|
|
16
|
+
|
|
17
|
+
<principles critical="true">
|
|
18
|
+
<principle>NEVER delete or modify existing intents/work-items/runs</principle>
|
|
19
|
+
<principle>Create backup before any changes</principle>
|
|
20
|
+
<principle>Migration is idempotent — safe to run multiple times</principle>
|
|
21
|
+
<principle>Show changes before applying</principle>
|
|
22
|
+
</principles>
|
|
23
|
+
|
|
24
|
+
<flow>
|
|
25
|
+
<step n="1" title="Detect Current Version">
|
|
26
|
+
<action>Check if .specs-fire/ exists</action>
|
|
27
|
+
<check if="no .specs-fire/">
|
|
28
|
+
<output>Not a FIRE project. Use /fire to initialize.</output>
|
|
29
|
+
<exit/>
|
|
30
|
+
</check>
|
|
31
|
+
|
|
32
|
+
<action>Read .specs-fire/state.yaml</action>
|
|
33
|
+
<action>Check project.fire_version field</action>
|
|
34
|
+
<action>Read FIRE flow version from memory-bank.yaml</action>
|
|
35
|
+
|
|
36
|
+
<version_detection>
|
|
37
|
+
| Check | Meaning |
|
|
38
|
+
|-------|---------|
|
|
39
|
+
| project.fire_version missing | Pre-0.1.8 project |
|
|
40
|
+
| project.fire_version < current | Needs migration |
|
|
41
|
+
| project.fire_version == current | Up to date |
|
|
42
|
+
|
|
43
|
+
Also check for feature indicators:
|
|
44
|
+
| Missing Feature | Added In |
|
|
45
|
+
|-----------------|----------|
|
|
46
|
+
| constitution.md | 0.1.8 |
|
|
47
|
+
| workspace.structure | 0.1.8 |
|
|
48
|
+
</version_detection>
|
|
49
|
+
|
|
50
|
+
<check if="already up to date">
|
|
51
|
+
<output>Project is already at the latest version ({current_version}). No migration needed.</output>
|
|
52
|
+
<exit/>
|
|
53
|
+
</check>
|
|
54
|
+
|
|
55
|
+
<output>
|
|
56
|
+
Current version: {project_fire_version or "pre-0.1.8"}
|
|
57
|
+
Latest version: {fire_flow_version}
|
|
58
|
+
Migration required.
|
|
59
|
+
</output>
|
|
60
|
+
</step>
|
|
61
|
+
|
|
62
|
+
<step n="2" title="Analyze Migration Scope">
|
|
63
|
+
<action>Determine what needs to be migrated:</action>
|
|
64
|
+
|
|
65
|
+
<check_constitution>
|
|
66
|
+
Does .specs-fire/standards/constitution.md exist?
|
|
67
|
+
If no → needs_constitution = true
|
|
68
|
+
</check_constitution>
|
|
69
|
+
|
|
70
|
+
<check_schema>
|
|
71
|
+
Does state.yaml have workspace.structure field?
|
|
72
|
+
If no → needs_schema_update = true
|
|
73
|
+
</check_schema>
|
|
74
|
+
|
|
75
|
+
<check_monorepo>
|
|
76
|
+
Is this actually a monorepo? Check for:
|
|
77
|
+
- nx.json, turbo.json, pnpm-workspace.yaml, lerna.json
|
|
78
|
+
- package.json with "workspaces"
|
|
79
|
+
- Multiple package/dependency manifests
|
|
80
|
+
If detected → is_monorepo = true
|
|
81
|
+
</check_monorepo>
|
|
82
|
+
|
|
83
|
+
<output>
|
|
84
|
+
Migration Plan:
|
|
85
|
+
┌─────────────────────────────────────────────────────┐
|
|
86
|
+
│ Changes to be made: │
|
|
87
|
+
{{#if needs_constitution}}
|
|
88
|
+
│ ✓ Create constitution.md (universal policies) │
|
|
89
|
+
{{/if}}
|
|
90
|
+
{{#if needs_schema_update}}
|
|
91
|
+
│ ✓ Update state.yaml schema │
|
|
92
|
+
{{/if}}
|
|
93
|
+
{{#if is_monorepo}}
|
|
94
|
+
│ ? Monorepo detected — offer module standards │
|
|
95
|
+
{{/if}}
|
|
96
|
+
│ │
|
|
97
|
+
│ Will NOT change: │
|
|
98
|
+
│ • Existing intents and work items │
|
|
99
|
+
│ • Existing runs and logs │
|
|
100
|
+
│ • Existing standards (only add new ones) │
|
|
101
|
+
└─────────────────────────────────────────────────────┘
|
|
102
|
+
</output>
|
|
103
|
+
</step>
|
|
104
|
+
|
|
105
|
+
<step n="3" title="Create Backup">
|
|
106
|
+
<action>Create backup: cp -r .specs-fire .specs-fire-backup-{timestamp}</action>
|
|
107
|
+
<output>Backup created: .specs-fire-backup-{timestamp}</output>
|
|
108
|
+
</step>
|
|
109
|
+
|
|
110
|
+
<step n="4" title="Confirm Migration">
|
|
111
|
+
<ask>
|
|
112
|
+
Ready to migrate. Backup saved.
|
|
113
|
+
|
|
114
|
+
Proceed with migration? [Y/n]
|
|
115
|
+
</ask>
|
|
116
|
+
</step>
|
|
117
|
+
|
|
118
|
+
<step n="5" title="Add Constitution" if="needs_constitution">
|
|
119
|
+
<ask>
|
|
120
|
+
How should I create constitution.md?
|
|
121
|
+
|
|
122
|
+
[a] Auto-generate — analyze project (git, CI, existing patterns)
|
|
123
|
+
[d] Default — use standard template
|
|
124
|
+
[c] Custom — I'll provide the content
|
|
125
|
+
</ask>
|
|
126
|
+
|
|
127
|
+
<check if="response == a">
|
|
128
|
+
<action>Analyze project for constitution content:</action>
|
|
129
|
+
<substep>Check .gitignore, CI config for workflow hints</substep>
|
|
130
|
+
<substep>Check existing PR templates, CONTRIBUTING.md</substep>
|
|
131
|
+
<substep>Infer commit style from git log</substep>
|
|
132
|
+
<action>Generate constitution.md from findings</action>
|
|
133
|
+
</check>
|
|
134
|
+
|
|
135
|
+
<check if="response == d">
|
|
136
|
+
<action>Create constitution.md from default template</action>
|
|
137
|
+
</check>
|
|
138
|
+
|
|
139
|
+
<check if="response == c">
|
|
140
|
+
<ask>Please describe your key policies (git workflow, PR process, security).</ask>
|
|
141
|
+
<action>Generate constitution.md from input</action>
|
|
142
|
+
</check>
|
|
143
|
+
|
|
144
|
+
<action>Write to .specs-fire/standards/constitution.md</action>
|
|
145
|
+
<output>Created: .specs-fire/standards/constitution.md</output>
|
|
146
|
+
</step>
|
|
147
|
+
|
|
148
|
+
<step n="6" title="Update State Schema" if="needs_schema_update">
|
|
149
|
+
<action>Read current state.yaml</action>
|
|
150
|
+
<action>Add missing fields with defaults:</action>
|
|
151
|
+
<substep>project.fire_version: "{current_fire_flow_version}"</substep>
|
|
152
|
+
<substep>workspace.structure: "monolith" (or "monorepo" if detected)</substep>
|
|
153
|
+
<action>Write updated state.yaml (preserve all existing data)</action>
|
|
154
|
+
<output>Updated: .specs-fire/state.yaml</output>
|
|
155
|
+
</step>
|
|
156
|
+
|
|
157
|
+
<step n="7" title="Monorepo Module Setup" if="is_monorepo" optional="true">
|
|
158
|
+
<action>Discover modules (same as project-init):</action>
|
|
159
|
+
<substep>Check workspace config for project list</substep>
|
|
160
|
+
<substep>Scan packages/*, apps/*, services/*, libs/*</substep>
|
|
161
|
+
<substep>Analyze each module's tech stack</substep>
|
|
162
|
+
|
|
163
|
+
<ask>
|
|
164
|
+
This appears to be a monorepo. Found {{module_count}} modules:
|
|
165
|
+
|
|
166
|
+
{{#each modules}}
|
|
167
|
+
• {{path}} ({{language}})
|
|
168
|
+
{{/each}}
|
|
169
|
+
|
|
170
|
+
Create module-specific standards?
|
|
171
|
+
[y] Yes — create for all modules
|
|
172
|
+
[s] Select — choose which modules
|
|
173
|
+
[n] No — skip for now
|
|
174
|
+
</ask>
|
|
175
|
+
|
|
176
|
+
<check if="response == y or response == s">
|
|
177
|
+
<action>For each selected module:</action>
|
|
178
|
+
<substep>Create {module}/.specs-fire/standards/</substep>
|
|
179
|
+
<substep>Generate tech-stack.md with detected settings</substep>
|
|
180
|
+
</check>
|
|
181
|
+
</step>
|
|
182
|
+
|
|
183
|
+
<step n="8" title="Verify Migration">
|
|
184
|
+
<action>Verify migration completed:</action>
|
|
185
|
+
<substep>Read state.yaml — valid YAML?</substep>
|
|
186
|
+
<substep>Check new files exist</substep>
|
|
187
|
+
<substep>Ensure no existing files corrupted</substep>
|
|
188
|
+
|
|
189
|
+
<check if="verification fails">
|
|
190
|
+
<output>Migration failed. Restoring from backup...</output>
|
|
191
|
+
<action>rm -rf .specs-fire && mv .specs-fire-backup-{timestamp} .specs-fire</action>
|
|
192
|
+
<output>Restored. Please report this issue.</output>
|
|
193
|
+
<exit status="error"/>
|
|
194
|
+
</check>
|
|
195
|
+
</step>
|
|
196
|
+
|
|
197
|
+
<step n="9" title="Report">
|
|
198
|
+
<output>
|
|
199
|
+
Migration complete!
|
|
200
|
+
|
|
201
|
+
Changes made:
|
|
202
|
+
{{#each changes_made}}
|
|
203
|
+
✓ {{description}}
|
|
204
|
+
{{/each}}
|
|
205
|
+
|
|
206
|
+
Backup preserved at: .specs-fire-backup-{timestamp}
|
|
207
|
+
(Delete once you've verified everything works)
|
|
208
|
+
|
|
209
|
+
New features available:
|
|
210
|
+
• Constitution: Universal policies in constitution.md
|
|
211
|
+
{{#if is_monorepo}}
|
|
212
|
+
• Monorepo: Module-specific standards supported
|
|
213
|
+
{{/if}}
|
|
214
|
+
</output>
|
|
215
|
+
</step>
|
|
216
|
+
</flow>
|
|
217
|
+
|
|
218
|
+
<safety_guarantees>
|
|
219
|
+
<guarantee>Backup created before any changes</guarantee>
|
|
220
|
+
<guarantee>Idempotent — running twice is safe</guarantee>
|
|
221
|
+
<guarantee>Verify after — validates migration succeeded</guarantee>
|
|
222
|
+
<guarantee>Restore on failure — automatic rollback</guarantee>
|
|
223
|
+
<guarantee>Never deletes — only adds, never removes</guarantee>
|
|
224
|
+
</safety_guarantees>
|
|
225
|
+
|
|
226
|
+
<success_criteria>
|
|
227
|
+
<criterion>Current version detected correctly</criterion>
|
|
228
|
+
<criterion>Backup created before changes</criterion>
|
|
229
|
+
<criterion>constitution.md added if missing</criterion>
|
|
230
|
+
<criterion>state.yaml schema updated if needed</criterion>
|
|
231
|
+
<criterion>Monorepo modules detected and offered (if applicable)</criterion>
|
|
232
|
+
<criterion>Migration verified successfully</criterion>
|
|
233
|
+
<criterion>No existing data lost or corrupted</criterion>
|
|
234
|
+
</success_criteria>
|
|
@@ -22,8 +22,21 @@ Analyze project state and route user to the appropriate agent.
|
|
|
22
22
|
<flow>
|
|
23
23
|
<step n="1" title="Discover and Read State">
|
|
24
24
|
<action>Read .specs-fire/state.yaml</action>
|
|
25
|
-
|
|
26
|
-
<
|
|
25
|
+
|
|
26
|
+
<file_system_scan critical="true">
|
|
27
|
+
Use these EXACT glob patterns:
|
|
28
|
+
|
|
29
|
+
<pattern purpose="Find intent briefs">
|
|
30
|
+
.specs-fire/intents/*/brief.md
|
|
31
|
+
</pattern>
|
|
32
|
+
|
|
33
|
+
<pattern purpose="Find work items">
|
|
34
|
+
.specs-fire/intents/*/work-items/*.md
|
|
35
|
+
</pattern>
|
|
36
|
+
|
|
37
|
+
Work items are {work-item-id}.md files directly in work-items/ folder.
|
|
38
|
+
</file_system_scan>
|
|
39
|
+
|
|
27
40
|
<action>Reconcile: add discovered items to state as pending</action>
|
|
28
41
|
<action>Parse current project state</action>
|
|
29
42
|
</step>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# FIRE Flow Configuration
|
|
2
2
|
# Fast Intent-Run Engineering - Simplified AI-native development
|
|
3
3
|
|
|
4
|
+
# FIRE Flow Version (used by migrate skill to detect outdated projects)
|
|
5
|
+
version: "0.1.8"
|
|
6
|
+
|
|
4
7
|
# Artifact folder (created at project initialization)
|
|
5
8
|
artifact_root: ".specs-fire"
|
|
6
9
|
|
|
@@ -11,7 +14,23 @@ structure:
|
|
|
11
14
|
- path: runs/
|
|
12
15
|
description: "Execution logs and walkthroughs per run"
|
|
13
16
|
- path: standards/
|
|
14
|
-
description: "Project standards (tech-stack, coding-standards, testing-standards)"
|
|
17
|
+
description: "Project standards (constitution, tech-stack, coding-standards, testing-standards)"
|
|
18
|
+
|
|
19
|
+
# ─────────────────────────────────────────────────────────────────────────────────
|
|
20
|
+
# HIERARCHICAL STANDARDS (Monorepo Support)
|
|
21
|
+
# ─────────────────────────────────────────────────────────────────────────────────
|
|
22
|
+
#
|
|
23
|
+
# Standards can exist at root level AND at module level for monorepos.
|
|
24
|
+
# Resolution rules:
|
|
25
|
+
# - constitution.md: ALWAYS from root, NEVER overridden by modules
|
|
26
|
+
# - All other standards: Override semantics (module overrides root if exists)
|
|
27
|
+
#
|
|
28
|
+
# Example monorepo structure:
|
|
29
|
+
# .specs-fire/standards/ <- Root standards (defaults)
|
|
30
|
+
# packages/api/.specs-fire/standards/ <- API module overrides
|
|
31
|
+
# apps/mobile/.specs-fire/standards/ <- Mobile module overrides
|
|
32
|
+
#
|
|
33
|
+
# The file system IS the registry - presence of .specs-fire/standards/ defines a scope.
|
|
15
34
|
|
|
16
35
|
# Central state file (FIRE's source of truth)
|
|
17
36
|
state:
|
|
@@ -22,7 +41,7 @@ state:
|
|
|
22
41
|
- name: "Project name"
|
|
23
42
|
- description: "Project description"
|
|
24
43
|
- created: "ISO 8601 timestamp"
|
|
25
|
-
-
|
|
44
|
+
- fire_version: "FIRE flow version at project init (e.g., 0.1.8)"
|
|
26
45
|
workspace:
|
|
27
46
|
- type: "greenfield | brownfield"
|
|
28
47
|
- structure: "monolith | monorepo | multi-part"
|
|
@@ -87,18 +106,58 @@ schema:
|
|
|
87
106
|
run-log: ".specs-fire/runs/{run-id}/run.md"
|
|
88
107
|
test-report: ".specs-fire/runs/{run-id}/test-report.md"
|
|
89
108
|
walkthrough: ".specs-fire/runs/{run-id}/walkthrough.md"
|
|
109
|
+
|
|
110
|
+
# Root Standards
|
|
90
111
|
standards: ".specs-fire/standards/"
|
|
112
|
+
constitution: ".specs-fire/standards/constitution.md"
|
|
91
113
|
tech-stack: ".specs-fire/standards/tech-stack.md"
|
|
92
114
|
coding-standards: ".specs-fire/standards/coding-standards.md"
|
|
93
115
|
testing-standards: ".specs-fire/standards/testing-standards.md"
|
|
94
116
|
system-architecture: ".specs-fire/standards/system-architecture.md"
|
|
95
117
|
|
|
118
|
+
# Module Standards (Monorepo) - paths relative to module root
|
|
119
|
+
module-standards: "{module-path}/.specs-fire/standards/"
|
|
120
|
+
module-tech-stack: "{module-path}/.specs-fire/standards/tech-stack.md"
|
|
121
|
+
module-coding-standards: "{module-path}/.specs-fire/standards/coding-standards.md"
|
|
122
|
+
module-testing-standards: "{module-path}/.specs-fire/standards/testing-standards.md"
|
|
123
|
+
|
|
96
124
|
# Agent Ownership
|
|
97
125
|
ownership:
|
|
98
126
|
orchestrator: [state]
|
|
99
127
|
planner: [intents, work-items, state]
|
|
100
128
|
builder: [runs, state]
|
|
101
129
|
|
|
130
|
+
# ─────────────────────────────────────────────────────────────────────────────────
|
|
131
|
+
# STANDARDS BEHAVIOR
|
|
132
|
+
# ─────────────────────────────────────────────────────────────────────────────────
|
|
133
|
+
|
|
134
|
+
standards_behavior:
|
|
135
|
+
constitution:
|
|
136
|
+
inheritance: always
|
|
137
|
+
override: never
|
|
138
|
+
description: |
|
|
139
|
+
Universal policies (git workflow, PR process, security).
|
|
140
|
+
ALWAYS loaded from root. Modules cannot override.
|
|
141
|
+
|
|
142
|
+
tech-stack:
|
|
143
|
+
inheritance: fallback
|
|
144
|
+
override: allowed
|
|
145
|
+
description: |
|
|
146
|
+
If module has tech-stack.md, use it.
|
|
147
|
+
Otherwise inherit from nearest ancestor (ultimately root).
|
|
148
|
+
|
|
149
|
+
coding-standards:
|
|
150
|
+
inheritance: fallback
|
|
151
|
+
override: allowed
|
|
152
|
+
|
|
153
|
+
testing-standards:
|
|
154
|
+
inheritance: fallback
|
|
155
|
+
override: allowed
|
|
156
|
+
|
|
157
|
+
system-architecture:
|
|
158
|
+
inheritance: fallback
|
|
159
|
+
override: allowed
|
|
160
|
+
|
|
102
161
|
# Execution Modes
|
|
103
162
|
execution_modes:
|
|
104
163
|
autopilot:
|
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.72",
|
|
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": {
|