adversarial-review

Reviews specs, plans, tests, and code diffs across four adversarial lifecycle gates.

9|Updated Jul 8, 2026
One-click install
npx skills add https://github.com/jerrylin96/dotgemini --skill adversarial-review-jerrylin96
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adversarial-review
Source: https://github.com/jerrylin96/dotgemini/tree/main/skills/adversarial-review
Command: npx skills add https://github.com/jerrylin96/dotgemini --skill adversarial-review-jerrylin96

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Code and design reviews often miss edge cases, weak test assertions, and unstated assumptions, letting defects slip through each stage of the software lifecycle. This Skill enforces multi-stage adversarial audits of specifications, plans, RED tests, and code worktrees so issues are caught before merge. ## Core Features & Use Cases - Four Review Gates: Routes between spec-review, plan-review, test-review, and code-review modes, each with its own checklist and verdict contract (APPROVE / REJECT / NEEDS_REVISION). - Isolated Worktree Audits: The resolve_branches.py script fetches remote branches or PR heads, creates managed git worktrees, and guards against re-reviewing unchanged commit SHAs. - External Reviewer Orchestration: Supports living review branches with per-reviewer file isolation, tamper tripwires, signal scorecards, and convergence gates for asynchronous external agents. - Use Case: Before merging a feature branch, run an adversarial code review that diffs the branch against the integration baseline inside a disposable worktree, runs the test suite, and produces a copy-paste action plan for PR comments. ## Quick Start Ask the agent to run an adversarial review on your feature branch and select the target branch when prompted.

Frequently Asked Questions about adversarial-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a git feature branch in an isolated worktree?

Run the resolve_branches.py script with the target branch name; it fetches remotes, creates a managed detached worktree under ~/.gemini/tmp/worktrees, and returns JSON with the worktree path and commit hashes. All inspection and tests run inside that worktree, leaving your active workspace untouched.

How do I review a pull request by number with git?

Pass --pr <N> or a PR URL to resolve_branches.py. It fetches the PR head ref directly from the remote (refs/pull/N/head on GitHub, refs/merge-requests/N/head on GitLab) into a local review ref, so fork PRs and merged PRs work too.

What is the difference between external and pipeline review modes?

External mode is a user-triggered, single-pass, strictly read-only audit producing a copy-paste PR action plan. Pipeline mode runs inside the /make-feature workflow as a builder-reviewer loop with up to three REJECT cycles before escalating to a human.

Does this review workflow work on Windows?

No. The branch resolver requires fcntl for file locking, so only macOS and Linux are supported. On platforms without fcntl the script exits with an explicit platform error.

Why does the review stop with 'SHA has not changed'?

When --last-sha matches the resolved commit hash, the script returns sha_changed: false and skips worktree creation to avoid redundant reviews. Pass --force to bypass this guard and re-review the same commit.

How are external reviewer agents prevented from tampering with the repo?

Reviewers may write only their own reviews/<REVIEWER_ID>.md file, must use targeted git add, and can never force-push. The builder audits every commit's touched files and flags any out-of-scope modification as tampered, triggering session termination.