@femtomc/mu-agent 26.2.105 → 26.2.107
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 +39 -16
- package/assets/mu-tui-logo.png +0 -0
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +1 -0
- 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.d.ts.map +1 -1
- package/dist/extensions/mu-operator.js +2 -0
- package/dist/extensions/mu-serve.d.ts.map +1 -1
- package/dist/extensions/mu-serve.js +2 -0
- package/dist/extensions/ui.d.ts +4 -0
- package/dist/extensions/ui.d.ts.map +1 -0
- package/dist/extensions/ui.js +335 -0
- package/dist/operator.d.ts +169 -1
- package/dist/operator.d.ts.map +1 -1
- package/dist/operator.js +77 -7
- package/package.json +2 -2
- package/prompts/skills/automation/SKILL.md +25 -0
- package/prompts/skills/{crons → automation/crons}/SKILL.md +3 -2
- package/prompts/skills/{heartbeats → automation/heartbeats}/SKILL.md +3 -2
- package/prompts/skills/core/SKILL.md +28 -0
- package/prompts/skills/{code-mode → core/code-mode}/SKILL.md +1 -1
- package/prompts/skills/{mu → core/mu}/SKILL.md +38 -4
- package/prompts/skills/{tmux → core/tmux}/SKILL.md +1 -1
- package/prompts/skills/messaging/SKILL.md +27 -0
- package/prompts/skills/subagents/SKILL.md +21 -236
- package/prompts/skills/{control-flow → subagents/control-flow}/SKILL.md +5 -5
- package/prompts/skills/subagents/execution/SKILL.md +315 -0
- package/prompts/skills/{hud → subagents/hud}/SKILL.md +4 -3
- package/prompts/skills/subagents/model-routing/SKILL.md +363 -0
- package/prompts/skills/{planning → subagents/planning}/SKILL.md +13 -6
- package/prompts/skills/{orchestration → subagents/protocol}/SKILL.md +21 -19
- package/prompts/skills/writing/SKILL.md +1 -0
- /package/prompts/skills/{memory → core/memory}/SKILL.md +0 -0
- /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,363 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: model-routing
|
|
3
|
+
description: "Adds a model-selection overlay for issue DAG execution, recommending provider/model/thinking per issue from live harness capabilities."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# model-routing
|
|
7
|
+
|
|
8
|
+
Use this skill when execution should choose different models for different issue
|
|
9
|
+
kinds (for example code vs docs), while preserving protocol
|
|
10
|
+
semantics.
|
|
11
|
+
|
|
12
|
+
## Contents
|
|
13
|
+
|
|
14
|
+
- [Purpose](#purpose)
|
|
15
|
+
- [Required dependencies](#required-dependencies)
|
|
16
|
+
- [Core contract](#core-contract)
|
|
17
|
+
- [Quality profile policy (high-stakes orchestration)](#quality-profile-policy-high-stakes-orchestration)
|
|
18
|
+
- [Overlay identity (`route:model-routing-v1`)](#overlay-identity-routemodel-routing-v1)
|
|
19
|
+
- [Tag vocabulary](#tag-vocabulary)
|
|
20
|
+
- [Recommendation packet contract](#recommendation-packet-contract)
|
|
21
|
+
- [Selection algorithm (deterministic)](#selection-algorithm-deterministic)
|
|
22
|
+
- [Transition table](#transition-table)
|
|
23
|
+
- [Planning handoff contract](#planning-handoff-contract)
|
|
24
|
+
- [Subagents/heartbeat execution contract](#subagentsheartbeat-execution-contract)
|
|
25
|
+
- [Failure + fallback policy](#failure--fallback-policy)
|
|
26
|
+
- [HUD visibility and teardown](#hud-visibility-and-teardown)
|
|
27
|
+
- [Evaluation scenarios](#evaluation-scenarios)
|
|
28
|
+
|
|
29
|
+
## Purpose
|
|
30
|
+
|
|
31
|
+
Model-routing policies are overlays. They do not replace protocol
|
|
32
|
+
semantics.
|
|
33
|
+
|
|
34
|
+
Examples:
|
|
35
|
+
- use a strong coding model for implementation leaves
|
|
36
|
+
- use a stronger writing model for docs/synthesis leaves
|
|
37
|
+
- choose lower-cost fast models for routine triage
|
|
38
|
+
- escalate to deeper thinking for high-risk or complex nodes
|
|
39
|
+
|
|
40
|
+
## Required dependencies
|
|
41
|
+
|
|
42
|
+
Load these skills before applying model-routing policies:
|
|
43
|
+
|
|
44
|
+
- `protocol` (protocol primitives/invariants)
|
|
45
|
+
- `execution` (durable execution runtime)
|
|
46
|
+
- `heartbeats` and/or `crons` (scheduler clock)
|
|
47
|
+
- `hud` (required visibility/handoff surface)
|
|
48
|
+
- `control-flow` (optional; when loop/termination overlays are also active)
|
|
49
|
+
|
|
50
|
+
## Core contract
|
|
51
|
+
|
|
52
|
+
1. **Overlay, don’t fork protocol**
|
|
53
|
+
- Keep `hierarchical-work.protocol/v1` + `proto:hierarchical-work-v1`.
|
|
54
|
+
- Do not redefine `kind:*`, `ctx:*`, issue lifecycle semantics, or DAG validity.
|
|
55
|
+
|
|
56
|
+
2. **Harness is source-of-truth**
|
|
57
|
+
- Drive recommendations from `mu control harness --json`.
|
|
58
|
+
- Only consider authenticated providers unless policy explicitly allows otherwise.
|
|
59
|
+
|
|
60
|
+
3. **Recommend, then apply**
|
|
61
|
+
- Route decisions are explicit artifacts (forum packets + optional tags),
|
|
62
|
+
not hidden implicit behavior.
|
|
63
|
+
|
|
64
|
+
4. **Non-blocking by default**
|
|
65
|
+
- Routing failure should degrade safely (fallback model / default model)
|
|
66
|
+
unless a hard requirement cannot be met.
|
|
67
|
+
|
|
68
|
+
5. **Bounded pass per tick**
|
|
69
|
+
- One routing decision and one bounded mutation/action bundle per heartbeat pass.
|
|
70
|
+
|
|
71
|
+
6. **Per-issue/session overrides preferred**
|
|
72
|
+
- Use `mu exec --provider/--model/--thinking` or `mu turn ...` overrides.
|
|
73
|
+
- Avoid changing workspace-global operator defaults for per-issue routing.
|
|
74
|
+
|
|
75
|
+
## Quality profile policy (high-stakes orchestration)
|
|
76
|
+
|
|
77
|
+
For protocol/runtime/schema/cross-adapter work, apply an explicit quality floor.
|
|
78
|
+
Do not rely on implicit defaults.
|
|
79
|
+
|
|
80
|
+
Recommended high-stakes profile:
|
|
81
|
+
|
|
82
|
+
- provider: `openai-codex`
|
|
83
|
+
- model: `gpt-5.3-codex`
|
|
84
|
+
- thinking: `xhigh`
|
|
85
|
+
|
|
86
|
+
Required guardrails:
|
|
87
|
+
|
|
88
|
+
1. Always pass explicit `--provider --model --thinking` when launching workers.
|
|
89
|
+
2. Do not use mini/fast profiles for root-close decisions, acceptance-signoff,
|
|
90
|
+
or architecture-contract issues unless the user explicitly requests it.
|
|
91
|
+
3. If authenticated capability for the high-stakes profile is unavailable,
|
|
92
|
+
emit a `ROUTE_FALLBACK` packet that explains the downgrade rationale.
|
|
93
|
+
|
|
94
|
+
## Overlay identity (`route:model-routing-v1`)
|
|
95
|
+
|
|
96
|
+
- Tag scope root (or selected subtree root) with: `route:model-routing-v1`
|
|
97
|
+
- Routing metadata remains orthogonal to `kind:*`, `ctx:*`, and `flow:*`.
|
|
98
|
+
|
|
99
|
+
## Tag vocabulary
|
|
100
|
+
|
|
101
|
+
Recommended routing tags (policy metadata):
|
|
102
|
+
|
|
103
|
+
- Scope:
|
|
104
|
+
- `route:model-routing-v1`
|
|
105
|
+
- Task family:
|
|
106
|
+
- `route:task:code`
|
|
107
|
+
- `route:task:docs`
|
|
108
|
+
- `route:task:research`
|
|
109
|
+
- `route:task:ops`
|
|
110
|
+
- `route:task:review`
|
|
111
|
+
- `route:task:synth`
|
|
112
|
+
- `route:task:general`
|
|
113
|
+
- Depth intent:
|
|
114
|
+
- `route:depth:fast`
|
|
115
|
+
- `route:depth:balanced`
|
|
116
|
+
- `route:depth:deep`
|
|
117
|
+
- Budget intent:
|
|
118
|
+
- `route:budget:low`
|
|
119
|
+
- `route:budget:balanced`
|
|
120
|
+
- `route:budget:premium`
|
|
121
|
+
- Hard modality requirement:
|
|
122
|
+
- `route:modality:image` (omit for text-only)
|
|
123
|
+
- Pin indicator:
|
|
124
|
+
- `route:pin` (exact provider/model comes from packet metadata)
|
|
125
|
+
|
|
126
|
+
Notes:
|
|
127
|
+
- Keep tags concise and stable.
|
|
128
|
+
- Put detailed routing config in forum packets (not in tag strings).
|
|
129
|
+
|
|
130
|
+
## Recommendation packet contract
|
|
131
|
+
|
|
132
|
+
Post one `ROUTE_RECOMMENDATION` packet to `issue:<issue-id>` before launching work
|
|
133
|
+
with a selected model.
|
|
134
|
+
|
|
135
|
+
Suggested packet shape (JSON block inside forum message):
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
ROUTE_RECOMMENDATION:
|
|
139
|
+
{
|
|
140
|
+
"version": "route:model-routing-v1",
|
|
141
|
+
"issue_id": "<issue-id>",
|
|
142
|
+
"harness_fingerprint": "<sha256>",
|
|
143
|
+
"selected": {
|
|
144
|
+
"provider": "<provider>",
|
|
145
|
+
"model": "<model>",
|
|
146
|
+
"thinking": "<thinking-level>"
|
|
147
|
+
},
|
|
148
|
+
"alternates": [
|
|
149
|
+
{ "provider": "<provider>", "model": "<model>", "thinking": "<thinking-level>" }
|
|
150
|
+
],
|
|
151
|
+
"constraints": {
|
|
152
|
+
"task": "code|docs|research|ops|review|synth|general",
|
|
153
|
+
"depth": "fast|balanced|deep",
|
|
154
|
+
"budget": "low|balanced|premium",
|
|
155
|
+
"modality": "text|image",
|
|
156
|
+
"min_context_window": 0
|
|
157
|
+
},
|
|
158
|
+
"rationale": [
|
|
159
|
+
"provider authenticated",
|
|
160
|
+
"supports required thinking level",
|
|
161
|
+
"meets context/modality constraints",
|
|
162
|
+
"best score under budget/depth policy"
|
|
163
|
+
],
|
|
164
|
+
"created_at_ms": 0
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Optional root-level packet for custom preferences:
|
|
169
|
+
|
|
170
|
+
```text
|
|
171
|
+
ROUTE_POLICY:
|
|
172
|
+
{
|
|
173
|
+
"version": "route:model-routing-v1",
|
|
174
|
+
"quality_profiles": {
|
|
175
|
+
"orchestration_critical": {
|
|
176
|
+
"provider": "openai-codex",
|
|
177
|
+
"model": "gpt-5.3-codex",
|
|
178
|
+
"thinking": "xhigh"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"task_preferences": {
|
|
182
|
+
"code": [
|
|
183
|
+
{ "provider": "openai-codex", "model": "gpt-5.3-codex", "thinking": "xhigh" }
|
|
184
|
+
],
|
|
185
|
+
"docs": [
|
|
186
|
+
{ "provider": "openrouter", "model": "google/gemini-3.1-pro-preview", "thinking": "high" }
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
If a preference entry is unavailable under current harness/auth state, skip it and
|
|
193
|
+
continue deterministic fallback selection.
|
|
194
|
+
|
|
195
|
+
## Selection algorithm (deterministic)
|
|
196
|
+
|
|
197
|
+
### Inputs
|
|
198
|
+
|
|
199
|
+
- Issue tags (`route:task:*`, `route:depth:*`, `route:budget:*`, `route:modality:image`, `route:pin`)
|
|
200
|
+
- Optional `ROUTE_POLICY` and per-issue constraints from forum/body
|
|
201
|
+
- Live harness snapshot (`mu control harness --json`)
|
|
202
|
+
|
|
203
|
+
### Step 1: gather live capabilities
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
mu control harness --json --pretty
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Step 2: build candidate set
|
|
210
|
+
|
|
211
|
+
1. Start from authenticated providers only.
|
|
212
|
+
2. Flatten model entries across providers.
|
|
213
|
+
3. Filter by hard requirements:
|
|
214
|
+
- required modality (`text` and optional `image`)
|
|
215
|
+
- minimum context window (if specified)
|
|
216
|
+
- pin requirement (`route:pin`) if specified
|
|
217
|
+
4. Resolve target thinking from depth intent:
|
|
218
|
+
- `fast` -> `minimal`
|
|
219
|
+
- `balanced` -> `medium`
|
|
220
|
+
- `deep` -> `xhigh` if available, else `high`
|
|
221
|
+
5. Clamp chosen thinking to model-supported `thinking_levels`.
|
|
222
|
+
|
|
223
|
+
### Step 3: score candidates
|
|
224
|
+
|
|
225
|
+
Use deterministic score components (example):
|
|
226
|
+
|
|
227
|
+
- Hard-fit gates (must pass): auth, modality, context, thinking compatibility
|
|
228
|
+
- Soft score:
|
|
229
|
+
- task preference match (`ROUTE_POLICY`/task family)
|
|
230
|
+
- reasoning/xhigh capability vs depth
|
|
231
|
+
- context headroom
|
|
232
|
+
- budget penalty from per-token cost
|
|
233
|
+
|
|
234
|
+
Tie-breaker: lower estimated cost, then lexicographic `provider/model`.
|
|
235
|
+
|
|
236
|
+
### Step 4: select + alternates
|
|
237
|
+
|
|
238
|
+
- pick top candidate as `selected`
|
|
239
|
+
- keep next N as `alternates` (recommended N=2)
|
|
240
|
+
- post `ROUTE_RECOMMENDATION` packet
|
|
241
|
+
|
|
242
|
+
### Step 5: apply selection
|
|
243
|
+
|
|
244
|
+
For one-shot execution:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
mu exec --provider <provider> --model <model> --thinking <thinking> \
|
|
248
|
+
"Use skills subagents, protocol, execution, model-routing, and hud. Work issue <issue-id>."
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
For existing session turn:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
mu turn --session-kind cp_operator --session-id <session-id> \
|
|
255
|
+
--provider <provider> --model <model> --thinking <thinking> \
|
|
256
|
+
--body "Continue issue <issue-id> with current routing selection."
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Transition table
|
|
260
|
+
|
|
261
|
+
Given an executable issue under `route:model-routing-v1`:
|
|
262
|
+
|
|
263
|
+
1. **No routing decision yet**
|
|
264
|
+
- action: compute recommendation + post `ROUTE_RECOMMENDATION` packet
|
|
265
|
+
|
|
266
|
+
2. **Routing decision exists and still valid**
|
|
267
|
+
- action: execute issue using selected provider/model/thinking
|
|
268
|
+
|
|
269
|
+
3. **Selected route fails at launch/runtime**
|
|
270
|
+
- action: choose next alternate, post `ROUTE_FALLBACK`, retry bounded once
|
|
271
|
+
|
|
272
|
+
4. **All alternates exhausted**
|
|
273
|
+
- action: degrade to harness default model, post `ROUTE_DEGRADED`
|
|
274
|
+
|
|
275
|
+
5. **Hard requirement unmet (no valid candidates)**
|
|
276
|
+
- action: create `kind:ask` node (`ctx:human`, `actor:user`) requesting
|
|
277
|
+
provider auth/config change or constraint relaxation
|
|
278
|
+
|
|
279
|
+
## Planning handoff contract
|
|
280
|
+
|
|
281
|
+
When planning a routed subtree:
|
|
282
|
+
|
|
283
|
+
1. Tag policy scope with `route:model-routing-v1`.
|
|
284
|
+
2. Tag executable nodes with task/depth/budget intent.
|
|
285
|
+
3. Record any hard constraints (modality/context) in issue body or forum packet.
|
|
286
|
+
4. Optionally add root `ROUTE_POLICY` preferences.
|
|
287
|
+
5. Ensure DAG remains valid under `protocol` invariants:
|
|
288
|
+
- `mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --pretty`
|
|
289
|
+
- `mu issues validate <root-id>`
|
|
290
|
+
|
|
291
|
+
## Subagents/heartbeat execution contract
|
|
292
|
+
|
|
293
|
+
Per orchestrator tick:
|
|
294
|
+
|
|
295
|
+
1. Read tree + ready set + latest route packet on target issue.
|
|
296
|
+
2. Read harness snapshot once per pass.
|
|
297
|
+
3. Select one routing transition from the table above.
|
|
298
|
+
4. Apply one bounded mutation bundle (recommend/fallback/ask/execute-start).
|
|
299
|
+
5. Verify with:
|
|
300
|
+
- `mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --pretty`
|
|
301
|
+
- `mu issues validate <root-id>`
|
|
302
|
+
6. Update HUD state.
|
|
303
|
+
7. Post one concise `ORCH_PASS` status update.
|
|
304
|
+
8. If root is final, disable supervising heartbeat.
|
|
305
|
+
|
|
306
|
+
Reusable heartbeat prompt fragment:
|
|
307
|
+
|
|
308
|
+
```text
|
|
309
|
+
Use skills subagents, protocol, execution, model-routing, and hud.
|
|
310
|
+
For root <root-id>, enforce route:model-routing-v1.
|
|
311
|
+
Run exactly one bounded routing/orchestration transition pass: compute or validate
|
|
312
|
+
one issue's model recommendation from live `mu control harness` capabilities,
|
|
313
|
+
apply one action, verify DAG state, post one ORCH_PASS, then stop.
|
|
314
|
+
If validate is final, disable the supervising heartbeat and report completion.
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Failure + fallback policy
|
|
318
|
+
|
|
319
|
+
1. **Provider/model unavailable or auth drift**
|
|
320
|
+
- post `ROUTE_FALLBACK`
|
|
321
|
+
- move to next alternate
|
|
322
|
+
|
|
323
|
+
2. **Thinking level unsupported for selected model**
|
|
324
|
+
- clamp to nearest supported lower level
|
|
325
|
+
- post rationale in fallback packet
|
|
326
|
+
|
|
327
|
+
3. **No candidates satisfy hard constraints**
|
|
328
|
+
- create `kind:ask` escalation with clear options:
|
|
329
|
+
- authenticate provider X
|
|
330
|
+
- relax modality/context/depth constraint
|
|
331
|
+
- approve default-model execution
|
|
332
|
+
|
|
333
|
+
4. **Auditability requirement**
|
|
334
|
+
- every route change emits forum packet (`ROUTE_RECOMMENDATION`,
|
|
335
|
+
`ROUTE_FALLBACK`, `ROUTE_DEGRADED`)
|
|
336
|
+
|
|
337
|
+
## HUD visibility and teardown
|
|
338
|
+
|
|
339
|
+
HUD usage is not optional for active model-routing execution.
|
|
340
|
+
|
|
341
|
+
- If subagents HUD is active, publish routing state there (selected model,
|
|
342
|
+
alternates remaining, last fallback reason).
|
|
343
|
+
- If running model-routing standalone, own `hud_id:"model-routing"`.
|
|
344
|
+
- Update HUD each bounded pass before ORCH_PASS output.
|
|
345
|
+
- Follow `hud` skill ownership/teardown protocol on completion or handoff.
|
|
346
|
+
|
|
347
|
+
## Evaluation scenarios
|
|
348
|
+
|
|
349
|
+
1. **Coding leaf selects deep coding model**
|
|
350
|
+
- Setup: `route:task:code`, `route:depth:deep`, authenticated coding provider.
|
|
351
|
+
- Expected: recommendation picks a deep reasoning coding model and starts work.
|
|
352
|
+
|
|
353
|
+
2. **Docs leaf prefers writing model**
|
|
354
|
+
- Setup: `route:task:docs` with root `ROUTE_POLICY` preference for docs.
|
|
355
|
+
- Expected: recommendation uses preferred docs model when available, otherwise fallback.
|
|
356
|
+
|
|
357
|
+
3. **Auth/provider drift fallback**
|
|
358
|
+
- Setup: selected provider becomes unauthenticated mid-run.
|
|
359
|
+
- Expected: `ROUTE_FALLBACK` packet and alternate selection in next bounded pass.
|
|
360
|
+
|
|
361
|
+
4. **Hard requirement escalation**
|
|
362
|
+
- Setup: issue requires image input but no authenticated image-capable models.
|
|
363
|
+
- Expected: `kind:ask` node created; downstream remains blocked until user action.
|
|
@@ -3,7 +3,7 @@ name: planning
|
|
|
3
3
|
description: "Builds and refines issue-DAG plans using the planning HUD and approval loops. Use when the user asks for planning, decomposition, sequencing, or plan review."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# planning
|
|
7
7
|
|
|
8
8
|
Use this skill when the user asks for planning, decomposition, or a staged execution roadmap.
|
|
9
9
|
|
|
@@ -45,8 +45,8 @@ Before emitting or mutating planning HUD state, load **`hud`** and follow its ca
|
|
|
45
45
|
|
|
46
46
|
## Shared protocol dependency
|
|
47
47
|
|
|
48
|
-
This skill plans DAGs for execution by `
|
|
49
|
-
shared protocol in **`
|
|
48
|
+
This skill plans DAGs for execution by `execution`, so planning must follow the
|
|
49
|
+
shared protocol in **`protocol`**.
|
|
50
50
|
|
|
51
51
|
Before creating or reshaping DAG nodes, load that skill and use its canonical:
|
|
52
52
|
|
|
@@ -59,7 +59,12 @@ Do not invent alternate protocol names or tag schemas.
|
|
|
59
59
|
|
|
60
60
|
If the user asks for explicit loop/termination behavior (for example review-gated
|
|
61
61
|
retry rounds), load **`control-flow`** and encode policy via `flow:*` overlays
|
|
62
|
-
without changing
|
|
62
|
+
without changing protocol semantics.
|
|
63
|
+
|
|
64
|
+
If the user asks for per-issue model/provider/thinking recommendations based on
|
|
65
|
+
live harness capabilities, load **`model-routing`** and encode policy via
|
|
66
|
+
`route:*` overlays plus route packets (for example `ROUTE_POLICY`) without
|
|
67
|
+
changing protocol semantics.
|
|
63
68
|
|
|
64
69
|
## Core contract
|
|
65
70
|
|
|
@@ -71,6 +76,7 @@ without changing orchestration protocol semantics.
|
|
|
71
76
|
- Create root and child issues that comply with `hierarchical-work.protocol/v1`.
|
|
72
77
|
- Encode dependencies so the DAG reflects execution order and synth fan-in.
|
|
73
78
|
- Add clear titles, scope, acceptance criteria, and protocol tags.
|
|
79
|
+
- When model specialization is required, attach explicit `route:*` intent tags/constraints to executable nodes.
|
|
74
80
|
|
|
75
81
|
3. **Drive communication through the planning HUD**
|
|
76
82
|
- Load `hud` and use its canonical `mu_hud`/`HudDoc` contract.
|
|
@@ -90,10 +96,10 @@ without changing orchestration protocol semantics.
|
|
|
90
96
|
|
|
91
97
|
6. **After user approval, ask user about next steps**
|
|
92
98
|
- On user acceptance of the plan, teardown planning HUD ownership.
|
|
93
|
-
- If handing off to another HUD-owning skill (for example `
|
|
99
|
+
- If handing off to another HUD-owning skill (for example `execution`), remove
|
|
94
100
|
`hud_id:"planning"` and keep HUD on for the next skill.
|
|
95
101
|
- If no next HUD-owning skill starts immediately, remove planning doc and turn HUD off.
|
|
96
|
-
- Read the `
|
|
102
|
+
- Read the `execution` skill and offer to supervise execution to realize the plan.
|
|
97
103
|
|
|
98
104
|
## Suggested workflow
|
|
99
105
|
|
|
@@ -234,4 +240,5 @@ Required HUD updates during the loop:
|
|
|
234
240
|
- Keep tasks small enough to complete in one focused pass.
|
|
235
241
|
- Explicitly call out uncertain assumptions for user confirmation.
|
|
236
242
|
- Prefer reversible plans and incremental checkpoints.
|
|
243
|
+
- If `model-routing` is in scope, route intent/constraints are explicit and non-conflicting.
|
|
237
244
|
- HUD state must be fresh, accurate, and aligned with user-visible status updates.
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: "Defines the shared planning/execution
|
|
2
|
+
name: protocol
|
|
3
|
+
description: "Defines the shared planning/execution protocol for issue-DAG work. Use when creating, validating, or executing protocol-driven DAG work."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# protocol
|
|
7
7
|
|
|
8
8
|
Use this skill when work should flow through one shared protocol from planning to execution.
|
|
9
9
|
|
|
10
|
-
This skill supersedes the previous `hierarchical-work-protocol` skill name.
|
|
11
|
-
|
|
12
10
|
## Contents
|
|
13
11
|
|
|
14
12
|
- [Protocol identity](#protocol-identity)
|
|
15
13
|
- [Canonical tags and node roles](#canonical-tags-and-node-roles)
|
|
16
|
-
- [
|
|
14
|
+
- [Policy overlays](#policy-overlays)
|
|
17
15
|
- [Protocol primitives](#protocol-primitives)
|
|
18
16
|
- [Required invariants](#required-invariants)
|
|
19
17
|
- [Planning handoff contract](#planning-handoff-contract)
|
|
@@ -26,7 +24,6 @@ This skill supersedes the previous `hierarchical-work-protocol` skill name.
|
|
|
26
24
|
- Protocol ID: `hierarchical-work.protocol/v1`
|
|
27
25
|
- Required issue tag on all protocol nodes: `proto:hierarchical-work-v1`
|
|
28
26
|
|
|
29
|
-
This system does **not** use backward-compatibility aliases for older protocol names.
|
|
30
27
|
Use only the protocol ID and tag above.
|
|
31
28
|
|
|
32
29
|
## Canonical tags and node roles
|
|
@@ -65,19 +62,24 @@ Node role rules:
|
|
|
65
62
|
- Must include: `proto:hierarchical-work-v1`, `kind:ask`, `ctx:human`, `actor:user`
|
|
66
63
|
- Must be non-executable (`node:agent` removed)
|
|
67
64
|
|
|
68
|
-
##
|
|
65
|
+
## Policy overlays
|
|
69
66
|
|
|
70
|
-
|
|
71
|
-
primitives or `kind:*` semantics.
|
|
67
|
+
Policy overlays are layered on top of this protocol and should not redefine
|
|
68
|
+
protocol primitives or `kind:*` semantics.
|
|
72
69
|
|
|
73
|
-
- Keep
|
|
74
|
-
- Represent policy-specific behavior
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
- Keep protocol tags/kinds as source-of-truth for structure.
|
|
71
|
+
- Represent policy-specific behavior with overlay tags/metadata:
|
|
72
|
+
- loop/termination policy (for example review gates, retry rounds,
|
|
73
|
+
escalation thresholds): `flow:*`
|
|
74
|
+
- per-issue model/provider/thinking routing policy: `route:*`
|
|
75
|
+
- Compile overlay decisions into existing primitives (`spawn`, `fork`, `expand`,
|
|
76
|
+
`ask`, `complete`, `serial`) and per-turn/per-session model overrides
|
|
77
|
+
(`mu exec` / `mu turn` with `--provider --model --thinking`) instead of
|
|
78
|
+
introducing ad-hoc mutations.
|
|
78
79
|
|
|
79
|
-
Current compositional
|
|
80
|
+
Current compositional overlay skills:
|
|
80
81
|
- `control-flow` (for example `flow:review-gated-v1` behavior)
|
|
82
|
+
- `model-routing` (for example `route:model-routing-v1` behavior)
|
|
81
83
|
|
|
82
84
|
## Protocol primitives
|
|
83
85
|
|
|
@@ -187,7 +189,7 @@ mu issues dep <step-a> blocks <step-b>
|
|
|
187
189
|
|
|
188
190
|
## Planning handoff contract
|
|
189
191
|
|
|
190
|
-
Before handoff from planning to
|
|
192
|
+
Before handoff from planning to execution supervision:
|
|
191
193
|
|
|
192
194
|
1. Root exists and is tagged `node:root`, `kind:root`, `proto:hierarchical-work-v1`.
|
|
193
195
|
2. Every in-scope node carries `proto:hierarchical-work-v1`.
|
|
@@ -207,7 +209,7 @@ mu issues validate <root-id>
|
|
|
207
209
|
Worker/orchestrator passes always choose one primitive at a time:
|
|
208
210
|
|
|
209
211
|
1. `read_tree`
|
|
210
|
-
2. Choose one primitive (`ask` | `expand` | `complete` |
|
|
212
|
+
2. Choose one primitive (`ask` | `expand` | `complete` | protocol primitive)
|
|
211
213
|
3. Apply
|
|
212
214
|
4. Verify (`get`, `children`, `ready`, `validate`)
|
|
213
215
|
5. Log human-facing progress to forum as a titled narrative update (context -> milestone moved -> impact -> overall progress -> next), using the reusable status-voice style from `heartbeats`
|
|
@@ -240,7 +242,7 @@ mu forum post issue:"$goal_id" -m "<goal brief + acceptance criteria>" --author
|
|
|
240
242
|
|
|
241
243
|
1. **Planning-to-execution continuity**
|
|
242
244
|
- Setup: a freshly planned DAG.
|
|
243
|
-
- Expected: all nodes satisfy protocol tag/kind/context rules and can be consumed by
|
|
245
|
+
- Expected: all nodes satisfy protocol tag/kind/context rules and can be consumed by `execution` without re-shaping.
|
|
244
246
|
|
|
245
247
|
2. **Decomposition with synthesis fan-in**
|
|
246
248
|
- Setup: worker expands a complex node.
|
|
@@ -14,6 +14,7 @@ Use this skill when asked to write, edit, or review technical prose. This includ
|
|
|
14
14
|
- [Common patterns by document type](#common-patterns-by-document-type)
|
|
15
15
|
- [Editing and review workflow](#editing-and-review-workflow)
|
|
16
16
|
- [Evaluation scenarios](#evaluation-scenarios)
|
|
17
|
+
- [Quality bar](#quality-bar)
|
|
17
18
|
|
|
18
19
|
## Core contract
|
|
19
20
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|