docs: add adversarial code review guide#292
Conversation
A reproduce-by-execution method for reviewing high-risk PRs: isolate in a worktree and baseline, fan out independent skeptic sub-agents scoped one per risk surface, verify headline findings by execution, then rank and credit what's correct. Includes the reusable sub-agent prompt template.
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a documented adversarial code review workflow covering isolated execution, baseline capture, independent sub-agent analysis, reproducible validation, result verification, severity ranking, and review posting guidance. ChangesAdversarial Review Workflow
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/adversarial-review.md`:
- Line 37: Update the fenced prompt block in adversarial-review.md to include a
language identifier, preferably text, immediately after the opening fence so the
documentation passes markdownlint MD040.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2fc269c9-d4ef-4e5e-b63f-c0ea23836e21
📒 Files selected for processing (1)
docs/adversarial-review.md
|
|
||
| Fill in the bracketed parts, one instance per risk surface. | ||
|
|
||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add a language identifier to the fenced prompt block.
The unlabeled fence triggers markdownlint MD040. Use text (or another suitable language) to keep documentation lint-clean.
Proposed fix
-```
+```text📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.23.0)
[warning] 37-37: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/adversarial-review.md` at line 37, Update the fenced prompt block in
adversarial-review.md to include a language identifier, preferably text,
immediately after the opening fence so the documentation passes markdownlint
MD040.
Source: Linters/SAST tools
Un-ignore .claude/commands/ so project slash commands are checked into the repo and available to anyone who clones it (personal .claude/settings*.json stay ignored). Adds the /adversarial-review <PR#> command, which drives the flow in docs/adversarial-review.md.
What
Adds
docs/adversarial-review.md— a documented method for reviewing high-risk PRs where every finding carries a reproduction or it doesn't ship.Why
We've been running this flow ad hoc on recent PRs (span-extraction, consistency guidelines, the memory-hooks seam) and it's caught real correctness bugs that green CI missed — fail-open compliance seams, silent signal inversions, crashes on realistic malformed inputs. This writes the method down so it's repeatable.
Contents
Docs-only; no code or behavior change.
Summary by CodeRabbit