specsmd 0.1.2 → 0.1.3
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/aidlc/skills/construction/bolt-start.md +106 -78
- package/flows/aidlc/skills/inception/bolt-plan.md +18 -5
- package/flows/aidlc/skills/inception/review.md +1 -1
- package/flows/aidlc/skills/inception/units.md +17 -13
- package/flows/aidlc/skills/operations/monitor.md +1 -1
- package/flows/aidlc/templates/construction/bolt-template.md +25 -4
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-01-domain-model-template.md +2 -2
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-02-technical-design-template.md +2 -2
- package/flows/aidlc/templates/construction/bolt-types/ddd-construction-bolt/ddd-03-test-report-template.md +2 -2
- package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +5 -0
- package/flows/aidlc/templates/construction/construction-log-template.md +2 -2
- package/flows/aidlc/templates/inception/inception-log-template.md +1 -1
- package/flows/aidlc/templates/inception/requirements-template.md +1 -1
- package/flows/aidlc/templates/inception/stories-template.md +1 -1
- package/flows/aidlc/templates/inception/story-template.md +11 -11
- package/flows/aidlc/templates/inception/system-context-template.md +1 -1
- package/flows/aidlc/templates/inception/unit-brief-template.md +3 -3
- package/flows/aidlc/templates/inception/units-template.md +1 -1
- package/lib/analytics/tracker.js +7 -2
- package/lib/installer.js +14 -0
- package/package.json +2 -1
- package/scripts/artifact-validator.js +594 -0
- package/scripts/bolt-complete.js +606 -0
- package/scripts/status-integrity.js +598 -0
|
@@ -182,13 +182,31 @@ Ready to proceed?
|
|
|
182
182
|
|
|
183
183
|
If the bolt type specifies automatic validation criteria, follow those rules.
|
|
184
184
|
|
|
185
|
+
### 8b. Final Stage Checkpoint (CRITICAL RE-READ)
|
|
186
|
+
|
|
187
|
+
**⚠️ If this is the FINAL stage of the bolt**, before presenting completion:
|
|
188
|
+
|
|
189
|
+
1. **STOP** and re-read **Step 10** from this skill
|
|
190
|
+
2. This step is often skipped due to context distance - re-reading prevents this
|
|
191
|
+
3. Do NOT report bolt as complete until you have executed Step 10
|
|
192
|
+
|
|
193
|
+
```text
|
|
194
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
195
|
+
│ FINAL STAGE DETECTED │
|
|
196
|
+
│ → Re-read Step 10 NOW │
|
|
197
|
+
│ → You MUST run: node .specsmd/scripts/bolt-complete.js │
|
|
198
|
+
│ → Do NOT manually edit story files │
|
|
199
|
+
└─────────────────────────────────────────────────────────────┘
|
|
200
|
+
```
|
|
201
|
+
|
|
185
202
|
### 9. Update Bolt File on Stage Completion
|
|
186
203
|
|
|
204
|
+
**Trigger**: After EACH stage completion (not just final stage).
|
|
205
|
+
|
|
187
206
|
After each stage completion:
|
|
188
207
|
|
|
189
208
|
- Add stage to `stages_completed` with timestamp
|
|
190
209
|
- Update `current_stage` to next stage
|
|
191
|
-
- If final stage, set `status: completed` and `completed` timestamp
|
|
192
210
|
|
|
193
211
|
**⚠️ TIMESTAMP FORMAT**: See `memory-bank.yaml` → `conventions.timestamps`
|
|
194
212
|
|
|
@@ -197,112 +215,97 @@ After each stage completion:
|
|
|
197
215
|
status: in-progress
|
|
198
216
|
current_stage: {next-stage-from-bolt-type}
|
|
199
217
|
stages_completed:
|
|
200
|
-
- {stage-name}
|
|
218
|
+
- name: {stage-name}
|
|
219
|
+
completed: {timestamp}
|
|
220
|
+
artifact: {artifact-filename}
|
|
201
221
|
---
|
|
202
222
|
```
|
|
203
223
|
|
|
204
|
-
**
|
|
205
|
-
|
|
206
|
-
```yaml
|
|
207
|
-
completed: {timestamp}
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
#### Update Story Status (On Bolt Completion)
|
|
211
|
-
|
|
212
|
-
When marking a bolt as `status: complete`, update all stories in the bolt's `stories` array:
|
|
224
|
+
**If this is the FINAL stage**, proceed to **Step 10** (bolt completion).
|
|
213
225
|
|
|
214
|
-
|
|
215
|
-
2. **Locate story files**: `{intent}/units/{unit}/stories/{story-id}.md`
|
|
216
|
-
3. **Update each story frontmatter**:
|
|
226
|
+
**If this is NOT the final stage**, update bolt file and proceed to next stage. Stop here.
|
|
217
227
|
|
|
218
|
-
|
|
219
|
-
# Change from
|
|
220
|
-
status: draft
|
|
221
|
-
implemented: false
|
|
228
|
+
---
|
|
222
229
|
|
|
223
|
-
|
|
224
|
-
status: complete
|
|
225
|
-
implemented: true
|
|
226
|
-
```
|
|
230
|
+
### 10. Mark Bolt Complete (HARD GATE - MANDATORY ON FINAL STAGE)
|
|
227
231
|
|
|
228
|
-
**
|
|
232
|
+
**Trigger**: ONLY when this is the FINAL stage.
|
|
229
233
|
|
|
230
234
|
```text
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
⛔ HARD GATE - SCRIPT EXECUTION REQUIRED
|
|
236
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
237
|
+
You CANNOT report bolt completion without:
|
|
238
|
+
1. Running the bolt-complete.js script
|
|
239
|
+
2. Showing the script output to the user
|
|
240
|
+
|
|
241
|
+
If you skip this, the memory-bank becomes inconsistent.
|
|
242
|
+
Do NOT manually edit story files - the script handles everything.
|
|
237
243
|
```
|
|
238
244
|
|
|
239
|
-
|
|
245
|
+
**Run this command:**
|
|
240
246
|
|
|
241
|
-
|
|
247
|
+
```bash
|
|
248
|
+
node .specsmd/scripts/bolt-complete.js {bolt-id}
|
|
249
|
+
```
|
|
242
250
|
|
|
243
|
-
|
|
251
|
+
**What this command does (deterministically):**
|
|
244
252
|
|
|
245
|
-
|
|
253
|
+
1. Updates bolt file to `status: complete`
|
|
254
|
+
2. Updates ALL stories in bolt's `stories` array to `status: complete, implemented: true`
|
|
255
|
+
3. Updates unit status if all bolts for unit are complete
|
|
256
|
+
4. Updates intent status if all units for intent are complete
|
|
246
257
|
|
|
247
|
-
|
|
248
|
-
- Read unit-brief: `{intent}/units/{unit}/unit-brief.md`
|
|
249
|
-
- If unit status is `stories-defined` or `stories-updated` → change to `in-progress`
|
|
258
|
+
**Example output:**
|
|
250
259
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
260
|
+
```text
|
|
261
|
+
════════════════════════════════════════
|
|
262
|
+
Bolt Completion: 016-analytics-tracker
|
|
263
|
+
════════════════════════════════════════
|
|
254
264
|
|
|
255
|
-
|
|
265
|
+
Bolt: 016-analytics-tracker
|
|
266
|
+
Intent: 007-installer-analytics
|
|
267
|
+
Unit: analytics-tracker
|
|
268
|
+
Stories: 12
|
|
256
269
|
|
|
257
|
-
|
|
258
|
-
- Find all bolts for this unit: scan `memory-bank/bolts/*/bolt.md` and match `unit: {unit-name}` in frontmatter
|
|
259
|
-
- If ALL bolts have `status: complete` → update unit-brief to `status: complete`
|
|
270
|
+
✓ Bolt status: in-progress → complete
|
|
260
271
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
272
|
+
Updating stories:
|
|
273
|
+
✓ 001-initialize-mixpanel - draft → complete
|
|
274
|
+
✓ 002-generate-machine-hash - draft → complete
|
|
275
|
+
...
|
|
264
276
|
|
|
265
|
-
|
|
277
|
+
Stories: 12 updated, 0 skipped, 0 errors
|
|
266
278
|
|
|
267
|
-
|
|
268
|
-
Intent:
|
|
269
|
-
|
|
270
|
-
|
|
279
|
+
✓ Unit status: in-progress → complete
|
|
280
|
+
✓ Intent status: construction → complete
|
|
281
|
+
|
|
282
|
+
════════════════════════════════════════
|
|
283
|
+
✓ Bolt Complete: 016-analytics-tracker
|
|
284
|
+
════════════════════════════════════════
|
|
271
285
|
```
|
|
272
286
|
|
|
273
|
-
**
|
|
287
|
+
**Do NOT manually edit story files.** The command handles everything deterministically.
|
|
274
288
|
|
|
275
|
-
|
|
276
|
-
1. Stories updated: 001, 002, 003, 004 → complete
|
|
277
|
-
2. Check unit bolts:
|
|
278
|
-
- 001-artifact-parser: complete ✓
|
|
279
|
-
- 005-artifact-parser: planned ✗
|
|
280
|
-
→ Unit stays in-progress (not all bolts complete)
|
|
281
|
-
3. Intent stays construction (unit not complete)
|
|
282
|
-
```
|
|
289
|
+
**Verify the script completed successfully:**
|
|
283
290
|
|
|
284
|
-
|
|
291
|
+
After running the command, verify the changes were applied correctly:
|
|
285
292
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
- file-watcher: complete ✓
|
|
295
|
-
- sidebar-provider: in-progress ✗
|
|
296
|
-
→ Intent stays construction (not all units complete)
|
|
297
|
-
```
|
|
293
|
+
- [ ] **Bolt file updated**:
|
|
294
|
+
- [ ] `status: complete`
|
|
295
|
+
- [ ] `current_stage: null`
|
|
296
|
+
- [ ] `completed: {timestamp}` set
|
|
297
|
+
|
|
298
|
+
- [ ] **Stories updated** (sample 2-3 from the bolt's stories array):
|
|
299
|
+
- [ ] `status: complete`
|
|
300
|
+
- [ ] `implemented: true`
|
|
298
301
|
|
|
299
|
-
|
|
302
|
+
- [ ] **Unit status updated** (if all bolts for this unit are complete):
|
|
303
|
+
- [ ] Check `{intent}/units/{unit}/unit-brief.md` → `status: complete`
|
|
300
304
|
|
|
301
|
-
|
|
305
|
+
- [ ] **Intent status updated** (if all units for this intent are complete):
|
|
306
|
+
- [ ] Check `{intent}/intent.md` → `status: complete`
|
|
302
307
|
|
|
303
|
-
|
|
304
|
-
- **Final stage complete** → Mark bolt complete, suggest next bolt
|
|
305
|
-
- **User stops** → Save progress, can resume later
|
|
308
|
+
**If any verification fails**, the script may have encountered an error. Check the console output for error messages.
|
|
306
309
|
|
|
307
310
|
---
|
|
308
311
|
|
|
@@ -396,6 +399,31 @@ If construction log doesn't exist, create it using template:
|
|
|
396
399
|
|
|
397
400
|
---
|
|
398
401
|
|
|
402
|
+
## Bolt Completion Checklist
|
|
403
|
+
|
|
404
|
+
**Use this checklist to verify all completion tasks are done:**
|
|
405
|
+
|
|
406
|
+
```text
|
|
407
|
+
□ Bolt file updated:
|
|
408
|
+
□ status: complete
|
|
409
|
+
□ completed: {timestamp}
|
|
410
|
+
□ current_stage: null
|
|
411
|
+
|
|
412
|
+
□ Stories updated (Step 10):
|
|
413
|
+
□ Each story in bolt's stories array:
|
|
414
|
+
□ status: complete
|
|
415
|
+
□ implemented: true
|
|
416
|
+
|
|
417
|
+
□ Status cascade checked (Step 11):
|
|
418
|
+
□ Unit status updated if all bolts complete
|
|
419
|
+
□ Intent status updated if all units complete
|
|
420
|
+
|
|
421
|
+
□ Construction log updated:
|
|
422
|
+
□ "{bolt-id} completed" entry added
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
399
427
|
## Transition
|
|
400
428
|
|
|
401
429
|
After bolt completion:
|
|
@@ -63,7 +63,7 @@ Review all stories to understand:
|
|
|
63
63
|
|
|
64
64
|
```yaml
|
|
65
65
|
---
|
|
66
|
-
unit: expense-tracker-ui
|
|
66
|
+
unit: 001-expense-tracker-ui
|
|
67
67
|
unit_type: frontend
|
|
68
68
|
default_bolt_type: simple-construction-bolt
|
|
69
69
|
---
|
|
@@ -235,8 +235,8 @@ Establish execution order based on dependencies:
|
|
|
235
235
|
```markdown
|
|
236
236
|
---
|
|
237
237
|
id: {BBB}-{unit-name}
|
|
238
|
-
unit: {unit-name}
|
|
239
|
-
intent: {intent-name}
|
|
238
|
+
unit: {UUU}-{unit-name}
|
|
239
|
+
intent: {NNN}-{intent-name}
|
|
240
240
|
type: {bolt-type} # From unit-brief.md or default (ddd-construction-bolt, simple-construction-bolt)
|
|
241
241
|
status: planned
|
|
242
242
|
stories: [story-1, story-2]
|
|
@@ -289,10 +289,23 @@ Establish execution order based on dependencies:
|
|
|
289
289
|
|
|
290
290
|
Check the plan against:
|
|
291
291
|
|
|
292
|
+
**Frontmatter Validation (CRITICAL - check each bolt.md)**:
|
|
293
|
+
|
|
294
|
+
- [ ] `id` - Bolt identifier present
|
|
295
|
+
- [ ] `unit` - Parent unit ID present
|
|
296
|
+
- [ ] `intent` - Parent intent ID present
|
|
297
|
+
- [ ] `type` - Bolt type specified (`ddd-construction-bolt` or `simple-construction-bolt`)
|
|
298
|
+
- [ ] `status` - Set to `planned`
|
|
299
|
+
- [ ] `stories` - **Array of story IDs included** (NOT just in body, MUST be in frontmatter)
|
|
300
|
+
- [ ] `created` - Timestamp present
|
|
301
|
+
- [ ] `requires_bolts` - Dependency array present (can be empty `[]`)
|
|
302
|
+
- [ ] `enables_bolts` - Enables array present (can be empty `[]`)
|
|
303
|
+
- [ ] `complexity` - Complexity block with all 4 fields
|
|
304
|
+
|
|
305
|
+
**Content Validation**:
|
|
306
|
+
|
|
292
307
|
- [ ] All stories are assigned to bolts
|
|
293
308
|
- [ ] Dependencies are respected (bolt-to-bolt AND unit-to-unit)
|
|
294
|
-
- [ ] All dependencies documented in frontmatter
|
|
295
|
-
- [ ] Complexity assessment included for each bolt
|
|
296
309
|
- [ ] Each bolt has clear outputs
|
|
297
310
|
- [ ] No bolt is too large (max 5-6 stories)
|
|
298
311
|
- [ ] No circular dependencies exist
|
|
@@ -152,12 +152,14 @@ When `frontend.enabled: true` in the project type configuration, create a fronte
|
|
|
152
152
|
|
|
153
153
|
```yaml
|
|
154
154
|
---
|
|
155
|
-
unit: {intent}-ui
|
|
155
|
+
unit: {UUU}-{intent}-ui
|
|
156
156
|
unit_type: frontend
|
|
157
157
|
default_bolt_type: simple-construction-bolt
|
|
158
158
|
---
|
|
159
159
|
```
|
|
160
160
|
|
|
161
|
+
**Note**: The `unit` field uses the full folder name including the numeric prefix (e.g., `001-auth-service`, `002-auth-service-ui`). This matches the folder structure and enables direct path construction in scripts.
|
|
162
|
+
|
|
161
163
|
---
|
|
162
164
|
|
|
163
165
|
### 6. Propose Unit Structure
|
|
@@ -193,10 +195,10 @@ Present proposed decomposition with their assigned requirements:
|
|
|
193
195
|
Update `units.md` with all units for this intent
|
|
194
196
|
|
|
195
197
|
3. **Create Unit Directories**:
|
|
196
|
-
For each unit: `{schema.units}/{unit-name}/`
|
|
198
|
+
For each unit: `{schema.units}/{UUU}-{unit-name}/`
|
|
197
199
|
|
|
198
200
|
4. **Create Unit Brief** (CRITICAL):
|
|
199
|
-
For each unit, create `unit-brief.md` using `.specsmd/aidlc/templates/inception/unit-brief-template.md`
|
|
201
|
+
For each unit, create `{UUU}-{unit-name}/unit-brief.md` using `.specsmd/aidlc/templates/inception/unit-brief-template.md`
|
|
200
202
|
|
|
201
203
|
This brief is the **input for Construction Agent**. Include:
|
|
202
204
|
- Purpose and scope
|
|
@@ -209,14 +211,16 @@ Present proposed decomposition with their assigned requirements:
|
|
|
209
211
|
|
|
210
212
|
```yaml
|
|
211
213
|
---
|
|
212
|
-
unit:
|
|
213
|
-
intent:
|
|
214
|
+
unit: {UUU}-{unit-name}
|
|
215
|
+
intent: {NNN}-{intent-name}
|
|
214
216
|
phase: inception
|
|
215
217
|
status: draft
|
|
216
218
|
---
|
|
217
219
|
```
|
|
218
220
|
|
|
219
|
-
Note
|
|
221
|
+
**Note**: The `unit` field uses the full folder name including the numeric prefix. This matches the folder structure and enables direct path construction in scripts.
|
|
222
|
+
|
|
223
|
+
Story naming uses the story title (e.g., `001-user-signup.md`). No prefix field needed.
|
|
220
224
|
|
|
221
225
|
**For frontend units**, also include:
|
|
222
226
|
|
|
@@ -239,25 +243,25 @@ For each unit, verify:
|
|
|
239
243
|
## Output
|
|
240
244
|
|
|
241
245
|
```markdown
|
|
242
|
-
## Unit Decomposition: {intent-name}
|
|
246
|
+
## Unit Decomposition: {NNN}-{intent-name}
|
|
243
247
|
|
|
244
248
|
### Units Created
|
|
245
249
|
|
|
246
|
-
- [ ] **{unit-1}**: {purpose} - Dependencies: None - Stories: ~{n}
|
|
247
|
-
- [ ] **{unit-2}**: {purpose} - Dependencies: `{unit-1}` - Stories: ~{n}
|
|
250
|
+
- [ ] **{UUU}-{unit-1}**: {purpose} - Dependencies: None - Stories: ~{n}
|
|
251
|
+
- [ ] **{UUU}-{unit-2}**: {purpose} - Dependencies: `{UUU}-{unit-1}` - Stories: ~{n}
|
|
248
252
|
|
|
249
253
|
### Dependency Graph
|
|
250
254
|
|
|
251
|
-
{unit-1} ──► {unit-2} ──► {unit-3}
|
|
255
|
+
{UUU}-{unit-1} ──► {UUU}-{unit-2} ──► {UUU}-{unit-3}
|
|
252
256
|
│
|
|
253
257
|
▼
|
|
254
|
-
{unit-4}
|
|
258
|
+
{UUU}-{unit-4}
|
|
255
259
|
|
|
256
260
|
### Artifacts Created
|
|
257
261
|
|
|
258
262
|
✅ `{intent-path}/units.md`
|
|
259
|
-
✅ `{intent-path}/units/{unit-1}/unit-brief.md`
|
|
260
|
-
✅ `{intent-path}/units/{unit-2}/unit-brief.md`
|
|
263
|
+
✅ `{intent-path}/units/{UUU}-{unit-1}/unit-brief.md`
|
|
264
|
+
✅ `{intent-path}/units/{UUU}-{unit-2}/unit-brief.md`
|
|
261
265
|
|
|
262
266
|
```
|
|
263
267
|
|
|
@@ -27,8 +27,8 @@ memory-bank/bolts/{bolt-id}/
|
|
|
27
27
|
```yaml
|
|
28
28
|
---
|
|
29
29
|
id: bolt-{unit}-{sequence}
|
|
30
|
-
unit: {unit-name}
|
|
31
|
-
intent: {intent-name}
|
|
30
|
+
unit: {UUU}-{unit-name}
|
|
31
|
+
intent: {NNN}-{intent-name}
|
|
32
32
|
type: ddd-construction-bolt
|
|
33
33
|
status: planned
|
|
34
34
|
stories:
|
|
@@ -57,6 +57,27 @@ complexity:
|
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
60
|
+
## Required Frontmatter Fields (VALIDATION CHECKLIST)
|
|
61
|
+
|
|
62
|
+
Before creating a bolt, verify ALL required fields are present:
|
|
63
|
+
|
|
64
|
+
| Field | Required | Description |
|
|
65
|
+
|-------|----------|-------------|
|
|
66
|
+
| `id` | **YES** | Bolt identifier (format: `{BBB}-{unit-name}`) |
|
|
67
|
+
| `unit` | **YES** | Parent unit ID |
|
|
68
|
+
| `intent` | **YES** | Parent intent ID |
|
|
69
|
+
| `type` | **YES** | Bolt type (`ddd-construction-bolt` or `simple-construction-bolt`) |
|
|
70
|
+
| `status` | **YES** | Current status (`planned`, `in-progress`, `completed`, `blocked`) |
|
|
71
|
+
| `stories` | **YES** | Array of story IDs included in this bolt |
|
|
72
|
+
| `created` | **YES** | Creation timestamp |
|
|
73
|
+
| `requires_bolts` | **YES** | Array of bolt IDs this depends on (can be empty `[]`) |
|
|
74
|
+
| `enables_bolts` | **YES** | Array of bolt IDs waiting on this (can be empty `[]`) |
|
|
75
|
+
| `complexity` | **YES** | Complexity assessment block |
|
|
76
|
+
|
|
77
|
+
**If any required field is missing, the bolt is INVALID.**
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
60
81
|
## Content
|
|
61
82
|
|
|
62
83
|
```markdown
|
|
@@ -132,8 +153,8 @@ complexity:
|
|
|
132
153
|
```yaml
|
|
133
154
|
---
|
|
134
155
|
id: bolt-auth-service-1
|
|
135
|
-
unit: auth-service
|
|
136
|
-
intent: user-authentication
|
|
156
|
+
unit: 001-auth-service
|
|
157
|
+
intent: 001-user-authentication
|
|
137
158
|
type: ddd-construction-bolt
|
|
138
159
|
status: in-progress
|
|
139
160
|
stories:
|
|
@@ -270,6 +270,11 @@ created: {YYYY-MM-DDTHH:MM:SSZ}
|
|
|
270
270
|
- **Tests**: {passed}/{total} passed
|
|
271
271
|
- **Coverage**: {percentage}%
|
|
272
272
|
|
|
273
|
+
### Test Files
|
|
274
|
+
|
|
275
|
+
- [x] `{path/to/test-file.test.ts}` - {what this test file covers}
|
|
276
|
+
- [x] `{path/to/another.test.ts}` - {what this test file covers}
|
|
277
|
+
|
|
273
278
|
### Acceptance Criteria Validation
|
|
274
279
|
|
|
275
280
|
- ✅/❌ **{Criterion}**: {Status}
|
|
@@ -14,8 +14,8 @@ Use this template to track construction progress and replanning decisions for a
|
|
|
14
14
|
|
|
15
15
|
```markdown
|
|
16
16
|
---
|
|
17
|
-
unit: {unit-name}
|
|
18
|
-
intent: {intent-name}
|
|
17
|
+
unit: {UUU}-{unit-name}
|
|
18
|
+
intent: {NNN}-{intent-name}
|
|
19
19
|
created: {YYYY-MM-DDTHH:MM:SSZ}
|
|
20
20
|
last_updated: {YYYY-MM-DDTHH:MM:SSZ}
|
|
21
21
|
---
|
|
@@ -14,7 +14,7 @@ Use this template to track inception progress and decisions for an intent.
|
|
|
14
14
|
|
|
15
15
|
```markdown
|
|
16
16
|
---
|
|
17
|
-
intent: {intent-name}
|
|
17
|
+
intent: {NNN}-{intent-name}
|
|
18
18
|
created: {YYYY-MM-DDTHH:MM:SSZ}
|
|
19
19
|
completed: {YYYY-MM-DDTHH:MM:SSZ or null}
|
|
20
20
|
status: {in-progress | complete}
|
|
@@ -8,9 +8,9 @@ Use this template when creating individual story files during story creation.
|
|
|
8
8
|
|
|
9
9
|
```yaml
|
|
10
10
|
---
|
|
11
|
-
id: {
|
|
12
|
-
unit: {unit-name}
|
|
13
|
-
intent: {intent-name}
|
|
11
|
+
id: {SSS}-{title-slug}
|
|
12
|
+
unit: {UUU}-{unit-name}
|
|
13
|
+
intent: {NNN}-{intent-name}
|
|
14
14
|
status: draft
|
|
15
15
|
priority: must|should|could
|
|
16
16
|
created: {YYYY-MM-DDTHH:MM:SSZ}
|
|
@@ -24,7 +24,7 @@ implemented: false
|
|
|
24
24
|
## Content
|
|
25
25
|
|
|
26
26
|
```markdown
|
|
27
|
-
# Story: {
|
|
27
|
+
# Story: {SSS}-{title-slug}
|
|
28
28
|
|
|
29
29
|
## User Story
|
|
30
30
|
|
|
@@ -91,19 +91,19 @@ implemented: false
|
|
|
91
91
|
|
|
92
92
|
```yaml
|
|
93
93
|
---
|
|
94
|
-
id: user-
|
|
95
|
-
unit: auth-service
|
|
96
|
-
intent: user-authentication
|
|
94
|
+
id: 001-user-signup
|
|
95
|
+
unit: 001-auth-service
|
|
96
|
+
intent: 001-user-authentication
|
|
97
97
|
status: ready
|
|
98
98
|
priority: must
|
|
99
99
|
created: 2024-12-05T10:00:00Z
|
|
100
|
-
assigned_bolt:
|
|
100
|
+
assigned_bolt: 001-auth-service
|
|
101
101
|
implemented: false
|
|
102
102
|
---
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
```markdown
|
|
106
|
-
# Story: user-
|
|
106
|
+
# Story: 001-user-signup
|
|
107
107
|
|
|
108
108
|
## User Story
|
|
109
109
|
|
|
@@ -129,8 +129,8 @@ implemented: false
|
|
|
129
129
|
- None (first story)
|
|
130
130
|
|
|
131
131
|
### Enables
|
|
132
|
-
-
|
|
133
|
-
-
|
|
132
|
+
- 002-user-login (User login)
|
|
133
|
+
- 003-email-verification (Email verification)
|
|
134
134
|
|
|
135
135
|
## Edge Cases
|
|
136
136
|
|
|
@@ -8,8 +8,8 @@ Use this template when creating unit briefs during decomposition. This is the **
|
|
|
8
8
|
|
|
9
9
|
```yaml
|
|
10
10
|
---
|
|
11
|
-
unit: {unit-name}
|
|
12
|
-
intent: {intent-name}
|
|
11
|
+
unit: {UUU}-{unit-name}
|
|
12
|
+
intent: {NNN}-{intent-name}
|
|
13
13
|
phase: inception
|
|
14
14
|
status: draft|ready
|
|
15
15
|
created: {YYYY-MM-DDTHH:MM:SSZ}
|
|
@@ -17,7 +17,7 @@ updated: {YYYY-MM-DDTHH:MM:SSZ}
|
|
|
17
17
|
---
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Note
|
|
20
|
+
**Note**: The `unit` field uses the full folder name including the 3-digit prefix (e.g., `001-auth-service`). This matches the folder structure and enables direct path construction in scripts. Story naming uses the story title (e.g., `001-user-signup.md`).
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
package/lib/analytics/tracker.js
CHANGED
|
@@ -56,7 +56,12 @@ class AnalyticsTracker {
|
|
|
56
56
|
const Mixpanel = require('mixpanel');
|
|
57
57
|
this.mixpanel = Mixpanel.init(MIXPANEL_TOKEN, {
|
|
58
58
|
protocol: 'https',
|
|
59
|
-
host: 'api-eu.mixpanel.com' // EU endpoint for GDPR compliance
|
|
59
|
+
host: 'api-eu.mixpanel.com', // EU endpoint for GDPR compliance
|
|
60
|
+
// Note: geolocate: true enables IP-based geolocation for analytics.
|
|
61
|
+
// This data is used solely for aggregate usage insights (e.g., country-level
|
|
62
|
+
// adoption patterns). No personal identifiers are collected. Users can
|
|
63
|
+
// opt out via the --no-telemetry flag or SPECSMD_NO_TELEMETRY env var.
|
|
64
|
+
geolocate: true
|
|
60
65
|
});
|
|
61
66
|
|
|
62
67
|
// Generate IDs
|
|
@@ -117,7 +122,7 @@ class AnalyticsTracker {
|
|
|
117
122
|
if (waitForDelivery) {
|
|
118
123
|
return new Promise((resolve) => {
|
|
119
124
|
try {
|
|
120
|
-
this.mixpanel.track(eventName, eventData, (
|
|
125
|
+
this.mixpanel.track(eventName, eventData, () => {
|
|
121
126
|
// Resolve regardless of error - silent failure
|
|
122
127
|
resolve();
|
|
123
128
|
});
|
package/lib/installer.js
CHANGED
|
@@ -250,6 +250,20 @@ async function installFlow(flowKey, toolKeys) {
|
|
|
250
250
|
|
|
251
251
|
CLIUtils.displayStatus('', 'Installed flow resources', 'success');
|
|
252
252
|
|
|
253
|
+
// Step 2.5: Install local scripts for deterministic operations
|
|
254
|
+
// These scripts are version-matched to the installed specsmd version
|
|
255
|
+
const scriptsDir = path.join(specsmdDir, 'scripts');
|
|
256
|
+
await fs.ensureDir(scriptsDir);
|
|
257
|
+
|
|
258
|
+
const sourceScriptsDir = path.join(__dirname, '..', 'scripts');
|
|
259
|
+
if (await fs.pathExists(sourceScriptsDir)) {
|
|
260
|
+
await fs.copy(sourceScriptsDir, scriptsDir);
|
|
261
|
+
CLIUtils.displayStatus('', 'Installed local scripts', 'success');
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Note: Scripts are invoked directly via relative path (e.g., node .specsmd/scripts/bolt-complete.js)
|
|
265
|
+
// No npm scripts added to package.json to avoid dependency on package.json for execution
|
|
266
|
+
|
|
253
267
|
// NOTE: memory-bank/ is NOT created during installation
|
|
254
268
|
// It will be created when user runs project-init
|
|
255
269
|
// This allows us to detect if project is initialized by checking for memory-bank/standards/
|