Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions plugins/reviews/skills/deep-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,26 @@ branch."

If a PR/MR exists, also fetch its description for context.

#### Step 1.4: Detect prior reviews (PR only)
#### Step 1.4: Detect prior reviews and determine the round

Follow the GitHub/GitLab commands in
[references/setup.md](references/setup.md). Pass prior
`Generated by /deep-review` findings to specialists and the
arbiter so resolved items and regressions are handled.
arbiter so resolved items and regressions are handled. Then apply
[the iterative review convergence policy](references/iterative-reviews.md)
to determine the round and its blocking-threshold multiplier. Round 1 uses
the baseline threshold; later rounds use 2x, 4x, 8x, and continue doubling.
Unresolved blockers from earlier rounds carry forward without requalifying
against the higher threshold.

### Phase 2 — Dispatch Specialists

Each specialist prompt lives under
[references/specialists/](references/specialists/). Dispatch rules,
JSON schema, parallel/serial modes, and external reviewers are in
[references/dispatch.md](references/dispatch.md).
[references/dispatch.md](references/dispatch.md). Give every specialist the
review round, multiplier, prior findings, and the distinction between carried
blockers and new candidates.

| Specialist | Prompt |
|------------|--------|
Expand Down Expand Up @@ -164,15 +171,19 @@ Perform synthesis directly in the main agent (not a sub-agent).
1. **Deduplicate** — merge duplicates, keep strongest reproducer
2. **Filter noise** — remove false positives, style nitpicks,
speculative findings, and issues already addressed in the branch
3. **Resolve conflicts** — corroboration strengthens; adversarial
concerns are blocking unless concretely refuted
3. **Resolve conflicts** — corroboration strengthens. Unresolved adversarial
blockers carry forward; new adversarial concerns must meet the current
round's threshold
4. **Assign disposition** — APPROVE (no BLOCKING), REQUEST_CHANGES
(BLOCKING findings), or NEEDS_DISCUSSION (needs author input).
Biases: security over ergonomics, consistency over elegance,
reproduced bugs are always BLOCKING, do not manufacture findings
reproduced bugs that meet the applicable round threshold are BLOCKING,
and unresolved reproduced blockers remain BLOCKING. Do not manufacture
findings
5. **Prioritize** — reproduced security bugs > reproduced functional
bugs > unreproduced > architecture > style/docs
6. **Emit verdict** — use collapsible `<details>` blocks for
6. **Emit verdict** — state the review round and multiplier, then use
collapsible `<details>` blocks for
specialist findings (each specialist collapsed with severity
counts). Sections: Disposition, Specialist Findings, Panel
Synthesis, Required Actions, Optional Follow-ups, Stats.
Expand All @@ -189,12 +200,15 @@ be set from Step 1.2.

## Quality Gates

A change passes when: no unresolved functional bugs, no unrefuted
adversarial scenarios, no unmitigated vulnerabilities or supply
chain risks, sound architecture, no duplicate helpers, adequate
test coverage, documentation consistent with changes, and the
shipped text is free of review residue and generated-sounding
prose, and the panel arbiter has ratified the disposition.
At round 1, a change passes when there are no unresolved functional bugs,
unrefuted adversarial scenarios, unmitigated vulnerabilities or supply-chain
risks, structural defects, duplicate helpers, material test gaps,
documentation inconsistencies, or review residue and generated-sounding prose
in shipped text, and the panel arbiter has ratified the disposition. On later
rounds, those criteria still guide investigation, but only unresolved carried
blockers and new findings that satisfy the current round's escalating threshold
prevent approval. Keep below-threshold discoveries visible as suggestions or
notes so convergence does not hide useful feedback.

## Error Handling

Expand Down
12 changes: 12 additions & 0 deletions plugins/reviews/skills/deep-review/references/dispatch.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Append this schema to each specialist prompt:

If no issues found, return an empty array and state what was checked.

Specialist severity rules describe the round 1 baseline. On later rounds, the
[iterative review policy](iterative-reviews.md) takes precedence for every new
BLOCKING classification; unresolved carried blockers retain their severity.

## Prompt path resolution

Resolve specialist prompts from the skill directory (repository
Expand All @@ -49,6 +53,10 @@ Each sub-agent gets:
- The merge base ref
- The PR number or branch name being reviewed
- Any prior review findings (if detected in Step 1.4)
- The current review round and threshold multiplier from the
[iterative review policy](iterative-reviews.md), including which prior
blockers carry forward and that the multiplier applies only to new BLOCKING
findings
- The findings JSON schema above

Sub-agents have full read access to the locally checked-out
Expand All @@ -73,6 +81,10 @@ for review instructions, review through that lens, and produce
findings in the same JSON format. Context from earlier specialists'
file reads and findings carries over automatically.

Before the first specialist, read the
[iterative review policy](iterative-reviews.md) and apply the current round's
threshold consistently to every specialist's severity classification.

**Do NOT modify any files, and do NOT push to any remote.** Serial
mode is read-only, same as parallel.

Expand Down
56 changes: 56 additions & 0 deletions plugins/reviews/skills/deep-review/references/iterative-reviews.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Iterative review convergence

Read this reference when an earlier deep-review verdict exists for the same
PR/MR or the user identifies the current review as a later round. It governs
severity classification and final disposition in both parallel and serial
modes.

## Determine the round and multiplier

Round 1 uses the ordinary baseline for a blocking finding. Each successive
round doubles the threshold for a **new** blocking finding:

| Round | New-blocker threshold |
|------:|----------------------:|
| 1 | 1x (baseline) |
| 2 | 2x |
| 3 | 4x |
| 4 | 8x |
| N | `2^(N-1)`x |

For a PR/MR, count completed deep-review panel verdicts from earlier
invocations; the current invocation is the next round. A retry, duplicate post,
or repost of one verdict does not create another round. If the user explicitly
Comment on lines +21 to +23

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Authenticate verdicts before incrementing the round

On GitHub, the setup query treats every PR comment containing the public footer text as a prior panel verdict, without checking its author or validating the verdict structure. Any participant who quotes or copies that footer can therefore inflate the count used here; several such comments can push the review to a very high multiplier and cause legitimate new blockers to be downgraded. Count only comments created by the expected reviewer identity and matching a complete verdict, or store a verifiable invocation identifier.

Useful? React with 👍 / 👎.

supplies a round, use it. Without review history or explicit round context, use
round 1.
Comment on lines +23 to +25

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose and parse the explicit round input

The fallback for local branches depends on the user explicitly supplying a round, but Step 1.1 and the skill's argument table define no round option; moreover, a bare integer is parsed as a PR identifier. Thus a user cannot reliably invoke a local second-round review through the documented command interface, and it silently remains at round 1. Add a documented, validated option such as --round N and include it in argument parsing.

Useful? React with 👍 / 👎.


## Classify carried and new findings

1. Inventory prior BLOCKING findings by their underlying defect, not by title,
line number, or wording, which may change between revisions.
2. Keep every unresolved prior blocker BLOCKING. It does not need to satisfy the
current multiplier again. Require evidence before treating it as resolved.
3. Treat a finding as new when no earlier verdict classified the underlying
defect as BLOCKING. Promoting an earlier suggestion or note is also a new
blocker. A defect shown resolved in an intervening verdict and later
reintroduced is a new regression.
4. Apply the multiplier only when deciding whether a new finding is BLOCKING.
The multiplier raises the combined bar for evidence, confidence, likelihood
in supported use, and consequence of merging. It is a comparative decision
rule, not an arithmetic bug score: at 2x a candidate must be materially more
compelling than an ordinary blocker; at 4x it needs high confidence and
severe merge impact; at 8x and beyond only increasingly exceptional,
well-supported risks should block.
5. Report a new finding that misses the current blocking threshold as a
SUGGESTION or NOTE. Do not suppress it, and do not let it determine the
disposition.

Reproducer confirmation strengthens the evidence side of the threshold but
does not bypass the multiplier for a new finding. An unresolved blocker from an
Comment on lines +48 to +49

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reproduce candidates before applying the elevated threshold

On round 2 or later, a new bug whose static evidence does not yet clear the multiplier is downgraded to SUGGESTION/NOTE by step 5, but Phase 4 of SKILL.md launches reproducers only for findings already classified as BLOCKING. Such a candidate can therefore never obtain the confirmation that this paragraph says strengthens its evidence, allowing a reproducible bug to remain non-blocking and the review to approve. Reproduce eligible reproducer_needed candidates before final threshold classification, or introduce a provisional-candidate state.

Useful? React with 👍 / 👎.

earlier round continues to block even if no new reproduction is needed.

## Arbiter output

State the round and multiplier in the disposition. Separate carried blockers
from new findings, and say whether each new BLOCKING finding cleared the
current threshold. This makes convergence decisions auditable across rounds.
8 changes: 7 additions & 1 deletion plugins/reviews/skills/deep-review/references/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ MERGE_BASE=$(git merge-base "$BASE_REMOTE/$BASE_BRANCH" HEAD)

If no base ref can be determined, error and exit.

## Step 1.4: Detect prior reviews (PR/MR only)
## Step 1.4: Detect prior reviews and determine the round

**GitHub:**
```bash
Expand All @@ -80,3 +80,9 @@ to all specialists and the arbiter as context. Specialists should:
- Flag prior findings that remain unresolved
- Avoid re-raising issues that were already noted and resolved
- Call out any regressions — issues that were fixed but reappeared

After collecting this context, read
[iterative-reviews.md](iterative-reviews.md) to determine the review round,
threshold multiplier, carried blockers, and new candidates. For a local branch
Comment on lines +84 to +86

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match the GitLab filter to the emitted footer

For GitLab MRs, the context collected before this newly required round calculation excludes verdicts produced by the skill itself: setup.md line 73 searches for Generated by /...deep-review, while SKILL.md line 190 mandates the footer Generated by the deep-review skill; the literal footer does not match that regex. Consequently repeated GitLab reviews are treated as round 1 and previously blocking findings are not carried forward. Update the GitLab filter to recognize the actual footer, retaining any legacy marker if needed.

Useful? React with 👍 / 👎.

without review history, use explicit round context supplied by the user; if
none was supplied, treat the invocation as round 1.
Loading