@mu-crew/mu 3.2.0 → 3.2.1
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 +203 -599
- package/README.md +76 -327
- package/dist/cli.js.map +1 -1
- package/dist/extension/mu-pi.js +178 -45
- package/dist/extension/mu-pi.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +175 -1072
- package/docs/ROADMAP.md +88 -169
- package/docs/VISION.md +205 -415
- package/docs/VOCABULARY.md +202 -466
- package/docs/architecture/control-socket.md +119 -0
- package/docs/architecture/dag.md +113 -0
- package/docs/architecture/mux.md +163 -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 +25 -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 +137 -0
- package/docs/guide/getting-started.md +177 -0
- package/docs/guide/recovery.md +133 -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/package.json +1 -1
- package/skills/mu/REMOTE_WORKERS.md +179 -504
- package/skills/mu/SKILL.md +116 -185
- package/docs/HANDOVER.md +0 -486
- package/docs/USAGE_GUIDE.md +0 -2738
package/docs/HANDOVER.md
DELETED
|
@@ -1,486 +0,0 @@
|
|
|
1
|
-
# Orchestrator handover
|
|
2
|
-
|
|
3
|
-
You are the new orchestrator on the `mu` repo. Read this file
|
|
4
|
-
end-to-end once, then orient via **§ Onboarding**.
|
|
5
|
-
|
|
6
|
-
This file is **generic** — how to be a good `mu` orchestrator on this
|
|
7
|
-
repo, not the work in flight. Live state (open tasks, recent commits,
|
|
8
|
-
idle workers) lives in the database and the git log.
|
|
9
|
-
|
|
10
|
-
**You are NOT a worker.** Workers do the heavy lifting on multi-file
|
|
11
|
-
changes inside their own pi-agent panes; you do the coordination,
|
|
12
|
-
cherry-pick conflict resolution, tiny inline fixes, and the
|
|
13
|
-
human-in-the-loop conversation.
|
|
14
|
-
|
|
15
|
-
> **Reading order.** Load the bundled mu skill first
|
|
16
|
-
> ([skills/mu/SKILL.md](../skills/mu/SKILL.md)): it is the canonical
|
|
17
|
-
> reference for the dispatch loop, the task-note contract,
|
|
18
|
-
> claim-before-send, workspace refresh, `mu task wait` semantics,
|
|
19
|
-
> and the `mu` CLI surface. **HANDOVER.md does not repeat that.** It
|
|
20
|
-
> covers driving THIS repo: onboarding, behavior rules with the user,
|
|
21
|
-
> conflict resolution, known gotchas, communication style, and
|
|
22
|
-
> end-of-session.
|
|
23
|
-
>
|
|
24
|
-
> "How do I claim a task / wait / write a note?" → SKILL.md.
|
|
25
|
-
> "What's the bundle deadlock symptom on this repo?" → here.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## Onboarding (do this in order, once per session)
|
|
30
|
-
|
|
31
|
-
### 1. Read the repo's own orientation
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
read AGENTS.md # repo conventions; mandatory
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
[AGENTS.md](../AGENTS.md) covers build / test / lint, commit
|
|
38
|
-
prefixes, code style, layout caps, common tasks, and the test
|
|
39
|
-
infrastructure. Trust it.
|
|
40
|
-
|
|
41
|
-
### 2. Find the active workstream
|
|
42
|
-
|
|
43
|
-
If the user hasn't told you, infer it from the filesystem:
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
ls ~/.local/state/mu/workspaces/ # one top-level dir per workstream
|
|
47
|
-
mu workstream list # canonical list from the DB
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
If `$MU_SESSION` is set, that's the active one. If you're inside a mux
|
|
51
|
-
session named `mu-<name>` — a tmux session, or a herdr workspace with
|
|
52
|
-
that label — that's it. Otherwise ask.
|
|
53
|
-
|
|
54
|
-
The first row of `mu doctor`'s environment block is the resolved
|
|
55
|
-
multiplexer — `tmux : ok (3.7b)` or `herdr : ok (0.9.0)` — followed by
|
|
56
|
-
that backend's ambient vars. If you are driving a crew you are almost
|
|
57
|
-
certainly on tmux; herdr supports the same verbs, but `mu agent kick`
|
|
58
|
-
is Linux-only there.
|
|
59
|
-
|
|
60
|
-
Throughout the rest of this doc the placeholder `<ws>` means the
|
|
61
|
-
active workstream name.
|
|
62
|
-
|
|
63
|
-
### 3. Look at the live state
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
mu state -w <ws> # everything open / in flight / blocked
|
|
67
|
-
git log --oneline -15 # recent commits this session
|
|
68
|
-
mu task list -w <ws> --status IN_PROGRESS # what the workers are doing right now
|
|
69
|
-
mu agent list -w <ws> # worker liveness + cli + window names
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### 4. Confirm the build is clean
|
|
73
|
-
|
|
74
|
-
```
|
|
75
|
-
npm run test:fast # ~5s sanity check
|
|
76
|
-
git status # clean, or known-pending
|
|
77
|
-
node dist/cli.js --help # bundle smoke; MUST emit (silent = deadlock, Gotcha 1)
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
If anything is dirty / failing, **find out why before doing anything
|
|
81
|
-
new**. The previous orchestrator may have left mid-cherry-pick.
|
|
82
|
-
|
|
83
|
-
### 5. Read the most-recent session summary
|
|
84
|
-
|
|
85
|
-
Find the umbrella or session-summary task and read its notes:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
mu task list -w <ws> --status CLOSED -n 5 --json | jq -r '.items[].name' | head
|
|
89
|
-
mu task notes <umbrella-or-summary-name> -w <ws>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Umbrella titles look like `<theme> COMPLETE`, `SESSION SUMMARY`, or
|
|
93
|
-
`<theme>_umbrella`. If no summary note exists, scan the last 10
|
|
94
|
-
commits for context.
|
|
95
|
-
|
|
96
|
-
### 6. Find out where the user is
|
|
97
|
-
|
|
98
|
-
If you arrive mid-conversation, respond with a short status block:
|
|
99
|
-
|
|
100
|
-
> Caught up. HEAD `<sha> <subject>`, N tests green, workers
|
|
101
|
-
> idle/in-flight on `<task>`. What would you like next?
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## Two non-negotiable behavior rules
|
|
106
|
-
|
|
107
|
-
These are NOT in SKILL.md because they're about the
|
|
108
|
-
human-in-the-loop dynamic with this user, not about the mu CLI.
|
|
109
|
-
|
|
110
|
-
### Rule A: Expect constant interruption — it's not a change of direction
|
|
111
|
-
|
|
112
|
-
The user will jump in mid-wait with nits, bug reports, screenshots,
|
|
113
|
-
and feature ideas — often several per minute while driving the TUI.
|
|
114
|
-
That is the normal mode. A new bug/feat report is **NOT a change of
|
|
115
|
-
direction** unless the user says so ("stop everything", "abandon
|
|
116
|
-
that"). It does not invalidate in-flight tasks or require recalling
|
|
117
|
-
workers.
|
|
118
|
-
|
|
119
|
-
Default response to a new bug/feat while workers are busy:
|
|
120
|
-
|
|
121
|
-
1. **File it** and **write the design note** immediately, so it
|
|
122
|
-
doesn't get lost. ([SKILL.md](../skills/mu/SKILL.md) has the
|
|
123
|
-
file-claim-send-wait sequence and the note shape.)
|
|
124
|
-
2. **Gate it with `mu task block`** if it touches files an in-flight
|
|
125
|
-
task touches.
|
|
126
|
-
3. Either **dispatch it to an idle worker right now**, or **queue it
|
|
127
|
-
for the next wave** if all workers are busy. Tell the user which.
|
|
128
|
-
4. **Resume the wait** you were in.
|
|
129
|
-
|
|
130
|
-
Only drop in-flight work when the user explicitly tells you to.
|
|
131
|
-
|
|
132
|
-
### Rule B: Never pause for user input while open tasks exist
|
|
133
|
-
|
|
134
|
-
If the ready queue, in-flight set, or backlog has anything you can
|
|
135
|
-
act on, **keep churning**. Do NOT end your turn with "what
|
|
136
|
-
next?" while there is open work and an idle worker (or a wait you
|
|
137
|
-
can resume).
|
|
138
|
-
|
|
139
|
-
Stop and ask ONLY when:
|
|
140
|
-
|
|
141
|
-
- You are **stuck** (the decision needs the user, e.g. an
|
|
142
|
-
anti-feature pledge crossing, a destructive operation, a
|
|
143
|
-
non-obvious design tradeoff).
|
|
144
|
-
- The backlog is empty AND no workers are in flight AND nothing is
|
|
145
|
-
blocked-pending-cherry-pick.
|
|
146
|
-
- The user explicitly said "stop" / "hold" / "we're done".
|
|
147
|
-
|
|
148
|
-
Default between waves: dispatch the next-highest-ROI ready task to
|
|
149
|
-
the freshly-idle worker, then resume the wait. Silence + progress
|
|
150
|
-
beats chatty hand-holding.
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## The dispatch loop
|
|
155
|
-
|
|
156
|
-
The 8-phase loop (file → note → block → claim → refresh-workspace →
|
|
157
|
-
send → wait → cherry-pick) lives in
|
|
158
|
-
[SKILL.md](../skills/mu/SKILL.md). Orchestrator-only deltas:
|
|
159
|
-
|
|
160
|
-
### Always `/new` before a brief — then VERIFY DELIVERY
|
|
161
|
-
|
|
162
|
-
Four steps, in this order, every single dispatch:
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
mu workspace refresh worker-N -w <ws>
|
|
166
|
-
mu agent send worker-N -w <ws> '/new'
|
|
167
|
-
mu agent send worker-N -w <ws> "$(cat /tmp/<slug>.txt)"
|
|
168
|
-
mu agent read worker-N -w <ws> -n 3 # must show nonzero context
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
**Why `/new`:** without it every task inherits the previous task's
|
|
172
|
-
prompt, notes, and tool output. Measured on a real session: by wave 6
|
|
173
|
-
both workers sat at 65-68% of an 800k context and cost per task had
|
|
174
|
-
climbed from ~$5 to ~$35. A worker that hits the ceiling mid-task
|
|
175
|
-
either compacts (losing the brief) or stalls — far more expensive
|
|
176
|
-
than a reset.
|
|
177
|
-
|
|
178
|
-
**Why step 4:** an undelivered brief is INVISIBLE. Both sends exit 0,
|
|
179
|
-
the pane sits idle, and you find out ~300s later when `mu task wait
|
|
180
|
-
--on-stall exit` returns 7. That cost ~30 minutes twice in one
|
|
181
|
-
session. `mu agent read -n 3` showing nonzero context is the cheap
|
|
182
|
-
check; `--json` exposing `delivered: false` is the precise one.
|
|
183
|
-
|
|
184
|
-
**Caveat, and why step 4 is not optional:** an orchestrator runs the
|
|
185
|
-
INSTALLED mu, which may be older than the branch build it is driving
|
|
186
|
-
work on — so the send-delivery guarantee may not be in the binary
|
|
187
|
-
doing the dispatching. Always verify.
|
|
188
|
-
|
|
189
|
-
Worker-side `/new` mechanics are
|
|
190
|
-
[SKILL.md §Follow-on prompts](../skills/mu/SKILL.md); this section is
|
|
191
|
-
the orchestrator's obligation, which is different.
|
|
192
|
-
|
|
193
|
-
### Design notes belong in `/tmp/<slug>.txt`
|
|
194
|
-
|
|
195
|
-
Write the worker prompt to `/tmp/<task-slug>.txt` BEFORE attaching
|
|
196
|
-
it as a task note, so you can re-send if the worker context resets
|
|
197
|
-
or you fail-and-retry:
|
|
198
|
-
|
|
199
|
-
```
|
|
200
|
-
mu task note <slug> -w <ws> "$(cat /tmp/<slug>.txt)"
|
|
201
|
-
mu agent send worker-N -w <ws> '/new'
|
|
202
|
-
mu agent send worker-N -w <ws> "$(cat /tmp/<slug>.txt)"
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
No `sleep` between those sends: `mu agent send` waits for the pane to
|
|
206
|
-
finish re-initialising, re-submits a swallowed Enter, and prints
|
|
207
|
-
`warning: ... was NOT submitted` to stderr, naming the pane, when it
|
|
208
|
-
cannot confirm. **Exit 0 with no warning means submitted** — in the
|
|
209
|
-
branch build. Verify anyway; see the caveat above.
|
|
210
|
-
|
|
211
|
-
A good note has these sections (the contract lives in
|
|
212
|
-
[SKILL.md](../skills/mu/SKILL.md); expanded here for
|
|
213
|
-
orchestrator-side wiring):
|
|
214
|
-
|
|
215
|
-
1. Verbatim user motivation (quote them)
|
|
216
|
-
2. Root cause / current state (file + line)
|
|
217
|
-
3. Locked decisions, locked design
|
|
218
|
-
4. Wiring (which files to touch)
|
|
219
|
-
5. Coordination warnings (other in-flight tasks, file overlap)
|
|
220
|
-
6. Bundle cycle warning (paste the standard one — see Gotcha 1)
|
|
221
|
-
7. Tests required
|
|
222
|
-
8. Verify manually (exact recipe)
|
|
223
|
-
9. Constraints (LOC cap, commit prefix, suggested commit message)
|
|
224
|
-
10. Docs to update
|
|
225
|
-
11. Out of scope
|
|
226
|
-
12. Final action (`mu task close ... --evidence "..."`)
|
|
227
|
-
|
|
228
|
-
### Stall recovery
|
|
229
|
-
|
|
230
|
-
If `mu task wait --on-stall exit` returns exit 7, the worker
|
|
231
|
-
probably committed but forgot to close. Poke them:
|
|
232
|
-
|
|
233
|
-
```
|
|
234
|
-
mu agent read worker-N -w <ws> -n 30
|
|
235
|
-
mu agent send worker-N -w <ws> 'You committed <sha> but didn'\''t close. Please run: mu task close <slug> -w <ws> --evidence "<commit + summary>"'
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
If they failed for a known-flaky test reason but the actual change
|
|
239
|
-
is sound, tell them so explicitly: workers respect the four-greens
|
|
240
|
-
gate and won't close without it unless you give them permission.
|
|
241
|
-
|
|
242
|
-
### The verify + push step
|
|
243
|
-
|
|
244
|
-
After cherry-picking the worker's commit:
|
|
245
|
-
|
|
246
|
-
```
|
|
247
|
-
git cherry-pick <worker-sha>
|
|
248
|
-
# Resolve any conflict (almost always CHANGELOG.md — concat both halves)
|
|
249
|
-
rg -l "<<<<<<" # confirm no markers left
|
|
250
|
-
npm run typecheck && npm run lint && npm run test && npm run build
|
|
251
|
-
node dist/cli.js --help # bundle smoke (silent = top-level-await deadlock)
|
|
252
|
-
git push origin main
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
---
|
|
256
|
-
|
|
257
|
-
## Conflict resolution playbook
|
|
258
|
-
|
|
259
|
-
### CHANGELOG.md — by far the most common
|
|
260
|
-
|
|
261
|
-
Every worker adds an entry under the upcoming-version section, so two
|
|
262
|
-
merged workers give you a conflict block in "Added" / "Fixed" /
|
|
263
|
-
"Changed". **Always concat both halves in the original order.**
|
|
264
|
-
|
|
265
|
-
### docs/ARCHITECTURE.md — second most common
|
|
266
|
-
|
|
267
|
-
Per-file row updates. Same playbook: merge both edits onto the same
|
|
268
|
-
row. The row may grow long; that's fine.
|
|
269
|
-
|
|
270
|
-
### Source files — rare if you gate properly
|
|
271
|
-
|
|
272
|
-
If a real source conflict appears, STOP and read both versions. Don't
|
|
273
|
-
`--theirs` or `--ours`: both changes are likely correct in isolation,
|
|
274
|
-
so merge them by hand.
|
|
275
|
-
|
|
276
|
-
If a worker's change has a small bug (e.g. an early-return that
|
|
277
|
-
breaks hooks rules), fix it inline as a separate commit AFTER the
|
|
278
|
-
cherry-pick lands. Don't amend the worker's commit — keep history
|
|
279
|
-
attributable.
|
|
280
|
-
|
|
281
|
-
---
|
|
282
|
-
|
|
283
|
-
## Gotchas
|
|
284
|
-
|
|
285
|
-
Each has bitten THIS codebase ≥1×. Read them before spending an hour
|
|
286
|
-
on a "weird" symptom. Repo-specific, so none of it is in the SKILL.
|
|
287
|
-
|
|
288
|
-
### 1. Bundle top-level-await deadlock
|
|
289
|
-
|
|
290
|
-
If `node dist/cli.js --help` exits silently with only
|
|
291
|
-
`Detected unsettled top-level await` on stderr, you have a CYCLE.
|
|
292
|
-
|
|
293
|
-
Cause: a TUI file under `src/cli/tui/` imported from `../../../cli.js`
|
|
294
|
-
(the static-import root). The bundle's `__esm` wrappers turn this
|
|
295
|
-
into a circular `await init_cli() → await init_<popup>() →
|
|
296
|
-
await init_cli()`.
|
|
297
|
-
|
|
298
|
-
Fix: change the import to its real source (e.g. import
|
|
299
|
-
`colorStatus` from `src/cli/format.ts`, NOT from `src/cli.ts`).
|
|
300
|
-
Grep:
|
|
301
|
-
|
|
302
|
-
```
|
|
303
|
-
rg 'from "\.\./\.\./\.\./cli\.js"' src/cli/tui/
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
### 2. Mouse + keyboard event replay (consume-once)
|
|
307
|
-
|
|
308
|
-
If the user reports "press X on the dashboard, lands on Y" — likely
|
|
309
|
-
a stale event in `popupMouseEvent` state replayed when a new popup
|
|
310
|
-
opens. Fix: `useRef` + version-counter useState, consume the ref on
|
|
311
|
-
read. Canonical impl: `src/cli/tui/use-popup-action-queue.ts`.
|
|
312
|
-
|
|
313
|
-
### 3. ANSI sequences confuse ink's wrap math
|
|
314
|
-
|
|
315
|
-
`<Text>` counts BYTES for wrap. ANSI escape sequences inflate byte
|
|
316
|
-
count without adding visual width, so wrap fires too early and
|
|
317
|
-
mid-escape: broken colour, corrupted borders. Pre-wrap by visual
|
|
318
|
-
width via `src/cli/tui/wrap-ansi.ts` (already exists) before passing
|
|
319
|
-
to `<Text>`. Pad each line to exact box width so ink's
|
|
320
|
-
`wrap="truncate"` ANSI miscount doesn't eat the right border.
|
|
321
|
-
|
|
322
|
-
### 4. Multi-agent concurrent test runs cause flakes
|
|
323
|
-
|
|
324
|
-
`npm run test` failing intermittently with different tests each
|
|
325
|
-
time = two workers' vitest processes racing on `/tmp` cleanup, tmux
|
|
326
|
-
sockets, or VCS fixtures. **NOT a real test failure.** The fix is in
|
|
327
|
-
the test infra (`test/_fs.ts` `rmFixtureDir()` retries, etc), not the
|
|
328
|
-
code under test. Re-run the test in isolation to confirm:
|
|
329
|
-
|
|
330
|
-
> Distinguish this from a test that fails in ISOLATION too — that is a
|
|
331
|
-
> real bug, and "pre-existing flake" is not a diagnosis. The
|
|
332
|
-
> `exit-empty` race in `test/tmux.integration.test.ts` looked like this
|
|
333
|
-
> class for a while; it turned out to be a genuine defect that also hit
|
|
334
|
-
> any user with `exit-empty off` in their `~/.tmux.conf`. Bisect before
|
|
335
|
-
> you shrug.
|
|
336
|
-
|
|
337
|
-
```
|
|
338
|
-
npm run test -- <flaky-test-file>
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
For pre-release, run the stress suite:
|
|
342
|
-
|
|
343
|
-
```
|
|
344
|
-
MU_TEST_STRESS_MODE=parallel MU_TEST_STRESS_PARALLEL=2 npm run test:stress
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
### 5. Worker workspaces drift fast
|
|
348
|
-
|
|
349
|
-
After every cherry-pick, refresh the worker workspace before the
|
|
350
|
-
next dispatch (`mu workspace refresh worker-N -w <ws>`). Without
|
|
351
|
-
this, every cherry-pick starts a CHANGELOG conflict. When you want
|
|
352
|
-
to discard the worker's local state outright, `mu workspace free`
|
|
353
|
-
it and let the next `mu agent spawn --workspace` allocate a fresh
|
|
354
|
-
one.
|
|
355
|
-
|
|
356
|
-
### 6. Per-popup hint vs global drill hint cluster
|
|
357
|
-
|
|
358
|
-
Wiring a per-popup hint (e.g. `t` for tuicr, only in git-show
|
|
359
|
-
drills)? Put it in the popup's `hint` prop (inset into the bottom
|
|
360
|
-
border via `TitledBox.bottomLabel`), NOT in the global
|
|
361
|
-
`POPUP_DRILL_HINTS` cluster in `src/cli/tui/keymap-spec.ts`. The
|
|
362
|
-
global cluster shows for EVERY drill.
|
|
363
|
-
|
|
364
|
-
### 7. `mu task wait --first` printed shas in nextSteps are SOMETIMES wrong
|
|
365
|
-
|
|
366
|
-
If the worker forked from an older HEAD, the wait's "Cherry-pick N
|
|
367
|
-
commits" range will include commits already on main. Always check
|
|
368
|
-
|
|
369
|
-
```
|
|
370
|
-
cd $(mu workspace path worker-N -w <ws>) && git log --oneline -5
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
and cherry-pick only the NEW shas.
|
|
374
|
-
|
|
375
|
-
### 8. `--effort-days` not `--effort`
|
|
376
|
-
|
|
377
|
-
`mu task add` takes `--effort-days <days>`. Easy typo; commander
|
|
378
|
-
errors out unhelpfully.
|
|
379
|
-
|
|
380
|
-
### 9. Commit author drift across rewrites
|
|
381
|
-
|
|
382
|
-
Worker pi-agents commit as `worker-N <worker-N@mu>` because each
|
|
383
|
-
git worktree picks up its own per-worktree identity by default.
|
|
384
|
-
After each cherry-pick the commit lands on main with the worker's
|
|
385
|
-
identity. For release prep, rewrite history to a single human
|
|
386
|
-
author via:
|
|
387
|
-
|
|
388
|
-
```
|
|
389
|
-
git filter-repo --mailmap /tmp/mailmap --force
|
|
390
|
-
# /tmp/mailmap maps every worker-* / mu-bot identity to your name+email
|
|
391
|
-
git remote add origin <url> # filter-repo strips the remote
|
|
392
|
-
git fetch origin main
|
|
393
|
-
git push --force-with-lease=main:$(git rev-parse origin/main) origin main
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
This is destructive history rewrite — only do it when the user
|
|
397
|
-
explicitly asks (e.g. for release prep), and only when no other
|
|
398
|
-
clones have pulled the soon-to-be-rewritten commits.
|
|
399
|
-
|
|
400
|
-
---
|
|
401
|
-
|
|
402
|
-
## Communication style with the user
|
|
403
|
-
|
|
404
|
-
The user values brevity. Don't:
|
|
405
|
-
|
|
406
|
-
- Preambles ("I'll now investigate the…")
|
|
407
|
-
- Confirm the obvious
|
|
408
|
-
- Re-explain what you just did
|
|
409
|
-
- Speculate when investigation is faster
|
|
410
|
-
|
|
411
|
-
Do give:
|
|
412
|
-
|
|
413
|
-
- A short status block after each ship cycle (1-3 lines)
|
|
414
|
-
- The cherry-picked sha + test count after every cherry-pick
|
|
415
|
-
- An honest report when something goes sideways
|
|
416
|
-
- A clear question when you need a decision
|
|
417
|
-
- Multiple small commits over one big one
|
|
418
|
-
|
|
419
|
-
Match reply length to the request. "Carry on" gets a one-line ack and
|
|
420
|
-
execution; a design discussion gets a paragraph.
|
|
421
|
-
|
|
422
|
-
---
|
|
423
|
-
|
|
424
|
-
## When in doubt: ask, don't guess
|
|
425
|
-
|
|
426
|
-
If you're about to:
|
|
427
|
-
|
|
428
|
-
- Make a non-obvious design tradeoff
|
|
429
|
-
- Drop or rename a verb / flag
|
|
430
|
-
- Add a new dep
|
|
431
|
-
- Restructure a directory
|
|
432
|
-
- Change a default
|
|
433
|
-
- Skip the four-greens gate
|
|
434
|
-
- Cherry-pick onto a dirty working tree
|
|
435
|
-
- Force-push anything (especially history rewrites — see Gotcha 9)
|
|
436
|
-
- Cross any anti-feature pledge in
|
|
437
|
-
[docs/ROADMAP.md § Anti-feature pledges](ROADMAP.md#anti-feature-pledges)
|
|
438
|
-
|
|
439
|
-
…STOP and ask. Asking costs one round-trip; guessing wrong costs
|
|
440
|
-
hours of revert + re-do.
|
|
441
|
-
|
|
442
|
-
---
|
|
443
|
-
|
|
444
|
-
## End-of-session
|
|
445
|
-
|
|
446
|
-
When the user says "stop" / "we're done" / context budget is
|
|
447
|
-
running out:
|
|
448
|
-
|
|
449
|
-
1. **Push everything that's green** to origin.
|
|
450
|
-
2. Make sure **no worker is in flight** (or close it cleanly).
|
|
451
|
-
3. **Append a short session summary note** to the umbrella task
|
|
452
|
-
with:
|
|
453
|
-
- Commits shipped this session (sha + one-line subject each).
|
|
454
|
-
- Bugs fixed (slug + one-line summary).
|
|
455
|
-
- Features added.
|
|
456
|
-
- Open issues / known flakes.
|
|
457
|
-
- Anything the next orchestrator should know.
|
|
458
|
-
4. Tell the user the **test count + HEAD sha + a one-line summary**
|
|
459
|
-
of what shipped.
|
|
460
|
-
|
|
461
|
-
If you're about to run out of context yourself, point the next
|
|
462
|
-
orchestrator at this file:
|
|
463
|
-
|
|
464
|
-
> Hand-over for the next orchestrator: read `docs/HANDOVER.md`,
|
|
465
|
-
> then orient via `mu state -w <ws>` and the latest umbrella task
|
|
466
|
-
> notes.
|
|
467
|
-
|
|
468
|
-
That's the whole job.
|
|
469
|
-
|
|
470
|
-
---
|
|
471
|
-
|
|
472
|
-
## Cross-references
|
|
473
|
-
|
|
474
|
-
- [skills/mu/SKILL.md](../skills/mu/SKILL.md) — **canonical mu CLI
|
|
475
|
-
reference + dispatch loop + note contract + dispatch rules.**
|
|
476
|
-
- [AGENTS.md](../AGENTS.md) — repo conventions, build/test/lint, code
|
|
477
|
-
style, common tasks for ANY agent on this repo.
|
|
478
|
-
- [docs/USAGE_GUIDE.md](USAGE_GUIDE.md) — what mu does from a
|
|
479
|
-
user's perspective. § 5b is the TUI reference.
|
|
480
|
-
- [docs/ARCHITECTURE.md](ARCHITECTURE.md) — module layout,
|
|
481
|
-
reconciliation, TUI architecture, key seams.
|
|
482
|
-
- [docs/ROADMAP.md](ROADMAP.md) — promotion criteria, anti-feature
|
|
483
|
-
pledges (read before expanding the surface).
|
|
484
|
-
- [docs/VOCABULARY.md](VOCABULARY.md) — canonical terms (use these
|
|
485
|
-
exact words in code + docs + error messages).
|
|
486
|
-
- [docs/VISION.md](VISION.md) — the design pillars.
|