From duo
Iterative development with AI review. Provides RLCR (Ralph-Loop with Codex Review) for implementation planning and code review loops, plus PR review automation with bot monitoring.
How this skill is triggered — by the user, by Claude, or both
Slash command
/duo:duoThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Duo creates a feedback loop where AI implements your plan while another AI independently reviews the work, ensuring quality through continuous refinement.
Duo creates a feedback loop where AI implements your plan while another AI independently reviews the work, ensuring quality through continuous refinement.
The installer hydrates this skill with an absolute runtime root path:
{{DUO_RUNTIME_ROOT}}
All command examples below use {{DUO_RUNTIME_ROOT}}.
Iteration over Perfection: Instead of expecting perfect output in one shot, Duo leverages an iterative feedback loop where:
The RLCR (Ralph-Loop with Codex Review) loop has two phases:
Phase 1: Implementation
Phase 2: Code Review
codex review --base <branch> checks code quality[P0-9] severity markers{{DUO_RUNTIME_ROOT}}/scripts/rlcr-stop-gate.sh to enforce hook-equivalent transitions and blockingAutomates handling of GitHub PR reviews from remote bots:
--claude and/or --codex)Transforms a rough draft document into a structured implementation plan with:
# With a plan file
"{{DUO_RUNTIME_ROOT}}/scripts/setup-rlcr-loop.sh" path/to/plan.md
# Or without plan (review-only mode)
"{{DUO_RUNTIME_ROOT}}/scripts/setup-rlcr-loop.sh" --skip-impl
# For each round, run the RLCR gate (required)
"{{DUO_RUNTIME_ROOT}}/scripts/rlcr-stop-gate.sh"
Common Options:
--max N - Maximum iterations before auto-stop (default: 42)--codex-model MODEL:EFFORT - Codex model and reasoning effort for codex exec (default: gpt-5.4:xhigh)codex review uses gpt-5.4:high--codex-timeout SECONDS - Timeout for each Codex review (default: 5400)--base-branch BRANCH - Base branch for code review (auto-detects if not specified)--full-review-round N - Interval for full alignment checks (default: 5)--skip-impl - Skip implementation phase, go directly to code review--track-plan-file - Enforce plan-file immutability when tracked in git--push-every-round - Require git push after each round--claude-answer-codex - Let Claude answer Codex Open Questions directly (default is AskUserQuestion)--agent-teams - Enable Agent Teams mode"{{DUO_RUNTIME_ROOT}}/scripts/cancel-rlcr-loop.sh"
# or force cancel during finalize phase
"{{DUO_RUNTIME_ROOT}}/scripts/cancel-rlcr-loop.sh" --force
# Monitor claude[bot] reviews
"{{DUO_RUNTIME_ROOT}}/scripts/setup-pr-loop.sh" --claude
# Monitor chatgpt-codex-connector[bot] reviews
"{{DUO_RUNTIME_ROOT}}/scripts/setup-pr-loop.sh" --codex
# Monitor both
"{{DUO_RUNTIME_ROOT}}/scripts/setup-pr-loop.sh" --claude --codex
Common Options:
--max N - Maximum iterations (default: 42)--codex-model MODEL:EFFORT - Codex model for validation (default: gpt-5.4:medium)--codex-timeout SECONDS - Timeout for Codex validation (default: 900)"{{DUO_RUNTIME_ROOT}}/scripts/cancel-pr-loop.sh"
Seed the output file by writing the plan template ({{DUO_RUNTIME_ROOT}}/prompt-template/plan/gen-plan-template.md) followed by the original draft content with --- Original Design Draft Start/End --- markers, then follow the workflow in this skill to generate the structured plan content.
"{{DUO_RUNTIME_ROOT}}/scripts/ask-codex.sh" [--codex-model MODEL:EFFORT] [--codex-timeout SECONDS] "your question"
A good plan file should include:
# Plan Title
## Goal Description
Clear description of what needs to be accomplished
## Acceptance Criteria
- AC-1: First criterion
- Positive Tests (expected to PASS):
- Test case that should succeed
- Negative Tests (expected to FAIL):
- Test case that should fail
## Path Boundaries
### Upper Bound (Maximum Scope)
Most comprehensive acceptable implementation
### Lower Bound (Minimum Scope)
Minimum viable implementation
### Allowed Choices
- Can use: technologies, approaches allowed
- Cannot use: prohibited technologies
## Dependencies and Sequence
### Milestones
1. Milestone 1: Description
- Phase A: ...
- Phase B: ...
## Implementation Notes
- Code should NOT contain plan terminology like "AC-", "Milestone", "Step"
The RLCR loop uses a Goal Tracker to prevent goal drift:
scripts/rlcr-stop-gate.sh instead of manual phase controlcodex - OpenAI Codex CLI (for review)gh - GitHub CLI (for PR loop)Duo stores all data in .duo/:
.duo/
├── rlcr/ # RLCR loop data
│ └── <timestamp>/
│ ├── state.md
│ ├── goal-tracker.md
│ ├── round-N-summary.md
│ ├── round-N-review-result.md
│ ├── finalize-state.md
│ ├── finalize-summary.md
│ └── complete-state.md
├── pr-loop/ # PR loop data
│ └── <timestamp>/
│ ├── state.md
│ └── resolution-N.md
└── skill/ # One-shot skill results
└── <timestamp>/
├── input.md
├── output.md
└── metadata.md
Use the monitor script to track loop progress:
source "{{DUO_RUNTIME_ROOT}}/scripts/duo.sh"
duo monitor rlcr # Monitor RLCR loop
duo monitor pr # Monitor PR loop
0 - Success1 - Validation error124 - Timeoutnpx claudepluginhub haonan16/duo --plugin duoFacilitates iterative development with AI planning and independent AI code review via RLCR (Ralph-Loop with Codex Review).
Orchestrates implement-analyze-fix loops: implements code, AI-reviews changes, fixes issues, repeats until clean or max iterations. For iterative development with quality checks.
Generates feature specs, implementation plans with task checklists, and project loop infrastructure via interactive user interviews on scope, risk tolerance, and validation.