create-merlin-brain 3.15.2 → 3.18.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.
@@ -0,0 +1,224 @@
1
+ ---
2
+ name: merlin:challenge
3
+ description: Run a dialectic challenge — Insider (context-aware) vs Academic (first-principles) with Arbiter synthesis. Use before committing to an approach for any significant task.
4
+ argument-hint: "[task description or phase number]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Grep
10
+ - Glob
11
+ - Agent
12
+ - AskUserQuestion
13
+ - mcp__merlin__merlin_get_context
14
+ - mcp__merlin__merlin_find_files
15
+ - mcp__merlin__merlin_get_conventions
16
+ - mcp__merlin__merlin_record_challenge
17
+ - mcp__merlin__merlin_get_challenge_stats
18
+ ---
19
+
20
+ <objective>
21
+ Run a dialectic challenge: two agents independently design approaches to a task, then an arbiter evaluates and synthesizes.
22
+
23
+ - **Insider**: Has full codebase context via Merlin Sights. Designs the best approach given what exists.
24
+ - **Academic**: Has NO codebase context. Designs the best approach from first principles and industry research.
25
+ - **Arbiter**: Compares both on weighted criteria, produces a scored recommendation or synthesis.
26
+
27
+ The challenge process reveals blind spots, confirmation bias, and potentially better approaches that a single-track planning process would miss.
28
+ </objective>
29
+
30
+ <process>
31
+
32
+ <step name="parse_task">
33
+ ## Step 1: Parse the Task
34
+
35
+ Parse the command arguments:
36
+ - If a phase number is given (e.g., `3`, `Phase 3`), load the phase from ROADMAP.md
37
+ - If text is given, use it as the task description
38
+ - If no arguments, ask the user what to challenge
39
+
40
+ Gather context:
41
+ ```
42
+ Call: merlin_get_context
43
+ Task: "[the task being challenged]"
44
+ ```
45
+
46
+ Determine the tech stack from project files (package.json, tsconfig.json, etc).
47
+
48
+ Prepare two handoff documents:
49
+ 1. **Insider handoff**: full task + tech stack + constraints + "use Merlin Sights for codebase context"
50
+ 2. **Academic handoff**: task description + tech stack + constraints ONLY. No file paths, no existing patterns, no module names.
51
+ </step>
52
+
53
+ <step name="run_parallel">
54
+ ## Step 2: Run Insider and Academic in Parallel
55
+
56
+ Launch BOTH agents simultaneously using the Agent tool:
57
+
58
+ ```
59
+ Agent(
60
+ subagent_type="challenger-insider",
61
+ prompt="[insider handoff with full context]",
62
+ description="Insider approach design"
63
+ )
64
+
65
+ Agent(
66
+ subagent_type="challenger-academic",
67
+ prompt="[academic handoff — problem + stack + constraints only]",
68
+ description="Academic approach design"
69
+ )
70
+ ```
71
+
72
+ **CRITICAL: Launch both in the SAME message** to run them in parallel. Do not wait for one before starting the other.
73
+
74
+ Both agents return structured approach proposals (see agent definitions for format).
75
+ </step>
76
+
77
+ <step name="run_arbiter">
78
+ ## Step 3: Run the Arbiter
79
+
80
+ Once both proposals are received, prepare the arbiter handoff:
81
+
82
+ ```markdown
83
+ # Arbiter Challenge: [Task Name]
84
+
85
+ ## Original Task
86
+ [The task description]
87
+
88
+ ## Tech Stack
89
+ [Languages, frameworks, databases]
90
+
91
+ ## Constraints
92
+ [Hard constraints that both approaches must satisfy]
93
+
94
+ ---
95
+
96
+ ## Proposal A: Insider Approach
97
+ [Full insider proposal text]
98
+
99
+ ---
100
+
101
+ ## Proposal B: Academic Approach
102
+ [Full academic proposal text]
103
+
104
+ ---
105
+
106
+ Evaluate both approaches using your scoring framework. Produce a verdict with scorecard, synthesis recommendation, and performance tracking data.
107
+ ```
108
+
109
+ Launch the arbiter:
110
+ ```
111
+ Agent(
112
+ subagent_type="challenger-arbiter",
113
+ prompt="[arbiter handoff]",
114
+ description="Arbiter evaluation"
115
+ )
116
+ ```
117
+ </step>
118
+
119
+ <step name="present_results">
120
+ ## Step 4: Present Results
121
+
122
+ ### In AI Automation mode (default):
123
+
124
+ Parse the arbiter's verdict and present:
125
+
126
+ ```
127
+ ⟡🔮 MERLIN › Challenge Complete: [Task Name]
128
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
129
+
130
+ 📊 Scorecard:
131
+ Insider: [score]/110
132
+ Academic: [score]/110
133
+
134
+ 🏆 Verdict: [INSIDER | ACADEMIC | SYNTHESIS]
135
+ Confidence: [HIGH | MEDIUM | LOW]
136
+
137
+ 📝 Key Insight:
138
+ [The one-sentence insight from the arbiter]
139
+
140
+ [If SYNTHESIS:]
141
+ ✨ Synthesis takes from Insider:
142
+ - [element 1]
143
+ - [element 2]
144
+
145
+ ✨ Synthesis takes from Academic:
146
+ - [element 1]
147
+ - [element 2]
148
+
149
+ [If confidence is LOW:]
150
+ ⚠️ Low confidence — recommend discussing before proceeding.
151
+ ```
152
+
153
+ Then auto-record the challenge:
154
+ ```
155
+ Call: merlin_record_challenge
156
+ ```
157
+
158
+ ### In Control mode:
159
+
160
+ Present the full arbiter report and ask the user to choose:
161
+ ```
162
+ [1] Accept the arbiter's recommendation
163
+ [2] Go with the Insider approach
164
+ [3] Go with the Academic approach
165
+ [4] Discuss further before deciding
166
+ ```
167
+ </step>
168
+
169
+ <step name="record_outcome">
170
+ ## Step 5: Record the Challenge
171
+
172
+ Call the MCP tool to track this challenge for long-term analytics:
173
+
174
+ ```
175
+ Call: merlin_record_challenge
176
+ task: "[task description]"
177
+ insiderScore: [number]
178
+ academicScore: [number]
179
+ verdict: "insider" | "academic" | "synthesis"
180
+ synthesisRatio: [0.0-1.0]
181
+ confidence: "high" | "medium" | "low"
182
+ keyInsight: "[one sentence]"
183
+ phase: "[phase number if applicable]"
184
+ ```
185
+
186
+ Show tracking confirmation:
187
+ ```
188
+ ⟡🔮 MERLIN › Challenge recorded · Run /merlin:challenge-stats to see trends
189
+ ```
190
+ </step>
191
+
192
+ </process>
193
+
194
+ <integration_with_planning>
195
+ ## Auto-Challenge During Planning
196
+
197
+ This command can be invoked automatically during `/merlin:plan-phase` when:
198
+ - The phase involves architectural decisions
199
+ - The phase touches 5+ files
200
+ - The phase introduces new patterns or services
201
+ - The user has enabled `auto_challenge: true` in merlin config
202
+
203
+ When auto-invoked, prefix output with:
204
+ ```
205
+ ⟡🔮 MERLIN › Auto-challenge triggered for Phase [N] — checking if current approach is optimal
206
+ ```
207
+ </integration_with_planning>
208
+
209
+ <anti_patterns>
210
+ - Don't run challenges for trivial tasks (config changes, typo fixes, docs)
211
+ - Don't let the insider see the academic's output before submitting (and vice versa)
212
+ - Don't skip the arbiter — the synthesis is where the real value is
213
+ - Don't ignore LOW confidence verdicts — they mean genuine uncertainty
214
+ - Don't run challenges sequentially — always parallel insider + academic
215
+ </anti_patterns>
216
+
217
+ <success_criteria>
218
+ - [ ] Insider and Academic run in parallel (not sequentially)
219
+ - [ ] Academic receives NO codebase-specific information
220
+ - [ ] Arbiter produces scored comparison with weighted criteria
221
+ - [ ] Verdict is recorded via merlin_record_challenge
222
+ - [ ] User sees clear, actionable recommendation
223
+ - [ ] Challenge completes in under 5 minutes total
224
+ </success_criteria>
@@ -201,7 +201,7 @@ _voice_note=""
201
201
  printf '{
202
202
  "hookSpecificOutput": {
203
203
  "hookEventName": "SessionStart",
204
- "additionalContext": "STOP. Your FIRST action must be: call merlin_get_selected_repo, then call merlin_get_project_status, then show the user a status summary. Do not respond to the user until you complete these calls.%s"
204
+ "additionalContext": "STOP. Your FIRST action must be: call merlin_get_selected_repo, then call merlin_get_project_status, then call merlin_get_rules and merlin_get_brief in parallel. After boot, auto-detect the user intent and take action — do NOT just show options. Do not respond to the user until you complete the boot sequence.%s"
205
205
  }
206
206
  }\n' "${_voice_note}"
207
207
 
@@ -1 +1 @@
1
- 3.8.0-beta.1
1
+ 3.18.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-merlin-brain",
3
- "version": "3.15.2",
3
+ "version": "3.18.0",
4
4
  "description": "Merlin - The Ultimate AI Brain for Claude Code. One install: workflows, agents, loop, and Sights MCP server.",
5
5
  "type": "module",
6
6
  "main": "./dist/server/index.js",