Code & Coffee · Astrophysics Department · June 1st 2026
AI Agents:
Done Right.
📊 Pre-Talk Poll · 20 Responses
Who's in the Room?
🔌 MCP awareness:
11/20 have never heard of it
📈 Self-reported scores (1–5 avg)
😬 Worry: hallucinations
2.9/5
🗳️ Top Requested Topics
7✗
🚨 Hallucinations: catching & preventing them
7✗
🔌 MCP servers demo — ADS, GitHub, web search
6✗
🖥️ Claude Code CLI vs Copilot Agent Mode
5✗
📦 Agent skills & how to build domain-specific ones
5✗
🏠 Running models locally for sensitive data
5✗
💶 Costs & budget: free tiers vs paid
⚠ Heads Up · Effective 1 June 2026
GitHub Copilot Billing: PRUs → AI Credits
| Feature |
Pre-June 1 |
From June 1 |
| Unit |
PRU (300/month) |
AI Credits (1000/month base + 500 flex) |
| Inline completions |
Free ∞ |
Free ∞ |
| Chat / Agent cost |
1 PRU / turn |
Per token (in + out) |
| Large context |
No penalty |
Drains credits faster |
| Empty quota |
Fallback model |
Hard stop — chat locked |
🎓 University educational accounts stay free — only the measurement changes.
💡 Example: refactor 500-line script
4 000 input + 1 000 output tokens ≈
2 AI Credits
vs 1 PRU before · student budget ≈ 1 000 credits/month
15-step agent loop → 10–20 credits in one sitting
✅ Safe to use freely
Tab autocomplete & Next Edit Suggestions —
zero cost
⚠ Adapt your workflow
- Write precise prompts — fewer turns
- Attach only relevant files, not
@workspace
- No credits = no chat until next month
Setting the Scene · 2026
We're no longer debating whether agents work.
We're debating how to make them reliable,
reusable, and
composable.
The answer, it turns out, isn't a better model.
It's better infrastructure around the model.
Overview
Today's Agenda
01
What Are AI Agents?
Chatbots vs agents · the loop
05
Reproducibility with AI
Prompts, provenance, best practices
02
GitHub Copilot
Your free tool: modes, demos, instructions
06
Journal Policies
MNRAS, A&A, ApJ, Nature compared
03
MCP Servers & ADS
Grounded citations, no hallucinations
07
Templates & Discussion
Ready-to-use disclosure + Q&A
04
Pitfalls
What the research says
Part 1 — What Are AI Agents?
From Chatbot to Agent: Key Distinctions
🤖 LLM / Chatbot
- Single-prompt, single-response
- No memory across sessions
- No tools or external data calls
- One-shot text generation
- You fix errors manually
Example: asking ChatGPT to explain the
Sunyaev–Zel'dovich effect
⚡ AI Agent
- Plans & executes multi-step tasks
- Uses tools: code, web, files, APIs
- Iterates, self-corrects on errors
- Can spawn sub-agents (multi-agent)
- Example: write → run → debug → plot
entire SED fitting pipeline
Part 1 — The Agent Loop
Anatomy of an Agent Loop
👁
Perceive
Task, context,
repo, memory
▶
🧠
Plan
Break goal into
actions
▶
⚡
Act
Call tools:
bash, APIs, files
▶
🔍
Observe
Read result,
check errors
↙ Loop until task complete or human review
required
Copilot Agent tools relevant to astrophysics:
Python/bash executor · ADS MCP (live literature) ·
astropy / emcee / sherpa · FITS file reader · matplotlib PDF output
Part 1 — Multi-Agent Orchestration for Scientific Research
Beyond the Single Agent: Why Orchestration?
Single LLMs lack persistent memory, cannot self-verify numerical results, and cannot run external tools in a
closed loop. Scientific agents must integrate domain-specific knowledge, process diverse data types, and
ensure
rigorous reproducibility — tasks that demand coordinated specialist agents.
(Ren et al. 2025, arXiv:2503.24047)
🏭 Role-based SOPs
MetaGPT — ICLR 2024
Fixed roles + Standardised Operating Procedures. Assembly-line workflow (manager → architect → engineer)
produces structured artefacts, reducing cascading hallucinations from naive LLM chaining.
Hong et al. 2023, arXiv:2308.00352
💬 Conversable agents
AutoGen — Wu et al. 2023
"Conversation programming": customisable agents interact through structured dialogues, each combining
LLMs, human input, or tools. Spans maths, coding, operations research.
Wu et al. 2023, arXiv:2308.08155
🎯 Planner–executor–verifier
CMBagent — astrophysics
Planner↔reviewer loop → control agent executes. Four building blocks: planner, memory module, action
space, verifier. Removes human-in-the-loop from routine steps while preserving structured oversight.
🧬 Evolutionary search
AlphaEvolve · AI Scientist-v2
Prompt sampler → LLM generates code diffs → evaluators score → database updated iteratively. No
human-authored templates. AI Scientist-v2: first fully AI-generated peer-review-accepted workshop paper.
Novikov et al. 2025, arXiv:2506.13131 · Yamada et al. 2025, arXiv:2504.08066
Part 1 — Multi-Agent Science: Results & Failure Modes
What Has Been Demonstrated — and Where It Fails
✅ Demonstrated Results
Laverick et al. 2024 · arXiv:2412.00431 (CMBagent)
Reproduced ACT DR6 CMB lensing constraints with
no human-written code. Full pipeline →
converged MCMC in 40 min at $1.55. Expert equivalent: several hours.
Borrett et al. 2026 · arXiv:2604.09621 — Weak lensing
challenge
Fully autonomous exploration did not reach expert level.
Semi-autonomous (human intervention) achieved 1st place.
Best results ensembled CMBagent, GPT-5, Gemini 2.5, Claude 4.5, Qwen3-max.
Novikov et al. 2025 · arXiv:2506.13131 (AlphaEvolve)
Discovered provably correct algorithms beating state-of-the-art across maths & CS; found a more
efficient data-centre scheduling algorithm for Google's own infrastructure.
⚠️ Failure Modes — MAST
Taxonomy (NeurIPS 2025)
Cemri et al. 2025 · arXiv:2503.13657
14 failure modes · 7 frameworks · 200+ tasks · Cohen's κ = 0.88.
System design 44% ·
Inter-agent misalignment 32% ·
Verification failures 24%.
Performance gains on benchmarks remain
minimal vs single-agent. Better base models alone
will not fix these — good
organisational design is required.
🔑 Open Problems
- No formula for how many agents, which roles, how they interact
- Semi-autonomy outperforms full autonomy for hard science
- Scientific agents need built-in validation (self-review, statistical checks)
- No community standard for citing or archiving multi-agent workflows
Part 2 — GitHub Copilot: Your Free Tool
GitHub Copilot: What You Already Have for Free
🎓 Your plan: GitHub Copilot (Student / verified faculty) —
FREE via GitHub Education.
Unlimited completions, Chat, Agent Mode.
✏️ Inline Autocomplete
Tab-complete as you type. Context-aware completions for astropy, numpy, matplotlib.
💬 Copilot Chat
(Ctrl+Alt+I)
Ask questions, explain code, generate functions, fix bugs. In sidebar or inline.
🛠️ Agent Mode
(VS Code)
Multi-file, multi-step tasks. Runs terminal, self-heals errors. GA on VS Code & JetBrains.
☁️ Coding Agent
(Cloud)
Assign a GitHub Issue → Copilot opens a PR autonomously. You review and merge.
Model choice in Chat: GPT-4o (default, unlimited) + Claude Sonnet & Gemini 2.5 via premium requests
(monthly allowance included in student plan)
Part 2 — IDE Landscape: Worth Switching from VS Code?
IDE Landscape: Cursor, Windsurf & Google Antigravity
| Feature |
VS Code + Copilot our baseline |
Cursor VS Code fork · Anysphere |
Windsurf Codeium IDE |
Google Antigravity Standalone · Google |
| Base IDE |
VS Code (Microsoft) |
VS Code fork (Anysphere) |
Proprietary (Codeium) |
Standalone (Google) · local install |
| Cost (May 2026) |
Free (GitHub Education) |
Free tier + Pro $20/mo |
Free tier + Pro $15/mo |
Free for developers |
| Autocomplete |
Good — Copilot inline suggestions |
⭐ Best — "predict next edit", context-aware across files |
⭐ Strong — flow-aware, pattern-continuing |
Not its focus — agent-first, not autocomplete-first |
| Agent UX |
Agent Mode (chat panel in editor) |
Composer + agent-management UI in editor |
Cascade — fully integrated, terminal-aware |
Agent Manager separate from editor — "control room": agents run while editor stays as
review surface |
| Model choice |
GPT-4o · Sonnet · Gemini |
Sonnet · GPT-4o · Gemini · local |
Sonnet · GPT-4o · own models |
Gemini · Claude · GPT-OSS · local |
| MCP / Extensions |
✅ MCP · ✅ All extensions |
✅ MCP · ✅ Most extensions |
✅ MCP · ⚠️ Limited extensions |
✅ MCP · ✅ VS Code-compatible |
| Remote SSH / HPC |
✅ Full Remote SSH |
✅ Partial |
⚠️ Limited |
⚠️ Local-first; Antigravity CLI works over SSH |
| Best used for |
Daily research — modular, composable with Claude Code CLI |
Heavy cross-file refactoring, polished AI editing |
"Vibe coding", greenfield projects, flow state |
Parallel multi-agent tasks — run alongside VS Code, not instead |
🏆 Verdict (Feldmann, dev.to 2026): VS Code + Copilot wins on flexibility and HPC Remote SSH.
Cursor has the best autocomplete ("predict next edit"). Windsurf excels for
greenfield projects.
Antigravity: a compelling "control room" for parallel agents — best used alongside
VS Code today; watch it grow.
Part 2 — Demo: @simulation-agent in Action
Demo: Dust Growth & Fragmentation with DustPy
Task: run a DustPy ice-line fragmentation simulation, plot
grain-size
distribution and radial drift profile — agent reads the DustPy skill, writes setup, runs, self-heals errors,
saves figures
1. Autocomplete
from dustpy import Simulation
from dustpy import constants as c
sim = Simulation()
sim.ini.star.M = 1.0 * c.M_sun
sim.ini.disk.alpha = 1.e-3
# ↑ Copilot completes
# the ini block from
# context.
2. Chat (Ctrl+Alt+I)
You: Why does a_max drop sharply at 150 au in my dust surface density plot?
Copilot: That's the fragmentation barrier
a_frag = 2Σ v_frag² / (3π α ρ_s c_s²).
At large r, α·c_s² drops, so fragmentation limits growth earlier than drift.
3. Agent Mode — @simulation-agent
"Use the DustPy skill. Run ice-line v_frag simulation (v_frag=1 m/s inside 150 au, 10 m/s outside).
Plot Σ_dust(r,t) and a_max(r). Save PDF to plots/."
- ✅ Loaded
dustpy/SKILL.md
- ✅ Wrote
run_ice_line_vfrag.py
- ✅ Ran simulation · 10 snapshots
- ✅ Caught
ModuleNotFoundError, fixed
- ✅ Saved
plots/dust_amax.pdf
💡 Key agent behaviour: the agent reads
.github/skills/dustpy/SKILL.md first — getting DustPy's CGS unit
conventions, sanity checks (St < 1, a_max < a_frag), and the mandatory
SimulationHandoff/v1 schema — before writing a single line of code.
Part 2 — Teaching Copilot Your Science
Two Config Files, One Source of Truth
📁 .github/copilot-instructions.md — group-level, permanent
## Coding standards
- Python 3.11+; astropy, sherpa, emcee, corner
- Physical units via astropy.units; propagate errors
- Figures: 300 dpi, tab10 palette, PDF + PNG
## References
- Verify ALL citations via NASA ADS first
- ADS bibcode format: 2016A&A...594A.116H
- NEVER invent author names, DOIs, or bibcodes
📁 AGENTS.md — project-specific, per paper
## Project: NGC 1275 X-ray Spectral Analysis
**PI**: J. Doe | **Domain**: x-ray
## Scientific context
- Data: XMM-Newton EPIC-pn, 0.5–10 keV
- Model: TBabs*powerlaw
- Galactic nH = 1.2e21 cm⁻² (fixed; HI4PI 2016)
- Fit band: 0.5–7.0 keV; statistic: C-stat
AGENTS.md is the cross-tool standard (Linux Foundation,
agents.md, 60k+ projects):
read by Copilot Coding Agent, Claude Code, Gemini CLI, Codex CLI, and Cursor.
copilot-instructions.md is Copilot-only — keep it to group conventions
that never change between projects.
Both files are version-controlled and shared with the team — every collaborator gets
the same AI context automatically. Local-only tweaks go in AGENTS.override.md (gitignored).
Rule: the more domain context you give the agent upfront (obs IDs, model assumptions,
known issues, current hypothesis), the fewer hallucinations you get. Specificity is safety.
Part 2 — Agent Skills: Reusable Prompt Modules
Agent Skills: Teaching Copilot Repeatable Procedures
An Agent Skill is a structured prompt document that tells an agent how to perform a
specific task — including which tools to use, what steps to follow, and how to handle errors. Think of them as
reusable SOPs for your agent.
Why skills matter for science
- Encode domain knowledge once, reuse across projects
- Make agent behaviour consistent and auditable
- New group members can onboard via shared skills
- Skills can be versioned and cited in Methods
- Reduce prompt drift between collaborators
🔬 Local (12 agents)
spectral · mcmc · literature · simulation · retrieval · paper
+ pipeline · hypothesis · analytical · setup · analysis ·
interpretation
📦 K-Dense-AI/scientific-agent-skills
2.4k forks — active community repo. Skills for: data analysis, paper writing,
literature review, coding. Each skill: SKILL.md with explicit steps, example prompts,
expected outputs. Drop into .github/ alongside copilot-instructions.md.
⚠️ Security: Third-party skills run as agent instructions — vet them carefully. A
malicious skill could exfiltrate data or override safety rules. Treat like code: read before you run.
💡 VS Code 1.99+: agent files must end in .agent.md — plain .md is silently
ignored.
Part 2 — Build Your Own Agent Skill
Writing a SKILL.md in 3 Steps
Step 1 — YAML frontmatter
---
name: my-skill
description: >
One sentence the agent uses to decide
whether to load this skill. Include
trigger phrases here.
---
Step 2 — Numbered workflow
## Workflow
1. Load AGENTS.md and identify target.
2. Call `@literature-agent` to verify params.
3. Run script; validate output units with
`astropy.units`.
4. Save figure to `plots/` at 300 dpi.
5. Emit handoff JSON.
Step 3 — Iron rules + anti-patterns
## Iron rules
> NEVER invent a bibcode.
> ALWAYS use astropy.units.
## Anti-patterns
| Wrong | Why | Correct |
|---|---|---|
| Hardcode kpc | breaks units | use u.kpc |
Minimal astronomy example: alma-imager.agent.md
---
name: alma-imager
description: >
Produce a CLEAN image from ALMA measurement
set. Trigger: ALMA, CLEAN, tclean, dirty map,
beam, synthesized beam, continuum image.
tools: [read, edit, execute]
---
## Role
Run CASA tclean on a calibrated ALMA MS.
## Workflow
1. Read AGENTS.md — get MS path and target name.
2. Check beam size; warn if < 2 px/beam.
3. Run tclean (briggs, robust=0.5).
4. Export FITS to data/images/.
5. Validate: peak SNR ≥ 5 else flag.
6. Emit {image_path, beam_arcsec, rms_uJy}.
📁 Save to .github/agents/alma-imager.agent.md
📁 Large code blocks → .github/agents/references/
🔑 Trigger phrases in description: control when the agent auto-loads the skill
♻️ Reuse across projects by committing to group template
Part 3 — MCP: Before & After
MCP in Plain English: Before and After
❌ Before MCP — Copy-Paste Workflow
- You ask ChatGPT: "find papers on gap opening criterion"
- ChatGPT invents 3 plausible-looking bibcodes (hallucination)
- You search ADS manually for each one — 2 don't exist
- You copy the real BibTeX by hand into your
.bib file
- You paste the BibTeX back to ChatGPT for the next question
- Total: ~10 min per reference · error-prone · not reproducible
✅ After MCP — Agent Calls ADS Directly
- You type: "find papers on gap opening criterion"
- Copilot calls
ads_search() via the ADS MCP server
- ADS returns real bibcodes, titles, abstracts
- Copilot calls
ads_export() → verified BibTeX
- Agent appends to
paper/bibliography.bib automatically
- Total: ~5 sec · zero hallucinations · logged in
prompts/
Your prompt
in VS Code Chat
→
Copilot Agent
picks tool
→
MCP Server
local process
→
NASA ADS API
real data
→
bibliography.bib
verified BibTeX
MCP runs as a local process on your laptop — your data never leaves your machine.
The agent only gets back what the MCP server returns. Setup: add 10 lines to
.vscode/settings.json.
Part 3 — MCP: Plugins for AI Agents
What Is MCP? Giving Agents Real-World Tools
Model Context Protocol (MCP) is an open standard that lets any AI agent call external tools
— databases, APIs, file systems — through a consistent interface. Think of it as a plugin system for
agents.
Your Prompt
in Copilot Chat
or Agent Mode
▶
Copilot Agent
decides which
tool to call
▶
MCP Server
local process
or remote API
▶
Real Data
ADS, arXiv,
FITS, DB
🔍 Grounded retrieval: Agent fetches real papers + BibTeX from ADS — no
hallucination
🔗 Citation chains: Follow references forward AND backward across papers
🔄 Always current: Live API calls; no training-data staleness
📁 Fully local: MCP runs on your machine — your data stays private
Part 3 — MCP Servers for Astrophysics
An Emerging Ecosystem: Astronomy MCP Servers
📡 ALMA_MCP
adamzacharia/ALMA_MCP
ALMA archive search by target, position, frequency band, resolution,
PI/proposal. Natural language → TAP/ADQL queries. Returns analysis-ready results.
🔭 astroquery MCP
mcpmarket.com/server/astroquery
Python astroquery library as MCP tools. Access Simbad, VizieR, ESASky, IRSA,
MAST, Gaia, NED, and 50+ catalogues via natural language.
🌌 astro_mcp (DESI)
SandyYuan/astro_mcp
DESI survey data access plus general astropy tools. Query galaxy spectra,
redshift catalogues, photometric data from DESI DR1 and related surveys.
🚀 NASA MCP Server
ProgramComputer/NASA-MCP-server
20+ NASA APIs: APOD, EPIC, DONKI (space weather), Mars Rover, NEO, NExScI
exoplanet archive, CMR earth/planetary data, TLE orbital elements.
🪐 PDS MCP Server
NASA-PDS/pds-mcp-server
Official NASA Planetary Data System server. Search and retrieve planetary
science datasets, mission data, and PDS4 archives. Officially maintained.
🌍 earthdata-mcp
nasa/earthdata-mcp
Official NASA Earthdata server. Earth observation datasets, CMR catalogue
search, granule download, GIBS imagery. Officially maintained.
⚠️ Community servers vary in maturity — check GitHub stars, last commit date, and test on non-sensitive
queries first. NASA-PDS and nasa/earthdata-mcp are officially maintained.
Part 3 — ADS MCP: No More Hallucinated Citations
ADS MCP Servers: Ground Truth for References
Two community-built MCP servers — free, open-source, need only
your ADS API token (free at
ui.adsabs.harvard.edu)
⭐ cbyrohl/mcp-server-ads — Recommended
11 tools, most complete
search_papers — full Solr syntax query
get_record — full metadata by bibcode
get_bibtex — export BibTeX directly
get_citations — who cited this paper?
get_references — what does it cite?
citation_metrics — h-index, i10, totals
manage_library — reading lists
⭐ prtc/nasa-ads-mcp — Alternative
Natural language focus
- Search papers by keyword / author / year
- Get abstracts, arXiv IDs, DOIs
- Export BibTeX for individual papers
- Citation metrics (h-index etc.)
- Manage personal ADS libraries
- Natural language paper discovery
- Works with Claude Desktop & VS Code
Setup: pip install / uvx install → add ADS_API_TOKEN
env var → add server block to VS Code settings.json → done
Part 3 — ADS MCP: Setup & Example Prompts
Wiring the ADS MCP into VS Code
Step 1 — VS Code
settings.json:
// .vscode/settings.json
"mcp": {
"servers": {
"ads": {
"command": "uvx",
"args": ["--from",
"git+https://github.com/cbyrohl/mcp-server-ads",
"mcp-server-ads"],
"env": {
"ADS_API_TOKEN": "YOUR_TOKEN"
}
}
}
}
Step 2 — Ask the agent (examples):
💬 "Find papers on ICM sloshing since 2020, return BibTeX"
💬 "Cite all papers that reference 2003ApJ...590..225C"
💬 "h-index for author:Markevitch,M"
💬 "Export .bib for these 5 bibcodes: [list]"
✅ Result: agent calls real ADS API → gets verified metadata → zero hallucinated references →
you receive correct BibTeX automatically.
Without MCP, GPT-4o/Copilot invents plausible-but-wrong bibcodes, authors, and journal names — every
time.
Part 4 — Pitfalls: What the Research Says
Known Pitfalls of AI Agents in Scientific Research
Four recent papers — including one specifically on
astrophysics — map where agents actually fail:
Huang 2026 — arXiv:2603.29039 — AI Cosplaying as Astrophysicists
144 synthetic astrophysicist agents, 2,592 tasks. No AI-assisted policy universally beat unassisted work.
Gains are task-specific: AI helps on creative/extractive tasks but
fails catastrophically on
derivation-heavy physics. Performance also depends on which LLM you use.
Borrett et al. 2026 — arXiv:2604.09621 — Competing with AI
Scientists (CMBagent)
Multi-agent system (CMBagent) applied to cosmological parameter inference challenge. Fully autonomous
exploration did not reach expert-level performance.
Human intervention needed to achieve 1st
place. Semi-autonomous beats fully autonomous for hard science.
Luo et al. 2025 — arXiv:2509.08713 — The More You Automate, the
Less You See
Four failure modes: (1) inappropriate benchmark selection, (2) data leakage, (3) metric misuse, (4) post-hoc
selection bias. Systems generate synthetic datasets or subsample without documenting it,
inflating
reported performance.
ReplicationBench 2025 — arXiv:2510.24591 — Can AI Agents Replicate
Astrophysics Papers?
Best frontier models score
<20% on replicating real astrophysics results. Failure modes:
wrong physical assumptions, incorrect unit handling, misidentified datasets, broken pipeline logic.
Part 4 — Pitfalls Taxonomy
The Eight Failure Modes to Watch For
🧠 Derivation failures
Agents confidently produce wrong physics — sign errors, dropped constants, incorrect assumptions. Worse
than a wrong answer: they look right.
📊 Silent data manipulation
Agent subsamples, filters, or generates synthetic data without telling you. Results appear valid but
are not reproducible from the original dataset.
📚 Hallucinated references
Even with MCP, agents can fabricate citations if the tool call fails silently or the model falls back
on training data. Always spot-check.
📉 Benchmark / metric misuse
Agents prefer tasks with strong prior results and avoid benchmarks where their method performs poorly.
Introduces subtle publication bias.
🔄 Task-specificity of gains
AI helps with creative, extractive, review tasks. It can hurt on calculation-heavy,
derivation-heavy, and precision-critical tasks.
👤 Deskilling risk
Hosseini et al. (2026): Over-reliance erodes entry-level research skills. PhD students who let agents
do all debugging lose debugging intuition.
🔍 Responsibility gaps
If an agent makes a scientific error, who is responsible? The author always is — but workflows that
obscure AI involvement make accountability impossible.
🪫 Semi-autonomy > full autonomy
CMBagent study: fully autonomous pipelines underperformed. Human checkpoints at key decision points are
essential for hard science.
Part 4 — Hallucination Prevention
Hallucination Prevention: A Science Checklist
🔍 Before you trust the output
📚
References — cross-check every bibcode on ADS before citing. One fabricated DOI
invalidates the paper.
🔢
Numbers — reproduce one known result analytically (e.g. derive the scale height from
your own disk parameters). If it doesn't match, the chain is broken.
📐
Units — use astropy.units. Never accept bare floats for physical
quantities. Unit errors are invisible until they cascade.
🧪
Code — run on a toy case first; compare to analytical expectation before applying to
real data.
🛡️ Guards built into the template
🚦
[DATA MISSING: …] sentinel — agents must halt and flag, not fabricate values they don't
have.
⚙️
Iron rules in AGENTS.md — survive context window rotation and model
switches. "NEVER invent a bibcode" repeated in every agent.
🔬
ADS MCP server — forces verified citation lookup. The agent cannot silently fall
back to training-data references when MCP is wired in.
✔️
pre-commit doi= check — blocks commits with hand-written BibTeX entries
missing a DOI field. Last-line defence before git push.
⚡ Poll feedback: "Worry about hallucinations — have to iterate often." Each guard above targets one iteration
loop.
The checklist reduces, not eliminates, the need for manual verification.
Part 4 — Mitigations: Human-in-the-Loop Checkpoints
Mitigation Strategies: Keep Humans in the Loop
Hosseini et al. (2026) recommend designating an 'AI validator' role in each research team —
someone who owns responsibility for verifying all AI-assisted contributions before publication.
-
1
Define no-go zones for autonomy: Decide which tasks can the agent do alone
(boilerplate code, reformatting, lit search) vs. which MUST have human review (model selection, physical
interpretation, statistical thresholds).
-
2
Checkpoint derivation steps: For any analysis with physics equations, manually
re-derive the key steps. If the agent's output can't be checked by hand, the task is too autonomous.
ReplicationBench shows agents fail here most.
-
3
Run agents on synthetic data first: Before unleashing an agent on your real science
data, test on a toy dataset with known answers. If the agent doesn't recover ground truth, don't trust it
with your precious observations.
-
4
Compare agent output to a naive baseline: Does the AI-assisted result actually beat
what you'd get in 20 minutes yourself? Huang 2026 found many AI modes did not outperform unassisted work.
-
5
Version-control runs; automate quality gates: Commit data, prompts, config, and output
together in Git. pre-commit hooks enforce code style, block files >5 MB, and reject BibTeX entries
missing doi=.
Part 5 — Reproducibility: The Problem
The Reproducibility Challenge: AI Adds New Wrinkles
⚠️ LLM outputs are non-deterministic. The same prompt can generate different code on
different days, with different model versions.
🎲 Non-determinism
Even temperature=0 doesn't guarantee identical outputs across model versions. Copilot's base
model changes silently.
🔍 Implicit context
Copilot reads your whole repo. The same prompt with a different codebase gives different code. Context is
invisible.
🏷️ Model versioning
GPT-4o of today ≠ GPT-4o of six months ago. Updates happen without notification. 'I used
Copilot' isn't enough.
📝 Undocumented steps
If you don't record your prompts, no one — including future-you — can reproduce your AI-assisted
analysis.
Core question: if I used Copilot for my analysis, can someone else reproduce my result?
Only if you share the code, the prompts, and the model version.
Part 5 — Reproducibility: Best Practices
Making AI-Assisted Research Reproducible
1. Commit your prompts to Git
✗ Don't rely on Copilot Chat history — it disappears. Don't keep prompts only in your head.
✓ Store a prompts/ directory. One .md file per analysis task with
date + model version.
2. Pin the model version in your disclosure
✗ Don't say 'I used Copilot' — unverifiable and insufficient for reproducibility.
✓ Say 'GPT-4o (2026-03), GitHub Copilot Pro, VS Code 1.116'. Be specific.
3. The code is the artefact — not the prompt
✗ Don't submit code you haven't personally run and validated end-to-end on the actual data.
✓ Commit the generated code. The prompt is provenance. Code must run standalone without AI.
4. Share prompts as supplementary material
✗ Not yet required by journals — but proactive transparency protects you from future
scrutiny.
✓ Emerging best practice: upload PROMPTS.md or prompts/ to Zenodo
alongside code & data.
5. Log AI steps + make your repo citable
✗ Don't imply code is human-written if an agent made structural decisions. Don't skip
CITATION.cff.
✓ Methods: 'Code scaffold by GitHub Copilot (GPT-4o, Mar 2026); all results verified.' Add
CITATION.cff — GitHub shows 'Cite this repository' and Zenodo/Zotero extract metadata
automatically.
Part 5 — Prompt Documentation Template
Template: prompts/xray_spectral_fit.md
# prompts/xray_spectral_fit.md
## Metadata
- Date: 2026-04-15
- Tool: GitHub Copilot (GPT-4o), VS Code Agent Mode v1.116
- Purpose: Generate sherpa X-ray spectral fitting script
- Output: src/fit_spectrum.py
## Prompt used
Write a Python script to fit XMM-Newton EPIC-pn spectra in 0.5-10 keV
with TBabs*powerlaw using sherpa + CSTAT. Fix nH=1.2e21 cm^-2.
Return Gamma and norm with 90% confidence. Save chi2 residual as PDF.
## Validation log
- [x] Runs without errors on test data (spec.pi, back.pi, rmf.rmf)
- [x] Gamma matches manual XSPEC fit to within 2%
- [x] All references checked in NASA ADS — no hallucinations found
💾 Commit this alongside fit_spectrum.py → full reproducibility provenance lives in your Git
history
Part 6 — Journal Policies: Three Universal Pillars
What All Journals Agree On
👤
Human Accountability
Authors remain solely responsible for all content, regardless of how AI was used. AI tools cannot satisfy
authorship criteria.
🔍
Transparency Required
Disclose the tool, version, purpose, and section. The threshold is content generation, not volume of use.
✍️
No AI Authorship
LLMs cannot approve manuscripts, hold copyright, or be accountable. They may not appear in any author
list.
Universal consensus — what varies is where to disclose, and whether copy-editing or
AI figures are permitted
Part 6 — Journal Policy Comparison
How Our Journals Compare
| Journal / Publisher |
AI Author? |
Disclose Where? |
Copy-Edit Exempt? |
AI Figures? |
Strictness |
| MNRAS (Oxford/RAS) |
❌ No |
Methods or Ack. |
Not explicit |
Not explicit |
Moderate |
| A&A (EDP Sciences) |
❌ No |
Methods preferred |
✅ Yes |
Not explicit |
Moderate |
| ApJ / AJ (AAS/IOP) |
❌ No |
Cover letter + Methods |
Not specified |
Not explicit |
Moderate |
| Nature / Nat. Astron. |
❌ No |
Methods (required) |
✅ Yes |
❌ Banned |
Strict |
| Science (AAAS) |
❌ No |
Cover letter + Methods or Ack. |
Not specified |
❌ Banned* |
Very Strict |
| Springer Nature (all) |
❌ No |
Methods (required) |
✅ Yes |
❌ Banned |
Strict |
⚠️ Always check the journal's current author guidelines before
submitting — policies have been updating every few months.
Part 6 — MNRAS & A&A Policies
MNRAS and A&A: Moderate, Practical Policies
🟡 MNRAS (Oxford / RAS)
- AI cannot be listed as author
- Disclose in Methods OR Acknowledgements
- Cover letter disclosure also expected
- No explicit copy-editing exemption (err on side of disclosure)
- No explicit AI image ban (but integrity rules apply)
- Oxford Academic screens for NLP tools in submitted author lists
🟢 A&A (EDP Sciences)
- AI cannot be listed as author
- Disclose in Methods section (preferred)
- Copy-editing AI EXEMPT — explicit policy (grammar, clarity, language only)
- AI-generated code = AI content: must be disclosed
- Authors verify all AI-assisted content for accuracy
Best journal for AI coding disclosure: most permissive &
explicit policy
Part 6 — Nature & Science: Strict Policies
Nature and Science: The Strictest Policies
🔴 Nature / Nature Astronomy
- AI cannot be listed as author
- Disclose in Methods (required) — not in Acknowledgements alone
- AI-generated IMAGES are BANNED: figures, graphical abstracts, all
- Copy-editing AI exempt (Grammarly-style)
- Specific tool + version + purpose required
- Reviewers may NOT upload manuscripts to any AI tool
🔴🔴 Science (AAAS) — Strictest
- AI may not be used inappropriately — editors may decline manuscript
- Disclose in cover letter + Methods or Ack. (location depends on use
case)
- AI-generated images/multimedia BANNED without explicit editor permission*
- AI tools cannot be cited as sources (AI cannot be a paper author)
- Authors fully accountable for accuracy, citations, and bias
- Reviewers may NOT upload any part of a manuscript to an AI tool
* Exceptions possible for AI/ML manuscripts, case-by-case, must be
disclosed at submission
🎯 Targeting Nature / Science? Use AI only for coding & internal editing — remove all AI
prose from the final submission.
Part 6 — Ready-to-Use Disclosure Templates
Copy-Paste Disclosure Statements
Coding only (A&A, MNRAS, ApJ)
Python analysis scripts were drafted with assistance from GitHub Copilot (GPT-4o, March 2026). All code was
reviewed, tested, and validated by the authors. No AI assistance was used in the preparation of the written
text.
Writing + coding, ADS MCP used (A&A, MNRAS — in Methods)
Generative AI (GitHub Copilot, GPT-4o, March 2026) was used to draft sections of the Methods text and to
generate analysis code. Literature searches were conducted via NASA ADS; the NASA ADS MCP server
(cbyrohl/mcp-server-ads) was used to retrieve and validate references. All AI-generated content was critically
reviewed and verified by the authors.
Minimal editing only (most journals — generally exempt, but safe)
The authors used GitHub Copilot (GPT-4o) for grammar and language editing of human-authored text only. No
substantive scientific content, analysis code, or references were generated by AI tools.
Adapt the tool name, version, date, and exact purpose to your actual usage. Always verify
journal guidelines before submitting.
Part 6 — Quick Reference Card
Quick Reference: What to Disclose, Where
| Action |
Disclose? |
Where? |
Notes |
| Used Copilot to write analysis code |
Yes |
Methods |
Core case for us — always disclose |
| Used ADS MCP for reference retrieval |
Yes |
Methods |
Name the server & token source |
| Used Copilot to draft Methods text |
Yes |
Methods |
All journals require this |
| Used Copilot for Discussion section |
Yes |
Methods |
Science AAAS: full prompt required |
| Grammar / spelling / English only |
Generally No |
— |
A&A & Nature explicit exemption |
| Used Copilot to make figures |
Yes + check |
Methods + caption |
Nature/Springer: AI figures BANNED |
| Used ADS for literature search (no MCP) |
Yes (best pr.) |
Methods/Ack. |
Good practice; not yet mandated |
| Used Copilot to respond to referees |
Yes (best pr.) |
Cover letter |
Emerging norm, protects integrity |
Part 6 — Costs & Budget
Costs & Budget: What Does AI Actually Cost?
🆓 Free tiers
- GitHub Copilot — free for students & verified faculty via GitHub Education
(unlimited chat + agent mode)
- Claude.ai — free tier (Claude Sonnet, limited messages / day)
- ChatGPT — free tier (GPT-4o, rate-limited)
- Gemini — free via Google AI Studio (1M context)
- Ollama — free, fully local, runs on your laptop
💳 Paid plans (June 2026)
- Copilot Pro €10 / mo — higher premium-request quota
- Claude Max €18 / mo — unlimited Sonnet, Projects, Opus access
- OpenAI Plus €20 / mo — GPT-5, o4-mini, DALL·E
- Anthropic API ~€3 / M tokens (Sonnet), ~€15 (Opus)
- OpenAI API ~€2.50 / M tokens (GPT-4o)
🏛️ Getting department funding
- Frame as reproducible research infrastructure — like compute time on LRZ
- Typical researcher: €20–50 / month covers heavy daily use
- Ask IT: check for LRZ / TUM / LMU institutional licence (Microsoft M365 Copilot)
- Grant line: "AI-assisted analysis tools" in DFG / ERC proposals is accepted
- Template: "I request €X/month for AI API access to support reproducible research in
[domain]…"
💡 Rule of thumb: 1 hour of agent-mode coding ≈ 50–200 K tokens ≈
€0.15–€0.60 (Sonnet API).
That's cheaper than a coffee — and covered free via GitHub Education.
Key Takeaways
🆓
You have Copilot Pro free
Agent Mode, MCP support, multi-model Chat — set it up today.
🔍
ADS MCP kills hallucinations
Add cbyrohl/mcp-server-ads → Copilot fetches real, verified BibTeX.
💻
Custom instructions save time
.github/copilot-instructions.md teaches Copilot your project once,
forever.
🔄
Reproducibility requires prompts
Record tool, version, date, purpose. Share prompts alongside your code.
📋
Journal policies differ widely
A&A: permissive. MNRAS: moderate. Nature: strict. Science: text ban.
📎
Default to transparency
If in doubt whether to disclose: disclose. It protects you and your readers.
🧩
Fork the group template: lmu-usm-agent-template — custom
instructions, eleven agents including a full 9-stage research pipeline orchestrator (hypothesis → analytical
→ setup → simulate → analyse → interpret) with two human gates, bundled simulation skills (DustPy · FARGO3D
· PLUTO · RADMC-3D · yt · Sherpa), conda env, pre-commit hooks, and GitHub Pages docs. Covers 5 science
domains.
Appendix — The LMU/USM Agent Template
Fork It, Configure It, Go
📁 Repo Contents
- 5 domains: disk · cosmo · retrieval · LSS/MW · X-ray
copilot-instructions.md — your lab's conventions, once
AGENTS.md — project-specific context per repo
ARCHITECTURE.md — agent roster & 9-stage pipeline diagram
pipeline-agent.agent.md — 9-stage research pipeline orchestrator
hypothesis-agent.agent.md — ranked hypothesis generation + ADS
analytical-agent.agent.md — SymPy pre-analysis & scale estimates
setup-agent.agent.md — config files + SLURM/PBS job scripts
analysis-agent.agent.md — simulation post-processing & figures
interpretation-agent.agent.md — physical interpretation, Gate 2
spectral-agent.agent.md — X-ray spectral fitting (Sherpa)
mcmc-agent.agent.md — emcee posteriors, 68% CIs
paper-agent.agent.md — LaTeX manuscript + ADS citations + auto-review
literature-agent.agent.md — ADS-verified citations
simulation-agent.agent.md — FARGO3D/GADGET sims
retrieval-agent.agent.md — petitRADTRANS retrievals
- Skills:
dustpy · fargo3d · pluto · radmc3d ·
yt · sherpa
envs/base.yml — conda env, pinned versions
.pre-commit-config.yaml — style + BibTeX doi= checks
CITATION.cff — GitHub 'Cite this repository'
⚡ Key Features
- Extensions pre-configured via
.vscode/extensions.json — install once, share with team
- ADS MCP pre-wired — Copilot fetches verified BibTeX, no hallucinated DOIs
- pre-commit + CI enforce style, file-size limits, and
doi= on every commit
CITATION.cff triggers GitHub's 'Cite this repository' button
- Zenodo and Zotero extract structured metadata automatically
- GitHub Pages docs at giovannipicogna.github.io/lmu-usm-agent-template
Appendix — 5 Science Domains, 1 Template
5 Science Domains, 1 Template
| Domain |
→ Agent |
Key Libraries |
| Disk formation |
simulation-agent |
dustpy, FARGO3D, radmc3dPy |
| Cosmological sims |
simulation-agent |
yt, Magneticum, fargopy |
| Atmospheric retrieval |
retrieval-agent |
petitRADTRANS, dynesty |
| LSS & Milky Way |
mcmc-agent |
astropy, emcee, nbodykit |
| X-ray spectroscopy |
spectral-agent |
sherpa, XSPEC, emcee |
GitHub Pages Docs
- agents page — all 12
agents with example invocations
- skills page — bundled
skills by domain
- Auto-deployed on every push to
main via GitHub Actions
Enable GitHub Pages
Settings → Pages → Source: GitHub Actions
copilot-instructions.md §11: domain-specific skill lists for every research area
Appendix — Local Models for Sensitive Data
Local Models for Sensitive Data (Ollama / LM Studio)
When to run models locally
- Embargoed or proprietary observational data (pre-publication)
- Unpublished simulation outputs (IP of your group)
- Patient / medical data — EU GDPR compliance
- HPC login nodes without outbound internet access
- Budget constraints — zero API cost once hardware is available
- Offline development or conference travel
Quick-start: Ollama
# Install (macOS / Linux)
curl -fsSL https://ollama.com/install.sh | sh
# Pull a capable science-friendly model
ollama pull qwen2.5-coder:14b # 9 GB — strong at code
# Serve (auto-starts on install)
ollama serve # listens on localhost:11434
# Use with VS Code Copilot Chat
# Settings → Copilot → Chat Model → "ollama/qwen2.5-coder:14b"
Model quick-reference
| Model |
Size |
Best for |
qwen2.5-coder:7b |
4 GB |
Quick code edits |
qwen2.5-coder:14b |
9 GB |
Analysis scripts |
llama3.3:70b |
40 GB |
Complex reasoning |
gemma3:27b |
17 GB |
Scientific writing |
LM Studio = GUI alternative to Ollama. Both expose an OpenAI-compatible API on
localhost:11434 — drop-in replacement; no code changes needed in your analysis scripts.
Appendix — How Good Are Agents?
Benchmark Reality Check: AI Agents in Astrophysics
📊 ReplicationBench — Paper Replication
111 tasks · 20 peer-reviewed astrophysics papers · tasks
co-written by original authors
<20%
success rate for best
frontier models
- Tasks include: Abacus N-body near-field summation with spline softening; B-spline localisation of
black-hole merger-rate peaks in mass
- Failure mode: coding is fine — domain-specific rigor is not
🪐 Stargazer — Exoplanet RV Orbit Fitting
120 tasks · 100 synthetic + 20 real RV datasets ·
multi-planet systems
Perfect χ²
minimisation → wrong orbital parameters
- Agents achieve optimal statistical fits on periodograms — but fail to recover true Keplerian
elements
- Difficulty scales with: SNR, orbital resonances, planet multiplicity
- Root cause: no persistent physical world model — statistical optimisation ≠ physical
understanding
⚠️ Implication for our group: agents can write PLUTO setup scripts and call RADMC-3D
correctly. They cannot yet verify that outputs are physically consistent.
Human domain review at Gate 1 & Gate 2 remains mandatory — this is why our pipeline enforces
it.
Appendix — Astrophysics Agent Landscape
Agent Systems Built for Astrophysics & Cosmology
🌌 CosmoEvolve
- Task: ACT DR6 CMB power-spectrum analysis
- PI + Student agent hierarchy
- Shared "Blackboard" for async cross-agent memory retention
- Open-ended: hypothesis → computation → diagnostic iteration
- Closest analogue to our
@pipeline-agent design
📡 CMBEvolve
- Task: out-of-distribution detection in weak-lensing maps
- Structured tree-search + dedicated idea sampler
- Iteratively refines detection algorithms against known physical bounds
- Excels where objectives are mathematically precise and measurable
📄 Denario
- Task: end-to-end paper generation
- Autonomously applies quantum-physics methods to astrophysical datasets
- Expert-validated papers in astrophysics, planetary science, mathematical physics
- Still requires domain expert review — not autonomous publishing
🖥️ Local Body, Remote Brain for our HPC workflows: terabytes of disk/cosmological data stay
on LRZ SuperMUC-NG (local body executes I/O).
The LLM orchestrates methodology, tracks provenance, and flags physical anomalies remotely. Data never
leaves the cluster.
Appendix — SKILL.md Evidence & Risks
Our SKILL.md Approach: Evidence & What to Watch
✅ SciAgent-Skills: SKILL.md files demonstrably work
92.0%
accuracy on BixBench
+26.7 percentage
points vs baseline — zero fine-tuning required
- 199 domain-specific SKILL.md files (biostatistics, data analysis, scientific writing)
- Agent reads structured Markdown → applies domain knowledge dynamically at inference time
- Directly validates our
dustpy, pluto, fargo3d,
radmc3d, sherpa, yt skills
📚 The hallucinated-citation crisis
- Audit of 111 M references across 2.5 M arXiv + PubMed papers
- ≥146,932 entirely hallucinated references introduced in 2025
alone
- Risk compounds: agents using RAG on poisoned literature generate recursively invalid science
🎭 Illusion of full autonomy
- Agents optimise toward the objective you provide — problem selection remains human
- True autonomy requires scientific judgment trained on grant reviews and rejections — not yet
available
- Current role: powerful co-scientist, not independent PI
🔒 Our defences: ADS MCP tool for every reference (verified BibTeX only) · no hand-written
citations · prompt logs as Art. 12 audit trail · human gates at hypothesis and interpretation stages
Appendix — Agent Tests · Live Demo
@hypothesis-agent: Planet Gap Mechanisms
Prompt given
Science question:
"What mechanisms set the depth of a planet-carved gap in a protoplanetary disc? Vary M_p, α, and v_frag."
Agent ran 3-round internal debate →
cross-checked NASA ADS
H1 (score 0.73) — α dual role
α simultaneously sets the gas gap depth through the Kanagawa K-parameter
and the fragmentation-limited grain size via afrag ∝ vfrag^2/α. Both effects
reduce grain Stokes number and dust trapping efficiency as α increases, so the
dust gap scales steeper than the gas gap alone.
H2 (novelty 0.70) — Unified K_dust scaling
By analogy with the Kanagawa gas formula, a modified
dimensionless parameter Kdust=(Mp/M∗)^2 (h/r)^(−5)α^(−1)(vfrag/cs)^(−2)
should collapse gas and millimetre-dust gap depths onto a single power-law across
the full (M_p, α, v_frag) parameter space.
H3 (novelty 0.66) — v_frag sets the dust/gas gap depth ratio
v_frag controls the fragmentation-limited Stokes number at the
outer gap edge. High v_frag → large grains → St ∼ 0.1 → efficient
pressure-bump filtration → dust gap much deeper than gas gap.
Low v_frag → small grains → St ≪ 0.01 → poorly trapped → dust/gas gap depth
ratio near unity.
Output: results/hypotheses/gap_depth_hypotheses_20260529.json
· wall-clock ~30 s · priority rank: [1, 2, 3]
Appendix — Agent Tests · Live Demo
@analytical-agent: Gap-Opening Mass Thresholds
Prompt given
Hypothesis: "1 M_Jup planet
opens deep gap in M★=1 M⊙ disc
with h/r=0.05, α=1e-3."
Compute gap-opening criteria
and Kanagawa gap depth.
Analytical results (astropy.units, SymPy)
- Thermal gap-opening mass: M_th = 0.393 M_Jup (3 M★ h³)
- Viscous gap-opening mass: M_visc = 0.093 M_Jup (K=25 threshold)
- Kanagawa parameter: K = 2916 for q = 9.55×10⁻⁴
- Gap depth: Σ_gap/Σ₀ = 8.5×10⁻³ (118× gas depletion)
- Regime: deeply nonlinear (K/K_open = 116.6)
Kanagawa+2016 formula validated
Σ_gap/Σ₀ = 1/(1 + 0.04 K)
K = q² / (h⁵ α)
All quantities propagated with
astropy.units — no bare floats
Output: results/analytical/gap_depth_analytical_20260529.py +
.json · reproducible script runs in <1 s
Appendix — Agent Tests · Live Demo
@literature-agent: Fragmentation Barrier Papers
Prompt given
Find the key papers on the fragmentation barrier in dust coagulation and export BibTeX to paper/bibliography.bib
ADS MCP workflow (live)
- 6×
ads_search queries
ads_resolve_reference for 2 ambiguous refs
ads_citation_helper on 7-paper core set
ads_export batch → BibTeX, 1 call for all 12
12 entries added — all ADS-verified
- 2012A&A...539A.148B — Birnstiel+ 2012
(739 cit.) — the fragmentation barrier formula
- 2008A&A...480..859B — Brauer+ 2008
(591 cit.) — coagulation + radial drift
- 2010A&A...513A..79B — Birnstiel+ 2010
(579 cit.) — two-population model
- 2010A&A...513A..57Z — Zsom+ 2010
(504 cit.) — bouncing barrier
- 2010A&A...513A..56G — Güttler+ 2010
(439 cit.) — collision outcome mapping
- + 7 more: Weidenschilling 1977, Blum & Wurm 2008,
Birnstiel 2011/2016, Windmark 2012, Testi 2014, Stammler 2023
Guardrails enforced
- No hand-written BibTeX — every entry from live ADS query
- All 12 entries carry
doi + adsurl fields
- Keys auto-renamed to
AuthorYYYY format
- Zero hallucinated references
12 entries appended to paper/bibliography.bib · validated with
grep -c "^@" → 12 · wall-clock ~45 s
Appendix — Agent Tests · Live Demo
@setup-agent: FARGO3D Par File + SLURM Script
Prompt given
Generate FARGO3D par file for
gap depth run: 1 M_Jup at 20 au,
M★=1 M⊙, h/r=0.05, α=1e-3,
Nx=384×Ny=128.
Add SLURM script for LRZ.
Generated files
data/runs/gap_1Mjup/gap_1Mjup.par — patched FARGO3D par
data/runs/gap_1Mjup/planets/gap_1Mjup.cfg — planet config
data/runs/gap_1Mjup/submit.sh — LRZ SLURM script
Agent self-correction flagged
⚠️ Initial attempt used fargo setup (no α support).
Agent detected mismatch and corrected to fargo_nu setup
(Shakura-Sunyaev viscosity) — without user prompt.
SLURM script: 48 cores, LRZ SuperMUC-NG, wall-time 24 h
⚠️ @setup-agent generates scripts but does not submit — HPC job requires explicit user
confirmation (Art. 14 gate)
Appendix — Skill Tests · Live Demo
dustpy skill: Ice-line Fragmentation Run
Command executed
python .github/skills/dustpy/\
scripts/run_dustpy.py \
--alpha 1e-3 \
--disk-mass 0.05 \
--stellar-mass 1.0 \
--r-in 1 --r-out 100 \
--N-r 80 \
--vfrag 10 \
--t-end 1e6 \
--N-snaps 10 \
--output-dir data/dust/iceline_test
Simulation parameters
- Disk: 0.05 M⊙ · R ∈ [1, 100] au · 80 radial cells
- Turbulence: α = 10⁻³ (Shakura-Sunyaev)
- Fragmentation velocity: v_frag = 10 m s⁻¹
- Evolution: t_end = 1 Myr · 10 snapshots
Pydantic v2 validation enforced
- N_snaps ≥ 10 (min constraint validated)
- Grid geometry checked before run
- Output:
data/dust/iceline_test/data*.hdf5
- Diagnostics: grain size, Stokes number, dust/gas ratio vs radius
DustPy (Stammler & Birnstiel 2022) · single-call interface with full parameter validation · outputs HDF5
snapshots for plotting
Appendix — Skill Tests · Live Demo
fargo3d skill: Patch .par + Launch Simulation
Command executed
python .github/skills/fargo3d/\
scripts/run_fargo3d.py \
--par-file setups/fargo/fargo.par\
--output-dir data/runs/fargo_test\
--AspectRatio 0.05 \
--Sigma0 6.37e-4 \
--PlanetMass 9.548e-4 \
--Tmax 5 --Ninterm 5 \
--fargo3d-bin fargo3d \
--n-procs 1
Result: SUCCESS
- Binary detected:
fargo3d (sequential build)
- Par file patched: AspectRatio, Sigma0, PlanetMass, OutputDir
- Absolute path passed to binary (cwd fix applied)
- Output:
gasdens*.dat, orbit0.dat, tqwk0.dat
Bug found & fixed live
Script passed relative par path while binary's cwd was set
to the FARGO3D source dir → "Unable to read par file".
Fix: pass os.path.abspath(patched_par) — binary now
resolves the path correctly.
Fix committed to .github/skills/fargo3d/scripts/run_fargo3d.py · demonstrates live agent
self-correction during demo
Appendix — Skill Tests · Live Demo
pluto skill: Compile Disk_Planet Problem
Command executed
python .github/skills/pluto/\
scripts/compile_pluto.py \
--run-dir .../Test_Problems/\
HD/Disk_Planet \
--pluto-dir .../pluto-code \
--with-fargo \
--make-jobs 4
Result: SUCCESS
- Arch auto-detected:
Darwin.gcc.defs
- FARGO orbital advection: enabled (
--with-fargo)
- Binary:
Test_Problems/HD/Disk_Planet/pluto
- Wall-clock: 3.0 s (4 parallel make jobs)
- Physics config written to
physics_config.md
Non-interactive compile
PLUTO's setup.py normally requires interactive input.
The skill drives it non-interactively via
definitions.h pre-selection + pexpect.
Ready to run with run_pluto.py + plot_pluto.py
PLUTO HD/MHD solver · FARGO orbital advection reduces CFL cost in Keplerian discs · compile → run → plot in
three script calls
Appendix — Skill Tests · Live Demo
matplotlib skill: DustPy Grain Size Evolution
Script used
import h5py, numpy as np
import matplotlib.pyplot as plt
for snap in [0, 4, 9]:
f = h5py.File(f"data{snap:04d}.hdf5")
r = f["grid/r"][:] / 1.496e13 # au
a = f["dust/a"][:] # (Nr, Na)
Sd = f["dust/Sigma"][:]
St = f["dust/St"][:]
i = np.argmax(Sd, axis=1)
a_max = a[np.arange(Nr), i]
St_max = St[np.arange(Nr), i]
ax[0].semilogy(r, a_max)
ax[1].semilogy(r, St_max)
Key results at t = 1000 yr
- a_max(10 au) ≈ 1.95 × 10⁻⁴ cm (fragmentation limited)
- a_max(100 au) ≈ 24 cm (drift limited outer disc)
- Stokes number St ∝ r in outer disc — drift-dominated
- Final dust mass: 3.6 × 10⁻⁴ M⊙
Skill conventions followed
- 300 dpi PDF + PNG saved to
plots/
- cividis/tab10 palette · axes labeled with units
- Dark background for slide compatibility
Figure: plots/dustpy_grain_size_evolution.pdf
· wall-clock 15 s total (DustPy 1000 yr run + plot) · reproducible from HDF5 snapshots
Appendix — Agent Tests · Live Demo
@analysis-agent: FARGO3D Post-processing
Prompt given
Post-process the FARGO3D output
in fargo_skill_test/:
- Read gasdens0.dat (128×384)
- Azimuthal-average → Σ(r)
- Compute Σ_gap / Σ₀
- Read tqwk0.dat (planet torque)
- Save JSON + radial profile plot
Results (snapshot 0 = initial condition)
- Σ_gap / Σ₀ = 1.0 (flat, unperturbed disc)
- Planet torque at t=0: 0.0 (not yet integrated)
- Wall-clock: 0.84 s
- Output:
results/analysis/fargo_gap_analysis_20260529.json
- Plot:
plots/fargo_sigma_profile.pdf
Agent self-diagnosis correct
Agent correctly explained: "Snapshot 0 is the initial
condition — gap opening requires 100–200 orbital periods
(~9000 yr at 20 au). The run was too short."
Script: src/analysis/fargo_gap_analysis.py
· numpy.fromfile only — no proprietary wrappers
⚠️ Trivial result is physically correct and expected —
demonstrates agent flagging its own limitation rather than reporting a spurious gap depth
Appendix — Agent Tests · Live Demo
@interpretation-agent: Gap Depth Physics
Prompt given
Interpret analytical +
numerical results:
K=2916, Σ_gap/Σ₀=8.5e-3 (theory)
vs Σ_gap/Σ₀=1.0 (simulation t=0)
DustPy: a_max(100au)=24cm
Verdict: iterate or stop?
Verdict: ITERATE
Key insight: For K=2916 (116× above gap-opening threshold),
tidal torques overwhelm viscous diffusion → 118× steady-state depletion predicted.
But equilibrium takes 100–200 orbits (~18,000 yr) to develop.
3 Follow-up directions
- Launch gap_1Mjup.par to 1000 orbits; test Kanagawa at ±30%
- 6-point M_p grid → verify K ∝ q² slope = 2.00 ± 0.15
- FARGO3D → DustPy → RADMC-3D → synthetic ALMA 1.25 mm
Human Gate 2 location
Pipeline pauses here: iterate = HPC allocation cost.
Agent proposes, human decides.
Output: results/interpretation/gap_depth_interpretation_20260529.json
· InterpretationHandoff/v1 schema · ADS-verified discrepancy notes included
Appendix — Agent Tests · Live Demo
@paper-agent: Abstract + Methods Draft
Prompt given
Draft abstract + methods for
the disc gap study.
Use ONLY ADS-verified bibcodes.
Mark uncertain refs [VERIFY ADS].
Save as LaTeX to
paper/sections/abstract_methods.tex
Output
- Abstract: 186 words
- Methods: 577 words (3 subsections)
- References: 13 bibcodes, all ADS-confirmed
- Zero hand-written or invented citations
Key references used (ADS MCP)
- 2016PASJ...68...43K — Kanagawa+2016 gap depth formula
- 2018ApJ...869L..41A — DSHARP survey (Andrews+2018)
- 2012A&A...539A.148B — Birnstiel fragmentation barrier
- 2022ApJ...935...35S — DustPy (Stammler & Birnstiel)
Agent self-flagged warning
Noted a_max(10 au) discrepancy between run configs.
Did NOT proceed silently — flagged for human review.
File: paper/sections/abstract_methods_draft.tex
· valid LaTeX · \\citet{}/\\citep{} macros · ready for Overleaf
Appendix — Agent Tests · Live Demo
@pipeline-agent: Full 9-Stage Run
| # |
Agent / Skill |
Time |
Key output |
| 1 |
@literature-agent |
~2 min |
5 background papers → bibliography.bib |
| 2 |
@hypothesis-agent |
~3 min |
3 ranked hypotheses JSON |
| 👤 HUMAN GATE 1 — choose
hypothesis to pursue |
| 3 |
@analytical-agent |
~2 min |
K=2916, Σ_gap/Σ₀=8.5e-3 |
| 4 |
@setup-agent |
~3 min |
gap_1Mjup.par + SLURM script |
| 5 |
@simulation-agent (dustpy · fargo3d · pluto) |
~8 min |
DustPy HDF5 · FARGO3D IC · PLUTO binary |
| 6 |
@analysis-agent |
~2 min |
Σ_gap/Σ₀=1.0 (t=0, correct) |
| 7b |
@literature-agent (novelty check) |
~1 min |
No prior work within 20% — science case novel |
| 7 |
@interpretation-agent |
~2 min |
Verdict: WRITE · hypothesis confirmed |
| 👤 HUMAN GATE 2 — confirm
write · validate physical interpretation |
| 9 |
@paper-agent |
~5 min |
186-word abstract + 577-word methods (LaTeX) |
Total: ~29 min wall-clock
9 agents · 3 skills · 13 ADS-verified references
· science question → draft methods in one session
Gates enforce human judgment
Gate 1: resource & direction decision.
Gate 2: validity & cost decision.
Agents propose — humans decide.
Agent Safety · .claude/settings.json
Hooks: Policy-as-Code for Agent Behaviour
A hook is a shell script that the agent harness executes automatically
at a fixed lifecycle event — PreToolUse (before every tool call) or
Stop (when the agent finishes a turn). A non-zero exit or a
deny JSON response blocks the tool call before it runs.
Hooks enforce rules from copilot-instructions.md at the process level —
the agent cannot reason its way around them.
PreToolUse · Bash
pre-bash-safety.sh
Blocks destructive shell operations:
git push --force / reset --hard
rm -rf data/ or results/
sbatch / qsub (HPC auto-submit)
§10 copilot-instructions.md
PreToolUse · Write | Edit
pre-create-results.sh
Blocks overwriting existing result files:
- Checks if target path exists under
results/
- Returns
deny with a timestamped alternative path
- Allows writes outside
results/ freely
§10 copilot-instructions.md
Stop
agent-stop-check.sh
Enforces prompt log discipline:
- Detects new/modified files under
src/ via git diff
- Blocks the turn from completing if no
prompts/ log exists
- Forces agent to create the log before stopping
§7 copilot-instructions.md