MUX - pi coordinator pattern (pimux runtime)
Use this when the task is too large for one uninterrupted context window and you need mux wave semantics with tmux-backed long-lived execution.
Binding activation
If the user explicitly invokes mux / ac-workflow-mux, or embeds this skill text as the runtime for the task, treat this document as a binding runtime contract, not as optional guidance, commentary, or a planning reference.
Absolute compliance rule
For explicit mux-family triggers in pi, the current session is a pimux-only control plane.
- FIRST after spawn: do not poll pimux or use Bash sleep/wait loops; wait for delivered child bridge activity.
- The authoritative
pimux extension applies a fail-closed parent control-plane lock for explicit mux-family wrappers.
- Before the first child exists, the parent must not call
Read, Bash, Edit, Write, NotebookEdit, Grep, Glob, web_search, subagent, or any other non-pimux tool for substantive repo work.
- Do not do substantive repo or domain work in the parent session.
- Do not use parent-side repo discovery, file inspection, implementation planning, or direct edits before spawn.
- The first real move is to spawn the authoritative
pimux child coordinator.
- The first observable parent tool call must be
pimux spawn.
- If you have not spawned that child yet, you are not allowed to analyze, compare, implement, or answer the task from the parent.
- If the parent performs substantive repo inspection or any forbidden tool call before spawn, stop immediately, acknowledge a protocol violation, discard any parent-side conclusions, and restart from
pimux spawn.
Parent tool surface
While this skill is active, the parent session is runtime-locked to pimux, AskUserQuestion, and say only:
- before the first child exists:
pimux spawn only
AskUserQuestion is allowed only for explicit user clarification that blocks spawn
- after spawn: notify-first, not poll-first; wait for delivered child bridge activity instead of inspecting live state
- do not poll pimux or use Bash sleep/wait loops; if you are about to inspect routine progress, stop and wait for delivered child activity instead
- happy path after spawn forbids
status, capture, tree, list, and open; those are recovery-only tools for explicit live inspection, suspected stall/protocol violation/failure, or the inactivity watchdog
- after a child progress report arrives, use at most one
send_message when the child needs input; then wait for closeout or another child report
- terminal settlement re-arms exactly one final
pimux status verification before advancing
say is allowed only for short user-attention prompts
The parent does not use repo Read, Bash, Edit, Write, NotebookEdit, Grep, Glob, web_search, or local helper orchestration for the substantive task.
Mandatory first actions
- Build a short handoff from the user request only.
pimux spawn the bounded mux coordinator before any substantive analysis or implementation.
- Pass the raw objective, constraints, and any explicit file paths from the user into that child.
- Let the child read mux foundation assets and repo context.
Semantics to preserve
The migration is runtime/orchestration adaptation only. Preserve mux semantics:
- strict control-plane vs data-plane discipline
- declared dispatch before worker execution
- report/signal/summary evidence gates for advancement
- strict
ADVANCE | BLOCK | RECOVER routing
- no manual fallback outside protocol
Child coordinator contract
The authoritative pimux child owns the substantive mux run:
- child reads
../../assets/mux/protocol/foundation.md and ../../assets/mux/protocol/subagent.md
- child initializes strict session state with
../../assets/mux/tools/session.py --strict-runtime --session-key <key>
- child declares worker dispatch payloads before execution
- child requires report + signal + summary evidence for advancement
- child keeps one worker layer (
coordinator -> subagent) inside the child
- child keeps workers data-plane only; no
pimux / report_parent from helpers
Parent/session contract
- Parent -> child messaging:
pimux send_message
- Child -> parent reporting:
pimux report_parent
- success settles only after terminal
closeout + child exit
- if child outcomes are intentionally non-success, propagate matching terminal kind (
question / blocker / failure)
- for a child that must ask and continue in the same session, use
report_parent(progress, requiresResponse=true); question is terminal waiting-on-parent settlement
Completion
Complete only when the authoritative child settles and exits with protocol-valid reporting.
Do not treat interim captures, local notes, or helper output as completion.
1---2name: ac-workflow-mux3description: pi-adapted mux coordinator. Uses pimux as the authoritative runtime while preserving shared mux foundation semantics.4---56# MUX - pi coordinator pattern (pimux runtime)78Use this when the task is too large for one uninterrupted context window and you need mux wave semantics with tmux-backed long-lived execution.910## Binding activation1112If the user explicitly invokes `mux` / `ac-workflow-mux`, or embeds this skill text as the runtime for the task, treat this document as a binding runtime contract, not as optional guidance, commentary, or a planning reference.1314## Absolute compliance rule1516For explicit mux-family triggers in pi, the current session is a `pimux`-only control plane.1718- FIRST after spawn: do not poll pimux or use Bash sleep/wait loops; wait for delivered child bridge activity.19- The authoritative `pimux` extension applies a fail-closed parent control-plane lock for explicit mux-family wrappers.20- Before the first child exists, the parent must not call `Read`, `Bash`, `Edit`, `Write`, `NotebookEdit`, `Grep`, `Glob`, `web_search`, `subagent`, or any other non-`pimux` tool for substantive repo work.21- Do not do substantive repo or domain work in the parent session.22- Do not use parent-side repo discovery, file inspection, implementation planning, or direct edits before spawn.23- The first real move is to spawn the authoritative `pimux` child coordinator.24- The first observable parent tool call must be `pimux spawn`.25- If you have not spawned that child yet, you are not allowed to analyze, compare, implement, or answer the task from the parent.26- If the parent performs substantive repo inspection or any forbidden tool call before spawn, stop immediately, acknowledge a protocol violation, discard any parent-side conclusions, and restart from `pimux spawn`.2728## Parent tool surface2930While this skill is active, the parent session is runtime-locked to `pimux`, `AskUserQuestion`, and `say` only:3132- before the first child exists: `pimux spawn` only33- `AskUserQuestion` is allowed only for explicit user clarification that blocks spawn34- after spawn: notify-first, not poll-first; wait for delivered child bridge activity instead of inspecting live state35- do not poll pimux or use Bash sleep/wait loops; if you are about to inspect routine progress, stop and wait for delivered child activity instead36- happy path after spawn forbids `status`, `capture`, `tree`, `list`, and `open`; those are recovery-only tools for explicit live inspection, suspected stall/protocol violation/failure, or the inactivity watchdog37- after a child progress report arrives, use at most one `send_message` when the child needs input; then wait for closeout or another child report38- terminal settlement re-arms exactly one final `pimux status` verification before advancing39- `say` is allowed only for short user-attention prompts4041The parent does not use repo `Read`, `Bash`, `Edit`, `Write`, `NotebookEdit`, `Grep`, `Glob`, `web_search`, or local helper orchestration for the substantive task.4243## Mandatory first actions44451. Build a short handoff from the user request only.462. `pimux spawn` the bounded mux coordinator before any substantive analysis or implementation.473. Pass the raw objective, constraints, and any explicit file paths from the user into that child.484. Let the child read mux foundation assets and repo context.4950## Semantics to preserve5152The migration is runtime/orchestration adaptation only. Preserve mux semantics:5354- strict control-plane vs data-plane discipline55- declared dispatch before worker execution56- report/signal/summary evidence gates for advancement57- strict `ADVANCE | BLOCK | RECOVER` routing58- no manual fallback outside protocol5960## Child coordinator contract6162The authoritative `pimux` child owns the substantive mux run:6364- child reads `../../assets/mux/protocol/foundation.md` and `../../assets/mux/protocol/subagent.md`65- child initializes strict session state with `../../assets/mux/tools/session.py --strict-runtime --session-key <key>`66- child declares worker dispatch payloads before execution67- child requires report + signal + summary evidence for advancement68- child keeps one worker layer (`coordinator -> subagent`) inside the child69- child keeps workers data-plane only; no `pimux` / `report_parent` from helpers7071## Parent/session contract7273- Parent -> child messaging: `pimux send_message`74- Child -> parent reporting: `pimux report_parent`75- success settles only after terminal `closeout` + child exit76- if child outcomes are intentionally non-success, propagate matching terminal kind (`question` / `blocker` / `failure`)77- for a child that must ask and continue in the same session, use `report_parent(progress, requiresResponse=true)`; `question` is terminal waiting-on-parent settlement7879## Completion8081Complete only when the authoritative child settles and exits with protocol-valid reporting.82Do not treat interim captures, local notes, or helper output as completion.