The automated check → fix → re-check loop for a change. Sends the work to independent reviewer agents (code-reviewer, and security-reviewer when the change is security-sensitive), triages their findings, applies fixes, re-runs the affected tests, updates tests/docs as needed, then re-submits to the reviewers — repeating until the verdict is APPROVED or a max-iteration cap is hit (then it surfaces the remainder to the user). Invoked by sdlc-skill as the final-review gate (Phase 13), or on dema...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Review Loop?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/elhajahmadj-review-loop)
---
name: review-loop
description: >-
The automated check → fix → re-check loop for a change. Sends the work to independent
reviewer agents (code-reviewer, and security-reviewer when the change is security-sensitive),
triages their findings, applies fixes, re-runs the affected tests, updates tests/docs as needed,
then re-submits to the reviewers — repeating until the verdict is APPROVED or a max-iteration cap
is hit (then it surfaces the remainder to the user). Invoked by sdlc-skill as the final-review gate
(Phase 13), or on demand: "review this", "review-loop", "check my changes and fix issues",
"loop until it passes". Triggers: review loop, review and fix, check the work, final review, run
reviewers, fix review findings, iterate until approved.
---
# Review Loop — check, fix, re-check until it passes
This skill runs the **final-review gate** as an explicit loop. It doesn't review by itself — it hands the
change to **independent reviewer agents**, then triages, fixes, re-tests, and **re-submits** until they
approve (or a cap is reached). This is the "send it off to an agent → it passes or asks for fixes → do
the fixes → update the tests → re-check" cycle, made deterministic.
> Called by `sdlc-skill` at **Phase 13** (after implementation + tests), and usable standalone on any
> change. It assumes the change's tests already exist (Phases 8–11); if a fix adds behavior, this loop
> adds/updates the matching test before it re-submits.
## The loop
### 0. Gather the change
Collect **what changed** (the diff) and the **intent**. Prefer `git diff` against the base branch (or
`git status` + `git diff` for uncommitted work). Note what you already verified (tests run, manual
checks). If a graphify graph exists, refresh it (`graphify update .`) so reviewers reason on current code.
### 1. Send it to the reviewers (in parallel)
Launch, as independent subagents, **in a single batch** so they run concurrently:
- **`code-reviewer`** — always.
- **`security-reviewer`** — when the change touches auth, data access, user input, file handling,
external calls, cryptography, or anything security-sensitive.
Give each agent: the diff / changed files, the intent, what you verified, what to focus on, and the
constraint that it must **not** edit files, start servers, or touch the user's ports/processes. Each
returns a **VERDICT (APPROVED | CHANGES-REQUIRED)** with severity-ranked findings.
### 2. Triage every finding (don't blindly obey)
Reviewers can be wrong or overstate severity. For each finding, **verify it against the real code**
before acting:
- **Confirmed Critical/High** → must fix this iteration.
- **Confirmed Medium/Low** → fix the cheap ones that close a concrete gap; defer the rest to a backlog
**Suggestion** (`AS-###` in `docs/backlog.md`) with a one-line reason.
- **False positive / wrong** → dismiss with a one-line reason in your report (don't "fix" non-issues).
### 3. Apply the fixes
Make the minimal correct change for each confirmed finding. Keep the original intent; don't scope-creep.
If a fix is risky or changes the approach, note it.
### 4. Update tests + docs for what you changed
- **Tests:** for a behavior fix, add/strengthen the test that proves it — and show it **fails without the
fix** (red → green). Re-run the affected unit tests (isolated `--artifacts-path` so a running app isn't
disturbed) and report the pass count. Integration/functional tests are authored + compile-verified.
- **Docs:** if behavior/contract changed, update the docs the change touches (`requirements.md`,
`handoff.md`, `docs/tests.md`, etc.) — or hand off to `docs-skill` at the end of the parent workflow.
### 5. Re-submit (re-check)
Re-run **the same reviewers** on the **updated** diff (step 1). This is the key step — a fix isn't trusted
until the reviewer sees it and approves. Tell each reviewer what changed since its last pass.
### 6. Decide: loop or stop
- **All reviewers APPROVED** → done. Emit the pass summary (below).
- **Still CHANGES-REQUIRED** and **iteration < cap (default 3)** → go to step 2 with the new findings.
- **Cap reached and still failing** → **stop looping.** Do not churn forever. Report the remaining
findings, what you tried, and why they persist, and hand the decision to the user (or log them as
`AS-###`/`AF-###` if they're acceptable-for-now risks). Looping past the cap usually means the design
needs rethinking, not another patch.
**Guardrails:** never weaken or delete a test to make a finding "pass." Never edit the reviewer agents to
soften them. If two reviewers conflict, prefer the stricter one and reconcile in your report. Keep the
user's running environment untouched (isolated build outputs, spare ports, only your own processes).
## Output (end of loop)
```
Review loop: <APPROVED after N iteration(s) | STOPPED at cap with M open finding(s)>
Iteration log:
1. code-reviewer: CHANGES-REQUIRED (2 High, 1 Med) · security-reviewer: APPROVED
-> fixed: <...>; tests: <added/updated, pass count>; dismissed: <false positive + reason>
2. code-reviewer: APPROVED · security-reviewer: APPROVED
Final: <all APPROVED> | <open: [HIGH] <file> — <why unresolved> → surfaced to user / logged AS-###>
Tests: <unit pass count; integration/functional authored>
```
## When to use which reviewer
- **Quality/correctness/architecture change** → `code-reviewer`.
- **Touches auth, user input, data access, files, external calls, crypto** → add `security-reviewer`.
- **Both** run in parallel when both apply — they review different axes and their verdicts combine (the
loop is APPROVED only when **every** launched reviewer approves).
## Relationship to the rest of the workflow
This loop is the **enforcement** behind `sdlc-skill` Phase 13. It complements, not replaces,
`code-review-skill` (the review *standards/checklist*) and `VibeSec-Skill` (the secure-coding guide):
those define *what good looks like*; this loop *drives independent agents to check it and iterates until
the work meets it.* When the native `/code-review` command is available, run it too and fold its findings
into the same triage.