@femtomc/mu-agent 26.2.107 → 26.2.108

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.
@@ -10,14 +10,14 @@ Use this meta-skill when the user asks for general `mu` operation guidance and y
10
10
  ## Subskills
11
11
 
12
12
  - `mu` — default CLI-first operating workflow (inspect, mutate, verify, handoff).
13
- - `memory` — historical context retrieval, timeline reconstruction, and memory-index maintenance.
13
+ - `memory` — prior-context retrieval, timeline reconstruction, and memory-index maintenance.
14
14
  - `tmux` — persistent terminal/session substrate for bounded command execution and fan-out.
15
15
  - `code-mode` — tmux-backed REPL loops for iterative execution and context compression.
16
16
 
17
17
  ## Selection guide
18
18
 
19
19
  1. Start with `mu` for most day-to-day operator work.
20
- 2. Add `memory` when historical context or timeline anchors are required.
20
+ 2. Add `memory` when prior context or timeline anchors are required.
21
21
  3. Add `tmux` when durable shell state or parallel worker shells are needed.
22
22
  4. Add `code-mode` when solving by live execution is cheaper than chat-only reasoning.
23
23
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: memory
3
- description: "Runs cross-store memory retrieval and index maintenance workflows with bounded filters and timeline anchors. Use when querying historical context or repairing memory index health."
3
+ description: "Runs cross-store memory retrieval and index maintenance workflows with bounded filters and timeline anchors. Use when querying prior context or repairing memory index health."
4
4
  ---
5
5
 
6
6
  # memory
7
7
 
8
- Use this skill when the user asks for historical context lookup, timeline reconstruction,
8
+ Use this skill when the user asks for prior-context lookup, timeline reconstruction,
9
9
  or memory index diagnostics.
10
10
 
11
11
  ## Contents
@@ -197,7 +197,15 @@ One-shot prompt (no durable session):
197
197
  mu exec --message "<task>" --json
198
198
  ```
199
199
 
200
- In attached terminal operator chat, `/mu` helpers are available (`/mu events`, `/mu hud ...`, `/mu help`).
200
+ In attached terminal operator chat, `/mu` helpers are available (`/mu events`, `/mu ui status`, `/mu ui snapshot compact`, `/mu help`).
201
+
202
+ Canonical visibility checks while running orchestrated work:
203
+
204
+ ```bash
205
+ /mu ui status
206
+ /mu ui snapshot compact
207
+ /mu ui snapshot multiline
208
+ ```
201
209
 
202
210
  ## Durable automation handoff
203
211
 
@@ -209,10 +217,13 @@ mu cron --help
209
217
  ```
210
218
 
211
219
  When work is multi-step and issue-graph driven, use `planning` to shape the DAG,
212
- then `hud` for canonical HUD behavior, then `protocol` to keep DAG
213
- semantics consistent, then `control-flow` for explicit loop/termination policy,
214
- then `model-routing` for per-issue provider/model/thinking selection overlays,
215
- then `execution` for durable execution supervision.
220
+ then `protocol` to keep DAG semantics consistent, then `control-flow` for explicit
221
+ loop/termination policy, then `model-routing` for per-issue provider/model/thinking
222
+ selection overlays, then `execution` for durable execution supervision.
223
+ Keep operator↔human communication mu_ui-first across these skills:
224
+ - one non-interactive status doc per active profile (`metadata.profile.variant: "status"`)
225
+ - separate interactive prompt docs for decisions (`metadata.command_text` actions)
226
+ - explicit `mu_ui remove` teardown for resolved prompts and completed passes
216
227
  For REPL-driven exploration and context compression, use `code-mode`.
217
228
  For persistent terminal sessions and worker fan-out mechanics, use `tmux`.
218
229
  For recurring bounded automation loops, use `heartbeats`.
@@ -234,9 +245,9 @@ For wall-clock schedules (one-shot, interval, cron-expression), use `crons`.
234
245
 
235
246
  ## Escalation map
236
247
 
237
- - Historical context retrieval and index maintenance: **`memory`**
248
+ - Prior-context retrieval and index maintenance: **`memory`**
238
249
  - Planning/decomposition and DAG review: **`planning`**
239
- - HUD contract/state updates across surfaces: **`hud`**
250
+ - mu_ui-first status/prompt communication patterns for DAG work: **`planning`**, **`execution`**, **`control-flow`**, **`model-routing`**
240
251
  - Shared DAG semantics for planning + execution: **`protocol`**
241
252
  - Loop/termination policy overlays (review gates, retries, escalation): **`control-flow`**
242
253
  - Per-issue model/provider/thinking selection overlays: **`model-routing`**
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: subagents
3
- description: "Meta-skill for protocol-driven planning and execution. Routes to planning, protocol, execution, control-flow, model-routing, and hud."
3
+ description: "Meta-skill for protocol-driven planning and execution. Routes to planning, protocol, execution, control-flow, and model-routing with mu_ui-first communication."
4
4
  ---
5
5
 
6
6
  # subagents
@@ -14,21 +14,105 @@ Use this meta-skill when work should run through the full multi-agent DAG stack.
14
14
  - `execution` — durable orchestration/supervision loop over the DAG.
15
15
  - `control-flow` — loop/termination overlays (`flow:*`) on top of protocol primitives.
16
16
  - `model-routing` — provider/model/thinking overlays (`route:*`) from live harness capabilities.
17
- - `hud` — canonical HUD ownership/update/teardown contract.
18
17
 
19
- ## Hard-cutover naming
18
+ ## Naming conventions
20
19
 
21
20
  - Use `protocol` (not `orchestration`).
22
- - Use `execution` (not the old execution leaf named `subagents`).
21
+ - Use `execution` for execution/supervision workflows.
23
22
 
24
23
  ## Recommended bundles
25
24
 
26
- - Planning bundle: `planning` + `protocol` + `hud`
27
- - Execution bundle: `execution` + `protocol` + `hud`
25
+ - Planning bundle: `planning` + `protocol`
26
+ - Execution bundle: `execution` + `protocol`
28
27
  - Policy overlays: add `control-flow` and/or `model-routing` as needed
29
28
 
29
+ ## Canonical mu_ui communication pattern
30
+
31
+ Use `mu_ui` as the shared operator↔human surface during planning/execution passes.
32
+
33
+ ```bash
34
+ /mu ui status
35
+ /mu ui snapshot compact
36
+ /mu ui snapshot multiline
37
+ ```
38
+
39
+ Status doc example (`ui:subagents`):
40
+
41
+ ```json
42
+ {
43
+ "action": "set",
44
+ "doc": {
45
+ "v": 1,
46
+ "ui_id": "ui:subagents",
47
+ "title": "Subagents execution status",
48
+ "summary": "ready=2 · active=1 · blocked=0",
49
+ "components": [
50
+ {
51
+ "kind": "key_value",
52
+ "id": "queue",
53
+ "title": "Queue",
54
+ "rows": [
55
+ { "key": "ready", "value": "2" },
56
+ { "key": "active", "value": "1" },
57
+ { "key": "blocked", "value": "0" }
58
+ ],
59
+ "metadata": {}
60
+ }
61
+ ],
62
+ "actions": [],
63
+ "revision": { "id": "subagents-status", "version": 3 },
64
+ "updated_at_ms": 1772060000000,
65
+ "metadata": {
66
+ "profile": {
67
+ "id": "subagents",
68
+ "variant": "status",
69
+ "snapshot": {
70
+ "compact": "ready=2 · active=1 · blocked=0",
71
+ "multiline": "ready: 2\nactive: 1\nblocked: 0"
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ Interactive prompt example (`ui:subagents:handoff`):
80
+
81
+ ```json
82
+ {
83
+ "action": "set",
84
+ "doc": {
85
+ "v": 1,
86
+ "ui_id": "ui:subagents:handoff",
87
+ "title": "Execution handoff decision",
88
+ "components": [
89
+ { "kind": "text", "id": "question", "text": "Close root now?", "metadata": {} }
90
+ ],
91
+ "actions": [
92
+ {
93
+ "id": "close-root",
94
+ "label": "Close root",
95
+ "kind": "primary",
96
+ "payload": {},
97
+ "metadata": { "command_text": "/answer close-root" }
98
+ }
99
+ ],
100
+ "revision": { "id": "subagents-handoff", "version": 1 },
101
+ "updated_at_ms": 1772060005000,
102
+ "metadata": { "profile": { "id": "subagents-handoff", "variant": "interactive" } }
103
+ }
104
+ }
105
+ ```
106
+
107
+ Teardown/handoff uses explicit removes:
108
+
109
+ ```json
110
+ {"action":"remove","ui_id":"ui:subagents:handoff"}
111
+ {"action":"remove","ui_id":"ui:subagents"}
112
+ ```
113
+
30
114
  ## Common patterns
31
115
 
32
- - **End-to-End Orchestration**: Route to `planning` to get a structured issue DAG, present the plan in the `hud` to the user, then route to `execution` to drive the workers until the DAG is complete.
116
+ - **End-to-End Orchestration**: Route to `planning` to get a structured issue DAG, publish plan state in `ui:planning` (status) plus `ui:planning:approval` (interactive prompt) when needed, then route to `execution` to drive workers until DAG completion.
33
117
  - **DAG Recovery / Unblocking**: If a DAG stalls, route to `protocol` to inspect `mu issues ready` constraints, followed by a bounded `execution` pass to claim and manually unblock the stalled task.
34
- - **Differentiated Model Provisioning**: If different nodes need different abilities (e.g. specialized docs vs. complex refactoring), add `model-routing` to set `route:model-routing-v1` policies per issue. The `execution` worker shell will then automatically spin up the required model profiles based on those policies.
118
+ - **Differentiated Model Provisioning**: If different nodes need different abilities (for example specialized docs vs. complex refactoring), add `model-routing` to set `route:model-routing-v1` policies per issue. The `execution` worker shell will then launch the required model profiles based on those policies.
@@ -17,7 +17,7 @@ shared protocol.
17
17
  - [Transition table](#transition-table)
18
18
  - [Planning handoff contract](#planning-handoff-contract)
19
19
  - [Subagents/heartbeat execution contract](#subagentsheartbeat-execution-contract)
20
- - [HUD visibility and teardown](#hud-visibility-and-teardown)
20
+ - [mu_ui visibility and handoff](#mu_ui-visibility-and-handoff)
21
21
  - [Evaluation scenarios](#evaluation-scenarios)
22
22
 
23
23
  ## Purpose
@@ -37,7 +37,7 @@ Load these skills before applying control-flow policies:
37
37
  - `protocol` (protocol primitives/invariants)
38
38
  - `execution` (durable execution runtime)
39
39
  - `heartbeats` and/or `crons` (scheduler clock)
40
- - `hud` (required visibility/handoff surface)
40
+ - `mu` (for `/mu ui` inspection commands and communication checks)
41
41
 
42
42
  ## Core contract
43
43
 
@@ -128,29 +128,134 @@ Per orchestrator tick:
128
128
  4. Verify with:
129
129
  - `mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --pretty`
130
130
  - `mu issues validate <root-id>`
131
- 5. Post one concise ORCH_PASS update.
132
- 6. If final: disable heartbeat program.
131
+ 5. Upsert control-flow visibility via `mu_ui` (`ui_id:"ui:subagents"` when orchestration is shared, or `ui_id:"ui:control-flow"` when standalone).
132
+ 6. Post one concise ORCH_PASS update.
133
+ 7. If final: disable heartbeat program.
133
134
 
134
135
  Reusable bounded heartbeat prompt fragment:
135
136
 
136
137
  ```text
137
- Use skills subagents, protocol, execution, control-flow, and hud.
138
+ Use skills subagents, protocol, execution, control-flow, and mu.
138
139
  For root <root-id>, enforce flow:review-gated-v1 with spawn-per-attempt rounds.
139
- Run exactly one bounded control-flow transition pass, verify DAG state,
140
+ Run exactly one bounded control-flow transition pass, keep control-flow visibility
141
+ current via mu_ui (`ui:subagents` or `ui:control-flow`), verify DAG state,
140
142
  post one ORCH_PASS, and stop. If validate is final, disable the supervising
141
143
  heartbeat and report completion.
142
144
  ```
143
145
 
144
- ## HUD visibility and teardown
146
+ ## mu_ui visibility and handoff
147
+
148
+ Use `mu_ui` as the primary communication surface for active control-flow
149
+ execution.
150
+
151
+ - Publish control-flow status in one status-profile doc:
152
+ - shared orchestration: `ui_id:"ui:subagents"`
153
+ - standalone control-flow loop: `ui_id:"ui:control-flow"`
154
+ - Set profile metadata for deterministic snapshots:
155
+ - `metadata.profile.id: "subagents"` or `"control-flow"`
156
+ - `metadata.profile.variant: "status"`
157
+ - `metadata.profile.snapshot.compact|multiline`
158
+ - Keep status docs non-interactive (`actions: []`).
159
+ - For user decisions (for example max-round escalation), publish a separate
160
+ interactive prompt doc (for example `ui_id:"ui:control-flow:escalation"`).
161
+ - Update status docs each bounded pass before posting `ORCH_PASS`.
162
+ - On completion or handoff, remove control-flow-owned docs with explicit
163
+ `mu_ui remove` actions. Prefer `remove` over `clear`.
164
+
165
+ ### Canonical status doc (`ui:control-flow`)
166
+
167
+ ```json
168
+ {
169
+ "action": "set",
170
+ "doc": {
171
+ "v": 1,
172
+ "ui_id": "ui:control-flow",
173
+ "title": "Control-flow status",
174
+ "summary": "policy=review-gated · round=2/3 · state=review_pending",
175
+ "components": [
176
+ {
177
+ "kind": "key_value",
178
+ "id": "policy",
179
+ "title": "Review gate",
180
+ "rows": [
181
+ { "key": "policy", "value": "flow:review-gated-v1" },
182
+ { "key": "round", "value": "2/3" },
183
+ { "key": "attempt", "value": "mu-attempt-2" },
184
+ { "key": "review", "value": "mu-review-2" },
185
+ { "key": "next", "value": "Run review_2" }
186
+ ],
187
+ "metadata": {}
188
+ }
189
+ ],
190
+ "actions": [],
191
+ "revision": { "id": "control-flow-status", "version": 5 },
192
+ "updated_at_ms": 1772067720000,
193
+ "metadata": {
194
+ "profile": {
195
+ "id": "control-flow",
196
+ "variant": "status",
197
+ "snapshot": {
198
+ "compact": "round=2/3 · state=review_pending",
199
+ "multiline": "policy: review-gated\nround: 2/3\nstate: review_pending\nnext: run review_2"
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
205
+ ```
145
206
 
146
- HUD usage is not optional for active control-flow execution.
207
+ ### Canonical escalation prompt (`ui:control-flow:escalation`)
208
+
209
+ ```json
210
+ {
211
+ "action": "set",
212
+ "doc": {
213
+ "v": 1,
214
+ "ui_id": "ui:control-flow:escalation",
215
+ "title": "Review rounds exhausted",
216
+ "summary": "Need user decision after max failed review rounds.",
217
+ "components": [
218
+ {
219
+ "kind": "text",
220
+ "id": "question",
221
+ "text": "Max review rounds were reached. Should execution open another attempt or stop for manual intervention?",
222
+ "metadata": {}
223
+ }
224
+ ],
225
+ "actions": [
226
+ {
227
+ "id": "open-extra-round",
228
+ "label": "Open one extra round",
229
+ "kind": "primary",
230
+ "payload": {},
231
+ "metadata": { "command_text": "/answer open-extra-round" }
232
+ },
233
+ {
234
+ "id": "stop-and-handoff",
235
+ "label": "Stop and hand off",
236
+ "kind": "secondary",
237
+ "payload": {},
238
+ "metadata": { "command_text": "/answer stop-and-handoff" }
239
+ }
240
+ ],
241
+ "revision": { "id": "control-flow-escalation", "version": 1 },
242
+ "updated_at_ms": 1772067730000,
243
+ "metadata": {
244
+ "profile": {
245
+ "id": "control-flow-escalation",
246
+ "variant": "interactive"
247
+ }
248
+ }
249
+ }
250
+ }
251
+ ```
147
252
 
148
- - If subagents HUD is already active, publish control-flow state in that HUD doc
149
- (for example policy mode, round counters, escalation state).
150
- - If running control-flow standalone, own a dedicated `hud_id:"control-flow"` doc.
151
- - Update HUD state each bounded pass before reporting ORCH_PASS output.
253
+ ### Teardown / handoff
152
254
 
153
- - Follow the HUD ownership and teardown protocol from the `hud` skill when completing or handing off.
255
+ ```json
256
+ {"action":"remove","ui_id":"ui:control-flow:escalation"}
257
+ {"action":"remove","ui_id":"ui:control-flow"}
258
+ ```
154
259
 
155
260
  ## Evaluation scenarios
156
261
 
@@ -12,7 +12,7 @@ This skill is execution-supervision focused:
12
12
 
13
13
  - `mu heartbeats` / `mu cron` = orchestrator wake cadence
14
14
  - `tmux` + `mu exec` = parallel worker execution
15
- - subagents HUD = operator observability/control board
15
+ - `mu_ui` status + prompt docs = operator↔human communication surface
16
16
 
17
17
  Source of truth remains in `mu issues` + `mu forum`.
18
18
 
@@ -22,7 +22,7 @@ Source of truth remains in `mu issues` + `mu forum`.
22
22
  - [Control-flow dependency](#control-flow-dependency)
23
23
  - [Model-routing dependency](#model-routing-dependency)
24
24
  - [Model quality defaults for orchestration](#model-quality-defaults-for-orchestration)
25
- - [HUD skill dependency](#hud-skill-dependency)
25
+ - [mu_ui communication dependency](#mu_ui-communication-dependency)
26
26
  - [tmux skill dependency](#tmux-skill-dependency)
27
27
  - [When to use](#when-to-use)
28
28
  - [Success condition](#success-condition)
@@ -30,7 +30,7 @@ Source of truth remains in `mu issues` + `mu forum`.
30
30
  - [Orchestration loops](#orchestration-loops)
31
31
  - [Bootstrap and queue targeting](#bootstrap-and-queue-targeting)
32
32
  - [Dispatch templates](#dispatch-templates)
33
- - [Execution HUD (subagents profile)](#execution-hud-subagents-profile)
33
+ - [Execution UI (subagents profile)](#execution-ui-subagents-profile)
34
34
  - [Evaluation scenarios](#evaluation-scenarios)
35
35
  - [Reconciliation](#reconciliation)
36
36
  - [Safety](#safety)
@@ -92,13 +92,20 @@ Operational rules:
92
92
  5. Helper shell workflows must fail fast with actionable usage text whenever
93
93
  required provider/model/thinking args are missing.
94
94
 
95
- ## HUD skill dependency
95
+ ## mu_ui communication dependency
96
96
 
97
- Before emitting or mutating subagent HUD state, load **`hud`** and follow its canonical contract.
98
- HUD usage is not optional for this skill.
97
+ Before publishing execution visibility or user prompts, use **`mu_ui`** as the
98
+ primary communication surface.
99
99
 
100
- - Treat `hud` as source-of-truth for generic `mu_hud` actions, `HudDoc` shape, and rendering constraints.
101
- - This execution skill defines orchestration-specific conventions only (for example `hud_id: "subagents"`, queue/activity semantics).
100
+ - Use one status doc at `ui_id:"ui:subagents"` for queue/worker visibility.
101
+ - Encode status profile metadata with:
102
+ - `metadata.profile.id: "subagents"`
103
+ - `metadata.profile.variant: "status"`
104
+ - `metadata.profile.snapshot.compact|multiline` for deterministic snapshots.
105
+ - Keep status docs non-interactive (`actions: []`); publish user prompts in a
106
+ separate interactive `ui_id` (for example `ui:subagents:handoff`).
107
+ - Use `/mu ui status` and `/mu ui snapshot [compact|multiline]` to verify live
108
+ communication state during orchestration passes.
102
109
 
103
110
  ## tmux skill dependency
104
111
 
@@ -161,7 +168,8 @@ mu forum read issue:<root-id> --limit 20 --pretty
161
168
  2. Choose exactly one action/primitive from `protocol`.
162
169
  3. Apply it.
163
170
  4. Verify (`get`, `children`, `ready`, `validate`).
164
- 5. Update `hud_id:"subagents"` (required) and emit a compact snapshot.
171
+ 5. Upsert `ui_id:"ui:subagents"` via `mu_ui` (required) and keep the status
172
+ snapshot current.
165
173
  6. Post a human-facing `ORCH_PASS` update to forum:
166
174
  - start with a short title that captures status in plain language
167
175
  - follow with one concise paragraph covering: project objective context, milestone moved this pass, impact, overall progress, and next high-level step
@@ -210,7 +218,7 @@ thinking="${4:-}"
210
218
  if [ -z "$root_id" ] || [ -z "$provider" ] || [ -z "$model" ] || [ -z "$thinking" ]; then
211
219
  cat >&2 <<'USAGE'
212
220
  usage: ./orch-heartbeat.sh <root-id> <provider> <model> <thinking>
213
- example: ./orch-heartbeat.sh mu-4be265df openai-codex gpt-5.3-codex xhigh
221
+ example: ./orch-heartbeat.sh mu-root-1234 openai-codex gpt-5.3-codex xhigh
214
222
  USAGE
215
223
  exit 64
216
224
  fi
@@ -219,7 +227,7 @@ mu heartbeats create \
219
227
  --title "hierarchical-work-v1 ${root_id}" \
220
228
  --reason orchestration_v1 \
221
229
  --every-ms 15000 \
222
- --prompt "Use skills subagents, protocol, execution, control-flow, model-routing, and hud for root ${root_id}. Run exactly one bounded orchestration pass: inspect the proto:hierarchical-work-v1 queue, perform exactly one corrective orchestration action (including in_progress-without-worker drift recovery) or claim/work-start one ready issue, then verify state. If flow:* policy tags are present, apply one control-flow transition from the control-flow skill in this pass. If route:* policy tags are present, apply one model-routing transition from the model-routing skill in this pass using live `mu control harness` capabilities and per-turn provider/model/thinking overrides. If route:* policy tags are absent, use the high-quality orchestration profile (openai-codex / gpt-5.3-codex / xhigh) for any execution launch in this pass. Any execution launch in this pass must pass explicit overrides: --provider ${provider} --model ${model} --thinking ${thinking}; if this tuple cannot be used, stop and post BLOCKED with remediation options. Report human-facing progress as a titled status note plus one concise paragraph that explains project context, milestone moved, impact, overall progress, and next high-level step; avoid low-level orchestration internals unless diagnosing a blocker/anomaly. Post a matching ORCH_PASS update to issue:${root_id}. Stop when 'mu issues validate ${root_id}' is final."
230
+ --prompt "Use skills subagents, protocol, execution, control-flow, model-routing, and mu for root ${root_id}. Run exactly one bounded orchestration pass: inspect the proto:hierarchical-work-v1 queue, perform exactly one corrective orchestration action (including in_progress-without-worker drift recovery) or claim/work-start one ready issue, then verify state. Maintain operator↔human communication via mu_ui in this pass: keep ui:subagents updated as a status-profile doc (metadata.profile.id=subagents, metadata.profile.variant=status) and, when user input is required, publish a separate interactive ui_id doc with action metadata.command_text. If flow:* policy tags are present, apply one control-flow transition from the control-flow skill in this pass. If route:* policy tags are present, apply one model-routing transition from the model-routing skill in this pass using live `mu control harness` capabilities and per-turn provider/model/thinking overrides. If route:* policy tags are absent, use the high-quality orchestration profile (openai-codex / gpt-5.3-codex / xhigh) for any execution launch in this pass. Any execution launch in this pass must pass explicit overrides: --provider ${provider} --model ${model} --thinking ${thinking}; if this tuple cannot be used, stop and post BLOCKED with remediation options. Report human-facing progress as a titled status note plus one concise paragraph that explains project context, milestone moved, impact, overall progress, and next high-level step; avoid low-level orchestration internals unless diagnosing a blocker/anomaly. Post a matching ORCH_PASS update to issue:${root_id}. Stop when 'mu issues validate ${root_id}' is final."
223
231
  ```
224
232
 
225
233
  Reusable status-voice add-on for heartbeat prompts (copy/paste):
@@ -244,7 +252,7 @@ limit="${5:-3}"
244
252
  if [ -z "$root_id" ] || [ -z "$provider" ] || [ -z "$model" ] || [ -z "$thinking" ]; then
245
253
  cat >&2 <<'USAGE'
246
254
  usage: ./orch-fanout.sh <root-id> <provider> <model> <thinking> [limit]
247
- example: ./orch-fanout.sh mu-4be265df openai-codex gpt-5.3-codex xhigh 3
255
+ example: ./orch-fanout.sh mu-root-1234 openai-codex gpt-5.3-codex xhigh 3
248
256
  USAGE
249
257
  exit 64
250
258
  fi
@@ -253,33 +261,137 @@ run_id="$(date +%Y%m%d-%H%M%S)"
253
261
  for issue_id in $(mu issues ready --root "$root_id" --tag proto:hierarchical-work-v1 --json | jq -r '.[].id' | head -n "$limit"); do
254
262
  session="mu-sub-${run_id}-${issue_id}"
255
263
  tmux new-session -d -s "$session" \
256
- "cd '$PWD' && mu exec --provider '$provider' --model '$model' --thinking '$thinking' 'Use skills subagents, protocol, execution, control-flow, model-routing, and hud. Work issue ${issue_id} using hierarchical-work.protocol/v1. If flow:* policy tags are present, apply the control-flow overlay before selecting the next primitive. If route:* policy tags are present, apply the model-routing overlay using live harness capabilities before selecting the next primitive. Claim first, then run one full control loop.' ; rc=\$?; echo __MU_DONE__:\$rc"
264
+ "cd '$PWD' && mu exec --provider '$provider' --model '$model' --thinking '$thinking' 'Use skills subagents, protocol, execution, control-flow, model-routing, and mu. Work issue ${issue_id} using hierarchical-work.protocol/v1. Keep ui:subagents current via mu_ui status-profile updates and publish separate interactive ui_id docs for user decisions. If flow:* policy tags are present, apply the control-flow overlay before selecting the next primitive. If route:* policy tags are present, apply the model-routing overlay using live harness capabilities before selecting the next primitive. Claim first, then run one full control loop.' ; rc=\$?; echo __MU_DONE__:\$rc"
257
265
  done
258
266
  ```
259
267
 
260
- ## Execution HUD (subagents profile)
268
+ ## Execution UI (subagents profile)
261
269
 
262
- HUD usage is required for this skill. Truth still lives in issues/forum.
270
+ Use `mu_ui` for active execution communication. Truth still lives in issues/forum.
263
271
 
264
272
  ```text
265
- /mu hud on
266
- /mu hud status
267
- /mu hud snapshot
273
+ /mu ui status
274
+ /mu ui snapshot compact
275
+ /mu ui snapshot multiline
268
276
  ```
269
277
 
270
- Tool: `mu_hud`
278
+ ### Canonical status update (`ui:subagents`)
279
+
280
+ ```json
281
+ {
282
+ "action": "set",
283
+ "doc": {
284
+ "v": 1,
285
+ "ui_id": "ui:subagents",
286
+ "title": "Subagents execution status",
287
+ "summary": "workers=2 · ready=3 · blocked=1",
288
+ "components": [
289
+ {
290
+ "kind": "key_value",
291
+ "id": "queue",
292
+ "title": "Queue",
293
+ "rows": [
294
+ { "key": "ready", "value": "3" },
295
+ { "key": "active", "value": "2" },
296
+ { "key": "blocked", "value": "1" },
297
+ { "key": "next", "value": "Validate final synth issue" }
298
+ ],
299
+ "metadata": {}
300
+ },
301
+ {
302
+ "kind": "list",
303
+ "id": "activity",
304
+ "title": "Recent activity",
305
+ "items": [
306
+ { "id": "a1", "label": "Renderer work completed", "detail": "channel render updates merged" },
307
+ { "id": "a2", "label": "Docs pass in progress", "detail": "execution docs update running" }
308
+ ],
309
+ "metadata": {}
310
+ }
311
+ ],
312
+ "actions": [],
313
+ "revision": { "id": "subagents-status", "version": 12 },
314
+ "updated_at_ms": 1772067300000,
315
+ "metadata": {
316
+ "profile": {
317
+ "id": "subagents",
318
+ "variant": "status",
319
+ "snapshot": {
320
+ "compact": "workers=2 · ready=3 · blocked=1",
321
+ "multiline": "workers: 2\nready: 3\nblocked: 1\nnext: validate synth issue"
322
+ }
323
+ }
324
+ }
325
+ }
326
+ }
327
+ ```
328
+
329
+ ### Canonical user prompt (`ui:subagents:handoff`)
330
+
331
+ ```json
332
+ {
333
+ "action": "set",
334
+ "doc": {
335
+ "v": 1,
336
+ "ui_id": "ui:subagents:handoff",
337
+ "title": "Execution handoff decision",
338
+ "summary": "Need user confirmation before final close.",
339
+ "components": [
340
+ {
341
+ "kind": "text",
342
+ "id": "question",
343
+ "text": "Should execution close the root now or open a follow-up issue?",
344
+ "metadata": {}
345
+ },
346
+ {
347
+ "kind": "list",
348
+ "id": "options",
349
+ "title": "Choices",
350
+ "items": [
351
+ { "id": "opt-close", "label": "Close root now" },
352
+ { "id": "opt-followup", "label": "Create follow-up issue first" }
353
+ ],
354
+ "metadata": {}
355
+ }
356
+ ],
357
+ "actions": [
358
+ {
359
+ "id": "close-root",
360
+ "label": "Close root",
361
+ "kind": "primary",
362
+ "payload": {},
363
+ "metadata": { "command_text": "/answer close-root" }
364
+ },
365
+ {
366
+ "id": "create-followup",
367
+ "label": "Create follow-up",
368
+ "kind": "secondary",
369
+ "payload": { "title": "Document remaining follow-up gaps" },
370
+ "metadata": { "command_text": "/answer followup {{title}}" }
371
+ }
372
+ ],
373
+ "revision": { "id": "subagents-handoff", "version": 1 },
374
+ "updated_at_ms": 1772067310000,
375
+ "metadata": {
376
+ "profile": {
377
+ "id": "subagents-handoff",
378
+ "variant": "interactive"
379
+ }
380
+ }
381
+ }
382
+ }
383
+ ```
271
384
 
272
- - Canonical contract: see skill `hud`
273
- - Actions: `status`, `snapshot`, `on`, `off`, `toggle`, `set`, `update`, `replace`, `remove`, `clear`
274
- - Subagents convention: maintain a HUD doc with `hud_id: "subagents"`
275
- - Suggested subagents doc structure:
276
- - chips: health, mode, paused
277
- - sections: queue counts + recent activity lines
278
- - actions: refresh/spawn command hooks (if desired)
279
- - metadata: include `style_preset:"subagents"` for consistent renderer emphasis
280
- - Example update:
281
- - `{"action":"set", "doc": {"hud_id":"subagents", ...}}` (see `hud` skill for exact shape)
282
- - Follow the HUD ownership and teardown protocol from `hud` skill for completion and handoff.
385
+ ### Teardown / handoff semantics
386
+
387
+ - Remove execution-owned interactive docs when the question is resolved.
388
+ - Remove or replace `ui:subagents` when execution completes or hands off.
389
+ - Prefer `remove` over `clear` so other skills keep their docs intact.
390
+
391
+ ```json
392
+ {"action":"remove","ui_id":"ui:subagents:handoff"}
393
+ {"action":"remove","ui_id":"ui:subagents"}
394
+ ```
283
395
 
284
396
  ## Evaluation scenarios
285
397
 
@@ -305,7 +417,8 @@ Tool: `mu_hud`
305
417
  - Merge synth-node outputs into one final user-facing result.
306
418
  - Convert unresolved gaps into new child issues tagged `proto:hierarchical-work-v1`.
307
419
  - Tear down temporary tmux sessions.
308
- - Tear down/handoff `hud_id:"subagents"` ownership following the `hud` skill protocol.
420
+ - Tear down/handoff execution-owned `ui_id`s (at minimum `ui:subagents`) with
421
+ explicit `mu_ui remove` actions.
309
422
 
310
423
  ## Safety
311
424