@mu-crew/mu 3.10.1 → 3.11.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 (46) hide show
  1. package/dist/{chunk-7OQNJWBY.js → chunk-2FJK6OOZ.js} +3 -3
  2. package/dist/{chunk-XXK7FR37.js → chunk-DXKJY3NT.js} +3 -3
  3. package/dist/{chunk-WT7IN2OD.js → chunk-JYZUNPPO.js} +44 -3
  4. package/dist/chunk-JYZUNPPO.js.map +1 -0
  5. package/dist/{chunk-YIF3X32A.js → chunk-WYBOR4FX.js} +2 -2
  6. package/dist/{chunk-YIF3X32A.js.map → chunk-WYBOR4FX.js.map} +1 -1
  7. package/dist/{cli-KJGVEZW5.js → cli-GRAPF5VC.js} +14 -9
  8. package/dist/cli-GRAPF5VC.js.map +1 -0
  9. package/dist/cli.js +1 -1
  10. package/dist/extension/mu-pi.js +2 -2
  11. package/dist/extension/mu-pi.js.map +1 -1
  12. package/dist/index.d.ts +22 -2
  13. package/dist/index.js +5 -3
  14. package/dist/{tui-X2XICJTN.js → tui-DGDEH4JX.js} +5 -5
  15. package/dist/{tui-X2XICJTN.js.map → tui-DGDEH4JX.js.map} +1 -1
  16. package/dist/tui-sync-worker.js +1 -1
  17. package/docs/VISION.md +3 -0
  18. package/docs/guide/delegate.md +1 -1
  19. package/package.json +1 -1
  20. package/skills/mu/SKILL.md +29 -37
  21. package/skills/mu/recipes/adversarial-review.md +26 -21
  22. package/skills/mu/recipes/brief.md +3 -2
  23. package/skills/mu/recipes/codemode-driver.md +9 -6
  24. package/skills/mu/recipes/deep-research.md +2 -1
  25. package/skills/mu/recipes/drift-audit.md +5 -4
  26. package/skills/mu/recipes/fan-out.md +5 -3
  27. package/skills/mu/recipes/findings.md +7 -3
  28. package/skills/mu/recipes/hypothesis-panel.md +2 -1
  29. package/skills/mu/recipes/models.md +102 -0
  30. package/skills/mu/recipes/orchestrator-loop.md +6 -8
  31. package/skills/mu/recipes/plan.md +5 -5
  32. package/skills/mu/recipes/recovery.md +9 -8
  33. package/skills/mu/recipes/refute.md +7 -4
  34. package/skills/mu/recipes/remote-workers.md +22 -14
  35. package/skills/mu/recipes/review-panel.md +4 -3
  36. package/skills/mu/recipes/rules-audit.md +7 -6
  37. package/skills/mu/recipes/tasks-or-calls.md +6 -5
  38. package/skills/mu/recipes/tournament.md +5 -2
  39. package/skills/mu/recipes/ultrathink.md +6 -4
  40. package/skills/mu/recipes/watcher.md +4 -0
  41. package/skills/mu/recipes/waves.md +5 -4
  42. package/skills/mu/recipes/worker.md +2 -2
  43. package/dist/chunk-WT7IN2OD.js.map +0 -1
  44. package/dist/cli-KJGVEZW5.js.map +0 -1
  45. /package/dist/{chunk-7OQNJWBY.js.map → chunk-2FJK6OOZ.js.map} +0 -0
  46. /package/dist/{chunk-XXK7FR37.js.map → chunk-DXKJY3NT.js.map} +0 -0
@@ -4,13 +4,10 @@ Use before you undo a change, rebuild the DB, tear down a workstream,
4
4
  set up sync, or act on `mu doctor` output. Each of these can lose work
5
5
  when done in the wrong order.
6
6
 
7
- - **`workstream teardown`** is dry-run without `--yes`. It writes
8
- TOMBSTONE ops, so `mu undo <group> --yes` reverses it; the log is the
9
- backup. `workstream list --torn-down` lists group ids to undo.
10
- - **`mu undo`** bare lists groups; `<group>` previews; `<group> --yes`
11
- emits inverse ops for that group only (redo = undo the undo). Exit 4
12
- if a later action changed the same fields (`--force` discards it).
13
- Rows only: killed panes and freed workspace dirs do not come back.
7
+ - **`workstream teardown`** is reversible: `workstream list --torn-down`
8
+ lists the group ids to `mu undo`; the log is the backup.
9
+ - **`mu undo`** restores rows only: killed panes and freed workspace
10
+ dirs do not come back. Redo = undo the undo.
14
11
  - **`mu rebuild <file>`** writes a new DB from the ops log, without
15
12
  agents or workspaces; re-spawn after the swap. Recovery is
16
13
  `mu rebuild`, not `mu db backup`.
@@ -28,4 +25,8 @@ when done in the wrong order.
28
25
  only copy of uncommitted work, so mu prints cleanup commands and runs
29
26
  none. Read before you run them.
30
27
 
31
- Done when `mu doctor` reports no DRIFT and every cleanup command you ran was read first.
28
+ Done when, per operation: undo or teardown was previewed, then applied
29
+ with `--yes`; rebuild was swapped in and agents re-spawned; `mu sync`
30
+ lists the peer; forget touched only the named workstreams. Any
31
+ `doctor --deep` DRIFT is backed up and reported to the human, and you
32
+ read every cleanup command before you ran it.
@@ -38,15 +38,18 @@ fact-check nobody will track, use delegate mode from
38
38
  A synthesis task is needed only when the human wants prose.
39
39
 
40
40
  Done when no finding is left in triage without an `UNVERIFIED` note,
41
- and the umbrella closes with `--if-ready` once the accepted findings
42
- are fixed or handed off.
41
+ and the accepted findings are fixed or handed off. The umbrella closes
42
+ with `--if-ready` once no finding is open; while an `UNVERIFIED` finding
43
+ remains it stays open and the human gets the list.
43
44
 
44
45
  ## Traps
45
46
 
46
47
  - **UNVERIFIED is not REFUTED.** A refuter that hit a rate limit or
47
48
  could not run the code disproved nothing. The finding stays in triage
48
49
  with an `UNVERIFIED:` note, reported apart.
49
- - **Cheap finders, strong refuters.** Finders can run on `pi_mini`; the
50
- refute step is where the judgement is (`pi_big`).
50
+ - **Cheap finders, strong refuters.** Finders can run cheap when a
51
+ missed finding is affordable: refuters test what was reported, not
52
+ what was missed. Refuters run at the finder's tier or higher, and no
53
+ lower than mid, from another family ([models](models.md#checkers)).
51
54
  - **No findings is a result.** A slice that finds nothing closes with
52
55
  that in its note; do not re-run it until it finds something.
@@ -45,7 +45,8 @@ mu task claim t1 -w big --for worker-1 --evidence 'remote on dev'
45
45
  mu agent send worker-1 -w big --fresh '...'
46
46
 
47
47
  # 5. WAIT: pi: mu agent wait worker-1 -w big --after-runs <send's runs> --json,
48
- # then the claim's Next: once. non-pi: run the claim's Next: once per turn
48
+ # then the claim's Next: once, after the worker reports done.
49
+ # non-pi: the same, once per reported-done turn
49
50
 
50
51
  # 6. COLLECT: fetch straight from the remote worktree
51
52
  git fetch "ssh://dev/~/ws/worker-1" HEAD && git cherry-pick FETCH_HEAD
@@ -89,15 +90,15 @@ plus a 10 s cache.
89
90
 
90
91
  ### Step 5: poll once per turn
91
92
 
92
- The claim's `Next:` mule poll is mandatory. It proves the commit is on
93
- the host and closes the task. For a pi worker, first block on
93
+ The claim's `Next:` mule poll closes the task as done on any change of
94
+ the remote HEAD. Run it once, only after the worker reports done (its
95
+ close or final answer). For a pi worker, first block on
94
96
  `mu agent wait <name> --after-runs <runs> --json`, with `runs` from
95
- `mu agent send --json`. It settles exactly over the forwarded socket.
96
- Without `--after-runs`, a worker that is already idle blocks until
97
- `--timeout`. If the worker may already be done, pass `<runs-1>`: the
98
- wait then returns the last answer at once. Then run `Next:` once instead
99
- of on every turn. On exit 5 (timeout), or on a wait that returns while
100
- the worker asks a question, run `Next:` anyway.
97
+ `mu agent send --json`. It settles exactly over the forwarded socket,
98
+ and it returns at once for a run that settled before the wait started.
99
+ Pass `<runs>` unchanged. On exit 5 (timeout), or on a wait that returns
100
+ while the worker asks a question, do not poll: read the pane
101
+ (`mu agent read <name> -n 20`) and answer.
101
102
 
102
103
  - Never `sleep` in a tool call. Aborting the loop can leave remote work
103
104
  and a capped channel running.
@@ -122,11 +123,16 @@ there with its warm dependencies:
122
123
 
123
124
  ```bash
124
125
  git cherry-pick <sha>
125
- git push -q "ssh://dev/~/hacking/<repo>.git" HEAD:refs/heads/main
126
- mule run --cwd ~/hacking/<checkout> --wait \
127
- 'git fetch -q origin && git reset -q --hard origin/main && npm run check'
126
+ git push -q "ssh://dev/~/hacking/<repo>.git" HEAD:refs/heads/gate-tmp
127
+ mule run --cwd ~/hacking/<gate-checkout> --wait \
128
+ 'git fetch -q origin gate-tmp && git checkout -q --detach FETCH_HEAD && npm run check'
128
129
  ```
129
130
 
131
+ `<gate-checkout>` is a scratch checkout or worktree used only for
132
+ gates, never one holding work. Push to a temporary ref, never `main`;
133
+ delete it afterwards (`git push origin :gate-tmp`). Push to `main` only
134
+ after the gate passes.
135
+
130
136
  `--wait` exits with the suite's code. A bare ssh would hold the capped
131
137
  channel for minutes. Keep two gates local: platform-sensitive tests (macOS `ps` returns argv,
132
138
  Linux `ps -e` appends the environment, and a real bug lived there), and
@@ -307,8 +313,10 @@ command but cannot serve `git fetch`.
307
313
  et dev # or your site's wrapper, such as `x2ssh -et dev`
308
314
  ```
309
315
 
310
- An aborted `et` or `x2ssh` leaves local processes behind. Run
311
- `pkill -f x2ssh` before retrying.
316
+ An aborted `et` or `x2ssh` leaves local processes behind. Find them
317
+ with `ps -o pid=,command= -ax | grep "[x]2ssh"` and kill only those of
318
+ the aborted invocation (match its host or tty), not every x2ssh, before
319
+ retrying.
312
320
 
313
321
  On a capped host: ET for you, mule for tooling, detached tmux for mu
314
322
  agents. None of them competes for the slot.
@@ -56,8 +56,9 @@ triage and the umbrella closes with `--if-ready` (workstream mode).
56
56
 
57
57
  - **Reviewers padding the list.** A panel that always finds ten things
58
58
  is guessing.
59
- - **Vary models across angles** ([Models](../SKILL.md#models-and-thinking-effort)); one model's blind spot
60
- repeated five times is still one blind spot. In delegate mode pass
61
- `model` to `mu_delegate`; `cli` keys exist only if `$MU_<KEY>_COMMAND` is set.
59
+ - **Vary families across angles, not tiers.** Every reviewer is at the
60
+ author's tier or higher ([models](models.md#checkers)); one model's
61
+ blind spot repeated five times is still one blind spot. Pass `model`
62
+ to `mu_delegate`.
62
63
  - **The panel is not the gate command.** Merge verification still runs on the
63
64
  merged tree ([orchestrator-loop](orchestrator-loop.md#merging)).
@@ -28,22 +28,23 @@ rules are findings: [findings](findings.md) says where they live.
28
28
  2. **Pin the target**: the diff, branch, or PR, as in
29
29
  [review-panel](review-panel.md) step 1.
30
30
  3. **One checker per rule**, as a [delegate call](tasks-or-calls.md#delegate-call)
31
- The checker gets one rule and the diff, and records each violation
32
- as a finding ([findings § Record](findings.md#record); title
33
- `<severity>: r7 <what>`), or reports `r7: no violations` with what it
31
+ The checker gets one rule and the diff. Delegate mode: end the answer
32
+ with `FINDING: … r7 …` lines. Workstream mode: one triage task per
33
+ violation ([findings § Record](findings.md#record); title
34
+ `<severity>: r7 <what>`). With no violation it reports `r7: no violations` with what it
34
35
  looked at. One rule per checker keeps it from skimming; batch under
35
36
  the cap ([orchestrator-loop § Concurrency](orchestrator-loop.md#concurrency)).
36
- 4. **A skeptic pass** over the flags, also a delegate call: one fresh agent reads each flagged
37
+ 4. **A skeptic pass** over the findings, also a delegate call: one fresh agent reads each flagged
37
38
  line and the rule, and drops false positives (the rule does not
38
39
  apply here, the code already complies, the rule has a stated
39
- exception). In workstream mode, a dropped flag is
40
+ exception). In workstream mode, a dropped finding is
40
41
  `close --as rejected --why "<why the rule does not bite here>"`; a
41
42
  confirmed one is accepted with `--evidence` naming the flagged line
42
43
  ([findings § Triage](findings.md#triage) step 3; quoting:
43
44
  [brief § Quoting](brief.md#quoting)).
44
45
  5. **Report or fix** confirmed violations, as in review-panel step 5.
45
46
 
46
- Done when every rule from step 1 has a checker result, and every flag
47
+ Done when every rule from step 1 has a checker result, and every finding
47
48
  is decided.
48
49
 
49
50
  ## Mine: rules you keep stating but never wrote
@@ -7,7 +7,8 @@ hundreds of tasks and a workstream nobody wanted.
7
7
 
8
8
  ## Delegate call
9
9
 
10
- A **delegate call** is one `mu_delegate` tool call in pi.
10
+ A **delegate call** is one `mu_delegate` tool call in pi, or outside pi
11
+ a `scratch` spawn + `send --fresh` + `wait --after-runs` (below).
11
12
 
12
13
  - **It starts empty.** The brief carries everything: the finding or
13
14
  claim, file paths, the criteria, and the answer to end with. See
@@ -80,9 +81,9 @@ Before a wave, count what it will add: units + gates + expected
80
81
  findings. If the count is more than a few hundred for one change, the
81
82
  steps that only check things are probably tasks by mistake.
82
83
 
83
- `mu_delegate` runs 16 at once (`MU_DELEGATE_MAX`) and queues the rest
84
- up to four times the cap; see
85
- [orchestrator-loop § Concurrency](orchestrator-loop.md#concurrency).
84
+ Cap and queue: [orchestrator-loop § Concurrency](orchestrator-loop.md#concurrency).
86
85
 
87
86
  Done when every agent a recipe step spawns is either a task in the DAG
88
- or a delegate call whose verdict is recorded on a task.
87
+ or a delegate call whose answer landed where its step says: a
88
+ `REFUTER` note on the task it judged, a `WINNER` line in the umbrella's
89
+ note, or a unit list in the umbrella's note.
@@ -35,7 +35,10 @@ final check passed.
35
35
  - **Position bias.** Judges favour the first candidate shown. For close
36
36
  calls, judge the pair twice with the order swapped; a split decision
37
37
  goes to a third judge.
38
- - **Same model, same taste.** Vary the attempt models, and judge with a
39
- model that made no attempt ([Models](../SKILL.md#models-and-thinking-effort)).
38
+ - **Same model, same taste.** Vary the attempts across families at the
39
+ same tier, and judge with a model that made no attempt, at that tier
40
+ or above ([models](models.md#checkers)). A close final goes to a
41
+ frontier judge, or with none available, the strongest model from a
42
+ family that made no attempt.
40
43
  - **Ranking many items** (tickets by severity): bucket them in parallel,
41
44
  then run pairwise comparisons only within and across bucket edges.
@@ -44,7 +44,7 @@ and check, skip it.
44
44
  of a loop are the one exception: add each when the last closes.
45
45
  5. **Review every unit that ships.** Each commit-producing task gets a
46
46
  review task ([adversarial-review](adversarial-review.md)) on a
47
- [comparable model](../SKILL.md#models-and-thinking-effort). Every finding is a triage task,
47
+ [comparable model](models.md#checkers). Every finding is a triage task,
48
48
  refuted before it is accepted ([findings](findings.md)).
49
49
  6. **Run the loop** ([orchestrator-loop](orchestrator-loop.md)): pipeline
50
50
  merges, verify each merge, keep workers busy
@@ -58,7 +58,7 @@ and check, skip it.
58
58
  Done when the umbrella is closed, its stop rule holds on the merged
59
59
  tree, every shipped unit's latest review task is `CLOSED/done`
60
60
  (ACCEPT), and
61
- `mu task list --substate triage` is empty or only `UNVERIFIED`.
61
+ `mu task list --substate triage` is empty.
62
62
 
63
63
  ## Budget
64
64
 
@@ -69,8 +69,10 @@ tree, every shipped unit's latest review task is `CLOSED/done`
69
69
  survive, not a task per refuter and judge.
70
70
  - The run gets its own workstream, `<project>-ut-<topic>`, torn down
71
71
  when the umbrella closes ([recovery](recovery.md) before teardown).
72
- - Cheap models scout and find (`pi_mini`); the default builds (`pi`);
73
- strong models review, refute, judge, and synthesize (`pi_big`).
72
+ - Tiers per phase ([models](models.md#roles)): cheap scouts and finds,
73
+ mid builds, strong plans and synthesizes; each checker at the tier of
74
+ whoever wrote what it checks, or higher, another family. Calibrate the
75
+ tier split on the slice, not only the cost.
74
76
  - Calibrate on a slice: run the phase on a few units, check the result
75
77
  and the cost, then fan out the rest.
76
78
 
@@ -12,6 +12,10 @@ acts on change. Run it in `scratch`, or in the workstream it serves.
12
12
  3. **Wait with mu, not `sleep`.** `mu agent wait <names...> --first`
13
13
  returns when an agent goes busy → idle.
14
14
 
15
+ A watcher runs cheap (hosted): polling and diffing a ledger line needs
16
+ no judgement. It hands anything that does to you or a stronger helper
17
+ ([models](models.md#roles)).
18
+
15
19
  The ledger survives a dead or fresh helper: a replacement reads the
16
20
  last line and carries on. To act on new items (issues, alerts), see
17
21
  [backlog-triage](backlog-triage.md).
@@ -4,8 +4,8 @@ Use when two or more workers edit the same repo at once. Every worker
4
4
  runs in its own `--workspace`; this recipe decides what each one gets.
5
5
 
6
6
  1. **Bucket by file cluster, not severity.** Two agents editing one
7
- file conflict, whatever the priority. Put tasks that share files on
8
- one track (`mu task block`) so only one agent holds them.
7
+ file conflict, whatever the priority. Chain tasks that share files
8
+ (`mu task block B --by A`) so only one is ready at a time.
9
9
  2. **Freeze only what conflicts.** Give idle workers tasks that avoid
10
10
  the shared files. A blanket freeze idled four of five workers for a
11
11
  day.
@@ -13,8 +13,9 @@ runs in its own `--workspace`; this recipe decides what each one gets.
13
13
  verify the merged tree ([orchestrator-loop § Merging](orchestrator-loop.md#merging));
14
14
  never wait for the whole wave.
15
15
  4. **Refresh before each dispatch.** `mu workspace refresh <agent>`
16
- rebases onto main and keeps the agent's context; run it before every
17
- `--fresh` send, so each unit starts from the latest merge.
16
+ rebases onto the tracked main (git: `origin/HEAD`, so unpushed local
17
+ merges are missed; pass `--from <local-branch>` to include them) and
18
+ keeps the agent's context; run it before every `--fresh` send.
18
19
 
19
20
  Done when every task in the wave is `CLOSED/done`, merged, and the
20
21
  merged tree passes the gate command.
@@ -13,7 +13,7 @@ mu me
13
13
  mu me next
14
14
  mu task show <id>; mu task notes <id>
15
15
  mu task claim <id> --evidence "starting; read notes"
16
- mu task note <id> "FILES: ...\nDECISION: ...\nVERIFIED: ..."
16
+ mu task note <id> "FILES: ...\nCOMMANDS: ... (exit codes)\nDECISION: ...\nVERIFIED: ..."
17
17
  mu task close <id> --evidence "tests pass: ..." # LAST action
18
18
  ```
19
19
 
@@ -23,5 +23,5 @@ you only between tool calls. Commit before you close: the orchestrator cherry-pi
23
23
  review or audit task records each problem per
24
24
  [findings § Record](findings.md#record).
25
25
 
26
- Done when the task is closed. Skipping close makes the orchestrator's
26
+ Done when your changes are committed in the workspace, the task note holds FILES, COMMANDS (with exit codes) and VERIFIED, and `mu task close` succeeded as your last action. Skipping close makes the orchestrator's
27
27
  wait hang. Won't do it: `close --as wontfix --why "..."`.