kennethkhoocy/applied-micro-skills/plugins/applied-micro/skills/adversarial-empirical-review/SKILL.md
adversarial-empirical-review
N-round adversarial review pipeline for empirical research output — the chain from data to LaTeX tables to a manuscript that cites them. A Claude drafter proposes minimal diffs, a deterministic mechanical battery gates every diff from a clean state with a regression gate, a Codex reviewer files check-backed critiques, and a blind judge panel decides residual disputes. Manual-invoke ONLY: trigger when the user explicitly runs /adversarial-empirical-review or names 'adversarial-empirical-review' /
- Source repository stars
- 47
- Declared platforms
- 1
- Static risk flags
- 2
- Last source update
- 2026-08-24
- Source checked
- 2026-08-25
Decision brief
What it does: where it fits
Runs a regression-gated, N-round adversarial loop over a project's empirical output. The design is in docs/2026-06-08-adversarial-empirical-review-design.md (v2) and the module API in docs/CONTRACTS.md. Read the design before operating the skill.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/kennethkhoocy/applied-micro-skills --skill "plugins/applied-micro/skills/adversarial-empirical-review"Inspect the Agent Skill "adversarial-empirical-review" from https://github.com/kennethkhoocy/applied-micro-skills/blob/28d6f6445e745711fc64a4faeebca35eac1b2b02/plugins/applied-micro/skills/adversarial-empirical-review/SKILL.md at commit 28d6f6445e745711fc64a4faeebca35eac1b2b02. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
How to run it
This validates config, runs the partition linter, builds the run workspace in a local temp dir (off Dropbox), establishes the incumbent baseline battery, records the baseline green-set and the state-0 fingerprint, and writes progress.json. It prints a JSON action.
Preflight + setup.Step loop. Repeatedly:{"action": "dispatch", "request": {role, family, promptpath, inputpaths, outputpath, inline, nonetwork, cwd}} - 02
Orchestration contract (read this first)
When invoked from Claude Code, you are the orchestrator, but you do not improvise the control flow. A deterministic Python state machine — scripts/driver.py — owns every transition, enforces the invariants (regression gate, ratchet, mapping disposal, termination), and persists s…
When invoked from Claude Code, you are the orchestrator, but you do not improvise the control flow. A deterministic Python state machine — scripts/driver.py — owns every transition, enforces the invariants (regression g…The Claude-vs-Codex split. Python can launch Codex (subprocess) but cannot launch Claude subagents. So the driver runs Codex roles (reviewer, allcodex judges) inline, and pauses for you whenever it needs a Claude role (… - 03
Folding human decisions back (re-run)
Escalated identification/specification/causal-overclaim items land in artifacts/escalations.md. The user records resolutions in decisions.json (content-hash-scoped). Re-running the pipeline consumes them and suppresses re-litigation of settled matters.
Escalated identification/specification/causal-overclaim items land in artifacts/escalations.md. The user records resolutions in decisions.json (content-hash-scoped). Re-running the pipeline consumes them and suppresses… - 04
Key constraints (inherited + skill-specific)
1. No claude -p. All Claude work runs via the Agent tool (subagents). It is the only Claude channel that works on Windows and the credential-isolation mechanism (no ANTHROPICAPIKEY is ever materialized; subagents use the session). 2. Codex flags (Windows). Codex subprocesses use…
No claude -p. All Claude work runs via the Agent tool (subagents). It is the only ClaudeCodex flags (Windows). Codex subprocesses use -m gpt-5.5 --skip-git-repo-checkBlinding. Judges receive the disputed claim and both versions inline as Version 1 / - 05
Invocation
Manual-invoke only: /adversarial-empirical-review or an explicit by-name request. It is token-intensive (multi-round, re-execution, judge panels), so it never auto-triggers.
Manual-invoke only: /adversarial-empirical-review or an explicit by-name request. It is token-intensive (multi-round, re-execution, judge panels), so it never auto-triggers.
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
python driver.py init --config <path/to/aer.config.json>Runs scripts
The documentation asks the agent to run terminal commands or scripts.
python driver.py stepReads files
The documentation asks the agent to read local files, directories, or repositories.
Claude subagent whose entire input is the `inline` payload; it must not read any file;Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 47 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- kennethkhoocy/applied-micro-skills
- Skill path
- plugins/applied-micro/skills/adversarial-empirical-review/SKILL.md
- Commit
- 28d6f6445e745711fc64a4faeebca35eac1b2b02
- License
- MIT
- Collected
- 2026-08-25
- Default branch
- main
View the original SKILL.md
Adversarial Empirical Review
Runs a regression-gated, N-round adversarial loop over a project's empirical output. The
design is in docs/2026-06-08-adversarial-empirical-review-design.md (v2) and the module API
in docs/CONTRACTS.md. Read the design before operating the skill.
The costly error here is corrupting a result that was already correct, so the whole pipeline is incumbent-preserving: a hard failure-set regression gate, "no clear difference keeps the incumbent" for residuals, and minimization of LLM judgment in favour of mechanical checks.
The crux is whether the tables are correct. Auditing an empirical manuscript means verifying
that the numbers in its tables are what the analysis code actually computes — that each
coefficient, standard error, p-value, N, and R² reproduces from the data and the code and is
internally consistent. This is an empirical + code review: the battery, the reviewer, and the
drafter are all scoped to table-number correctness, the manuscript is consulted only as the
spine that maps paper Table numbers to fragment files, and prose is not examined (the
prose-scanning catalog checks default to off; research-design and interpretation critique are out
of scope, with the consequential-category machinery retained as a fail-safe). The mechanical anchor for this is
builtin.table_source_agreement (every estout-fragment cell is audited against a numbers.json of
computed values) together with the reproduction tier and the coef/SE/t, star/p, bounds, and
sample-size checks. The crux is fail-closed: a manuscript table with no numbers.json spec is a
FAIL and a missing artifact a CHECK_ERROR, and the driver will not converge unless every
required_checks entry (default the crux) is present and passing — otherwise it stops with
crux_unverified. A manuscript whose tables are hand-transcribed estout fragments decoupled from
the regressions (the common case) is reviewed by recomputing the regressions and diffing the cells
— supply a numbers.json of computed values so the audit is mechanical rather than left to the
reviewer's eye.
Generation-based certification (the path past the parse-and-compare ceiling). Parse-and-compare
has a structural limit: a second numeric token inside one cell, a number in a spanning descriptor
row, or content behind an exotic macro is invisible to any LaTeX parser. The durable fix is to
GENERATE the fragments from the computed source so displayed == computed by construction:
scripts/tablegen.py renders estout-style fragments deterministically from layouts entries in
the same numbers.json (the project's pipeline calls python tablegen.py --numbers ... --tables-dir ... after the analysis writes the artifact), and builtin.fragment_regeneration
certifies each laid-out table by re-rendering it and comparing byte-for-byte with the on-disk
fragment — any drift at all is a FAIL, so the parser gaps disappear for generated tables. The
parse-and-compare crux keeps running on the same artifact as defense in depth. Mixed mode is
supported (generated and hand-written tables side by side; the PASS message names the uncovered
tables); require_all: true under battery.builtin["builtin.fragment_regeneration"] demands a
layout for every manuscript table, and projects that adopt generation should add the check to
required_checks so an unevaluated state blocks convergence exactly like the crux. Keys under
tables starting with _ are auxiliary value rows (placeholder sources for composite cells),
exempt from the crux's missing-row rule.
From-raw mode (snapshot_from_raw: true). The strongest re-execution tier: the driver copies
the project, deletes every committed intermediate (snapshot-partition files, output-partition
files, protected_paths caches, the numbers artifact — directory globs expanded, deletions
confined to the copy), runs the full raw inputs → cleaning → analysis → tables pipeline
(rebuild.from_raw_command, or rebuild.from_raw_argv as an exact argv list — preferred on
Windows) twice, and certifies three checks: builtin.raw_table_identity (the regenerated LaTeX
table files are IDENTICAL to the committed ones, modulo line endings/trailing whitespace),
builtin.raw_numbers_agreement (numbers artifact within tolerance), and builtin.raw_determinism
(the two runs agree). Activation is fail-closed: partitions.raw plus a from-raw command are
required, the raw partition is read-only and provenance-hashed like the snapshot, the identity
check is auto-added to required_checks so the run cannot converge while the from-raw chain is
unverified, and driver init halts if any project file matches no partition glob (an unclassified
file is a purge-coverage hole). The driver runs all of this inline — no orchestrator action is
needed beyond stepping — but expect long battery phases: the full pipeline executes twice per
re-execution, bounded by rebuild.from_raw_timeout (default 7200 s per run).
Orchestration contract (read this first)
When invoked from Claude Code, you are the orchestrator, but you do not improvise the
control flow. A deterministic Python state machine — scripts/driver.py — owns every transition,
enforces the invariants (regression gate, ratchet, mapping disposal, termination), and persists
state to progress.json after each step. You step it and fulfil the agent dispatches it asks for.
The Claude-vs-Codex split. Python can launch Codex (subprocess) but cannot launch Claude
subagents. So the driver runs Codex roles (reviewer, all_codex judges) inline, and pauses for
you whenever it needs a Claude role (the drafter, and the Claude member of a cross_family
panel). Each pause is a typed AgentRequest.
How to run it
-
Preflight + setup.
cd skills/adversarial-empirical-review/scripts python driver.py init --config <path/to/aer.config.json>This validates config, runs the partition linter, builds the run workspace in a local temp dir (off Dropbox), establishes the incumbent baseline battery, records the baseline green-set and the state-0 fingerprint, and writes
progress.json. It prints a JSON action. -
Step loop. Repeatedly:
python driver.py stepThe driver advances as far as it can on its own — running the battery, the failure-set regression gate, the Codex reviewer, the blind Codex judges, the resolution checks, the classifier, oscillation, and termination — and then prints one JSON action:
-
{"action": "dispatch", "request": {role, family, prompt_path, input_paths, output_path, inline, no_network, cwd}}— only for Claude roles. Dispatch it:role: "drafter"→ launch a Claude subagent (Agent tool,model: "opus") with the instructions atprompt_pathand the files ininput_paths; the subagent edits the candidate and writes its JSON summary tooutput_path. Never useclaude -p.role: "judge", family: "claude"(cross-family panels only) → launch a fresh, isolated Claude subagent whose entire input is theinlinepayload; it must not read any file; it writes its{choice, rationale}vote tooutput_path. After the agent finishes, runpython driver.py stepagain.
-
{"action": "continue"}→ just step again. -
{"action": "done", "stop_reason": "...", "reports": {...}}→ the run terminated (converged / oscillation / round_cap / budget / halted). Readartifacts/escalations.md,battery_report.md,cost_report.md, andrun_summary.json, then present the escalations to the user and copy results back.
-
-
NO PASSIVE WAITING. Between steps, proceed immediately. Pause only for a genuine error or a
haltedstop reason (an infrastructure error needing the user).
Folding human decisions back (re-run)
Escalated identification/specification/causal-overclaim items land in artifacts/escalations.md.
The user records resolutions in decisions.json (content-hash-scoped). Re-running the pipeline
consumes them and suppresses re-litigation of settled matters.
Key constraints (inherited + skill-specific)
- No
claude -p. All Claude work runs via the Agent tool (subagents). It is the only Claude channel that works on Windows and the credential-isolation mechanism (noANTHROPIC_API_KEYis ever materialized; subagents use the session). - Codex flags (Windows). Codex subprocesses use
-m gpt-5.5 --skip-git-repo-check --dangerously-bypass-approvals-and-sandbox -c model_reasoning_effort=xhigh, UTF-8 witherrors="replace". Judges additionally run with network denied and an isolated cwd. - Blinding. Judges receive the disputed claim and both versions inline as Version 1 / Version 2; they may not read files; the version→incumbent mapping is sealed outside any judge-reachable path. On Windows the sandbox bypass means isolation is defense-in-depth, not OS-enforced (see design §6, §10).
- Secrets. Subprocess environments are scrubbed; reviewer/judge workspaces are secret-scanned and redacted; the audit never records a credential or a live mapping.
- Snapshot is read-only to the drafter. The drafter edits code/tables/prose within each issue's allowed partitions, under a diff budget; promotion requires resolving ≥1 open issue.
- Dropbox temp. The run executes in a local temp dir off any Dropbox-synced path; results
are copied back at the end with one-level
.bak. - Resume.
python driver.py stepresumes from the last checkpoint;init --freshrestarts.
Invocation
Manual-invoke only: /adversarial-empirical-review or an explicit by-name request. It is
token-intensive (multi-round, re-execution, judge panels), so it never auto-triggers.
File structure
adversarial-empirical-review/
├── SKILL.md # this file
├── README.md # usage + config reference + limitations
├── docs/ # design spec (v2), CONTRACTS.md, the Codex review
├── schemas/ # JSON Schemas for the structured artifacts
├── prompts/ # drafter · reviewer · classifier · judge
└── scripts/
├── contracts.py # shared types (source of truth)
├── driver.py # the state machine (you step this)
├── ledger.py · fingerprint.py
├── config.py · battery.py · regression.py
├── workspace.py · reexec.py
├── blinding.py · classify.py · dispatch.py
├── cost.py · audit.py
├── tablegen.py # fragment generator (numbers.json layouts → .tex) + CLI
└── checks_builtin/ # consistency · generation · bounds · reproduction
See docs/CONTRACTS.md for the exact module APIs and README.md for the config reference and
the deferred-feature list (from-raw mode, OS-container judge isolation, GUI, free-form reviewer
code, domain check packs).
Frequently asked questions
What to verify before installation and use
What does the adversarial-empirical-review source document cover?
Runs a regression-gated, N-round adversarial loop over a project's empirical output. The design is in docs/2026-06-08-adversarial-empirical-review-design.md (v2) and the module API in docs/CONTRACTS.md. Read the design before operating the skill.
How do I install adversarial-empirical-review?
The source record exposes this install command: npx skills add https://github.com/kennethkhoocy/applied-micro-skills --skill "plugins/applied-micro/skills/adversarial-empirical-review". Inspect the command and pinned source before running it.
Which Agent platforms does the source record declare?
The pinned source record declares support for: codex.
Which permission-related actions were detected?
Static rules flagged exec-script, read-files in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
PramodDutta/qaskills
PR Test Impact Analyzer
Analyze pull request code changes to determine which tests are affected, recommend test execution order, and identify missing test coverage for modified code paths
Borda/AI-Rig
analyse
Analyze GitHub issues, Pull Requests (PRs), Discussions, and repo vitality for an Open Source Software (OSS) project. For any specific item, casts a wide net — finds and lists all related open and closed issues/PRs/discussions, explicitly flags duplicates. Summarizes long threads, extracts reproduction steps, and generates repo vitality stats. Uses gh Command Line Interface (CLI) for GitHub Application Programming Interface (API) access. Complements oss:shepherd (requires `oss` plugin). NOT for
alirezarezvani/claude-skills
terraform-patterns
Terraform infrastructure-as-code agent skill and plugin for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw. Covers module design patterns, state management strategies, provider configuration, security hardening, policy-as-code with Sentinel/OPA, and CI/CD plan/apply workflows. Use when: user wants to design Terraform modules, manage state backends, review Terraform security, implement multi-region deployments, or follow IaC best practices.
openclaw/clawhub
autoreview
Pre-commit/ship code review: Codex default; optional Claude or Pi.