@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
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: hud
|
|
3
|
-
description: "Defines HUD usage for `mu_hud` and `/mu hud`, including doc schema patterns, deterministic update rules, and rendering-safe conventions."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# hud
|
|
7
|
-
|
|
8
|
-
Use this skill whenever you need to publish, update, or inspect HUD state.
|
|
9
|
-
|
|
10
|
-
This skill is the canonical HUD reference for:
|
|
11
|
-
|
|
12
|
-
- `mu_hud` tool calls (structured HUD state)
|
|
13
|
-
- `/mu hud ...` command usage (inspection/control)
|
|
14
|
-
- `HudDoc` conventions that render well in TUI/Slack/Telegram
|
|
15
|
-
|
|
16
|
-
## Contents
|
|
17
|
-
|
|
18
|
-
- [Core contract](#core-contract)
|
|
19
|
-
- [HudDoc shape](#huddoc-shape)
|
|
20
|
-
- [Recommended turn loop](#recommended-turn-loop)
|
|
21
|
-
- [Ownership and teardown protocol](#ownership-and-teardown-protocol)
|
|
22
|
-
- [Planning, subagents, and model-routing profiles](#planning-subagents-and-model-routing-profiles)
|
|
23
|
-
- [Determinism and rendering limits](#determinism-and-rendering-limits)
|
|
24
|
-
- [Evaluation scenarios](#evaluation-scenarios)
|
|
25
|
-
|
|
26
|
-
## Core contract
|
|
27
|
-
|
|
28
|
-
### Tool (`mu_hud`)
|
|
29
|
-
|
|
30
|
-
Actions:
|
|
31
|
-
|
|
32
|
-
- `status`, `snapshot`
|
|
33
|
-
- `on`, `off`, `toggle`
|
|
34
|
-
- `set`, `update`, `replace`, `remove`, `clear`
|
|
35
|
-
|
|
36
|
-
Key params:
|
|
37
|
-
|
|
38
|
-
- `doc` (for `set`/`update`)
|
|
39
|
-
- `docs` (for `replace`)
|
|
40
|
-
- `hud_id` (for `remove`)
|
|
41
|
-
- `snapshot_format` (`compact` or `multiline`)
|
|
42
|
-
|
|
43
|
-
Notes:
|
|
44
|
-
|
|
45
|
-
- `set` and `update` are both upsert-style single-doc writes.
|
|
46
|
-
- `replace` is whole-inventory replacement.
|
|
47
|
-
- Tool results include normalized `hud_docs` for downstream transport/rendering.
|
|
48
|
-
- Advisory preset-shape warnings are surfaced in tool `details.preset_warnings` when `metadata.style_preset` and doc shape diverge (non-blocking).
|
|
49
|
-
|
|
50
|
-
### Command (`/mu hud ...`)
|
|
51
|
-
|
|
52
|
-
Supported subcommands:
|
|
53
|
-
|
|
54
|
-
- `/mu hud status`
|
|
55
|
-
- `/mu hud snapshot [compact|multiline]`
|
|
56
|
-
- `/mu hud on|off|toggle`
|
|
57
|
-
- `/mu hud clear`
|
|
58
|
-
- `/mu hud remove <hud-id>`
|
|
59
|
-
|
|
60
|
-
Use the tool (`mu_hud`) for structured doc writes.
|
|
61
|
-
|
|
62
|
-
## HudDoc shape
|
|
63
|
-
|
|
64
|
-
HUD docs are validated against `HudDoc` (`@femtomc/mu-core`).
|
|
65
|
-
|
|
66
|
-
Minimum practical fields:
|
|
67
|
-
|
|
68
|
-
- `v: 1`
|
|
69
|
-
- `hud_id: <non-empty>`
|
|
70
|
-
- `title: <non-empty>`
|
|
71
|
-
- `snapshot_compact: <non-empty>`
|
|
72
|
-
- `updated_at_ms: <int>`
|
|
73
|
-
|
|
74
|
-
Common optional fields:
|
|
75
|
-
|
|
76
|
-
- `scope` (for root/session/issue scoping)
|
|
77
|
-
- `title_style` / `snapshot_style` (`{weight?:"normal|strong", italic?:boolean, code?:boolean}`)
|
|
78
|
-
- `chips` (`[{key,label,tone?,style?}]`)
|
|
79
|
-
- `sections`:
|
|
80
|
-
- `kv` (key/value; supports `title_style` + item `value_style`)
|
|
81
|
-
- `checklist` (checkbox-style progress; supports `title_style` + item `style`)
|
|
82
|
-
- `activity` (recent lines; supports `title_style`)
|
|
83
|
-
- `text` (free text; supports `title_style` + `style`)
|
|
84
|
-
- `actions` (`[{id,label,command_text,kind?,style?}]`)
|
|
85
|
-
- `metadata` (machine-readable extras; optional `style_preset` convention: `planning|subagents`)
|
|
86
|
-
|
|
87
|
-
Example checklist doc:
|
|
88
|
-
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
"action": "set",
|
|
92
|
-
"doc": {
|
|
93
|
-
"v": 1,
|
|
94
|
-
"hud_id": "planning",
|
|
95
|
-
"title": "Planning HUD",
|
|
96
|
-
"scope": "mu-root-123",
|
|
97
|
-
"chips": [
|
|
98
|
-
{ "key": "phase", "label": "phase:drafting", "tone": "accent", "style": { "weight": "strong" } },
|
|
99
|
-
{ "key": "steps", "label": "steps:2/5", "tone": "dim" }
|
|
100
|
-
],
|
|
101
|
-
"sections": [
|
|
102
|
-
{
|
|
103
|
-
"kind": "checklist",
|
|
104
|
-
"title": "Checklist",
|
|
105
|
-
"items": [
|
|
106
|
-
{ "id": "1", "label": "Investigate", "done": true },
|
|
107
|
-
{ "id": "2", "label": "Draft DAG", "done": true },
|
|
108
|
-
{ "id": "3", "label": "Review", "done": false }
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"actions": [
|
|
113
|
-
{ "id": "snapshot", "label": "Snapshot", "command_text": "/mu hud snapshot", "kind": "secondary", "style": { "italic": true } }
|
|
114
|
-
],
|
|
115
|
-
"snapshot_compact": "HUD(plan) · phase=drafting · steps=2/5",
|
|
116
|
-
"updated_at_ms": 1771853115000,
|
|
117
|
-
"metadata": { "style_preset": "planning", "phase": "drafting" }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Recommended turn loop
|
|
123
|
-
|
|
124
|
-
1. Ensure HUD is on:
|
|
125
|
-
|
|
126
|
-
```json
|
|
127
|
-
{"action":"on"}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
2. Upsert exactly the docs you own (`set`/`update`).
|
|
131
|
-
3. Emit compact snapshot for user-facing status:
|
|
132
|
-
|
|
133
|
-
```json
|
|
134
|
-
{"action":"snapshot","snapshot_format":"compact"}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
4. Keep response text and HUD state aligned (no contradictions).
|
|
138
|
-
|
|
139
|
-
## Ownership and teardown protocol
|
|
140
|
-
|
|
141
|
-
HUD-using skills should treat HUD state as owned, explicit, and non-optional when
|
|
142
|
-
that skill declares HUD-required behavior.
|
|
143
|
-
|
|
144
|
-
1. **Own explicit `hud_id` values**
|
|
145
|
-
- Each active skill owns one canonical doc id (for example `planning`,
|
|
146
|
-
`subagents`, `control-flow`, `model-routing`).
|
|
147
|
-
- Prefer `remove <hud_id>` over `clear` to avoid deleting other skills’ docs.
|
|
148
|
-
|
|
149
|
-
2. **Teardown is mandatory at skill end**
|
|
150
|
-
- When a HUD-owning skill completes, remove its doc(s).
|
|
151
|
-
- If no other HUD-owning skill is active next, turn HUD off.
|
|
152
|
-
|
|
153
|
-
3. **Teardown during HUD-to-HUD handoff**
|
|
154
|
-
- Remove current skill doc(s), keep HUD enabled, then let next skill set its doc.
|
|
155
|
-
- Never leave stale docs from prior skills during handoff.
|
|
156
|
-
|
|
157
|
-
Example teardown/handoff calls:
|
|
158
|
-
|
|
159
|
-
```json
|
|
160
|
-
{"action":"remove","hud_id":"planning"}
|
|
161
|
-
{"action":"set","doc":{"v":1,"hud_id":"subagents","title":"Subagents HUD","snapshot_compact":"HUD(subagents)","updated_at_ms":1771853115001}}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
Example full teardown (no next HUD skill):
|
|
165
|
-
|
|
166
|
-
```json
|
|
167
|
-
{"action":"remove","hud_id":"subagents"}
|
|
168
|
-
{"action":"off"}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Planning, subagents, and model-routing profiles
|
|
172
|
-
|
|
173
|
-
Use profile-specific `hud_id` values:
|
|
174
|
-
|
|
175
|
-
- planning profile: `hud_id: "planning"`
|
|
176
|
-
- subagents profile: `hud_id: "subagents"`
|
|
177
|
-
- model-routing profile: `hud_id: "model-routing"`
|
|
178
|
-
|
|
179
|
-
Treat these as conventions layered on top of this generic contract.
|
|
180
|
-
|
|
181
|
-
## Determinism and rendering limits
|
|
182
|
-
|
|
183
|
-
- Keep one canonical doc per `hud_id`.
|
|
184
|
-
- Keep `updated_at_ms` monotonic for each `hud_id`.
|
|
185
|
-
- Prefer a small doc set (usually 1–3 docs total) for channel readability.
|
|
186
|
-
- Keep command actions concise; long commands may degrade to text-only fallbacks on some channels.
|
|
187
|
-
- Assume channel renderers cap docs/actions/lines; put critical state in `snapshot_compact` and first section items.
|
|
188
|
-
|
|
189
|
-
If behavior is unclear, inspect implementation/tests before guessing:
|
|
190
|
-
|
|
191
|
-
- `packages/core/src/hud.ts`
|
|
192
|
-
- `packages/agent/src/extensions/hud.ts`
|
|
193
|
-
- `packages/server/src/control_plane.ts`
|
|
194
|
-
- `packages/agent/test/hud_tool.test.ts`
|
|
195
|
-
|
|
196
|
-
## Evaluation scenarios
|
|
197
|
-
|
|
198
|
-
1. **Planning review turn**
|
|
199
|
-
- Expected: `planning` doc updates phase/checklist/waiting state, then emits compact snapshot.
|
|
200
|
-
|
|
201
|
-
2. **Subagents orchestration pass**
|
|
202
|
-
- Expected: `subagents` doc updates queue/activity/chips after each bounded pass.
|
|
203
|
-
|
|
204
|
-
3. **HUD reset handoff**
|
|
205
|
-
- Expected: after phase completion, owned HUD docs are removed; HUD is turned off when no next HUD skill is active, or ownership cleanly hands off to the next skill with no stale docs.
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: planning
|
|
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
|
-
---
|
|
5
|
-
|
|
6
|
-
# Planning
|
|
7
|
-
|
|
8
|
-
Use this skill when the user asks for planning, decomposition, or a staged execution roadmap.
|
|
9
|
-
|
|
10
|
-
## Contents
|
|
11
|
-
|
|
12
|
-
- [Planning HUD is required](#planning-hud-is-required)
|
|
13
|
-
- [HUD skill dependency](#hud-skill-dependency)
|
|
14
|
-
- [Shared protocol dependency](#shared-protocol-dependency)
|
|
15
|
-
- [Core contract](#core-contract)
|
|
16
|
-
- [Suggested workflow](#suggested-workflow)
|
|
17
|
-
- [Effective HUD usage heuristics](#effective-hud-usage-heuristics)
|
|
18
|
-
- [Evaluation scenarios](#evaluation-scenarios)
|
|
19
|
-
- [Quality bar](#quality-bar)
|
|
20
|
-
|
|
21
|
-
## Planning HUD is required
|
|
22
|
-
|
|
23
|
-
For this skill, the planning HUD is the primary status/communication surface.
|
|
24
|
-
HUD usage is not optional for planning turns.
|
|
25
|
-
|
|
26
|
-
- Keep HUD state in sync with real planning progress.
|
|
27
|
-
- Update HUD before and after each major planning turn.
|
|
28
|
-
- Use `waiting_on_user`, `next_action`, and `blocker` to communicate exactly what the user needs to do.
|
|
29
|
-
- Include a HUD snapshot in user-facing planning updates.
|
|
30
|
-
- Teardown/handoff HUD state explicitly when planning ends or transitions to another HUD-owning skill.
|
|
31
|
-
|
|
32
|
-
Default per-turn HUD loop:
|
|
33
|
-
|
|
34
|
-
1. Emit a fresh `planning` HUD doc (`mu_hud` action `set` or `update`) with current `phase`, `waiting_on_user`, `next_action`, `blocker`, and `confidence` in sections/metadata.
|
|
35
|
-
2. Keep checklist progress and root issue linkage synchronized with the live issue DAG.
|
|
36
|
-
3. Emit `snapshot` (`compact` or `multiline`) and reflect it in your response.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## HUD skill dependency
|
|
40
|
-
|
|
41
|
-
Before emitting or mutating planning HUD state, load **`hud`** and follow its canonical contract.
|
|
42
|
-
|
|
43
|
-
- Treat `hud` as source-of-truth for generic `mu_hud` actions, `HudDoc` shape, and rendering constraints.
|
|
44
|
-
- This planning skill defines planning-specific conventions only (for example `hud_id: "planning"`, planning phases, checklist semantics).
|
|
45
|
-
|
|
46
|
-
## Shared protocol dependency
|
|
47
|
-
|
|
48
|
-
This skill plans DAGs for execution by `subagents`, so planning must follow the
|
|
49
|
-
shared protocol in **`orchestration`**.
|
|
50
|
-
|
|
51
|
-
Before creating or reshaping DAG nodes, load that skill and use its canonical:
|
|
52
|
-
|
|
53
|
-
- protocol identity/tag (`hierarchical-work.protocol/v1`, `proto:hierarchical-work-v1`)
|
|
54
|
-
- node kinds and context tags
|
|
55
|
-
- invariants for executable vs non-executable nodes
|
|
56
|
-
- planning handoff contract
|
|
57
|
-
|
|
58
|
-
Do not invent alternate protocol names or tag schemas.
|
|
59
|
-
|
|
60
|
-
If the user asks for explicit loop/termination behavior (for example review-gated
|
|
61
|
-
retry rounds), load **`control-flow`** and encode policy via `flow:*` overlays
|
|
62
|
-
without changing orchestration 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 orchestration protocol semantics.
|
|
68
|
-
|
|
69
|
-
## Core contract
|
|
70
|
-
|
|
71
|
-
1. **Investigate first**
|
|
72
|
-
- Read relevant code/docs/state before proposing work.
|
|
73
|
-
- Avoid speculative plans when evidence is cheap to gather.
|
|
74
|
-
|
|
75
|
-
2. **Materialize the plan in mu issues using the shared protocol**
|
|
76
|
-
- Create root and child issues that comply with `hierarchical-work.protocol/v1`.
|
|
77
|
-
- Encode dependencies so the DAG reflects execution order and synth fan-in.
|
|
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.
|
|
80
|
-
|
|
81
|
-
3. **Drive communication through the planning HUD**
|
|
82
|
-
- Load `hud` and use its canonical `mu_hud`/`HudDoc` contract.
|
|
83
|
-
- Treat HUD state as the canonical short status line for planning.
|
|
84
|
-
- Keep `phase`, `waiting_on_user`, `next_action`, `blocker`, and `confidence` current.
|
|
85
|
-
- Ensure HUD state and your natural-language response never contradict each other.
|
|
86
|
-
|
|
87
|
-
4. **Present the plan to the user**
|
|
88
|
-
- Summarize goals, sequencing, risks, and tradeoffs.
|
|
89
|
-
- Include issue IDs so the user can reference exact nodes.
|
|
90
|
-
- Include a HUD snapshot line.
|
|
91
|
-
|
|
92
|
-
5. **Iterate until user approval**
|
|
93
|
-
- Treat user feedback as first-class constraints.
|
|
94
|
-
- Update issues/dependencies and re-present deltas.
|
|
95
|
-
- Do not begin broad execution until the user signals satisfaction.
|
|
96
|
-
|
|
97
|
-
6. **After user approval, ask user about next steps**
|
|
98
|
-
- On user acceptance of the plan, teardown planning HUD ownership.
|
|
99
|
-
- If handing off to another HUD-owning skill (for example `subagents`), remove
|
|
100
|
-
`hud_id:"planning"` and keep HUD on for the next skill.
|
|
101
|
-
- If no next HUD-owning skill starts immediately, remove planning doc and turn HUD off.
|
|
102
|
-
- Read the `subagents` skill and offer to supervise subagents to execute the plan.
|
|
103
|
-
|
|
104
|
-
## Suggested workflow
|
|
105
|
-
|
|
106
|
-
### A) Investigation pass
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
mu status --pretty
|
|
110
|
-
mu issues list --status open --limit 50 --pretty
|
|
111
|
-
mu forum read user:context --limit 50 --pretty
|
|
112
|
-
mu memory search --query "<topic>" --limit 30
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Bootstrap HUD immediately (interactive operator session):
|
|
116
|
-
|
|
117
|
-
```text
|
|
118
|
-
/mu hud on
|
|
119
|
-
/mu hud status
|
|
120
|
-
/mu hud snapshot
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
Tool contract (preferred when tools are available):
|
|
124
|
-
|
|
125
|
-
- Canonical contract: see skill `hud`
|
|
126
|
-
- Tool: `mu_hud`
|
|
127
|
-
- Actions: `status`, `snapshot`, `on`, `off`, `toggle`, `set`, `update`, `replace`, `remove`, `clear`
|
|
128
|
-
- Planning convention: maintain a HUD doc with `hud_id: "planning"`
|
|
129
|
-
- Suggested planning doc structure:
|
|
130
|
-
- `title`: `Planning HUD`
|
|
131
|
-
- chips: `phase:<...>`, `steps:<done>/<total>`, `waiting:<yes|no>`, `conf:<low|medium|high>`
|
|
132
|
-
- sections:
|
|
133
|
-
- `kv` status block (`phase`, `root`, `waiting_on_user`, `confidence`, `next_action`, `blocker`)
|
|
134
|
-
- `checklist` block for plan milestones
|
|
135
|
-
- actions: include useful follow-ups (for example, `snapshot`)
|
|
136
|
-
- metadata: include `style_preset:"planning"` for consistent renderer emphasis without repeating style hints
|
|
137
|
-
|
|
138
|
-
Example tool calls:
|
|
139
|
-
- Turn HUD on:
|
|
140
|
-
- `{"action":"on"}`
|
|
141
|
-
- Set/replace planning doc after investigation pass:
|
|
142
|
-
- `{"action":"set","doc":{"v":1,"hud_id":"planning","title":"Planning HUD","scope":"mu-root-123","chips":[{"key":"phase","label":"phase:investigating","tone":"dim"},{"key":"steps","label":"steps:1/4","tone":"accent"},{"key":"waiting","label":"waiting:no","tone":"dim"},{"key":"confidence","label":"conf:medium","tone":"accent"}],"sections":[{"kind":"kv","title":"Status","items":[{"key":"phase","label":"phase","value":"investigating"},{"key":"root","label":"root","value":"mu-root-123"},{"key":"waiting","label":"waiting_on_user","value":"no"},{"key":"confidence","label":"confidence","value":"medium"},{"key":"next","label":"next_action","value":"Draft root DAG"},{"key":"blocker","label":"blocker","value":"(none)"}]},{"kind":"checklist","title":"Checklist","items":[{"id":"1","label":"Investigate relevant code/docs/state","done":true},{"id":"2","label":"Create root + child issue DAG","done":false},{"id":"3","label":"Present plan + tradeoffs","done":false},{"id":"4","label":"Refine until approved","done":false}]}],"actions":[{"id":"snapshot","label":"Snapshot","command_text":"/mu hud snapshot","kind":"secondary"}],"snapshot_compact":"HUD(plan) · phase=investigating · steps=1/4 · waiting=no · conf=medium","updated_at_ms":1771853115000,"metadata":{"style_preset":"planning","phase":"investigating","waiting_on_user":false,"confidence":"medium"}}}`
|
|
143
|
-
- Human-facing status line:
|
|
144
|
-
- `{"action":"snapshot","snapshot_format":"compact"}`
|
|
145
|
-
|
|
146
|
-
If HUD behavior is unclear, inspect implementation/tests before guessing:
|
|
147
|
-
- `packages/agent/src/extensions/hud.ts`
|
|
148
|
-
- `packages/agent/test/hud_tool.test.ts`
|
|
149
|
-
|
|
150
|
-
Also inspect repo files directly (read/bash) for implementation constraints.
|
|
151
|
-
|
|
152
|
-
### B) Draft DAG in mu-issue
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
# 1) Create protocol root container
|
|
156
|
-
root_json="$(mu issues create "<Goal>" \
|
|
157
|
-
--body "<scope + success criteria>" \
|
|
158
|
-
--tag node:root \
|
|
159
|
-
--tag kind:root \
|
|
160
|
-
--tag proto:hierarchical-work-v1 \
|
|
161
|
-
--json)"
|
|
162
|
-
root_id="$(echo "$root_json" | jq -r '.id')"
|
|
163
|
-
mu issues update "$root_id" --remove-tag node:agent
|
|
164
|
-
|
|
165
|
-
# 2) Create executable child work nodes
|
|
166
|
-
mu issues create "<Subtask A>" \
|
|
167
|
-
--parent "$root_id" \
|
|
168
|
-
--body "<acceptance criteria>" \
|
|
169
|
-
--tag kind:spawn \
|
|
170
|
-
--tag ctx:clean \
|
|
171
|
-
--tag proto:hierarchical-work-v1 \
|
|
172
|
-
--priority 2 --pretty
|
|
173
|
-
|
|
174
|
-
mu issues create "<Subtask B>" \
|
|
175
|
-
--parent "$root_id" \
|
|
176
|
-
--body "<acceptance criteria>" \
|
|
177
|
-
--tag kind:fork \
|
|
178
|
-
--tag ctx:inherit \
|
|
179
|
-
--tag proto:hierarchical-work-v1 \
|
|
180
|
-
--priority 2 --pretty
|
|
181
|
-
|
|
182
|
-
# 3) Add dependency edges where needed
|
|
183
|
-
mu issues dep <child-a-id> blocks <child-b-id>
|
|
184
|
-
|
|
185
|
-
# 4) Validate ready set + protocol scope
|
|
186
|
-
mu issues ready --root "$root_id" --tag proto:hierarchical-work-v1 --pretty
|
|
187
|
-
mu issues validate "$root_id"
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### C) Plan presentation template
|
|
191
|
-
|
|
192
|
-
- Objective
|
|
193
|
-
- Assumptions and constraints discovered in investigation
|
|
194
|
-
- Proposed issue DAG (IDs + titles + ordering)
|
|
195
|
-
- Risks and mitigations
|
|
196
|
-
- Open questions for user approval
|
|
197
|
-
- HUD snapshot (compact line)
|
|
198
|
-
|
|
199
|
-
### D) Revision loop
|
|
200
|
-
|
|
201
|
-
- Apply feedback with `mu issues update` / `mu issues dep` / additional issues.
|
|
202
|
-
- Re-run `mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --pretty`.
|
|
203
|
-
- Validate protocol-root status via `mu issues validate <root-id>`.
|
|
204
|
-
- Present a concise diff of what changed and why.
|
|
205
|
-
- Update HUD each turn so phase/waiting/next/blocker/confidence match the latest state.
|
|
206
|
-
|
|
207
|
-
Required HUD updates during the loop:
|
|
208
|
-
|
|
209
|
-
- Re-emit the `planning` HUD doc with current `phase`, checklist progress, `waiting_on_user`, `next_action`, and `blocker` after each meaningful planning step.
|
|
210
|
-
- Use `{"action":"snapshot","snapshot_format":"compact"}` for concise user-facing HUD lines.
|
|
211
|
-
- Keep `updated_at_ms` monotonic across updates so latest doc wins deterministically.
|
|
212
|
-
- On plan completion/handoff, remove `hud_id:"planning"` and apply handoff/off semantics from the `hud` skill.
|
|
213
|
-
|
|
214
|
-
## Effective HUD usage heuristics
|
|
215
|
-
|
|
216
|
-
- Keep one canonical planning doc (`hud_id: "planning"`) and refresh it whenever planning state changes.
|
|
217
|
-
- Keep `updated_at_ms` monotonic so deterministic dedupe/ordering always keeps the latest planning state.
|
|
218
|
-
- Use explicit, concise status fields (`phase`, `waiting_on_user`, `next_action`, `blocker`, `confidence`) in sections/metadata.
|
|
219
|
-
- Keep `next_action` as one concrete action, not a paragraph.
|
|
220
|
-
- Customize checklist steps once scope is understood; mark them complete as milestones land.
|
|
221
|
-
|
|
222
|
-
## Evaluation scenarios
|
|
223
|
-
|
|
224
|
-
1. **Initial decomposition request**
|
|
225
|
-
- Prompt: user asks for a staged roadmap.
|
|
226
|
-
- Expected: investigation pass runs first, root + child issues are created with `proto:hierarchical-work-v1`, HUD shows `phase=drafting` and `waiting_on_user=false` until first review checkpoint.
|
|
227
|
-
|
|
228
|
-
2. **Feedback-driven replan**
|
|
229
|
-
- Prompt: user requests scope change after first DAG draft.
|
|
230
|
-
- Expected: dependency/issue updates are applied, concise change diff is presented, HUD transitions through `reviewing`/`waiting_user` with updated `next_action`.
|
|
231
|
-
|
|
232
|
-
3. **Blocked-by-missing-input planning turn**
|
|
233
|
-
- Prompt: required architecture constraint is unknown.
|
|
234
|
-
- Expected: plan captures explicit assumption gap, HUD uses `phase=blocked` or `waiting_user` (as appropriate), and asks one concrete unblock question.
|
|
235
|
-
|
|
236
|
-
## Quality bar
|
|
237
|
-
|
|
238
|
-
- Every issue should be actionable and testable.
|
|
239
|
-
- DAG nodes must satisfy `hierarchical-work.protocol/v1` before execution handoff.
|
|
240
|
-
- Keep tasks small enough to complete in one focused pass.
|
|
241
|
-
- Explicitly call out uncertain assumptions for user confirmation.
|
|
242
|
-
- Prefer reversible plans and incremental checkpoints.
|
|
243
|
-
- If `model-routing` is in scope, route intent/constraints are explicit and non-conflicting.
|
|
244
|
-
- HUD state must be fresh, accurate, and aligned with user-visible status updates.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|