nanopath 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/medarc-ai/nanopath/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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.01109 $0.01109
Opus 5 $0.00554 $0.00554
Sonnet 5 $0.00222 $0.00222
Haiku 4.5 $0.00111 $0.00111

Measured yesterday against content hash efe27f3aed1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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. yesterday Changed · -3 lines · -94 tokens per session efe27f3aed1f
  2. 5d 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 (20 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,109 tokens to every session, about $0.0055 per session on Opus 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

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,733 tokens