specsmd 0.0.0-dev.1 → 0.0.0-dev.11
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 +30 -2
- package/flows/aidlc/skills/inception/bolt-plan.md +15 -2
- package/flows/aidlc/templates/construction/bolt-template.md +21 -0
- package/flows/aidlc/templates/construction/bolt-types/simple-construction-bolt.md +5 -0
- package/lib/analytics/tracker.js +7 -2
- package/package.json +1 -1
- package/scripts/bolt-complete.js +33 -2
|
@@ -182,6 +182,23 @@ 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
|
|
|
187
204
|
**Trigger**: After EACH stage completion (not just final stage).
|
|
@@ -210,11 +227,22 @@ stages_completed:
|
|
|
210
227
|
|
|
211
228
|
---
|
|
212
229
|
|
|
213
|
-
### 10. Mark Bolt Complete (
|
|
230
|
+
### 10. Mark Bolt Complete (HARD GATE - MANDATORY ON FINAL STAGE)
|
|
214
231
|
|
|
215
232
|
**Trigger**: ONLY when this is the FINAL stage.
|
|
216
233
|
|
|
217
|
-
|
|
234
|
+
```text
|
|
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.
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Run this command:**
|
|
218
246
|
|
|
219
247
|
```bash
|
|
220
248
|
node .specsmd/scripts/bolt-complete.js {bolt-id}
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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}
|
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/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.11",
|
|
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": {
|
package/scripts/bolt-complete.js
CHANGED
|
@@ -510,6 +510,29 @@ async function updateIntentStatus(bolt) {
|
|
|
510
510
|
return { updated: false };
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
+
/**
|
|
514
|
+
* Validate bolt status before allowing completion
|
|
515
|
+
*
|
|
516
|
+
* Pre-flight checks to ensure:
|
|
517
|
+
* - Bolt is in "in-progress" status (can't complete already-complete or not-started bolts)
|
|
518
|
+
* - Bolt has not already been completed
|
|
519
|
+
*/
|
|
520
|
+
function validateBoltStatus(bolt) {
|
|
521
|
+
const status = bolt.frontmatter.status || 'unknown';
|
|
522
|
+
|
|
523
|
+
// Cannot complete a bolt that's already complete
|
|
524
|
+
if (status === 'complete') {
|
|
525
|
+
return { valid: false, reason: 'Bolt is already complete' };
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
// Bolt should be in-progress before completing
|
|
529
|
+
if (status !== 'in-progress') {
|
|
530
|
+
return { valid: false, reason: `Bolt status is "${status}", expected "in-progress"` };
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
return { valid: true };
|
|
534
|
+
}
|
|
535
|
+
|
|
513
536
|
/**
|
|
514
537
|
* Main: Mark bolt as complete with all dependent updates
|
|
515
538
|
*/
|
|
@@ -522,6 +545,14 @@ async function boltMarkComplete(boltId, lastStage) {
|
|
|
522
545
|
// Step 1: Read bolt file
|
|
523
546
|
const bolt = await readBolt(boltId);
|
|
524
547
|
|
|
548
|
+
// Step 1.5: Validate bolt status before proceeding
|
|
549
|
+
const validation = validateBoltStatus(bolt);
|
|
550
|
+
if (!validation.valid) {
|
|
551
|
+
console.error(`\n${colors.red}Error:${colors.reset} ${validation.reason}`);
|
|
552
|
+
console.error(`${colors.dim}Use bolt-status command to check current state.${colors.reset}`);
|
|
553
|
+
return 1;
|
|
554
|
+
}
|
|
555
|
+
|
|
525
556
|
console.log(`${colors.dim}Bolt: ${bolt.id}${colors.reset}`);
|
|
526
557
|
console.log(`${colors.dim}Intent: ${bolt.frontmatter.intent}${colors.reset}`);
|
|
527
558
|
console.log(`${colors.dim}Unit: ${bolt.frontmatter.unit}${colors.reset}`);
|
|
@@ -537,11 +568,11 @@ async function boltMarkComplete(boltId, lastStage) {
|
|
|
537
568
|
console.log(`\n${colors.dim}Stories: ${colors.green}${storyResults.updated} updated${colors.reset}, ${colors.dim}${storyResults.skipped} skipped${colors.reset}${storyResults.errors > 0 ? `, ${colors.red}${storyResults.errors} errors${colors.reset}` : ''}\n`);
|
|
538
569
|
|
|
539
570
|
// Step 4: Update unit status
|
|
540
|
-
|
|
571
|
+
await updateUnitStatus(bolt);
|
|
541
572
|
console.log();
|
|
542
573
|
|
|
543
574
|
// Step 5: Update intent status
|
|
544
|
-
|
|
575
|
+
await updateIntentStatus(bolt);
|
|
545
576
|
console.log();
|
|
546
577
|
|
|
547
578
|
// Final summary
|