research-kit: how a research project's records became a kit
How five months of mathematical research with a coding agent led to research-kit: what failed in the project's records, what replaced it, and the effect.
Since June I have been doing mathematical research with a coding agent: a series of papers, and three Lean 4 libraries that machine-check what the papers claim; the program has its own introduction. The agent writes the proofs, runs the checks and drafts the prose; I decide what is worth doing and whether the result is right.
The mathematics was never the hard part to keep straight. The hard part was the record around it: what had already been tried, what was decided and why, which question came next, and whether a sentence in a paper still matched the code. research-kit is what that record turned into, packaged so another project can use it. This post is how it got there, and what the project’s own history says about whether it helped.
What broke, and what replaced it
A coding agent starts every session cold, so the project’s files were its memory: a file of rules, a roadmap of what to do next, and a brainstorming file where design rounds were written down. That worked while the files were small. By mid-September the roadmap was several hundred kilobytes and the brainstorming file some two hundred and fifty design rounds long.
The first thing to break was not the process but the papers. A paper cites Lean theorems by name and quotes counts derived from the code, and both go stale silently when the code moves. So in July the first commit hooks went in: one resolves every Lean name a paper cites, one recomputes every count that can be derived from the code and fails when the prose disagrees. They set the pattern for everything after: when a mistake happens twice, a check catches it from then on, so nobody has to remember it.
In August the history moved out of the roadmap into a log, newest entry first, with a short state paragraph on top for the next session to trust, and the roadmap became a pool of open items with a command that triaged the pool to pick the next work. The command ran sixty-five times in six weeks. Each run re-tested the parked items and left a dated line behind, and one hard question collected forty-two of them. The agent was spending real effort deciding what to do instead of doing it.
August also produced the most stubborn failure of the project: a record that paraphrases a result and is then trusted. A pool entry would describe a theorem slightly wrong, the next session would build on the description, and in one case three matching citations turned out to be three copies of one error. It happened nine times that month.
In September I had the agent read ten whole sessions end to end and measure where the effort went. In eight of the ten, the project’s own records were the largest thing it read, larger than the papers and the Lean. Three changes followed in three weeks. Viewers print a short summary for a cold session instead of the whole roadmap, and a record is edited through one channel. When a proof lands, a fresh agent with no context reads the bare Lean statements and writes them out in prose, which is compared with what the paper says; the paraphrase failure has been caught before it shipped ever since. And the triage was replaced by a short ranked list of what to do next, with a reason for each item and no schedule, refreshed when I ask. The re-tests stopped.
The flow
On 25 September came the step the kit is built around. I brought in a guide that models research work as typed records, ideas, questions, tasks and findings, one Markdown file each, produced by transitions rather than edited into a new state: a question is made from ideas; an idea does not become a question. I adopted it the same day, with a small command-line tool that is the only thing allowed to change a record’s state, and a validator that runs on every commit. Every older record was migrated in a day: the pool’s entries became questions, the papers’ results tables became findings, each pointing at the Lean declaration that proves it, and the brainstorming file’s rounds became archived tasks.
The last failure class was citations. A literature search had surfaced two recent “resolutions” of open problems that turned out to be withdrawn preprints with invalid proofs, caught only by opening each paper’s own record; a fetched summary had read as more than it was. In October the reference shelf became a library: one card per cited work, recording how far it was actually read and what may be claimed from it, and a commit fails on a paper citing a work with no card, or one nobody read.
By then the pieces were general enough to ask whether another project could use them. On 23 October the agent extracted them into a public repository under one rule: nothing specific to my project goes in. Six rounds of review followed, four from outside, one my own and one by a fresh agent session reading the kit cold, each claim checked against the code before anything changed. The kit was released on 26 October, and my project became its first user. It runs on the released plugins like anyone’s, and when it finds a problem in the kit it sends the problem to the kit instead of patching it locally.
That loop has run six more releases in ten days, each from what the projects using the kit reported back. A question now closes one of four ways and says which; the goals I set and the directions I lean toward are records the ranking reads, mine alone to form and to close; a finding’s trust is read from the forms of its evidence, so a theorem proved by hand in a paper is the project’s own word until the Lean proof lands and raises it. And when the model changed under my project’s 1,350 records, the tool learned to run the mechanical part of the migration itself, which by hand was some ten thousand edits, and to leave the forty-eight cases that need judgment to a person, each named with what to do.
Did it help the research?
I asked the agent to answer that from the project’s history. The answer is yes, with its size stated.
The process stopped costing. After the switch, words like “re-test”, “triage” and “drift” all but disappear from the log, and a session starts from about fourteen kilobytes of generated summary instead of a roadmap that had grown past what any session could read. I start a session with “go on”, and it goes on. The research kept its pace, and the paper-facing output rose: per working day, numbered results in the papers went from about 1.5 to about 2.1, and rows of machine-checked results from 2.3 to 2.7, while new Lean declarations per day stayed flat. Questions got small and finishable: a question framed under the flow carries what would settle it and is framed when it is about to be worked, and such questions were settled in a median of one day.
Two caveats. The output numbers cannot separate the tool from the topic: October’s work was a census of cellular automata, which yields many small results, where August’s were fewer and larger. And the flow did not crack the hard questions inherited from the old roadmap: of about 120, two were settled after the switch. It organizes and finishes the work in hand; it does not do the mathematics. Most of the gain came in the three weeks before the flow itself, from the ranked list, the record tools and the read-back; the flow consolidated them into one checked shape, and that shape is what another project can install.
Where the ideas come from
None of the pieces is new, and the kit does not claim they are; what the project contributed is how they fit together, and the record of which were worth having. Each source below was checked at its own text.
- The records take their shape from process mining’s object-centric Petri nets, where places are typed and one transition consumes and produces objects of several types; that is why a question is produced from ideas rather than edited out of one. The older workflow nets add soundness: from every state the end can still be reached, and no task is dead.
- The limit on how many tasks one session holds is Kanban’s control of work in progress.
- A short ranked list with no standing backlog, and a question that carries its own stopping conditions, echo Shape Up’s “bets, not backlogs” and its circuit breaker.
- A question’s criterion, written before the work, is preregistration’s move, in a repository rather than a registry.
- One short text file per record, kept in git with a status that can be superseded, is Nygard’s architecture decision record.
- A validator that fails when the records disagree with each other plays the role of Beancount’s balance assertions, and the check that every Lean name a document cites exists is leanblueprint’s
checkdecls, run on every commit. - JabRef records a coarse read status and Zotero links related items; the library’s cards add which parts of a work were read and what may be claimed from it.
Agent-native trackers exist too, beads among them, keeping an agent’s tasks in a dependency graph in a database. research-kit is narrower: research, one person, one agent, and everything in plain text a human can read.
What is in the kit
The research plugin, for any research project: the records, moved between states only by the flow tool, a new question carrying its criterion and a finding naming evidence a machine can check, its trust the forms that evidence takes; the goals and the directions the owner sets, which bias what comes next and never order it; a ranked list of what to do next, with a reason for each item; the reference library; a read-only dashboard over the records and the cards; the checks on every commit; and the working rules, on review and evidence, design before building, debugging to the root cause, and changing a target honestly at a wall.
The formal plugin, for a project with a Lean 4 library: the prompt a prover session receives is checked before it is sent, and what the session reports is checked against the built library before any document changes.
Every tool is a single Python script with no dependencies, and all the data is plain Markdown in git that can be read without the kit. It runs in Claude Code and the agents that read its plugin format natively, and in Codex, GitHub Copilot, Cursor and others through Agent Plugins or Agent Skills.
Trying it
In Claude Code:
/plugin marketplace add lividgreen/research-kit
/plugin install research@research-kit
Then ask the agent to set the project up; the setup skill looks at what is there and proposes the rest. The project site has the install steps for every supported agent, the documentation and the changelog, and the source is on GitHub under Apache-2.0.