nanopath: Instructions file for Codex

AGENTS.md

nanopath AGENTS.md is an instructions file for Codex, OpenCode from MedARC-AI/nanopath. It costs 1,109 tokens per session, scanned A, original, Apache-2.0.

A contributor guide for Nanopath, a small-model training project. It describes the project’s goal of testing training methods, data choices, and settings through quick experiments before larger training runs.

In plain words
What is it for?
It helps with changes to training code, preprocessing, data curation, experiment settings, evaluation probes, documentation, and validation.
Why use it?
It tells an AI agent how deeply to inspect the project and how to keep changes simple, focused, implemented, and tested.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is MedARC-AI/nanopath's own configuration. It tells Codex and OpenCode how to work on nanopath itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nanopath configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MedARC-AI/nanopath. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MedARC-AI/nanopath/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/MedARC-AI/nanopath

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for nanopath AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/medarc-ai/nanopath/agents-md/github.svg)](https://agentmods.dev/instructions/medarc-ai/nanopath/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/medarc-ai/nanopath/agents-md"><img src="https://agentmods.dev/badge/instructions/medarc-ai/nanopath/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for nanopath AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/medarc-ai/nanopath/agents-md"><img src="https://agentmods.dev/badge/instructions/medarc-ai/nanopath/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,109 This file is loaded in full into every session.
When invoked 1,109 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01109 $0.01109
Opus 5.5 $0.00444 $0.00444
Sonnet 5.5 $0.00222 $0.00222
Haiku 4.5 $0.00111 $0.00111

Measured 2mo ago against content hash efe27f3aed1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nanopath AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 38 lines

How it starts

The opening of the file, as written. The whole thing — 38 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project goals:

  • Nanopath should be easy to share with collaborators so they can quickly try new training objectives, preprocessing choices, data curation ideas, and hyperparameters on a small model.
  • The normal loop is: iterate fast on a single H100, validate promising changes with downstream probes, then reserve larger/full-node training for the best candidates.
  • Keep the codebase hackable and nanochat-like: flat organization, few files, few lines, and minimal abstractions.

Before changing code:

  • If not already activated, source nanopath's .venv.
  • For broad or ambiguous tasks, read deeply enough into the current repo to understand the training/probing/data path before recommending changes. Look at every relevant source, config, script, and doc file rather than optimizing one file in isolation.
  • Make a concrete multi-step plan for nontrivial work, then keep going through implementation, validation, and any needed doc/comment updates.
  • Default to immediately implementing sensible recommendations and validating them rather than simply suggesting recommendations.

Coding guidelines:

  • Use flat organization: as few folders, files, and lines of code as possible; functional elegance is the goal. If you make revisions where there are over a dozen new lines of code I am going to be highly skeptical you really tried your best to adhere to this guideline. A great revision should LOWER the total lines of code, not increase it. Don't play smart by opening subprocesses or other hacks to get around this limitation.
  • Commenting is the exception to the line-count preference: add concise comments explaining "how and why" for functions and important (i.e., not plotting/logging) code blocks.
  • Do not add defensive try/except blocks or fallbacks. If something is wrong, it should fail loudly. Don't bother with ValueError raises or other code guards.
  • Prefer hard-coded constants over extra environment variables, modular options, or fallback paths, unless the value is meant to be frequently tuned.
  • Prefer native PyTorch over Accelerate, Lightning, etc. nanopath is single-GPU only — do not introduce DDP, FSDP, or any multi-GPU code path.
  • Do not use argparse. Meaningful tunables should live in YAML config files, e.g. cfg.train.lr; if YAML does not define a variable used by a training script, it is fine for that to error. Only put variables in YAML when they are actually meant to be tuned often; otherwise hard-code them.
  • Avoid tiny helper functions/classes that are only a handful of lines. Put the code directly where it is used.
  • Follow nanochat as the model for a clean minimalist codebase, especially train.py and model.py.
  • Do not create new files unless explicitly asked or truly necessary; prefer improving existing files. If you do create a new file, add a few commented out lines of code to the top of it to explain its purpose.
  • If code changes make comments, docs, configs, or scripts inaccurate, update those too.

Experiment and benchmark discipline:

  • Validate opinions experimentally whenever feasible. Run code, tests, probes, or short jobs that directly support the conclusion.
  • Use downstream probing as the main comparison signal because objectives like JEPA, MAE, DINO, and iBOT may not have comparable validation losses.
  • Treat one run as discovery. A maintainer reruns promising candidates three times with different random training seeds; the median run becomes the validated leader if it beats the incumbent by at least 0.004. robust-norm-s9876 is the approved exception.
  • Use wandb for logging, plotting, and utilization monitoring throughout pretraining. Log all metrics needed to validate training behavior (i.e., gradient norm).
  • Full runs launched with ./submit/train_1gpu.sbatch ... prompt for Labless run name, notes, and GitHub no-scope device login before scheduling, then auto-submit after a successful eligible run.
  • For direct python train.py runs or frozen baseline evaluations worth sharing, run ./labless/submit_to_labless.py output_dir=... run_name=... notes=...; labless records the verified GitHub login. Full submissions require summary.json, metrics.jsonl, summary.max_train_samples == 1000000, summary.tile_presentations <= 1000000, and summary.max_train_flops == 1e18. Keep smoke checks and failed runs local.
  • Labless notes should name the starting recipe, main changes, and why those changes might affect probes; agents should derive them from the source/config diff.
  • Do not submit runs whose saved labless_source snapshot changes probe.py or benchmarking/; labless marks locked-path changes invalid.

Read the full file on GitHub · 38 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · -3 lines · -94 tokens per session efe27f3aed1f
  2. 2mo ago First seen · 41 lines · 1,203 tokens per session scan A c929a003d9ce

Subscribe to this mod's changes

nanopath AGENTS.md is an instructions file published in the GitHub repository MedARC-AI/nanopath (23 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,109 tokens to every session, about $0.0044 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

nanopath AGENTS.md compared with instructions from other repositories

nanopath AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
nanopath AGENTS.mdMedARC-AI/nanopathInstructions file23yesterdayApache-2.0A1,109Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot