dev-loops · mfittko/dev-loops · state model at commit c00aa769f
One unit of work, from startup to merge
A dev-loops run, step by step, including every sub-loop it enters. Pick a scenario or set the starting conditions, then step. When the run enters a sub-loop, the board opens that graph. For the lifecycle without sub-loops, open the Overview. You can open any graph with a sub-loop badge yourself; the run waits until you step again.
Scenarios
What this is
What to watch for
→ next · ← back · R reset · Esc back to the run · F full window
Step 0
Ready
Starting conditions
The record: what the loop knows
Only variables that a step has set. Under each value: the step that set it. Amber: what the current step read for its decision.
Who acted
Steps led or helped by each role in this run. Highlighted: the role acting now.
Trace
Where the loops are
- Refinement. The grill iterates until the issue has an AC / DoD matrix, Non-goals and a recorded results comment, or hands off honestly.
- The gate round. Reviewers fan out over one head. Fan-in checks that every unit reported. The judge decides per finding; only the act list reaches the fixer. A fix makes a new head, and the round runs again.
- Copilot follow-up. Request, wait, fix, reply, re-request, at most 5 rounds by default. A clean review on the same head ends it.
- The outer loop. Every startup re-reads the record. The next unit cannot start while the previous merge lacks its retro checkpoint.
What the record holds
The state lives outside any one chat: the issue body and its matrix, the PR and its head SHA, CI, gate verdicts per head, the gate artifacts under tmp/, the board column and the retro checkpoint in .pi/.
Each guard reads that record. A verdict counts only for the head it names. A changed spec makes every clearance from the old spec stale.
A session can end and a new one can resume. Startup reads the same record and computes the same next step.
Who decides what
Agents write code, review it and judge findings. Scripts decide whether a step may advance: coverage, validation, head identity, size, tripwires and merge preconditions. The operator decides intent, waivers and the merge authorization.
- Hooks deny raw
gh pr merge, rawgh pr createand inline interpreters. - Scripts fail closed: an unknown result blocks, and a config error never relaxes a gate.
- The operator can grant a standing authorization to merge on a clean full gate set.
Where defects are caught
Measured on 2026-10-17: the draft_gate findings of the last 40 merged PRs (2693 to 2803). The sample holds 123 findings across 18 PRs. The counts are lower bounds.
What the findings were
- Correctness: 30%
- Docs and contract drift: 24%
- Test gap: 13%
- Missing context: 10%
- Architecture or contract violation: 9%
- PR-body or evidence format: 8%
- Spec or AC gap: 6%
About 63% were catchable earlier, at
- Pre-PR review with a stale-surface sweep: 33%
- Work-order and refiner context: 11%
- Developer self-check against the AC, ADRs and non-goals: 11%
- Deterministic PR-body lint at
pr create: 8%
Step through the five early-detection scenarios to see each catching stage and the one gap.
Known gaps
Each row below is a stage that is planned or catches defects only in part, with the issue that owns it or no home.