dev-loop
A plan + state + /step loop-engineering harness for Claude Code. Drive any project through a verified, resumable, one-step-at-a-time plan. State lives in files — so you can /clear between steps and pick up exactly where you left off.
This repository is a Claude Code marketplace (dev-loop-marketplace) hosting the dev-loop plugin (this README). The general-purpose agent/command/skill toolkit formerly bundled here as cc-toolkit now lives in its own repository/marketplace: YuheiNakasaka/cc-toolkit.
What it gives you
Two files become the source of truth — not the chat history:
.claude/dev-plans/<date>-<slug>.md — the spec (what to do): an ordered list of steps, each with a goal, success criteria, verification method, and dependencies. /plan-init writes a new file every run and never overwrites an earlier plan, so past plans (and the decisions behind them) are preserved as files + in git history; the active plan is whatever dev-state.json's planDoc points to.
.claude/dev-state.json — the ledger (what happened + config): per-step status, gate results, learnings, and all settings (working branch, base branch, worktree path, quality-gate commands, project name, plan path). Git-ignored and local (per-developer) — it changes on every step and would otherwise cause merge conflicts on multi-person projects; teammates track progress via the committed plan files + the Step N: <title> commit history.
Because every setting lives in dev-state.json, the commands are completely project-agnostic. The same /step works in any repository.
Commands
| Command | What it does |
|---|
/plan-init [goal · spec · path to a review doc] | Creates an isolated git worktree at .worktrees/<slug>/ (branch dev-loop/<slug>) by default — say "current tree" to skip — then scaffolds a new .claude/dev-plans/<date>-<slug>.md (never overwriting an earlier plan) + a local .claude/dev-state.json inside the worktree. Auto-detects quality gates (typecheck / test / lint / build), confirms them with you, records a baseline, sets up the review gate, and — when the goal is ambiguous — offers an optional one-question-at-a-time grilling to sharpen the success criteria. |
/step [id] | Runs one step: check dependencies (incl. a worktree guard that refuses to run in the wrong tree) → implement → run the gates → review gate → update state → one commit per step. With no argument it runs the next pending step (and resumes an in-progress one). |
/step-review [id] | Read-only: runs only the review gate against the current working tree and reports the verdict. Never edits, commits, or advances currentStep. Useful after manual fixes or as a pre-commit dry run. |
/plan-status | Read-only progress view: step table (with review verdicts), completion %, gate-regression check, blocked steps' human tasks, accumulated learnings. Suggests /plan-finish once every step is done (or deferred). |
/plan-finish | Finishes the plan: re-runs all gates fresh → syncs with the base branch (origin/<base>) → asks merge / push + PR / keep / discard → provenance-gated worktree cleanup (removes a worktree only if dev-loop created it under .worktrees/). |
If a project already defines a command with the same name locally (e.g. .claude/commands/step.md), the local one wins. In that case invoke the plugin version explicitly as /dev-loop:step.
Worktree isolation (parallel sessions)
Running several LLM sessions against the same checkout causes edit conflicts, linter noise, and clean-tree collisions. /plan-init therefore creates a git worktree per plan by default: