create-merlin-brain 5.0.1 โ 5.3.1
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/README.md +38 -4
- package/bin/install.cjs +20 -0
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +75 -0
- package/dist/server/server.js.map +1 -1
- package/dist/server/tools/context.d.ts.map +1 -1
- package/dist/server/tools/context.js +60 -0
- package/dist/server/tools/context.js.map +1 -1
- package/dist/server/tools/project-picture.d.ts +17 -0
- package/dist/server/tools/project-picture.d.ts.map +1 -0
- package/dist/server/tools/project-picture.js +204 -0
- package/dist/server/tools/project-picture.js.map +1 -0
- package/dist/server/tools/types.d.ts +24 -0
- package/dist/server/tools/types.d.ts.map +1 -1
- package/files/CLAUDE.md +2 -0
- package/files/agents/challenger-academic.md +8 -0
- package/files/agents/challenger-arbiter.md +8 -0
- package/files/agents/challenger-insider.md +8 -0
- package/files/agents/code-organization-supervisor.md +8 -0
- package/files/agents/codex-planner.md +36 -9
- package/files/agents/context-guardian.md +8 -0
- package/files/agents/docs-keeper.md +8 -0
- package/files/agents/dry-refactor.md +8 -0
- package/files/agents/elite-code-refactorer.md +8 -0
- package/files/agents/hardening-guard.md +8 -0
- package/files/agents/implementation-dev.md +8 -0
- package/files/agents/merlin-access-control-reviewer.md +8 -0
- package/files/agents/merlin-api-designer.md +8 -0
- package/files/agents/merlin-codebase-mapper.md +8 -0
- package/files/agents/merlin-debugger.md +8 -0
- package/files/agents/merlin-dependency-auditor.md +8 -0
- package/files/agents/merlin-edge-case-hunter.md +8 -0
- package/files/agents/merlin-executor.md +8 -0
- package/files/agents/merlin-frontend.md +8 -0
- package/files/agents/merlin-input-validator.md +8 -0
- package/files/agents/merlin-integration-checker.md +8 -0
- package/files/agents/merlin-migrator.md +8 -0
- package/files/agents/merlin-milestone-auditor.md +8 -0
- package/files/agents/merlin-party-review.md +8 -0
- package/files/agents/merlin-performance.md +8 -0
- package/files/agents/merlin-planner.md +9 -1
- package/files/agents/merlin-researcher.md +8 -0
- package/files/agents/merlin-reviewer.md +8 -0
- package/files/agents/merlin-sast-reviewer.md +8 -0
- package/files/agents/merlin-secret-scanner.md +8 -0
- package/files/agents/merlin-security.md +8 -0
- package/files/agents/merlin-verifier.md +8 -0
- package/files/agents/merlin-work-verifier.md +8 -0
- package/files/agents/merlin.md +8 -0
- package/files/agents/ops-railway.md +8 -0
- package/files/agents/orchestrator-retrofit.md +8 -0
- package/files/agents/product-spec.md +8 -0
- package/files/agents/remotion.md +8 -0
- package/files/agents/system-architect.md +8 -0
- package/files/agents/tests-qa.md +8 -0
- package/files/commands/merlin/course-correct.md +8 -0
- package/files/commands/merlin/design-audit.md +92 -0
- package/files/commands/merlin/health.md +8 -0
- package/files/commands/merlin/next.md +8 -0
- package/files/commands/merlin/optimize.md +89 -0
- package/files/commands/merlin/polish.md +99 -0
- package/files/commands/merlin/quick.md +8 -0
- package/files/commands/merlin/readiness-gate.md +8 -0
- package/files/commands/merlin/redesign.md +108 -0
- package/files/hooks/session-start.sh +88 -2
- package/files/hooks/statusline.sh +9 -1
- package/files/loop/README.md +11 -0
- package/files/merlin/skills/SKILLS-INDEX.md +16 -1
- package/files/merlin/skills/TASK-OPTIMIZER.json +310 -0
- package/files/merlin/skills/coding/focus-mode.md +8 -0
- package/files/merlin/skills/design/emil-design-eng.md +31 -0
- package/files/merlin/skills/design/impeccable.md +36 -0
- package/files/merlin/skills/duo/offer.md +20 -7
- package/files/merlin/skills/duo/on.md +26 -17
- package/files/merlin/skills/duo/status.md +10 -3
- package/files/merlin/templates/DEBUG.md +11 -0
- package/files/merlin/templates/UAT.md +11 -0
- package/files/merlin/templates/phase-prompt.md +11 -0
- package/files/merlin/templates/project.md +11 -0
- package/files/merlin/templates/requirements.md +11 -0
- package/files/merlin/templates/roadmap.md +11 -0
- package/files/merlin/templates/state.md +11 -0
- package/files/merlin/templates/verification-report.md +11 -0
- package/files/merlin/workflows/execute-phase.md +11 -0
- package/files/merlin/workflows/plan-phase.md +11 -0
- package/files/merlin/workflows/progress.md +11 -0
- package/files/merlin/workflows/resume-project.md +11 -0
- package/files/merlin/workflows/verify-phase.md +11 -0
- package/files/merlin/workflows/verify-work.md +11 -0
- package/files/merlin-system-prompt.txt +35 -1
- package/files/rules/codex-routing.md +19 -0
- package/files/rules/duo-routing.md +109 -10
- package/files/rules/merlin-routing.md +40 -0
- package/files/scripts/codex-as.sh +5 -2
- package/files/scripts/design-intent-detect.sh +8 -0
- package/files/scripts/duo-badge.sh +3 -5
- package/files/scripts/duo-installed.sh +3 -3
- package/files/scripts/duo-mode-read.sh +30 -10
- package/files/scripts/duo-mode-write.sh +28 -3
- package/files/scripts/duo-pre-route.sh +2 -8
- package/files/scripts/install-design-skills.sh +86 -0
- package/files/scripts/merlin-codex.sh +84 -0
- package/files/scripts/task-optimize.sh +335 -0
- package/package.json +1 -1
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: merlin:optimize
|
|
3
|
+
description: Preview which skills + agent the optimizer would pick for a task โ no execution, just the recommendation
|
|
4
|
+
argument-hint: "<task description>"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<objective>
|
|
11
|
+
Preview the Universal Task Optimizer's recommendation for a given task.
|
|
12
|
+
|
|
13
|
+
Shows which skills would be loaded and which agent would be routed to, WITHOUT actually executing the routing. Useful for understanding how Merlin pairs tasks with specialists.
|
|
14
|
+
</objective>
|
|
15
|
+
|
|
16
|
+
<context>
|
|
17
|
+
Task: $ARGUMENTS (required: task description to analyze)
|
|
18
|
+
</context>
|
|
19
|
+
|
|
20
|
+
<process>
|
|
21
|
+
|
|
22
|
+
## Step 1: Validate Input
|
|
23
|
+
|
|
24
|
+
$ARGUMENTS must be provided. If empty, show usage:
|
|
25
|
+
```
|
|
26
|
+
Usage: /merlin:optimize "your task description"
|
|
27
|
+
|
|
28
|
+
Examples:
|
|
29
|
+
/merlin:optimize "redesign the dashboard"
|
|
30
|
+
/merlin:optimize "add OAuth login"
|
|
31
|
+
/merlin:optimize "write unit tests for the parser"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Step 2: Run the Universal Task Optimizer
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
bash ~/.claude/scripts/task-optimize.sh --task "$ARGUMENTS"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Store the JSON result.
|
|
41
|
+
|
|
42
|
+
## Step 3: Parse and Present Result
|
|
43
|
+
|
|
44
|
+
If score < 25:
|
|
45
|
+
```
|
|
46
|
+
โก๐ฎ MERLIN โบ No specific skill match for this task.
|
|
47
|
+
|
|
48
|
+
Score: <score>
|
|
49
|
+
Intent: none
|
|
50
|
+
Recommendation: Fall back to default workflow routing (see /merlin:help for options)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If score >= 25:
|
|
54
|
+
```
|
|
55
|
+
โก๐ฎ MERLIN โบ Task Optimization Result
|
|
56
|
+
|
|
57
|
+
Intent: <intent>
|
|
58
|
+
Score: <score>/100
|
|
59
|
+
Skills: <skills array, comma-separated>
|
|
60
|
+
Agent: <agent>
|
|
61
|
+
Matched: <matched_phrases, comma-separated>
|
|
62
|
+
|
|
63
|
+
Skill file paths:
|
|
64
|
+
- ~/.claude/merlin/skills/<skill1>.md
|
|
65
|
+
- ~/.claude/merlin/skills/<skill2>.md
|
|
66
|
+
|
|
67
|
+
Want me to execute this routing? (y/n)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Step 4: Handle Follow-up
|
|
71
|
+
|
|
72
|
+
If user says yes/y/execute:
|
|
73
|
+
- Read the skill files
|
|
74
|
+
- Route to the recommended agent with task and skills prepended
|
|
75
|
+
|
|
76
|
+
If user says no/n:
|
|
77
|
+
- Exit and let user choose a different approach
|
|
78
|
+
|
|
79
|
+
</process>
|
|
80
|
+
|
|
81
|
+
<error_handling>
|
|
82
|
+
|
|
83
|
+
| Condition | Action |
|
|
84
|
+
|-----------|--------|
|
|
85
|
+
| No task provided | Show usage and examples |
|
|
86
|
+
| Optimizer script missing | Error: run `npx create-merlin-brain` to reinstall |
|
|
87
|
+
| Registry missing | Error: TASK-OPTIMIZER.json not found |
|
|
88
|
+
|
|
89
|
+
</error_handling>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: merlin:polish
|
|
3
|
+
description: Apply animation craft + UI polish using emil-design-eng skill via animation-expert
|
|
4
|
+
argument-hint: "[path] - file/component to polish (required)"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- mcp__merlin__merlin_get_context
|
|
11
|
+
- mcp__merlin__merlin_route
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Apply polish and animation craft to a component or file using the emil-design-eng skill.
|
|
16
|
+
|
|
17
|
+
Focuses on: easing functions, smooth transitions, micro-interactions, gesture handling, prefers-reduced-motion accessibility, GPU-optimized performance.
|
|
18
|
+
|
|
19
|
+
Routes to `animation-expert` agent with emil-design-eng skill loaded.
|
|
20
|
+
</objective>
|
|
21
|
+
|
|
22
|
+
<context>
|
|
23
|
+
Target: $ARGUMENTS (required: file or component path)
|
|
24
|
+
</context>
|
|
25
|
+
|
|
26
|
+
<process>
|
|
27
|
+
|
|
28
|
+
## Step 1: Validate Path
|
|
29
|
+
|
|
30
|
+
$ARGUMENTS must be provided. If empty, show usage:
|
|
31
|
+
```
|
|
32
|
+
Usage: /merlin:polish "path/to/component.tsx"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Step 2: Ensure Skills Installed
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bash ~/.claude/scripts/install-design-skills.sh
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Step 3: Detect Task Intent
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bash ~/.claude/scripts/task-optimize.sh --task "polish animation"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Store result.
|
|
48
|
+
|
|
49
|
+
## Step 4: Read Emil Design Engineering Skill
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
Read: ~/.claude/skills/emil-design-eng/SKILL.md
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Store skill body.
|
|
56
|
+
|
|
57
|
+
## Step 5: Read Target File
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
Read: $ARGUMENTS
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
If read fails, error and exit.
|
|
64
|
+
|
|
65
|
+
## Step 6: Route to animation-expert
|
|
66
|
+
|
|
67
|
+
Call `merlin_route` with:
|
|
68
|
+
- Agent: `animation-expert`
|
|
69
|
+
- Task: "Polish this component with animation craft: improve easing, add prefers-reduced-motion, smooth transitions, polish micro-interactions, optimize for 60fps"
|
|
70
|
+
- Context: prepend emil-design-eng skill body
|
|
71
|
+
- Include requirements:
|
|
72
|
+
- Easing: cubic-bezier or spring easing (ease-in-out for semantic, custom for premium feel)
|
|
73
|
+
- Transitions: review timing (150-300ms for interactions, 1-2s for page transitions)
|
|
74
|
+
- Micro-interactions: add subtle feedback on user actions (hover, focus, click)
|
|
75
|
+
- Gestures: swipe, drag, pinch interactions where appropriate
|
|
76
|
+
- Performance: CSS animations preferred, requestAnimationFrame for JS, will-change hints
|
|
77
|
+
- Accessibility: respect prefers-reduced-motion, provide keyboard navigation
|
|
78
|
+
|
|
79
|
+
## Step 7: Review Changes
|
|
80
|
+
|
|
81
|
+
After agent completes:
|
|
82
|
+
```bash
|
|
83
|
+
git diff HEAD path/to/file
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Show user the diff and confirm changes look good.
|
|
87
|
+
|
|
88
|
+
</process>
|
|
89
|
+
|
|
90
|
+
<error_handling>
|
|
91
|
+
|
|
92
|
+
| Condition | Action |
|
|
93
|
+
|-----------|--------|
|
|
94
|
+
| No path provided | Show usage and exit |
|
|
95
|
+
| Path invalid | Error and exit |
|
|
96
|
+
| Skills missing | Attempt install, continue with warning |
|
|
97
|
+
| animation-expert unavailable | Use ui-builder fallback |
|
|
98
|
+
|
|
99
|
+
</error_handling>
|
|
@@ -12,6 +12,14 @@ allowed-tools:
|
|
|
12
12
|
- mcp__merlin__merlin_get_context
|
|
13
13
|
- mcp__merlin__merlin_search
|
|
14
14
|
- mcp__merlin__merlin_find_files
|
|
15
|
+
provenance:
|
|
16
|
+
upstream: gsd-build/get-shit-done
|
|
17
|
+
upstream_path: commands/gsd/quick.md
|
|
18
|
+
upstream_commit: 9045c81
|
|
19
|
+
license: MIT
|
|
20
|
+
license_verification: confirmed
|
|
21
|
+
adapted: "2026-03-14"
|
|
22
|
+
changes: adapted from GSD command pattern
|
|
15
23
|
---
|
|
16
24
|
|
|
17
25
|
<objective>
|
|
@@ -9,6 +9,14 @@ allowed-tools:
|
|
|
9
9
|
- Glob
|
|
10
10
|
- mcp__merlin__merlin_get_context
|
|
11
11
|
- mcp__merlin__merlin_get_project_status
|
|
12
|
+
provenance:
|
|
13
|
+
upstream: bmad-code-org/BMAD-METHOD
|
|
14
|
+
upstream_path: "pattern: BMAD readiness gate"
|
|
15
|
+
upstream_commit: 285bad4
|
|
16
|
+
license: MIT
|
|
17
|
+
license_verification: pending
|
|
18
|
+
adapted: "2026-03-14"
|
|
19
|
+
changes: BMAD-inspired command pattern
|
|
12
20
|
---
|
|
13
21
|
|
|
14
22
|
<objective>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: merlin:redesign
|
|
3
|
+
description: Comprehensive redesign using impeccable + emil-design-eng with ui-builder
|
|
4
|
+
argument-hint: "[path] - file/component to redesign (required)"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- mcp__merlin__merlin_get_context
|
|
11
|
+
- mcp__merlin__merlin_route
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<objective>
|
|
15
|
+
Full redesign using both impeccable and emil-design-eng skills. Covers all 7 impeccable design domains + animation polish from emil.
|
|
16
|
+
|
|
17
|
+
Scope: typography, color, spacing, motion, interaction, responsive, UX writing, plus easing, micro-interactions, gestures, and performance optimization.
|
|
18
|
+
|
|
19
|
+
Routes to `ui-builder` agent with both priority design skills loaded.
|
|
20
|
+
</objective>
|
|
21
|
+
|
|
22
|
+
<context>
|
|
23
|
+
Target: $ARGUMENTS (required: file or component path)
|
|
24
|
+
</context>
|
|
25
|
+
|
|
26
|
+
<process>
|
|
27
|
+
|
|
28
|
+
## Step 1: Validate Path
|
|
29
|
+
|
|
30
|
+
$ARGUMENTS must be provided. If empty, show usage:
|
|
31
|
+
```
|
|
32
|
+
Usage: /merlin:redesign "path/to/component.tsx"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Step 2: Ensure Skills Installed
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bash ~/.claude/scripts/install-design-skills.sh
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Step 3: Detect Task Intent
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
bash ~/.claude/scripts/task-optimize.sh --task "redesign"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Store result.
|
|
48
|
+
|
|
49
|
+
## Step 4: Read Both Priority Skills
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
Read: ~/.claude/skills/impeccable/SKILL.md
|
|
53
|
+
Read: ~/.claude/skills/emil-design-eng/SKILL.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Store both skill bodies.
|
|
57
|
+
|
|
58
|
+
## Step 5: Read Target File
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
Read: $ARGUMENTS
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
If read fails, error and exit.
|
|
65
|
+
|
|
66
|
+
## Step 6: Route to ui-builder
|
|
67
|
+
|
|
68
|
+
Call `merlin_route` with:
|
|
69
|
+
- Agent: `ui-builder`
|
|
70
|
+
- Task: "Comprehensive redesign using impeccable + emil-design-eng: improve typography, color, spacing, motion, interaction, responsive design, UX writing, easing, micro-interactions, and 60fps performance. Include before/after rationale."
|
|
71
|
+
- Context: prepend both skill bodies
|
|
72
|
+
- Include redesign checklist:
|
|
73
|
+
- **Typography (impeccable):** font families, scales, weights, line-height, readability, hierarchy
|
|
74
|
+
- **Color (impeccable):** OKLCH-based system, accessible contrast ratios, dark-mode, semantic naming
|
|
75
|
+
- **Spacing (impeccable):** proportional grid, breathing room, visual hierarchy consistency
|
|
76
|
+
- **Motion (impeccable):** timing curves, keyframes, transitions between states
|
|
77
|
+
- **Interaction (impeccable):** hover/focus/active/disabled states, feedback patterns, accessibility
|
|
78
|
+
- **Responsive (impeccable):** breakpoints, fluid scaling, container queries, mobile-first
|
|
79
|
+
- **UX writing (impeccable):** copy clarity, tone consistency, error messages, microcopy
|
|
80
|
+
- **Easing (emil):** cubic-bezier curves, spring physics, motion feel
|
|
81
|
+
- **Micro-interactions (emil):** subtle feedback, gestures, polish details
|
|
82
|
+
- **Performance (emil):** 60fps animations, GPU compositing, will-change hints, reduced-motion
|
|
83
|
+
|
|
84
|
+
## Step 7: Review Changes
|
|
85
|
+
|
|
86
|
+
After agent completes:
|
|
87
|
+
```bash
|
|
88
|
+
git diff HEAD path/to/file
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Show user the full diff. Highlight:
|
|
92
|
+
- Before/after visual differences
|
|
93
|
+
- Key design system changes
|
|
94
|
+
- Performance improvements
|
|
95
|
+
- Accessibility enhancements
|
|
96
|
+
|
|
97
|
+
</process>
|
|
98
|
+
|
|
99
|
+
<error_handling>
|
|
100
|
+
|
|
101
|
+
| Condition | Action |
|
|
102
|
+
|-----------|--------|
|
|
103
|
+
| No path provided | Show usage and exit |
|
|
104
|
+
| Path invalid | Error and exit |
|
|
105
|
+
| Skills missing | Attempt install, continue with warning |
|
|
106
|
+
| ui-builder unavailable | Use merlin-frontend fallback |
|
|
107
|
+
|
|
108
|
+
</error_handling>
|
|
@@ -199,8 +199,94 @@ _merlin_check_voice_mode
|
|
|
199
199
|
_voice_note=""
|
|
200
200
|
[ "${MERLIN_VOICE_MODE:-}" = "1" ] && _voice_note=" Voice mode active: keep all responses short and direct."
|
|
201
201
|
|
|
202
|
-
#
|
|
203
|
-
|
|
202
|
+
# โโ 4a. Session banner (best-effort, all reads use || true) โโโโ
|
|
203
|
+
_SCRIPTS_DIR="${HOME}/.claude/scripts"
|
|
204
|
+
|
|
205
|
+
# Project name: git basename or pwd basename (handle spaces in path)
|
|
206
|
+
_git_top=$(git -C "${PWD}" rev-parse --show-toplevel 2>/dev/null || true)
|
|
207
|
+
if [ -n "${_git_top:-}" ]; then
|
|
208
|
+
_project_name=$(basename "${_git_top}" 2>/dev/null || true)
|
|
209
|
+
else
|
|
210
|
+
_project_name=$(basename "${PWD}" 2>/dev/null || true)
|
|
211
|
+
fi
|
|
212
|
+
if [ -z "${_project_name:-}" ]; then
|
|
213
|
+
_project_name="project"
|
|
214
|
+
fi
|
|
215
|
+
|
|
216
|
+
# Mode: Solo or Duo
|
|
217
|
+
_duo_status="disabled"
|
|
218
|
+
if [ -x "${_SCRIPTS_DIR}/duo-mode-read.sh" ]; then
|
|
219
|
+
_duo_status=$("${_SCRIPTS_DIR}/duo-mode-read.sh" 2>/dev/null || echo "disabled")
|
|
220
|
+
fi
|
|
221
|
+
_duo_installed=false
|
|
222
|
+
if [ -x "${_SCRIPTS_DIR}/duo-installed.sh" ]; then
|
|
223
|
+
if "${_SCRIPTS_DIR}/duo-installed.sh" 2>/dev/null; then
|
|
224
|
+
_duo_installed=true
|
|
225
|
+
fi
|
|
226
|
+
fi
|
|
227
|
+
if [ "${_duo_status}" = "enabled" ] && [ "${_duo_installed}" = "true" ]; then
|
|
228
|
+
_mode_label="Duo"
|
|
229
|
+
else
|
|
230
|
+
_mode_label="Solo"
|
|
231
|
+
fi
|
|
232
|
+
|
|
233
|
+
# Codex: installed or missing
|
|
234
|
+
_codex_label="missing"
|
|
235
|
+
if [ -x "${_SCRIPTS_DIR}/codex-installed.sh" ]; then
|
|
236
|
+
if "${_SCRIPTS_DIR}/codex-installed.sh" 2>/dev/null; then
|
|
237
|
+
_codex_label="installed"
|
|
238
|
+
fi
|
|
239
|
+
fi
|
|
240
|
+
|
|
241
|
+
# Badge: use duo-badge.sh if available
|
|
242
|
+
_badge="โก๐ฎ MERLIN โบ"
|
|
243
|
+
if [ -x "${_SCRIPTS_DIR}/duo-badge.sh" ]; then
|
|
244
|
+
_badge=$("${_SCRIPTS_DIR}/duo-badge.sh" 2>/dev/null || echo "โก๐ฎ MERLIN โบ")
|
|
245
|
+
fi
|
|
246
|
+
|
|
247
|
+
# Recommended next action (priority order, all reads use || true)
|
|
248
|
+
_next_action="Ready: ask anything or /merlin:help"
|
|
249
|
+
if [ -f "${HOME}/.merlin/state/active-plan.md" ] || \
|
|
250
|
+
[ -f "${HOME}/.claude/merlin/active-plan.md" ] || \
|
|
251
|
+
[ -f "${PWD}/PLAN.md" ]; then
|
|
252
|
+
_next_action="Continue execution: /merlin:execute-phase"
|
|
253
|
+
elif [ -f "${HOME}/.merlin/state/verification.json" ]; then
|
|
254
|
+
_vfailed=""
|
|
255
|
+
if command -v jq >/dev/null 2>&1; then
|
|
256
|
+
_vfailed=$(jq -r '.status // ""' "${HOME}/.merlin/state/verification.json" 2>/dev/null || echo "")
|
|
257
|
+
fi
|
|
258
|
+
if [ "${_vfailed:-}" = "failed" ]; then
|
|
259
|
+
_next_action="Verification failed last time โ investigate or rerun"
|
|
260
|
+
fi
|
|
261
|
+
fi
|
|
262
|
+
if [ "${_next_action}" = "Ready: ask anything or /merlin:help" ]; then
|
|
263
|
+
if git -C "${PWD}" rev-parse --git-dir >/dev/null 2>&1 && [ ! -f "${PWD}/PROJECT.md" ]; then
|
|
264
|
+
_next_action="New project: /merlin:new-project"
|
|
265
|
+
fi
|
|
266
|
+
fi
|
|
267
|
+
if [ "${_next_action}" = "Ready: ask anything or /merlin:help" ] && \
|
|
268
|
+
[ -f "${HOME}/.merlin/state/tasks.json" ]; then
|
|
269
|
+
_pending=0
|
|
270
|
+
if command -v jq >/dev/null 2>&1; then
|
|
271
|
+
_tdone=$(jq '.done // 0' "${HOME}/.merlin/state/tasks.json" 2>/dev/null || echo "0")
|
|
272
|
+
_ttotal=$(jq '.total // 0' "${HOME}/.merlin/state/tasks.json" 2>/dev/null || echo "0")
|
|
273
|
+
if [ "${_ttotal:-0}" -gt 0 ] 2>/dev/null && [ "${_tdone:-0}" -lt "${_ttotal:-0}" ] 2>/dev/null; then
|
|
274
|
+
_pending=$(( _ttotal - _tdone ))
|
|
275
|
+
fi
|
|
276
|
+
fi
|
|
277
|
+
if [ "${_pending:-0}" -gt 0 ] 2>/dev/null; then
|
|
278
|
+
_next_action="${_pending} tasks pending: /merlin:next"
|
|
279
|
+
fi
|
|
280
|
+
fi
|
|
281
|
+
|
|
282
|
+
# Banner line 1: "โก๐ฎ MERLIN ยท connected ยท {project}" (spec format)
|
|
283
|
+
# Use the badge prefix (everything before "MERLIN") plus fixed text so
|
|
284
|
+
# "MERLIN ยท connected" always appears regardless of duo/solo badge variant.
|
|
285
|
+
_badge_prefix=$(echo "${_badge}" | sed 's/MERLIN.*//' 2>/dev/null || true)
|
|
286
|
+
_banner="${_badge_prefix}MERLIN ยท connected ยท ${_project_name} | Mode: ${_mode_label} ยท Codex: ${_codex_label} | Next: ${_next_action}"
|
|
287
|
+
|
|
288
|
+
# โโ 4b. Build the additionalContext with banner + routing rules โ
|
|
289
|
+
_context="${_banner} || 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. Do not respond to the user until you complete the boot sequence."
|
|
204
290
|
_context="${_context} AFTER BOOT โ MANDATORY ROUTING (you MUST follow this, do NOT skip):"
|
|
205
291
|
_context="${_context} Bug/crash/error logs/deploy failure: use Skill(merlin:workflow, args=run bug-fix <summary>)."
|
|
206
292
|
_context="${_context} Build feature/add feature: use Skill(merlin:workflow, args=run feature-dev <summary>)."
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
# {"hookSpecificOutput":{"hookEventName":"Notification","statusLine":"..."}}
|
|
10
10
|
#
|
|
11
11
|
# Metrics included:
|
|
12
|
+
# - Merlin badge (from ~/.claude/scripts/duo-badge.sh โ duo-aware)
|
|
12
13
|
# - Merlin version (from ~/.claude/merlin/VERSION)
|
|
13
14
|
# - Active agents (from ~/.merlin/state/agents.json)
|
|
14
15
|
# - Task progress (from ~/.merlin/state/tasks.json)
|
|
@@ -132,8 +133,15 @@ else
|
|
|
132
133
|
RATE_DISPLAY="OK"
|
|
133
134
|
fi
|
|
134
135
|
|
|
136
|
+
# โโ Badge (duo-aware) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
137
|
+
SCRIPTS_DIR="${HOME}/.claude/scripts"
|
|
138
|
+
BADGE="โก๐ฎ MERLIN โบ"
|
|
139
|
+
if [ -x "${SCRIPTS_DIR}/duo-badge.sh" ]; then
|
|
140
|
+
BADGE=$("${SCRIPTS_DIR}/duo-badge.sh" 2>/dev/null || echo "โก๐ฎ MERLIN โบ")
|
|
141
|
+
fi
|
|
142
|
+
|
|
135
143
|
# โโ Compose statusline โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
136
|
-
STATUSLINE="v${MERLIN_VERSION} | ${AGENT_COUNT} agents | ${TASKS_DISPLAY} | ${COST_DISPLAY} | ${GIT_BRANCH} | ctx:${CTX_DISPLAY} | rate:${RATE_DISPLAY}"
|
|
144
|
+
STATUSLINE="${BADGE} v${MERLIN_VERSION} | ${AGENT_COUNT} agents | ${TASKS_DISPLAY} | ${COST_DISPLAY} | ${GIT_BRANCH} | ctx:${CTX_DISPLAY} | rate:${RATE_DISPLAY}"
|
|
137
145
|
|
|
138
146
|
# โโ Output โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
139
147
|
if command -v jq >/dev/null 2>&1; then
|
package/files/loop/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
provenance:
|
|
3
|
+
upstream: community/ralph-wiggum
|
|
4
|
+
upstream_path: "pattern: ralph wiggum autonomous loop"
|
|
5
|
+
upstream_commit: 1e73be0
|
|
6
|
+
license: varies (mostly MIT)
|
|
7
|
+
license_verification: pattern_only
|
|
8
|
+
adapted: "2026-02-11"
|
|
9
|
+
changes: adapted ralph autonomous-loop pattern
|
|
10
|
+
---
|
|
11
|
+
|
|
1
12
|
# Merlin Loop
|
|
2
13
|
|
|
3
14
|
**Autonomous AI Development Orchestrator**
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
provenance:
|
|
3
|
+
upstream: gsd-build/get-shit-done
|
|
4
|
+
upstream_path: skills/SKILLS-INDEX.md
|
|
5
|
+
upstream_commit: 9045c81
|
|
6
|
+
license: MIT
|
|
7
|
+
license_verification: confirmed
|
|
8
|
+
adapted: "2026-03-14"
|
|
9
|
+
changes: adapted from GSD skill pattern
|
|
10
|
+
---
|
|
11
|
+
|
|
1
12
|
# Merlin Skills Index
|
|
2
13
|
|
|
3
14
|
When planning or executing a task, search this index to find relevant skills to load.
|
|
@@ -31,7 +42,11 @@ Skills are prompt injections that enhance your capabilities for specific domains
|
|
|
31
42
|
- `devops/docker-containers` โ Dockerfiles, multi-stage builds, docker-compose, minimal images โ [docker, containers, devops]
|
|
32
43
|
- `devops/ci-cd` โ GitHub Actions, CI pipelines, automated testing and deployment โ [ci, cd, github-actions, deployment]
|
|
33
44
|
|
|
34
|
-
## Design
|
|
45
|
+
## Design (Priority โ load FIRST for any design/UI work)
|
|
46
|
+
- `design/impeccable` โ Comprehensive design language: typography, color (OKLCH), spatial, motion, interaction, responsive, UX writing โ [design, ui, typography, color, spacing, motion, accessibility, oklch] **[priority]**
|
|
47
|
+
ยท Triggers: redesign, "make it pretty", typography, spacing, color system, accessibility, responsive, dark mode, design review, UX writing
|
|
48
|
+
- `design/emil-design-eng` โ Animation craft & UI polish from Emil Kowalski: easing, gestures, transforms, performance โ [animation, polish, micro-interactions, easing, gestures] **[priority]**
|
|
49
|
+
ยท Triggers: animate, feels stiff, add motion, polish, micro-interactions, easing, transitions, 60fps
|
|
35
50
|
- `design/animation` โ Smooth animations with Framer Motion, GSAP, CSS transitions โ [animation, framer-motion, gsap, motion]
|
|
36
51
|
|
|
37
52
|
## Research
|