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.
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
- Distinctive: line 43
When the user picks a related paper to study, they'll add it as a seed first.
- Very specific: line 48
Single-item
zr parse <key>is fine: when the user is asking about that specific paper. - Distinctive: line 52
If you're unsure whether to parse, ask.
- Very specific: line 54
When the user states a research question, default to creating a workspace under workspace/<slug>/ and write question.md there before doing …
- Distinctive: line 58
Treat the agent's role as research partner, not stenographer.
- Very specific: line 114
Never edit files under ~/Zotero/.
- Very specific: line 115
Never call zr import without confirming the user wants the item added (Zotero will create a real attachment).
- Very specific: line 117
When you write to workspace/<project>/notes.md, append rather than rewrite.
- Very specific: line 125
Don't add features that aren't in zr --help.
≈ “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.
Files
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.sqlitein 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 indata/.workspace/<project>/is where research output lives. One directory per research question. Each project owns its ownquestion.md(the user's framing),seeds.txt(Zotero keys / DOIs / arXiv IDs to start from),related.md(discovered work), andnotes.md(your synthesis).zris the only tool that knows how to talk to the data. Drive it from skills; do not reach intodata/or the Zotero sqlite directly unlesszrdoesn'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--yesis 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 writequestion.mdthere 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 Zoteroparse— convert a PDF to multimodal Markdown for LLM readingrelated— find related work via citation graph + OpenAlextrends— analyse research trends and gaps for a topicimport— fetch a missing paper and add it to Zoteroworkspace— create and update a research-question workspacenotes— append durable per-paper analysis notes
Layered reading (avoid context bloat)
Papers can be very long. Load progressively:
- L1 —
zr show <key>(title, authors, year, abstract, tags). Always start here. - L2 — user annotations and notes via
zr annotations <key>. - L3 — parsed transcript at
data/transcripts/<key>/paper.md. Search/grep for the relevant section before reading the whole thing. - 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 importwithout 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 viarichwhen interactive, plain text when piped. - Don't add features that aren't in
zr --help. Extend the CLI first, then let skills use it.
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
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.

