agentleFS
antiamerican-postponer432antiamerican-postponer432/chatgpt-for-researchers/starter/AGENTS.md

chatgpt-for-researchers / starter

AGENTS.md1 starsChanged 4 months agoMITView on GitHub

WHY THIS FILE MATTERS MORE IN CODEX THAN ANYWHERE ELSE: Codex reads AGENTS.md automatically at the start of every session (global ~/.codex/AGENTS.md first, then this file at the repo root, then any AGENTS.md in subfolders as it works there). Codex has NO memory between sessions — no auto-memory, nothing carried over. This file plus next-session-prompts.md ARE the memory. --> [e.g., Compute the integral of four modular Eisenstein series over the fundamental domain as a function of their spectral parameters, using…

  • Commits and pushes
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,691 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

20 rules. About 0 are common, 16 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep it to one screenful per section where possible.

    line 6
  2. Distinctive:

    Update "Current status" and "Open tasks" at the end of every session.

    line 7
  3. Distinctive:

    Do NOT use this file as a logbook.

    line 9
  4. Distinctive:

    Update this before ending every session.

    line 50
  5. Distinctive:

    KEEP IT A SNAPSHOT, NOT A LOG.

    line 52
  6. Very specific:

    Never write a citation into any file without first verifying the paper exists on Semantic Scholar, arXiv, or OpenAlex.

    line 80
  7. Distinctive:

    If you change your answer because I expressed doubt or disagreement, say so explicitly: "I am revising my earlier answer because you pushed …

    line 88
  8. Distinctive:

    Do not silently update a formula or sign without flagging the change.

    line 90
  9. Distinctive:

    Never say "I'll remember", "I've noted", or "I've saved" unless you actually wrote the corresponding file in the same turn.

    line 97
  10. Very specific:

    All plots, tables, and numerical outputs you produce go in numerics/generated/ or figures/generated/ until I have reviewed them and traced …

    line 105
  11. Distinctive:

    Use after any edit to a .tex file.

    line 116
  12. Distinctive:

    Use after establishing a new result.

    line 118
  13. Distinctive:

    Use when migrating existing Mathematica files to work in VS Code with Wolfbook.

    line 120
  14. Distinctive:

    Only if you collaborate on Overleaf via its git remote.

    line 128
  15. Distinctive:

    Use \label on every section, subsection, theorem, proposition, equation, and figure.

    line 150
  16. Distinctive:

    If something in workbook.tex is discovered to be wrong, REPLACE IT IN PLACE.

    line 163
  17. Distinctive:

    Delete the whole section, the /*-pipeline prompt lines above, and the Pipeline/ folder if every code here is small enough to read …

    line 180
  18. Very specific:

    An agent keeps each pipeline healthy: Before relying on a code, after a big change, and periodically, spawn the read-only pipeline-auditor …

    line 189
  19. Very specific:

    Commit author: YOUR_NAME <your-email@example.com>

    line 209
  20. Distinctive:

    NO Co-Authored-By trailers in commits.

    line 210

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md — [Project Name]

<!-- INSTRUCTIONS FOR FILLING THIS IN: - Fill in every section. Don't leave placeholders. - Keep it to one screenful per section where possible. - Update "Current status" and "Open tasks" at the end of every session. - Move finished items out of "Open tasks" into next-session-prompts.md (DONE log). - Do NOT use this file as a logbook. It is a current-state snapshot. WHY THIS FILE MATTERS MORE IN CODEX THAN ANYWHERE ELSE: Codex reads AGENTS.md automatically at the start of every session (global ~/.codex/AGENTS.md first, then this file at the repo root, then any AGENTS.md in subfolders as it works there). Codex has NO memory between sessions — no auto-memory, nothing carried over. This file plus next-session-prompts.md ARE the memory. -->

Goal

<!-- One paragraph. What is this project? What is the mathematical/scientific object? What is the open question you are working toward? -->

[e.g., Compute the integral of four modular Eisenstein series over the fundamental domain as a function of their spectral parameters, using the Rankin–Selberg unfolding method.]

Files

<!-- Map of every file Codex needs to know about. One line each. Be explicit about which file is authoritative. -->
  • brief.tex — short (20–30 pp) self-contained reference; READ FIRST in every new session. Contains current results, key formulas, open questions. No derivations.
  • workbook.tex — full working record (~N pp): every proof, derivation, failed attempt, and discussion in complete detail. Not a paper draft — a research journal in LaTeX. Too large to read in full — grep or search by section label. For collaborative projects: consider naming each author's workbook separately (e.g., workbookAlice.tex, workbookBob.tex) to clarify ownership and reduce merge conflicts. Everyone pulls results into the shared brief.tex.
  • next-session-prompts.md — task log. Top section = next task; bottom = DONE log.
  • numerics/ — computation scripts. README.md inside explains each file.
  • scripts/ — helper scripts (if any; most helpers ship inside their skill folders).

Conventions

<!-- Notation Codex must get right. Be precise about signs, normalizations, definitions. -->
  • [e.g., ξ(s) = π^{-s/2} Γ(s/2) ζ(s). Functional equation ξ(s) = ξ(1-s).]
  • [e.g., E*_s = ξ(2s) E(z,s) = completed Eisenstein series. Simple poles at s=0,1, residues ∓½.]
  • [Add your own conventions here]

Current status

<!-- One screenful. What is established? What is the last result? What is the exact next step? Update this before ending every session. KEEP IT A SNAPSHOT, NOT A LOG. This file is re-read every session, so every line costs tokens forever. Rule of thumb: if a status line has a date in it, it belongs in the dated log, not here — the DONE log at the bottom of next-session-prompts.md, or CHANGELOG.md once that history gets long (see starter/CHANGELOG.md). Two-way rule: append to the dated log when a result LANDS; refresh this snapshot when a branch's DONE/OPEN FRONTIER moves. -->

Last result (DATE): [what was computed/proved]

Established:

  • [bullet list of what is rigorous and complete]

Open:

  • [bullet list of what is pending, ranked by priority]

Next step: [the single most important thing to do next]

Chat formatting (IMPORTANT)

In chat replies, do NOT use LaTeX markup ($...$, \frac, \xi, etc.) — it does not render in the Codex terminal or VS Code chat panel. Write math in plain Unicode: ξ, μ, σ, Γ, ζ, ∑, ∏, ∫, √, ½, →, ≈, ≠, ≤, ⇒ single subscripts/superscripts (one char): M₃, μ₀, sᵢ, x², yⁿ multi-char sub/superscripts: M_{ab}, e^{-π t}, τ^{-2} LaTeX belongs ONLY inside .tex files.

Citations (NON-NEGOTIABLE)

<!-- Prevents fabricated references. Every model invents citations with full confidence. -->

Never write a citation into any file without first verifying the paper exists on Semantic Scholar, arXiv, or OpenAlex. Use $verify-citation before adding any reference. If you cannot confirm the paper exists, say so explicitly — do not invent a plausible alternative.

Anti-sycophancy rule (IMPORTANT)

<!-- Makes capitulation visible. The model will agree when it should not. -->

If you change your answer because I expressed doubt or disagreement, say so explicitly: "I am revising my earlier answer because you pushed back." Do not silently update a formula or sign without flagging the change.

Follow-through rule (IMPORTANT)

<!-- Saying "I've noted that" without writing a file is performative compliance. The promise-checker Stop hook (.codex/hooks/promise-checker.sh) catches this automatically once trusted via /hooks; this rule is the standing version. -->

Never say "I'll remember", "I've noted", or "I've saved" unless you actually wrote the corresponding file in the same turn. If asked to record something, write it to AGENTS.md or next-session-prompts.md immediately — there is no memory between sessions, so an unwritten note does not exist.

AI-generated outputs

<!-- Separates what you computed from what the model computed. -->

All plots, tables, and numerical outputs you produce go in numerics/generated/ or figures/generated/ until I have reviewed them and traced them to a committed script. Never include generated/ content in workbook.tex without my explicit instruction.

Skills

<!-- Skills live in .agents/skills/<name>/SKILL.md (project) or ~/.agents/skills/ (personal, every project). Invoke with a $-mention ($latex-compile) or let the model pick one when the task matches its description; /skills lists them. List them here so every session knows they exist and when to use them. -->
  • $latex-compile — compile workbook.tex or brief.tex, fix errors and overfull boxes. Use after any edit to a .tex file.
  • $sync-brief — propagate load-bearing changes from workbook.tex to brief.tex. Use after establishing a new result.
  • $nb-to-wolfbook — convert .nb notebooks or .m scripts to Wolfbook's .wb format. Use when migrating existing Mathematica files to work in VS Code with Wolfbook.
  • $sync-wb-nb — mirror every .wb edit into the paired .nb (if you keep one).
  • $wolfram-headless — the rules for heavy headless wolframscript jobs.
  • $wolfbook — playbook for driving the live Wolfram kernel via the Wolfbook MCP.
  • $verify-citation — verify a paper exists before writing it as a citation.
  • $reality-check — re-derive a contested result in isolation to detect sycophancy.
  • $cross-validate — format a claim for cross-model validation (Claude / Gemini).
  • $overleaf-sync — sync the Overleaf/ git clone of a shared paper: status/pull/diff/publish. Only if you collaborate on Overleaf via its git remote. Remove this line otherwise.
  • $write-pipeline, $check-pipeline, $apply-pipeline + the pipeline-auditor sub-agent — the Pipeline workflow (see the "Pipeline workflow" section below). Only once a code grows too big to hold in context; remove these lines if this project has no such codes.

Writing style in workbook.tex (IMPORTANT)

<!-- Tell Codex how detailed to be when writing in workbook.tex. Researchers often want very different levels of detail than the model's default. -->

workbook.tex is the AUTHORITATIVE, COMPREHENSIVE record. Show every step of every calculation. State each substitution, each application of the functional equation, each sign. Never collapse multi-step manipulations into "one finds" or "a short computation gives." If in doubt, over-explain.

[Adapt this section to your own preference — some researchers want the opposite: terse, theorem-style prose. Be explicit either way.]

Structure and cross-references in workbook.tex (IMPORTANT)

<!-- Codex navigates workbook.tex with grep and targeted reads, not by reading top to bottom. These rules make that navigation reliable. -->
  • Use \label on every section, subsection, theorem, proposition, equation, and figure. Cross-reference explicitly with \ref / \eqref. More cross-references than you would write for a human reader is the right amount.
  • Maintain a clear section hierarchy (sections → subsections → subsubsections with meaningful names). Flat structure makes targeted reads unreliable.
  • Why it matters: every line the model reads to find something is context spent. Dense labels + a deep hierarchy let it jump straight to the one result it needs (a cheap targeted read) instead of scanning pages — cheaper sessions, and it can survey a large workbook without exhausting its context window.

Corrections in workbook.tex (NON-NEGOTIABLE)

<!-- This rule prevents the model from working from wrong information in future sessions. -->

If something in workbook.tex is discovered to be wrong, REPLACE IT IN PLACE. Do not append a correction paragraph later ("earlier I claimed X, but actually Y").

Reason: Codex reads different parts of workbook.tex in each session. If the wrong version stays in the file and the correction is only further down, a later session may read the wrong statement and never see the correction. It will then work from incorrect information, confidently.

Numerics

<!-- Primary computation engine, venv location, any gotchas. -->
  • Primary engine: Python + mpmath (precision: mp.dps = 30 unless stated otherwise)
  • venv: numerics/venv/ — run scripts as numerics/venv/bin/python numerics/script.py
  • Route all long-running output to numerics/run.log

Pipeline workflow

<!-- KEEP this section only if the project has (or will grow) large, hard-to-read codes. Delete the whole section, the /*-pipeline prompt lines above, and the Pipeline/ folder if every code here is small enough to read top-to-bottom. -->

Big codes get a map. When any code grows too big to hold in context — the file you dread opening (a many-cell notebook, a multi-pass engine) — it gets one short living doc under Pipeline/ that you read before the source. Three standing invariants:

  1. Every main code has a pipeline doc. Cross that "too big to read" threshold → $write-pipeline <file>. (Coverage: bash .codex/hooks/pipeline-coverage.sh.)
  2. An agent keeps each pipeline healthy. Before relying on a code, after a big change, and periodically, spawn the read-only pipeline-auditor sub-agent (defined in .codex/agents/pipeline-auditor.toml) on its doc — it reads doc + code and hunts real bugs and concrete optimizations (it reports, never edits).
  3. Code and pipeline move together. Edit code → $check-pipeline and fix the doc (the code is ground truth). Edit a doc → $apply-pipeline reconciles the code (with approval + a control re-run). The optional pipeline-guard hook nudges the right direction on each file edit; it stays silent until a Pipeline/ doc exists.

Always read Pipeline/README.md before opening any large code. A file-edit hook cannot see notebook edits made through a live-kernel MCP — this written rule covers those.

Git

<!-- Remote setup, identity, push procedure. -->

LaTeX gotchas

<!-- Any project-specific LaTeX issues Codex should know about. -->
  • \Res is defined as \DeclareRobustCommand (used in section titles → .toc)
  • Macros in use: [list your custom macros]
  • Compile: pdflatex workbook.tex twice (for TOC), or latexmk -pdf

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.