agentleFS
hasantahabagcihasantahabagci/agentic-paper2code/AGENTS.md

agentic-paper2code

AGENTS.md0 starsChanged 2 months agoApache-2.0View on GitHub

A pipeline for reproducing a research paper as a working code repository. It is written for coding agents: there is no orchestration code, no API keys and no service to run. Every stage is a Markdown instruction file that you, the agent, read and execute using the tools you already have. If you are an agent reading this file because it is in the user's project, this is your operating manual for any request of the form "reproduce this paper",…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 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.

  • In this repository3 other files it gives its agents.

The file

Show its rules and text

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

15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    If you are an agent reading this file because it is in the user's project, this is your operating manual for any request of the form …

    line 8
  2. Very specific:

    Read prompts/shared/rules.md — the reproduction contract — and prompts/shared/workspace.md.

    line 26
  3. Very specific:

    Never invent a number. Every value is annotated with where it came from, or explicitly marked UNSPECIFIED.

    line 31
  4. Distinctive:

    No stubs, no placeholders, no fake computations.

    line 33
  5. Very specific:

    Write state to STATE.md after every step, so the work survives a lost context window.

    line 34
  6. Very specific:

    Run them in order. Each reads the artifacts of the previous ones and writes its own into .p2c/<slug>/.

    line 39
  7. Distinctive:

    Do not skip stages, and do not merge them.

    line 55
  8. Very specific:

    Read STATE.md in the workspace, if one exists, to find where you are.

    line 61
  9. Distinctive:

    Read the stage prompt in full.

    line 62
  10. Distinctive:

    Read the artifacts the stage declares under Reads.

    line 63
  11. Distinctive:

    Do the work. Write the artifacts it declares under Writes.

    line 64
  12. Very specific:

    Update STATE.md, including the Next action line.

    line 65
  13. Very specific:

    After stage 4 (config): If a large share of the hyperparameters are UNSPECIFIED, the user should decide whether to continue, look for the …

    line 77
  14. Distinctive:

    Never parallelise stage 6.

    line 89
  15. Very specific:

    Read .p2c/<slug>/STATE.md, read the artifacts of the completed stages, and execute the stage named under Next action.

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

agentic-paper2code

A pipeline for reproducing a research paper as a working code repository. It is written for coding agents: there is no orchestration code, no API keys and no service to run. Every stage is a Markdown instruction file that you, the agent, read and execute using the tools you already have.

If you are an agent reading this file because it is in the user's project, this is your operating manual for any request of the form "reproduce this paper", "implement this arXiv paper", or "turn this PDF into code".

Finding the toolkit

Stage prompts live in a prompts/ directory. Resolve its location in this order and use the first that exists:

  1. ${CLAUDE_PLUGIN_ROOT}/prompts/ — installed as a Claude Code plugin.
  2. .p2c/toolkit/prompts/ — installed into this project by install.sh.
  3. prompts/ at the repository root — you are working inside this repository.
  4. ~/.paper2code/prompts/ — installed globally.

Everything below refers to files under that directory.

Before anything else

Read prompts/shared/rules.md — the reproduction contract — and prompts/shared/workspace.md. The contract governs every stage and overrides any stage instruction it contradicts. The most important rules:

  • Implement the paper as written, not as you would improve it.
  • Never invent a number. Every value is annotated with where it came from, or explicitly marked UNSPECIFIED.
  • No stubs, no placeholders, no fake computations.
  • Write state to STATE.md after every step, so the work survives a lost context window.

The stages

Run them in order. Each reads the artifacts of the previous ones and writes its own into .p2c/<slug>/.

#StagePromptProduces
0Ingestprompts/00-ingest.mdpaper/paper.md, paper/meta.json
1Planprompts/01-plan.mdplan.md
2Designprompts/02-design.mddesign.md
3Tasksprompts/03-tasks.mdtasks.md
4Configprompts/04-config.mdconfig.yaml, configs/smoke.yaml
5Analyzeprompts/05-analyze.mdanalysis/<file>.md
6Implementprompts/06-implement.mdthe repository
7Verifyprompts/07-verify.mdverify.md, a repository that runs
8Reviewprompts/08-review.mdreview.md
9Packageprompts/09-package.mdREADME, REPRODUCTION.md

Do not skip stages, and do not merge them. Stage 5 exists as a separate step because reasoning about an algorithm while also managing syntax is how subtle errors get in; stage 7 exists because code that has never run is a hypothesis.

Running a stage

  1. Read STATE.md in the workspace, if one exists, to find where you are.
  2. Read the stage prompt in full.
  3. Read the artifacts the stage declares under Reads.
  4. Do the work. Write the artifacts it declares under Writes.
  5. Update STATE.md, including the Next action line.
  6. Report to the user what you found — especially anything the paper leaves ambiguous.

Between stages, check in with the user if a decision would change the shape of the result: which experiment to target, whether a dataset is worth downloading, whether a full training run is in scope.

Checkpoints worth pausing at

  • After stage 1 (plan). The reproduction targets decide what the rest of the work is aimed at. Getting them wrong wastes everything downstream.
  • After stage 4 (config). If a large share of the hyperparameters are UNSPECIFIED, the user should decide whether to continue, look for the authors' code, or narrow the scope.
  • After stage 7 (verify). The user learns here whether the implementation actually runs and learns.

Parallelism

Stage 5 analyses files independently and parallelises safely — dispatch one subagent per file if you have them. Stage 6 is strictly sequential: each file is written against code that already exists and has been checked.

Never parallelise stage 6. Two agents writing interdependent files at once produce a repository whose parts individually look right and do not fit.

Resuming

Read .p2c/<slug>/STATE.md, read the artifacts of the completed stages, and execute the stage named under Next action. A fresh agent with no history should be able to do this. If an artifact contradicts STATE.md, trust the artifact and fix the state file.

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.