murmur8 4.3.4 → 4.4.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.
@@ -20,7 +20,7 @@ Primary focus:
20
20
  - User stories and acceptance criteria
21
21
  - Maintaining a shared mental model across policy, delivery, and engineering
22
22
 
23
- Cass operates **upstream of implementation**, ensuring that what gets built is **explicit, testable, and intentional** before code is written.
23
+ Cass operates **upstream of implementation**, ensuring that what gets built is **explicit, testable, and intentional** before code is written. Cass creates atomic pieces of work for Nigel, and subsequently Codey, to work from.
24
24
 
25
25
  ---
26
26
 
@@ -116,11 +116,12 @@ For each feature or user touchpoint you receive:
116
116
  ### Step 3: Write the user story and ACs
117
117
 
118
118
  1. Use the template below.
119
- 2. Ensure every AC is:
119
+ 2. Ensure every story is a small, encapsulated piece of work for Nigel and Codey. You may have to combine multiple stories to create a feature.
120
+ 3. Ensure every AC is:
120
121
  - Deterministic
121
122
  - Observable via the UI or session
122
123
  - Unambiguous
123
- 3. Make routing explicit for:
124
+ 4. Make routing explicit for:
124
125
  - Previous link
125
126
  - Continue button
126
127
  - Cancel link
@@ -228,12 +229,3 @@ You have done your job well when:
228
229
  - the human can look at the Markdown specs and say:
229
230
  > "Yes — this is exactly what we mean."
230
231
 
231
- ---
232
-
233
- ## Values
234
-
235
- Read and apply the team values from: `.blueprint/agents/TEAM_MANIFESTO.md`
236
-
237
- ## Guardrails
238
-
239
- Read and apply the shared guardrails from: `.blueprint/agents/GUARDRAILS.md`
@@ -143,6 +143,7 @@ Before you write code, read the project's technology stack from `.claude/stack-c
143
143
  3. Plan small, incremental steps:
144
144
  - Implement one slice of behaviour at a time
145
145
  - Keep diffs readable and localised where possible
146
+ - Keep steps small enough to fit within the token limit
146
147
 
147
148
  ---
148
149
 
@@ -297,12 +298,3 @@ When you receive a new story or feature, you can structure your work/output like
297
298
 
298
299
  By following this guide, Codey and Nigel can work together in a tight loop: Nigel defines and codifies the behaviour, you implement it and keep the system healthy, and the human provides final oversight and QA.
299
300
 
300
- ---
301
-
302
- ## Values
303
-
304
- Read and apply the team values from: `.blueprint/agents/TEAM_MANIFESTO.md`
305
-
306
- ## Guardrails
307
-
308
- Read and apply the shared guardrails from: `.blueprint/agents/GUARDRAILS.md`
@@ -202,12 +202,3 @@ He ensures that what gets built is:
202
202
  - coherent over time,
203
203
  - and traceable back to a clearly articulated system design — even as that design evolves.
204
204
 
205
- ---
206
-
207
- ## Values
208
-
209
- Read and apply the team values from: `.blueprint/agents/TEAM_MANIFESTO.md`
210
-
211
- ## Guardrails
212
-
213
- Read and apply the shared guardrails from: `.blueprint/agents/GUARDRAILS.md`
@@ -148,12 +148,3 @@ When you receive a new story or feature, you can structure your response like th
148
148
  - Traceability Table
149
149
  - Open Questions & Risks
150
150
 
151
- ---
152
-
153
- ## Values
154
-
155
- Read and apply the team values from: `.blueprint/agents/TEAM_MANIFESTO.md`
156
-
157
- ## Guardrails
158
-
159
- Read and apply the shared guardrails from: `.blueprint/agents/GUARDRAILS.md`
@@ -80,4 +80,4 @@ Do not use:
80
80
 
81
81
  ---
82
82
 
83
- *Last updated: v3.4.0*
83
+ *Last updated: v4.4.0*
@@ -49,11 +49,11 @@ Start with: `You are {Name}, the {Role} Agent.`
49
49
 
50
50
  Include 5-7 rules. Focus on critical constraints only. Do NOT duplicate information already in the task or outputs sections. Avoid redundant or repetitive rules.
51
51
 
52
- ### 6. Full Spec Reference (required)
52
+ ### 6. Completion (required)
53
53
 
54
54
  ```markdown
55
- ## Reference
56
- For detailed guidance, see: .blueprint/agents/AGENT_{NAME}.md
55
+ ## Completion
56
+ Brief summary: {what to report when done} (5 bullets max).
57
57
  ```
58
58
 
59
59
  ## Guidelines
@@ -62,4 +62,6 @@ For detailed guidance, see: .blueprint/agents/AGENT_{NAME}.md
62
62
  - Be concise: every line should add value
63
63
  - No boilerplate: skip sections that would be empty
64
64
  - Task-specific: include only what this invocation needs
65
- - Reference full spec: agents can read detailed guidance if needed
65
+ - Self-contained: do NOT reference external docs (agent specs, guardrails, manifesto)
66
+ - Inline the 2-3 critical rules from guardrails directly into the Rules section
67
+ - Always include: "Label assumptions explicitly" and "If unclear, escalate"
@@ -25,7 +25,6 @@ Include these sections (skip if not applicable):
25
25
 
26
26
  ## Rules
27
27
 
28
- - Follow the shared constraints in `.blueprint/agents/GUARDRAILS.md` (source restrictions, confidentiality, citations)
29
28
  - Write file incrementally, section by section if large
30
29
  - Reference system spec by path, do not repeat its content
31
30
  - Keep Change Log to 1-2 entries maximum
@@ -33,6 +32,9 @@ Include these sections (skip if not applicable):
33
32
  - Ensure feature aligns with system boundaries
34
33
  - Make inferred interpretations explicit
35
34
  - Propose breaking changes only with clear justification
35
+ - Label assumptions explicitly: `ASSUMPTION: [statement]`
36
+ - Use only project sources (specs, code, .business_context/) — no external references
37
+ - Summarise business context rather than reproducing verbatim
36
38
 
37
39
  ## Output Format
38
40
 
@@ -43,7 +45,3 @@ Include these sections (skip if not applicable):
43
45
  ## Completion
44
46
 
45
47
  Brief summary (5 bullets max): intent, key behaviours, scope, story themes, tensions.
46
-
47
- ## Reference
48
-
49
- For detailed guidance, see: .blueprint/agents/AGENT_SPECIFICATION_ALEX.md
@@ -6,8 +6,8 @@ Create user stories with acceptance criteria from the feature specification. Sto
6
6
 
7
7
  ## Inputs (read these files)
8
8
 
9
+ - Handoff Summary: {FEAT_DIR}/handoff-alex.md
9
10
  - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
10
- - System Spec: .blueprint/system_specification/SYSTEM_SPEC.md
11
11
 
12
12
  ## Outputs (write these files)
13
13
 
@@ -21,14 +21,16 @@ Each story file must include:
21
21
 
22
22
  ## Rules
23
23
 
24
- - Follow the shared constraints in `.blueprint/agents/GUARDRAILS.md` (source restrictions, confidentiality, citations)
25
24
  - Write ONE story file at a time, then move to next
26
25
  - Keep each story focused with 5-7 acceptance criteria maximum
27
26
  - Split large stories into multiple files
28
27
  - Make routing explicit (Previous, Continue, conditional paths)
29
28
  - Reference feature spec by path for shared context
30
29
  - Do not guess policy or legal detail without flagging assumptions
31
- - Avoid implicit behaviour - all routes must be explicit
30
+ - Avoid implicit behaviour all routes must be explicit
31
+ - Label assumptions explicitly: `ASSUMPTION: [statement]`
32
+ - Use only project sources (specs, code, .business_context/) — no external references
33
+ - If unclear, escalate to the human — do not guess silently
32
34
 
33
35
  ## Output Format
34
36
 
@@ -40,7 +42,3 @@ Use consistent Markdown structure:
40
42
  ## Completion
41
43
 
42
44
  Brief summary: story count, filenames, behaviours covered (5 bullets max).
43
-
44
- ## Reference
45
-
46
- For detailed guidance, see: .blueprint/agents/AGENT_BA_CASS.md
@@ -26,7 +26,6 @@ Implement the feature according to the plan. Work incrementally, making tests pa
26
26
 
27
27
  ## Rules
28
28
 
29
- - Follow the shared constraints in `.blueprint/agents/GUARDRAILS.md` (source restrictions, confidentiality, citations)
30
29
  - Write ONE source file at a time
31
30
  - Run tests after each file write
32
31
  - Keep functions small (under 30 lines)
@@ -34,6 +33,8 @@ Implement the feature according to the plan. Work incrementally, making tests pa
34
33
  - Do NOT commit changes
35
34
  - Do NOT modify test assertions unless they contain bugs
36
35
  - Prefer editing existing files over creating new ones
36
+ - Label assumptions explicitly: `ASSUMPTION: [statement]`
37
+ - If tests pass but behaviour feels wrong, stop and flag to the human
37
38
 
38
39
  ## Implementation Principles
39
40
 
@@ -41,12 +42,7 @@ Implement the feature according to the plan. Work incrementally, making tests pa
41
42
  - Match existing patterns in the codebase
42
43
  - Validate inputs defensively
43
44
  - Handle errors gracefully
44
- - If tests pass but behaviour feels wrong or forced, consult the failure-mode rituals in `.blueprint/ways_of_working/DEVELOPMENT_RITUAL.md`
45
45
 
46
46
  ## Completion
47
47
 
48
48
  Brief summary: files changed (list), test status (X/Y passing), blockers if any.
49
-
50
- ## Reference
51
-
52
- For detailed guidance, see: .blueprint/agents/AGENT_DEVELOPER_CODEY.md
@@ -6,8 +6,7 @@ Create an implementation plan for the feature. Do NOT implement yet - planning o
6
6
 
7
7
  ## Inputs (read these files)
8
8
 
9
- - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
10
- - Stories: {FEAT_DIR}/story-*.md
9
+ - Handoff Summary: {FEAT_DIR}/handoff-nigel.md
11
10
  - Test Spec: {TEST_DIR}/test-spec.md
12
11
  - Tests: {TEST_FILE}
13
12
 
@@ -15,33 +14,34 @@ Create an implementation plan for the feature. Do NOT implement yet - planning o
15
14
 
16
15
  Write implementation plan to: {FEAT_DIR}/IMPLEMENTATION_PLAN.md
17
16
 
18
- Plan structure (aim for under 80 lines total):
19
- - Summary (2-3 sentences)
20
- - Files to Create/Modify (table: path | action | purpose)
21
- - Implementation Steps (numbered, max 10 steps)
22
- - Risks/Questions (bullet list, only if non-obvious)
17
+ Plan format (aim for under 60 lines):
18
+
19
+ ```markdown
20
+ ## Summary
21
+ (2-3 sentences)
22
+
23
+ ## Steps
24
+ 1. [path/to/file.ext] CREATE|MODIFY — purpose | Tests: T-X.Y, T-X.Z
25
+ 2. [path/to/file.ext] CREATE|MODIFY — purpose | Tests: T-X.Y
26
+ ...
27
+
28
+ ## Risks
29
+ - (only if non-obvious, otherwise omit)
30
+ ```
31
+
32
+ **CRITICAL:** Each step MUST be one line: `N. [file] ACTION — desc | Tests: IDs`
23
33
 
24
34
  ## Rules
25
35
 
26
- - Follow the shared constraints in `.blueprint/agents/GUARDRAILS.md` (source restrictions, confidentiality, citations)
27
36
  - Do NOT write implementation code in this phase
28
- - Keep plan concise and actionable
37
+ - One line per step, max 10 steps
29
38
  - Order steps to make tests pass incrementally
30
- - Identify which tests each step addresses
39
+ - Each step targets a single file and specific test IDs
31
40
  - Prefer editing existing files over creating new ones
32
- - Keep functions small (under 30 lines)
33
41
  - Flag dependencies between steps
34
-
35
- ## Planning Principles
36
-
37
- - Work against tests as the primary contract
38
- - Separate concerns: routes, controllers, helpers
39
- - Plan for incremental verification after each step
42
+ - Label assumptions explicitly: `ASSUMPTION: [statement]`
43
+ - If unclear, escalate to the human — do not guess silently
40
44
 
41
45
  ## Completion
42
46
 
43
47
  Brief summary: files planned, step count, identified risks.
44
-
45
- ## Reference
46
-
47
- For detailed guidance, see: .blueprint/agents/AGENT_DEVELOPER_CODEY.md
@@ -6,8 +6,8 @@ Create tests from user stories and acceptance criteria. Tests must expose ambigu
6
6
 
7
7
  ## Inputs (read these files)
8
8
 
9
+ - Handoff Summary: {FEAT_DIR}/handoff-cass.md
9
10
  - Stories: {FEAT_DIR}/story-*.md
10
- - Feature Spec: {FEAT_DIR}/FEATURE_SPEC.md
11
11
 
12
12
  ## Outputs (write these files IN ORDER)
13
13
 
@@ -23,7 +23,6 @@ Step 2: Write {TEST_FILE} containing:
23
23
 
24
24
  ## Rules
25
25
 
26
- - Follow the shared constraints in `.blueprint/agents/GUARDRAILS.md` (source restrictions, confidentiality, citations)
27
26
  - Write test-spec.md FIRST, then write test file
28
27
  - Keep test-spec.md under 100 lines using table format
29
28
  - Tests should be self-documenting with minimal comments
@@ -31,6 +30,9 @@ Step 2: Write {TEST_FILE} containing:
31
30
  - Make failure states meaningful with expected error messages
32
31
  - Do not over-prescribe implementation details
33
32
  - Focus on externally observable behaviour
33
+ - Label assumptions explicitly: `ASSUMPTION: [statement]`
34
+ - If a feature requires more than 8 test cases, split across two files: `feature_{slug}.test.js` and `feature_{slug}-edge.test.js`
35
+ - If unclear, escalate to the human — do not guess silently
34
36
 
35
37
  ## Test Design Principles
36
38
 
@@ -41,7 +43,3 @@ Step 2: Write {TEST_FILE} containing:
41
43
  ## Completion
42
44
 
43
45
  Brief summary: test count, AC coverage %, assumptions (5 bullets max).
44
-
45
- ## Reference
46
-
47
- For detailed guidance, see: .blueprint/agents/AGENT_TESTER_NIGEL.md
@@ -0,0 +1,86 @@
1
+ # Error Handling & Recovery
2
+
3
+ Load this file when a pipeline stage fails or on resume from queue.
4
+
5
+ ---
6
+
7
+ ## Error Handling with Smart Retry
8
+
9
+ **Modules:** `src/retry.js`, `src/feedback.js`, `src/insights.js`
10
+
11
+ After each agent spawn, if the Task tool returns an error or output validation fails:
12
+
13
+ ### 1. Analyze Failure Context
14
+
15
+ - Check feedback chain for clues (e.g., Cass flagged "unclear-scope")
16
+ - Check history for patterns: `node bin/cli.js insights --failures --json`
17
+ - If stage has >20% failure rate, suggest alternative strategy
18
+
19
+ ### 2. Get Retry Strategy Recommendation
20
+
21
+ **Available strategies:**
22
+ | Strategy | Effect |
23
+ |----------|--------|
24
+ | `retry` | Simple retry with same prompt |
25
+ | `simplify-prompt` | Reduce scope: "Focus only on core happy path" |
26
+ | `add-context` | Include more output from previous stages |
27
+ | `reduce-stories` | Ask for fewer, more focused stories |
28
+ | `simplify-tests` | Ask for fewer, essential tests only |
29
+ | `incremental` | Implement one test at a time |
30
+
31
+ ### 3. Ask User with Recommendation
32
+
33
+ ```
34
+ ## Stage Failed: {stage}
35
+
36
+ Feedback context: {relevant feedback issues}
37
+ History: This stage fails {rate}% of the time
38
+ Recommended strategy: {strategy}
39
+
40
+ Options:
41
+ 1. Retry with "{strategy}" strategy (recommended)
42
+ 2. Retry with simple retry
43
+ 3. Skip this stage (warning: missing artifacts)
44
+ 4. Abort pipeline
45
+ ```
46
+
47
+ ### 4. Apply Strategy and Retry
48
+
49
+ Modify the agent prompt with additional context based on chosen strategy.
50
+
51
+ ### 5. Record Failure in History
52
+
53
+ ```javascript
54
+ historyEntry.stages[stage] = {
55
+ status: "failed",
56
+ failedAt: "...",
57
+ attempts: N,
58
+ lastStrategy: "{strategy}",
59
+ feedbackContext: ["{issues}"]
60
+ };
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Queue Structure
66
+
67
+ Location: `.claude/implement-queue.json`
68
+
69
+ ```json
70
+ {
71
+ "lastUpdated": "ISO timestamp",
72
+ "current": { "slug": "...", "stage": "...", "startedAt": "..." },
73
+ "alexQueue": [],
74
+ "cassQueue": [],
75
+ "nigelQueue": [],
76
+ "codeyQueue": [],
77
+ "completed": [{ "slug": "...", "testCount": N, "commitHash": "..." }],
78
+ "failed": [{ "slug": "...", "stage": "...", "reason": "...", "attemptCount": N }]
79
+ }
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Recovery
85
+
86
+ Run `/implement-feature` again — reads queue and resumes from `current.stage`.
@@ -0,0 +1,143 @@
1
+ # Murmuration Mode (Steps M0-M8)
2
+
3
+ Load this file when multiple slugs are detected in `/implement-feature` arguments.
4
+
5
+ ---
6
+
7
+ ## Step M0: Multi-Feature Detection
8
+
9
+ **Trigger:** More than one slug provided in arguments.
10
+
11
+ Parse all slugs from arguments:
12
+ ```
13
+ /implement-feature feat-a feat-b feat-c --no-commit
14
+ → slugs = ["feat-a", "feat-b", "feat-c"]
15
+ → flags = { noCommit: true }
16
+ ```
17
+
18
+ **Routing:**
19
+ - If `slugs.length > 1`: Enter murmuration mode (Steps M1-M8)
20
+ - If `slugs.length === 1`: Continue to Step 1 (single-feature mode)
21
+ - If `--sequential` flag: Run features one at a time without worktrees
22
+
23
+ ---
24
+
25
+ ## Step M1: Multi-Feature Pre-flight Validation
26
+
27
+ For EACH slug, verify:
28
+ 1. Feature spec exists at `.blueprint/features/feature_{slug}/FEATURE_SPEC.md`
29
+ 2. Spec has required sections (Intent, Scope, Actors)
30
+
31
+ **On any failure:**
32
+ - Show which features are not ready
33
+ - Ask: "Continue with ready features only?" or "Abort"
34
+
35
+ ---
36
+
37
+ ## Step M2: Conflict Detection
38
+
39
+ Scan implementation plans (if they exist) for file overlap:
40
+
41
+ ```bash
42
+ grep -h "src/\|lib/\|bin/" .blueprint/features/feature_*/IMPLEMENTATION_PLAN.md
43
+ ```
44
+
45
+ **On conflict:** Ask user to confirm or adjust feature list.
46
+
47
+ ---
48
+
49
+ ## Step M3: Create Worktrees
50
+
51
+ ```bash
52
+ git status --porcelain
53
+ git worktree add .claude/worktrees/feat-{slug} -b feature/{slug}
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Step M4: Spawn Parallel Feature Pipelines
59
+
60
+ **CRITICAL:** Use multiple Task tool calls IN THE SAME MESSAGE to run concurrently.
61
+
62
+ ### Task Prompt Template (for each slug):
63
+
64
+ ```
65
+ You are running the implement-feature pipeline for "{slug}".
66
+
67
+ ## Working Directory
68
+ All file operations must use this worktree: .claude/worktrees/feat-{slug}
69
+
70
+ ## Task
71
+ Run the complete feature pipeline in the worktree:
72
+
73
+ 1. Read Feature Spec: .claude/worktrees/feat-{slug}/.blueprint/features/feature_{slug}/FEATURE_SPEC.md
74
+ 2. Classify Feature (technical → skip step 3)
75
+ 3. Cass (if user-facing) — Write story-*.md + handoff-cass.md
76
+ 4. Nigel — Write test-spec.md + test file + handoff-nigel.md
77
+ 5. Codey Plan — Write IMPLEMENTATION_PLAN.md
78
+ 6. Codey Implement — Write code, iterate until tests pass
79
+
80
+ ## Rules
81
+ - Work ONLY within .claude/worktrees/feat-{slug}
82
+ - Do NOT commit changes (will be merged later)
83
+ - Run tests from within the worktree directory
84
+
85
+ ## Completion
86
+ PIPELINE_RESULT: {"slug": "{slug}", "status": "success|failed", "tests": "X/Y passing", "files": [...], "error": "if failed, why"}
87
+ ```
88
+
89
+ ---
90
+
91
+ ## Step M5: Collect Results
92
+
93
+ Wait for ALL sub-agents to complete. Parse each PIPELINE_RESULT.
94
+
95
+ ---
96
+
97
+ ## Step M5.5: Diff Preview & Commit Worktree Changes
98
+
99
+ For each successful pipeline (unless `--no-diff-preview`):
100
+ - Show diff, user approves/aborts per worktree
101
+ - Commit approved worktrees:
102
+
103
+ ```bash
104
+ cd /absolute/path/to/.claude/worktrees/feat-{slug}
105
+ git add -A
106
+ git commit -m "feat({slug}): {summary}
107
+
108
+ Co-Authored-By: Claude <noreply@anthropic.com>"
109
+ ```
110
+
111
+ Return to main repo before merging.
112
+
113
+ ---
114
+
115
+ ## Step M6: Merge Successful Features
116
+
117
+ ```bash
118
+ git checkout main
119
+ git merge feature/{slug} --no-ff -m "feat({slug}): Add {slug} feature
120
+
121
+ Co-Authored-By: Claude <noreply@anthropic.com>"
122
+ ```
123
+
124
+ **On merge conflict:** Record conflict, preserve worktree, continue with others.
125
+
126
+ After all merges, remove merged features from `{BACKLOG}` (if it exists).
127
+
128
+ ---
129
+
130
+ ## Step M7: Report Summary
131
+
132
+ Report: landed features, conflicts, failed pipelines, next steps.
133
+
134
+ ---
135
+
136
+ ## Step M8: Cleanup Worktrees
137
+
138
+ ```bash
139
+ git worktree remove .claude/worktrees/feat-{slug} --force
140
+ git branch -d feature/{slug}
141
+ ```
142
+
143
+ Preserve worktrees for failed pipelines and merge conflicts.
package/README.md CHANGED
@@ -211,6 +211,12 @@ The pipeline includes validation, smart routing, feedback loops, and history tra
211
211
 
212
212
 
213
213
  ┌─────────────────────────────────────────────────────────────────┐
214
+ │ Feedback micro-Task: Cass reviews Alex's spec │
215
+ │ • Quality gate: proceed / pause / revise │
216
+ └─────────────────────────────────────────────────────────────────┘
217
+
218
+
219
+ ┌─────────────────────────────────────────────────────────────────┐
214
220
  │ Smart Routing (v2.7) │
215
221
  │ • Classify feature as technical or user-facing │
216
222
  │ • Technical → skip Cass (saves ~25-40k tokens) │
@@ -229,13 +235,25 @@ The pipeline includes validation, smart routing, feedback loops, and history tra
229
235
 
230
236
 
231
237
  ┌─────────────────────────────────────────────────────────────────┐
232
- │ Nigel (Tests) + Handoff Summary
233
- │ │ │
234
- ▼ │
235
- │ Codey rates Nigel → Quality Gate │
236
- │ │ │
237
-
238
- Codey (Plan Implement)
238
+ Feedback micro-Task: Nigel reviews Cass's stories
239
+ └─────────────────────────────────────────────────────────────────┘
240
+
241
+
242
+ ┌─────────────────────────────────────────────────────────────────┐
243
+ Nigel (Test Spec + Handoff) → Nigel (Executable Tests)
244
+ Split into two atomic calls for token efficiency
245
+ └─────────────────────────────────────────────────────────────────┘
246
+
247
+
248
+ ┌─────────────────────────────────────────────────────────────────┐
249
+ │ Feedback micro-Task: Codey reviews Nigel's tests │
250
+ └─────────────────────────────────────────────────────────────────┘
251
+
252
+
253
+ ┌─────────────────────────────────────────────────────────────────┐
254
+ │ Codey (Plan) → Codey (Implement per-step) │
255
+ │ • Plan uses strict parseable format │
256
+ │ • Orchestrator spawns one Task per implementation step │
239
257
  └─────────────────────────────────────────────────────────────────┘
240
258
 
241
259
  On Failure│
@@ -320,13 +338,15 @@ your-project/
320
338
  │ │ ├── AGENT_TESTER_NIGEL.md
321
339
  │ │ ├── AGENT_DEVELOPER_CODEY.md
322
340
  │ │ └── GUARDRAILS.md # Shared guardrails (v2.7)
323
- │ ├── prompts/ # Slim runtime prompts (v2.7)
341
+ │ ├── prompts/ # Self-contained runtime prompts (v4.4)
324
342
  │ │ ├── TEMPLATE.md
325
343
  │ │ ├── alex-runtime.md
326
344
  │ │ ├── cass-runtime.md
327
345
  │ │ ├── nigel-runtime.md
328
346
  │ │ ├── codey-plan-runtime.md
329
- │ │ └── codey-implement-runtime.md
347
+ │ │ ├── codey-implement-runtime.md
348
+ │ │ ├── skill-murm-mode.md # Murmuration steps (loaded on demand)
349
+ │ │ └── skill-error-recovery.md # Error handling (loaded on failure)
330
350
  │ ├── templates/ # Spec and output templates
331
351
  │ │ ├── SYSTEM_SPEC.md
332
352
  │ │ ├── FEATURE_SPEC.md
@@ -357,15 +377,15 @@ your-project/
357
377
 
358
378
  ## Agent Guardrails
359
379
 
360
- All agents follow strict guardrails to ensure quality:
380
+ All agents follow strict guardrails enforced via inlined rules in each self-contained runtime prompt. The authoritative source is `.blueprint/agents/GUARDRAILS.md`, with critical rules inlined directly into agent prompts so sub-agents never need to load external files at runtime.
361
381
 
362
382
  | Guardrail | Description |
363
383
  |-----------|-------------|
364
384
  | **Source Restrictions** | Only use provided inputs (specs, code, business_context) |
365
385
  | **Prohibited Sources** | No social media, forums, external APIs, training data for domain facts |
366
- | **Citation Requirements** | All claims must cite source files |
386
+ | **Assumption Labeling** | All assumptions must be explicitly labeled |
367
387
  | **Confidentiality** | Business context treated as confidential |
368
- | **Escalation Protocol** | Clear rules for when to ask vs assume |
388
+ | **Escalation Protocol** | Clear rules for when to ask vs assume — flag ambiguity, don't guess |
369
389
 
370
390
  ## Self-Improvement Loop
371
391
 
@@ -423,21 +443,21 @@ npx murmur8 init
423
443
 
424
444
  Both CLIs execute the same pipeline: Alex → Cass → Nigel → Codey. The skill uses each CLI's native agent/task mechanism.
425
445
 
426
- ## Token Efficiency (v2.7)
446
+ ## Token Efficiency (v4.4)
427
447
 
428
- Version 2.7 introduces several optimizations to reduce token usage:
448
+ The pipeline is optimised to operate within strict token limits (4096 output, 1024 thinking per sub-agent):
429
449
 
430
- | Optimization | Savings | Description |
431
- |--------------|---------|-------------|
432
- | **Shared Guardrails** | ~1,200 tokens | Single GUARDRAILS.md instead of duplicated in each agent spec |
433
- | **Slim Runtime Prompts** | ~5,200 tokens | 30-50 line prompts instead of 200-400 line full specs |
434
- | **Upstream Summaries** | ~2,000-4,000 tokens | Handoff summaries between agents instead of full artifacts |
435
- | **Template Extraction** | ~800 tokens | Templates moved to separate files, loaded on demand |
436
- | **Lazy Business Context** | Variable | Only loaded when feature spec references it |
437
- | **Compressed Feedback** | ~400 tokens | 3-line feedback prompts instead of 7-line |
450
+ | Optimization | Impact | Description |
451
+ |--------------|--------|-------------|
452
+ | **Self-contained prompts** | ~660 lines/call eliminated | Agents never read full specs, guardrails, manifesto, or rituals at runtime |
453
+ | **Trusted handoff chain** | ~200-400 tokens/call saved | Each agent reads only the upstream handoff + its immediate inputs |
454
+ | **Split Nigel** | Prevents truncation | Test spec and executable tests are separate atomic calls |
455
+ | **Orchestrator-driven Codey** | Prevents truncation | One Task per implementation step instead of monolithic implement call |
456
+ | **Feedback micro-Tasks** | ~50 output tokens each | Separate review calls don't consume the main agent's output budget |
457
+ | **Hybrid SKILL.md** | 48% smaller | Murmuration and error recovery loaded on demand, not always |
458
+ | **Strict plan format** | Zero parsing overhead | Machine-parseable one-liner per step, orchestrator splits on regex |
438
459
  | **Smart Story Routing** | ~25,000-40,000 tokens | Skip Cass for technical features |
439
-
440
- **Total estimated savings: 10,000+ tokens per pipeline run** (more for technical features)
460
+ | **Lazy Business Context** | Variable | Only loaded when feature spec references it |
441
461
 
442
462
  ## Cost Tracking
443
463
 
@@ -517,8 +537,8 @@ murmur8 murm <slug-a> <slug-b> <slug-c>
517
537
  │ Spawn Pipelines │
518
538
  │ (max 3 concurrent by default) │
519
539
  │ │
520
- │ Each runs: Alex Nigel → Codey
521
- in its isolated worktree
540
+ │ Each runs full pipeline in isolation:
541
+ Alex [Cass] → Nigel → Codey
522
542
  └───────────────────────────────────────┘
523
543
 
524
544