一键导入
control-flow
Defines compositional control-flow policies for orchestration DAGs (for example review-gated retry loops) using protocol-preserving transitions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Defines compositional control-flow policies for orchestration DAGs (for example review-gated retry loops) using protocol-preserving transitions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Runs core mu operator workflows for bounded investigation, CLI-first state operations, and session handoffs. Use when general mu execution or state-management guidance is needed.
Meta-skill for core mu operating primitives. Routes to mu, programmable-ui, memory, tmux, and code-mode based on task shape.
Produces clear, argument-driven technical prose. Use when drafting or reviewing systems papers, design docs, READMEs, PR descriptions, error messages, API references, or other technical communication.
Builds and debugs mu_ui UiDocs with schema-valid payloads, interaction wiring, and status/snapshot verification.
Runs cross-store memory retrieval and index maintenance workflows with bounded filters and timeline anchors. Use when querying prior context or repairing memory index health.
Runs issue-driven execution supervision with heartbeat orchestration and tmux fan-out. Use when work should progress through durable parallel execution loops.
| name | control-flow |
| description | Defines compositional control-flow policies for orchestration DAGs (for example review-gated retry loops) using protocol-preserving transitions. |
Use this skill when work needs explicit loop/termination policy on top of the shared protocol.
flow:review-gated-v1)Control-flow policies are overlays. They do not replace protocol semantics; they guide which protocol primitive to apply next.
Examples:
Load these skills before applying control-flow policies:
protocol (protocol primitives/invariants)execution (durable execution runtime)heartbeats and/or crons (scheduler clock)mu (for /mu ui inspection commands and communication checks)Overlay, don’t fork protocol
hierarchical-work.protocol/v1 + proto:hierarchical-work-v1.Policy metadata lives in flow:*
kind:* and ctx:*.Transitions compile to protocol primitives
spawn|fork|expand|ask|complete|serial plus normal issue lifecycle
commands (claim/open/close/dep).Bounded pass per tick
flow:review-gated-v1)flow:review-gated-v1 — subtree uses review-gated policyflow:attempt — implementation attempt nodeflow:review — review gate nodeOptional metadata in issue body/forum packet:
max_review_rounds=<N> (default recommended: 3)For round k under policy scope:
attempt_k (executable; usually kind:spawn or kind:fork)review_k (executable; usually kind:fork, ctx:inherit)attempt_k blocks review_kWhen review fails, do not leave the review node closed as needs_work.
That keeps the DAG non-final forever.
Instead:
VERDICT: needs_work)attempt_{k+1} + review_{k+1}attempt_{k+1} blocks review_{k+1}review_k with outcome=expandedThis preserves full audit history while keeping finalization reachable.
Given current round (attempt_k, review_k):
attempt not finished
attempt finished, review pending
review verdict = pass
complete(review_k) with successreview verdict = needs_work, rounds < max
expanded)review verdict = needs_work, rounds >= max
kind:ask escalation node (ctx:human, actor:user)When planning a review-gated subtree:
flow:review-gated-v1.flow:attempt, flow:review) + dependency edge.Per orchestrator tick:
read_tree + ready-set + round-state inspection.mu issues ready --root <root-id> --tag proto:hierarchical-work-v1 --prettymu issues validate <root-id>mu_ui (ui_id:"ui:subagents" when orchestration is shared, or ui_id:"ui:control-flow" when standalone).Reusable bounded heartbeat prompt fragment:
Use skills subagents, protocol, execution, control-flow, and mu.
For root <root-id>, enforce flow:review-gated-v1 with spawn-per-attempt rounds.
Run exactly one bounded control-flow transition pass, keep control-flow visibility
current via mu_ui (`ui:subagents` or `ui:control-flow`), verify DAG state,
post one ORCH_PASS, and stop. If validate is final, disable the supervising
heartbeat and report completion.
Use mu_ui as the primary communication surface for active control-flow
execution.
ui_id:"ui:subagents"ui_id:"ui:control-flow"metadata.profile.id: "subagents" or "control-flow"metadata.profile.variant: "status"metadata.profile.snapshot.compact|multilineactions: []).ui_id:"ui:control-flow:escalation").ORCH_PASS.mu_ui remove actions. Prefer remove over clear.ui:control-flow){
"action": "set",
"doc": {
"v": 1,
"ui_id": "ui:control-flow",
"title": "Control-flow status",
"summary": "policy=review-gated · round=2/3 · state=review_pending",
"components": [
{
"kind": "key_value",
"id": "policy",
"title": "Review gate",
"rows": [
{ "key": "policy", "value": "flow:review-gated-v1" },
{ "key": "round", "value": "2/3" },
{ "key": "attempt", "value": "mu-attempt-2" },
{ "key": "review", "value": "mu-review-2" },
{ "key": "next", "value": "Run review_2" }
],
"metadata": {}
}
],
"actions": [],
"revision": { "id": "control-flow-status", "version": 5 },
"updated_at_ms": 1772067720000,
"metadata": {
"profile": {
"id": "control-flow",
"variant": "status",
"snapshot": {
"compact": "round=2/3 · state=review_pending",
"multiline": "policy: review-gated\nround: 2/3\nstate: review_pending\nnext: run review_2"
}
}
}
}
}
ui:control-flow:escalation){
"action": "set",
"doc": {
"v": 1,
"ui_id": "ui:control-flow:escalation",
"title": "Review rounds exhausted",
"summary": "Need user decision after max failed review rounds.",
"components": [
{
"kind": "text",
"id": "question",
"text": "Max review rounds were reached. Should execution open another attempt or stop for manual intervention?",
"metadata": {}
}
],
"actions": [
{
"id": "open-extra-round",
"label": "Open one extra round",
"kind": "primary",
"payload": {},
"metadata": { "command_text": "/answer open-extra-round" }
},
{
"id": "stop-and-handoff",
"label": "Stop and hand off",
"kind": "secondary",
"payload": {},
"metadata": { "command_text": "/answer stop-and-handoff" }
}
],
"revision": { "id": "control-flow-escalation", "version": 1 },
"updated_at_ms": 1772067730000,
"metadata": {
"profile": {
"id": "control-flow-escalation",
"variant": "interactive"
}
}
}
}
{"action":"remove","ui_id":"ui:control-flow:escalation"}
{"action":"remove","ui_id":"ui:control-flow"}
Single-pass review success
One failed review then success
Max-round escalation
max_review_rounds; ask node created and execution blocks awaiting human input.