一键导入
cyclus-loop-design
Design a well-formed Cyclus loop: RECOGNIZE→SPECIFY→DECOMPOSE via Planner+Architect+Critic consensus (≤3 rounds)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Design a well-formed Cyclus loop: RECOGNIZE→SPECIFY→DECOMPOSE via Planner+Architect+Critic consensus (≤3 rounds)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
TaskExecutionKind: execute a plan to completion with per-task verification
ConsensusKind: Planner+Architect+Critic deliberate to produce a verified implementation plan
pipeline: interview→plan→execute→QA→verify (idea→code)
Multi-role consensus triage of an issue backlog.
Socratic reqs interview; clarify vague/ambiguous goals
parallel web research; subagents→synthesis→cite-verify
| name | cyclus-loop-design |
| description | Design a well-formed Cyclus loop: RECOGNIZE→SPECIFY→DECOMPOSE via Planner+Architect+Critic consensus (≤3 rounds) |
| version | 1.0.0 |
| metadata | {"hermes":{"tags":["loop-design","ldd","consensus","planning","meta-loop"],"category":"cyclus","requires_toolsets":["terminal","file"]}} |
Loop kind:
ConsensusKindTurn results:RoundComplete | ConsensusReachedTerminal states:ConsensusReached | DeadlockedMax rounds: 3
This skill is the structural expression of Loop-Driven Development (LDD).
It produces a validated spec.yaml and a ralph-shaped plan.md that the
cyclus-loop planning gate will accept. Nothing gets dispatched until this
skill approves the loop design.
This skill is itself a loop. The discipline that enforces well-formed loops is produced by running a ConsensusKind loop. LDD all the way down.
Read docs/ldd.md before using this skill.
spec.yamlcyclus-loop run timed out (decompose smaller via this skill first)active-pairing in STATE.md, proceed directly)Before designing the loop, understand the work:
STATE.md — what has already been tried? What is the current baseline?.cyclus/plans/ for similar loopsRound 1 — Sequential: Planner → Architect → Critic → DRI
Step 1 — Loop Planner
Load role prompt:
planner_prompt = skill_view(name="cyclus-loop-design",
file_path="references/role-loop-planner.md")
If empty, abort: "Role prompt unavailable."
delegate_task(
goal="Design a Cyclus loop for this goal:\n\n{goal}\n\n"
"Produce: (1) spec.yaml fields, (2) decomposed task list.",
context="## Role\n\n{planner_prompt}\n\n"
"## Context\n\n{gathered_context}\n\n"
"## Spec template\n\n{spec_template}"
)
Step 2 — Loop Architect
Load role prompt:
architect_prompt = skill_view(name="cyclus-loop-design",
file_path="references/role-loop-architect.md")
delegate_task(
goal="Stress-test this loop design:\n\n{planner_output}",
context="## Role\n\n{architect_prompt}\n\n"
"## Context\n\n{gathered_context}"
)
Step 3 — Loop Critic
Load role prompt:
critic_prompt = skill_view(name="cyclus-loop-design",
file_path="references/role-loop-critic.md")
delegate_task(
goal="Check this loop design for LDD anti-patterns:\n\n"
"PLANNER OUTPUT:\n{planner_output}\n\n"
"ARCHITECT REVIEW:\n{architect_output}",
context="## Role\n\n{critic_prompt}\n\n"
"## Context\n\n{gathered_context}"
)
Step 4 — DRI review
Present the round output (Planner spec + task list, Architect findings, Critic findings) to the DRI — the human or agent who seeded the goal. The DRI is the only participant who knows whether the plan still serves what was actually intended.
Ask the DRI:
DRI verdict:
Step 5 — Consensus check
All four roles must APPROVE:
Round 2+ — Planner revises; Architect + Critic re-review in parallel; DRI re-reviews last
DRI re-review always happens after Architect + Critic, since the DRI's judgment depends on seeing the resolved technical findings first. In Round 2+, DRI input is the final gate before consensus.
### Phase 2: Write output
Write two files:
**`spec.yaml`** at `.cyclus/plans/{slug}-spec.yaml`:
```yaml
kind: {LoopKind}
name: {slug}
level: L1 # always L1 until trust is established
metric: {metric} # if MetricOptimizationKind
direction: {dir}
baseline: {baseline}
terminal:
target_score: {score}
max_iterations: {n}
plateau_count: {p}
evaluate: |
{eval_command}
target_files:
- {file1}
plan.md at .cyclus/plans/{slug}-plan.md:
Ralph-shaped task list. Each task must have:
Report to the user:
cyclus-loop invocation to dispatchEach role returns one of:
Consensus = all four roles (Planner, Architect, Critic, DRI) APPROVE in the same round.
DRI's verdict takes priority. If Architect and Critic both APPROVE but DRI REQUEST_CHANGES, the loop continues. The DRI is the only one who knows whether the plan serves the original intent.
| File | Purpose |
|---|---|
.cyclus/plans/{slug}-spec.yaml | Machine-validated loop spec (Pydantic gate) |
.cyclus/plans/{slug}-plan.md | Ralph-shaped task list |
STATE.md update | Mode declaration: loop-work, instance, declared at timestamp |
Load role prompts via skill_view before every delegate_task call.
If skill_view returns empty, abort. Never inline role prompts.
Round 2+ Architect and Critic are independent — run in parallel. Saves 60-90s per round.
The Architect's job is decomposition, not architecture. cyclus-loop-design is not about system architecture (that's cyclus-plan). It's about whether the loop is well-formed: right kind, budget-sized tasks, verifiable terminal conditions.
The Critic checks LDD anti-patterns, not code quality. L3-before-L1, no plateau detection, eval that modifies repo state, task descriptions > 200 words — these are the Critic's targets.
level: L1 always in initial output. The Planner must never propose L2 or L3 on first design. Trust is earned by running at L1 first. The Architect and Critic must reject any spec that starts at L2 or L3.
Every task must fit in one delegation budget (~600s). The Architect's primary job: count the words in each task description and trace the acceptance criteria. If a task description exceeds 200 words or acceptance criteria require more than one verifiable state transition, it must be split. This is the decomposition failure that caused the queue-rewrite timeout (session 2026-07-07) — it must not repeat.
Do not design loops for active-pairing-session work.
If you and the member are both present and the work is trivially obvious,
declare active-pairing in STATE.md and proceed directly. cyclus-loop-design
is for autonomous, recurring, or complex work.
Read references/pitfalls.md for earned pitfalls from real runs — mocked
e2e tests giving false confidence, terminal conditions dropped between plan
and task body, autonomous loops blocked by missing branch setup, completion
with no delivery signal, subagent timeouts with zero artifacts, and closing
tasks that discover — but must not silently resolve — a divergence from what
the design consensus ratified.