agentleFS
hasantahabagcihasantahabagci/agentic-paper2code/docs/agents.md

agentic-paper2code

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

The pipeline is Markdown. Anything that can read files, write files and run commands can execute it. Below are the setups people actually use. As a plugin (one command, works in every project): Or into a project: Or for every project on the machine: Either way you get: Plus a paper2code skill that triggers on requests like "implement this arXiv paper", and three subagents: paper-analyst (stage 5, run one per file in parallel), paper-implementer (stage 6), and fidelity-reviewer (stage 8,…

  • 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

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

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All of these read an agent instructions file at the repository root.

    line 61

≈ “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

Running it in your agent

The pipeline is Markdown. Anything that can read files, write files and run commands can execute it. Below are the setups people actually use.

Claude Code

As a plugin (one command, works in every project):

/plugin marketplace add hasantahabagci/agentic-paper2code
/plugin install agentic-paper2code@hasantahabagci

Or into a project:

git clone https://github.com/hasantahabagci/agentic-paper2code
./agentic-paper2code/install.sh --project /path/to/your/project

Or for every project on the machine:

./install.sh --global

Either way you get:

CommandWhat it does
/p2c:run <paper>the whole pipeline, with check-ins
/p2c:statusprogress of every reproduction in the project
/p2c:resumecontinue where the last session stopped
/p2c:ingest … /p2c:packageone stage at a time

Plus a paper2code skill that triggers on requests like "implement this arXiv paper", and three subagents: paper-analyst (stage 5, run one per file in parallel), paper-implementer (stage 6), and fidelity-reviewer (stage 8, best run with no memory of having written the code).

Codex CLI

./install.sh --codex

This copies three prompts into ~/.codex/prompts/:

/paper2code 1706.03762
/paper2code-resume
/paper2code-status

Codex also reads AGENTS.md, so a project installed with install.sh works without the prompts too — just ask it to reproduce a paper.

Cursor, Windsurf, Zed, Gemini CLI, opencode, Copilot agent mode

All of these read an agent instructions file at the repository root. Install into the project:

./install.sh --project .

That writes (or appends to) AGENTS.md with a pointer to the toolkit. Then ask in plain language:

Reproduce arXiv 1706.03762 following the pipeline in .p2c/toolkit/AGENTS.md.

For Gemini CLI, either add AGENTS.md to contextFileName in .gemini/settings.json, or copy the pointer into GEMINI.md. For Cursor, the same content works as a rule under .cursor/rules/.

Any other agent

There is no framework to integrate with. Give the agent one instruction:

Follow prompts/shared/rules.md, then run the stages prompts/00-ingest.md through prompts/09-package.md in order, writing artifacts to .p2c/<slug>/ and updating STATE.md after each stage.

What the agent needs to be able to do

  • Read files, write files, run shell commands. Required. Stage 7 installs dependencies and runs the code.
  • Fetch a URL. Needed only to pull a paper from arXiv; you can also hand it a local PDF.
  • Read PDFs. Helpful. Without it, install poppler-utils for pdftotext, or feed the LaTeX source instead — which is better anyway.
  • Subagents. Optional. They make stage 5 parallel and stage 8 more trustworthy, but every stage runs fine in a single thread.

A note on model choice

Stages 1, 2, 5 and 8 are the ones that decide whether the reproduction is faithful; they are reasoning-heavy and worth your strongest model. Stage 6 is mostly transcription from the analysis, and stage 7 is debugging. If your agent lets you vary the model per subagent, spend the capability on analysis and review.

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.