agentleFS
aws-solutionsaws-solutions/konductor/skills/adversarial-code-review-pass-schema/SKILL.md

adversarial-code-review-pass-schema

Skill11 starsChanged 49 days agoApache-2.0View on GitHub

Reviews a diff through the lens of schema and contract — API/schema/type changes, backward compatibility, validation completeness. Use only when the adversarial-code-review coordinator spawns it, alongside the security and integrity passes.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Add a new required field, header, or parameter without a migration path for existing clients

    line 22
  2. Distinctive:

    Read a nested map or optional field without a guard, then act on it

    line 25
  3. Distinctive:

    Run business logic or a side effect before input validation completes

    line 26
  4. Distinctive:

    Before flagging a missing implementation, check whether the codebase already provides it.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Adversarial Code Review — Schema / Contract Pass

Overview

Reviews a diff through the lens of schema and contract stability — API shapes, type changes, validation completeness, and backward compatibility. This is one of three parallel review passes spawned by an adversarial-review coordinator SOP. The framing is neutral by design: review through the lens of contract, do not assume any specific issue exists.

Usage

Spawned by an adversarial-review coordinator SOP (such as k-adversarial-pull-request-review) as one of three parallel subagent passes. May also be run directly against a diff.

What to look for

Review through the lens of schema and contract. In this diff, does anything:

  • Add a new required field, header, or parameter without a migration path for existing clients
  • Change a field type, remove a field, or rename a field in a shipped API or data model
  • Skip validation on a new field in one or more entry points
  • Read a nested map or optional field without a guard, then act on it
  • Run business logic or a side effect before input validation completes
  • Register a new handler or route without wiring it into the router, authorizer, or middleware chain
  • Introduce a schema field that lacks a default in read paths for existing records
  • Change enum values, error codes, or status names that consumers pattern-match on

For each concern, name the file:line, the concrete failure scenario (which client breaks, which record becomes unparseable), and a specific fix.

Out of scope

  • Do not flag validation issues on synthetic fixture data in test files — test fixtures intentionally skip production validation paths. This exempts fixture DATA specifically, not test files as a category: a genuine contract/schema defect in production-reachable code that happens to live in a test file is still in scope and must be flagged.

Codebase awareness

Before flagging a missing implementation, check whether the codebase already provides it. Flag bypassing an existing utility, not the absence of one:

  • Shared input validation middleware or schema validators → flag bypassing them
  • Existing versioning or migration helpers → flag ad-hoc migration logic
  • Established default-handling patterns for schema evolution → flag divergence

Checker handoff

Findings produced by this pass are candidates, not verdicts. The coordinator forwards them to a different-persona checker that applies adversarial-code-review in Validator Mode before anything reaches the CR. Produce your honest read.

Severity guidance

  • CRITICAL — breaking change to a shipped API or data model without a migration path; new field required by write path but not defaulted in read path (existing records unparseable)
  • IMPORTANT — validate-then-act ordering violation (validation exists but runs after a side effect); integration wiring gap (handler present, not wired to auth or middleware); missing guard on a map/optional access that will be reached at runtime
  • SUGGESTION — new field validated at one entry point but not another; enum change that consumers may pattern-match on

Output format

[SEVERITY] Schema/Contract — file:line
Problem: {what is wrong and why it is a risk}
Fix: {concrete suggested change}

Return the findings list. Do not deduplicate against other passes — the coordinator does that.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.