murmur8 4.3.3 → 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.
- package/.blueprint/agents/AGENT_BA_CASS.md +4 -12
- package/.blueprint/agents/AGENT_DEVELOPER_CODEY.md +1 -9
- package/.blueprint/agents/AGENT_SPECIFICATION_ALEX.md +0 -9
- package/.blueprint/agents/AGENT_TESTER_NIGEL.md +0 -9
- package/.blueprint/agents/GUARDRAILS.md +1 -1
- package/.blueprint/features/BACKLOG.md +91 -0
- package/.blueprint/prompts/TEMPLATE.md +6 -4
- package/.blueprint/prompts/alex-runtime.md +3 -5
- package/.blueprint/prompts/cass-runtime.md +5 -7
- package/.blueprint/prompts/codey-implement-runtime.md +2 -6
- package/.blueprint/prompts/codey-plan-runtime.md +21 -21
- package/.blueprint/prompts/nigel-runtime.md +4 -6
- package/.blueprint/prompts/skill-error-recovery.md +86 -0
- package/.blueprint/prompts/skill-murm-mode.md +143 -0
- package/README.md +46 -26
- package/SKILL.md +214 -800
- package/package.json +1 -1
- package/src/init.js +31 -3
- package/src/update.js +2 -0
|
@@ -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
|
|
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
|
-
|
|
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`
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Feature Backlog
|
|
2
|
+
|
|
3
|
+
## Definitions
|
|
4
|
+
|
|
5
|
+
| Priority | Meaning |
|
|
6
|
+
|----------|---------|
|
|
7
|
+
| P0 | Critical — blocker |
|
|
8
|
+
| P1 | High — do soon |
|
|
9
|
+
| P2 | Medium — planned |
|
|
10
|
+
| P3 | Low — future |
|
|
11
|
+
|
|
12
|
+
| Effort | Meaning |
|
|
13
|
+
|--------|---------|
|
|
14
|
+
| S | Small — <1 hour |
|
|
15
|
+
| M | Medium — 1-3 hours |
|
|
16
|
+
| L | Large — 3-8 hours |
|
|
17
|
+
| XL | Extra Large — 1+ days |
|
|
18
|
+
|
|
19
|
+
| Status | Meaning |
|
|
20
|
+
|--------|---------|
|
|
21
|
+
| ⏳ | Ready to implement |
|
|
22
|
+
| 🚧 | In progress |
|
|
23
|
+
| ❓ | Needs clarification |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Backlog
|
|
28
|
+
|
|
29
|
+
| Status | P | E | Slug | Description |
|
|
30
|
+
|--------|---|---|------|-------------|
|
|
31
|
+
| ❓ | P1 | M | murm-subagent | Use Task tool sub-agents instead of spawning CLI processes |
|
|
32
|
+
| ⏳ | P2 | M | agent-timeouts | Configurable timeouts per agent stage |
|
|
33
|
+
| ⏳ | P2 | M | rollback | Revert a feature's commits |
|
|
34
|
+
| ⏳ | P2 | M | agent-overrides | Per-project agent customization |
|
|
35
|
+
| ⏳ | P2 | M | resume-from-stage | Resume pipeline from specific stage |
|
|
36
|
+
| ⏳ | P3 | M | dry-run-mode | Validate inputs without running agents |
|
|
37
|
+
| ⏳ | P3 | M | feature-dependencies | Define execution order for related features |
|
|
38
|
+
| ⏳ | P3 | L | webhook-notifications | Slack/email on completion |
|
|
39
|
+
| ⏳ | P3 | XL | mcp-integration | Expose murmur8 as MCP tools |
|
|
40
|
+
| ⏳ | P3 | XL | mcp-repos-server | Cross-repo context for distributed monoliths |
|
|
41
|
+
| ⏳ | P3 | S | cli-doctor | Diagnose CLI setup issues |
|
|
42
|
+
| ⏳ | P3 | M | cross-cli-insights | Track which CLI used per run |
|
|
43
|
+
| ⏳ | P3 | S | skill-lint | Validate skill YAML frontmatter |
|
|
44
|
+
| ⏳ | P3 | M | aider-adapter | Support for Aider CLI |
|
|
45
|
+
| ⏳ | P3 | M | cursor-adapter | Support for Cursor Composer |
|
|
46
|
+
| ⏳ | P3 | L | docey-agent | Fifth agent to update docs after implementation |
|
|
47
|
+
| ⏳ | P3 | M | backlog-tooling | CLI commands for backlog management |
|
|
48
|
+
| ⏳ | P3 | L | skill-modularize | Split SKILL.md into composable sections |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Details
|
|
53
|
+
|
|
54
|
+
### murm-subagent
|
|
55
|
+
|
|
56
|
+
Murmuration currently spawns separate CLI processes. This doesn't work inside an existing Claude Code session. Should use Task tool sub-agents instead for parallel features.
|
|
57
|
+
|
|
58
|
+
### agent-timeouts
|
|
59
|
+
|
|
60
|
+
Configurable timeout per stage (default: 5 min). Support `--timeout=10m` flag. Graceful termination with status recording.
|
|
61
|
+
|
|
62
|
+
### rollback
|
|
63
|
+
|
|
64
|
+
`murmur8 rollback <feature-slug>` to revert commits. Uses git history to find commits by feature. Supports `--dry-run`.
|
|
65
|
+
|
|
66
|
+
### agent-overrides
|
|
67
|
+
|
|
68
|
+
Per-project agent customization via `.blueprint/agents/overrides/AGENT_*.md`. Override content appended to base specs.
|
|
69
|
+
|
|
70
|
+
### resume-from-stage
|
|
71
|
+
|
|
72
|
+
More granular than queue-based resume. `--resume-from=nigel` to skip earlier stages. Validates artifacts exist first.
|
|
73
|
+
|
|
74
|
+
### docey-agent
|
|
75
|
+
|
|
76
|
+
Fifth agent to update README/CLAUDE.md after Codey implements. Identifies user-facing changes and updates docs automatically.
|
|
77
|
+
|
|
78
|
+
### mcp-repos-server
|
|
79
|
+
|
|
80
|
+
MCP server for cross-repository context in distributed architectures. See FEATURE_IDEAS.md for full specification.
|
|
81
|
+
|
|
82
|
+
### backlog-tooling
|
|
83
|
+
|
|
84
|
+
CLI commands: `npx murmur8 backlog`, `backlog add`, `backlog next`, `backlog murm P1`.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Notes
|
|
89
|
+
|
|
90
|
+
- Items removed automatically when pipeline completes successfully
|
|
91
|
+
- Run with: `/implement-feature "slug"` or `npx murmur8 murm slug-a slug-b`
|
|
@@ -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.
|
|
52
|
+
### 6. Completion (required)
|
|
53
53
|
|
|
54
54
|
```markdown
|
|
55
|
-
##
|
|
56
|
-
|
|
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
|
-
-
|
|
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
|
|
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
|
-
-
|
|
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
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
-
|
|
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
|
-
-
|
|
37
|
+
- One line per step, max 10 steps
|
|
29
38
|
- Order steps to make tests pass incrementally
|
|
30
|
-
-
|
|
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
|
-
|
|
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.
|