Three parallel reviewer agents find contradictions, config gaps, and coverage holes across a project's docs, config, and tests — then fix what you approve. Heavyweight (dispatches parallel agents, can modify files); explicit invocation only. Triggers: /adversarial-review, "adversarial review", "find gaps in my docs/config".
72
88%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Risky
Do not use without reviewing
You are orchestrating an adversarial review of this project. The goal is to find every gap, contradiction, and missing piece in the project's documentation and configuration — then fix what matters.
Arguments: $ARGUMENTS
--diff scopes the review to changes since the last commit (or last /map run).Before launching any agents, YOU must understand the project. Discover what exists:
Read ARCHITECTURE.md at the repo root if it exists.
/map first for richer context." Proceed with manual discovery.Read .claude/review-config.md if it exists. It may contain:
## Focus Areas — additional review priorities (append to all agent prompts)## Ignore — file globs to exclude from review## Severity Overrides — rules to reclassify finding severityCLAUDE.md, AGENTS.md, GEMINI.md, COPILOT.md, CURSOR.md, AIDER.md, .cursorrules, .windsurfrules, .clinerules, .github/copilot-instructions.md, or any root-level markdown or dotfile that appears to contain AI assistant instructions*.md in the root — any file that looks like a specification, PRD, plan, or architecture docpackage.json, Cargo.toml, pyproject.toml, go.mod, mix.exs, build.sbt. Also check the project root for any other build, package, or dependency files specific to the detected language..eslintrc.* (JS), rustfmt.toml (Rust), .rubocop.yml (Ruby), mypy.ini (Python), .golangci.yml (Go), .formatter.exs (Elixir). Also search root for dotfiles and YAML/TOML/JSON files that appear to be linter, formatter, or build tool configuration for the detected language.scripts/**/*, .github/workflows/**/*, .gitlab-ci.yml, .circleci/**/*, Jenkinsfile*, .buildkite/**/*, .travis.yml, azure-pipelines.yml, bitbucket-pipelines.yml. Check for any other CI/automation configuration present.ls on the project root and check the manifest to discover actual source and test directories. Do not assume src/ is the only source directory — projects may use src/, lib/, app/, cmd/, pkg/, internal/, Sources/, crates/, packages/, or top-level package directories. For tests, check tests/, test/, spec/, __tests__/, src/test/, and language-specific conventions (examples: *_test.go, test_*.py, *_spec.rb, t/*.t). For any other language, check for its test naming conventions. If no language can be determined, treat all non-binary files as potential source and search broadly. Note the uncertainty in the output.Dockerfile*, docker-compose*, .env*, MakefileIf .claude/review-config.md has an ## Ignore section, filter out matching files.
If --diff was passed:
ARCHITECTURE.md has a last-mapped SHA (not 0000000): use itHEAD~1. Print a warning: "No valid /map baseline found. Diffing against HEAD~1 only. Consider running /map first for a comprehensive baseline."git diff <base>..HEAD --name-statusgit diff HEAD --name-statusgit ls-files --others --exclude-standard (untracked, treat as A)CLAUDE.md and project instruction files in context (even if unchanged)Print 3-5 bullets before proceeding:
--diff: which files changed and how many dependents were includedLaunch three reviewer agents in parallel using separate Agent tool calls (subagent_type: "general-purpose") in a single message. Each agent focuses on one domain but reads ALL files for cross-reference context.
If the discovered file list exceeds 50 files, pass at most 30 file paths to each reviewer agent. Group remaining files by directory and pass directory-level summaries instead of individual paths.
IMPORTANT: Launch all three agents simultaneously in a single response.
If a domain has no relevant files (e.g., no config files), skip that agent and note it in the summary.
If ARCHITECTURE.md was found, prepend this to EVERY agent prompt:
## Project Context (from ARCHITECTURE.md)
### High-Coupling Zones (changes here have wide blast radius):
[paste the High-Coupling Zones table]
### Key Interfaces:
[paste the Key Interfaces list]
### Conventions:
[paste the Conventions section]
Use this context to:
- Flag findings as higher severity when they affect high-coupling zones
- Cross-reference dependency relationships when checking for contradictions
- Evaluate code/config against established conventionsIf --diff was used, prepend this to EVERY agent prompt:
This is a diff-scoped review. Focus on changes in these files: [list changed files].
Also review these context files for cross-reference: [list unchanged context files].
Flag issues in changed files at normal severity. Flag issues in context files only if they directly contradict the changed files.spec-reviewer — Spec ConsistencyLaunch with subagent_type: "general-purpose".
You are an adversarial SPEC CONSISTENCY reviewer. Focus on:
- Internal contradictions within spec/plan documents
- Cross-references between docs that don't match (phases, numbering, naming)
- Missing definitions referenced elsewhere
- Ambiguities where an AI agent could go either way
- Prose behaviors that contradict code examples
- Type definitions that don't match what tests reference
[ARCHITECTURE.MD CONTEXT PREAMBLE if available]
[DIFF-SCOPE PREAMBLE if --diff]
[FOCUS AREAS from review-config.md if available]
Read ALL files: [LIST ALL DISCOVERED FILES WITH ABSOLUTE PATHS]
Return ONLY findings as numbered markdown. Each finding must have: number, file+line reference, what's wrong, evidence (quoted text), suggested fix. Categorize as CRITICAL / IMPORTANT / MINOR.config-reviewer — Config & HooksLaunch with subagent_type: "general-purpose".
You are an adversarial CONFIG & HOOKS reviewer. Focus on:
- Hook scripts that won't work for the file paths described in specs
- Permission gaps (commands the spec requires but permissions don't allow)
- Settings that contradict documented behavior
- Hook logic errors (wrong grep patterns, path resolution issues, race conditions)
- Environment variables that are missing or wrong
- Slash commands that reference paths or behaviors incorrectly
[ARCHITECTURE.MD CONTEXT PREAMBLE if available]
[DIFF-SCOPE PREAMBLE if --diff]
[FOCUS AREAS from review-config.md if available]
Read ALL files: [LIST ALL DISCOVERED FILES WITH ABSOLUTE PATHS]
Return ONLY findings as numbered markdown. Each finding must have: number, file+line reference, what's wrong, evidence (quoted text), suggested fix. Categorize as CRITICAL / IMPORTANT / MINOR.coverage-reviewer — Test Coverage & CompletenessLaunch with subagent_type: "general-purpose".
You are an adversarial TEST COVERAGE reviewer. Focus on:
- Exported functions/classes that appear to lack test coverage (check the project's coverage config for threshold)
- Test behaviors that can't be implemented as described
- Check for specialized testing paradigms (BDD/Gherkin `.feature` files, property-based testing, snapshot testing, contract testing) and validate against their framework requirements. For all other tests, evaluate against the project's actual testing patterns.
- Coverage config that excludes too much or too little
- Interfaces, abstract definitions, or contracts that declare behavior but lack implementations or tests. Skip if the language doesn't use explicit type/interface declarations.
[ARCHITECTURE.MD CONTEXT PREAMBLE if available]
[DIFF-SCOPE PREAMBLE if --diff]
[FOCUS AREAS from review-config.md if available]
Read ALL files: [LIST ALL DISCOVERED FILES WITH ABSOLUTE PATHS]
Return ONLY findings as numbered markdown. Each finding must have: number, file+line reference, what's wrong, evidence (quoted text), suggested fix. Categorize as CRITICAL / IMPORTANT / MINOR.Wait for all three agents to finish. Then:
[HIGH RISK].claude/review-config.md if presentAfter showing the merged findings, ask the user:
Here are the findings from 3 parallel reviewers. Which should I fix?
- A) All critical + important findings
- B) Only critical findings
- C) Let me pick specific ones (list the finding numbers)
- D) Skip fixes — I just wanted the review
Wait for the user to respond before proceeding. If they choose D, stop here.
Launch an agent with subagent_type: "general-purpose" named adversarial-pm.
Build the prompt dynamically. Include the full text of every selected finding. The template:
You are an adversarial product manager. You have a list of findings from a technical review. Your job is to make the minimum edits to fix each finding. Nothing more.
Read the current state of every file you're about to edit BEFORE making changes.
Findings to fix: [PASTE THE FULL TEXT OF EVERY SELECTED FINDING HERE]
General rules:
Rules for project instruction files (CLAUDE.md, AGENTS.md, GEMINI.md, COPILOT.md, CURSOR.md, AIDER.md, .cursorrules, .windsurfrules, .clinerules, .github/copilot-instructions.md, or any root-level markdown or dotfile containing AI assistant instructions):
Rules for specs, plans, and documentation:
Rules for config files:
After each file edit, state:
Do NOT:
Wait for the PM agent to finish. Then summarize what was changed for the user.
After the PM agent finishes, present a summary:
## Adversarial Review Complete
### Reviewers: 3 parallel agents (spec, config, coverage)
### Findings: X critical, Y important, Z minor
### Fixed: N findings across M files
### Changes made:
- [file]: [1-line description of change] (finding #N)
- ...
### Not fixed (if any):
- Finding #N: [reason — user chose to skip, out of scope, etc.]If any project instruction file (CLAUDE.md, AGENTS.md, GEMINI.md, COPILOT.md, CURSOR.md, AIDER.md, .cursorrules, .windsurfrules, .clinerules, .github/copilot-instructions.md, or any other AI assistant instruction file) was modified, call it out explicitly so the user can review those changes.
Suggest running /adversarial-review again if critical fixes were made, to verify no regressions.
| Condition | Behavior |
|---|---|
| Not a git repo | Print warning: "Not a git repository. Running full review (--diff ignored if present)." Proceed without diff capability. |
| Git unavailable | Print warning: "Git not found. Running full review (--diff ignored if present)." Proceed without diff capability. |
| Shallow clone | Print warning: "Shallow clone detected. Diff history may be limited." Proceed with available history. |
git diff fails with invalid revision | Print warning: "Base commit not found (possibly shallow clone). Running full review." Ignore --diff. |
| Single reviewer agent fails | Retry once. If it fails again, proceed with findings from the other reviewers. Note which reviewer was skipped. |
be88d6c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.