murmur8 4.1.1 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/.blueprint/agents/AGENT_SPECIFICATION_ALEX.md +33 -3
  2. package/.blueprint/features/feature_config-factory/FEATURE_SPEC.md +138 -0
  3. package/.blueprint/features/feature_config-factory/IMPLEMENTATION_PLAN.md +187 -0
  4. package/.blueprint/features/feature_config-factory/handoff-nigel.md +57 -0
  5. package/.blueprint/features/feature_export-history/FEATURE_SPEC.md +215 -0
  6. package/.blueprint/features/feature_export-history/IMPLEMENTATION_PLAN.md +48 -0
  7. package/.blueprint/features/feature_export-history/story-basic-export.md +48 -0
  8. package/.blueprint/features/feature_export-history/story-date-filter.md +42 -0
  9. package/.blueprint/features/feature_export-history/story-feature-filter.md +42 -0
  10. package/.blueprint/features/feature_export-history/story-file-output.md +48 -0
  11. package/.blueprint/features/feature_export-history/story-status-filter.md +42 -0
  12. package/.blueprint/features/feature_extract-prompt-util/FEATURE_SPEC.md +42 -0
  13. package/.blueprint/features/feature_fix-status-icons/FEATURE_SPEC.md +37 -0
  14. package/.blueprint/features/feature_murm-subagent/FEATURE_SPEC.md +137 -0
  15. package/.blueprint/features/feature_murm-subagent/SKILL_CHANGES.md +345 -0
  16. package/.blueprint/features/feature_split-cli-commands/FEATURE_SPEC.md +125 -0
  17. package/.blueprint/features/feature_split-cli-commands/IMPLEMENTATION_PLAN.md +119 -0
  18. package/.blueprint/features/feature_split-cli-commands/handoff-nigel.md +45 -0
  19. package/.blueprint/features/feature_theme-adoption/FEATURE_SPEC.md +143 -0
  20. package/.blueprint/features/feature_theme-adoption/IMPLEMENTATION_PLAN.md +68 -0
  21. package/.blueprint/features/feature_theme-adoption/handoff-nigel.md +35 -0
  22. package/.blueprint/templates/BACKLOG_TEMPLATE.md +46 -0
  23. package/README.md +26 -10
  24. package/SKILL.md +377 -3
  25. package/bin/cli.js +20 -384
  26. package/package.json +1 -1
  27. package/src/commands/feedback-config.js +32 -0
  28. package/src/commands/help.js +81 -0
  29. package/src/commands/history.js +42 -0
  30. package/src/commands/init.js +12 -0
  31. package/src/commands/insights.js +23 -0
  32. package/src/commands/murm-config.js +52 -0
  33. package/src/commands/murm.js +109 -0
  34. package/src/commands/queue.js +19 -0
  35. package/src/commands/retry-config.js +28 -0
  36. package/src/commands/stack-config.js +32 -0
  37. package/src/commands/update.js +12 -0
  38. package/src/commands/utils.js +24 -0
  39. package/src/commands/validate.js +15 -0
  40. package/src/config-factory.js +190 -0
  41. package/src/feedback.js +5 -2
  42. package/src/history.js +92 -1
  43. package/src/init.js +1 -15
  44. package/src/insights.js +19 -16
  45. package/src/retry.js +5 -2
  46. package/src/stack.js +4 -1
  47. package/src/theme.js +4 -4
  48. package/src/update.js +2 -15
  49. package/src/utils.js +26 -0
  50. package/src/validate.js +5 -12
package/SKILL.md CHANGED
@@ -24,10 +24,20 @@ description: Run the Alex → Cass → Nigel → Codey pipeline using Task tool
24
24
  | `{HANDOFF_ALEX}` | `{FEAT_DIR}/handoff-alex.md` |
25
25
  | `{HANDOFF_CASS}` | `{FEAT_DIR}/handoff-cass.md` |
26
26
  | `{HANDOFF_NIGEL}` | `{FEAT_DIR}/handoff-nigel.md` |
27
+ | `{BACKLOG}` | `.blueprint/features/BACKLOG.md` |
28
+
29
+ ## Multi-Feature Paths (Murmuration Mode)
30
+
31
+ | Var | Path |
32
+ |-----|------|
33
+ | `{WORKTREE_DIR}` | `.claude/worktrees` |
34
+ | `{WORKTREE_slug}` | `{WORKTREE_DIR}/feat-{slug}` |
35
+ | `{MURM_QUEUE}` | `.claude/murm-queue.json` |
27
36
 
28
37
  ## Invocation
29
38
 
30
39
  ```bash
40
+ # Single feature
31
41
  /implement-feature # Interactive slug prompt
32
42
  /implement-feature "user-auth" # New feature
33
43
  /implement-feature "user-auth" --interactive # Force interactive spec creation
@@ -36,6 +46,11 @@ description: Run the Alex → Cass → Nigel → Codey pipeline using Task tool
36
46
  /implement-feature "user-auth" --no-feedback # Skip feedback collection
37
47
  /implement-feature "user-auth" --no-validate # Skip pre-flight validation
38
48
  /implement-feature "user-auth" --no-history # Skip history recording
49
+
50
+ # Multiple features — parallel execution (murmuration mode)
51
+ /implement-feature feat-a feat-b feat-c # Run 3 features in parallel
52
+ /implement-feature feat-a feat-b --max-concurrency=2 # Limit parallelism
53
+ /implement-feature feat-a feat-b --sequential # Run one at a time (no worktrees)
39
54
  ```
40
55
 
41
56
  ## Pipeline Overview
@@ -64,6 +79,42 @@ description: Run the Alex → Cass → Nigel → Codey pipeline using Task tool
64
79
  AUTO-COMMIT → Record completion in history
65
80
  ```
66
81
 
82
+ ## Multi-Feature Pipeline Overview (Murmuration Mode)
83
+
84
+ When multiple slugs are provided, the pipeline uses worktree isolation and parallel Task sub-agents:
85
+
86
+ ```
87
+ /implement-feature slug-a slug-b slug-c
88
+
89
+
90
+ ┌─────────────────────────────────────────────────────┐
91
+ │ M0. Detect multi-feature mode │
92
+ │ M1. Pre-flight validation for ALL features │
93
+ │ M2. Check for file overlap conflicts │
94
+ │ M3. Create git worktrees (one per feature) │
95
+ └─────────────────────────────────────────────────────┘
96
+
97
+
98
+ ┌─────────────────────────────────────────────────────┐
99
+ │ M4. Spawn PARALLEL Task sub-agents │
100
+ │ │
101
+ │ Task(slug-a) ─┐ │
102
+ │ Task(slug-b) ─┼─► Run concurrently │
103
+ │ Task(slug-c) ─┘ │
104
+ │ │
105
+ │ Each Task runs full pipeline in its worktree: │
106
+ │ Alex → [Cass] → Nigel → Codey │
107
+ └─────────────────────────────────────────────────────┘
108
+
109
+
110
+ ┌─────────────────────────────────────────────────────┐
111
+ │ M5. Collect results as sub-agents complete │
112
+ │ M6. Merge successful features to main │
113
+ │ M7. Report conflicts/failures │
114
+ │ M8. Cleanup worktrees │
115
+ └─────────────────────────────────────────────────────┘
116
+ ```
117
+
67
118
  ## Output Constraints (CRITICAL)
68
119
 
69
120
  **All agents MUST follow these rules to avoid token limit errors:**
@@ -99,11 +150,306 @@ node bin/cli.js validate
99
150
  - Show which checks failed with fix suggestions
100
151
  - Ask user: "Fix issues and retry?" or "Continue anyway?" or "Abort"
101
152
 
102
- **On validation success:** Continue to Step 1
153
+ **On validation success:** Continue to Step 1 (or Step M0 if multiple slugs)
154
+
155
+ ---
156
+
157
+ ## Step M0: Multi-Feature Detection
158
+
159
+ **Trigger:** More than one slug provided in arguments.
160
+
161
+ Parse all slugs from arguments:
162
+ ```
163
+ /implement-feature feat-a feat-b feat-c --no-commit
164
+ → slugs = ["feat-a", "feat-b", "feat-c"]
165
+ → flags = { noCommit: true }
166
+ ```
167
+
168
+ **Routing:**
169
+ - If `slugs.length > 1`: Enter murmuration mode (Steps M1-M8)
170
+ - If `slugs.length === 1`: Continue to Step 1 (single-feature mode)
171
+ - If `--sequential` flag: Run features one at a time without worktrees
172
+
173
+ ---
174
+
175
+ ## Step M1: Multi-Feature Pre-flight Validation
176
+
177
+ For EACH slug, verify:
178
+ 1. Feature spec exists at `.blueprint/features/feature_{slug}/FEATURE_SPEC.md`
179
+ 2. Spec has required sections (Intent, Scope, Actors)
180
+
181
+ **Display validation table:**
182
+ ```
183
+ Pre-flight Validation
184
+ =====================
185
+
186
+ ✓ feat-a: Spec complete, 3 stories
187
+ ✓ feat-b: Spec complete, 2 stories
188
+ ✗ feat-c: Missing FEATURE_SPEC.md
189
+ ```
190
+
191
+ **On any failure:**
192
+ - Show which features are not ready
193
+ - Suggest: `/implement-feature "feat-c" --pause-after=alex` to create spec
194
+ - Ask: "Continue with ready features only?" or "Abort"
195
+
196
+ ---
197
+
198
+ ## Step M2: Conflict Detection
199
+
200
+ Scan implementation plans (if they exist) for file overlap:
201
+
202
+ ```bash
203
+ # For each feature with IMPLEMENTATION_PLAN.md, extract files to modify
204
+ grep -h "src/\|lib/\|bin/" .blueprint/features/feature_*/IMPLEMENTATION_PLAN.md
205
+ ```
206
+
207
+ **Display if conflicts found:**
208
+ ```
209
+ Conflict Analysis
210
+ =================
211
+
212
+ ⚠ File overlap detected:
213
+ • src/utils.js: feat-a, feat-b both modify
214
+
215
+ Recommendation: Run feat-a and feat-b sequentially, or resolve manually.
216
+ ```
217
+
218
+ **On conflict:** Ask user to confirm or adjust feature list.
219
+
220
+ ---
221
+
222
+ ## Step M3: Create Worktrees
223
+
224
+ For each validated slug, create an isolated git worktree:
225
+
226
+ ```bash
227
+ # Ensure clean working tree first
228
+ git status --porcelain
229
+
230
+ # Create worktrees (one per feature)
231
+ git worktree add .claude/worktrees/feat-{slug-a} -b feature/{slug-a}
232
+ git worktree add .claude/worktrees/feat-{slug-b} -b feature/{slug-b}
233
+ git worktree add .claude/worktrees/feat-{slug-c} -b feature/{slug-c}
234
+ ```
235
+
236
+ **Announce:**
237
+ ```
238
+ Creating worktrees...
239
+ ✓ .claude/worktrees/feat-a → branch feature/feat-a
240
+ ✓ .claude/worktrees/feat-b → branch feature/feat-b
241
+ ✓ .claude/worktrees/feat-c → branch feature/feat-c
242
+ ```
243
+
244
+ ---
245
+
246
+ ## Step M4: Spawn Parallel Feature Pipelines
247
+
248
+ **CRITICAL:** Use multiple Task tool calls IN THE SAME MESSAGE to run concurrently.
249
+
250
+ For each feature, spawn a Task sub-agent that runs the COMPLETE pipeline in its worktree. All Task calls must be made in a single assistant response to enable parallel execution.
251
+
252
+ ### Task Prompt Template (for each slug):
253
+
254
+ Use the Task tool with `subagent_type="general-purpose"`:
255
+
256
+ ```
257
+ You are running the implement-feature pipeline for "{slug}".
258
+
259
+ ## Working Directory
260
+ All file operations must use this worktree: .claude/worktrees/feat-{slug}
261
+
262
+ ## Task
263
+ Run the complete feature pipeline in the worktree:
264
+
265
+ 1. **Read Feature Spec**
266
+ - Path: .claude/worktrees/feat-{slug}/.blueprint/features/feature_{slug}/FEATURE_SPEC.md
267
+
268
+ 2. **Classify Feature**
269
+ - Technical (refactoring, optimization, infrastructure): Skip to step 4
270
+ - User-facing: Continue to step 3
271
+
272
+ 3. **Cass** (if user-facing) — Write user stories
273
+ - Read feature spec for context
274
+ - Write story-*.md files to feature directory
275
+ - Write handoff-cass.md
276
+
277
+ 4. **Nigel** — Create tests
278
+ - Read handoff (from Alex or Cass)
279
+ - Write: .claude/worktrees/feat-{slug}/test/artifacts/feature_{slug}/test-spec.md
280
+ - Write: .claude/worktrees/feat-{slug}/test/feature_{slug}.test.js
281
+ - Write: handoff-nigel.md
282
+
283
+ 5. **Codey Plan** — Create implementation plan
284
+ - Read handoff-nigel.md
285
+ - Write: IMPLEMENTATION_PLAN.md
286
+
287
+ 6. **Codey Implement** — Write code to pass tests
288
+ - Follow the implementation plan
289
+ - Run tests: node --test test/feature_{slug}.test.js
290
+ - Iterate until tests pass
291
+
292
+ ## Rules
293
+ - Work ONLY within .claude/worktrees/feat-{slug}
294
+ - Do NOT commit changes (will be merged later)
295
+ - Do NOT modify files outside the worktree
296
+ - Run tests from within the worktree directory
297
+
298
+ ## Completion
299
+ When done, report status as:
300
+ PIPELINE_RESULT: {"slug": "{slug}", "status": "success|failed", "tests": "X/Y passing", "files": ["list of created/modified files"], "error": "if failed, why"}
301
+ ```
302
+
303
+ **Example: 3 features in parallel**
304
+
305
+ Make THREE Task tool calls in a single message:
306
+ - Task 1: Pipeline for `feat-a` in `.claude/worktrees/feat-a`
307
+ - Task 2: Pipeline for `feat-b` in `.claude/worktrees/feat-b`
308
+ - Task 3: Pipeline for `feat-c` in `.claude/worktrees/feat-c`
309
+
310
+ The Task tool executes these concurrently.
311
+
312
+ ---
313
+
314
+ ## Step M5: Collect Results
315
+
316
+ As each Task sub-agent completes, parse its PIPELINE_RESULT:
317
+
318
+ ```javascript
319
+ results = [
320
+ { slug: "feat-a", status: "success", tests: "5/5", files: ["src/a.js"] },
321
+ { slug: "feat-b", status: "success", tests: "3/3", files: ["src/b.js"] },
322
+ { slug: "feat-c", status: "failed", error: "Tests failed: 2/4 passing" }
323
+ ]
324
+ ```
325
+
326
+ Wait for ALL sub-agents to complete before proceeding.
103
327
 
104
328
  ---
105
329
 
106
- ## Steps 1-5: Setup
330
+ ## Step M5.5: Commit Worktree Changes
331
+
332
+ For each successful pipeline, commit the changes in its worktree. This prepares the feature branch for merging.
333
+
334
+ **IMPORTANT:** Use absolute paths to avoid context confusion.
335
+
336
+ ```bash
337
+ # For each slug with status: "success"
338
+ cd /absolute/path/to/.claude/worktrees/feat-{slug}
339
+ git add -A
340
+ git commit -m "feat({slug}): {brief summary from PIPELINE_RESULT}
341
+
342
+ {tests} passing, {file count} files changed.
343
+
344
+ Co-Authored-By: Claude <noreply@anthropic.com>"
345
+ ```
346
+
347
+ **Example with 3 features:**
348
+ ```bash
349
+ # Commit each worktree (can run in parallel)
350
+ cd /workspaces/project/.claude/worktrees/feat-a && git add -A && git commit -m "..."
351
+ cd /workspaces/project/.claude/worktrees/feat-b && git add -A && git commit -m "..."
352
+ cd /workspaces/project/.claude/worktrees/feat-c && git add -A && git commit -m "..."
353
+ ```
354
+
355
+ **Skip failed pipelines** — their worktrees are preserved uncommitted for debugging.
356
+
357
+ **Return to main repo** before proceeding to merge:
358
+ ```bash
359
+ cd /workspaces/project # Back to main repo root
360
+ ```
361
+
362
+ ---
363
+
364
+ ## Step M6: Merge Successful Features
365
+
366
+ For each feature with `status: "success"`:
367
+
368
+ ```bash
369
+ # From main repository (not worktree)
370
+ git checkout main
371
+
372
+ # Merge the feature branch
373
+ git merge feature/{slug} --no-ff -m "feat({slug}): Add {slug} feature
374
+
375
+ Implemented via murmuration pipeline.
376
+
377
+ Co-Authored-By: Claude <noreply@anthropic.com>"
378
+ ```
379
+
380
+ **Handle merge conflicts:**
381
+ - Do NOT force resolve or abort
382
+ - Record: `{ slug, status: "conflict", branch: "feature/{slug}" }`
383
+ - Preserve worktree for manual resolution
384
+ - Continue merging other features
385
+
386
+ ### Remove Merged Features from Backlog
387
+
388
+ After all merges complete, update `{BACKLOG}` to remove successfully merged features:
389
+
390
+ 1. Read `.blueprint/features/BACKLOG.md`
391
+ 2. For each merged slug, remove its row from the table
392
+ 3. Remove any corresponding Details sections
393
+ 4. Write the updated backlog
394
+ 5. Commit the backlog update:
395
+ ```bash
396
+ git add .blueprint/features/BACKLOG.md
397
+ git commit -m "chore: remove completed features from backlog
398
+
399
+ Removed: {list of merged slugs}
400
+
401
+ Co-Authored-By: Claude <noreply@anthropic.com>"
402
+ ```
403
+
404
+ **If backlog doesn't exist:** Skip silently.
405
+
406
+ ---
407
+
408
+ ## Step M7: Report Summary
409
+
410
+ **Display murmuration summary:**
411
+ ```
412
+ --- Murmuration Complete ---
413
+
414
+ ## Landed (merged to main)
415
+ ✓ feat-a: 5 tests passing, 3 files changed
416
+ ✓ feat-b: 3 tests passing, 2 files changed
417
+
418
+ ## Turbulence (merge conflicts)
419
+ ⚠ (none)
420
+
421
+ ## Lost Formation (pipeline failed)
422
+ ✗ feat-c: Tests failed (2/4 passing)
423
+ Worktree preserved: .claude/worktrees/feat-c
424
+ To debug: cd .claude/worktrees/feat-c && node --test
425
+
426
+ ## Next Steps
427
+ - Run `node --test` to verify all merged tests pass
428
+ - Resolve any conflicts manually, then: git worktree remove .claude/worktrees/feat-X
429
+ ```
430
+
431
+ ---
432
+
433
+ ## Step M8: Cleanup Worktrees
434
+
435
+ **For successfully merged features:**
436
+ ```bash
437
+ git worktree remove .claude/worktrees/feat-{slug} --force
438
+ git branch -d feature/{slug} # Safe delete (already merged)
439
+ ```
440
+
441
+ **Preserve worktrees for:**
442
+ - Failed pipelines (for debugging)
443
+ - Merge conflicts (for manual resolution)
444
+
445
+ **Final cleanup check:**
446
+ ```bash
447
+ git worktree list # Verify cleanup
448
+ ```
449
+
450
+ ---
451
+
452
+ ## Steps 1-5: Setup (Single-Feature Mode)
107
453
 
108
454
  ### Step 1: Parse Arguments
109
455
  Extract: `{slug}`, pause gates (`--pause-after`), `--no-commit`
@@ -600,7 +946,7 @@ For detailed guidance, see: .blueprint/agents/AGENT_DEVELOPER_CODEY.md
600
946
 
601
947
  ---
602
948
 
603
- ## Step 11: Auto-commit
949
+ ## Step 11: Auto-commit & Backlog Cleanup
604
950
 
605
951
  If not `--no-commit`:
606
952
 
@@ -623,6 +969,34 @@ Artifacts:
623
969
  Co-Authored-By: Claude <noreply@anthropic.com>
624
970
  ```
625
971
 
972
+ ### Remove from Backlog
973
+
974
+ After successful commit, remove the completed feature from `{BACKLOG}`:
975
+
976
+ 1. Read `.blueprint/features/BACKLOG.md`
977
+ 2. Find the row containing `| ... | {slug} |`
978
+ 3. Remove that row from the table
979
+ 4. If a Details section exists for `### {slug}`, remove it too
980
+ 5. Write the updated backlog
981
+
982
+ **Example removal:**
983
+ ```markdown
984
+ # Before
985
+ | Status | P | E | Slug | Description |
986
+ |--------|---|---|------|-------------|
987
+ | ⏳ | P1 | M | user-auth | Login flow |
988
+ | ⏳ | P2 | S | theme-adoption | Use theme.js |
989
+
990
+ # After (user-auth completed)
991
+ | Status | P | E | Slug | Description |
992
+ |--------|---|---|------|-------------|
993
+ | ⏳ | P2 | S | theme-adoption | Use theme.js |
994
+ ```
995
+
996
+ **If backlog doesn't exist:** Skip silently (not all projects use backlogs).
997
+
998
+ **Include in commit:** Stage the updated backlog file with the feature commit.
999
+
626
1000
  ---
627
1001
 
628
1002
  ## Step 12: Report Status & Finalize History (ENHANCED)