Add the Review Loop: unattended review-and-fix rounds in the desktop app and in loop phases

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-28 21:09:02 -08:00
1 parent d6a28b5dc8
commit 57567d7a0b
71 files changed
+11331 -443

No files matched your search

+52
View File
@@ -165,6 +165,7 @@ not), so your own edits never end up inside a phase's commit.
**The setup.** The fields and their defaults:
- **Review each phase** (on): a fresh agent reviews the phase before it counts.
- **Review rounds per phase** (2, from 0 to 6, only with Review on): when a phase's own review leaves a Critical or a Warning, fresh reviewers run up to this many more rounds on the phase's diff before it is judged. The phase is still committed once.
- **Fix findings**: **Smart pick** (the default) has a fresh agent read the findings and fix only the
ones worth fixing, recording every skip. A skipped Critical stops the phase. **By level** fixes the
Critical, Warning and Suggestion findings you tick (all three start ticked).
@@ -268,6 +269,57 @@ the same day). After a stop, **Read why, and the report so far** shows it on the
is unfinished it lives in `~/.plan2code/console/loop-reports.json`, not the project, because Continue building needs a
clean tree. The in-app **Help** has a matching topic, **Implementation Loop**, which the loop card links to as "How the loop works".
## Review Loop
The Review Loop reviews and fixes a finished change for you, round after round, while you do something
else. Like the Implementation Loop it is in the app only: the dashboard shows a **Review Loop** card beside
the Implementation Loop's, grayed out while either loop runs (one loop per window).
**How rounds work.** Round 1 reviews everything you chose. Every later round reviews only what the round
before it changed, so the work shrinks as it goes. Each round's reviewer is a fresh one that never saw the
code being written. An agent that can start its own reviewer runs the round in one session; any other agent
gets two, a reviewer and then a separate fixer. Each round fixes Critical and Warning findings, runs the
tests for what it touched, and is committed (or, with commits off, snapshotted) before the next begins. The
app, not the agent, decides whether a round was clean: it needs the reviewer's report, tests that ran and
passed, and no Critical or Warning left.
**The setup.** The fields and their defaults:
- **What to review**: **Branch against main, with uncommitted changes** (everything the branch changed),
**Uncommitted changes only**, or **A spec's work** (the files the chosen spec's phases built).
- **Round cap** (3, from 1 to 6): the run stops after this many rounds.
- **Commit each round to the current branch** (on). With uncommitted changes in the tree, tick **Commit my
current changes first as Work before Review Loop** so your own work stays out of round 1's commit. It
never pushes.
- **Suggestions**: **Apply Suggestions on their own** (off) lists them in the report for you to pick; on, they
are applied in one last pass after the rounds, followed by a final check.
- **Strength for every round**, as in the Implementation Loop. A retried round goes one step up for that
round only.
- **If a round goes quiet** (20 minutes): a stuck round is retried once.
- **Send a notification**: the same address as the Implementation Loop's, plus **Also tell me when each
round finishes** (off).
The setup is remembered per project in `~/.plan2code/console/review-loop-setup.json`. Please do not edit the
project's files while rounds run: anything changed goes into the round.
**Watching and stopping.** The banner across the top shows a dot per round, with each finished round's
counts on hover, the current step, the time so far and any retries; the Suggestions batch and the final check
are named as such. **Stop after this round** lets the round finish, be judged and committed; **Stop now**
ends the agent at once and then asks whether to **Keep** or **Discard** what the unfinished round changed.
**When it ends.** The run stops on a clean round, at the round cap, when you stop it, or on a failure it
cannot repair (a second crash, failing tests, a refused commit). The end screen says which, and **Read the
full report** shows every round: what it found, fixed and left, its tests and its commit, plus any
findings still open, including ones an earlier round could not fix. From there:
- **Continue** runs one more round from where it stopped, one at a time past the cap, never above 6 in all.
- Pick the Suggestions you want applied, and, when every round was committed and nothing else landed on top,
turn on **Squash the round commits into one** (off; your pre-run commit is never touched).
- **Sign off** finishes the run, with or without picks. For a spec's work the report is also saved as
`specs/<feature>/REVIEW-LOOP-<date>.md`.
- Then **PR Prep**, or **Fix what's left by hand** (a Quick task with the open findings), or back to the
dashboard.
## Keep it up to date
`plan2code update` brings the skills, the `plan2code` command and the app up together.