create-merlin-brain 3.12.0 โ 3.14.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/bin/install.cjs +10 -10
- package/dist/server/api/types.d.ts +7 -0
- package/dist/server/api/types.d.ts.map +1 -1
- package/dist/server/server.js +8 -8
- package/dist/server/server.js.map +1 -1
- package/dist/server/session-coach.js +9 -9
- package/dist/server/session-coach.js.map +1 -1
- package/dist/server/stats.js +7 -7
- package/dist/server/stats.js.map +1 -1
- package/dist/server/tools/__tests__/augmentation.test.d.ts +8 -0
- package/dist/server/tools/__tests__/augmentation.test.d.ts.map +1 -0
- package/dist/server/tools/__tests__/augmentation.test.js +76 -0
- package/dist/server/tools/__tests__/augmentation.test.js.map +1 -0
- package/dist/server/tools/__tests__/route-helpers.test.d.ts +5 -0
- package/dist/server/tools/__tests__/route-helpers.test.d.ts.map +1 -0
- package/dist/server/tools/__tests__/route-helpers.test.js +49 -0
- package/dist/server/tools/__tests__/route-helpers.test.js.map +1 -0
- package/dist/server/tools/agent-spawn.d.ts +25 -0
- package/dist/server/tools/agent-spawn.d.ts.map +1 -0
- package/dist/server/tools/agent-spawn.js +95 -0
- package/dist/server/tools/agent-spawn.js.map +1 -0
- package/dist/server/tools/augmentation.d.ts +45 -0
- package/dist/server/tools/augmentation.d.ts.map +1 -0
- package/dist/server/tools/augmentation.js +167 -0
- package/dist/server/tools/augmentation.js.map +1 -0
- package/dist/server/tools/project.js +1 -1
- package/dist/server/tools/project.js.map +1 -1
- package/dist/server/tools/route-helpers.d.ts +45 -0
- package/dist/server/tools/route-helpers.d.ts.map +1 -0
- package/dist/server/tools/route-helpers.js +93 -0
- package/dist/server/tools/route-helpers.js.map +1 -0
- package/dist/server/tools/route.d.ts +4 -3
- package/dist/server/tools/route.d.ts.map +1 -1
- package/dist/server/tools/route.js +63 -308
- package/dist/server/tools/route.js.map +1 -1
- package/files/CLAUDE.md +66 -5
- package/files/agents/merlin.md +21 -13
- package/files/hooks/config-change.sh +2 -2
- package/files/hooks/notify-desktop.sh +2 -2
- package/files/hooks/notify-webhook.sh +1 -1
- package/files/hooks/session-start-context.sh +1 -1
- package/files/hooks/task-completed-verify.sh +2 -2
- package/files/hooks/worktree-create.sh +1 -1
- package/files/hooks/worktree-remove.sh +1 -1
- package/package.json +5 -2
package/files/agents/merlin.md
CHANGED
|
@@ -35,12 +35,12 @@ You are **Merlin**, the AI brain for a strong product thinker and vibe coder. Yo
|
|
|
35
35
|
|
|
36
36
|
## ๐จ Visual Identity (ALWAYS follow these formatting rules)
|
|
37
37
|
|
|
38
|
-
Merlin actions MUST be visually distinct. The user should
|
|
38
|
+
Merlin actions MUST be visually distinct. The `โก๐ฎ MERLIN โบ` badge is Merlin's signature โ it appears on EVERY action, decision, routing, save, warning, and completion. The user should NEVER see a Merlin action without this badge.
|
|
39
39
|
|
|
40
40
|
### Session Start
|
|
41
41
|
When greeting the user or showing status, use this format:
|
|
42
42
|
```
|
|
43
|
-
|
|
43
|
+
โก๐ฎ MERLIN ยท connected ยท [project name]
|
|
44
44
|
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
45
45
|
๐ Status: [phase/milestone info]
|
|
46
46
|
๐ฏ Next: [what's next]
|
|
@@ -51,27 +51,27 @@ Ready. What are we building?
|
|
|
51
51
|
### Sights Check
|
|
52
52
|
When calling merlin_get_context or any Sights tool:
|
|
53
53
|
```
|
|
54
|
-
|
|
54
|
+
โก๐ฎ MERLIN โบ Checking Sights...
|
|
55
55
|
```
|
|
56
56
|
After results:
|
|
57
57
|
```
|
|
58
|
-
|
|
58
|
+
โก๐ฎ MERLIN โบ Found PaymentService.ts, StripeClient.ts โ
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
### Routing to Specialist
|
|
62
62
|
When routing to an agent, ALWAYS show:
|
|
63
63
|
```
|
|
64
|
-
|
|
64
|
+
โก๐ฎ MERLIN โบ Routing โ [agent name]
|
|
65
65
|
๐ Task: [one-line summary]
|
|
66
66
|
๐ฎ Sights context: [injected / none]
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
### After Agent Completes
|
|
70
70
|
```
|
|
71
|
-
โ
|
|
71
|
+
โก๐ฎ MERLIN โบ โ
[agent name] complete
|
|
72
72
|
[2-3 line summary of what was done]
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
โก๐ฎ MERLIN โบ Next steps:
|
|
75
75
|
[1] ...
|
|
76
76
|
[2] ...
|
|
77
77
|
[3] ...
|
|
@@ -79,29 +79,37 @@ When routing to an agent, ALWAYS show:
|
|
|
79
79
|
|
|
80
80
|
### Merlin Mode Activation
|
|
81
81
|
```
|
|
82
|
-
|
|
82
|
+
โก๐ฎ MERLIN MODE โ activated
|
|
83
83
|
Moving fast. Will state assumptions at the end.
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
### Pipeline Progress
|
|
87
87
|
When running multi-step work:
|
|
88
88
|
```
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
โก๐ฎ MERLIN โบ Pipeline: Spec โ Arch โ **Impl** โ Tests โ Docs
|
|
90
|
+
โ
โ
โถ๏ธ
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Saves & Syncs
|
|
94
|
+
```
|
|
95
|
+
โก๐ฎ MERLIN โบ SAVED โบ Rule: "always use strict TypeScript"
|
|
96
|
+
โก๐ฎ MERLIN โบ SAVED โบ Behavior: "route security to hardening-guard"
|
|
97
|
+
โก๐ฎ MERLIN โบ Checkpoint saved โ
|
|
91
98
|
```
|
|
92
99
|
|
|
93
100
|
### Errors / Warnings
|
|
94
101
|
```
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
โก๐ฎ MERLIN โบ โ ๏ธ [warning message]
|
|
103
|
+
โก๐ฎ MERLIN โบ โ [error message]
|
|
97
104
|
```
|
|
98
105
|
|
|
99
106
|
### Key Rules
|
|
100
|
-
- **
|
|
107
|
+
- **EVERY Merlin action starts with `โก๐ฎ MERLIN โบ`** โ no exceptions, no bare text
|
|
101
108
|
- **Routing always shows the arrow โ** with agent name
|
|
102
109
|
- **Status uses โโโ divider lines** to stand out
|
|
103
110
|
- **Numbered options** for next steps (never just prose)
|
|
104
111
|
- Keep it tight โ visual but not verbose
|
|
112
|
+
- The `โก๐ฎ` badge is sacred โ it means "Merlin is doing this"
|
|
105
113
|
|
|
106
114
|
---
|
|
107
115
|
|
|
@@ -43,7 +43,7 @@ if [ -n "$MERLIN_API_KEY" ]; then
|
|
|
43
43
|
;;
|
|
44
44
|
*)
|
|
45
45
|
KEY_VALID="false"
|
|
46
|
-
echo "
|
|
46
|
+
echo "โก๐ฎ MERLIN โบ API key has unexpected format after config change" >&2
|
|
47
47
|
;;
|
|
48
48
|
esac
|
|
49
49
|
fi
|
|
@@ -64,7 +64,7 @@ if declare -f log_event >/dev/null 2>&1; then
|
|
|
64
64
|
fi
|
|
65
65
|
|
|
66
66
|
if [ -z "$MERLIN_API_KEY" ]; then
|
|
67
|
-
echo "
|
|
67
|
+
echo "โก๐ฎ MERLIN โบ No API key configured โ Sights features disabled" >&2
|
|
68
68
|
fi
|
|
69
69
|
|
|
70
70
|
echo '{}'
|
|
@@ -104,11 +104,11 @@ case "${HOOK_EVENT}" in
|
|
|
104
104
|
MESSAGE="Claude needs your input"
|
|
105
105
|
;;
|
|
106
106
|
*)
|
|
107
|
-
MESSAGE="
|
|
107
|
+
MESSAGE="โก๐ฎ MERLIN โบ Task complete"
|
|
108
108
|
;;
|
|
109
109
|
esac
|
|
110
110
|
|
|
111
|
-
TITLE="Merlin"
|
|
111
|
+
TITLE="โก๐ฎ Merlin"
|
|
112
112
|
SOUND_ENABLED=$(_read_config '.notifications.sound' 'false')
|
|
113
113
|
|
|
114
114
|
# โโ Detect OS and send notification โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
@@ -15,7 +15,7 @@ cat <<'CONTEXT_JSON'
|
|
|
15
15
|
{
|
|
16
16
|
"hookSpecificOutput": {
|
|
17
17
|
"hookEventName": "SessionStart",
|
|
18
|
-
"additionalContext": "You
|
|
18
|
+
"additionalContext": "โก๐ฎ MERLIN SESSION ACTIVE. You MUST prefix every Merlin action with โก๐ฎ MERLIN โบ โ routing, sights calls, saves, decisions, warnings, completions. Before working: (1) call merlin_get_selected_repo to connect Sights, (2) call merlin_get_project_status to load state, (3) show numbered options. Check Sights before every edit. Route complex tasks to specialists via /merlin:route. The โก๐ฎ badge is Merlin's visual identity โ use it on EVERY Merlin touchpoint."
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
CONTEXT_JSON
|
|
@@ -24,7 +24,7 @@ if [ -f "package.json" ] && command -v jq >/dev/null 2>&1; then
|
|
|
24
24
|
build_exit=$?
|
|
25
25
|
if [ "$build_exit" -ne 0 ]; then
|
|
26
26
|
log_event "build_failed" "$(printf '{"exit_code":%d}' "$build_exit")"
|
|
27
|
-
echo "
|
|
27
|
+
echo "โก๐ฎ MERLIN โบ Build check failed (exit $build_exit)" >&2
|
|
28
28
|
else
|
|
29
29
|
log_event "build_passed" '{}'
|
|
30
30
|
fi
|
|
@@ -37,7 +37,7 @@ if [ -f "tsconfig.json" ] && command -v npx >/dev/null 2>&1; then
|
|
|
37
37
|
tsc_exit=$?
|
|
38
38
|
if [ "$tsc_exit" -ne 0 ]; then
|
|
39
39
|
log_event "typecheck_failed" "$(printf '{"exit_code":%d}' "$tsc_exit")"
|
|
40
|
-
echo "
|
|
40
|
+
echo "โก๐ฎ MERLIN โบ Type check failed (exit $tsc_exit)" >&2
|
|
41
41
|
else
|
|
42
42
|
log_event "typecheck_passed" '{}'
|
|
43
43
|
fi
|
|
@@ -55,7 +55,7 @@ if declare -f log_event >/dev/null 2>&1; then
|
|
|
55
55
|
"$WORKTREE_PATH" "$AGENT_ID" "$AGENT_TYPE")"
|
|
56
56
|
fi
|
|
57
57
|
|
|
58
|
-
echo "
|
|
58
|
+
echo "โก๐ฎ MERLIN โบ propagated config to worktree ${WORKTREE_PATH} (agent: ${AGENT_TYPE})" >&2
|
|
59
59
|
|
|
60
60
|
echo '{}'
|
|
61
61
|
exit 0
|
|
@@ -48,7 +48,7 @@ fi
|
|
|
48
48
|
|
|
49
49
|
LIFETIME_MSG=""
|
|
50
50
|
[ -n "$LIFETIME_S" ] && LIFETIME_MSG=" (lifetime: ${LIFETIME_S}s)"
|
|
51
|
-
echo "
|
|
51
|
+
echo "โก๐ฎ MERLIN โบ cleaned up worktree ${WORKTREE_PATH}${LIFETIME_MSG} (agent: ${AGENT_TYPE})" >&2
|
|
52
52
|
|
|
53
53
|
echo '{}'
|
|
54
54
|
exit 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-merlin-brain",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.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",
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
"start": "node dist/server/index.js",
|
|
16
16
|
"clean": "rm -rf dist",
|
|
17
17
|
"typecheck": "tsc --noEmit",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"test:watch": "vitest",
|
|
18
20
|
"prepublishOnly": "npm run build",
|
|
19
21
|
"postinstall": "node bin/install.cjs"
|
|
20
22
|
},
|
|
@@ -55,6 +57,7 @@
|
|
|
55
57
|
"devDependencies": {
|
|
56
58
|
"@types/node": "^20.10.0",
|
|
57
59
|
"tsx": "^4.6.2",
|
|
58
|
-
"typescript": "^5.3.0"
|
|
60
|
+
"typescript": "^5.3.0",
|
|
61
|
+
"vitest": "^4.1.0"
|
|
59
62
|
}
|
|
60
63
|
}
|