一键导入
cyclus-autopilot
pipeline: interview→plan→execute→QA→verify (idea→code)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
pipeline: interview→plan→execute→QA→verify (idea→code)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
TaskExecutionKind: execute a plan to completion with per-task verification
Design a well-formed Cyclus loop: RECOGNIZE→SPECIFY→DECOMPOSE via Planner+Architect+Critic consensus (≤3 rounds)
ConsensusKind: Planner+Architect+Critic deliberate to produce a verified implementation plan
Multi-role consensus triage of an issue backlog.
Socratic reqs interview; clarify vague/ambiguous goals
parallel web research; subagents→synthesis→cite-verify
| name | cyclus-autopilot |
| description | pipeline: interview→plan→execute→QA→verify (idea→code) |
| version | 3.0.0 |
| metadata | {"hermes":{"requires_toolsets":["terminal","omh"],"tags":["autopilot","pipeline","autonomous","end-to-end","composition"],"category":"omh"}} |
This skill implements a TaskExecutionKind loop (multi-phase pipeline).
omh plugin must be installed (~/.hermes/plugins/omh/)Each autopilot invocation reads state, does ONE unit of work, exits. The caller re-invokes. This preserves fresh context at every level — including during the loop.
Invocation 1: Phase 0 — requirements (or skip)
Invocation 2: Phase 1 — planning (or skip)
Invocations 3-N: Phase 2 — loop iterations (one per call)
Invocation N+1: Phase 3 — QA cycle [FRESH SESSION]
Invocation M: Phase 4 — validation round [FRESH SESSION]
Final: Phase 5 — cleanup → complete
See references/caller-examples.md for how to drive the loop.
Autopilot drives a goal through spec → plan → loop → QA → validation. Two autopilot sessions on the same goal would race on state simultaneously. Use per-instance queue claims for mutual exclusion.
instance_id in this order:
.omh/specs/{name}-spec.md, use
instance_id = "{name}"..omh/plans/plan-{slug}.md, use
instance_id = "{slug}".instance_id = kebab(goal)[:60].cyclus_queue(action="post", mode="autopilot", instance_id="{instance_id}",
kind="TaskExecutionKind", name="{goal}")
result = cyclus_queue(action="claim", mode="autopilot", instance_id="{instance_id}")
status="claimed": proceed; read current phase from the work item's state file.status="running": the item is held by another active session.
Report the holder (check cyclus_queue(action="status", mode="autopilot", instance_id=...) for details),
offer wait/cancel/different goal.status="not_found": unexpected — post() first, then claim().instance_id to every cyclus_queue call in this invocation
(autopilot, loop, autopilot modes).cyclus_queue(action="release", mode="autopilot", instance_id="{instance_id}")
For terminal exits (Phase 5 cleanup complete, permanent block), call complete()
instead of release().After claiming, read the current phase from the work item's state_path file:
state_path is empty or absent): Fresh start → Smart Detection (below)state.phaseWhen autopilot state is absent, detect artifacts:
.omh/specs/*-spec.md → create state at Phase 1.omh/plans/plan-*.md → create state at Phase 2cyclus_queue(action="status", mode="loop", instance_id="{instance_id}");
if status="COMPLETE" → create state at Phase 3Check for active loop: cyclus_queue(action="status", mode="loop", instance_id="{instance_id}") →
if status is RUNNING or PENDING, warn about existing session.
Initialize state via cyclus_queue(action="write_state", mode="autopilot", instance_id="{instance_id}", state={...}):
{
"phase": "requirements", "goal": "...", "loop_iteration": 0,
"qa_cycle": 0, "max_qa_cycles": 5, "validation_round": 0,
"max_validation_rounds": 3, "validation_verdicts": {},
"skip_qa": false, "skip_validation": false, "pause_after_phase": null
}
Goal: Ensure a confirmed spec exists.
.omh/specs/*-spec.md with status: confirmed → found? Set spec_file, advance to Phase 1:
cyclus_queue(action="write_state", mode="autopilot", instance_id="{instance_id}", state={..., "phase": "planning", "spec_file": "<path>"}),
then cyclus_queue(action="release", mode="autopilot", instance_id="{instance_id}"), exit.cyclus-interview and follow it. This phase is interactive.phase: "planning", spec_file: "<path>". Call write_state(...), release(), exit.For fully autonomous runs: run cyclus-interview separately first.
Goal: Ensure a consensus plan exists.
.omh/plans/plan-*.md → found? Set plan_file, advance to Phase 2:
call cyclus_queue(action="write_state", mode="autopilot", instance_id="{instance_id}", state={..., "phase": "execution", "plan_file": "...", "loop_iteration": 0}),
then cyclus_queue(action="release", mode="autopilot", instance_id="{instance_id}"), exit.cyclus-plan, follow its procedure with the spec as input.phase: "execution", plan_file, loop_iteration: 0.
Call write_state(...), release(), exit.Each phase transition follows the pattern: write_state({phase: "next_phase", ...}) →
release() → exit. The fresh session on re-invocation picks up cleanly via claim() + phase dispatch.
Each invocation performs exactly ONE loop iteration:
delegate_task:
loop_skill = skill_view(name="cyclus-loop")
delegate_task(
goal="Follow the cyclus-loop skill procedure: read state, pick the next incomplete task, execute it, verify, update state, exit.",
context="<current loop state + plan file contents>\n\n## Loop Skill Procedure\n{ralph_skill}"
)
loop_status = cyclus_queue(action="status", mode="loop", instance_id="{instance_id}")
status is PENDING or RUNNING (still active) → increment loop_iteration,
call write_state({..., "loop_iteration": N}), call release(), exit (caller re-invokes).status is COMPLETE → advance:
call write_state({..., "phase": "qa"}), call release(), exit.status is BLOCKED or CANCELLED → set autopilot phase: "blocked",
call write_state({..., "phase": "blocked"}), call release(), report, exit.Each invocation performs ONE QA cycle. Starts in fresh session.
If skip_qa: true → advance to Phase 4: write_state({..., "phase": "validation"}), release(), exit.
evidence = cyclus_evidence(commands=["<build>", "<test>", "<lint>"])
evidence.all_pass → advance: write_state({..., "phase": "validation"}), release(), exit.qa_cycle. Check 3-strike on qa_error_history. If triggered →
write_state({..., "phase": "blocked"}), release(), exit.qa_cycle > max_qa_cycles (default 5) →
write_state({..., "phase": "blocked"}), release(), exit.write_state(...), call release(), exit (next invocation re-runs QA).Each invocation performs ONE validation round. Starts in fresh session.
If skip_validation: true → advance to Phase 5: write_state({..., "phase": "cleanup"}), release(), exit.
evidence = cyclus_evidence(commands=["<build>", "<test>"])
architect_prompt = skill_view(name="cyclus", file_path="references/role-architect.md")
security_prompt = skill_view(name="cyclus", file_path="references/role-security-reviewer.md")
code_prompt = skill_view(name="cyclus", file_path="references/role-code-reviewer.md")
delegate_task(tasks=[
{goal: "Architectural review:\n{spec + plan}", context: "{evidence}\n\n## Role\n{architect_prompt}"},
{goal: "Security review:\n{changed files list}", context: "{evidence}\n\n## Role\n{security_prompt}"},
{goal: "Code quality review:\n{changed files list}", context: "{evidence}\n\n## Role\n{code_prompt}"}
])
validation_verdicts and call write_state(...).write_state({..., "phase": "cleanup"}), release(), exit.validation_round,
call write_state(...), release(), exit.validation_round > max_validation_rounds (default 3) →
write_state({..., "phase": "blocked"}), release(), exit.phase: "cleanup" first via write_state(...) (safety — if interrupted, re-invocation retries cleanup).complete() for all queue items associated with this run:
cyclus_queue(action="complete", mode="autopilot", instance_id="{instance_id}", terminal_state="PlanComplete")
cyclus_queue(action="complete", mode="loop", instance_id="{instance_id}", terminal_state="PlanComplete")
cyclus_queue(action="complete", mode="loop-tasks", instance_id="{instance_id}", terminal_state="PlanComplete")
.omh/logs/, .omh/plans/, .omh/specs/All state via cyclus_queue(action="write_state", ...). Atomic writes and heartbeat tracking
are handled by the queue. After each claim(), read the state from the state_path field
of the claimed item to restore phase and progress.
cyclus_queue(action="status", mode="autopilot", instance_id="{instance_id}")
→ item dict with status (PENDING|RUNNING|COMPLETE|BLOCKED|CANCELLED) and state_path
Read state_path for {phase, goal, loop_iteration, ...}.
skill_view, follow its procedure.release() at the end of each phase before
exiting. The next invocation claims fresh and reads the current phase from state.