feat(setup): configure other models as adversarial reviewers, with per-harness commands - #1371
Merged
Merged
Conversation
This was referenced Sep 24, 2026
potiuk
added this pull request to stack #1374
September 24, 2026 16:52
…ommand in the plugin `adversarial-review commands --harness claude|codex|gemini|copilot` prints the command file for each harness from one template. The Claude Code command is generated into tools/adversarial-review/commands/ (pinned by a test against the generator) and published by the plugin as /magpie-adversarial-review:adversarial-review. Harness command files are kept out of doctoc: their frontmatter must come first. Generated-by: Claude Opus 5
…y, upgrade - config Step 3c: run `adversarial-review detect`, pre-tick every available backend except the harness's own model, write .apache-magpie-local/adversarial-review.md, and offer the Codex/Gemini command files under the user's home (never on a pre-flight entry, never inside a repository; hard rule 1 names the exception) - verify 8i: configured reviewers whose CLI is gone, and stale command files - upgrade 6b: rewrite the command files when the plugin path changes - adopt 4a: adversarial-review.md is personal by default - projects/_template/adversarial-review.md, pinned parseable by a test - eval suite setup/step-config-adversarial (4 cases) Generated-by: Claude Opus 5
The reviewer CLIs need network and their own credentials, which the sandbox denies. One excludedCommands entry names the installed plugin's single-line invocation; the plugin cache is Edit-denied, since the tool runs unsandboxed; and there is deliberately no allow rule, so every run keeps its prompt. isolated-setup-install Step R wires it; the settings baseline and the secure-setup reference change in lockstep. Generated-by: Claude Opus 5
- one invocation form everywhere — unquoted, literal ~, <version> — the form the sandbox exclusion matches, pinned by a test against the baseline; no command bakes a version in, so the upgrade rewrite is gone - Codex/Gemini/Copilot commands tell the agent to ask for an unsandboxed run - config Step 3c runs only when named, diffs an existing file, and the recap lists the home-directory writes; the argument is documented - verify 8i also runs on marketplace installs; adopt always flags the file as personal and says what promoting on-pr-create costs contributors - isolated-setup-verify check 14 for the exclusion, the deny, and no allow - the tool refuses --body-file / diff: paths outside the repo or temp dir Generated-by: Claude Opus 5
Generated-by: Claude Opus 5
potiuk
force-pushed
the
feat/adversarial-review-setup
branch
from
September 24, 2026 17:05
a33e9a0 to
290a640
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 2 of 4. Follows #1368 (merged), which added the tool and plugin. PR 3 and PR 4 stack on this one.
Summary
adversarial-review commands --harness claude|codex|gemini|copilotprints each harness's command file from one template:/magpie-adversarial-review:adversarial-review.~/.codex/prompts/…and~/.gemini/commands/….setup config adversarial-review(Step 3c). It runsdetect, pre-ticks every available model CLI except the harness's own, and writes.apache-magpie-local/adversarial-review.md. It then offers the command files. It runs only when named, never from a skill's pre-flight. Home-directory writes are the one, named exception toconfig's write boundary.verify8i flags configured reviewers whose CLI has gone.adopt4a always treats the file as personal.excludedCommandsentry names the installed plugin's single-line invocation, and the plugin cache isEdit-denied. There is deliberately noallow: each run sends the change to other model providers and keeps its prompt. The settings baseline andexpected.jsonchange in lockstep.isolated-setup-installStep R wires the entry, andisolated-setup-verifycheck 14 verifies it.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)projects/_template/)Test plan
prek run --all-filespassespytest(140 tests),ruff checkandmypypass fortools/adversarial-reviewsetup/step-config-adversarial(5 cases). It covers the named run, a plain run, a pre-flight entry, a missing plugin, and onlyselfavailable.adversarial-reviewexclusion pattern intools/sandbox-lint/expected.json. A quoted or~-expanded path would silently stay sandboxed.sandbox-lintpasses (settings and baseline match).--body-fileordiff:path outside the repository or a temporary directory, so an approved run cannot send~/.sshto a model.RFC-AI-0004 compliance
configStep 3c proposes and writes only what the user ticks. The tool has noallowrule, so every run keeps its permission prompt.Editdeny on the plugin cache. The residual glob caveat is documented in Step R.adversarial-review.md(personal, with an optional project default).Linked issues
Follows #1368.
Notes for reviewers (optional)
~and an unquoted path. Every place that tells an agent how to run the tool now uses that exact form.🤖 Generated with Claude Code