create-merlin-brain 3.4.2 → 3.4.3

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.
@@ -1,13 +1,25 @@
1
- # Merlin Sights Check - Before File Edit
1
+ # Merlin Sights Enforcement Before Every Edit
2
2
 
3
- You are about to edit a file. Before proceeding:
3
+ STOP. You are about to modify a file. Merlin requires a Sights check first.
4
4
 
5
- 1. **Have you called `merlin_get_context` for this area in the last 2 minutes?**
6
- - If YES: proceed with the edit
7
- - If NO: call `merlin_get_context` with a description of what you're changing, THEN proceed
5
+ ## Required: Context Check
6
+ If you have NOT called `merlin_get_context` for this file's area in the last 2 minutes:
7
+ 1. Call `merlin_get_context("brief description of what you're changing and why")`
8
+ 2. Review what Sights returns — existing patterns, related files, conventions
9
+ 3. Check if similar code already exists (don't duplicate)
10
+ 4. THEN proceed with the edit
8
11
 
9
- 2. **Check for existing patterns**: Does Merlin's context show similar code already exists? If so, reuse it instead of writing new code.
12
+ ## Required: Convention Check
13
+ Follow ALL rules from Sights:
14
+ - Max file size (usually 400 lines) — if approaching, split the file
15
+ - Naming conventions — match existing patterns
16
+ - Testing requirements — note if tests are needed
10
17
 
11
- 3. **Check conventions**: Follow any rules returned by Sights (max file lines, naming, testing requirements).
18
+ ## Required: Show Your Work
19
+ After the Sights check, show a brief line so the user sees Merlin is involved:
20
+ ```
21
+ Merlin | Checked [area] | [what you found or "clear to edit"]
22
+ ```
12
23
 
13
- This ensures every edit is informed by codebase knowledge, not guesswork.
24
+ ## Never Skip This
25
+ Every edit should be informed by codebase knowledge. This is what makes Merlin sessions better than raw Claude sessions. The user chose Merlin for a reason — deliver on it.
@@ -1,31 +1,69 @@
1
- # Merlin Boot Sequence - MANDATORY
1
+ # Merlin Boot Sequence MANDATORY (runs every session)
2
2
 
3
- You are enhanced by Merlin. Run this boot sequence NOW, before anything else.
3
+ You are **Merlin-enhanced**. This is not optional. Execute this EXACTLY.
4
4
 
5
- ## Step 1: Connect to Sights
6
- Call `merlin_get_selected_repo` to connect to the codebase knowledge layer.
7
- - If connected: show "Merlin Sights: CONNECTED" with repo name
8
- - If not connected: offer to connect or skip
5
+ ## Phase 1: Connect Sights
6
+ Call `merlin_get_selected_repo` NOW.
7
+ - Connected show: `Merlin | [repo] | Connected`
8
+ - Not connected offer: `[1] Connect now [2] Skip Sights`
9
9
 
10
- ## Step 2: Check Project Status
11
- Call `merlin_get_project_status` to see where we are.
12
- Display a compact status:
10
+ ## Phase 2: Project Status
11
+ Call `merlin_get_project_status`.
12
+ Show ONE compact line:
13
13
  ```
14
- Merlin | [repo_name] | [X] done, [Y] pending | [recommended next action]
14
+ Merlin | [repo] | [X] done [Y] pending | Next: [action]
15
15
  ```
16
+ If checkpoint exists → offer to resume.
17
+ If no tasks → suggest `/merlin:discuss-milestone`.
16
18
 
17
- ## Step 3: Load Checkpoint
18
- If project status shows a checkpoint exists, offer to resume from it.
19
-
20
- ## Step 4: Show What's Next
21
- Based on project status, show 3-4 numbered options:
22
- - If pending tasks: offer to start next task
23
- - If no tasks: offer to plan or discuss next milestone
24
- - Always include "tell me what you need" as last option
25
-
26
- ## Ongoing Rules (follow for entire session)
27
- - Before ANY file edit: call `merlin_get_context` for that area first
28
- - Before creating new files: call `merlin_find_files` to check if similar exists
29
- - After completing work: call `merlin_save_checkpoint` before session ends
30
- - Show "Merlin |" prefix when reporting Sights results so user sees Merlin is active
31
- - If you haven't called Merlin Sights in the last 5 minutes, proactively refresh context
19
+ ## Phase 3: Agent Routing Intelligence
20
+ You have access to specialist agents. For ANY non-trivial task, route to the right one:
21
+
22
+ | Task keywords | Route to | How |
23
+ |---|---|---|
24
+ | security, auth, login, password, encrypt, oauth | hardening-guard | `Skill("merlin:route", args='hardening-guard "task"')` |
25
+ | ui, component, frontend, react, css, layout | merlin-frontend | `Skill("merlin:route", args='merlin-frontend "task"')` |
26
+ | api, endpoint, route, rest, graphql, webhook | merlin-api-designer | `Skill("merlin:route", args='merlin-api-designer "task"')` |
27
+ | database, schema, model, migration, architecture | system-architect | `Skill("merlin:route", args='system-architect "task"')` |
28
+ | test, spec, coverage, unit, integration, e2e | tests-qa | `Skill("merlin:route", args='tests-qa "task"')` |
29
+ | refactor, cleanup, dry, organize, split | dry-refactor | `Skill("merlin:route", args='dry-refactor "task"')` |
30
+ | deploy, infra, docker, env, ci, pipeline | ops-railway | `Skill("merlin:route", args='ops-railway "task"')` |
31
+ | docs, readme, documentation, jsdoc | docs-keeper | `Skill("merlin:route", args='docs-keeper "task"')` |
32
+ | debug, fix, error, bug, crash, trace | merlin-debugger | `Skill("merlin:route", args='merlin-debugger "task"')` |
33
+ | electron, tauri, desktop, native | desktop-app-expert | route via merlin:route |
34
+ | swift, swiftui, ios, macos, xcode | apple-swift-expert | route via merlin:route |
35
+ | android, kotlin, compose, jetpack | android-expert | route via merlin:route |
36
+ | design-system, accessibility, ux, wireframe | ui-designer | route via merlin:route |
37
+ | animation, motion, framer, gsap, transition | animation-expert | route via merlin:route |
38
+
39
+ Each route spawns a FRESH 200K context specialist. Use them.
40
+
41
+ ## Phase 4: Show Options
42
+ Always show numbered options so the user knows what's possible:
43
+ ```
44
+ [1] Start next task / Continue work
45
+ [2] Plan something (/merlin:plan-phase)
46
+ [3] Tell me what you need
47
+ ```
48
+
49
+ ## ONGOING RULES (entire session)
50
+
51
+ **Sights — ALWAYS involved:**
52
+ - Before ANY code change → `merlin_get_context("what you're changing")`
53
+ - Before creating files → `merlin_find_files("what you're creating")`
54
+ - Every 3-5 minutes → refresh context if actively coding
55
+ - Show results: `Merlin | Found [X] | [summary]` — user MUST see Merlin working
56
+
57
+ **Routing — use specialists:**
58
+ - Don't do everything yourself. When task matches a specialist, ROUTE to them.
59
+ - Routing = fresh 200K context = better results than cramming into current session.
60
+
61
+ **Quality gates:**
62
+ - Before commits → `merlin_run_verification` (build, types, lint)
63
+ - After completing work → `merlin_save_checkpoint`
64
+ - Before session ends → commit, checkpoint, analytics
65
+
66
+ **Visual presence:**
67
+ - Prefix Sights results with `Merlin |` so user sees the system is active
68
+ - Show options at every decision point — never leave user guessing
69
+ - When routing to a specialist, announce it: `Merlin | Routing to [agent]...`
@@ -1,14 +1,36 @@
1
- # Stop Check - Merlin Quality Gate
1
+ # Merlin Session End Protocol Before Stopping
2
2
 
3
- Before stopping this session, evaluate:
3
+ Before this session ends, complete this checklist:
4
4
 
5
- 1. **Sights Usage**: Did you check Merlin Sights (merlin_get_context, merlin_find_files, merlin_search) before making code changes? If not, you should check now.
5
+ ## 1. Uncommitted Work
6
+ Check `git status`. If there are uncommitted changes:
7
+ - Stage and commit with a clear message
8
+ - Run `merlin_run_verification` before committing
6
9
 
7
- 2. **Uncommitted Work**: Are there uncommitted changes that should be saved? If so, suggest committing before stopping.
10
+ ## 2. Save Checkpoint
11
+ Call `merlin_save_checkpoint` with:
12
+ - What was accomplished this session
13
+ - What's left to do
14
+ - Any blockers or decisions made
15
+ This lets the next session (or another agent) pick up exactly where you left off.
8
16
 
9
- 3. **Checkpoint**: Has a Merlin checkpoint been saved for this session? If significant work was done, save one with merlin_save_checkpoint.
17
+ ## 3. Session Summary
18
+ Show the user a brief summary:
19
+ ```
20
+ Merlin | Session Complete
21
+ - [X] files changed
22
+ - [Y] Sights queries made
23
+ - [Z] tasks completed
24
+ - Checkpoint saved: [yes/no]
25
+ ```
10
26
 
11
- 4. **Verification**: If code was written, were basic checks run (build, types, lint)? If not, run merlin_run_verification first.
27
+ ## 4. Next Steps
28
+ Always end with what should happen next:
29
+ ```
30
+ Next session:
31
+ [1] Continue with [next task]
32
+ [2] Review what was built
33
+ [3] [other relevant option]
34
+ ```
12
35
 
13
- If all checks pass, respond with "STOP_APPROVED".
14
- If any check fails, explain what should be done first before stopping.
36
+ Do NOT stop without saving checkpoint. The user trusts Merlin to maintain continuity across sessions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-merlin-brain",
3
- "version": "3.4.2",
3
+ "version": "3.4.3",
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",