specsmd 0.0.1
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/README.md +300 -0
- package/bin/cli.js +21 -0
- package/flows/aidlc/README.md +372 -0
- package/flows/aidlc/agents/construction-agent.md +81 -0
- package/flows/aidlc/agents/inception-agent.md +95 -0
- package/flows/aidlc/agents/master-agent.md +61 -0
- package/flows/aidlc/agents/operations-agent.md +89 -0
- package/flows/aidlc/commands/construction-agent.md +63 -0
- package/flows/aidlc/commands/inception-agent.md +55 -0
- package/flows/aidlc/commands/master-agent.md +47 -0
- package/flows/aidlc/commands/operations-agent.md +77 -0
- package/flows/aidlc/context-config.yaml +41 -0
- package/flows/aidlc/memory-bank.yaml +104 -0
- package/flows/aidlc/quick-start.md +315 -0
- package/flows/aidlc/skills/construction/bolt-list.md +163 -0
- package/flows/aidlc/skills/construction/bolt-replan.md +343 -0
- package/flows/aidlc/skills/construction/bolt-start.md +289 -0
- package/flows/aidlc/skills/construction/bolt-status.md +185 -0
- package/flows/aidlc/skills/construction/navigator.md +196 -0
- package/flows/aidlc/skills/inception/bolt-plan.md +338 -0
- package/flows/aidlc/skills/inception/context.md +171 -0
- package/flows/aidlc/skills/inception/intent-create.md +211 -0
- package/flows/aidlc/skills/inception/intent-list.md +124 -0
- package/flows/aidlc/skills/inception/navigator.md +207 -0
- package/flows/aidlc/skills/inception/requirements.md +227 -0
- package/flows/aidlc/skills/inception/review.md +248 -0
- package/flows/aidlc/skills/inception/story-create.md +304 -0
- package/flows/aidlc/skills/inception/units.md +271 -0
- package/flows/aidlc/skills/master/analyze-context.md +132 -0
- package/flows/aidlc/skills/master/answer-question.md +141 -0
- package/flows/aidlc/skills/master/explain-flow.md +146 -0
- package/flows/aidlc/skills/master/project-init.md +281 -0
- package/flows/aidlc/skills/master/route-request.md +126 -0
- package/flows/aidlc/skills/operations/build.md +237 -0
- package/flows/aidlc/skills/operations/deploy.md +259 -0
- package/flows/aidlc/skills/operations/monitor.md +265 -0
- package/flows/aidlc/skills/operations/navigator.md +209 -0
- package/flows/aidlc/skills/operations/verify.md +224 -0
- package/flows/aidlc/templates/construction/bolt-template.md +193 -0
- package/flows/aidlc/templates/construction/bolt-types/bdd-construction-bolt.md +250 -0
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/adr-template.md +49 -0
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +55 -0
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +67 -0
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +62 -0
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md +528 -0
- package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +273 -0
- package/flows/aidlc/templates/construction/bolt-types/spike-bolt.md +240 -0
- package/flows/aidlc/templates/construction/bolt-types/tdd-construction-bolt.md +259 -0
- package/flows/aidlc/templates/construction/construction-log-template.md +129 -0
- package/flows/aidlc/templates/construction/standards/coding-standards.md +29 -0
- package/flows/aidlc/templates/construction/standards/system-architecture.md +22 -0
- package/flows/aidlc/templates/construction/standards/tech-stack.md +19 -0
- package/flows/aidlc/templates/inception/inception-log-template.md +134 -0
- package/flows/aidlc/templates/inception/project/README.md +55 -0
- package/flows/aidlc/templates/inception/requirements-template.md +144 -0
- package/flows/aidlc/templates/inception/stories-template.md +38 -0
- package/flows/aidlc/templates/inception/story-template.md +147 -0
- package/flows/aidlc/templates/inception/system-context-template.md +29 -0
- package/flows/aidlc/templates/inception/unit-brief-template.md +177 -0
- package/flows/aidlc/templates/inception/units-template.md +52 -0
- package/flows/aidlc/templates/standards/catalog.yaml +345 -0
- package/flows/aidlc/templates/standards/coding-standards.guide.md +553 -0
- package/flows/aidlc/templates/standards/data-stack.guide.md +162 -0
- package/flows/aidlc/templates/standards/tech-stack.guide.md +280 -0
- package/lib/InstallerFactory.js +36 -0
- package/lib/cli-utils.js +372 -0
- package/lib/constants.js +31 -0
- package/lib/installer.js +314 -0
- package/lib/installers/AntigravityInstaller.js +22 -0
- package/lib/installers/ClaudeInstaller.js +85 -0
- package/lib/installers/ClineInstaller.js +21 -0
- package/lib/installers/CodexInstaller.js +21 -0
- package/lib/installers/CopilotInstaller.js +113 -0
- package/lib/installers/CursorInstaller.js +63 -0
- package/lib/installers/GeminiInstaller.js +75 -0
- package/lib/installers/KiroInstaller.js +22 -0
- package/lib/installers/OpenCodeInstaller.js +22 -0
- package/lib/installers/RooInstaller.js +22 -0
- package/lib/installers/ToolInstaller.js +73 -0
- package/lib/installers/WindsurfInstaller.js +76 -0
- package/lib/markdown-validator.ts +175 -0
- package/lib/yaml-validator.ts +99 -0
- package/package.json +65 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
# Skill: Replan Bolts (Construction Context)
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
Utility skill to modify bolt plans during Construction - add, split, or reorder bolts.
|
|
8
|
+
|
|
9
|
+
**NO Checkpoint** - Replanning is a utility operation. Changes are validated through normal bolt execution checkpoints.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
Replan bolts during Construction phase - add new bolts, split existing ones, or reorder based on learnings during execution.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Input
|
|
20
|
+
|
|
21
|
+
- **Required**: `--unit` - The unit to replan bolts for
|
|
22
|
+
- **Required**: `.specsmd/aidlc/memory-bank.yaml` - artifact schema
|
|
23
|
+
- **Optional**: `--action` - One of: `status`, `append`, `split`, `reorder`
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Process
|
|
28
|
+
|
|
29
|
+
### 1. Read Existing Bolts
|
|
30
|
+
|
|
31
|
+
**CRITICAL**: Always start by reading all existing bolts for the unit.
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
## Current Bolt Status: {unit-name}
|
|
35
|
+
|
|
36
|
+
- ✅ **bolt-auth-service-1** ({bolt-type}): 001-user-signup, 002-user-login - completed - No dependencies
|
|
37
|
+
- ⏳ **bolt-auth-service-2** ({bolt-type}): 003-password-reset, 004-email-verify - in-progress - requires bolt-1
|
|
38
|
+
- [ ] **bolt-auth-service-3** ({bolt-type}): 005-mfa-setup - planned - requires bolt-2
|
|
39
|
+
|
|
40
|
+
### Summary
|
|
41
|
+
|
|
42
|
+
- **Completed**: 1
|
|
43
|
+
- **In Progress**: 1
|
|
44
|
+
- **Planned**: 1
|
|
45
|
+
- **Total Stories Covered**: 5
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Determine Action
|
|
49
|
+
|
|
50
|
+
Ask user what they want to do:
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## Replanning Options
|
|
54
|
+
|
|
55
|
+
What would you like to do?
|
|
56
|
+
|
|
57
|
+
1. **View Status** - See current bolt plan and progress
|
|
58
|
+
2. **Append Bolts** - Add new bolts for uncovered stories or new work
|
|
59
|
+
3. **Split Bolt** - Break a large planned bolt into smaller ones
|
|
60
|
+
4. **Reorder** - Change execution order or adjust dependencies
|
|
61
|
+
|
|
62
|
+
Select an option (1-4):
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Action: Append New Bolts
|
|
68
|
+
|
|
69
|
+
### When to Use
|
|
70
|
+
|
|
71
|
+
- New stories added during construction
|
|
72
|
+
- Discovered work not covered by existing bolts
|
|
73
|
+
- Need additional bolts for edge cases
|
|
74
|
+
|
|
75
|
+
### Process
|
|
76
|
+
|
|
77
|
+
1. **Check uncovered stories**:
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
## Uncovered Stories
|
|
81
|
+
|
|
82
|
+
Stories not assigned to any bolt:
|
|
83
|
+
|
|
84
|
+
- [ ] **006-session-mgmt**: Session management - Should
|
|
85
|
+
- [ ] **007-api-keys**: API key generation - Could
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
2. **Determine next bolt ID**:
|
|
89
|
+
- Read existing bolts, find highest sequence number
|
|
90
|
+
- Next bolt: `bolt-{unit}-{N+1}`
|
|
91
|
+
|
|
92
|
+
3. **Create new bolt(s)**:
|
|
93
|
+
- Use template: `.specsmd/aidlc/templates/construction/bolt-template.md`
|
|
94
|
+
- All bolts use type `ddd-construction-bolt` (see: `.specsmd/aidlc/templates/construction/bolt-types/ddd-construction-bolt.md`)
|
|
95
|
+
- Set `requires_bolts` based on dependencies
|
|
96
|
+
- Include complexity assessment (aggregate of included stories)
|
|
97
|
+
- Update `enables_bolts` on existing bolts if needed
|
|
98
|
+
|
|
99
|
+
4. **Output**:
|
|
100
|
+
|
|
101
|
+
```markdown
|
|
102
|
+
## Bolts Appended
|
|
103
|
+
|
|
104
|
+
Created 1 new bolt:
|
|
105
|
+
|
|
106
|
+
- [ ] **bolt-auth-service-4** ({bolt-type}): 006-session-mgmt, 007-api-keys - requires bolt-3
|
|
107
|
+
|
|
108
|
+
Updated dependency graph:
|
|
109
|
+
bolt-1 → bolt-2 → bolt-3 → bolt-4 (NEW)
|
|
110
|
+
|
|
111
|
+
File created: `memory-bank/bolts/bolt-auth-service-4.md`
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Action: Split Bolt
|
|
117
|
+
|
|
118
|
+
### When to Use
|
|
119
|
+
|
|
120
|
+
- Bolt is taking too long
|
|
121
|
+
- Bolt scope creep discovered
|
|
122
|
+
- Need to parallelize work
|
|
123
|
+
|
|
124
|
+
### Rules
|
|
125
|
+
|
|
126
|
+
- 🛑 **Cannot split completed bolts**
|
|
127
|
+
- ⚠️ **Splitting in-progress bolt requires confirmation** (will mark current as completed at current stage)
|
|
128
|
+
- ✅ **Can freely split planned bolts**
|
|
129
|
+
|
|
130
|
+
### Process
|
|
131
|
+
|
|
132
|
+
1. **Select bolt to split**:
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
## Select Bolt to Split
|
|
136
|
+
|
|
137
|
+
Splittable bolts (planned or in-progress):
|
|
138
|
+
|
|
139
|
+
- ⏳ **bolt-auth-service-2** ({bolt-type}): 003-password-reset, 004-email-verify, 005-mfa-setup - in-progress - ⚠️ Confirm to split
|
|
140
|
+
- [ ] **bolt-auth-service-3** ({bolt-type}): 006-session-mgmt, 007-api-keys, 008-rate-limit - planned - ✅ Can split
|
|
141
|
+
|
|
142
|
+
Enter bolt ID to split:
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
2. **Propose split**:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
## Split Proposal: bolt-auth-service-3
|
|
149
|
+
|
|
150
|
+
Current: 3 stories (006-session-mgmt, 007-api-keys, 008-rate-limit)
|
|
151
|
+
|
|
152
|
+
Proposed split:
|
|
153
|
+
|
|
154
|
+
- **bolt-auth-service-3a**: 006-session-mgmt - Core feature
|
|
155
|
+
- **bolt-auth-service-3b**: 007-api-keys, 008-rate-limit - Related edge cases
|
|
156
|
+
|
|
157
|
+
Accept this split? (yes/no/customize)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
3. **Execute split**:
|
|
161
|
+
- Archive or update original bolt file
|
|
162
|
+
- Create new bolt files with `3a`, `3b` suffixes (or next sequence)
|
|
163
|
+
- Update dependencies on dependent bolts
|
|
164
|
+
- Update `enables_bolts` on prerequisite bolts
|
|
165
|
+
|
|
166
|
+
4. **Output**:
|
|
167
|
+
|
|
168
|
+
```markdown
|
|
169
|
+
## Bolt Split Complete
|
|
170
|
+
|
|
171
|
+
Original: bolt-auth-service-3 (archived)
|
|
172
|
+
|
|
173
|
+
Created:
|
|
174
|
+
|
|
175
|
+
- [ ] **bolt-auth-service-3** ({bolt-type}): 006-session-mgmt - requires bolt-2
|
|
176
|
+
- [ ] **bolt-auth-service-4** ({bolt-type}): 007-api-keys, 008-rate-limit - requires bolt-3
|
|
177
|
+
|
|
178
|
+
Updated files:
|
|
179
|
+
- `memory-bank/bolts/bolt-auth-service-3.md` (updated)
|
|
180
|
+
- `memory-bank/bolts/bolt-auth-service-4.md` (created)
|
|
181
|
+
- `memory-bank/bolts/bolt-auth-service-2.md` (updated enables_bolts)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Action: Reorder Bolts
|
|
187
|
+
|
|
188
|
+
### When to Use
|
|
189
|
+
|
|
190
|
+
- Dependencies changed during construction
|
|
191
|
+
- Need to prioritize different bolt
|
|
192
|
+
- Discovered blocking dependency
|
|
193
|
+
|
|
194
|
+
### Rules
|
|
195
|
+
|
|
196
|
+
- 🛑 **Cannot reorder completed bolts**
|
|
197
|
+
- 🛑 **Cannot move bolt before its dependencies**
|
|
198
|
+
- ⚠️ **Reordering in-progress bolt pauses it**
|
|
199
|
+
|
|
200
|
+
### Process
|
|
201
|
+
|
|
202
|
+
1. **Show current order**:
|
|
203
|
+
|
|
204
|
+
```markdown
|
|
205
|
+
## Current Execution Order
|
|
206
|
+
|
|
207
|
+
bolt-1 (completed) → bolt-2 (in-progress) → bolt-3 (planned) → bolt-4 (planned)
|
|
208
|
+
|
|
209
|
+
- 1 - **bolt-auth-service-1**: completed - ❌ Cannot move
|
|
210
|
+
- 2 - **bolt-auth-service-2**: in-progress - ⚠️ Will pause if moved
|
|
211
|
+
- 3 - **bolt-auth-service-3**: planned - ✅ Can move
|
|
212
|
+
- 4 - **bolt-auth-service-4**: planned - ✅ Can move
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
2. **Get new order**:
|
|
216
|
+
|
|
217
|
+
```markdown
|
|
218
|
+
Enter new order for planned bolts (comma-separated IDs):
|
|
219
|
+
Example: bolt-auth-service-4, bolt-auth-service-3
|
|
220
|
+
|
|
221
|
+
This will execute bolt-4 before bolt-3.
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
3. **Validate dependencies**:
|
|
225
|
+
- Check if new order violates any `requires_bolts`
|
|
226
|
+
- Warn if dependency issue found
|
|
227
|
+
|
|
228
|
+
4. **Execute reorder**:
|
|
229
|
+
- Update `requires_bolts` and `enables_bolts` in affected bolt files
|
|
230
|
+
- Recalculate execution sequence
|
|
231
|
+
|
|
232
|
+
5. **Output**:
|
|
233
|
+
|
|
234
|
+
```markdown
|
|
235
|
+
## Reorder Complete
|
|
236
|
+
|
|
237
|
+
New execution order:
|
|
238
|
+
|
|
239
|
+
bolt-1 (completed) → bolt-2 (in-progress) → bolt-4 (planned) → bolt-3 (planned)
|
|
240
|
+
|
|
241
|
+
Updated files:
|
|
242
|
+
- `memory-bank/bolts/bolt-auth-service-3.md` (requires_bolts updated)
|
|
243
|
+
- `memory-bank/bolts/bolt-auth-service-4.md` (requires_bolts updated)
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Dependency Management
|
|
249
|
+
|
|
250
|
+
When modifying bolts, always update dependencies:
|
|
251
|
+
|
|
252
|
+
### Frontmatter Fields
|
|
253
|
+
|
|
254
|
+
```yaml
|
|
255
|
+
---
|
|
256
|
+
id: bolt-auth-service-3
|
|
257
|
+
type: ddd-construction-bolt
|
|
258
|
+
requires_bolts: [bolt-auth-service-2]
|
|
259
|
+
enables_bolts: [bolt-auth-service-4]
|
|
260
|
+
requires_units: []
|
|
261
|
+
complexity:
|
|
262
|
+
avg_complexity: 2
|
|
263
|
+
avg_uncertainty: 1
|
|
264
|
+
max_dependencies: 2
|
|
265
|
+
testing_scope: 2
|
|
266
|
+
---
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Note: Do NOT use comments inside YAML frontmatter. Keep it clean.
|
|
270
|
+
|
|
271
|
+
See full template: `.specsmd/aidlc/templates/construction/bolt-template.md`
|
|
272
|
+
|
|
273
|
+
### Validation Rules
|
|
274
|
+
|
|
275
|
+
1. **No circular dependencies**: A → B → C → A is invalid
|
|
276
|
+
2. **No orphaned bolts**: Every bolt (except first) must have `requires_bolts`
|
|
277
|
+
3. **Consistent enables/requires**: If A enables B, then B requires A
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Human Validation Point
|
|
282
|
+
|
|
283
|
+
> "I've analyzed the current bolt plan for `{unit-name}`. There are {n} bolts: {completed} completed, {in_progress} in progress, {planned} planned. What would you like to do? (1) View status, (2) Append bolts, (3) Split a bolt, (4) Reorder bolts"
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## Construction Log
|
|
288
|
+
|
|
289
|
+
**IMPORTANT**: After ANY replanning action, update the construction log.
|
|
290
|
+
|
|
291
|
+
### Location
|
|
292
|
+
|
|
293
|
+
`{unit-path}/construction-log.md`
|
|
294
|
+
|
|
295
|
+
### On First Replan
|
|
296
|
+
|
|
297
|
+
If construction log doesn't exist, create it using template:
|
|
298
|
+
`.specsmd/aidlc/templates/construction/construction-log-template.md`
|
|
299
|
+
|
|
300
|
+
Initialize with:
|
|
301
|
+
|
|
302
|
+
- Original bolt plan from inception
|
|
303
|
+
- First replanning entry
|
|
304
|
+
|
|
305
|
+
### On Every Replan
|
|
306
|
+
|
|
307
|
+
Add entry to Replanning History:
|
|
308
|
+
|
|
309
|
+
```markdown
|
|
310
|
+
| {today} | {action} | {change description} | {reason} | Yes |
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Update Current Bolt Structure to reflect changes.
|
|
314
|
+
|
|
315
|
+
### Example
|
|
316
|
+
|
|
317
|
+
After splitting bolt-2:
|
|
318
|
+
|
|
319
|
+
```markdown
|
|
320
|
+
## Replanning History
|
|
321
|
+
|
|
322
|
+
- **2025-12-07**: split - bolt-2 → bolt-2, bolt-3 - Scope too large - ✅ Approved
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Transition
|
|
328
|
+
|
|
329
|
+
After replanning:
|
|
330
|
+
|
|
331
|
+
- → **Bolt Start** (`.specsmd/skills/construction/bolt-start.md`) - continue execution
|
|
332
|
+
- → **Bolt Status** (`.specsmd/skills/construction/bolt-status.md`) - verify changes
|
|
333
|
+
- → **Inception Agent** - if major scope change requires new stories
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Test Contract
|
|
338
|
+
|
|
339
|
+
```yaml
|
|
340
|
+
input: Unit name, action (status|append|split|reorder)
|
|
341
|
+
output: Updated bolt plan with dependency graph
|
|
342
|
+
checkpoints: 0 (utility operation)
|
|
343
|
+
```
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
# Skill: Start/Continue Bolt
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Bolt Type Execution
|
|
6
|
+
|
|
7
|
+
Stages, activities, outputs, and checkpoints come from the bolt type definition:
|
|
8
|
+
`.specsmd/aidlc/templates/construction/bolt-types/{bolt_type}.md`
|
|
9
|
+
|
|
10
|
+
**ALWAYS read bolt type first. Never assume stages or checkpoints.**
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Goal
|
|
15
|
+
|
|
16
|
+
Execute a bolt instance through its defined stages, producing artifacts with human validation at checkpoints defined by the bolt type.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Input
|
|
21
|
+
|
|
22
|
+
- **Required**: `--bolt-id` - The bolt instance ID
|
|
23
|
+
- **Required**: `.specsmd/aidlc/memory-bank.yaml` - artifact schema
|
|
24
|
+
- **Optional**: `--stage` - Specific stage to execute (for resuming)
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Process
|
|
29
|
+
|
|
30
|
+
### 1. Load Bolt Context
|
|
31
|
+
|
|
32
|
+
Read bolt file from path defined by `schema.bolts`:
|
|
33
|
+
|
|
34
|
+
- Verify bolt exists and is not completed
|
|
35
|
+
- Extract: bolt_type, unit, intent, stories, current_stage
|
|
36
|
+
|
|
37
|
+
### 2. Load Bolt Type Definition (CRITICAL)
|
|
38
|
+
|
|
39
|
+
**Using the bolt_type extracted in Step 1**, load the bolt type definition:
|
|
40
|
+
|
|
41
|
+
**Location**: `.specsmd/aidlc/templates/construction/bolt-types/{bolt_type}.md`
|
|
42
|
+
|
|
43
|
+
**This step is NON-NEGOTIABLE. You MUST:**
|
|
44
|
+
|
|
45
|
+
1. Read the bolt type file COMPLETELY before any stage execution
|
|
46
|
+
2. Extract and understand:
|
|
47
|
+
- **Stages**: Names, sequence, count
|
|
48
|
+
- **Activities**: What to do in each stage
|
|
49
|
+
- **Outputs**: Artifacts to produce
|
|
50
|
+
- **Constraints**: Forbidden actions per stage
|
|
51
|
+
- **Completion Criteria**: How to know a stage is done
|
|
52
|
+
- **Checkpoints**: Where to pause for human validation
|
|
53
|
+
|
|
54
|
+
**The bolt type IS the execution plan. Follow it exactly.**
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
┌────────────────────────────────────────────────────────────┐
|
|
58
|
+
│ bolt instance defines bolt_type │
|
|
59
|
+
│ bolt_type definition dictates stages and execution │
|
|
60
|
+
│ bolt-start does NOT define stages or checkpoints │
|
|
61
|
+
└────────────────────────────────────────────────────────────┘
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Load Agent Context
|
|
65
|
+
|
|
66
|
+
Load context as defined in `.specsmd/aidlc/context-config.yaml` for the `construction` agent:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
agents:
|
|
70
|
+
construction:
|
|
71
|
+
required_context:
|
|
72
|
+
- path: standards/tech-stack.md
|
|
73
|
+
- path: standards/coding-standards.md
|
|
74
|
+
optional_context:
|
|
75
|
+
- path: standards/system-architecture.md
|
|
76
|
+
- path: standards/api-conventions.md
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
1. Load all `required_context` files (warn if missing with `critical: true`)
|
|
80
|
+
2. Load `optional_context` files if they exist
|
|
81
|
+
|
|
82
|
+
**Note**: This is agent-level context. Bolt-type-specific context loading may be added later.
|
|
83
|
+
|
|
84
|
+
### 4. Determine Current Stage
|
|
85
|
+
|
|
86
|
+
Based on bolt state:
|
|
87
|
+
|
|
88
|
+
- **planned** → Start with first stage, set status to `in-progress`
|
|
89
|
+
- **in-progress** → Continue from `current_stage`
|
|
90
|
+
- **completed** → Inform user bolt is done
|
|
91
|
+
- **blocked** → Show blocker, ask how to resolve
|
|
92
|
+
|
|
93
|
+
### 5. Execute Stage
|
|
94
|
+
|
|
95
|
+
For the current stage, follow the bolt type definition:
|
|
96
|
+
|
|
97
|
+
1. **Present Stage Context**:
|
|
98
|
+
|
|
99
|
+
```markdown
|
|
100
|
+
## Stage: {stage-name}
|
|
101
|
+
|
|
102
|
+
### Objective
|
|
103
|
+
{From bolt type definition}
|
|
104
|
+
|
|
105
|
+
### Activities
|
|
106
|
+
{From bolt type definition}
|
|
107
|
+
|
|
108
|
+
### Expected Output
|
|
109
|
+
{From bolt type definition}
|
|
110
|
+
|
|
111
|
+
### Stories in Scope
|
|
112
|
+
{From bolt instance}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
2. **Perform Activities**:
|
|
116
|
+
- Follow bolt type's activity instructions exactly
|
|
117
|
+
- Create artifacts as specified
|
|
118
|
+
- Respect constraints (e.g., "no code in this stage")
|
|
119
|
+
|
|
120
|
+
3. **Generate Outputs**:
|
|
121
|
+
- Create specified output artifacts
|
|
122
|
+
- Use templates if specified by bolt type
|
|
123
|
+
- Place in correct paths per schema
|
|
124
|
+
|
|
125
|
+
### 6. Handle Checkpoints (As Defined by Bolt Type)
|
|
126
|
+
|
|
127
|
+
The bolt type definition specifies:
|
|
128
|
+
|
|
129
|
+
- **Which stages have checkpoints**
|
|
130
|
+
- **What to present at each checkpoint**
|
|
131
|
+
- **What approval means**
|
|
132
|
+
|
|
133
|
+
If the current stage has a checkpoint:
|
|
134
|
+
|
|
135
|
+
```text
|
|
136
|
+
## Stage Complete: {stage-name}
|
|
137
|
+
|
|
138
|
+
{Present summary as specified by bolt type}
|
|
139
|
+
|
|
140
|
+
Ready to proceed?
|
|
141
|
+
1 - Approve and continue
|
|
142
|
+
2 - Need changes (specify)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Wait for user response before proceeding.**
|
|
146
|
+
|
|
147
|
+
If the bolt type specifies automatic validation criteria, follow those rules.
|
|
148
|
+
|
|
149
|
+
### 7. Update Bolt File
|
|
150
|
+
|
|
151
|
+
After stage completion:
|
|
152
|
+
|
|
153
|
+
- Add stage to `stages_completed` with timestamp
|
|
154
|
+
- Update `current_stage` to next stage
|
|
155
|
+
- If final stage, set `status: completed` and `completed` timestamp
|
|
156
|
+
|
|
157
|
+
**⚠️ TIMESTAMP FORMAT**: See `memory-bank.yaml` → `conventions.timestamps`
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
---
|
|
161
|
+
status: in-progress
|
|
162
|
+
current_stage: {next-stage-from-bolt-type}
|
|
163
|
+
stages_completed:
|
|
164
|
+
- {stage-name}: {timestamp}
|
|
165
|
+
---
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**On bolt completion**, also update:
|
|
169
|
+
|
|
170
|
+
```yaml
|
|
171
|
+
completed: {timestamp}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 8. Continue or Complete
|
|
175
|
+
|
|
176
|
+
Based on condition:
|
|
177
|
+
|
|
178
|
+
- **More stages remain** → Proceed to next stage
|
|
179
|
+
- **Final stage complete** → Mark bolt complete, suggest next bolt
|
|
180
|
+
- **User stops** → Save progress, can resume later
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Update Construction Log
|
|
185
|
+
|
|
186
|
+
**IMPORTANT**: Update the construction log at key execution points.
|
|
187
|
+
|
|
188
|
+
### Location
|
|
189
|
+
|
|
190
|
+
`{unit-path}/construction-log.md`
|
|
191
|
+
|
|
192
|
+
### On First Bolt Start
|
|
193
|
+
|
|
194
|
+
If construction log doesn't exist, create it using template:
|
|
195
|
+
`.specsmd/aidlc/templates/construction/construction-log-template.md`
|
|
196
|
+
|
|
197
|
+
### On Bolt Start
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
- **{ISO-8601-timestamp}**: {bolt-id} started - Stage 1: {stage-name}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### On Stage Completion
|
|
204
|
+
|
|
205
|
+
```markdown
|
|
206
|
+
- **{ISO-8601-timestamp}**: {bolt-id} stage-complete - {stage-name} → {next-stage}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### On Bolt Completion
|
|
210
|
+
|
|
211
|
+
```markdown
|
|
212
|
+
- **{ISO-8601-timestamp}**: {bolt-id} completed - All {n} stages done
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Output (Stage Execution)
|
|
218
|
+
|
|
219
|
+
```markdown
|
|
220
|
+
## Executing Bolt: {bolt-id}
|
|
221
|
+
|
|
222
|
+
### Current Stage: {stage-name}
|
|
223
|
+
**Type**: {bolt-type}
|
|
224
|
+
**Progress**: Stage {n} of {total}
|
|
225
|
+
|
|
226
|
+
### Activities Performed
|
|
227
|
+
1. ✅ {activity 1}
|
|
228
|
+
2. ✅ {activity 2}
|
|
229
|
+
3. ⏳ {activity 3 - in progress}
|
|
230
|
+
|
|
231
|
+
### Artifacts Created
|
|
232
|
+
- `{path/to/artifact}` - {description}
|
|
233
|
+
|
|
234
|
+
### Stories Addressed
|
|
235
|
+
- ✅ **{SSS}-{story-slug}**: {criteria} - Complete
|
|
236
|
+
- ⏳ **{SSS}-{story-slug}**: {criteria} - In Progress
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### Checkpoint (if defined by bolt type)
|
|
241
|
+
> "{checkpoint prompt from bolt type definition}"
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Output (Bolt Completed)
|
|
247
|
+
|
|
248
|
+
```markdown
|
|
249
|
+
## Bolt Complete: {bolt-id}
|
|
250
|
+
|
|
251
|
+
### Summary
|
|
252
|
+
- **Type**: {bolt-type}
|
|
253
|
+
- **Duration**: {time elapsed}
|
|
254
|
+
- **Stages Completed**: {all stages from bolt type}
|
|
255
|
+
|
|
256
|
+
### Artifacts Produced
|
|
257
|
+
{List artifacts as defined by bolt type}
|
|
258
|
+
|
|
259
|
+
### Stories Delivered
|
|
260
|
+
- ✅ **{SSS}-{story-slug}**: Complete
|
|
261
|
+
- ✅ **{SSS}-{story-slug}**: Complete
|
|
262
|
+
|
|
263
|
+
### Actions
|
|
264
|
+
|
|
265
|
+
1 - **next**: Start next bolt
|
|
266
|
+
2 - **list**: Review all bolts for this unit
|
|
267
|
+
3 - **operations**: Proceed to Operations (if all complete)
|
|
268
|
+
|
|
269
|
+
**Type a number or press Enter for suggested action.**
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Transition
|
|
275
|
+
|
|
276
|
+
After bolt completion:
|
|
277
|
+
|
|
278
|
+
- → **Next Bolt** - if more bolts in unit
|
|
279
|
+
- → **Operations Agent** - if all unit bolts complete
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Test Contract
|
|
284
|
+
|
|
285
|
+
```yaml
|
|
286
|
+
input: bolt-id, bolt type definition
|
|
287
|
+
output: Artifacts as defined by bolt type
|
|
288
|
+
checkpoints: As defined by bolt type (0 to N)
|
|
289
|
+
```
|