@mu-crew/mu 3.2.0 → 3.3.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 +208 -599
- package/README.md +125 -329
- package/dist/cli.js +108 -78
- package/dist/cli.js.map +1 -1
- package/dist/extension/mu-pi.js +421 -56
- package/dist/extension/mu-pi.js.map +1 -1
- package/dist/index.d.ts +36 -10
- package/dist/index.js +89 -67
- package/dist/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +176 -1072
- package/docs/ROADMAP.md +88 -169
- package/docs/VISION.md +205 -415
- package/docs/VOCABULARY.md +204 -466
- package/docs/architecture/control-socket.md +133 -0
- package/docs/architecture/dag.md +113 -0
- package/docs/architecture/mux.md +162 -0
- package/docs/architecture/ops-log.md +140 -0
- package/docs/architecture/sdk.md +185 -0
- package/docs/architecture/sync.md +129 -0
- package/docs/architecture/tui.md +146 -0
- package/docs/guide/README.md +30 -0
- package/docs/guide/backends.md +61 -0
- package/docs/guide/cleanup.md +74 -0
- package/docs/guide/delegate.md +87 -0
- package/docs/guide/dispatch.md +144 -0
- package/docs/guide/getting-started.md +180 -0
- package/docs/guide/recovery.md +135 -0
- package/docs/guide/remote.md +74 -0
- package/docs/guide/sql.md +76 -0
- package/docs/guide/stop-a-worker.md +64 -0
- package/docs/guide/sync.md +78 -0
- package/docs/guide/tui.md +98 -0
- package/docs/guide/upgrade.md +76 -0
- package/docs/history/CHANGELOG-pre-3.md +4866 -0
- package/docs/reference/env.md +87 -0
- package/docs/reference/naming.md +82 -0
- package/docs/specs/2026-09-28-agent-state-from-murmur.md +1 -1
- package/docs/specs/2026-09-29-task-substates.md +1 -1
- package/docs/specs/2026-10-03-keep-driving-nudge.md +142 -0
- package/package.json +2 -1
- package/prompts/mu-refute.md +8 -0
- package/prompts/mu-research.md +8 -0
- package/prompts/mu-review.md +8 -0
- package/prompts/mu-rules-audit.md +8 -0
- package/prompts/mu-tournament.md +9 -0
- package/prompts/ultrathink.md +9 -0
- package/skills/mu/SKILL.md +126 -255
- package/skills/mu/recipes/adversarial-review.md +83 -0
- package/skills/mu/recipes/brief.md +53 -0
- package/skills/mu/recipes/codemode-driver.md +54 -0
- package/skills/mu/recipes/deep-research.md +52 -0
- package/skills/mu/recipes/fan-out.md +36 -0
- package/skills/mu/recipes/hypothesis-panel.md +40 -0
- package/skills/mu/recipes/long-run.md +20 -0
- package/skills/mu/recipes/loop-until-done.md +38 -0
- package/skills/mu/recipes/orchestrator-loop.md +87 -0
- package/skills/mu/recipes/plan.md +54 -0
- package/skills/mu/recipes/recovery.md +26 -0
- package/skills/mu/recipes/refute.md +49 -0
- package/skills/mu/recipes/remote-workers.md +292 -0
- package/skills/mu/recipes/review-panel.md +57 -0
- package/skills/mu/recipes/rules-audit.md +70 -0
- package/skills/mu/recipes/tournament.md +37 -0
- package/skills/mu/recipes/triage.md +38 -0
- package/skills/mu/recipes/ultrathink.md +73 -0
- package/skills/mu/recipes/watcher.md +16 -0
- package/skills/mu/recipes/waves.md +19 -0
- package/skills/mu/recipes/worker.md +24 -0
- package/docs/HANDOVER.md +0 -486
- package/docs/USAGE_GUIDE.md +0 -2738
- package/skills/mu/REMOTE_WORKERS.md +0 -617
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Environment variables
|
|
2
|
+
|
|
3
|
+
Every env var mu reads or sets. mu has no config file. Durations are
|
|
4
|
+
milliseconds; `0` disables a wait unless noted.
|
|
5
|
+
|
|
6
|
+
## State and workstream
|
|
7
|
+
|
|
8
|
+
| Name | Effect | Default |
|
|
9
|
+
| --- | --- | --- |
|
|
10
|
+
| `MU_DB_PATH` | SQLite file path. Wins over the state dir. | `<state-dir>/mu.db` |
|
|
11
|
+
| `MU_STATE_DIR` | State directory. | `$XDG_STATE_HOME/mu` |
|
|
12
|
+
| `XDG_STATE_HOME` | XDG state base; mu appends `mu/`. | `~/.local/state` |
|
|
13
|
+
| `MU_SESSION` | Active workstream when `-w` is absent. | current `mu-<name>` mux session |
|
|
14
|
+
| `MU_SYNC_DIR` | Folder holding one segment per machine. This is the whole sync setup; there is no peer list. | unset: sync off |
|
|
15
|
+
|
|
16
|
+
## Multiplexer
|
|
17
|
+
|
|
18
|
+
| Name | Effect | Default |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| `MU_MUX` | Force `tmux` or `herdr`, skipping mux detection. An unknown value fails the invocation. | detected |
|
|
21
|
+
| `HERDR_ENV` | Read only. `1` (set by herdr in its panes) selects herdr; outranks `$TMUX`. | |
|
|
22
|
+
| `MU_TMUX_SOCKET` | tmux socket name (`-L <name>`). tmux only. | `$TMUX` |
|
|
23
|
+
| `MU_HERDR_SESSION` | Named herdr server (`--session <name>`). herdr only. Tests must set it to a non-default name. | herdr default session |
|
|
24
|
+
| `MU_BANNER_QUIET` | `1` disables mu's pane border and banner decorations. tmux only. | unset |
|
|
25
|
+
|
|
26
|
+
## Spawn
|
|
27
|
+
|
|
28
|
+
| Name | Effect | Default |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `MU_<CLI>_COMMAND` | Executable for `--cli <cli>`; hyphens become underscores (`--cli pi-meta` reads `MU_PI_META_COMMAND`). May hold arguments. `--command` wins; the spawn line names the env var when it supplied the command. | the cli value |
|
|
31
|
+
| `MU_SPAWN_CTL_MS` | Budget for the control-socket handshake with a new pi agent, polled every 250ms. On timeout spawn still exits 0, reports `ctl: missing` or `ctl: refused`, and warns. `--no-ctl` skips it per spawn. | `30000` |
|
|
32
|
+
| `MU_SPAWN_LIVENESS_MS` | tmux only. Wait this long, then check the pane is alive and its scrollback has no startup error (auth failure, `command not found`). Failure rolls back the row and throws `AgentDiedOnSpawnError` or `AgentSpawnStartupError`. | `1500` |
|
|
33
|
+
| `MU_SPAWN_LOCK_TIMEOUT_MS` | How long a spawn waits for the per-workstream spawn lock. | `15000` |
|
|
34
|
+
|
|
35
|
+
## Send and state (tmux path)
|
|
36
|
+
|
|
37
|
+
These apply to the tmux paste path only. For when that path runs, see
|
|
38
|
+
[No silent fallback](../architecture/control-socket.md#no-silent-fallback).
|
|
39
|
+
|
|
40
|
+
| Name | Effect | Default |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `MU_SEND_READINESS_MS` | Before pasting, wait out a pane's modal or re-init; after Enter, confirm it landed. `0` sends fire-and-forget. A busy pane is not waited on. | `15000` |
|
|
43
|
+
| `MU_SEND_DELAY_MS` | Delay between the bracketed paste and Enter. | `500` |
|
|
44
|
+
|
|
45
|
+
## Agents and timing
|
|
46
|
+
|
|
47
|
+
| Name | Effect | Default |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| `MU_IDLE_THRESHOLD_MS` | Time without progress before an owning agent, or a scratch agent, counts as idle. | `300000` |
|
|
50
|
+
| `MU_LOG_TAIL_INTERVAL_MS` | `mu log --tail` poll interval; clamped to ≥ 50. | `1000` |
|
|
51
|
+
|
|
52
|
+
## Set by mu in agent panes
|
|
53
|
+
|
|
54
|
+
| Name | Value |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `MU_AGENT_NAME` | The agent's name; first rung of actor identity. |
|
|
57
|
+
| `MU_WORKSTREAM` | The agent's workstream. |
|
|
58
|
+
| `MU_CTL_SOCK` | The agent's control socket path, derived from state dir, workstream, and agent. The mu pi extension serves it. |
|
|
59
|
+
| `MU_MANAGED_AGENT` | `1`. Hides `mu_delegate` inside agents, so a helper cannot spawn helpers. |
|
|
60
|
+
|
|
61
|
+
`mu agent remote-env <agent> --shell` prints `MU_SSH_ARGS` (the ssh
|
|
62
|
+
socket forward) and `MU_REMOTE_ENV` (the four vars above) for a remote
|
|
63
|
+
pi agent's `--command`. mu never reads them back.
|
|
64
|
+
|
|
65
|
+
## pi extension and `mu link pi`
|
|
66
|
+
|
|
67
|
+
| Name | Effect | Default |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| `MU_DELEGATE` | `0` hides the `mu_delegate` tool. `mu doctor` reports it. | unset: shown |
|
|
70
|
+
| `MU_NUDGE` | `0` turns off the keep-driving nudge: one reminder when an orchestrator ends a turn with dispatched work still IN_PROGRESS. `mu doctor` reports it. | unset: on |
|
|
71
|
+
| `MU_PI_HOME` | Root under which `mu link pi` writes `.pi/` and `.agents/`. | `$HOME` |
|
|
72
|
+
| `PI_CODING_AGENT_DIR` | Read only. pi's agent dir, checked for a linked murmur extension. | `~/.pi/agent` |
|
|
73
|
+
| `MU_EXTENSION_ENTRY` | Test only. Built extension the `mu link pi` shim imports. | `dist/extension/mu-pi.js` |
|
|
74
|
+
|
|
75
|
+
## Output and TUI
|
|
76
|
+
|
|
77
|
+
| Name | Effect | Default |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| `NO_COLOR` | Any value turns colour off; wins over everything. | unset |
|
|
80
|
+
| `MU_FORCE_COLOR` | Truthy forces colour on. `""`, `0`, and `false` opt out. Checked before `FORCE_COLOR`. | unset |
|
|
81
|
+
| `MU_NO_TUI` | `1` makes bare `mu` print help instead of opening the TUI. | unset |
|
|
82
|
+
| `MU_TUI_DEBUG_MOUSE` | `1` logs mouse hit-tests to stderr. | unset |
|
|
83
|
+
|
|
84
|
+
## Tests
|
|
85
|
+
|
|
86
|
+
`VITEST` or `NODE_ENV=test` makes `openDb()` refuse the real default DB.
|
|
87
|
+
`test/_setup.ts` clears inherited `MU_*` vars except `MU_TMUX_SOCKET`.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Naming conventions
|
|
2
|
+
|
|
3
|
+
Terms are defined in [VOCABULARY.md](../VOCABULARY.md).
|
|
4
|
+
|
|
5
|
+
## Flags and positionals
|
|
6
|
+
|
|
7
|
+
The primary entity a verb acts on is positional. Scope, modifiers, and
|
|
8
|
+
payload are flags: `mu task close <id>`, `mu agent send <name> <text>`.
|
|
9
|
+
|
|
10
|
+
- The workstream is a scope (`-w`) everywhere except under
|
|
11
|
+
`mu workstream`, where it is the entity. `init` and `teardown` take
|
|
12
|
+
it positionally; if the positional and `-w` disagree, mu exits 2.
|
|
13
|
+
- When one verb takes a payload positionally and a sibling takes it as
|
|
14
|
+
a flag, both shapes are accepted (`mu task note <id> --text "..."`).
|
|
15
|
+
Adding an alias is not a breaking change; removing a shape is.
|
|
16
|
+
- One concept, one parser: `--blocked-by` and `--by` are both blocker
|
|
17
|
+
lists and accept repeated, comma-separated, or mixed forms.
|
|
18
|
+
|
|
19
|
+
## Empty and blank list fragments
|
|
20
|
+
|
|
21
|
+
`parseCsvFlag` (`src/cli.ts`) applies one rule to every list flag
|
|
22
|
+
(`--status`, `--by`, `--blocked-by`, `-w`):
|
|
23
|
+
|
|
24
|
+
| Input | Kind | Result |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| `--status "OPEN,"` | empty fragment | dropped: `[OPEN]` |
|
|
27
|
+
| `--blocked-by ""` | empty fragment | dropped: `[]` |
|
|
28
|
+
| `--status " "` | blank fragment | `UsageError`, exit 2 |
|
|
29
|
+
| `--status "OPEN, "` | blank fragment | `UsageError`, exit 2 |
|
|
30
|
+
|
|
31
|
+
A blank `-w ' '` is also rejected. Whether zero fragments is legal is
|
|
32
|
+
per verb: `--by ''` exits 2, while `mu task reparent --blocked-by ''`
|
|
33
|
+
clears all blockers.
|
|
34
|
+
|
|
35
|
+
## Ids
|
|
36
|
+
|
|
37
|
+
| Id | Shape | Unique within |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| Agent name | `[a-z][a-z0-9_-]*`, ≤ 32 chars | workstream |
|
|
40
|
+
| Task `local_id` | same | DB |
|
|
41
|
+
| Workstream name | same; mux session is `mu-<name>` | DB |
|
|
42
|
+
| Window (`--tab`) | `[A-Za-z][A-Za-z0-9 _-]*`, ≤ 32 chars | workstream |
|
|
43
|
+
|
|
44
|
+
`scratch` is reserved: it is created only by the first
|
|
45
|
+
`mu agent spawn <name> -w scratch`, and `mu workstream init scratch`
|
|
46
|
+
is rejected. The `mu-` prefix is reserved too.
|
|
47
|
+
|
|
48
|
+
## Agent names
|
|
49
|
+
|
|
50
|
+
Name agents by role with a numeric suffix: `worker-1`, `reviewer-1`,
|
|
51
|
+
`scout-1`. Human names (`alice`, `bob`) read as people in commands and
|
|
52
|
+
make `mu agent list` harder to scan. mu does not enforce this; test
|
|
53
|
+
fixtures may use human names.
|
|
54
|
+
|
|
55
|
+
| Role | Use |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `worker` | Long-lived implementer (the default) |
|
|
58
|
+
| `reviewer` | Reads diffs; usually `--role read-only` |
|
|
59
|
+
| `scout` | One-shot recon |
|
|
60
|
+
| `oracle` | Second opinion before acting |
|
|
61
|
+
| `auditor` | Long-lived watcher; `--role read-only` |
|
|
62
|
+
| `planner` | Writes implementation plans |
|
|
63
|
+
|
|
64
|
+
## File paths
|
|
65
|
+
|
|
66
|
+
The state dir is `MU_STATE_DIR`, else `$XDG_STATE_HOME/mu`, else
|
|
67
|
+
`~/.local/state/mu`.
|
|
68
|
+
|
|
69
|
+
| Path | Contents |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `<state-dir>/mu.db` | The SQLite DB for every workstream |
|
|
72
|
+
| `<state-dir>/workstreams/<workstream>/` | Per-workstream artifacts, created lazily |
|
|
73
|
+
| `<state-dir>/workspaces/<workstream>/<agent>/` | Per-agent VCS workspace, created by `mu agent spawn --workspace` |
|
|
74
|
+
| `<sync-dir>/<machine_id>.jsonl` | This machine's segment; `<sync-dir>` is `MU_SYNC_DIR` |
|
|
75
|
+
| `<sync-dir>/<machine_id>.manifest` | `{count, last_hlc, sha256}` for segment verification |
|
|
76
|
+
|
|
77
|
+
Never put `MU_DB_PATH` inside `MU_SYNC_DIR`: syncing a live SQLite
|
|
78
|
+
file and its `-wal` and `-shm` sidecars corrupts it. `mu doctor` checks
|
|
79
|
+
for this.
|
|
80
|
+
|
|
81
|
+
mu reads no agent-template directory (`~/.pi/agent/agents/`,
|
|
82
|
+
`.pi/agents/`). A role is a name and a brief.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent state from murmur (mu 2.0.0, murmur 1.0.0)
|
|
2
2
|
|
|
3
|
-
Status:
|
|
3
|
+
Status: shipped in 2.0.0; partly superseded in 3.2.0 by the control socket ([architecture/control-socket.md](../architecture/control-socket.md)). Approved 2026-09-28. Task `crew/mu_status_from_murmur`.
|
|
4
4
|
|
|
5
5
|
## Problem
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Task substates: classification without stranded dependents
|
|
2
2
|
|
|
3
|
-
Status:
|
|
3
|
+
Status: shipped in 3.0.0 (schema v11); `CLOSED/rejected` added in 3.1.0. Implemented 2026-09-29 (approved 2026-09-29; see [Deviations during implementation](#deviations-during-implementation))
|
|
4
4
|
Date: 2026-09-29
|
|
5
5
|
Supersedes the notes-only convention from `9e3c47b` ("tasks: reduce lifecycle to three states").
|
|
6
6
|
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Keep-driving nudge: one prompt when an orchestrator stops early
|
|
2
|
+
|
|
3
|
+
Status: shipped (unreleased). Implemented 2026-10-03; see [Deviations](#deviations-during-implementation)
|
|
4
|
+
Date: 2026-10-03
|
|
5
|
+
|
|
6
|
+
## Problem
|
|
7
|
+
|
|
8
|
+
An orchestrator dispatches workers, then ends its turn to print a
|
|
9
|
+
status summary while those workers are still running. Nothing happens
|
|
10
|
+
until the human notices and types "carry on". The crew sits idle for
|
|
11
|
+
as long as the human is away. This is the most common way a long run
|
|
12
|
+
stalls, and a rule in the skill alone has not stopped it.
|
|
13
|
+
|
|
14
|
+
`skills/mu/SKILL.md` § Orchestrator rules now states the rule ("While
|
|
15
|
+
workers run, keep driving"). The pi extension can back it up at the one
|
|
16
|
+
moment it matters: when the orchestrator is about to stop.
|
|
17
|
+
|
|
18
|
+
## Approach
|
|
19
|
+
|
|
20
|
+
When a pi session that dispatched mu work is about to settle, and that
|
|
21
|
+
work is still running, the extension injects **one** message quoting
|
|
22
|
+
the skill's rule, and asks pi to continue. The model then either goes
|
|
23
|
+
back to `mu task wait`, or ends the turn again with a reason. The
|
|
24
|
+
second stop is final: the nudge fires at most once per user prompt.
|
|
25
|
+
|
|
26
|
+
This is not a goal loop. It does not re-check, re-inject, or count
|
|
27
|
+
continuations. One reminder, then the model's judgement stands.
|
|
28
|
+
|
|
29
|
+
## Behaviour
|
|
30
|
+
|
|
31
|
+
1. **Arm.** During a run, the extension watches `tool_call` events for
|
|
32
|
+
bash commands that dispatch mu work: `mu agent send`, `mu agent
|
|
33
|
+
spawn`, or `mu task claim ... --for`. It records the workstreams
|
|
34
|
+
they name (`-w`, `--workstream`, or a qualified `<ws>/<task>` ref),
|
|
35
|
+
falling back to the default resolution (`$MU_SESSION`, tmux session).
|
|
36
|
+
A run with no dispatch never arms. `mu_delegate` does not arm: its
|
|
37
|
+
answers already arrive as follow-ups.
|
|
38
|
+
2. **Check.** On `agent_before_settle`, if armed and not yet fired for
|
|
39
|
+
this prompt, run `mu state -w <ws...> --json` (about 1 s) and count
|
|
40
|
+
`inProgress` tasks across those workstreams. Zero means the work is
|
|
41
|
+
done or parked: let the turn end.
|
|
42
|
+
3. **Nudge.** Otherwise return one `custom_message` entry
|
|
43
|
+
(`customType: "mu-keep-driving"`, `display: true`) and
|
|
44
|
+
`continue: true`. The text is the skill paragraph verbatim, followed
|
|
45
|
+
by the live count and the wait command:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
[mu] <the skill paragraph>
|
|
49
|
+
|
|
50
|
+
3 tasks IN_PROGRESS in auth. Next: mu task wait -w auth --first --on-stall exit
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
4. **Record.** Write `mu log -w <ws> --kind nudge 'keep-driving: 3 in
|
|
54
|
+
progress'` so the push is visible in the activity log, next to the
|
|
55
|
+
orchestrator's own entries.
|
|
56
|
+
5. **Reset.** The fired flag and the armed set clear on the next
|
|
57
|
+
`input` event, i.e. the next human (or mu-sent) prompt.
|
|
58
|
+
|
|
59
|
+
`outcome: "aborted"` or `"error"` never nudges: the human pressed Esc,
|
|
60
|
+
or the run failed, and both should stop.
|
|
61
|
+
|
|
62
|
+
## Single source for the text
|
|
63
|
+
|
|
64
|
+
The paragraph lives in `SKILL.md` between
|
|
65
|
+
`<!-- mu:keep-driving -->` and `<!-- /mu:keep-driving -->`. The
|
|
66
|
+
extension reads it from the package's skill at load time. A test
|
|
67
|
+
asserts the markers exist and the extracted text is non-empty, so
|
|
68
|
+
editing the skill edits the nudge, and deleting the markers fails the
|
|
69
|
+
gate rather than silently sending nothing.
|
|
70
|
+
|
|
71
|
+
## Opt-out
|
|
72
|
+
|
|
73
|
+
`MU_NUDGE=0` disables it. `mu doctor` reports it next to `MU_DELEGATE`.
|
|
74
|
+
|
|
75
|
+
## Fit with the pillars
|
|
76
|
+
|
|
77
|
+
- **The CLI is the product.** The nudge adds no state and no logic the
|
|
78
|
+
CLI lacks: its only data is `mu state --json`, and its only write is
|
|
79
|
+
`mu log`. Without the extension, the same rule is in the skill. Like
|
|
80
|
+
`mu_delegate`'s follow-up callback, it is harness glue, not a feature.
|
|
81
|
+
- **One DB is canonical.** The armed set and fired flag are per-prompt
|
|
82
|
+
scratch, never persisted. Losing them loses one reminder.
|
|
83
|
+
- **Nothing hidden.** The message is displayed in the transcript and
|
|
84
|
+
logged in the DB.
|
|
85
|
+
- **ROADMAP.** No daemon, watcher, or loop: one hook, one check, one
|
|
86
|
+
message. Estimated under 150 LOC plus tests.
|
|
87
|
+
|
|
88
|
+
## Key decisions
|
|
89
|
+
|
|
90
|
+
| # | Decision | Why |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| D1 | At most once per user prompt. | A loop overrides the model's judgement on real human decisions; one reminder corrects the common mistake and then defers. |
|
|
93
|
+
| D2 | Arm only on observed dispatch. | A session that never dispatched is not orchestrating; nudging it would be noise. |
|
|
94
|
+
| D3 | Gate on `inProgress > 0`, not ready tasks. | Ready-but-unclaimed work may be waiting on the human's go-ahead. Running workers are the clear case. |
|
|
95
|
+
| D4 | Quote the skill paragraph, read at load. | One source of truth; the model sees the exact rule it was taught. |
|
|
96
|
+
| D5 | `agent_before_settle` + `continue: true`, not `sendUserMessage`. | The boundary hook is pi's designed point for one continuation, and the entry is a visible custom message, not fake user input. |
|
|
97
|
+
| D6 | Log every nudge with `--kind nudge`. | The push is part of the run's record; `mu log --kind nudge` shows how often orchestrators stop early. |
|
|
98
|
+
|
|
99
|
+
## Out of scope
|
|
100
|
+
|
|
101
|
+
- A worker that stops without closing its task. Same shape (check
|
|
102
|
+
`mu me` for an owned IN_PROGRESS task, nudge once), but a separate
|
|
103
|
+
decision.
|
|
104
|
+
- Non-pi harnesses. They get the skill rule only.
|
|
105
|
+
- Any repeat, backoff, or goal condition.
|
|
106
|
+
|
|
107
|
+
## Test plan
|
|
108
|
+
|
|
109
|
+
- Unit, with a fake pi API (as `delegate.ts` tests do):
|
|
110
|
+
- no dispatch in the run → no nudge;
|
|
111
|
+
- dispatch + `inProgress: 0` → no nudge;
|
|
112
|
+
- dispatch + `inProgress: 2` → one entry, `continue: true`, one
|
|
113
|
+
`mu log` call;
|
|
114
|
+
- a second settle in the same prompt → no nudge;
|
|
115
|
+
- a new `input` event → armed again;
|
|
116
|
+
- `outcome: "aborted"` → no nudge;
|
|
117
|
+
- `MU_NUDGE=0` → no nudge.
|
|
118
|
+
- Marker test: `SKILL.md` contains the markers; extracted text matches
|
|
119
|
+
the paragraph.
|
|
120
|
+
- Manual: real orchestrator session, dispatch two workers, ask for a
|
|
121
|
+
status summary; confirm one `[mu]` message, the model resumes
|
|
122
|
+
waiting, and `mu log --kind nudge` shows the entry.
|
|
123
|
+
|
|
124
|
+
## Deviations during implementation
|
|
125
|
+
|
|
126
|
+
- **Wait hint names tasks.** `mu task wait` takes task ids, so the
|
|
127
|
+
message lists up to eight `<ws>/<task>` refs and counts the rest,
|
|
128
|
+
instead of a `-w <ws>` form that does not exist.
|
|
129
|
+
- **Both `mu state --json` shapes.** One `-w` prints a bare card; several
|
|
130
|
+
print `{ workstreams: [...] }`. The unit tests first mocked only the
|
|
131
|
+
second; the live run used the first and stayed silent. Both are read
|
|
132
|
+
and tested now.
|
|
133
|
+
- **`scratch` never arms.** Dispatches into the reserved delegate
|
|
134
|
+
workstream are `mu_delegate`'s, whose answers return as follow-ups.
|
|
135
|
+
- **The check runs once per prompt even when it fails.** A failing
|
|
136
|
+
`mu state` does not retry on the next settle.
|
|
137
|
+
|
|
138
|
+
Live verification: a real pi orchestrator against a throwaway DB
|
|
139
|
+
claimed a task for a worker, ended its turn, received one
|
|
140
|
+
`[mu-keep-driving]` message with `mu task wait nudgeprobe/slow ...`, and
|
|
141
|
+
`mu log --kind nudge` held one entry. With nothing IN_PROGRESS, no
|
|
142
|
+
nudge fired.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mu-crew/mu",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "A persistent, observable crew of pi agents running in one tmux or herdr session per workstream, coordinated through a built-in task DAG.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"files": [
|
|
45
45
|
"dist",
|
|
46
46
|
"skills",
|
|
47
|
+
"prompts",
|
|
47
48
|
"docs",
|
|
48
49
|
"README.md",
|
|
49
50
|
"AGENTS.md"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Find, refute, synthesize with mu: audit or fact-check with a refuter per finding"
|
|
3
|
+
argument-hint: "<what to audit or check>"
|
|
4
|
+
---
|
|
5
|
+
Run a find-refute-synthesize pass with mu. Load the mu skill, then read
|
|
6
|
+
its `recipes/refute.md` in full and follow it.
|
|
7
|
+
|
|
8
|
+
Scope: $@
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Review panel with mu: parallel focused reviewers, refuted findings, one report"
|
|
3
|
+
argument-hint: "[diff, PR, branch, or path]"
|
|
4
|
+
---
|
|
5
|
+
Run a review panel with mu. Load the mu skill, then read its
|
|
6
|
+
`recipes/review-panel.md` in full and follow it.
|
|
7
|
+
|
|
8
|
+
Target: ${@:-the uncommitted changes in this repo}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Rules audit with mu: check a change against AGENTS.md rule by rule, or mine missing rules"
|
|
3
|
+
argument-hint: "[check <target> | mine]"
|
|
4
|
+
---
|
|
5
|
+
Run a rules audit with mu. Load the mu skill, then read its
|
|
6
|
+
`recipes/rules-audit.md` in full and follow it.
|
|
7
|
+
|
|
8
|
+
Mode and target: ${@:-check the uncommitted changes in this repo}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Tournament with mu: competing attempts judged in pairs against a rubric"
|
|
3
|
+
argument-hint: "<what to choose or build>"
|
|
4
|
+
---
|
|
5
|
+
Run a tournament with mu. Load the mu skill, then read its
|
|
6
|
+
`recipes/tournament.md` in full and follow it. Ask me for the rubric
|
|
7
|
+
first if the task does not imply one.
|
|
8
|
+
|
|
9
|
+
Task: $@
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Run a large or risky job the mu way: DAG, fan-out, adversarial review"
|
|
3
|
+
argument-hint: "<job>"
|
|
4
|
+
---
|
|
5
|
+
Ultrathink this job with mu. Load the mu skill, then read its
|
|
6
|
+
`recipes/ultrathink.md` in full and follow it. Every unit, review, and
|
|
7
|
+
round goes in the task DAG; keep driving until the stop rule holds.
|
|
8
|
+
|
|
9
|
+
Job: $@
|