murmur8 3.5.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 (120) hide show
  1. package/.blueprint/agents/AGENT_BA_CASS.md +239 -0
  2. package/.blueprint/agents/AGENT_DEVELOPER_CODEY.md +308 -0
  3. package/.blueprint/agents/AGENT_SPECIFICATION_ALEX.md +183 -0
  4. package/.blueprint/agents/AGENT_TESTER_NIGEL.md +159 -0
  5. package/.blueprint/agents/GUARDRAILS.md +83 -0
  6. package/.blueprint/agents/TEAM_MANIFESTO.md +91 -0
  7. package/.blueprint/features/.gitkeep +0 -0
  8. package/.blueprint/features/feature_adaptive-retry/FEATURE_SPEC.md +239 -0
  9. package/.blueprint/features/feature_adaptive-retry/IMPLEMENTATION_PLAN.md +48 -0
  10. package/.blueprint/features/feature_adaptive-retry/story-prompt-modification.md +85 -0
  11. package/.blueprint/features/feature_adaptive-retry/story-retry-config.md +89 -0
  12. package/.blueprint/features/feature_adaptive-retry/story-should-retry.md +98 -0
  13. package/.blueprint/features/feature_adaptive-retry/story-strategy-recommendation.md +85 -0
  14. package/.blueprint/features/feature_agent-guardrails/FEATURE_SPEC.md +328 -0
  15. package/.blueprint/features/feature_agent-guardrails/IMPLEMENTATION_PLAN.md +90 -0
  16. package/.blueprint/features/feature_agent-guardrails/story-citation-requirements.md +50 -0
  17. package/.blueprint/features/feature_agent-guardrails/story-confidentiality.md +50 -0
  18. package/.blueprint/features/feature_agent-guardrails/story-escalation-protocol.md +55 -0
  19. package/.blueprint/features/feature_agent-guardrails/story-source-restrictions.md +50 -0
  20. package/.blueprint/features/feature_compressed-feedback/FEATURE_SPEC.md +136 -0
  21. package/.blueprint/features/feature_compressed-feedback/IMPLEMENTATION_PLAN.md +40 -0
  22. package/.blueprint/features/feature_feedback-loop/FEATURE_SPEC.md +347 -0
  23. package/.blueprint/features/feature_feedback-loop/IMPLEMENTATION_PLAN.md +71 -0
  24. package/.blueprint/features/feature_feedback-loop/story-feedback-collection.md +63 -0
  25. package/.blueprint/features/feature_feedback-loop/story-feedback-config.md +61 -0
  26. package/.blueprint/features/feature_feedback-loop/story-feedback-insights.md +63 -0
  27. package/.blueprint/features/feature_feedback-loop/story-quality-gates.md +57 -0
  28. package/.blueprint/features/feature_interactive-alex/FEATURE_SPEC.md +263 -0
  29. package/.blueprint/features/feature_interactive-alex/IMPLEMENTATION_PLAN.md +69 -0
  30. package/.blueprint/features/feature_interactive-alex/handoff-alex.md +19 -0
  31. package/.blueprint/features/feature_interactive-alex/handoff-cass.md +21 -0
  32. package/.blueprint/features/feature_interactive-alex/handoff-nigel.md +19 -0
  33. package/.blueprint/features/feature_interactive-alex/story-flag-routing.md +54 -0
  34. package/.blueprint/features/feature_interactive-alex/story-iterative-drafting.md +65 -0
  35. package/.blueprint/features/feature_interactive-alex/story-pipeline-integration.md +66 -0
  36. package/.blueprint/features/feature_interactive-alex/story-session-lifecycle.md +75 -0
  37. package/.blueprint/features/feature_interactive-alex/story-system-spec-creation.md +57 -0
  38. package/.blueprint/features/feature_lazy-business-context/FEATURE_SPEC.md +140 -0
  39. package/.blueprint/features/feature_lazy-business-context/IMPLEMENTATION_PLAN.md +54 -0
  40. package/.blueprint/features/feature_model-native-features/FEATURE_SPEC.md +174 -0
  41. package/.blueprint/features/feature_model-native-features/IMPLEMENTATION_PLAN.md +45 -0
  42. package/.blueprint/features/feature_parallel-abort/FEATURE_SPEC.md +117 -0
  43. package/.blueprint/features/feature_parallel-confirm/FEATURE_SPEC.md +90 -0
  44. package/.blueprint/features/feature_parallel-features/FEATURE_SPEC.md +291 -0
  45. package/.blueprint/features/feature_parallel-features/IMPLEMENTATION_PLAN.md +73 -0
  46. package/.blueprint/features/feature_parallel-lock/FEATURE_SPEC.md +119 -0
  47. package/.blueprint/features/feature_parallel-logging/FEATURE_SPEC.md +105 -0
  48. package/.blueprint/features/feature_parallel-preflight/FEATURE_SPEC.md +141 -0
  49. package/.blueprint/features/feature_pipeline-history/FEATURE_SPEC.md +239 -0
  50. package/.blueprint/features/feature_pipeline-history/IMPLEMENTATION_PLAN.md +71 -0
  51. package/.blueprint/features/feature_pipeline-history/story-clear-history.md +73 -0
  52. package/.blueprint/features/feature_pipeline-history/story-display-history.md +75 -0
  53. package/.blueprint/features/feature_pipeline-history/story-record-execution.md +76 -0
  54. package/.blueprint/features/feature_pipeline-history/story-show-statistics.md +85 -0
  55. package/.blueprint/features/feature_pipeline-insights/FEATURE_SPEC.md +288 -0
  56. package/.blueprint/features/feature_pipeline-insights/IMPLEMENTATION_PLAN.md +65 -0
  57. package/.blueprint/features/feature_pipeline-insights/story-anomaly-detection.md +71 -0
  58. package/.blueprint/features/feature_pipeline-insights/story-bottleneck-analysis.md +75 -0
  59. package/.blueprint/features/feature_pipeline-insights/story-failure-patterns.md +75 -0
  60. package/.blueprint/features/feature_pipeline-insights/story-json-output.md +75 -0
  61. package/.blueprint/features/feature_pipeline-insights/story-trend-analysis.md +78 -0
  62. package/.blueprint/features/feature_shared-guardrails/FEATURE_SPEC.md +119 -0
  63. package/.blueprint/features/feature_shared-guardrails/IMPLEMENTATION_PLAN.md +34 -0
  64. package/.blueprint/features/feature_shared-guardrails/story-extract-guardrails.md +60 -0
  65. package/.blueprint/features/feature_shared-guardrails/story-update-init-commands.md +63 -0
  66. package/.blueprint/features/feature_slim-agent-prompts/FEATURE_SPEC.md +145 -0
  67. package/.blueprint/features/feature_slim-agent-prompts/IMPLEMENTATION_PLAN.md +87 -0
  68. package/.blueprint/features/feature_slim-agent-prompts/story-create-runtime-prompt-template.md +59 -0
  69. package/.blueprint/features/feature_slim-agent-prompts/story-create-slim-agent-prompts.md +65 -0
  70. package/.blueprint/features/feature_slim-agent-prompts/story-skill-integration.md +53 -0
  71. package/.blueprint/features/feature_smart-story-routing/FEATURE_SPEC.md +147 -0
  72. package/.blueprint/features/feature_smart-story-routing/IMPLEMENTATION_PLAN.md +73 -0
  73. package/.blueprint/features/feature_template-extraction/FEATURE_SPEC.md +134 -0
  74. package/.blueprint/features/feature_template-extraction/IMPLEMENTATION_PLAN.md +46 -0
  75. package/.blueprint/features/feature_upstream-summaries/FEATURE_SPEC.md +150 -0
  76. package/.blueprint/features/feature_upstream-summaries/IMPLEMENTATION_PLAN.md +70 -0
  77. package/.blueprint/features/feature_validate-command/FEATURE_SPEC.md +209 -0
  78. package/.blueprint/features/feature_validate-command/IMPLEMENTATION_PLAN.md +59 -0
  79. package/.blueprint/features/feature_validate-command/story-failure-output.md +61 -0
  80. package/.blueprint/features/feature_validate-command/story-node-version-check.md +52 -0
  81. package/.blueprint/features/feature_validate-command/story-run-validation.md +59 -0
  82. package/.blueprint/features/feature_validate-command/story-success-output.md +50 -0
  83. package/.blueprint/prompts/TEMPLATE.md +65 -0
  84. package/.blueprint/prompts/alex-runtime.md +49 -0
  85. package/.blueprint/prompts/cass-runtime.md +46 -0
  86. package/.blueprint/prompts/codey-implement-runtime.md +52 -0
  87. package/.blueprint/prompts/codey-plan-runtime.md +47 -0
  88. package/.blueprint/prompts/nigel-runtime.md +47 -0
  89. package/.blueprint/system_specification/.gitkeep +0 -0
  90. package/.blueprint/system_specification/SYSTEM_SPEC.md +248 -0
  91. package/.blueprint/templates/FEATURE_SPEC.md +125 -0
  92. package/.blueprint/templates/STORY_TEMPLATE.md +96 -0
  93. package/.blueprint/templates/SYSTEM_SPEC.md +128 -0
  94. package/.blueprint/templates/TEST_TEMPLATE.md +76 -0
  95. package/.blueprint/ways_of_working/DEVELOPMENT_RITUAL.md +178 -0
  96. package/.business_context/README.md +27 -0
  97. package/LICENSE +21 -0
  98. package/README.md +564 -0
  99. package/SKILL.md +840 -0
  100. package/bin/cli.js +388 -0
  101. package/package.json +36 -0
  102. package/src/business-context.js +91 -0
  103. package/src/classifier.js +173 -0
  104. package/src/feedback.js +201 -0
  105. package/src/handoff.js +148 -0
  106. package/src/history.js +306 -0
  107. package/src/index.js +170 -0
  108. package/src/init.js +139 -0
  109. package/src/insights.js +504 -0
  110. package/src/interactive.js +338 -0
  111. package/src/orchestrator.js +217 -0
  112. package/src/parallel.js +1544 -0
  113. package/src/retry.js +274 -0
  114. package/src/stack.js +320 -0
  115. package/src/tools/index.js +27 -0
  116. package/src/tools/prompts.js +45 -0
  117. package/src/tools/schemas.js +38 -0
  118. package/src/tools/validation.js +83 -0
  119. package/src/update.js +112 -0
  120. package/src/validate.js +172 -0
package/README.md ADDED
@@ -0,0 +1,564 @@
1
+ # murmur8
2
+
3
+ A multi-agent workflow framework for automated feature development. Like a murmuration of starlings — individual agents moving together as one, each responding to its neighbours to create something greater than the sum of its parts.
4
+
5
+ Four specialized AI agents collaborate in sequence to take features from specification to implementation, with built-in feedback loops and self-improvement capabilities.
6
+
7
+ ## Agents
8
+
9
+ | Agent | Role |
10
+ |-------|------|
11
+ | **Alex** | System Specification & Chief-of-Staff — creates/maintains specs, guards design coherence |
12
+ | **Cass** | Story Writer/BA — translates specs into testable user stories |
13
+ | **Nigel** | Tester — converts stories into executable tests and test plans |
14
+ | **Codey** | Developer — implements code to satisfy tests (test-first) |
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npx murmur8 init
20
+ ```
21
+
22
+ This installs the `.blueprint/` directory, `.business_context/`, and the `/implement-feature` skill to `.claude/commands/`. If files already exist, you'll be prompted before overwriting. It also adds the workflow queue to `.gitignore`.
23
+
24
+ During initialization, murmur8 **auto-detects your project's tech stack** from manifest files (`package.json`, `pyproject.toml`, `go.mod`, etc.) and writes the result to `.claude/stack-config.json`. The agents (Nigel and Codey) read this file at runtime to adapt their testing and implementation approach to your stack.
25
+
26
+ ```bash
27
+ # Review what was detected
28
+ npx murmur8 stack-config
29
+
30
+ # Adjust if needed
31
+ npx murmur8 stack-config set language TypeScript
32
+ npx murmur8 stack-config set frameworks '["next","react"]'
33
+ npx murmur8 stack-config set testRunner vitest
34
+ npx murmur8 stack-config set testCommand "npx vitest run"
35
+ ```
36
+
37
+ If you're working with a non-JavaScript project, set the stack config before running the pipeline:
38
+
39
+ ```bash
40
+ # Python/Django example
41
+ npx murmur8 stack-config set language Python
42
+ npx murmur8 stack-config set runtime "Python 3.12"
43
+ npx murmur8 stack-config set packageManager pip
44
+ npx murmur8 stack-config set frameworks '["django"]'
45
+ npx murmur8 stack-config set testRunner pytest
46
+ npx murmur8 stack-config set testCommand "pytest"
47
+ npx murmur8 stack-config set linter ruff
48
+ ```
49
+
50
+ ## Keeping Up to Date
51
+
52
+ **Modules** (history, insights, feedback, retry, validate) are part of the npm package and update automatically when you use `npx` - no action needed.
53
+
54
+ **Project files** (agent specs, templates, skill definition) are copied to your project and need explicit updating:
55
+
56
+ ```bash
57
+ npx murmur8 update
58
+ ```
59
+
60
+ This updates `.blueprint/agents/`, `.blueprint/templates/`, `.blueprint/ways_of_working/`, and `.claude/commands/implement-feature.md` while preserving your content in `features/` and `system_specification/`.
61
+
62
+ ## Commands
63
+
64
+ ### Core Commands
65
+
66
+ | Command | Description |
67
+ |---------|-------------|
68
+ | `npx murmur8 init` | Initialize `.blueprint/`, `.business_context/`, and skill in your project |
69
+ | `npx murmur8 update` | Update agents, templates, and rituals to latest version |
70
+ | `npx murmur8 validate` | Pre-flight checks before running pipeline |
71
+ | `npx murmur8 help` | Show help |
72
+
73
+ ### History & Insights
74
+
75
+ | Command | Description |
76
+ |---------|-------------|
77
+ | `npx murmur8 history` | View recent pipeline runs |
78
+ | `npx murmur8 history --stats` | View aggregate statistics |
79
+ | `npx murmur8 history --all` | View all runs |
80
+ | `npx murmur8 history clear` | Clear history |
81
+ | `npx murmur8 insights` | Analyze patterns and get recommendations |
82
+ | `npx murmur8 insights --feedback` | View feedback correlation analysis |
83
+ | `npx murmur8 insights --bottlenecks` | View bottleneck analysis |
84
+ | `npx murmur8 insights --failures` | View failure pattern analysis |
85
+
86
+ ### Parallel Execution
87
+
88
+ | Command | Description |
89
+ |---------|-------------|
90
+ | `npx murmur8 parallel <slugs...>` | Run multiple features in parallel |
91
+ | `npx murmur8 parallel <slugs...> --dry-run` | Preview execution plan |
92
+ | `npx murmur8 parallel status` | Show status of running pipelines |
93
+ | `npx murmur8 parallel cleanup` | Remove completed worktrees |
94
+ | `npx murmur8 parallel-config` | View parallel configuration |
95
+ | `npx murmur8 parallel-config set <key> <value>` | Modify parallel settings |
96
+
97
+ ### Configuration
98
+
99
+ | Command | Description |
100
+ |---------|-------------|
101
+ | `npx murmur8 stack-config` | View detected tech stack |
102
+ | `npx murmur8 stack-config set <key> <value>` | Modify stack settings (language, frameworks, testRunner, etc.) |
103
+ | `npx murmur8 stack-config reset` | Reset to empty defaults |
104
+ | `npx murmur8 retry-config` | View retry configuration |
105
+ | `npx murmur8 retry-config set <key> <value>` | Modify retry settings |
106
+ | `npx murmur8 retry-config reset` | Reset to defaults |
107
+ | `npx murmur8 feedback-config` | View feedback thresholds |
108
+ | `npx murmur8 feedback-config set <key> <value>` | Modify feedback settings |
109
+ | `npx murmur8 parallel-config` | View parallel pipeline configuration |
110
+ | `npx murmur8 parallel-config set <key> <value>` | Modify parallel settings |
111
+
112
+ ## Usage
113
+
114
+ Run the pipeline with the `/implement-feature` skill in Claude Code:
115
+
116
+ ```bash
117
+ /implement-feature # Interactive
118
+ /implement-feature "user-auth" # New feature
119
+ /implement-feature "user-auth" --no-feedback # Skip feedback collection
120
+ /implement-feature "user-auth" --no-validate # Skip pre-flight validation
121
+ /implement-feature "user-auth" --no-history # Skip history recording
122
+ /implement-feature "user-auth" --no-commit # Skip auto-commit
123
+ /implement-feature "user-auth" --pause-after=alex|cass|nigel|codey-plan
124
+ /implement-feature "user-auth" --with-stories # Force include Cass stage
125
+ /implement-feature "user-auth" --skip-stories # Force skip Cass stage
126
+ ```
127
+
128
+ ## Smart Story Routing (v2.7)
129
+
130
+ The pipeline automatically classifies features as **technical** or **user-facing** and routes accordingly:
131
+
132
+ | Feature Type | Cass Stage | Example Features |
133
+ |--------------|------------|------------------|
134
+ | **Technical** | Skipped | refactoring, optimization, infrastructure, caching |
135
+ | **User-facing** | Included | login flows, dashboards, forms, notifications |
136
+
137
+ This saves ~25-40k tokens per technical feature while preserving story quality for user-facing features.
138
+
139
+ ```bash
140
+ # Auto-detection (default)
141
+ /implement-feature "token-optimization" # Detected as technical → skips Cass
142
+ /implement-feature "user-dashboard" # Detected as user-facing → includes Cass
143
+
144
+ # Manual override
145
+ /implement-feature "edge-case" --with-stories # Force include Cass
146
+ /implement-feature "edge-case" --skip-stories # Force skip Cass
147
+ ```
148
+
149
+ ## Pipeline Flow
150
+
151
+ The pipeline includes validation, smart routing, feedback loops, and history tracking:
152
+
153
+ ```
154
+ ┌─────────────────────────────────────────────────────────────────┐
155
+ │ Step 0: Pre-flight Validation │
156
+ │ • Check directories, specs, Node.js version │
157
+ └─────────────────────────────────────────────────────────────────┘
158
+
159
+
160
+ ┌─────────────────────────────────────────────────────────────────┐
161
+ │ Insights Preview │
162
+ │ • "Last 10 runs: 85% success, estimated ~12 min" │
163
+ └─────────────────────────────────────────────────────────────────┘
164
+
165
+
166
+ ┌─────────────────────────────────────────────────────────────────┐
167
+ │ Alex (Feature Spec) + Handoff Summary │
168
+ └─────────────────────────────────────────────────────────────────┘
169
+
170
+
171
+ ┌─────────────────────────────────────────────────────────────────┐
172
+ │ Smart Routing (v2.7) │
173
+ │ • Classify feature as technical or user-facing │
174
+ │ • Technical → skip Cass (saves ~25-40k tokens) │
175
+ │ • User-facing → include Cass │
176
+ └─────────────────────────────────────────────────────────────────┘
177
+
178
+ ┌───────────────┴───────────────┐
179
+ │ │
180
+ ▼ ▼
181
+ ┌──────────────────────┐ ┌──────────────────────┐
182
+ │ Technical Features │ │ User-Facing Features│
183
+ │ Skip to Nigel │ │ Cass (User Stories) │
184
+ └──────────────────────┘ └──────────────────────┘
185
+ │ │
186
+ └───────────────┬───────────────┘
187
+
188
+
189
+ ┌─────────────────────────────────────────────────────────────────┐
190
+ │ Nigel (Tests) + Handoff Summary │
191
+ │ │ │
192
+ │ ▼ │
193
+ │ Codey rates Nigel → Quality Gate │
194
+ │ │ │
195
+ │ ▼ │
196
+ │ Codey (Plan → Implement) │
197
+ └─────────────────────────────────────────────────────────────────┘
198
+
199
+ On Failure│
200
+
201
+ ┌─────────────────────────────────────────────────────────────────┐
202
+ │ Smart Retry │
203
+ │ • Check feedback chain for root cause │
204
+ │ • Recommend strategy based on history │
205
+ │ • Apply: simplify-prompt, add-context, incremental, etc. │
206
+ └─────────────────────────────────────────────────────────────────┘
207
+
208
+
209
+ ┌─────────────────────────────────────────────────────────────────┐
210
+ │ Auto-commit → Record to History │
211
+ │ • Duration, feedback scores, outcome │
212
+ └─────────────────────────────────────────────────────────────────┘
213
+ ```
214
+
215
+ ## Modules
216
+
217
+ murmur8 includes these built-in modules for observability and self-improvement:
218
+
219
+ | Module | Purpose |
220
+ |--------|---------|
221
+ | **validate** | Pre-flight checks before pipeline runs |
222
+ | **history** | Records execution data (timing, status, feedback) |
223
+ | **insights** | Analyzes patterns, detects bottlenecks, recommends improvements |
224
+ | **retry** | Smart retry strategies based on failure history |
225
+ | **feedback** | Agent-to-agent quality assessment with correlation tracking |
226
+ | **classifier** | Smart routing — classifies features as technical or user-facing |
227
+ | **handoff** | Structured summaries between agents for token efficiency |
228
+ | **business-context** | Lazy loading of business context based on feature needs |
229
+ | **tools** | Tool schemas and validation for Claude native features |
230
+ | **parallel** | Parallel pipeline execution using git worktrees |
231
+ | **stack** | Configurable tech stack detection and configuration |
232
+
233
+ ### How They Work Together
234
+
235
+ ```
236
+ Pipeline Run
237
+
238
+ ├──► history.js records timing at each stage
239
+
240
+ ├──► feedback.js collects quality ratings between stages
241
+
242
+ └──► On completion/failure, data stored in pipeline-history.json
243
+
244
+
245
+ Future Pipeline Runs
246
+
247
+ ┌────────────────────────┼────────────────────────┐
248
+ │ │ │
249
+ ▼ ▼ ▼
250
+ insights.js retry.js feedback.js
251
+ analyzes: recommends: calibrates:
252
+ • Bottlenecks • Retry strategies • Quality thresholds
253
+ • Failure patterns • Based on history • Agent accuracy
254
+ • Trends • And feedback issues
255
+ ```
256
+
257
+ ## Directory Structure
258
+
259
+ ```
260
+ your-project/
261
+ ├── .blueprint/
262
+ │ ├── agents/ # Agent specifications
263
+ │ │ ├── AGENT_SPECIFICATION_ALEX.md
264
+ │ │ ├── AGENT_BA_CASS.md
265
+ │ │ ├── AGENT_TESTER_NIGEL.md
266
+ │ │ ├── AGENT_DEVELOPER_CODEY.md
267
+ │ │ └── GUARDRAILS.md # Shared guardrails (v2.7)
268
+ │ ├── prompts/ # Slim runtime prompts (v2.7)
269
+ │ │ ├── TEMPLATE.md
270
+ │ │ ├── alex-runtime.md
271
+ │ │ ├── cass-runtime.md
272
+ │ │ ├── nigel-runtime.md
273
+ │ │ ├── codey-plan-runtime.md
274
+ │ │ └── codey-implement-runtime.md
275
+ │ ├── templates/ # Spec and output templates
276
+ │ │ ├── SYSTEM_SPEC.md
277
+ │ │ ├── FEATURE_SPEC.md
278
+ │ │ ├── STORY_TEMPLATE.md # (v2.7)
279
+ │ │ └── TEST_TEMPLATE.md # (v2.7)
280
+ │ ├── ways_of_working/ # Development rituals
281
+ │ ├── features/ # Feature specs (populated per feature)
282
+ │ └── system_specification/ # System spec (populated on first run)
283
+ ├── .business_context/ # Business context documents
284
+ │ └── README.md
285
+ ├── .claude/
286
+ │ ├── commands/
287
+ │ │ └── implement-feature.md # The /implement-feature skill
288
+ │ ├── worktrees/ # Git worktrees for parallel execution
289
+ │ │ └── feat-{slug}/ # Isolated worktree per feature
290
+ │ ├── pipeline-history.json # Execution history (gitignored)
291
+ │ ├── retry-config.json # Retry configuration (gitignored)
292
+ │ ├── feedback-config.json # Feedback thresholds (gitignored)
293
+ │ ├── parallel-config.json # Parallel execution config (gitignored)
294
+ │ ├── parallel-queue.json # Parallel pipeline state (gitignored)
295
+ │ ├── stack-config.json # Tech stack configuration (gitignored)
296
+ │ └── implement-queue.json # Pipeline queue state (gitignored)
297
+ └── test/
298
+ ├── artifacts/ # Test specs per feature
299
+ └── feature_*.test.js # Executable tests
300
+ ```
301
+
302
+ ## Agent Guardrails
303
+
304
+ All agents follow strict guardrails to ensure quality:
305
+
306
+ | Guardrail | Description |
307
+ |-----------|-------------|
308
+ | **Source Restrictions** | Only use provided inputs (specs, code, business_context) |
309
+ | **Prohibited Sources** | No social media, forums, external APIs, training data for domain facts |
310
+ | **Citation Requirements** | All claims must cite source files |
311
+ | **Confidentiality** | Business context treated as confidential |
312
+ | **Escalation Protocol** | Clear rules for when to ask vs assume |
313
+
314
+ ## Self-Improvement Loop
315
+
316
+ The pipeline learns from itself:
317
+
318
+ 1. **Record** — Each run records timing, feedback, and outcomes
319
+ 2. **Analyze** — `murmur8 insights` identifies patterns
320
+ 3. **Adapt** — Future runs use history to:
321
+ - Set dynamic quality thresholds
322
+ - Select optimal retry strategies
323
+ - Predict duration and success rate
324
+ 4. **Improve** — Feedback patterns suggest prompt improvements
325
+
326
+ ```bash
327
+ # Example insights output
328
+ $ npx murmur8 insights
329
+
330
+ ## Pipeline Insights
331
+
332
+ ### Bottlenecks
333
+ - nigel averages 4.2 min (42% of pipeline time)
334
+ - Recommendation: Consider simplifying test requirements
335
+
336
+ ### Failure Patterns
337
+ - codey-implement has 23% failure rate
338
+ - Most common issue: "missing-error-handling" (73% correlation)
339
+ - Recommendation: Ensure Alex includes error handling in specs
340
+
341
+ ### Trends
342
+ - Success rate: 75% → 85% (improving)
343
+ - Avg duration: 14 min → 11 min (improving)
344
+ ```
345
+
346
+ ## Token Efficiency (v2.7)
347
+
348
+ Version 2.7 introduces several optimizations to reduce token usage:
349
+
350
+ | Optimization | Savings | Description |
351
+ |--------------|---------|-------------|
352
+ | **Shared Guardrails** | ~1,200 tokens | Single GUARDRAILS.md instead of duplicated in each agent spec |
353
+ | **Slim Runtime Prompts** | ~5,200 tokens | 30-50 line prompts instead of 200-400 line full specs |
354
+ | **Upstream Summaries** | ~2,000-4,000 tokens | Handoff summaries between agents instead of full artifacts |
355
+ | **Template Extraction** | ~800 tokens | Templates moved to separate files, loaded on demand |
356
+ | **Lazy Business Context** | Variable | Only loaded when feature spec references it |
357
+ | **Compressed Feedback** | ~400 tokens | 3-line feedback prompts instead of 7-line |
358
+ | **Smart Story Routing** | ~25,000-40,000 tokens | Skip Cass for technical features |
359
+
360
+ **Total estimated savings: 10,000+ tokens per pipeline run** (more for technical features)
361
+
362
+ ## Parallel Execution with Git Worktrees
363
+
364
+ Run multiple feature pipelines simultaneously using git worktrees for isolation. Each feature gets its own worktree and branch, allowing true parallel development without conflicts.
365
+
366
+ ### How It Works
367
+
368
+ ```
369
+ murmur8 parallel user-auth dashboard notifications
370
+
371
+
372
+ ┌───────────────────────────────────────┐
373
+ │ Pre-flight Validation │
374
+ │ • Git repository check │
375
+ │ • Clean working tree required │
376
+ │ • Git 2.5+ for worktree support │
377
+ │ • Feature specs exist & complete │
378
+ │ • File overlap detection │
379
+ │ • Dependency detection │
380
+ │ • Scope estimation │
381
+ └───────────────────────────────────────┘
382
+
383
+
384
+ ┌───────────────────────────────────────┐
385
+ │ Create Isolated Worktrees │
386
+ │ │
387
+ │ .claude/worktrees/feat-user-auth/ │
388
+ │ └─ branch: feature/user-auth │
389
+ │ │
390
+ │ .claude/worktrees/feat-dashboard/ │
391
+ │ └─ branch: feature/dashboard │
392
+ │ │
393
+ │ .claude/worktrees/feat-notifications/│
394
+ │ └─ branch: feature/notifications│
395
+ └───────────────────────────────────────┘
396
+
397
+
398
+ ┌───────────────────────────────────────┐
399
+ │ Spawn Parallel Pipelines │
400
+ │ (max 3 concurrent by default) │
401
+ │ │
402
+ │ Each runs: Alex → Nigel → Codey │
403
+ │ in its isolated worktree │
404
+ └───────────────────────────────────────┘
405
+
406
+
407
+ ┌───────────────────────────────────────┐
408
+ │ Merge on Completion │
409
+ │ • First finished = first merged │
410
+ │ • Conflicts preserved for resolution │
411
+ │ • Successful worktrees cleaned up │
412
+ └───────────────────────────────────────┘
413
+ ```
414
+
415
+ ### Usage
416
+
417
+ ```bash
418
+ # Run 3 features in parallel (default concurrency)
419
+ npx murmur8 parallel user-auth dashboard notifications
420
+
421
+ # Preview what would happen without executing
422
+ npx murmur8 parallel user-auth dashboard --dry-run
423
+
424
+ # Limit concurrent pipelines
425
+ npx murmur8 parallel feat-a feat-b feat-c feat-d --max-concurrency=2
426
+
427
+ # Check status of running pipelines
428
+ npx murmur8 parallel status
429
+
430
+ # Skip pre-flight feature validation
431
+ npx murmur8 parallel user-auth dashboard --skip-preflight
432
+
433
+ # Clean up completed/aborted worktrees
434
+ npx murmur8 parallel cleanup
435
+ ```
436
+
437
+ ### Pre-flight Batch Validation (v2.8)
438
+
439
+ Before parallel execution, the system validates the batch to prevent wasted resources:
440
+
441
+ ```
442
+ $ npx murmur8 parallel feat-a feat-b feat-c --dry-run
443
+
444
+ Pre-flight Validation
445
+ =====================
446
+
447
+ ✓ feat-a: Spec complete, 3 stories, Plan exists
448
+ ✓ feat-b: Spec complete, 2 stories
449
+ ✗ feat-c: Not ready
450
+ ✗ Missing FEATURE_SPEC.md
451
+
452
+ Conflict Analysis
453
+ =================
454
+
455
+ ⚠ File overlap detected:
456
+ • src/utils.js: feat-a, feat-b both modify
457
+
458
+ Scope Estimation
459
+ ================
460
+
461
+ Feature | Stories | Files | Est. Time
462
+ ----------|---------|-------|----------
463
+ feat-a | 3 | 4 | ~27 min
464
+ feat-b | 2 | 2 | ~24 min
465
+ feat-c | 0 | 0 | ~10 min
466
+
467
+ Total estimated: ~61 min (parallel: ~27 min)
468
+ ```
469
+
470
+ **Validation checks:**
471
+ - Feature specs exist and have required sections
472
+ - User stories present (warns if missing)
473
+ - Implementation plans scanned for file overlap
474
+ - Dependencies between features detected
475
+ - Scope estimated from story/file counts
476
+
477
+ **On validation failure:**
478
+ ```
479
+ Cannot proceed. Fix issues above or use --skip-preflight to override.
480
+
481
+ Suggested commands:
482
+ /implement-feature "feat-c" --pause-after=alex
483
+ ```
484
+
485
+ ### Configuration
486
+
487
+ The parallel module is **CLI-agnostic** — configure it to work with different AI coding tools:
488
+
489
+ ```bash
490
+ # View current configuration
491
+ npx murmur8 parallel-config
492
+
493
+ # Output:
494
+ # cli: npx claude
495
+ # skill: /implement-feature
496
+ # skillFlags: --no-commit
497
+ # worktreeDir: .claude/worktrees
498
+ # maxConcurrency: 3
499
+ # queueFile: .claude/parallel-queue.json
500
+ ```
501
+
502
+ #### Configuration Options
503
+
504
+ | Option | Default | Description |
505
+ |--------|---------|-------------|
506
+ | `cli` | `npx claude` | The CLI tool to invoke |
507
+ | `skill` | `/implement-feature` | The command/skill to run |
508
+ | `skillFlags` | `--no-commit` | Additional flags for the skill |
509
+ | `worktreeDir` | `.claude/worktrees` | Where to create worktrees |
510
+ | `maxConcurrency` | `3` | Maximum parallel pipelines |
511
+ | `maxFeatures` | `10` | Maximum features per batch |
512
+ | `timeout` | `30` | Timeout per pipeline (minutes) |
513
+ | `minDiskSpaceMB` | `500` | Minimum disk space warning threshold |
514
+ | `queueFile` | `.claude/parallel-queue.json` | State persistence file |
515
+
516
+ #### Examples for Different CLIs
517
+
518
+ ```bash
519
+ # Claude Code (default)
520
+ npx murmur8 parallel-config set cli "npx claude"
521
+ npx murmur8 parallel-config set skill "/implement-feature"
522
+
523
+ # Cursor
524
+ npx murmur8 parallel-config set cli "cursor"
525
+ npx murmur8 parallel-config set skill "composer"
526
+ npx murmur8 parallel-config set skillFlags ""
527
+
528
+ # Aider
529
+ npx murmur8 parallel-config set cli "aider"
530
+ npx murmur8 parallel-config set skill "--message"
531
+ npx murmur8 parallel-config set skillFlags "implement feature:"
532
+
533
+ # Custom agent script
534
+ npx murmur8 parallel-config set cli "./my-agent.sh"
535
+ npx murmur8 parallel-config set skill "run"
536
+
537
+ # Reset to defaults
538
+ npx murmur8 parallel-config reset
539
+ ```
540
+
541
+ ### State Management
542
+
543
+ Each feature progresses through these states:
544
+
545
+ ```
546
+ parallel_queued → worktree_created → parallel_running → merge_pending → parallel_complete
547
+ │ │
548
+ ▼ ▼
549
+ parallel_failed merge_conflict
550
+ ```
551
+
552
+ - **Successful features**: Merged to main, worktree cleaned up
553
+ - **Failed pipelines**: Worktree preserved for debugging
554
+ - **Merge conflicts**: Branch preserved, manual resolution required
555
+
556
+ ### Requirements
557
+
558
+ - **Git 2.5+** (worktree support)
559
+ - **Clean working tree** (no uncommitted changes)
560
+ - **Sufficient disk space** (each worktree is a full checkout)
561
+
562
+ ## License
563
+
564
+ MIT