@femtomc/mu-agent 26.2.106 → 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.
- package/README.md +41 -21
- package/assets/mu-tui-logo.png +0 -0
- package/dist/extensions/index.d.ts +1 -1
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +1 -1
- package/dist/extensions/mu-command-dispatcher.d.ts +0 -1
- package/dist/extensions/mu-command-dispatcher.d.ts.map +1 -1
- package/dist/extensions/mu-command-dispatcher.js +5 -42
- package/dist/extensions/mu-operator.js +2 -2
- package/dist/extensions/mu-serve.js +2 -2
- package/dist/extensions/ui.d.ts +4 -0
- package/dist/extensions/ui.d.ts.map +1 -0
- package/dist/extensions/ui.js +1055 -0
- package/dist/operator.d.ts +93 -255
- package/dist/operator.d.ts.map +1 -1
- package/dist/operator.js +41 -32
- package/package.json +33 -33
- package/prompts/skills/automation/SKILL.md +25 -0
- package/prompts/skills/{crons → automation/crons}/SKILL.md +2 -2
- package/prompts/skills/{heartbeats → automation/heartbeats}/SKILL.md +2 -2
- package/prompts/skills/core/SKILL.md +28 -0
- package/prompts/skills/{code-mode → core/code-mode}/SKILL.md +1 -1
- package/prompts/skills/{memory → core/memory}/SKILL.md +2 -2
- package/prompts/skills/{mu → core/mu}/SKILL.md +52 -9
- package/prompts/skills/{tmux → core/tmux}/SKILL.md +1 -1
- package/prompts/skills/messaging/SKILL.md +27 -0
- package/prompts/skills/subagents/SKILL.md +93 -243
- package/prompts/skills/{control-flow → subagents/control-flow}/SKILL.md +122 -17
- package/prompts/skills/subagents/execution/SKILL.md +428 -0
- package/prompts/skills/{model-routing → subagents/model-routing}/SKILL.md +179 -19
- package/prompts/skills/subagents/planning/SKILL.md +393 -0
- package/prompts/skills/{orchestration → subagents/protocol}/SKILL.md +7 -10
- package/prompts/skills/writing/SKILL.md +3 -2
- package/dist/extensions/hud.d.ts +0 -4
- package/dist/extensions/hud.d.ts.map +0 -1
- package/dist/extensions/hud.js +0 -483
- package/prompts/skills/hud/SKILL.md +0 -205
- package/prompts/skills/planning/SKILL.md +0 -244
- /package/prompts/skills/{setup-discord → messaging/setup-discord}/SKILL.md +0 -0
- /package/prompts/skills/{setup-neovim → messaging/setup-neovim}/SKILL.md +0 -0
- /package/prompts/skills/{setup-slack → messaging/setup-slack}/SKILL.md +0 -0
- /package/prompts/skills/{setup-telegram → messaging/setup-telegram}/SKILL.md +0 -0
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execution
|
|
3
|
+
description: "Runs issue-driven execution supervision with heartbeat orchestration and tmux fan-out. Use when work should progress through durable parallel execution loops."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# execution
|
|
7
|
+
|
|
8
|
+
Use this skill for **durable multi-agent orchestration**: work that must keep moving
|
|
9
|
+
over time, not just one-shot execution.
|
|
10
|
+
|
|
11
|
+
This skill is execution-supervision focused:
|
|
12
|
+
|
|
13
|
+
- `mu heartbeats` / `mu cron` = orchestrator wake cadence
|
|
14
|
+
- `tmux` + `mu exec` = parallel worker execution
|
|
15
|
+
- `mu_ui` status + prompt docs = operator↔human communication surface
|
|
16
|
+
|
|
17
|
+
Source of truth remains in `mu issues` + `mu forum`.
|
|
18
|
+
|
|
19
|
+
## Contents
|
|
20
|
+
|
|
21
|
+
- [Shared protocol dependency](#shared-protocol-dependency)
|
|
22
|
+
- [Control-flow dependency](#control-flow-dependency)
|
|
23
|
+
- [Model-routing dependency](#model-routing-dependency)
|
|
24
|
+
- [Model quality defaults for orchestration](#model-quality-defaults-for-orchestration)
|
|
25
|
+
- [mu_ui communication dependency](#mu_ui-communication-dependency)
|
|
26
|
+
- [tmux skill dependency](#tmux-skill-dependency)
|
|
27
|
+
- [When to use](#when-to-use)
|
|
28
|
+
- [Success condition](#success-condition)
|
|
29
|
+
- [Dispatch modes](#dispatch-modes)
|
|
30
|
+
- [Orchestration loops](#orchestration-loops)
|
|
31
|
+
- [Bootstrap and queue targeting](#bootstrap-and-queue-targeting)
|
|
32
|
+
- [Dispatch templates](#dispatch-templates)
|
|
33
|
+
- [Execution UI (subagents profile)](#execution-ui-subagents-profile)
|
|
34
|
+
- [Evaluation scenarios](#evaluation-scenarios)
|
|
35
|
+
- [Reconciliation](#reconciliation)
|
|
36
|
+
- [Safety](#safety)
|
|
37
|
+
|
|
38
|
+
## Shared protocol dependency
|
|
39
|
+
|
|
40
|
+
This skill executes DAG work defined by **`protocol`**.
|
|
41
|
+
|
|
42
|
+
Before execution begins, load that skill and enforce:
|
|
43
|
+
|
|
44
|
+
- Protocol ID/tag: `hierarchical-work.protocol/v1` + `proto:hierarchical-work-v1`
|
|
45
|
+
- Canonical node kinds, context tags, and invariants
|
|
46
|
+
- Primitive semantics (`read_tree`, `claim`, `spawn`, `fork`, `ask`, `expand`, `complete`, `serial`)
|
|
47
|
+
|
|
48
|
+
Do not run subagent orchestration against alternate protocol tags.
|
|
49
|
+
|
|
50
|
+
## Control-flow dependency
|
|
51
|
+
|
|
52
|
+
When a subtree declares explicit loop/termination policy (for example
|
|
53
|
+
`flow:review-gated-v1`), load **`control-flow`** and apply policy transitions as
|
|
54
|
+
an overlay on orchestration primitives.
|
|
55
|
+
|
|
56
|
+
- Keep DAG structure protocol-valid (`protocol` remains source-of-truth).
|
|
57
|
+
- Compile control-flow decisions into protocol primitives (`spawn`, `expand`,
|
|
58
|
+
`ask`, `complete`, `serial`), not ad-hoc mutations.
|
|
59
|
+
|
|
60
|
+
## Model-routing dependency
|
|
61
|
+
|
|
62
|
+
When a subtree declares per-issue model/provider/thinking policy (for example
|
|
63
|
+
`route:model-routing-v1`), load **`model-routing`** and apply routing transitions
|
|
64
|
+
as an overlay on orchestration primitives.
|
|
65
|
+
|
|
66
|
+
- Keep DAG structure protocol-valid (`protocol` remains source-of-truth).
|
|
67
|
+
- Drive recommendations from live harness capabilities (`mu control harness --json`).
|
|
68
|
+
- Apply route selections with per-turn/per-session overrides (`mu exec`/`mu turn`
|
|
69
|
+
`--provider --model --thinking`) instead of mutating workspace-global defaults.
|
|
70
|
+
- Emit auditable route packets (`ROUTE_RECOMMENDATION`, `ROUTE_FALLBACK`,
|
|
71
|
+
`ROUTE_DEGRADED`) in forum topics.
|
|
72
|
+
|
|
73
|
+
## Model quality defaults for orchestration
|
|
74
|
+
|
|
75
|
+
When executing protocol/runtime/schema/cross-adapter DAGs, enforce an explicit
|
|
76
|
+
high-quality model profile unless the user overrides it.
|
|
77
|
+
|
|
78
|
+
Default high-quality profile:
|
|
79
|
+
|
|
80
|
+
- provider: `openai-codex`
|
|
81
|
+
- model: `gpt-5.3-codex`
|
|
82
|
+
- thinking: `xhigh`
|
|
83
|
+
|
|
84
|
+
Operational rules:
|
|
85
|
+
|
|
86
|
+
1. Worker launches must pass explicit `--provider --model --thinking`.
|
|
87
|
+
2. Do not use mini/fast profiles for close/validate/signoff passes.
|
|
88
|
+
3. If you must downgrade, post a `ROUTE_FALLBACK` packet with rationale and
|
|
89
|
+
expected risk/tradeoff before continuing.
|
|
90
|
+
4. Keep profile policy in `model-routing` (`ROUTE_POLICY`) so skills can update
|
|
91
|
+
behavior without extension-code changes.
|
|
92
|
+
5. Helper shell workflows must fail fast with actionable usage text whenever
|
|
93
|
+
required provider/model/thinking args are missing.
|
|
94
|
+
|
|
95
|
+
## mu_ui communication dependency
|
|
96
|
+
|
|
97
|
+
Before publishing execution visibility or user prompts, use **`mu_ui`** as the
|
|
98
|
+
primary communication surface.
|
|
99
|
+
|
|
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.
|
|
109
|
+
|
|
110
|
+
## tmux skill dependency
|
|
111
|
+
|
|
112
|
+
Before spawning/inspecting worker sessions, load **`tmux`** and follow its
|
|
113
|
+
canonical session lifecycle and bounded send/capture protocol.
|
|
114
|
+
|
|
115
|
+
- Treat `tmux` as source-of-truth for session ownership, completion markers, and teardown.
|
|
116
|
+
- This execution skill defines orchestration semantics and queue policy.
|
|
117
|
+
|
|
118
|
+
## When to use
|
|
119
|
+
|
|
120
|
+
- Work is represented as issue-scoped deliverables with explicit outcomes.
|
|
121
|
+
- Dependencies may unblock over time.
|
|
122
|
+
- You want unattended progress between manual check-ins.
|
|
123
|
+
|
|
124
|
+
## Success condition
|
|
125
|
+
|
|
126
|
+
- Each executable issue is claimed, worked, and closed with an explicit outcome.
|
|
127
|
+
- Results are posted in `issue:<id>` forum topics.
|
|
128
|
+
- Root completion is validated via `mu issues validate <root-id>`.
|
|
129
|
+
|
|
130
|
+
## Dispatch modes
|
|
131
|
+
|
|
132
|
+
### 1) Heartbeat dispatch (orchestrator cadence)
|
|
133
|
+
|
|
134
|
+
Use when you want orchestration to continue over time.
|
|
135
|
+
|
|
136
|
+
Each heartbeat tick runs **one bounded orchestration pass**:
|
|
137
|
+
|
|
138
|
+
1. Read queue/tree state.
|
|
139
|
+
2. Select one protocol primitive/action.
|
|
140
|
+
3. Apply one bounded action.
|
|
141
|
+
4. Verify state + log progress.
|
|
142
|
+
5. Exit.
|
|
143
|
+
|
|
144
|
+
Heartbeat dispatch is the orchestrator clock. It should supervise/advance the graph,
|
|
145
|
+
not run unbounded worker sessions.
|
|
146
|
+
|
|
147
|
+
### 2) tmux dispatch (parallel workers)
|
|
148
|
+
|
|
149
|
+
Use when several ready leaves should execute concurrently now.
|
|
150
|
+
|
|
151
|
+
Spawn one tmux session per ready issue. Each worker claims one issue, executes one
|
|
152
|
+
full issue loop, then exits.
|
|
153
|
+
|
|
154
|
+
## Orchestration loops
|
|
155
|
+
|
|
156
|
+
### Orchestrator heartbeat tick loop
|
|
157
|
+
|
|
158
|
+
For root `<root-id>`:
|
|
159
|
+
|
|
160
|
+
1. Inspect queue and local protocol state:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
mu issues get <root-id> --pretty
|
|
164
|
+
mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --pretty
|
|
165
|
+
mu forum read issue:<root-id> --limit 20 --pretty
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
2. Choose exactly one action/primitive from `protocol`.
|
|
169
|
+
3. Apply it.
|
|
170
|
+
4. Verify (`get`, `children`, `ready`, `validate`).
|
|
171
|
+
5. Upsert `ui_id:"ui:subagents"` via `mu_ui` (required) and keep the status
|
|
172
|
+
snapshot current.
|
|
173
|
+
6. Post a human-facing `ORCH_PASS` update to forum:
|
|
174
|
+
- start with a short title that captures status in plain language
|
|
175
|
+
- follow with one concise paragraph covering: project objective context, milestone moved this pass, impact, overall progress, and next high-level step
|
|
176
|
+
- include queue/worker/drift internals only when diagnosing blocker/anomaly.
|
|
177
|
+
7. Exit tick.
|
|
178
|
+
|
|
179
|
+
Stop automation when `mu issues validate <root-id>` returns final.
|
|
180
|
+
|
|
181
|
+
### Worker issue loop (single issue pass)
|
|
182
|
+
|
|
183
|
+
For claimed issue `<issue-id>` under `<root-id>`:
|
|
184
|
+
|
|
185
|
+
1. Run `read_tree`.
|
|
186
|
+
2. Choose one primitive:
|
|
187
|
+
- route policy present and no valid route decision -> apply one `model-routing` transition
|
|
188
|
+
- missing input -> `ask`
|
|
189
|
+
- needs decomposition -> `expand`
|
|
190
|
+
- directly solvable -> `complete`
|
|
191
|
+
3. Apply primitive.
|
|
192
|
+
4. Verify state.
|
|
193
|
+
5. Post progress to `issue:<issue-id>` focused on deliverable status, capability impact, and next step.
|
|
194
|
+
|
|
195
|
+
Repeat bounded passes until issue closes.
|
|
196
|
+
|
|
197
|
+
## Bootstrap and queue targeting
|
|
198
|
+
|
|
199
|
+
If root DAG does not yet exist, create it using the
|
|
200
|
+
`protocol` bootstrap template first.
|
|
201
|
+
|
|
202
|
+
During orchestration, always scope queue reads with protocol tag:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --pretty
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
## Dispatch templates
|
|
209
|
+
|
|
210
|
+
### A) Heartbeat autopilot (preferred for supervision)
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
root_id="${1:-}"
|
|
214
|
+
provider="${2:-}"
|
|
215
|
+
model="${3:-}"
|
|
216
|
+
thinking="${4:-}"
|
|
217
|
+
|
|
218
|
+
if [ -z "$root_id" ] || [ -z "$provider" ] || [ -z "$model" ] || [ -z "$thinking" ]; then
|
|
219
|
+
cat >&2 <<'USAGE'
|
|
220
|
+
usage: ./orch-heartbeat.sh <root-id> <provider> <model> <thinking>
|
|
221
|
+
example: ./orch-heartbeat.sh mu-root-1234 openai-codex gpt-5.3-codex xhigh
|
|
222
|
+
USAGE
|
|
223
|
+
exit 64
|
|
224
|
+
fi
|
|
225
|
+
|
|
226
|
+
mu heartbeats create \
|
|
227
|
+
--title "hierarchical-work-v1 ${root_id}" \
|
|
228
|
+
--reason orchestration_v1 \
|
|
229
|
+
--every-ms 15000 \
|
|
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."
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Reusable status-voice add-on for heartbeat prompts (copy/paste):
|
|
234
|
+
|
|
235
|
+
```text
|
|
236
|
+
Write each ORCH_PASS as a human status note, not operator telemetry.
|
|
237
|
+
Use a short plain-language title + one concise paragraph covering:
|
|
238
|
+
project objective, milestone moved this pass, impact/precondition,
|
|
239
|
+
overall progress, and next high-level step.
|
|
240
|
+
Keep queue/worker/session internals out unless diagnosing a blocker.
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### B) tmux fan-out (parallel workers)
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
root_id="${1:-}"
|
|
247
|
+
provider="${2:-}"
|
|
248
|
+
model="${3:-}"
|
|
249
|
+
thinking="${4:-}"
|
|
250
|
+
limit="${5:-3}"
|
|
251
|
+
|
|
252
|
+
if [ -z "$root_id" ] || [ -z "$provider" ] || [ -z "$model" ] || [ -z "$thinking" ]; then
|
|
253
|
+
cat >&2 <<'USAGE'
|
|
254
|
+
usage: ./orch-fanout.sh <root-id> <provider> <model> <thinking> [limit]
|
|
255
|
+
example: ./orch-fanout.sh mu-root-1234 openai-codex gpt-5.3-codex xhigh 3
|
|
256
|
+
USAGE
|
|
257
|
+
exit 64
|
|
258
|
+
fi
|
|
259
|
+
|
|
260
|
+
run_id="$(date +%Y%m%d-%H%M%S)"
|
|
261
|
+
for issue_id in $(mu issues ready --root "$root_id" --tag proto:hierarchical-work-v1 --json | jq -r '.[].id' | head -n "$limit"); do
|
|
262
|
+
session="mu-sub-${run_id}-${issue_id}"
|
|
263
|
+
tmux new-session -d -s "$session" \
|
|
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"
|
|
265
|
+
done
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## Execution UI (subagents profile)
|
|
269
|
+
|
|
270
|
+
Use `mu_ui` for active execution communication. Truth still lives in issues/forum.
|
|
271
|
+
|
|
272
|
+
```text
|
|
273
|
+
/mu ui status
|
|
274
|
+
/mu ui snapshot compact
|
|
275
|
+
/mu ui snapshot multiline
|
|
276
|
+
```
|
|
277
|
+
|
|
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
|
+
```
|
|
384
|
+
|
|
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
|
+
```
|
|
395
|
+
|
|
396
|
+
## Evaluation scenarios
|
|
397
|
+
|
|
398
|
+
1. **Heartbeat bounded-orchestration tick**
|
|
399
|
+
- Setup: root issue with multiple ready leaves tagged `proto:hierarchical-work-v1`.
|
|
400
|
+
- Expected: one heartbeat tick performs exactly one bounded orchestration action, verifies state, posts a high-level titled narrative status update, and exits.
|
|
401
|
+
|
|
402
|
+
2. **tmux fan-out on ready leaves**
|
|
403
|
+
- Setup: at least three independent ready issues under one root.
|
|
404
|
+
- Expected: one worker session per issue is spawned, each worker claims before work, and each writes `START`/`RESULT` packets to `issue:<id>`.
|
|
405
|
+
|
|
406
|
+
3. **Human-question blocking flow (`ask`)**
|
|
407
|
+
- Setup: worker encounters missing critical input.
|
|
408
|
+
- Expected: skill applies protocol `ask` semantics, creates a human-input node, and downstream work remains blocked until the answer issue closes.
|
|
409
|
+
|
|
410
|
+
4. **Model-routing overlay with fallback**
|
|
411
|
+
- Setup: ready issue tagged `route:model-routing-v1` and selected model fails at launch.
|
|
412
|
+
- Expected: one bounded pass emits `ROUTE_FALLBACK`, selects alternate/provider fallback deterministically, and continues execution without violating DAG protocol rules.
|
|
413
|
+
|
|
414
|
+
## Reconciliation
|
|
415
|
+
|
|
416
|
+
- Run `mu issues validate <root-id>` before declaring completion.
|
|
417
|
+
- Merge synth-node outputs into one final user-facing result.
|
|
418
|
+
- Convert unresolved gaps into new child issues tagged `proto:hierarchical-work-v1`.
|
|
419
|
+
- Tear down temporary tmux sessions.
|
|
420
|
+
- Tear down/handoff execution-owned `ui_id`s (at minimum `ui:subagents`) with
|
|
421
|
+
explicit `mu_ui remove` actions.
|
|
422
|
+
|
|
423
|
+
## Safety
|
|
424
|
+
|
|
425
|
+
- Prefer small, reversible child issues.
|
|
426
|
+
- Keep child prompts explicit about deliverables + acceptance criteria.
|
|
427
|
+
- Pause spawning while queue semantics are unclear.
|
|
428
|
+
- Never overwrite unrelated files across shards.
|