create-merlin-brain 3.9.0 → 3.11.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/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +11 -0
- package/dist/server/server.js.map +1 -1
- package/dist/server/tools/route.d.ts.map +1 -1
- package/dist/server/tools/route.js +72 -21
- package/dist/server/tools/route.js.map +1 -1
- package/dist/server/tools/smart-route.d.ts +12 -0
- package/dist/server/tools/smart-route.d.ts.map +1 -0
- package/dist/server/tools/smart-route.js +156 -0
- package/dist/server/tools/smart-route.js.map +1 -0
- package/files/agents/code-organization-supervisor.md +8 -0
- package/files/agents/context-guardian.md +8 -0
- package/files/agents/docs-keeper.md +10 -1
- package/files/agents/dry-refactor.md +11 -1
- package/files/agents/elite-code-refactorer.md +9 -0
- package/files/agents/hardening-guard.md +12 -1
- package/files/agents/implementation-dev.md +11 -1
- package/files/agents/merlin-api-designer.md +9 -0
- package/files/agents/merlin-codebase-mapper.md +8 -0
- package/files/agents/merlin-debugger.md +10 -0
- package/files/agents/merlin-executor.md +11 -1
- package/files/agents/merlin-frontend.md +9 -0
- package/files/agents/merlin-integration-checker.md +9 -1
- package/files/agents/merlin-migrator.md +9 -0
- package/files/agents/merlin-milestone-auditor.md +8 -0
- package/files/agents/merlin-performance.md +8 -0
- package/files/agents/merlin-planner.md +10 -0
- package/files/agents/merlin-researcher.md +10 -0
- package/files/agents/merlin-reviewer.md +41 -7
- package/files/agents/merlin-security.md +9 -0
- package/files/agents/merlin-verifier.md +9 -0
- package/files/agents/merlin-work-verifier.md +9 -0
- package/files/agents/merlin.md +28 -3
- package/files/agents/ops-railway.md +11 -1
- package/files/agents/orchestrator-retrofit.md +9 -1
- package/files/agents/product-spec.md +11 -1
- package/files/agents/remotion.md +8 -0
- package/files/agents/system-architect.md +11 -1
- package/files/agents/tests-qa.md +11 -1
- package/files/commands/merlin/course-correct.md +219 -0
- package/files/commands/merlin/debug.md +2 -2
- package/files/commands/merlin/execute-phase.md +4 -4
- package/files/commands/merlin/execute-plan.md +2 -2
- package/files/commands/merlin/map-codebase.md +4 -4
- package/files/commands/merlin/next.md +240 -0
- package/files/commands/merlin/plan-phase.md +1 -1
- package/files/commands/merlin/readiness-gate.md +208 -0
- package/files/commands/merlin/research-phase.md +2 -2
- package/files/commands/merlin/research-project.md +4 -4
- package/files/commands/merlin/verify-work.md +1 -1
- package/files/hooks/session-start.sh +47 -1
- package/package.json +1 -1
package/files/agents/merlin.md
CHANGED
|
@@ -150,9 +150,22 @@ Skip steps only when clearly irrelevant or user explicitly asks.
|
|
|
150
150
|
|
|
151
151
|
## Routing Rules
|
|
152
152
|
|
|
153
|
-
**
|
|
153
|
+
**Three mechanisms — use the right one:**
|
|
154
154
|
|
|
155
|
-
### A.
|
|
155
|
+
### A. Smart Routing (PREFERRED — discovery-first)
|
|
156
|
+
|
|
157
|
+
When you're not sure which agent is best, or want to check if a better specialist exists:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
merlin_smart_route(task="what needs to be done")
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
This searches **both** installed agents AND the catalog of 500+ community agents, scores them, and recommends the best fit. Use this when:
|
|
164
|
+
- The task doesn't obviously match a core agent
|
|
165
|
+
- You want to check if a community specialist exists (e.g., Stripe, Prisma, Next.js)
|
|
166
|
+
- The user asks for something you haven't routed before
|
|
167
|
+
|
|
168
|
+
### B. Direct Routing (when you know the agent)
|
|
156
169
|
|
|
157
170
|
Route via `/merlin:route` — spawns a FRESH Claude process with 200K context:
|
|
158
171
|
|
|
@@ -160,7 +173,7 @@ Route via `/merlin:route` — spawns a FRESH Claude process with 200K context:
|
|
|
160
173
|
Skill("merlin:route", args='<agent-name> "<task description>"')
|
|
161
174
|
```
|
|
162
175
|
|
|
163
|
-
**Core routing table (
|
|
176
|
+
**Core routing table (for obvious matches):**
|
|
164
177
|
|
|
165
178
|
| User intent | Route to |
|
|
166
179
|
|------------|----------|
|
|
@@ -184,6 +197,8 @@ Skill("merlin:route", args='<agent-name> "<task description>"')
|
|
|
184
197
|
| API design, REST/GraphQL schema | `merlin-api-designer` |
|
|
185
198
|
| Database migration, schema changes | `merlin-migrator` |
|
|
186
199
|
|
|
200
|
+
**When in doubt between A and B:** Use A. It's fast (parallel API call) and catches better specialists you might miss.
|
|
201
|
+
|
|
187
202
|
**Multiple concerns?** Route agents in sequence. Each gets fresh context.
|
|
188
203
|
|
|
189
204
|
### B. Workflow Commands (project-level)
|
|
@@ -356,3 +371,13 @@ There is no need to `/clear` before routing — the specialist always starts cle
|
|
|
356
371
|
|
|
357
372
|
**Never suggest `/clear` as a blanket recommendation.** The orchestrator manages context internally.
|
|
358
373
|
Only mention context pressure if the orchestrator itself is visibly degrading (truncated responses, forgetting earlier conversation).
|
|
374
|
+
|
|
375
|
+
<critical_actions>
|
|
376
|
+
## Critical Actions (NEVER violate these)
|
|
377
|
+
|
|
378
|
+
1. NEVER do specialist work in the orchestrator — always route to the right agent
|
|
379
|
+
2. NEVER skip Sights context check before routing
|
|
380
|
+
3. NEVER route without providing the agent with sufficient task context
|
|
381
|
+
4. NEVER use Task() — always use fresh process spawning
|
|
382
|
+
5. NEVER run `claude --agent` via Bash — use Skill("merlin:route") instead
|
|
383
|
+
</critical_actions>
|
|
@@ -84,4 +84,14 @@ When called:
|
|
|
84
84
|
- Help configure OAuth, APIs, service accounts, and credentials in a way that is safe but not over engineered.
|
|
85
85
|
- Make sure env vars for Google credentials are wired correctly into Railway services.
|
|
86
86
|
|
|
87
|
-
You keep things practical and avoid gold plating. The goal is smooth, understandable ops, not enterprise complexity.
|
|
87
|
+
You keep things practical and avoid gold plating. The goal is smooth, understandable ops, not enterprise complexity.
|
|
88
|
+
|
|
89
|
+
<critical_actions>
|
|
90
|
+
## Critical Actions (NEVER violate these)
|
|
91
|
+
|
|
92
|
+
1. NEVER expose secrets in logs, environment variables visible in dashboards, or error messages
|
|
93
|
+
2. NEVER deploy without verifying the build succeeds first
|
|
94
|
+
3. NEVER modify production environment variables without confirming with user
|
|
95
|
+
4. NEVER skip health check verification after deployment
|
|
96
|
+
5. ALWAYS have a rollback plan before deploying
|
|
97
|
+
</critical_actions>
|
|
@@ -114,4 +114,12 @@ Your personality:
|
|
|
114
114
|
- Confident, structured, and proactive.
|
|
115
115
|
- Takes charge in GO mode.
|
|
116
116
|
- Keeps the user informed but not burdened.
|
|
117
|
-
- Focused on bringing an existing repo to a **clear, DRY, safe, documented, production-lean** state.
|
|
117
|
+
- Focused on bringing an existing repo to a **clear, DRY, safe, documented, production-lean** state.
|
|
118
|
+
|
|
119
|
+
<critical_actions>
|
|
120
|
+
## Critical Actions (NEVER violate these)
|
|
121
|
+
|
|
122
|
+
1. NEVER apply changes that break existing functionality
|
|
123
|
+
2. NEVER skip testing after retrofit changes
|
|
124
|
+
3. ALWAYS prioritize stability over perfection
|
|
125
|
+
</critical_actions>
|
|
@@ -65,4 +65,14 @@ When called:
|
|
|
65
65
|
- "Yes, build exactly this."
|
|
66
66
|
|
|
67
67
|
4. If the user asks for changes later,
|
|
68
|
-
- Update the spec incrementally rather than rewriting from scratch.
|
|
68
|
+
- Update the spec incrementally rather than rewriting from scratch.
|
|
69
|
+
|
|
70
|
+
<critical_actions>
|
|
71
|
+
## Critical Actions (NEVER violate these)
|
|
72
|
+
|
|
73
|
+
1. NEVER leave ambiguous acceptance criteria — every requirement must be testable
|
|
74
|
+
2. NEVER scope-creep beyond what the user asked for
|
|
75
|
+
3. NEVER assume technical constraints without asking — you spec WHAT, not HOW
|
|
76
|
+
4. NEVER skip edge cases and error states in user flows
|
|
77
|
+
5. ALWAYS include "what does NOT change" to prevent scope creep
|
|
78
|
+
</critical_actions>
|
package/files/agents/remotion.md
CHANGED
|
@@ -361,3 +361,11 @@ npx remotion lambda render MyVideo
|
|
|
361
361
|
- Test animations at different frame rates (preview at 30fps minimum)
|
|
362
362
|
- Use `useVideoConfig()` for responsive calculations, not hardcoded dimensions
|
|
363
363
|
</quality_rules>
|
|
364
|
+
|
|
365
|
+
<critical_actions>
|
|
366
|
+
## Critical Actions (NEVER violate these)
|
|
367
|
+
|
|
368
|
+
1. NEVER create compositions without testing they render correctly
|
|
369
|
+
2. NEVER skip frame-rate and duration calculations
|
|
370
|
+
3. ALWAYS verify asset paths and media loading
|
|
371
|
+
</critical_actions>
|
|
@@ -89,4 +89,14 @@ When called:
|
|
|
89
89
|
- Identify which services can be merged or retired.
|
|
90
90
|
- Suggest a stepwise migration, not a big bang rewrite.
|
|
91
91
|
|
|
92
|
-
8. Keep any architecture document short and up to date so the implementation and refactor agents can trust it.
|
|
92
|
+
8. Keep any architecture document short and up to date so the implementation and refactor agents can trust it.
|
|
93
|
+
|
|
94
|
+
<critical_actions>
|
|
95
|
+
## Critical Actions (NEVER violate these)
|
|
96
|
+
|
|
97
|
+
1. NEVER over-engineer — every abstraction must be justified by actual requirements
|
|
98
|
+
2. NEVER create unnecessary service boundaries or microservices
|
|
99
|
+
3. NEVER propose architecture without considering existing codebase patterns
|
|
100
|
+
4. NEVER ignore deployment constraints (Railway, serverless, etc.)
|
|
101
|
+
5. ALWAYS specify data flow and error propagation, not just happy paths
|
|
102
|
+
</critical_actions>
|
package/files/agents/tests-qa.md
CHANGED
|
@@ -85,4 +85,14 @@ When called:
|
|
|
85
85
|
|
|
86
86
|
5. Keep it light:
|
|
87
87
|
- Do not propose an exhaustive test suite unless the user explicitly asks.
|
|
88
|
-
- Optimize for the biggest risk reduction per unit of effort.
|
|
88
|
+
- Optimize for the biggest risk reduction per unit of effort.
|
|
89
|
+
|
|
90
|
+
<critical_actions>
|
|
91
|
+
## Critical Actions (NEVER violate these)
|
|
92
|
+
|
|
93
|
+
1. NEVER lie about tests being written or passing — tests must actually exist and pass 100%
|
|
94
|
+
2. NEVER write tests that test nothing (empty assertions, always-pass, mocked-everything)
|
|
95
|
+
3. NEVER skip testing the main failure path — happy path alone is insufficient
|
|
96
|
+
4. NEVER claim coverage without verifying test files exist at the stated paths
|
|
97
|
+
5. ALWAYS run tests after writing them to confirm they pass
|
|
98
|
+
</critical_actions>
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: merlin:course-correct
|
|
3
|
+
description: Handle plan pivots — when implementation reveals the plan needs changing
|
|
4
|
+
argument-hint: "\"description of what changed\""
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- Grep
|
|
11
|
+
- Glob
|
|
12
|
+
- AskUserQuestion
|
|
13
|
+
- mcp__merlin__merlin_get_context
|
|
14
|
+
- mcp__merlin__merlin_get_project_status
|
|
15
|
+
- mcp__merlin__merlin_search
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<objective>
|
|
19
|
+
Handle "the plan was wrong" — a dedicated workflow for pivots discovered during implementation.
|
|
20
|
+
|
|
21
|
+
Most planning flows only handle the happy path. This command handles the other reality:
|
|
22
|
+
a technical constraint appeared, a dependency changed, a requirement turned out to be wrong.
|
|
23
|
+
|
|
24
|
+
It assesses impact across all phases, proposes a minimal change set, and applies changes
|
|
25
|
+
only after the user approves. Nothing is modified until the user says go.
|
|
26
|
+
</objective>
|
|
27
|
+
|
|
28
|
+
<process>
|
|
29
|
+
|
|
30
|
+
## Step 1: Parse Arguments
|
|
31
|
+
|
|
32
|
+
Extract from $ARGUMENTS:
|
|
33
|
+
- **change_description**: Free-text description of what went wrong or what changed
|
|
34
|
+
(e.g., "Auth provider changed from Auth0 to Clerk")
|
|
35
|
+
|
|
36
|
+
If no argument provided, ask:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
What changed or went wrong? Describe the situation briefly.
|
|
40
|
+
(e.g., "We discovered the third-party API we planned to use requires a paid plan"
|
|
41
|
+
or "The database schema for users needs an extra field throughout the system")
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Step 2: Load Planning Context
|
|
45
|
+
|
|
46
|
+
Read all planning state. This step is intentionally thorough — impact assessment requires full context.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cat .planning/PROJECT.md 2>/dev/null
|
|
50
|
+
cat .planning/ROADMAP.md 2>/dev/null
|
|
51
|
+
cat .planning/REQUIREMENTS.md 2>/dev/null
|
|
52
|
+
cat .planning/STATE.md 2>/dev/null
|
|
53
|
+
ls .planning/phases/ 2>/dev/null
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
For each phase directory found:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Completed phases: read summaries
|
|
60
|
+
ls .planning/phases/*/ *-SUMMARY.md 2>/dev/null
|
|
61
|
+
|
|
62
|
+
# Active phase: read all plans
|
|
63
|
+
ls .planning/phases/${CURRENT_PHASE_DIR}/*-PLAN.md 2>/dev/null
|
|
64
|
+
|
|
65
|
+
# Upcoming phases: read any existing plans
|
|
66
|
+
ls .planning/phases/*-PLAN.md 2>/dev/null
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Get Sights context for the change topic:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
Call: merlin_get_context
|
|
73
|
+
Task: "course correction — {change_description}"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Step 3: Impact Assessment
|
|
77
|
+
|
|
78
|
+
Analyze the loaded context against the change description. Determine:
|
|
79
|
+
|
|
80
|
+
**Completed work affected:**
|
|
81
|
+
- Which SUMMARY.md phases/plans touched the area that changed?
|
|
82
|
+
- What specifically needs to be revised in already-built work?
|
|
83
|
+
- Is this a patch (small addition/change) or a rewrite (fundamental change)?
|
|
84
|
+
|
|
85
|
+
**Active plans affected:**
|
|
86
|
+
- Which PLAN.md files in the current phase directly address the changed area?
|
|
87
|
+
- Classify each: rewrite needed, update needed, or unaffected.
|
|
88
|
+
|
|
89
|
+
**Upcoming plans affected:**
|
|
90
|
+
- Which future phases or plans will need to change based on the pivot?
|
|
91
|
+
- Are any roadmap milestones invalidated?
|
|
92
|
+
|
|
93
|
+
**Requirements affected:**
|
|
94
|
+
- Which entries in REQUIREMENTS.md reference the changed component/decision?
|
|
95
|
+
- Do any requirement acceptance criteria need updating?
|
|
96
|
+
|
|
97
|
+
**New work required:**
|
|
98
|
+
- Does the pivot introduce entirely new tasks (e.g., a migration helper, a new adapter)?
|
|
99
|
+
|
|
100
|
+
## Step 4: Generate Change Proposal
|
|
101
|
+
|
|
102
|
+
Produce a structured, numbered change proposal. Every entry must name the exact file.
|
|
103
|
+
|
|
104
|
+
Classify each change as:
|
|
105
|
+
- **Rewrite** — file needs to be replaced
|
|
106
|
+
- **Update** — targeted edits to existing file
|
|
107
|
+
- **Patch** — small addition to completed work
|
|
108
|
+
- **New** — entirely new file needs to be created
|
|
109
|
+
|
|
110
|
+
Compute scope impact:
|
|
111
|
+
- Count rewrites, updates, patches, new files
|
|
112
|
+
- Flag if any milestone-level changes are needed (i.e., ROADMAP.md phases added/removed)
|
|
113
|
+
- Estimate net new plans required
|
|
114
|
+
|
|
115
|
+
Present the full proposal before taking any action:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
🔮 **Course Correction** · "{change_description}"
|
|
119
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
120
|
+
|
|
121
|
+
### Impact Assessment
|
|
122
|
+
{bullet list of affected areas — completed, active, upcoming, requirements}
|
|
123
|
+
|
|
124
|
+
### Change Proposal
|
|
125
|
+
{numbered list, each entry: [TYPE] filename — reason}
|
|
126
|
+
|
|
127
|
+
### Scope Impact
|
|
128
|
+
- {X} rewrites, {Y} updates, {Z} patches, {W} new files
|
|
129
|
+
- {milestone impact or "No milestone-level changes needed"}
|
|
130
|
+
- {estimated net new plans}
|
|
131
|
+
|
|
132
|
+
[1] Apply all changes
|
|
133
|
+
[2] Apply selectively — I'll choose
|
|
134
|
+
[3] Discuss first
|
|
135
|
+
[4] Cancel
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Wait for user response before proceeding.
|
|
139
|
+
|
|
140
|
+
## Step 5: Apply Changes (with approval)
|
|
141
|
+
|
|
142
|
+
**If user selects [1] — Apply all:**
|
|
143
|
+
|
|
144
|
+
Execute the change proposal in this order:
|
|
145
|
+
1. Update REQUIREMENTS.md (requirements changes first — they anchor everything else)
|
|
146
|
+
2. Update ROADMAP.md (if milestone or phase structure changes)
|
|
147
|
+
3. Update STATE.md — log the pivot under a "Course Corrections" section
|
|
148
|
+
4. Rewrite or update active PLAN.md files
|
|
149
|
+
5. Patch completed work notes (add patch notes to SUMMARY.md, do not delete history)
|
|
150
|
+
6. Create any new PLAN.md files required
|
|
151
|
+
|
|
152
|
+
**If user selects [2] — Apply selectively:**
|
|
153
|
+
|
|
154
|
+
Present each proposed change as a y/n question using AskUserQuestion. Apply only approved changes.
|
|
155
|
+
|
|
156
|
+
**After applying:**
|
|
157
|
+
|
|
158
|
+
Update STATE.md with a course correction log entry:
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
## Course Corrections
|
|
162
|
+
|
|
163
|
+
### {date} — {change_description}
|
|
164
|
+
- Trigger: {what the user described}
|
|
165
|
+
- Changes applied: {count and summary}
|
|
166
|
+
- Files modified: {list}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Step 6: Present Completion Summary
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
Course correction applied.
|
|
173
|
+
|
|
174
|
+
### Changes Made
|
|
175
|
+
{list of files modified, created, or patched}
|
|
176
|
+
|
|
177
|
+
### Updated State
|
|
178
|
+
STATE.md updated with correction log.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
Next:
|
|
183
|
+
[1] Re-check readiness: /merlin:readiness-gate {phase}
|
|
184
|
+
[2] Continue executing: /merlin:execute-phase {phase}
|
|
185
|
+
[3] Review updated plans: /merlin:progress
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
</process>
|
|
189
|
+
|
|
190
|
+
<critical_rules>
|
|
191
|
+
|
|
192
|
+
**NEVER MODIFY BEFORE APPROVAL.** The full proposal must be presented and the user must
|
|
193
|
+
select an action before any file is written or edited.
|
|
194
|
+
|
|
195
|
+
**PRESERVE HISTORY.** Do not delete SUMMARY.md content from completed phases. Add patch
|
|
196
|
+
notes as addenda. The record of what was built stays intact.
|
|
197
|
+
|
|
198
|
+
**STATE.MD IS ALWAYS UPDATED.** Every course correction must be logged in STATE.md
|
|
199
|
+
regardless of scope. Future agents need to know a pivot happened.
|
|
200
|
+
|
|
201
|
+
**BE CONCRETE.** Every item in the change proposal names an exact file path, not a vague
|
|
202
|
+
description like "update the auth files."
|
|
203
|
+
|
|
204
|
+
**REQUIREMENTS FIRST.** If requirements change, update REQUIREMENTS.md before updating
|
|
205
|
+
any PLAN.md. Plans derive from requirements, not the other way around.
|
|
206
|
+
|
|
207
|
+
</critical_rules>
|
|
208
|
+
|
|
209
|
+
<success_criteria>
|
|
210
|
+
- [ ] Change description captured (from args or prompt)
|
|
211
|
+
- [ ] Full planning context loaded
|
|
212
|
+
- [ ] Sights context retrieved for the change area
|
|
213
|
+
- [ ] Impact assessment covers completed, active, and upcoming work
|
|
214
|
+
- [ ] Change proposal presented with exact file names before any edit
|
|
215
|
+
- [ ] User approves before any modification
|
|
216
|
+
- [ ] Changes applied in correct order (requirements → roadmap → plans → summaries)
|
|
217
|
+
- [ ] STATE.md updated with course correction log
|
|
218
|
+
- [ ] Next steps offered
|
|
219
|
+
</success_criteria>
|
|
@@ -80,7 +80,7 @@ Create: .planning/debug/{slug}.md
|
|
|
80
80
|
|
|
81
81
|
```
|
|
82
82
|
## Spawn fresh debugger process via Bash:
|
|
83
|
-
cat "$HANDOFF_DIR/handoff.md" | claude \
|
|
83
|
+
unset CLAUDECODE && cat "$HANDOFF_DIR/handoff.md" | claude \
|
|
84
84
|
--agent merlin-debugger \
|
|
85
85
|
-p \
|
|
86
86
|
--permission-mode acceptEdits \
|
|
@@ -134,7 +134,7 @@ goal: find_and_fix
|
|
|
134
134
|
|
|
135
135
|
```
|
|
136
136
|
## Spawn fresh continuation process via Bash:
|
|
137
|
-
cat "$HANDOFF_DIR/continuation.md" | claude \
|
|
137
|
+
unset CLAUDECODE && cat "$HANDOFF_DIR/continuation.md" | claude \
|
|
138
138
|
--agent merlin-debugger \
|
|
139
139
|
-p \
|
|
140
140
|
--permission-mode acceptEdits \
|
|
@@ -140,7 +140,7 @@ Checkpoint: <if needed>
|
|
|
140
140
|
EOF
|
|
141
141
|
|
|
142
142
|
# Spawn fresh executor
|
|
143
|
-
RESULT=$(cat "$HANDOFF_DIR/handoff.md" | claude \
|
|
143
|
+
RESULT=$(unset CLAUDECODE && cat "$HANDOFF_DIR/handoff.md" | claude \
|
|
144
144
|
--agent merlin-executor \
|
|
145
145
|
-p \
|
|
146
146
|
--permission-mode acceptEdits \
|
|
@@ -167,7 +167,7 @@ Spawn parallel fresh processes (use `&` and `wait`):
|
|
|
167
167
|
```bash
|
|
168
168
|
# Plan 1 in worktree 1
|
|
169
169
|
(cd "${REPO_ROOT}/../${REPO_NAME}-worktree-01" && \
|
|
170
|
-
cat "$HANDOFF_DIR/plan-01.md" | claude \
|
|
170
|
+
unset CLAUDECODE && cat "$HANDOFF_DIR/plan-01.md" | claude \
|
|
171
171
|
--agent merlin-executor \
|
|
172
172
|
-p \
|
|
173
173
|
--permission-mode acceptEdits \
|
|
@@ -177,7 +177,7 @@ PID1=$!
|
|
|
177
177
|
|
|
178
178
|
# Plan 2 in worktree 2
|
|
179
179
|
(cd "${REPO_ROOT}/../${REPO_NAME}-worktree-02" && \
|
|
180
|
-
cat "$HANDOFF_DIR/plan-02.md" | claude \
|
|
180
|
+
unset CLAUDECODE && cat "$HANDOFF_DIR/plan-02.md" | claude \
|
|
181
181
|
--agent merlin-executor \
|
|
182
182
|
-p \
|
|
183
183
|
--permission-mode acceptEdits \
|
|
@@ -238,7 +238,7 @@ Summary: <verification summary>
|
|
|
238
238
|
---END_VERIFY_RESULT---
|
|
239
239
|
EOF
|
|
240
240
|
|
|
241
|
-
VERIFY_RESULT=$(cat "/tmp/merlin-verify-$$/handoff.md" | claude \
|
|
241
|
+
VERIFY_RESULT=$(unset CLAUDECODE && cat "/tmp/merlin-verify-$$/handoff.md" | claude \
|
|
242
242
|
--agent merlin-verifier \
|
|
243
243
|
-p \
|
|
244
244
|
--permission-mode acceptEdits \
|
|
@@ -153,7 +153,7 @@ Checkpoint: <only if status=checkpoint — what you need>
|
|
|
153
153
|
## Step 9: Spawn Fresh Executor Process
|
|
154
154
|
|
|
155
155
|
```bash
|
|
156
|
-
RESULT=$(cat "$HANDOFF_FILE" | claude \
|
|
156
|
+
RESULT=$(unset CLAUDECODE && cat "$HANDOFF_FILE" | claude \
|
|
157
157
|
--agent merlin-executor \
|
|
158
158
|
-p \
|
|
159
159
|
--permission-mode acceptEdits \
|
|
@@ -295,7 +295,7 @@ Summary: <what was verified>
|
|
|
295
295
|
VERIFY
|
|
296
296
|
|
|
297
297
|
# Spawn fresh verifier
|
|
298
|
-
VERIFY_RESULT=$(cat "/tmp/merlin-verify-$$/handoff.md" | claude \
|
|
298
|
+
VERIFY_RESULT=$(unset CLAUDECODE && cat "/tmp/merlin-verify-$$/handoff.md" | claude \
|
|
299
299
|
--agent merlin-verifier \
|
|
300
300
|
-p \
|
|
301
301
|
--permission-mode acceptEdits \
|
|
@@ -89,22 +89,22 @@ Focus area: ${FOCUS_AREA}
|
|
|
89
89
|
EOF
|
|
90
90
|
|
|
91
91
|
# Spawn all 4 in parallel as fresh processes
|
|
92
|
-
(cat "$HANDOFF_DIR/tech.md" | claude --agent merlin-codebase-mapper -p \
|
|
92
|
+
(unset CLAUDECODE && cat "$HANDOFF_DIR/tech.md" | claude --agent merlin-codebase-mapper -p \
|
|
93
93
|
--permission-mode acceptEdits --output-format text \
|
|
94
94
|
> "$HANDOFF_DIR/result-tech.txt" 2>&1) &
|
|
95
95
|
PID1=$!
|
|
96
96
|
|
|
97
|
-
(cat "$HANDOFF_DIR/arch.md" | claude --agent merlin-codebase-mapper -p \
|
|
97
|
+
(unset CLAUDECODE && cat "$HANDOFF_DIR/arch.md" | claude --agent merlin-codebase-mapper -p \
|
|
98
98
|
--permission-mode acceptEdits --output-format text \
|
|
99
99
|
> "$HANDOFF_DIR/result-arch.txt" 2>&1) &
|
|
100
100
|
PID2=$!
|
|
101
101
|
|
|
102
|
-
(cat "$HANDOFF_DIR/quality.md" | claude --agent merlin-codebase-mapper -p \
|
|
102
|
+
(unset CLAUDECODE && cat "$HANDOFF_DIR/quality.md" | claude --agent merlin-codebase-mapper -p \
|
|
103
103
|
--permission-mode acceptEdits --output-format text \
|
|
104
104
|
> "$HANDOFF_DIR/result-quality.txt" 2>&1) &
|
|
105
105
|
PID3=$!
|
|
106
106
|
|
|
107
|
-
(cat "$HANDOFF_DIR/concerns.md" | claude --agent merlin-codebase-mapper -p \
|
|
107
|
+
(unset CLAUDECODE && cat "$HANDOFF_DIR/concerns.md" | claude --agent merlin-codebase-mapper -p \
|
|
108
108
|
--permission-mode acceptEdits --output-format text \
|
|
109
109
|
> "$HANDOFF_DIR/result-concerns.txt" 2>&1) &
|
|
110
110
|
PID4=$!
|