@mu-crew/mu 3.2.1 → 3.4.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.
Files changed (60) hide show
  1. package/AGENTS.md +10 -5
  2. package/README.md +83 -22
  3. package/dist/cli.js +294 -98
  4. package/dist/cli.js.map +1 -1
  5. package/dist/extension/mu-pi.js +346 -85
  6. package/dist/extension/mu-pi.js.map +1 -1
  7. package/dist/index.d.ts +68 -13
  8. package/dist/index.js +159 -71
  9. package/dist/index.js.map +1 -1
  10. package/docs/ARCHITECTURE.md +1 -0
  11. package/docs/VISION.md +3 -1
  12. package/docs/VOCABULARY.md +6 -1
  13. package/docs/architecture/control-socket.md +17 -3
  14. package/docs/architecture/dag.md +3 -3
  15. package/docs/architecture/mux.md +3 -4
  16. package/docs/guide/README.md +5 -0
  17. package/docs/guide/delegate.md +30 -3
  18. package/docs/guide/dispatch.md +11 -4
  19. package/docs/guide/getting-started.md +3 -0
  20. package/docs/guide/recovery.md +3 -1
  21. package/docs/guide/remote.md +1 -1
  22. package/docs/history/CHANGELOG-pre-3.md +1 -1
  23. package/docs/reference/env.md +2 -1
  24. package/docs/reference/naming.md +18 -0
  25. package/docs/specs/2026-09-29-task-substates.md +1 -1
  26. package/docs/specs/2026-10-03-keep-driving-nudge.md +142 -0
  27. package/package.json +2 -1
  28. package/prompts/mu-debug.md +8 -0
  29. package/prompts/mu-refute.md +8 -0
  30. package/prompts/mu-research.md +8 -0
  31. package/prompts/mu-review.md +8 -0
  32. package/prompts/mu-rules-audit.md +8 -0
  33. package/prompts/mu-sweep.md +8 -0
  34. package/prompts/mu-tournament.md +9 -0
  35. package/prompts/mu-until.md +8 -0
  36. package/prompts/ultrathink.md +10 -0
  37. package/skills/mu/SKILL.md +124 -145
  38. package/skills/mu/recipes/adversarial-review.md +91 -0
  39. package/skills/mu/recipes/backlog-triage.md +43 -0
  40. package/skills/mu/recipes/brief.md +53 -0
  41. package/skills/mu/recipes/codemode-driver.md +102 -0
  42. package/skills/mu/recipes/deep-research.md +67 -0
  43. package/skills/mu/recipes/fan-out.md +40 -0
  44. package/skills/mu/recipes/findings.md +103 -0
  45. package/skills/mu/recipes/hypothesis-panel.md +45 -0
  46. package/skills/mu/recipes/long-run.md +20 -0
  47. package/skills/mu/recipes/loop-until-done.md +42 -0
  48. package/skills/mu/recipes/orchestrator-loop.md +98 -0
  49. package/skills/mu/recipes/plan.md +59 -0
  50. package/skills/mu/recipes/recovery.md +28 -0
  51. package/skills/mu/recipes/refute.md +51 -0
  52. package/skills/mu/{REMOTE_WORKERS.md → recipes/remote-workers.md} +7 -2
  53. package/skills/mu/recipes/review-panel.md +62 -0
  54. package/skills/mu/recipes/rules-audit.md +83 -0
  55. package/skills/mu/recipes/tasks-or-calls.md +67 -0
  56. package/skills/mu/recipes/tournament.md +40 -0
  57. package/skills/mu/recipes/ultrathink.md +82 -0
  58. package/skills/mu/recipes/watcher.md +19 -0
  59. package/skills/mu/recipes/waves.md +20 -0
  60. package/skills/mu/recipes/worker.md +26 -0
package/AGENTS.md CHANGED
@@ -169,7 +169,7 @@ is one atomic call. Keep the tmux workaround out of herdr.
169
169
 
170
170
  ## Orchestrating on this repo
171
171
 
172
- Follow the loop in [skills/mu/SKILL.md](skills/mu/SKILL.md). Repo specifics:
172
+ Follow [skills/mu/recipes/orchestrator-loop.md](skills/mu/recipes/orchestrator-loop.md). Repo specifics:
173
173
 
174
174
  - Each workspace runs `npm install` into its own `node_modules`. Never
175
175
  symlink main's.
@@ -188,15 +188,20 @@ Follow the loop in [skills/mu/SKILL.md](skills/mu/SKILL.md). Repo specifics:
188
188
  ## Skill files are context, not documentation
189
189
 
190
190
  `skills/mu/SKILL.md` loads into every orchestrator's context, and
191
- `skills/mu/REMOTE_WORKERS.md` on demand. Every word competes with the
192
- user's work. Read the `writing-for-agents` skill before you edit
193
- either one.
191
+ the recipes in `skills/mu/recipes/` on demand. Every word competes with the
192
+ user's work. The recipes are written for an agent with no context;
193
+ [recipes/brief.md](skills/mu/recipes/brief.md) holds the rules, and
194
+ they apply to the skill files too.
194
195
 
195
196
  - Leave verb lists, flags, and option tables to `--help`. The skill
196
197
  carries only what `--help` cannot: the gotcha, the reason, the trap.
197
198
  - Say each thing once, next to where it applies.
198
199
  - SKILL.md holds the trigger and the rule. Detail that only some
199
- branches need goes in REMOTE_WORKERS.md.
200
+ branches need goes in a recipe under `skills/mu/recipes/`, with a
201
+ row in SKILL.md's recipe index. Recipes reference only mu, never
202
+ skills outside this repo.
203
+ - `docs/guide/` pages stay terse for humans and link to the recipe
204
+ instead of restating it.
200
205
  - Delete sentences the model obeys by default. State the target
201
206
  behaviour.
202
207
 
package/README.md CHANGED
@@ -20,9 +20,9 @@ in-progress, and blocked tasks, the log tail, workspaces, and doctor.*
20
20
  socket inside each agent, so send, state, wait, and abort are exact,
21
21
  locally and over ssh. The pane stays pi's normal TUI.
22
22
 
23
- mu persists state and coordinates handoffs. It does not choose models,
24
- run your tests, or pass messages between agents. Every read path has
25
- `--json`, and every change goes through a typed CLI verb.
23
+ mu persists state and coordinates handoffs. Every read path has
24
+ `--json`, and every change goes through a typed CLI verb. See
25
+ [What mu is not](#what-mu-is-not).
26
26
 
27
27
  ## Install
28
28
 
@@ -71,23 +71,83 @@ For one helper, ask pi to delegate (`mu_delegate` ships with `mu link
71
71
  pi`), or spawn into the reserved `scratch` workstream:
72
72
  `mu agent spawn scout-1 -w scratch`.
73
73
 
74
- ## mu delegates vs hidden subagents
75
-
76
- Claude Code, Codex, and pi-subagents delegate to a hidden child process
77
- and return only its result. A mu delegate is an ordinary agent in a
78
- pane.
79
-
80
- | | Hidden subagent | mu delegate |
81
- | ----------------------- | ------------------------ | ----------- |
82
- | Visibility | none while it runs | a pane; attach and watch |
83
- | Steer mid-run | no | `mu agent send`; stop with `mu agent abort` |
84
- | Keep talking after it answers | no | yes, with `keep: true` |
85
- | Transcript | collapses into a result | a normal pi session log |
86
- | If the work grows | re-brief a new agent | same task DAG and workspaces |
87
- | Cost | light | one pane and one pi process |
88
-
89
- For many tiny calls, a hidden subagent is lighter. mu bets that seeing
90
- and steering agent work is worth a pane.
74
+ ## Ultrathink, the mu way
75
+
76
+ Long agent runs fail in two ways: the agent stops at 35 of 50 items and
77
+ calls it done, and it grades its own work generously. The fix is to
78
+ take the plan out of the agent's head, fan the work out to fresh
79
+ agents, and have other agents try to refute each result before it
80
+ counts. Claude Code's ultracode does this with a hidden script. mu does
81
+ it in the open:
82
+
83
+ - **The plan is the DAG.** Every unit, review gate, finding and round
84
+ is a task before an agent spawns. `mu state` shows 35 of 50 done, so
85
+ nobody can declare victory early.
86
+ - **Findings are tasks.** A reviewer records each problem as a task in
87
+ triage ([findings](skills/mu/recipes/findings.md)), and it blocks the
88
+ review until someone accepts it as work or closes it rejected or
89
+ duplicate. The graph holds the whole review.
90
+ - **Checks are calls.** Refuters, claim checkers and judges are
91
+ [delegate calls](skills/mu/recipes/tasks-or-calls.md): fresh agents,
92
+ ideally on another model, whose verdicts land on the task they
93
+ judged. A 50-unit run adds about 50 units, 50 review gates and the
94
+ findings that survive, not a task per check.
95
+ - **Every agent is a pane.** Attach to any worker, reviewer, or judge
96
+ mid-run and steer it.
97
+ - **Nothing lives only in a context window.** Verdicts, evidence, and
98
+ stop rules are task notes. The run survives compaction, crashes, and
99
+ a new orchestrator.
100
+
101
+ Not every review needs a record. Reviewing someone's PR or a doc runs
102
+ as delegates only: findings come back in their answers, and nothing
103
+ lands in the ops log.
104
+
105
+ Ask your orchestrator to *ultrathink* a job, and it follows
106
+ [skills/mu/recipes/ultrathink.md](skills/mu/recipes/ultrathink.md).
107
+ That recipe composes smaller ones you can also use on their own:
108
+
109
+ | Recipe | Shape |
110
+ | ------ | ----- |
111
+ | [fan-out](skills/mu/recipes/fan-out.md) | one task per unit, merged as each closes |
112
+ | [adversarial-review](skills/mu/recipes/adversarial-review.md) | a review gate per unit: a fresh agent tries to reject it before it ships |
113
+ | [refute](skills/mu/recipes/refute.md) | finders record findings, one refuter call per finding, report from the graph |
114
+ | [hypothesis-panel](skills/mu/recipes/hypothesis-panel.md) | independent theories from separate evidence, each attacked |
115
+ | [tournament](skills/mu/recipes/tournament.md) | competing attempts, judged in pairs |
116
+ | [loop-until-done](skills/mu/recipes/loop-until-done.md) | rounds until a stop rule written up front holds |
117
+ | [backlog-triage](skills/mu/recipes/backlog-triage.md) | quarantined readers classify, a trusted actor acts |
118
+ | [deep-research](skills/mu/recipes/deep-research.md) | searchers by angle, one checker per claim, a cited report |
119
+ | [review-panel](skills/mu/recipes/review-panel.md) | one reviewer per angle on a diff; delegates by default, tasks when fixes follow |
120
+ | [rules-audit](skills/mu/recipes/rules-audit.md) | one checker per AGENTS.md rule plus a skeptic; or mine repeated corrections into new rules |
121
+
122
+ In pi, `mu link pi` adds them as commands: `/ultrathink <job>`,
123
+ `/mu-research <question>`, `/mu-review [target]`, `/mu-refute <scope>`,
124
+ `/mu-tournament <task>`, `/mu-rules-audit [check <target> | mine]`,
125
+ `/mu-debug <symptom>`, `/mu-sweep <change>`, and `/mu-until <stop rule>`.
126
+
127
+ All recipes, including the orchestrator loop and remote workers, are
128
+ in [skills/mu/recipes/](skills/mu/recipes/).
129
+
130
+ ## What mu is not
131
+
132
+ - **Not a hidden subagent.** Every agent, including a one-off
133
+ `mu_delegate` helper, is an ordinary agent in a pane: attach, steer,
134
+ abort, or keep talking to it. That costs a pane and a pi process per
135
+ agent; for many tiny calls a hidden subagent is lighter. See
136
+ [the comparison](docs/guide/delegate.md#delegates-vs-hidden-subagents).
137
+ - **Not a workflow engine.** No DSL, no hidden plan, no script runner.
138
+ The plan is the task DAG; recipes are instructions an agent follows,
139
+ and every step is a CLI verb.
140
+ - **Not a model router.** mu does not pick models, thinking levels, or
141
+ tools. Pass them in the spawn command (`--cli pi_big`).
142
+ - **Not a chat bus.** Agents coordinate through task notes, claims, and
143
+ the ops log, not messages to each other.
144
+ - **Not a daemon or a service.** No background process, config file, web
145
+ UI, or RPC. State is one SQLite file; sync rides on ordinary commands.
146
+ - **Not a test runner or a judge.** `--evidence` records what an agent
147
+ observed; checking it is the orchestrator's job, and the recipes say how.
148
+
149
+ The full list, with reasons: [VISION § What it is not](docs/VISION.md#what-it-is-not)
150
+ and [ROADMAP § Anti-feature pledges](docs/ROADMAP.md#anti-feature-pledges).
91
151
 
92
152
  ## Documentation
93
153
 
@@ -96,8 +156,9 @@ and steering agent work is worth a pane.
96
156
  - [User guide](docs/guide/README.md): how-tos for dispatch, remote
97
157
  workers, sync, recovery, and the dashboard.
98
158
  - [skills/mu/SKILL.md](skills/mu/SKILL.md): what an orchestrating
99
- agent reads. [REMOTE_WORKERS.md](skills/mu/REMOTE_WORKERS.md) covers
100
- agents on other machines.
159
+ agent reads. [skills/mu/recipes/](skills/mu/recipes/) holds the
160
+ recipes it points to, such as
161
+ [remote workers](skills/mu/recipes/remote-workers.md).
101
162
  - [ARCHITECTURE.md](docs/ARCHITECTURE.md) and
102
163
  [docs/architecture/](docs/architecture/): the module map and deep
103
164
  dives.