sdrf-adversarial-review
Skill18 starsChanged 2 months agoMITView on GitHub
Independently falsify and review a created, modified, or proposed SDRF against its specification, ontology terms, source evidence, repository files, and experimental design. Use after SDRF annotation or repair, before contribution or completion, when a review gate reports a pending artifact, or whenever an isolated reviewer must distrust the producer's self-assessment and issue a hash-bound verdict.
In this repository6 other files it gives its agents.
- .opencode/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/sdrf-skills.mdcCursor rule
- sdrf-annotateSkill
- sdrf-campaignSkill
- sdrf-contributeSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Use only the original task, SDRF, specification, evidence manifest, repository files, and deterministic outputs supplied to the reviewer.
- Distinctive: line 22
Do not read or rely on the producer's transcript, reasoning, verdict, or summary.
- Very specific: line 24
If context isolation cannot be established, return REVIEW_UNAVAILABLE and do not create a passing receipt.
- Distinctive: line 26
Do not edit the SDRF. Return findings to the producer.
- Very specific: line 27
Read only files scoped to this artifact's accession.
- Distinctive: line 36
Read references/review-contract.md before writing the report or recording approval.
- Very specific: line 49
Read spec/sdrf-proteomics/sdrf-templates/templates.yaml and every active template YAML.
- Distinctive: line 53
Read the original request and evidence manifest, if supplied.
- Very specific: line 57
Run official parse_sdrf validate-sdrf for every active template.
- Distinctive: line 64
If the repository tools are not importable from the target project, invoke them from the loaded plugin:
- Very specific: line 72
Do not mark deterministic_validation as passing when required validation could not run.
- Distinctive: line 117
After any producer edit, repeat this skill in a new reviewer context.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
SDRF Adversarial Review
Bundle paths.
spec/,tools/anddata/ship with this skill, not with your working directory. Resolve every such path below against the bundle root —$CLAUDE_PLUGIN_ROOTunder Claude Code ($CLAUDE_PLUGIN_ROOT/spec/sdrf-proteomics/TERMS.tsv), or your sdrf-skills checkout on other platforms. The helpers are thesdrf-toolscommand, installed by ``sdrf-tools doctor(install notes:sdrf-annotate/references/setup.md); noPYTHONPATHor plugin-root variable is needed to run them. Files the user is annotating stay relative to the working directory.
Review the artifact from fresh context. Try to disprove its correctness; do not polish or extend it. Approve only what the artifact and cited evidence support.
Preserve Independence
- Confirm that this run is a fresh reviewer or hook-agent context.
- Use only the original task, SDRF, specification, evidence manifest, repository files, and deterministic outputs supplied to the reviewer.
- Do not read or rely on the producer's transcript, reasoning, verdict, or summary. Treat producer claims as untrusted.
- If context isolation cannot be established, return
REVIEW_UNAVAILABLEand do not create a passing receipt. - Do not edit the SDRF. Return findings to the producer.
- Read only files scoped to this artifact's accession. When reviewers run
concurrently, a shared scratchpad with generic filenames (
files_all.json,efetch.xml,mmc*.xlsx) silently substitutes one dataset's data for another's — the file still parses, it just describes a different PXD. Read fromscratchpad/<PXD>/only, and assert on read: every fetched file list'sprojectAccessions, and every supplementary/efetchresult's returned title/accession, must match the artifact's accession before you use it — verify identity, not just HTTP 200.
Read references/review-contract.md before writing the report or recording approval.
Review Workflow
1. Freeze the artifact
Compute its SHA-256 and record the repository-relative path. If the hash changes during review, discard the review and start again.
2. Reconstruct requirements
- Read
spec/sdrf-proteomics/TERMS.tsv. - Read
spec/sdrf-proteomics/sdrf-templates/templates.yamland every active template YAML. - Derive active templates independently; do not accept the producer's list without checking the file.
- Read the original request and evidence manifest, if supplied.
3. Run deterministic checks
Run official parse_sdrf validate-sdrf for every active template. Also run:
sdrf-tools check <artifact>
sdrf-tools score <artifact>If the repository tools are not importable from the target project, invoke them from the loaded plugin:
sdrf-tools check <artifact>
sdrf-tools score <artifact>Do not mark deterministic_validation as passing when required validation
could not run.
4. Perform six falsification passes
- Specification compliance — missing or extra columns, template/version errors, reserved words, structured-value syntax, row shape, and duplicates.
- Ontology integrity — resolve every unique controlled value and confirm label, accession, ontology family, obsolescence, and justified specificity.
- Source evidence — challenge every nontrivial biological and technical claim against PRIDE, publication, supplementary data, or raw-file evidence. Flag per-sample values inferred only from cohort summaries.
- File mapping — compare every
comment[data file]with repository files; look for missing, duplicate, unmatched, or non-raw files. - Design consistency — recompute sample counts, factors, biological and technical replication, fractions, labels, and potential confounders.
- Omission safety — search for unsupported additions disguised as specificity and for material evidence the producer omitted.
For each finding, give a precise row/column or file-level location, evidence, and a correction criterion. Classify it as:
blocker: invalid, unsafe, fabricated, or structurally unusable.important: required before contribution or completion.minor: useful improvement that does not block approval.
5. Decide and record
Return FAIL if any blocker or important finding remains, or if specification
compliance, ontology integrity, omission safety, or deterministic validation is
unverified. Do not record a receipt. Give the producer an actionable finding
list.
Return PASS only when all required checks in the review contract pass and no
blocker or important finding remains. Write the report JSON, then bind approval
to the current artifact hash:
python3 "$CLAUDE_PLUGIN_ROOT/tools/review_gate.py" approve <artifact> \
--report <report.json> --reviewer independent-hook-agent --cwd <repo-root>Outside Claude Code, replace $CLAUDE_PLUGIN_ROOT with the installed
sdrf-skills root. A producer agent must never run approve for its own work.
After any producer edit, repeat this skill in a new reviewer context; the old receipt is intentionally stale.
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
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.

