agentleFS
enkerewpoenkerewpo/zoresearch/AGENTS.md

zoresearch

AGENTS.md1 starsChanged 15 days agoMITView on GitHub

You are working inside a personal research copilot whose job is to help the user organise, read, and extend their Zotero library around a specific research question. - Zotero is the source of truth. Items, PDFs, and metadata live in ~/Zotero/. This tool reads ~/Zotero/zotero.sqlite in read-only mode and never writes to it directly. New items are added through Zotero's local connector API (same path browser extensions use), which means Zotero must be running for imports to succeed. - data/…

  • 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 35,040 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 repository8 other files it gives its agents.

The file

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

9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the user picks a related paper to study, they'll add it as a seed first.

    line 43
  2. Very specific:

    Single-item zr parse <key> is fine: when the user is asking about that specific paper.

    line 48
  3. Distinctive:

    If you're unsure whether to parse, ask.

    line 52
  4. Very specific:

    When the user states a research question, default to creating a workspace under workspace/<slug>/ and write question.md there before doing …

    line 54
  5. Distinctive:

    Treat the agent's role as research partner, not stenographer.

    line 58
  6. Very specific:

    Never edit files under ~/Zotero/.

    line 114
  7. Very specific:

    Never call zr import without confirming the user wants the item added (Zotero will create a real attachment).

    line 115
  8. Very specific:

    When you write to workspace/<project>/notes.md, append rather than rewrite.

    line 117
  9. Very specific:

    Don't add features that aren't in zr --help.

    line 125

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

zoresearch — instructions for coding agents

You are working inside a personal research copilot whose job is to help the user organise, read, and extend their Zotero library around a specific research question.

Mental model

  • Zotero is the source of truth. Items, PDFs, and metadata live in ~/Zotero/. This tool reads ~/Zotero/zotero.sqlite in read-only mode and never writes to it directly. New items are added through Zotero's local connector API (same path browser extensions use), which means Zotero must be running for imports to succeed.
  • data/ is a rebuildable cache. Parsed PDFs, OpenAlex graph responses, and embeddings live there. Deleting it is safe — re-running CLI commands rebuilds what's needed. Do not put anything irreplaceable in data/.
  • workspace/<project>/ is where research output lives. One directory per research question. Each project owns its own question.md (the user's framing), seeds.txt (Zotero keys / DOIs / arXiv IDs to start from), related.md (discovered work), and notes.md (your synthesis).
  • zr is the only tool that knows how to talk to the data. Drive it from skills; do not reach into data/ or the Zotero sqlite directly unless zr doesn't expose what you need.

Working style

  • This library is small and personal. Be terse, skip ceremony.
  • The user has ~800 actual papers and ~1100 PDF attachments. Whole-library metadata scans (lib search, lib stats) are cheap; do them.

Cost discipline — MinerU is workspace-scoped

This is the load-bearing rule. Read it carefully.

MinerU PDF parsing is the only expensive operation in this tool: it costs real time (1–3 min/paper) and counts against the user's MinerU quota. The library has hundreds of papers; the user only cares about a few at a time.

  • Never parse a paper unless it's in the active workspace's seeds.txt — i.e., the user has explicitly marked it as something they want to deep-read.
  • Never auto-parse from related.md. Related work is a discovery list to skim at the abstract level (which is free — already in Zotero metadata). When the user picks a related paper to study, they'll add it as a seed first.
  • Never bulk-parse without zr ws parse <name> --yes. That command shows what would be parsed and exits unless --yes is passed. Treat the preview as the confirmation point.
  • Single-item zr parse <key> is fine when the user is asking about that specific paper. But if they're asking a broader question, route through the workspace flow instead of parsing reactively.

If you're unsure whether to parse, ask. The cost of asking is one sentence; the cost of parsing 30 papers no one needs is real.

  • When the user states a research question, default to creating a workspace under workspace/<slug>/ and write question.md there before doing anything else. Subsequent searches, related-work finds, and notes go in the same workspace.
  • Treat the agent's role as research partner, not stenographer. Question claims, surface contradictions, point out where the library is thin.

Capabilities (CLI)

zr doctor                          # environment checks
zr lib stats                       # library overview
zr lib search <query> [--type ...] # keyword search across title/abstract/tags
zr lib list --collection <name>    # items in a collection
zr show <key|citekey>              # metadata + abstract + attachment + notes
zr parse <key> [--engine ...]      # PDF -> data/transcripts/<key>/paper.md
zr annotations <key>               # user's highlights and notes from the PDF
zr related <key>                   # backward refs + forward citations, deduped vs library
zr trends "<topic>"                # OpenAlex pull (years, venues, top-cited)
zr import <doi|arxiv-id|url>       # add to Zotero (connector API)
zr import <file.ris> -c <coll>     # hand-written records + local PDFs (L1), e.g. papers under review
zr notes <key> [--append "..."]    # per-paper persistent notes
zr ws init <name>                  # create a workspace for a new question
zr ws add <name> <key|doi|...>     # add a seed paper
zr ws related <name>               # rebuild related.md from all seeds
zr ws parse <name> [--yes]         # parse ONLY this workspace's seeds (preview by default)

Skill tier

Skills under .agents/skills/ (linked from .claude/skills/ for Claude Code) are short workflows that compose zr commands. When the user's intent matches a skill, read the SKILL.md first and follow it instead of inventing a process from scratch.

Available skills:

  • library — browse / search / show items in the local Zotero
  • parse — convert a PDF to multimodal Markdown for LLM reading
  • related — find related work via citation graph + OpenAlex
  • trends — analyse research trends and gaps for a topic
  • import — fetch a missing paper and add it to Zotero
  • workspace — create and update a research-question workspace
  • notes — append durable per-paper analysis notes

Layered reading (avoid context bloat)

Papers can be very long. Load progressively:

  1. L1 — zr show <key> (title, authors, year, abstract, tags). Always start here.
  2. L2 — user annotations and notes via zr annotations <key>.
  3. L3 — parsed transcript at data/transcripts/<key>/paper.md. Search/grep for the relevant section before reading the whole thing.
  4. L4 — raw PDF (only if the transcript lost something critical).

Push expensive reads (full transcripts, large workspace dumps) into subagents when possible and bring back conclusions, not raw text.

Data hygiene

  • Never edit files under ~/Zotero/.
  • Never call zr import without confirming the user wants the item added (Zotero will create a real attachment).
  • When you write to workspace/<project>/notes.md, append rather than rewrite.
  • Per-paper notes (zr notes) accumulate; one section per analysis, dated.

Conventions

  • Python 3.11+. Source under src/zoresearch/.
  • Comments only when the why is non-obvious.
  • The CLI uses typer, output via rich when interactive, plain text when piped.
  • Don't add features that aren't in zr --help. Extend the CLI first, then let skills use it.

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.