@mu-crew/mu 3.13.2 → 4.0.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/AGENTS.md +73 -35
- package/README.md +71 -57
- package/dist/chunk-5HECDBK3.js +4482 -0
- package/dist/chunk-5HECDBK3.js.map +1 -0
- package/dist/chunk-AW2NONYU.js +301 -0
- package/dist/chunk-AW2NONYU.js.map +1 -0
- package/dist/chunk-GQNHIPJN.js +4060 -0
- package/dist/chunk-GQNHIPJN.js.map +1 -0
- package/dist/{chunk-3BARPJLY.js → chunk-PZ5GOCWH.js} +16 -2
- package/dist/chunk-PZ5GOCWH.js.map +1 -0
- package/dist/chunk-S424D5EP.js +13766 -0
- package/dist/chunk-S424D5EP.js.map +1 -0
- package/dist/{cli-CKOMHBXV.js → cli-GB2CAVVW.js} +6776 -4350
- package/dist/cli-GB2CAVVW.js.map +1 -0
- package/dist/cli.js +2 -3
- package/dist/cli.js.map +1 -1
- package/dist/errors-KHOYKD7D.js +65 -0
- package/dist/extension/mu-pi.js +1617 -836
- package/dist/extension/mu-pi.js.map +1 -1
- package/dist/index.d.ts +4015 -2561
- package/dist/index.js +614 -297
- package/dist/index.js.map +1 -1
- package/dist/tui-ALPHYTA2.js +1773 -0
- package/dist/tui-ALPHYTA2.js.map +1 -0
- package/docs/ARCHITECTURE.md +117 -66
- package/docs/VOCABULARY.md +112 -49
- package/docs/guide/README.md +3 -3
- package/docs/guide/backends.md +8 -4
- package/docs/guide/cleanup.md +61 -33
- package/docs/guide/delegate.md +141 -66
- package/docs/guide/dispatch.md +148 -53
- package/docs/guide/getting-started.md +37 -44
- package/docs/guide/other-agent-clis.md +102 -0
- package/docs/guide/recovery.md +31 -50
- package/docs/guide/remote.md +115 -45
- package/docs/guide/sql.md +104 -24
- package/docs/guide/stop-a-worker.md +30 -37
- package/docs/guide/sync.md +11 -3
- package/docs/guide/upgrade.md +93 -43
- package/docs/reference/env.md +23 -32
- package/docs/reference/naming.md +12 -7
- package/docs/reference/surface-contract.md +153 -0
- package/package.json +33 -11
- package/prompts/mu-debug.md +3 -1
- package/prompts/mu-refute.md +2 -1
- package/prompts/mu-research.md +3 -1
- package/prompts/mu-review.md +2 -1
- package/prompts/mu-rules-audit.md +5 -4
- package/prompts/mu-sweep.md +2 -1
- package/prompts/mu-tournament.md +4 -2
- package/prompts/mu-until.md +3 -1
- package/prompts/ultrathink.md +1 -1
- package/skills/mu/SKILL.md +60 -291
- package/skills/mu/recipes/adversarial-review.md +12 -103
- package/skills/mu/recipes/brief.md +14 -61
- package/skills/mu/recipes/course-correct.md +23 -0
- package/skills/mu/recipes/findings.md +17 -111
- package/skills/mu/recipes/models.md +17 -92
- package/skills/mu/recipes/move.md +14 -0
- package/skills/mu/recipes/orchestrator-loop.md +20 -119
- package/skills/mu/recipes/recovery.md +8 -29
- package/skills/mu/recipes/remote-workers.md +16 -318
- package/skills/mu/recipes/tasks-or-calls.md +15 -78
- package/skills/mu/recipes/test-health.md +19 -69
- package/skills/mu/recipes/worker.md +17 -24
- package/dist/chunk-45KQLMEL.js +0 -2908
- package/dist/chunk-45KQLMEL.js.map +0 -1
- package/dist/chunk-G434JKV2.js +0 -641
- package/dist/chunk-G434JKV2.js.map +0 -1
- package/dist/chunk-KUGUFBWH.js +0 -12527
- package/dist/chunk-KUGUFBWH.js.map +0 -1
- package/dist/chunk-QITLNZEM.js +0 -87
- package/dist/chunk-QITLNZEM.js.map +0 -1
- package/dist/chunk-VIEYQMQA.js +0 -393
- package/dist/chunk-VIEYQMQA.js.map +0 -1
- package/dist/chunk-WI6AWCMK.js +0 -19
- package/dist/chunk-WI6AWCMK.js.map +0 -1
- package/dist/cli-CKOMHBXV.js.map +0 -1
- package/dist/devtools-LS4ZEPWM.js +0 -3772
- package/dist/devtools-LS4ZEPWM.js.map +0 -1
- package/dist/tui-LFJ5P4Y2.js +0 -40956
- package/dist/tui-LFJ5P4Y2.js.map +0 -1
- package/dist/tui-sync-worker.js +0 -17
- package/dist/tui-sync-worker.js.map +0 -1
- package/dist/yank-XDOONQSL.js +0 -13
- package/dist/yank-XDOONQSL.js.map +0 -1
- package/docs/ROADMAP.md +0 -123
- package/docs/VISION.md +0 -298
- package/docs/architecture/control-socket.md +0 -142
- package/docs/architecture/dag.md +0 -117
- package/docs/architecture/mux.md +0 -167
- package/docs/architecture/ops-log.md +0 -160
- package/docs/architecture/sdk.md +0 -187
- package/docs/architecture/sync.md +0 -159
- package/docs/architecture/tui.md +0 -165
- package/docs/guide/tui.md +0 -98
- package/docs/history/CHANGELOG-pre-3.md +0 -4866
- package/docs/img/tui-dashboard.png +0 -0
- package/docs/specs/2026-09-28-agent-state-from-murmur.md +0 -333
- package/docs/specs/2026-09-29-task-substates.md +0 -247
- package/docs/specs/2026-10-03-keep-driving-nudge.md +0 -163
- package/docs/specs/2026-10-21-fast-and-slow-gates.md +0 -229
- package/skills/mu/recipes/backlog-triage.md +0 -45
- package/skills/mu/recipes/codemode-driver.md +0 -118
- package/skills/mu/recipes/deep-research.md +0 -69
- package/skills/mu/recipes/drift-audit.md +0 -75
- package/skills/mu/recipes/fan-out.md +0 -42
- package/skills/mu/recipes/hypothesis-panel.md +0 -48
- package/skills/mu/recipes/long-run.md +0 -32
- package/skills/mu/recipes/loop-until-done.md +0 -45
- package/skills/mu/recipes/plan.md +0 -67
- package/skills/mu/recipes/refute.md +0 -55
- package/skills/mu/recipes/review-panel.md +0 -65
- package/skills/mu/recipes/rules-audit.md +0 -89
- package/skills/mu/recipes/tournament.md +0 -44
- package/skills/mu/recipes/ultrathink.md +0 -86
- package/skills/mu/recipes/watcher.md +0 -28
- package/skills/mu/recipes/waves.md +0 -21
- /package/dist/{chunk-3BARPJLY.js.map → errors-KHOYKD7D.js.map} +0 -0
package/AGENTS.md
CHANGED
|
@@ -5,16 +5,16 @@ panes, coordinated through a task DAG.
|
|
|
5
5
|
|
|
6
6
|
## Read these first
|
|
7
7
|
|
|
8
|
-
1. [docs/guide/README.md](docs/guide/README.md)
|
|
9
|
-
2. [CHANGELOG.md](CHANGELOG.md)
|
|
8
|
+
1. [docs/guide/README.md](docs/guide/README.md): what mu does for a user.
|
|
9
|
+
2. [CHANGELOG.md](CHANGELOG.md): the upcoming version's entry is the
|
|
10
10
|
source of truth for verbs, schema, and env vars.
|
|
11
|
-
3. [docs/VISION.md](docs/VISION.md)
|
|
12
|
-
4. [docs/ROADMAP.md](docs/ROADMAP.md)
|
|
11
|
+
3. [docs/VISION.md](docs/VISION.md): design pillars you must not violate.
|
|
12
|
+
4. [docs/ROADMAP.md](docs/ROADMAP.md): what's next and the promotion
|
|
13
13
|
criteria. Read [Anti-feature pledges](docs/ROADMAP.md#anti-feature-pledges)
|
|
14
14
|
before you add a dependency, an abstraction, or a surface.
|
|
15
|
-
5. [docs/VOCABULARY.md](docs/VOCABULARY.md)
|
|
15
|
+
5. [docs/VOCABULARY.md](docs/VOCABULARY.md): canonical terms for code,
|
|
16
16
|
docs, and error messages. [docs/reference/](docs/reference/) holds env vars and naming.
|
|
17
|
-
6. [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)
|
|
17
|
+
6. [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md): the module map (what
|
|
18
18
|
lives where in `src/`), plus deep dives under [docs/architecture/](docs/architecture/).
|
|
19
19
|
|
|
20
20
|
## Build, test, lint
|
|
@@ -33,6 +33,29 @@ npm run test:stress # pre-release stability gate
|
|
|
33
33
|
aliased to 6.x on purpose: `tsup --dts` needs the programmatic API that
|
|
34
34
|
TS 7.0 lacks. Revisit at TS 7.1.
|
|
35
35
|
|
|
36
|
+
## Gates
|
|
37
|
+
|
|
38
|
+
Measured 2026-10-23 on linuxpc (16 cores, warm cache, shared host);
|
|
39
|
+
see [the record](docs/test-health/2026-10-23-surface.md). Both gates are
|
|
40
|
+
over budget today.
|
|
41
|
+
|
|
42
|
+
| Gate | Command | Budget | Today |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| fast | `npm run typecheck && npm run lint && npm run test:fast` | 30 s | ~50 s |
|
|
45
|
+
| slow | `npm run build && npm run test` | 5 min | 4.5 to 8.5 min |
|
|
46
|
+
| targeted slow | `npm run build && npx vitest run <files>` | — | — |
|
|
47
|
+
|
|
48
|
+
The "Today" column is stale: on a shared box the RC measured fast 22–39 s
|
|
49
|
+
(4850 tests) and slow 307–486 s (5835 tests), over budget. Re-measure on an
|
|
50
|
+
idle host before the release and rewrite the column.
|
|
51
|
+
|
|
52
|
+
Workers run fast while iterating, then targeted slow for the changed area,
|
|
53
|
+
and fast on the final commit. The orchestrator runs fast + slow once per
|
|
54
|
+
merged batch (`npm run test` excludes lint and typecheck). Record gates per
|
|
55
|
+
[test-health](skills/mu/recipes/test-health.md#gate-contract).
|
|
56
|
+
`test/spawn-parallel-race.integration.test.ts` needs `dist/`, hence build
|
|
57
|
+
first.
|
|
58
|
+
|
|
36
59
|
## Code style
|
|
37
60
|
|
|
38
61
|
- Strict TypeScript with `noUncheckedIndexedAccess`, ESM only. Use
|
|
@@ -58,8 +81,8 @@ TS 7.0 lacks. Revisit at TS 7.1.
|
|
|
58
81
|
- The fast tier (`*.test.ts`) stays in-process: mocked tmux and VCS,
|
|
59
82
|
per-test temp DBs, no real tmux/git/jj/sl, no sleeps over 50ms.
|
|
60
83
|
- Name full-only tests `*.integration.test.ts`. They may use real
|
|
61
|
-
tmux, herdr, VCS fixtures, or subprocesses. Real-tmux tests
|
|
62
|
-
|
|
84
|
+
tmux, herdr, VCS fixtures, or subprocesses. Real-tmux tests run on the
|
|
85
|
+
private socket and need no `$TMUX`. Set `process.env.MU_SPAWN_LIVENESS_MS = "0"` in
|
|
63
86
|
`beforeEach` when the spawned process is meant to live long.
|
|
64
87
|
- Integration tests use unique session names
|
|
65
88
|
(`mu-test-<pid>-<ts>-<rand>`), poll (50ms × 10) instead of sleeping,
|
|
@@ -71,12 +94,19 @@ TS 7.0 lacks. Revisit at TS 7.1.
|
|
|
71
94
|
close only what you created.
|
|
72
95
|
- `openDb()` refuses the real DB under vitest. Use `MU_DB_PATH` or
|
|
73
96
|
`{ path }`.
|
|
97
|
+
- In tests, `openDb` on a new path copies a template DB built once per
|
|
98
|
+
run (`test/_db-template.ts`). A test that pins fresh-file behaviour
|
|
99
|
+
(the DDL, a refusal leaving the file empty) calls
|
|
100
|
+
`vi.unmock("../src/db.js")`.
|
|
74
101
|
- `test/_setup.ts` clears inherited `MU_*` vars except
|
|
75
102
|
`MU_TMUX_SOCKET`. Opt in per test with `withEnv()` from `test/_env.ts`.
|
|
76
|
-
- `test/_global-teardown.ts`
|
|
77
|
-
|
|
103
|
+
- Tests use temp DBs. `test/_global-teardown.ts` only reads the real DB
|
|
104
|
+
to decide which sessions to sweep: it kills every `mu-*` tmux session
|
|
105
|
+
on the default socket that has no workstream there, and skips the
|
|
78
106
|
sweep when that DB is missing or unreadable.
|
|
79
|
-
- Workers run
|
|
107
|
+
- Workers run fast while iterating and slow for their changed area (see
|
|
108
|
+
[Gates](#gates)); the orchestrator runs fast + slow once per
|
|
109
|
+
merged batch. Tests may run concurrently across workers. A test that fails
|
|
80
110
|
under load but passes alone is a test-infra concurrency bug (shared
|
|
81
111
|
`/tmp`, sockets, leaked subprocesses). One that also fails alone is a
|
|
82
112
|
real bug.
|
|
@@ -122,14 +152,20 @@ TS 7.0 lacks. Revisit at TS 7.1.
|
|
|
122
152
|
|
|
123
153
|
### Update the schema
|
|
124
154
|
|
|
125
|
-
The schema is
|
|
126
|
-
`
|
|
127
|
-
|
|
128
|
-
|
|
155
|
+
The schema is v13 (`CURRENT_SCHEMA_VERSION` in `src/db.ts`). `openDb`
|
|
156
|
+
runs `upgradeSchema(db)`: the idempotent CREATE-IF-NOT-EXISTS DDL, any
|
|
157
|
+
missing `ADDED_COLUMNS`, the schema stamp, and the capture triggers with
|
|
158
|
+
their stamp, in ONE transaction. It accepts only v13 (no ladder; a v13
|
|
159
|
+
file missing a later addition is completed) and refuses older DBs
|
|
160
|
+
(`SchemaTooOldError`) and newer ones (`SchemaTooNewError`), both exit 4.
|
|
129
161
|
|
|
130
162
|
1. Bump `CURRENT_SCHEMA_VERSION` and mirror the shape in
|
|
131
|
-
`CURRENT_SCHEMA`.
|
|
132
|
-
|
|
163
|
+
`CURRENT_SCHEMA`. A column an existing DB lacks also goes in
|
|
164
|
+
`ADDED_COLUMNS` (plain nullable or defaulted: SQLite adds nothing else
|
|
165
|
+
in place). Changing `CAPTURED_COLUMNS` or a trigger generator means
|
|
166
|
+
bumping `CAPTURE_VERSION` and the pinned checksum in
|
|
167
|
+
`test/capture-persistent.test.ts`. Test the upgrade on a populated
|
|
168
|
+
file (`test/fixtures/v13-populated.db.gz`, `test/loop-storage.test.ts`).
|
|
133
169
|
2. Classify every new table in `PORTABLE_TABLES` or
|
|
134
170
|
`MACHINE_LOCAL_TABLES`. `test/entities.test.ts` fails otherwise.
|
|
135
171
|
3. Update `test/db.test.ts` and CHANGELOG `### Changed`.
|
|
@@ -150,9 +186,9 @@ Call sites use `await activeMux()` and never name a backend.
|
|
|
150
186
|
|
|
151
187
|
Run tmux only through `tmux(args)` and herdr only through
|
|
152
188
|
`herdr(args)`. pi agents are driven through the control socket, not
|
|
153
|
-
the multiplexer.
|
|
154
|
-
|
|
155
|
-
is one atomic call.
|
|
189
|
+
the multiplexer. tmux refuses a send to a non-pi agent
|
|
190
|
+
(`AgentSendUnsupportedError`; it has no `sendToPane`), while herdr's
|
|
191
|
+
`agent prompt` is one atomic call.
|
|
156
192
|
|
|
157
193
|
## Known traps
|
|
158
194
|
|
|
@@ -160,29 +196,24 @@ is one atomic call. Keep the tmux workaround out of herdr.
|
|
|
160
196
|
top-level await" is an import cycle: a file in `src/cli/tui/`
|
|
161
197
|
imported `../../../cli.js`. Import from the real source module
|
|
162
198
|
instead (`rg 'from "\.\./\.\./\.\./cli\.js"' src/cli/tui/`).
|
|
163
|
-
- **ANSI in ink `<Text>`** breaks wrap math.
|
|
164
|
-
with `src/cli/tui/
|
|
165
|
-
|
|
166
|
-
replayed. Consume it once, as `src/cli/tui/use-popup-action-queue.ts`
|
|
167
|
-
does.
|
|
168
|
-
- **A hint for one popup** goes in its `hint` prop, not the global
|
|
169
|
-
`POPUP_DRILL_HINTS`.
|
|
199
|
+
- **ANSI in ink `<Text>`** breaks wrap math. Size and cut styled lines
|
|
200
|
+
by visual width with `fitLine` in `src/cli/tui/text.ts`, and keep
|
|
201
|
+
frame lines exactly the box width (`frame.tsx`).
|
|
170
202
|
|
|
171
203
|
## Orchestrating on this repo
|
|
172
204
|
|
|
173
205
|
Follow [skills/mu/recipes/orchestrator-loop.md](skills/mu/recipes/orchestrator-loop.md). Repo specifics:
|
|
174
206
|
|
|
175
|
-
- Each
|
|
207
|
+
- Each worktree runs `npm install` into its own `node_modules`. Never
|
|
176
208
|
symlink main's.
|
|
177
|
-
-
|
|
178
|
-
|
|
179
|
-
only the new shas.
|
|
209
|
+
- A worker may fork from an old HEAD. Check `git log` in its worktree
|
|
210
|
+
and cherry-pick only the new shas.
|
|
180
211
|
- CHANGELOG.md conflicts are routine: keep both halves in order.
|
|
181
212
|
Resolve source conflicts by hand, never with `--ours` or `--theirs`.
|
|
182
213
|
- Fix a worker's bug in a separate commit after the cherry-pick. Do
|
|
183
214
|
not amend it.
|
|
184
|
-
- Gate the merged tree with the
|
|
185
|
-
`node dist/cli.js --help`.
|
|
215
|
+
- Gate the merged tree with the fast gate and the slow gate (see
|
|
216
|
+
[Gates](#gates)) plus `node dist/cli.js --help`.
|
|
186
217
|
- The installed `mu` may be older than the branch build. Confirm a
|
|
187
218
|
worker received its brief (`mu agent read <w> -n 3`).
|
|
188
219
|
|
|
@@ -221,14 +252,21 @@ documenting" is not a reason.
|
|
|
221
252
|
- No render layer beyond `cli-table3` + `picocolors`, except `ink`
|
|
222
253
|
inside `src/cli/tui/`. Never a second TUI stack.
|
|
223
254
|
- Don't bundle pi. It is an optional peer dependency.
|
|
224
|
-
- Write files only under `~/.local/state/mu/`, `~/.cache/mu/`, or the
|
|
255
|
+
- Write files only under `~/.local/state/mu-next/`, `~/.cache/mu/`, or the
|
|
225
256
|
repo. The cache dir holds only files mu can lose at any time.
|
|
226
257
|
|
|
227
258
|
## When you're done
|
|
228
259
|
|
|
260
|
+
Run the fast gate, then the slow gate for your changed area (see
|
|
261
|
+
[Gates](#gates)):
|
|
262
|
+
|
|
229
263
|
```bash
|
|
230
|
-
npm run typecheck && npm run lint && npm run test:fast
|
|
264
|
+
npm run typecheck && npm run lint && npm run test:fast
|
|
265
|
+
npm run build && npx vitest run <files>
|
|
231
266
|
```
|
|
232
267
|
|
|
268
|
+
The orchestrator runs the fast gate and `npm run build && npm run test` on
|
|
269
|
+
each merged batch.
|
|
270
|
+
|
|
233
271
|
Then check that VOCABULARY, ARCHITECTURE, and CHANGELOG reflect the
|
|
234
272
|
change.
|
package/README.md
CHANGED
|
@@ -2,76 +2,91 @@
|
|
|
2
2
|
|
|
3
3
|
**A small control plane for a crew of AI coding agents working in
|
|
4
4
|
parallel.** Agents run in multiplexer panes you can attach to. Work is a
|
|
5
|
-
task DAG in SQLite. Each agent gets its own
|
|
5
|
+
task DAG in SQLite. Each agent gets its own git worktree.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*Bare `mu` opens a read-only dashboard: agents, tracks, ready,
|
|
10
|
-
in-progress, and blocked tasks, the log tail, workspaces, and doctor.*
|
|
11
|
-
|
|
12
|
-
- **Parallel work that does not collide.** Per-agent workspaces (jj
|
|
13
|
-
workspaces, sl shares, or git worktrees) and a task DAG with
|
|
7
|
+
- **Parallel work that does not collide.** Per-agent git worktrees and a task DAG with
|
|
14
8
|
`blocks` edges keep agents out of each other's way.
|
|
15
9
|
- **State that outlives a pane.** One SQLite DB holds agents, tasks,
|
|
16
|
-
owners, notes, and
|
|
17
|
-
change, so `mu
|
|
10
|
+
owners, notes, and worktrees. An append-only ops log records every
|
|
11
|
+
change, so `mu log --group <group>` shows one action and `mu rebuild`
|
|
18
12
|
replays the whole history.
|
|
19
13
|
- **Exact control of pi agents.** mu's pi extension serves a control
|
|
20
14
|
socket inside each agent, so send, state, wait, and abort are exact,
|
|
21
15
|
locally and over ssh. The pane stays pi's normal TUI.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
- **One wait.** `mu wait` blocks until the first event you own (closed,
|
|
17
|
+
settled, needs you, dead, stalled) and prints one JSON result with a
|
|
18
|
+
`resume` command. In pi, the extension runs it for you, so an
|
|
19
|
+
orchestrator keeps driving until nothing is owed.
|
|
20
|
+
- **Delegates without a pane.** A `mu_delegate` call is a fresh-context
|
|
21
|
+
helper recorded as a task with a durable id. With no tmux or herdr it
|
|
22
|
+
runs as a child pi.
|
|
23
|
+
- **A capped skill.** One `mu` skill (under 600 words) and twelve short recipes,
|
|
24
|
+
checked by an eval matrix (`tools/eval`). `mu --help` holds the rest.
|
|
25
|
+
|
|
26
|
+
Every read path has `--json`, and every change goes through a typed CLI
|
|
27
|
+
verb. See [What mu is not](#what-mu-is-not).
|
|
28
|
+
|
|
29
|
+
**Status:** 4.0, a breaking rewrite for agent callers with its own DB. It
|
|
30
|
+
never imports a 3.x DB; open work moves one workstream at a time. Coming
|
|
31
|
+
from 3.x? Read [Upgrade from 3.x to 4.0](docs/guide/upgrade.md#upgrade-from-3x-to-40)
|
|
32
|
+
before you install.
|
|
26
33
|
|
|
27
34
|
## Install
|
|
28
35
|
|
|
29
36
|
```bash
|
|
30
37
|
npm i -g @mu-crew/mu
|
|
31
|
-
|
|
38
|
+
pi install npm:@mu-crew/mu # extension (control socket, mu_delegate), the mu skill, recipe prompts
|
|
32
39
|
mu doctor
|
|
33
40
|
```
|
|
34
41
|
|
|
35
|
-
To drive mu from another agent CLI (claude-code, codex),
|
|
36
|
-
skill with `npx skills add mu-crew/mu` instead of
|
|
42
|
+
To drive mu from another agent CLI (claude-code, codex, cursor-agent),
|
|
43
|
+
install the skill with `npx skills add mu-crew/mu` instead of the pi
|
|
44
|
+
package. Read [Run mu with other agent CLIs](docs/guide/other-agent-clis.md)
|
|
45
|
+
first: pin which `mu` the harness runs, and see what works without pi.
|
|
37
46
|
|
|
38
47
|
You need:
|
|
39
48
|
|
|
40
49
|
- Node 22.12–26 (see `.nvmrc`).
|
|
41
|
-
- tmux ≥ 3.0 or [herdr](https://github.com/herdrdev/herdr)
|
|
42
|
-
reports which one is active.
|
|
50
|
+
- tmux ≥ 3.0 or [herdr](https://github.com/herdrdev/herdr) for agents.
|
|
51
|
+
`mu doctor` reports which one is active. Without either, task verbs
|
|
52
|
+
and pi's `mu_delegate` still work (a delegate runs as a child pi).
|
|
43
53
|
- pi, or another agent CLI.
|
|
44
|
-
-
|
|
54
|
+
- git on `PATH` for `--worktree`.
|
|
45
55
|
|
|
46
56
|
[murmur](https://github.com/mu-crew/murmur) is optional for pi agents.
|
|
47
57
|
Non-pi agents on tmux need it for state: without it their state is
|
|
48
|
-
`unknown`, so
|
|
58
|
+
`unknown`, so a wait never sees them finish and stall detection never fires.
|
|
49
59
|
On herdr, herdr reports state.
|
|
50
60
|
|
|
51
|
-
|
|
61
|
+
Updating, keeping 3.x runnable beside 4.0, and running from a checkout:
|
|
52
62
|
[How to upgrade mu](docs/guide/upgrade.md).
|
|
53
63
|
|
|
54
64
|
## Quick start
|
|
55
65
|
|
|
56
|
-
Run this inside tmux or herdr:
|
|
66
|
+
Run this inside tmux or herdr, in a git repository:
|
|
57
67
|
|
|
58
68
|
```bash
|
|
59
|
-
mu workstream init auth
|
|
60
|
-
|
|
61
|
-
mu task add
|
|
62
|
-
mu
|
|
63
|
-
mu
|
|
64
|
-
mu
|
|
65
|
-
mu
|
|
66
|
-
mu
|
|
67
|
-
mu # dashboard
|
|
68
|
-
mu workstream teardown --yes # without --yes: dry run
|
|
69
|
+
mu workstream init auth # every verb below names it with -w
|
|
70
|
+
mu task add design_auth -w auth --title "Design auth" --impact 80 --effort-days 2
|
|
71
|
+
mu task add build_auth -w auth --title "Build auth" --impact 80 --effort-days 5 --blocked-by design_auth
|
|
72
|
+
mu agent spawn worker-1 -w auth --worktree
|
|
73
|
+
mu task claim design_auth -w auth --for worker-1
|
|
74
|
+
mu agent send worker-1 -w auth --fresh 'Do task design_auth. Close it with evidence.'
|
|
75
|
+
mu wait task:design_auth -w auth # one JSON result; exit 7 = worker needs you
|
|
76
|
+
mu workstream teardown auth # preview (rev=<n>); apply with --if <n>
|
|
69
77
|
```
|
|
70
78
|
|
|
71
|
-
For one helper, ask pi to delegate (`mu_delegate` ships
|
|
72
|
-
|
|
79
|
+
For one helper, ask pi to delegate (`mu_delegate` ships in the pi
|
|
80
|
+
package), or spawn into the reserved `scratch` workstream:
|
|
73
81
|
`mu agent spawn scout-1 -w scratch`.
|
|
74
82
|
|
|
83
|
+
Run `mu` with no arguments for the read-only dashboard. It has five tabs
|
|
84
|
+
(Overview, Tasks, DAG, Agents, Log), with what needs a human on top: a
|
|
85
|
+
dead or stalled worker, one waiting on a permission or on input, a
|
|
86
|
+
`human-needed` task.
|
|
87
|
+
|
|
88
|
+

|
|
89
|
+
|
|
75
90
|
## Ultrathink, the mu way
|
|
76
91
|
|
|
77
92
|
Long agent runs fail in two ways: the agent stops at 35 of 50 items and
|
|
@@ -93,36 +108,34 @@ it in the open:
|
|
|
93
108
|
ideally on another model, whose verdicts land on the task they
|
|
94
109
|
judged. A 50-unit run adds about 50 units, 50 review gates and the
|
|
95
110
|
findings that survive, not a task per check.
|
|
96
|
-
- **Every agent is
|
|
97
|
-
mid-run and steer it.
|
|
111
|
+
- **Every agent is attachable.** Attach to any worker, reviewer, or judge
|
|
112
|
+
in its pane mid-run and steer it.
|
|
98
113
|
- **Nothing lives only in a context window.** Verdicts, evidence, and
|
|
99
114
|
stop rules are task notes. The run survives compaction, crashes, and
|
|
100
115
|
a new orchestrator.
|
|
101
116
|
|
|
102
117
|
Not every review needs a record. Reviewing someone's PR or a doc runs
|
|
103
118
|
as delegates only: findings come back in their answers, and nothing
|
|
104
|
-
|
|
119
|
+
enters your workstream's task graph. Each call is still a task in
|
|
120
|
+
`scratch` (its prompt and answer), which syncs like any task.
|
|
105
121
|
|
|
106
|
-
Ask your orchestrator to *ultrathink* a job, and it follows
|
|
107
|
-
[
|
|
108
|
-
|
|
122
|
+
Ask your orchestrator to *ultrathink* a job, and it follows the
|
|
123
|
+
[orchestrator loop](skills/mu/recipes/orchestrator-loop.md): every unit,
|
|
124
|
+
review and round is a task, and checks are calls. The recipes it composes
|
|
125
|
+
you can also use on their own:
|
|
109
126
|
|
|
110
127
|
| Recipe | Shape |
|
|
111
128
|
| ------ | ----- |
|
|
112
|
-
| [
|
|
129
|
+
| [orchestrator-loop](skills/mu/recipes/orchestrator-loop.md) | dispatch, wait, merge; also sweeps and loops until a stop rule holds |
|
|
113
130
|
| [adversarial-review](skills/mu/recipes/adversarial-review.md) | a review gate per unit: a fresh agent tries to reject it before it ships |
|
|
114
|
-
| [
|
|
115
|
-
| [
|
|
116
|
-
| [
|
|
117
|
-
| [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
| [review-panel](skills/mu/recipes/review-panel.md) | one reviewer per angle on a diff; delegates by default, tasks when fixes follow |
|
|
121
|
-
| [rules-audit](skills/mu/recipes/rules-audit.md) | one checker per AGENTS.md rule plus a skeptic; or mine repeated corrections into new rules |
|
|
122
|
-
|
|
123
|
-
In pi, `mu link pi` adds them as commands: `/ultrathink <job>`,
|
|
131
|
+
| [findings](skills/mu/recipes/findings.md) | reviewers record findings, one refuter call per finding, report from the graph |
|
|
132
|
+
| [tasks-or-calls](skills/mu/recipes/tasks-or-calls.md) | refuters, judges and checkers as delegate calls |
|
|
133
|
+
| [course-correct](skills/mu/recipes/course-correct.md) | a periodic look at whether a long job is on course |
|
|
134
|
+
| [move](skills/mu/recipes/move.md) | move a 3.x workstream into 4.0 |
|
|
135
|
+
|
|
136
|
+
In pi, the package adds them as commands: `/ultrathink <job>`,
|
|
124
137
|
`/mu-research <question>`, `/mu-review [target]`, `/mu-refute <scope>`,
|
|
125
|
-
`/mu-tournament <task>`, `/mu-rules-audit [
|
|
138
|
+
`/mu-tournament <task>`, `/mu-rules-audit [target]`,
|
|
126
139
|
`/mu-debug <symptom>`, `/mu-sweep <change>`, and `/mu-until <stop rule>`.
|
|
127
140
|
|
|
128
141
|
All recipes, including the orchestrator loop and remote workers, are
|
|
@@ -131,9 +144,10 @@ in [skills/mu/recipes/](skills/mu/recipes/).
|
|
|
131
144
|
## What mu is not
|
|
132
145
|
|
|
133
146
|
- **Not a hidden subagent.** Every agent, including a one-off
|
|
134
|
-
`mu_delegate` helper, is an ordinary agent
|
|
135
|
-
|
|
136
|
-
|
|
147
|
+
`mu_delegate` helper, is an ordinary agent you can steer, abort, or keep
|
|
148
|
+
talking to, in a pane you can attach to (with no tmux or herdr, a child
|
|
149
|
+
pi and a task record). That costs a pi process per agent; for many tiny
|
|
150
|
+
calls a hidden subagent is lighter. See
|
|
137
151
|
[the comparison](docs/guide/delegate.md#delegates-vs-hidden-subagents).
|
|
138
152
|
- **Not a workflow engine.** No DSL, no hidden plan, no script runner.
|
|
139
153
|
The plan is the task DAG; recipes are instructions an agent follows,
|
|
@@ -155,7 +169,7 @@ and [ROADMAP § Anti-feature pledges](docs/ROADMAP.md#anti-feature-pledges).
|
|
|
155
169
|
- [Getting started](docs/guide/getting-started.md): the first
|
|
156
170
|
workstream, end to end. Start here.
|
|
157
171
|
- [User guide](docs/guide/README.md): how-tos for dispatch, remote
|
|
158
|
-
workers, sync,
|
|
172
|
+
workers, sync, and recovery.
|
|
159
173
|
- [skills/mu/SKILL.md](skills/mu/SKILL.md): what an orchestrating
|
|
160
174
|
agent reads. [skills/mu/recipes/](skills/mu/recipes/) holds the
|
|
161
175
|
recipes it points to, such as
|