Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Development

adversarially-validating-game-repairs

Stress-tests an already-written game bug fix with adversarial cases selected from the state, timing, identity, lifecycle, persistence, and input surfaces the patch can actually reach, then returns a PatchEvidence record covering fail-to-pass, relevant pass-to-pass, inverse-case, invariant, and untested-scope evidence. Use when a fix makes the reported symptom go away and it is still unknown whether the fix is the real one or an overfit, coincidental, or plausible-but-wrong one. Not for finding unknown defects in a build (that is runtime smoke testing), checking one mechanic against its written spec, or judging difficulty, fun, or balance.

abagames · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add abagames/agentic-gamedev-skills --skill adversarially-validating-game-repairs

About this skill


name: adversarially-validating-game-repairs description: "Stress-tests an already-written game bug fix with adversarial cases selected from the state, timing, identity, lifecycle, persistence, and input surfaces the patch can actually reach, then returns a PatchEvidence record covering fail-to-pass, relevant pass-to-pass, inverse-case, invariant, and untested-scope evidence. Use when a fix makes the reported symptom go away and it is still unknown whether the fix is the real one or an overfit, coincidental, or plausible-but-wrong one. Not for finding unknown defects in a build (that is runtime smoke testing), checking one mechanic against its written spec, or judging difficulty, fun, or balance."

Adversarially Validating Game Repairs

Purpose

A fix that makes the symptom disappear has proven one thing: the symptom disappears under the one condition that was tried. That is compatible with the fix being correct, and equally compatible with it being a guard at the reader, a clamp on the output, a special case that happens to cover the reported input, or a change that works only at 60 fps on seed 2001.

This procedure attacks the fix with conditions its author did not have in mind, and produces a record an independent reader can check without re-deriving the author's reasoning.

When to Use

  • A patch exists, the reported symptom is gone, and confidence in why is low.
  • The fix touches lifecycle, identity, timing, ordering, persistence, or a shared/pooled resource — the areas where a locally correct change is most often globally wrong.
  • Before shipping a repair to a mechanic that players can grind, repeat, or abuse.

When Not to Use

  • No patch yet. There is nothing to attack.
  • The build crashes or throws — establish runtime health first; adversarial conditions on a build that does not run produce noise.
  • The question is whether a mechanic matches its written spec, or whether the game is well balanced. Both are different questions with different instruments.
  • The change is cosmetic and cannot reach game state.

Required Inputs

  • The patch, as a diff.

  • The ReproCase the patch was written against — minimal contract, inlined so this skill needs nothing else:

    id:            # stable name for this defect
    seed:          # RNG seed, or "none"
    build:         # commit / build identifier
    setup:         # starting state or save slot
    inputs:        # ordered input events with tick indices — the input tape
    observe:       # the wrong observable, as a value
    expected:      # the healthy value
    determinism:   # always | intermittent(n/m runs)
    
  • The invariant the patch claims to restore, stated as a checkable predicate.

  • Whatever passing checks existed before the patch, so pass-to-pass has a baseline.

Procedure

  1. Restate the claim without the author's explanation. Write, from the diff alone, what the patch changes and what would have to be true for that to fix the reported symptom. Do not read the author's rationale first, and do not treat it as evidence when you do. An explanation is a hypothesis with a motive; the diff is the artifact.

  2. Establish fail-to-pass and relevant pass-to-pass. Run the ReproCase on the pre-patch build (must fail) and the post-patch build (must pass). A repro that does not fail before the patch invalidates everything downstream — stop and fix the repro. Then run the existing healthy checks whose paths the patch can reach and confirm they still pass. State what those checks exercise; an unrelated green suite is not evidence. Record counts, not adjectives.

  3. Select adversarial cases by reachability and failure cost. Use references/adversarial-conditions.md as a routing catalog, not a universal checklist. Map the diff and restored invariant to the state surfaces they can reach, then run the cheapest cases that cover those surfaces:

    • vary seeds only when the patched path consumes or depends on RNG;
    • vary frame/tick rate only when it reaches elapsed time, frame counts, deadlines, or ordering;
    • exercise pause/resume, scene transitions, or save/load only when it reaches that lifecycle;
    • exercise pooling, identity reuse, same-tick events, or deferred completions only when it reaches identity, ordering, or lifetime;
    • measure performance, memory, or build time only when a prior budget exists and the patch can affect it.

    Do not enumerate catalog rows the patch cannot reach. Record a reachable, high-cost condition in untested_scope when it matters but cannot be run.

  4. Attack the fix's shape, not only its inputs. For each of these, decide yes/no with evidence:

    • Does the patch change the first divergent write, or add a check downstream of it? A guard at the reader leaves the bad write in place and fails the moment a second reader appears.
    • Does it clamp an output (max(0, hp), min(cap, score)) rather than prevent the bad value? Clamping converts a visible defect into a silent one.
    • Does it special-case the reported input — a condition mentioning the exact entity, level, seed, or count from the bug report?
    • Does it change only a constant where the report describes wrong logic? Retuning a number is not a logic repair, and the two are routinely confused because both make the symptom go away.
    • Does it introduce state that a pool, restore, or scene reload can carry across a lifetime boundary?
  5. Test the inverse. Construct a case where the patched code path should not trigger and confirm it does not. A fix that suppresses the symptom by suppressing the whole mechanic passes every test aimed at the bug.

  6. Judge by outcome, never by diff similarity. If a reference or "correct" patch exists, do not compare against it. A different change that restores the invariant is correct; an identical change that does not is not.

  7. **Do not let the f

Read the complete source ↗