@femtomc/mu-agent 26.2.99 → 26.2.101

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.
@@ -9,6 +9,7 @@ description: "Orchestrates issue-driven subagent execution with heartbeat superv
9
9
 
10
10
  - [Purpose (what this skill is for)](#purpose-what-this-skill-is-for)
11
11
  - [Shared protocol dependency](#shared-protocol-dependency)
12
+ - [HUD skill dependency](#hud-skill-dependency)
12
13
  - [When to use](#when-to-use)
13
14
  - [Success condition](#success-condition)
14
15
  - [Dispatch modes](#dispatch-modes)
@@ -45,6 +46,13 @@ Before orchestration begins, load that skill and enforce:
45
46
 
46
47
  Do not run subagent orchestration against alternate protocol tags.
47
48
 
49
+ ## HUD skill dependency
50
+
51
+ Before emitting or mutating subagent HUD state, load **`hud`** and follow its canonical contract.
52
+
53
+ - Treat `hud` as source-of-truth for generic `mu_hud` actions, `HudDoc` shape, and rendering constraints.
54
+ - This subagents skill defines orchestration-specific conventions only (for example `hud_id: "subagents"`, queue/activity semantics).
55
+
48
56
  ## When to use
49
57
 
50
58
  - Work is represented as issue-scoped deliverables with explicit outcomes.
@@ -98,7 +106,10 @@ mu forum read issue:<root-id> --limit 20 --pretty
98
106
  2. Choose exactly one action/primitive from `hierarchical-work-protocol`.
99
107
  3. Apply it.
100
108
  4. Verify (`get`, `children`, `ready`, `validate`).
101
- 5. Post concise progress to forum.
109
+ 5. Post a human-facing `ORCH_PASS` update to forum:
110
+ - start with a short title that captures status in plain language
111
+ - follow with one concise paragraph covering: project objective context, milestone moved this pass, impact, overall progress, and next high-level step
112
+ - include queue/worker/drift internals only when diagnosing blocker/anomaly.
102
113
  6. Exit tick.
103
114
 
104
115
  Stop automation when `mu issues validate <root-id>` returns final.
@@ -114,7 +125,7 @@ For claimed issue `<issue-id>` under `<root-id>`:
114
125
  - directly solvable -> `complete`
115
126
  3. Apply primitive.
116
127
  4. Verify state.
117
- 5. Post concise progress to `issue:<issue-id>`.
128
+ 5. Post progress to `issue:<issue-id>` focused on deliverable status, capability impact, and next step.
118
129
 
119
130
  Repeat bounded passes until issue closes.
120
131
 
@@ -138,7 +149,17 @@ mu heartbeats create \
138
149
  --title "hierarchical-work-v1 <root-id>" \
139
150
  --reason hierarchical_work_protocol_v1 \
140
151
  --every-ms 15000 \
141
- --prompt "Use skills subagents and hierarchical-work-protocol for root <root-id>. Run exactly one bounded orchestration pass: claim/work one ready proto:hierarchical-work-v1 issue (or perform one orchestration action), verify state, and report status. Stop when 'mu issues validate <root-id>' is final."
152
+ --prompt "Use skills subagents, hud, and hierarchical-work-protocol 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. 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."
153
+ ```
154
+
155
+ Reusable status-voice add-on for heartbeat prompts (copy/paste):
156
+
157
+ ```text
158
+ Write each ORCH_PASS as a human status note, not operator telemetry.
159
+ Use a short plain-language title + one concise paragraph covering:
160
+ project objective, milestone moved this pass, impact/precondition,
161
+ overall progress, and next high-level step.
162
+ Keep queue/worker/session internals out unless diagnosing a blocker.
142
163
  ```
143
164
 
144
165
  ### B) tmux fan-out (parallel workers)
@@ -148,7 +169,7 @@ run_id="$(date +%Y%m%d-%H%M%S)"
148
169
  for issue_id in $(mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --json | jq -r '.[].id' | head -n 3); do
149
170
  session="mu-sub-${run_id}-${issue_id}"
150
171
  tmux new-session -d -s "$session" \
151
- "cd '$PWD' && mu exec 'Use skills subagents and hierarchical-work-protocol. Work issue ${issue_id} using hierarchical-work.protocol/v1. Claim first, then run one full control loop.' ; rc=\$?; echo __MU_DONE__:\$rc"
172
+ "cd '$PWD' && mu exec 'Use skills subagents, hud, and hierarchical-work-protocol. Work issue ${issue_id} using hierarchical-work.protocol/v1. Claim first, then run one full control loop.' ; rc=\$?; echo __MU_DONE__:\$rc"
152
173
  done
153
174
  ```
154
175
 
@@ -157,26 +178,28 @@ done
157
178
  Use HUD for user visibility. Truth still lives in issues/forum.
158
179
 
159
180
  ```text
160
- /mu subagents on
161
- /mu subagents prefix mu-sub-
162
- /mu subagents root <root-id>
163
- /mu subagents tag proto:hierarchical-work-v1
164
- /mu subagents mode operator
165
- /mu subagents refresh
166
- /mu subagents snapshot
181
+ /mu hud on
182
+ /mu hud status
183
+ /mu hud snapshot
167
184
  ```
168
185
 
169
- Tool: `mu_subagents_hud`
186
+ Tool: `mu_hud`
170
187
 
171
- - Actions: `status`, `snapshot`, `on`, `off`, `toggle`, `refresh`,
172
- `set_prefix`, `set_root`, `set_tag`, `set_mode`, `set_refresh_interval`,
173
- `set_stale_after`, `set_spawn_paused`, `update`, `spawn`
188
+ - Canonical contract: see skill `hud`
189
+ - Actions: `status`, `snapshot`, `on`, `off`, `toggle`, `set`, `update`, `replace`, `remove`, `clear`
190
+ - Subagents convention: maintain a HUD doc with `hud_id: "subagents"`
191
+ - Suggested subagents doc structure:
192
+ - chips: health, mode, paused
193
+ - sections: queue counts + recent activity lines
194
+ - actions: refresh/spawn command hooks (if desired)
195
+ - Example update:
196
+ - `{"action":"set","doc":{"v":1,"hud_id":"subagents","title":"Subagents HUD","scope":"mu-root-123","chips":[{"key":"health","label":"healthy","tone":"success"},{"key":"mode","label":"mode:operator","tone":"dim"},{"key":"paused","label":"paused:no","tone":"dim"}],"sections":[{"kind":"kv","title":"Queue","items":[{"key":"ready","label":"Ready","value":"3"},{"key":"active","label":"Active","value":"2"},{"key":"sessions","label":"Sessions","value":"2"}]},{"kind":"activity","title":"Activity","lines":["Spawned worker for mu-abc123","Posted ORCH_PASS update"]}],"actions":[{"id":"refresh","label":"Refresh","command_text":"/mu hud snapshot","kind":"secondary"}],"snapshot_compact":"HUD(subagents) · healthy · mode=operator · ready=3 · active=2","updated_at_ms":1771853115000,"metadata":{"spawn_mode":"operator","spawn_paused":false}}}`
174
197
 
175
198
  ## Evaluation scenarios
176
199
 
177
200
  1. **Heartbeat bounded-orchestration tick**
178
201
  - Setup: root issue with multiple ready leaves tagged `proto:hierarchical-work-v1`.
179
- - Expected: one heartbeat tick performs exactly one bounded orchestration action, verifies state, posts concise progress, and exits.
202
+ - Expected: one heartbeat tick performs exactly one bounded orchestration action, verifies state, posts a high-level titled narrative status update, and exits.
180
203
 
181
204
  2. **tmux fan-out on ready leaves**
182
205
  - Setup: at least three independent ready issues under one root.
@@ -1,8 +0,0 @@
1
- import type { ExtensionContext } from "@mariozechner/pi-coding-agent";
2
- export type MuHudMode = "planning" | "subagents";
3
- export declare function getActiveHudMode(): MuHudMode | null;
4
- export declare function resetHudMode(): void;
5
- export declare function setActiveHudMode(mode: MuHudMode | null): void;
6
- export declare function clearHudMode(mode: MuHudMode): void;
7
- export declare function syncHudModeStatus(ctx: ExtensionContext): void;
8
- //# sourceMappingURL=hud-mode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hud-mode.d.ts","sourceRoot":"","sources":["../../src/extensions/hud-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;AAIjD,wBAAgB,gBAAgB,IAAI,SAAS,GAAG,IAAI,CAEnD;AAED,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,CAE7D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAIlD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAK7D"}
@@ -1,21 +0,0 @@
1
- let activeHudMode = null;
2
- export function getActiveHudMode() {
3
- return activeHudMode;
4
- }
5
- export function resetHudMode() {
6
- activeHudMode = null;
7
- }
8
- export function setActiveHudMode(mode) {
9
- activeHudMode = mode;
10
- }
11
- export function clearHudMode(mode) {
12
- if (activeHudMode === mode) {
13
- activeHudMode = null;
14
- }
15
- }
16
- export function syncHudModeStatus(ctx) {
17
- if (!ctx.hasUI) {
18
- return;
19
- }
20
- ctx.ui.setStatus("mu-hud-mode", activeHudMode ? `hud:${activeHudMode}` : undefined);
21
- }
@@ -1,4 +0,0 @@
1
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
2
- export declare function planningUiExtension(pi: ExtensionAPI): void;
3
- export default planningUiExtension;
4
- //# sourceMappingURL=planning-ui.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"planning-ui.d.ts","sourceRoot":"","sources":["../../src/extensions/planning-ui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,+BAA+B,CAAC;AA0gBpF,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,YAAY,QAuenD;AAED,eAAe,mBAAmB,CAAC"}