From one agent to verified research systems
Jay Moore · Imperial College London / UK Dementia Research Institute
How much could AI help you do your work over the next 12 months?
How much risk could AI create for you in your work over the next 12 months?
We keep the two answers separate and repeat the exact same poll at the end of Day 2. There is no preferred answer.
Stop hooks, adversarial agents, swarms + Exercise 2 PubMed auditWhat separates a coding agent from a chatbot, how the stack and privacy boundaries work, and why verification is the central problem.
Frontier models (Sonnet 5.5, Opus 5.5, GPT-6.2, Gemini 4) hold whole codebases and dozens of papers at once.
Claude Code, OpenCode, Codex, and Copilot ship native subagents, SKILL.md, MCP, and lifecycle hooks.
Models write fluent code and prose effortlessly. The hard part is now checking what they actually did.
The model never touches your files directly — the harness executes each tool call and feeds the output back into the loop.
Rule of thumb: Never send patient data, unpublished clinical cohorts, or credentials to free or training-enabled endpoints.
Did the file get written, and does it pass an independent check?
Did it retrieve primary sources, or produce a fluent summary of an unread paper?
How many tokens, turns, and retries did it burn getting there?
Coercing null/NA to 0, or dropping genuine zeros with truthiness checks — exits cleanly with wrong means.
Plausible authors, journals, and DOIs that do not exist (Topaz et al., Lancet 2026).
Treating technical replicates as biological, omitting multiple-testing correction, or cherry-picking subgroups.
Editing the test or checker script to make it pass instead of fixing the underlying analysis bug.
How to steer before code is written, why long sessions rot, what tokens cost in late 2026, and the measured impact of writing a SKILL.md.
Plan mode before Build mode"Analyse my dataset and make some plots."
NA / zerosPlan modeGoal + Input + Constraints + Verification
Build
Inspect with /context · compress mid-task with /compact (~97% reduction) · reset between tasks with /clear.
Everything sent on the current turn: messages, tool outputs, file reads. Gone when you run /clear.
CLAUDE.md / AGENTS.md in your repo root. Loaded automatically at the start of every session.
Plain Markdown notes (memory.md, todo.md, Obsidian wiki) that the harness saves and reloads.
50 messages × 150k input tokens: $15.00 on Claude Sonnet 5.5 · $60.00 on Fable 5.2 · $0.38 on DeepSeek V4.1 Flash.
SKILL.md beats upgrading the modelA skill is not code and not a tool — it is a plain Markdown specification in .claude/skills/<name>/SKILL.md that changes how the agent uses its existing tools.
/pptx skill/pptx Make a 5-slide journal club presentation for:
https://www.nature.com/articles/s41588-024-01919-z
Keep word usage low, include main figures, summarise key takeaways.
Takeaway: Write down your lab's figure standards, analysis conventions, and slide rules once in .claude/skills/ — commit them to Git so they travel with the code.
Live demo of Plan → Build on Palmer Penguins, then our Day 1 hands-on exercise and group debrief.
Make publication-ready scatter plots comparing bill length and flipper length
across penguin species in penguins.csv, and export summary statistics.
Inspects penguins.csv and asks clarifying questions before touching disk.
Writes and runs the script, fixes errors, outputs figures + table.
Inspect sample counts (NA rows) and verify numbers against the CSV.
Read, Grep, Glob only. Ideal for reviewers and literature triage.
Start the agent inside a dedicated project folder — never your home directory.
Every edit is diffable and reversible with git diff / git restore.
Multipass or Docker for untrusted code or autonomous loops (no host credentials).
Never bypass permissions in a folder containing credentials, raw clinical data, or unbacked-up manuscripts.
jaydata.bio/education)samples.json — one null (failed well) and one genuine 0analyse.py — silently counts null as 0check.py — independent checkeranalyse.py, check.py, and shasum check.pycheck.py (watch the 0 trap!)shasum check.py to confirm no tamperingConnecting agents to external databases safely, and building shareable web tools from real single-cell data.
RAG retrieves static text chunks; MCP exposes live, typed tools (PubMed, GitHub, internal DBs).
Every registered MCP tool consumes context tokens on every turn — only enable what you need.
Keep clinical/unpublished data off free or training-enabled endpoints; log every query.
.h5adBuild an interactive viewer for my single-cell RNA datagh CLI for lab-wide access
Moving from one conversation to verified multi-agent workflows — and knowing what each pattern costs.
Writes plot.py, renders figure.png, and tries to stop.
figure-gate.py checks file exists, is newer than plot.py, plausible size.
Spawns claude -p to inspect the PNG against review-criteria.md.
Returns {"decision":"block"} with faults — up to a hard 4-round budget.
Every loop needs two things: an independent stopping check and a hard attempt limit.
.claude/skills/reproducible-analysis/SKILL.md
---
name: reproducible-analysis
description: Use when writing analysis
scripts that produce a number or figure.
---
## Pin inputs and random seeds
Record exact input paths and set a seed.
## Stop conditions
If units or metadata are missing, stop.
.claude/agents/adversarial-statistician.md
---
name: adversarial-statistician
description: Reviews an analysis from the
position that it is probably wrong.
tools: Read, Grep, Glob
---
Check sample independence, NA/zero handling,
and multiple testing. Report file + line.
An agent that agrees with you is not doing the job. Give reviewers read-only tools only.
Spawn 1 read-only adversarial-statistician on Day 1's analyse.py + samples.json. Main context stays clean; returns a 5-line verdict.
Launch adversarial-statistician, reproducibility-auditor, and data-governance-reviewer in parallel. The output is the disagreement.
Split references.txt into 3 shards (1–5, 6–10, 11–15). Separate output TSVs (no shared writes); final pass merges & verifies.
Closing the loop on Topaz et al. (Lancet 2026) using references.txt (15 entries: real papers, 1 title typo, 1 arXiv preprint, 1 fabricated 2025 citation).
| Step | Pattern | What to watch |
|---|---|---|
| 1 | One agent, no loop | Baseline time and /context growth |
| 2 | Subagents (groups of 5) | Each writes its own results_<group>.tsv; compare main context |
| 3 | 3-round retry loop | Re-query unresolved rows by author+year & title; recovers #13, never guesses a PMID |
| 4 | Manual verification | Open 3 "found" PMIDs yourself — did any match the wrong paper? |
| Workflow | The lesson |
|---|---|
| Variant → decision | Curated sources need their review status, or they mislead |
| Target dossier | Expression is the weakest evidence and the most cited |
| Biomarker brief | An agent's silence about a decision is not the absence of one |
| Paper → claim | Insist on retrieval; a fluent summary of an unread paper is the danger |
| Adversarial review | The output is the disagreement, not the consensus |
| Internal MCP | The controls are bolted on, and nothing stops you if you skip them |
Standing rules, a personal research wiki, and a practical AI use policy for your lab.
CLAUDE.md + Karpathy-style Second BrainCLAUDE.md / AGENTS.md in project root — standing instructions loaded every session.raw/ → Claude compiles linked wiki/ notes → view graph in Obsidian.
CLAUDE.md + .claude/skills/ + .claude/agents/check.py / unit tests)Pick one active repo. Add a 10-line CLAUDE.md and use Plan mode before coding.
Write your first SKILL.md (e.g. lab figure standards or QC checklist).
Add one read-only adversarial reviewer in .claude/agents/.
Commit .claude/ to Git and agree on a 1-page lab AI use policy.
CLAUDE.md, .claude/skills/, and .claude/agents/ to Git.1. How much could AI help your work over the next 12 months?
2. How much risk could AI create for your work over the next 12 months?
Q&A · All slides, demos & downloads stay live at jaydata.bio/education.