From duo
Start RLCR (Ralph-Loop with Codex Review) with hook-equivalent enforcement from skill mode by reusing the existing stop-hook logic.
How this skill is triggered — by the user, by Claude, or both
Slash command
/duo:duo-rlcrThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this flow to run RLCR in environments without native hooks.
Use this flow to run RLCR in environments without native hooks.
Do not re-implement review logic manually. Always call the RLCR stop gate wrapper:
"{{DUO_RUNTIME_ROOT}}/scripts/rlcr-stop-gate.sh"
The wrapper executes hooks/loop-codex-stop-hook.sh, so skill-mode behavior stays aligned with hook-mode behavior.
The installer hydrates this skill with an absolute runtime root path:
{{DUO_RUNTIME_ROOT}}
All commands below assume {{DUO_RUNTIME_ROOT}}.
Start the loop with the setup script:
"{{DUO_RUNTIME_ROOT}}/scripts/setup-rlcr-loop.sh" $ARGUMENTS
If setup exits non-zero, stop and report the error.
For each round:
.duo/rlcr/<timestamp>/round-<N>-prompt.md (or finalize prompt files when in finalize phase)..duo/rlcr/<timestamp>/round-<N>-summary.md.duo/rlcr/<timestamp>/finalize-summary.mdGATE_CMD=("{{DUO_RUNTIME_ROOT}}/scripts/rlcr-stop-gate.sh")
[[ -n "${CLAUDE_SESSION_ID:-}" ]] && GATE_CMD+=(--session-id "$CLAUDE_SESSION_ID")
[[ -n "${CLAUDE_TRANSCRIPT_PATH:-}" ]] && GATE_CMD+=(--transcript-path "$CLAUDE_TRANSCRIPT_PATH")
"${GATE_CMD[@]}"
GATE_EXIT=$?
0: loop is allowed to exit (done).10: blocked by RLCR logic. Follow returned instructions exactly, continue next round.20: infrastructure error (wrapper/hook/runtime). Report error, do not fake completion.By routing through the stop-hook logic, this skill enforces:
current_round, max_iterations, review_started, base_branch, etc.)--push-every-round unpushed-commit blocking--full-review-round)COMPLETE/STOP marker handling.review-phase-started marker)[P0-9] markersask_codex_question=truestate.md or finalize-state.md.codex exec / codex review in place of the gate for phase transitions.round-*-prompt.md, round-*-review-result.md) as source of truth.Pass these through setup-rlcr-loop.sh:
| Option | Description | Default |
|---|---|---|
path/to/plan.md | Plan file path | Required unless --skip-impl |
--plan-file <path> | Explicit plan path | - |
--track-plan-file | Enforce tracked plan immutability | false |
--max N | Maximum iterations | 42 |
--codex-model MODEL:EFFORT | Codex model and effort for codex exec | gpt-5.4:xhigh |
--codex-timeout SECONDS | Codex timeout | 5400 |
--base-branch BRANCH | Base for review phase | auto-detect |
--full-review-round N | Full alignment interval | 5 |
--skip-impl | Start directly in review path | false |
--push-every-round | Require push each round | false |
--claude-answer-codex | Let Claude answer open questions directly | false |
--agent-teams | Enable agent teams mode | false |
Review phase codex review runs with gpt-5.4:high.
# Start with plan file
/flow:duo-rlcr path/to/plan.md
# Review-only mode
/flow:duo-rlcr --skip-impl
# Load skill without auto-execution
/skill:duo-rlcr
"{{DUO_RUNTIME_ROOT}}/scripts/cancel-rlcr-loop.sh"
npx claudepluginhub haonan16/duo --plugin duoStarts and manages the RLCR (Ralph-Loop with Codex Review) workflow using a native Stop hook for state validation, review gating, and iteration control.
Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.
Provides patterns for autonomous Claude Code loops from sequential pipelines and agentic REPLs to RFC-driven multi-agent DAGs. Use for continuous dev workflows, parallel agents, and CI/CD-style pipelines.