Skip to content

docs: add adversarial review skill guidance#8

Open
Boulea7 wants to merge 2 commits into
mainfrom
codex/adversarial-review-skill-guidance
Open

docs: add adversarial review skill guidance#8
Boulea7 wants to merge 2 commits into
mainfrom
codex/adversarial-review-skill-guidance

Conversation

@Boulea7
Copy link
Copy Markdown
Owner

@Boulea7 Boulea7 commented May 27, 2026

Summary

  • document an adversarial review prompt profile for Claude and Codex skill bundles
  • teach the Antigravity-side collaboration skill how to respond when the caller asks for adversarial review
  • fix Codex forwarder copy-paste wording that still referred to the Claude skill/agent, and add a regression test

Test plan

  • UV_CACHE_DIR=/private/tmp/agy-mcp-uv-cache uv --no-config run --index-url https://pypi.org/simple pytest tests/test_install_skill_drift.py tests/test_skill_bridge_forwarders.py -q
  • UV_CACHE_DIR=/private/tmp/agy-mcp-uv-cache uv --no-config run --index-url https://pypi.org/simple ruff check tests/test_skill_bridge_forwarders.py src/agy_mcp/_skill_bodies/claude/scripts/agy_bridge.py src/agy_mcp/_skill_bodies/codex/scripts/agy_bridge.py skills/claude/collaborating-with-antigravity/scripts/agy_bridge.py skills/codex/collaborating-with-antigravity/scripts/agy_bridge.py
  • git diff --check

Reference: derived from gemini-plugin-cc and codex-plugin-cc adversarial-review workflows while keeping agy-mcp's public mode enum unchanged.

Summary by Sourcery

Document an adversarial review prompt profile for Claude and Codex review modes and align Antigravity collaboration behavior and Codex forwarder copy with this profile.

Enhancements:

  • Correct Codex forwarder module docstrings to refer to the Codex skill and agent instead of Claude.

Documentation:

  • Describe an adversarial review variant of the existing review prompt for Claude and Codex skills and their bundled skill bodies.
  • Explain when and how to use the adversarial review prompt profile in the Claude and Codex SKILL documentation.
  • Clarify Antigravity collaboration guidance so it explicitly handles prompts requesting adversarial review.

Tests:

  • Add a regression test ensuring the Codex skill forwarder text is Codex-specific and no longer mentions Claude.

Summary by cubic

Add an adversarial review prompt profile and guidance across Claude/Codex and Antigravity collaboration skills to make high‑risk code reviews stricter. Also fix Codex forwarder wording and tighten the regression test.

  • New Features

    • Document adversarial review prompt profile in references/prompt-patterns.md for Claude and Codex; use with agy(..., mode="review") as a stricter prompt (not a new mode).
    • Update SKILL docs on what to attack in adversarial review: data loss, auth/path boundaries, concurrency/state, retries/cancellation, rollback/release drift, and missing tests.
  • Bug Fixes

    • Correct Codex agy_bridge.py forwarder copy to stop mentioning Claude.
    • Tighten test_codex_forwarder_uses_codex_specific_copy to lock Codex-specific wording.

Written for commit 7118391. Summary will update on new commits. Review in cubic

Change-Id: I66b1c6587edaf35b830c898f755b0dee755d69c3
Copilot AI review requested due to automatic review settings May 27, 2026 08:09
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 27, 2026

Reviewer's Guide

Documents a new adversarial review prompt profile for Claude and Codex Antigravity collaboration skills, aligns Antigravity’s collaboration guidance with that profile, and fixes Codex forwarder copy to be Codex-specific with a regression test.

Sequence diagram for adversarial review prompt profile in review mode

sequenceDiagram
  actor Reviewer
  participant ClaudeSkill
  participant AntigravityCollab

  Reviewer->>ClaudeSkill: agy path mode=review
  ClaudeSkill->>AntigravityCollab: review prompt with adversarial profile
  AntigravityCollab-->>ClaudeSkill: findings P0/P1/P2/P3
  ClaudeSkill-->>Reviewer: findings and residual risks
Loading

File-Level Changes

Change Details Files
Add an adversarial review prompt profile to Claude and Codex collaboration skill docs and shared skill bodies.
  • Introduce an 'adversarial review variant' section that defines a stricter review prompt for high‑risk changes (security, concurrency, persistence, migrations, release tooling).
  • Specify focus areas for adversarial review (P0/P1 regressions, auth/permissions/path traversal/secrets, races and idempotency, migration/rollback behavior, missing tests) and structured P0–P3 output format.
  • Ensure the adversarial profile is documented as a prompt pattern, not a new bridge mode, and keep wording in Claude vs Codex references in sync.
skills/claude/collaborating-with-antigravity/references/prompt-patterns.md
skills/codex/collaborating-with-antigravity/references/prompt-patterns.md
src/agy_mcp/_skill_bodies/claude/references/prompt-patterns.md
src/agy_mcp/_skill_bodies/codex/references/prompt-patterns.md
Teach Claude and Codex collaboration SKILL docs how to use the adversarial review profile.
  • Add a 'Review prompt profile' section explaining when to use normal review mode vs adversarial review for high‑risk changes.
  • Describe how to call agy(..., mode="review") and overlay the adversarial prompt profile without changing bridge modes.
  • Duplicate this guidance in both top-level skills and internal skill body docs for Claude and Codex.
skills/claude/collaborating-with-antigravity/SKILL.md
skills/codex/collaborating-with-antigravity/SKILL.md
src/agy_mcp/_skill_bodies/claude/SKILL.md
src/agy_mcp/_skill_bodies/codex/SKILL.md
Update Antigravity collaboration skill behavior description to handle adversarial review requests explicitly.
  • Extend guidance for review-mode behavior so that if a prompt asks for adversarial review, the agent actively challenges the change across data loss, auth/path boundaries, concurrency, retries/cancellation, rollback, release drift, and tests.
  • Clarify that 'no P0/P1 findings' should only be stated after checking these adversarial paths.
skills/antigravity/agy-collaboration/SKILL.md
src/agy_mcp/_skill_bodies/antigravity/SKILL.md
Fix Codex bridge forwarder docstring to be Codex-specific and add a regression test for the wording.
  • Change forwarder docstrings to say 'Codex skill' and 'Codex's user-scope skill directory' instead of incorrectly referencing Claude.
  • Add a unit test that reads the Codex forwarder template and asserts that it mentions Codex (skill/agent) and does not mention Claude (skill/agent).
skills/codex/collaborating-with-antigravity/scripts/agy_bridge.py
src/agy_mcp/_skill_bodies/codex/scripts/agy_bridge.py
tests/test_skill_bridge_forwarders.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The adversarial review prompt text is duplicated across multiple SKILL and prompt-pattern files; consider introducing a single shared source or generation step for this wording so future edits don’t silently diverge between Claude/Codex and skill-body copies.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The adversarial review prompt text is duplicated across multiple SKILL and prompt-pattern files; consider introducing a single shared source or generation step for this wording so future edits don’t silently diverge between Claude/Codex and skill-body copies.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Warning

Review limit reached

@Boulea7, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 36 minutes and 37 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fdc2c063-f4b6-4624-8a1a-22d9c4d7ee0c

📥 Commits

Reviewing files that changed from the base of the PR and between 6d619b0 and 7118391.

📒 Files selected for processing (13)
  • skills/antigravity/agy-collaboration/SKILL.md
  • skills/claude/collaborating-with-antigravity/SKILL.md
  • skills/claude/collaborating-with-antigravity/references/prompt-patterns.md
  • skills/codex/collaborating-with-antigravity/SKILL.md
  • skills/codex/collaborating-with-antigravity/references/prompt-patterns.md
  • skills/codex/collaborating-with-antigravity/scripts/agy_bridge.py
  • src/agy_mcp/_skill_bodies/antigravity/SKILL.md
  • src/agy_mcp/_skill_bodies/claude/SKILL.md
  • src/agy_mcp/_skill_bodies/claude/references/prompt-patterns.md
  • src/agy_mcp/_skill_bodies/codex/SKILL.md
  • src/agy_mcp/_skill_bodies/codex/references/prompt-patterns.md
  • src/agy_mcp/_skill_bodies/codex/scripts/agy_bridge.py
  • tests/test_skill_bridge_forwarders.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/adversarial-review-skill-guidance

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the skill documentation to include an “adversarial review” prompt profile (as a stricter mode="review" prompt, not a new mode), updates Antigravity collaboration guidance to explicitly handle adversarial-review requests, and fixes Codex forwarder copy that incorrectly referenced Claude (with a regression test to prevent recurrence).

Changes:

  • Add “adversarial review variant” prompt scaffolding to Claude/Codex prompt-pattern references and cross-link it from SKILL docs.
  • Update Antigravity collaboration playbooks to instruct stricter checks when the caller requests adversarial review.
  • Fix Codex bridge forwarder docstrings to be Codex-specific and add a regression test.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_skill_bridge_forwarders.py Adds regression test to ensure Codex packaged forwarder copy is Codex-specific.
src/agy_mcp/_skill_bodies/codex/SKILL.md Documents when/how to use the adversarial review prompt profile for Codex.
src/agy_mcp/_skill_bodies/codex/scripts/agy_bridge.py Fixes docstring wording to refer to Codex skill/agent (not Claude).
src/agy_mcp/_skill_bodies/codex/references/prompt-patterns.md Adds “adversarial review variant” prompt scaffold.
src/agy_mcp/_skill_bodies/claude/SKILL.md Documents when/how to use the adversarial review prompt profile for Claude.
src/agy_mcp/_skill_bodies/claude/references/prompt-patterns.md Adds “adversarial review variant” prompt scaffold.
src/agy_mcp/_skill_bodies/antigravity/SKILL.md Updates review guidance to explicitly handle adversarial-review prompts.
skills/codex/collaborating-with-antigravity/SKILL.md Mirrors packaged Codex SKILL docs with adversarial review guidance.
skills/codex/collaborating-with-antigravity/scripts/agy_bridge.py Mirrors packaged Codex forwarder docstring fix.
skills/codex/collaborating-with-antigravity/references/prompt-patterns.md Mirrors packaged Codex prompt-patterns adversarial review variant.
skills/claude/collaborating-with-antigravity/SKILL.md Mirrors packaged Claude SKILL docs with adversarial review guidance.
skills/claude/collaborating-with-antigravity/references/prompt-patterns.md Mirrors packaged Claude prompt-patterns adversarial review variant.
skills/antigravity/agy-collaboration/SKILL.md Mirrors packaged Antigravity collaboration guidance update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_skill_bridge_forwarders.py Outdated
Comment on lines +93 to +96
assert "Codex skill" in raw
assert "Codex agent" in raw
assert "Claude skill" not in raw
assert "Claude agent" not in raw
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 13 files

Re-trigger cubic

Change-Id: Ie9fb5e3feaa1ebca509a18082a6a23fd99c2c63c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants