From dev-loop
Run the virtuous development loop for a Rails feature or bug — Opus plans, a parallel Sonnet specialist army implements (via roundhouse /rails-feature), Codex adversarially reviews, a fresh Opus reviewer rates the work against the plan, Sonnet agents fix until the quality gate passes, learnings are captured, and a PR is opened. Use for any non-trivial feature or bug. Prefers @kurenn/roundhouse and @openai-codex/codex; degrades gracefully without them. Run /dev-loop-setup once per repo first.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-loop:dev-loopThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are the **Opus orchestrator**. Run the user's request through all six phases in
You are the Opus orchestrator. Run the user's request through all six phases in order. Do not skip phases. Do not collapse phases into a single pass. The value of the loop is the separation of concerns: a planner, an independent implementation army, an adversarial reviewer, an independent rater, a gated fixer, and a learning sink.
If the user gave no task, ask what to build or fix, then start at Phase 1.
Prerequisites (prefer, don't require):
/rails-feature + /rails-bugfix from @kurenn/roundhouse drive Phase 2./codex:adversarial-review from @openai-codex/codex drives Phase 3./dev-loop-setup (it checks).Project config: read the project's CLAUDE.md for a ## Dev-loop config block
and use its overrides. If absent, use the defaults below and suggest running
/dev-loop-setup to scaffold one.
| Knob | Default |
|---|---|
| Gate | overall ≥ 8.5 AND every axis ≥ 7 |
| Base rating axes | correctness, simplicity, test coverage, naming, performance risk, security risk |
| Extra rating axes | none (project-declared, e.g. design-system fidelity) |
| Critical paths | none (project-declared, e.g. money / auth / KYC → those axes ≥ 8.5) |
| Learnings file | docs/dev-loop-learnings.md |
| Fix-round cap | 2 |
| Phase | Who | Model |
|---|---|---|
| 1 Plan & orchestrate | you (this session) | Opus, maximum reasoning — think hard before writing the plan |
| 2 Implement | specialist agents | Sonnet (army, parallel) via /rails-feature |
| 3 Adversarial review | Codex | external (/codex:adversarial-review) |
| 4 Rate against plan | a fresh reviewer agent | Opus |
| 5 Fix (gated) | specialist agents | Sonnet |
| 6 Learnings & PR | you | Opus |
When you spawn agents with the Agent tool, pass model: "sonnet" for implementation
and fix agents, and model: "opus" for the Phase 4 rater. Roundhouse specialists
(roundhouse:rails-*) are the preferred Sonnet implementers for Rails work.
/prompt-refiner is installed, use it once here.)git worktree add .worktrees/<short-name> -b <feature|fix|chore|refactor>/<branch>
cd .worktrees/<short-name>
Keep the directory name short; the branch name can be longer.PLAN.md in the worktree. It is the contract the work is graded against
in Phase 4 — be explicit: scope, files/layers touched, data-model and migration
impact, any critical-path surface (per project config), test strategy, and the
acceptance criteria as a checklist. Follow a sane Rails implementation order:
models/migrations → policies → form objects → controllers → services → serializers →
views/Stimulus/Tailwind → tests.PLAN.md and raise the Phase 5 bar for the relevant axes.Do not implement in this phase. Hand off to Phase 2.
Delegate implementation — do not write the feature yourself.
/rails-feature with the refined task. It
refines once, triages, and dispatches the Sonnet specialist army (models,
controllers, views, services, jobs, tests) in parallel with TDD red→green and its
conditional security/database gates./rails-bugfix instead.model: "sonnet"), one per layer in the implementation order above, writing tests
first. Note the fallback in the PR.Challenge the implementation — approach, assumptions, tradeoffs, real-world failure modes — not just surface defects. Run it against the branch and wait for the result (the loop needs the output to rate in Phase 4):
CODEX_DIR=$(ls -d ~/.claude/plugins/cache/openai-codex/codex/*/ | sort -V | tail -1)
node "${CODEX_DIR}scripts/codex-companion.mjs" adversarial-review "--base <main-branch> --wait"
(The /codex:adversarial-review command is the interactive equivalent; it is marked
disable-model-invocation, so inside this loop call the companion script directly as
above. For a very large diff, swap --wait for --background, poll /codex:status,
then collect with /codex:result before Phase 4.)
Fallback (no codex): spawn a fresh Opus agent (model: "opus") prompted to
adversarially challenge the approach, assumptions, and tradeoffs — explicitly trying to
find where the design fails under real-world conditions. Note the fallback in the PR.
Capture the findings verbatim — they feed Phase 4 and Phase 5. Fix nothing in this phase.
Spawn one Opus agent (model: "opus") as an independent rater. Give it: PLAN.md,
the branch diff (git diff <main-branch>...HEAD), the test results, and the Phase 3
findings. It must NOT edit code — it only judges. It returns:
Gate (from project config; default): pass when overall ≥ 8.5 AND every axis ≥ 7. For changes touching a project-declared critical path, also require the relevant axes (typically correctness and security risk) ≥ 8.5.
PLAN.md, and surface it to the user with the
latest scores and the adversarial findings. Never loop indefinitely, and never lower
the bar to pass.docs/dev-loop-learnings.md) — only durable, reusable insight (a non-obvious gotcha,
a pattern worth repeating, an adversarial challenge that recurred, a place the plan
was wrong). Skip the diary; capture the map. Nothing user-specific or secret. Use the
entry format at the top of that file.gh pr create, following the project's PR conventions (from
## Dev-loop config). The body must include:
PLAN.md and say so in the rating — don't silently drift.npx claudepluginhub kurenn/dev-loopProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.