The research setup
/research:research-init sets a project up for the research plugin and checks an existing setup: it probes the project and the machine, proposes what is missing, installs nothing without your word, re-checks what exists against the project as it stands and adds what is missing, rewriting nothing without your word, and reports.
The probe is scripts/setup.py probe of the research-init skill, which writes nothing; the writes are flow init and library init, run through their own scripts, and the edits below.
Every run re-checks the whole setup, so a project set up before is set up again the same way, its files read rather than taken as done because they are present, and what a later release or a new document asks is added.
With another agent, ask it to set research-kit up in the project; Getting started shows the first project in Claude Code from the shell to the first commit, and what the setup writes, command by command.
What a setup is
Required, each for the reason it gives:
- a git repository, since the records are tracked and the checks are commit hooks;
flow.toml, the records directory and a bound log, written byflow init --log FILE(The flow);library.tomland the cards directory, written bylibrary init, since a research project cites works and the flow’s check asks the library for every cited key (The library);- the paragraphs both inits print, in the project’s instructions file (
CLAUDE.md,AGENTS.mdor the agent’s own), since they are what makes the next session read the records through the tool; - where the project has documents, what its reviews hold them to, under a
### Reviewsheading at the end of the## Records and methodsection, since the audit, scrutiny and the attribution check read it there and no script does; [kit] releaseinflow.toml, the release the setup last brought the project to, written byflow initand moved by the setup’s verify step (The flow).- the hooks
flow-checkandlibrary-check, throughprekorpre-commit, since a check that runs only when remembered is not a gate.
Recommended: markdownlint on PATH, so a record write that adds a violation is reverted.
Its configuration is the project item markdownlint config: present, with the file’s name, where [paths] markdownlint_config of flow.toml binds a file that exists, which is read first, or where the root holds one of the files the flow’s own lint reads there (.markdownlint.jsonc, .markdownlint.json, .markdownlint.yaml, .markdownlint.yml, .markdownlint-cli2.jsonc, .markdownlint-cli2.yaml, .markdownlint-cli2.cjs, .markdownlint-cli2.mjs), else absent; a .markdownlintrc alone does not count.
Where it is absent, a bare markdownlint or an editor reports line length on the one-sentence lines, which the flow’s own lint does not, so the probe proposes .markdownlint.jsonc holding the flow’s built-in rules, with one line of comment saying why: line length off, and a record’s title: front matter taken as the document’s title, as the flow reads it.
A project with a configuration of its own is left alone, the flow reading it.
The project item documents compiled from findings is information and never a required item: where flow.toml binds [documents] globs it names them, and where [documents] is unset and the tree holds Markdown files with numbered statements, a line opening with one of [evidence] statement_words (the flow’s own words where unbound) and a number, it says so and names the files, so that step 2 asks about them.
Optional, by what the project does: the markdown package for the dashboard’s rendered bodies, pdftotext for the text of a kept PDF, and the formal plugin for a project with a Lean workspace.
The probe labels the machine’s items with one of these three words and the project’s with present, absent, found or none.
Two of the project’s items read what the instructions file holds, not that it exists: instructions section, a heading whose text is Records and method (a trailing parenthesis such as “(author, 2026-09-14)” allowed, at any level), by file, heading and line, the earlier name Research records named as a step to rename; and reviews part, a heading whose text is Reviews inside that section, with its place and the heading it stands under, or absent, which matters where the project has documents with a References section (a Reviews heading outside the section is named, to be moved in).
The probe matches the headings exactly and guesses nothing from a section’s words: a project keeping the records rules under a heading of its own is found by the agent reading the file at step 5.
A third reads what runs the kit’s scripts: wrappers over the kit's scripts lists, by file and line, each code span or fenced line of the instructions files, and each recipe line of the root Makefile, that runs a script of the kit through something other than the skill’s own path (.agents/skills/…, .claude/skills/…, ${CLAUDE_PLUGIN_ROOT}/skills/…; a plugin-cache path is not one), with the sentence of the instructions: a session loads the skill and runs its script by the path the skill gives, which changes with each release, so no file of the project names it and the project keeps no wrapper or make target over it; the notation flow check itself in the instructions is no wrapper; it is information, never a failure.
The agent reads the section all the same: a heading found says nothing of what the part holds.
The pins and the upgrade steps
The project’s item pins at one tag compares the places a project pins the kit: the hooks’ rev in .pre-commit-config.yaml, the marketplace’s ref in .claude/settings.json, which is to be latest, the branch each release moves to its tag (Install), and the version of each plugin of the research-kit marketplace that Claude Code installed for the project, beside the version of the plugin the probe runs from.
A probe run in a linked git worktree reads the install of the main work tree as its own, where the record names the main work tree’s path, which git alone says, and the entry’s clause in the item says so.
A pin file with uncommitted changes, .claude/settings.json or .pre-commit-config.yaml by git status --porcelain, is named, since a clone reads its committed pin.
Where no hook names the kit’s repository the item says that no hook pins the kit by rev, and, where the project’s repo: local hooks run the kit’s scripts, that the hooks are local and no rev pins them, which makes the item a step: replace those hooks, named by their ids, with the kit’s, pinned by rev at the target; the report’s kit: line gives the version and the release tag of the plugin the probe runs from, which are no pin of the hooks.
The installed versions come from Claude Code’s install record, ~/.claude/plugins/installed_plugins.json (CLAUDE_CONFIG_DIR moves ~/.claude), where the project’s own entry, of scope local or project, stands over a user one.
The probe asks GitHub for the kit’s latest release, with one retry after a timeout, and the item names each pin that differs from it, a marketplace at a tag or at no ref with the move to latest, and a plugin the project’s settings enable that is not installed; where the install record is absent, under another agent or with nothing installed, it says so and compares the hooks and the marketplace alone.
Where the latest release cannot be read, offline, refused or with RESEARCH_KIT_OFFLINE=1 set, the item says so and why, and compares the pins among themselves, against the newest of them.
The report’s upgrade section, in the text and under --json, names the steps a move to another release still asks, each with its command, in the order an upgrade takes them:
| Step | What the probe reads | What it names |
|---|---|---|
pins |
the item above | the releases from the oldest pin up to the latest whose Upgrading paragraphs to read in the changelog at the latest release’s tag, then the steps of Install: the ref edited to latest and the marketplace added at it where it is not there, else the marketplace updated; each plugin off the release updated; a remote hooks’ rev set, or the local hooks running the kit’s scripts replaced by the kit’s, pinned by rev (an upgrade step, never a failure); the restart |
setup |
[kit] release in flow.toml, against the installed release, the plugin the probe runs from |
where the marker is behind, the Upgrading paragraphs of each release after it up to the installed one, then the setup run once more, whose verify step moves the marker; where it is ahead, the project brought further on another machine, the moves of this plugin; -- where flow.toml has no such line, written before v0.7.0, the pins step’s releases from the oldest pin standing in until the marker is written, after which the pins step names only the releases after the installed one |
records |
flow doctor of the flow skill beside this one |
the mechanical edits flow doctor --fix writes, counted by class, and the things for the hand flow doctor lists (The flow), a missing [kit] release among them; the optional keys a newer init writes that the project’s flow.toml lacks are counted as noted, never pending |
index |
flow index --check |
a stale index, which flow index rewrites |
instructions |
the reviews part item |
pending while a project already set up has no ## Records and method section (the earlier Research records named to rename, a section of its own to rename or move), and while the project has documents with a References section and no ### Reviews part inside it; its command is the setup’s step 5 |
The probe runs the two flow commands, which write nothing, and the probe still writes nothing; a step marked PENDING is to take, NOT RUN could not be checked and says why (no flow script beside the skill, a flow.toml the flow cannot read), and -- has nothing to bring.
The pins move to the latest release, so a project whose pins agree on an older tag is shown the upgrade all the same; where the latest release cannot be read, they move to the newest tag among them.
The probe prints the changelog’s URL at the tag that ends the range of releases it names, the latest release or the installed one, and at main only where that is no release tag.
Where formal.toml stands at the project root, the section ends with one more line, no step of its own: the formal plugin is set up here and /formal:formal-init is to run too, since the probe reads none of that plugin’s files; under --json it is upgrade.formal, the line or null.
What it does
- Probes, and reads the whole report: the environment, the project with its pins, the kit’s version and layout, the proposals, the upgrade steps, the coverage line.
- Plans in one message of prose, with no question list, then asks each choice among options through the agent’s question tool where it has one, each question with its options and the recommended one first, and in the turn only where the agent has no such tool.
Where the project has no
flow.toml, and so no records, and no documents with a References section, the idea of the project is asked first, and the other questions are put against it: where the folder’s name and what the probe found say what the project is, the agent proposes the idea in one sentence of its own, and you take it, record no idea now, or give your own words; where they do not say enough, it proposes nothing and asks for the idea in the turn, as free text, which you may decline. The other questions follow in one call of the tool: which proposals to install, with the log’s name where none exists (WORKLOG.mdunless you say otherwise) and whether copies the project keeps by hand may be redistributed with the repository (library init --kept, no unless you say so) as its options; whether the project has documents compiled from its findings, a part of one naming the finding it states by a label, and which files and which heads, asked where the probe finds[documents]unset and files with numbered statements, the files it names and the heads from the statement words proposed; which evidence forms the project accepts (statedbeing the form that holds a person’s decision, so a project that wants working values for a question the person may postpone lists it), as a multi-select with one option a form, of the five the flow ships and your own words, each option saying what the form is, giving one example and saying which findings cannot be made without it, the question saying that the list is changed later inflow.toml,[evidence] forms; all five are offered in every project,formalamong them, its option saying, where the probe finds noformal.toml, that taking it brings theformalplugin installed and its setup run, which needs a Lean workspace, and where the agent’s tool takes fewer than five options the question is split in two and no form is left out; and whether to take a pending upgrade step now. Where the project has documents, what its reviews hold them to is a text for you to correct, not a choice among options: after that call the agent puts it in prose, proposed from the documents, with which documents a review may correct in the session and which it reports and asks you about first, and the gates an audit runs first where they are more than the hooks, and you answer in your own words. - Installs what was chosen, with the proposal’s command as shown, and probes again.
- Writes the bindings where they are absent:
flow init --log LOG, thenlibrary init --scan RECORDS --scan LOG --documents GLOB…with the globs the probe found with a References section; aninitrefuses over an existing file, and--forceis used only when you ask for a rewrite;[evidence] formsinflow.tomlis edited to the forms you picked, and[documents] globsandmustare written where you said the project has documents compiled from its findings. The labels in those documents are the work that follows,flow partslisting the parts that must carry one. Where you gave the idea of the project, it is minted onceflow inithas run as the project’s first idea, its body written from your words and the context the setup found (where you took the agent’s proposal, the body says that the wording is the agent’s reading of the folder’s name, taken by you on that day), and left in the common deck, not drawn, for the firstwhatsnextto rank and draw. Where the probe proposes.markdownlint.jsonc, it is written at the root on your word, as every proposal; declined, the report names it, to be written later from the probe’s text. Where you takeformalandformal.tomlis absent,formalstays in[evidence] forms; where theformalplugin is not installed for the project, its install is proposed after your answer, with the command (claude plugin install formal@research-kit --scope projectunder Claude Code, Install for another agent) and run on your word; and one task is minted in your deck, onceflow inithas run and the list is edited, for what is left and is yours: to start a new session, or reload the plugins, so that the plugin’s skills are loaded, then to run/formal:formal-init, which probes for the Lean workspace and proposes what is missing, until whichflow checkreports formal evidence unchecked. The research setup creates no Lean workspace and installs no prover; that is the formal setup’s. Whereformal.tomlstands, running/formal:formal-initagain is proposed, and the flow binds nothing of its manifests, since it asksformal resolvefor its formal evidence. - Appends a section
## Records and method— the data and how the project works with it: the tools, the records discipline, the session procedures, the project’s specialization of the method — to the instructions file where no section holds the records rules (a file the setup creates holds a title, one line saying that what the project is for is in its records, read withflow state, and the section, and nothing else), holding the paragraphs both inits printed in the project’s words: where the records are and that they are read through the tool, that a state changes only through a transition, that the check runs before a commit, that the ranked list is the schedule, that a record is named to you with its title, where the log is, what each evidence form means for the project; and, where the project has documents, a### Reviewspart with your answers: the corpus and the documents a reader sees beyond the bound ones, which imports which, the regime conditions with their constants, the claims whose status recurs, the definitions compared, the class and its instances, the status labels, any rule of the project’s own, the documents a review corrects in the session and those it asks you about first, the gates an audit runs first. The section holds the project’s bindings and the rules that stand before a skill is loaded, and does not restate a skill’s steps or a command’s output, which the skills carry. The section, like a file the setup creates, states no card, no idea, goal, direction, question or task, in its own words or reworded, and no description of what the project is about, which is the records’ to say and is read withflow state. Where the project keeps the records rules under a heading of its own, found by reading the file (## Research records, which earlier setups wrote, or another), one proposal is made, on your word: rename that section to## Records and method, or move it there and move its### Reviewsinside it (a### Records and methodunder## Structureis promoted to##, its sibling### Reviewsmoved inside); no second section is added. Where the section exists it is re-read whole, against the paragraphsflow init --print-instructionsandlibrary init --print-instructionsprint for the bindings as they stand, writing nothing: what it lacks,### Reviewsor an item of it, is added on your word, what is stale, and a sentence that restates a card, are named with the edit proposed, and nothing is rewritten without your word, what the file holds outside the section being the project’s and left; a project with no documents yet gets### Reviewsfrom a later run. The paragraphs say that a session loads the skill and runs its script by the path the skill gives, so no file of the project names it and the project keeps no wrapper or make target over it; where the probe’swrappers over the kit's scriptslists a line, replacing it by the skill’s name and dropping a make target over the kit’s scripts are proposed on your word. - Adds the kit’s block to
.pre-commit-config.yaml—repo: https://github.com/lividgreen/research-kit,rev:the tag the probe prints, the hooksflow-checkandlibrary-check— installs the runner’s hook and runs it once over all files; Install has the block and the pins. The probe reads the file’s lines, comments aside: a hook repo naming research-kit, or a checkout’s path whose hooks are the kit’s, is the kit’s block already, re-checked for a hook it lacks, and a file whoserepo: localhooks run the kit’s scripts is a pending step of thepinsupgrade, which replaces those hooks with the block, on your word, since they carry norev; a file that only mentions research-kit in a comment gets the block. - Runs
flow check,library checkandflow state, and fixes or names any problem; then, once the steps the probe listed are taken, moves[kit] releaseto the installed release, on your word, and probes once more. - Reports what was written, installed and declined, each declined item with the command to do it later, the upgrade steps left pending, the first move (
/research:whatsnexton the project’s first idea where one was minted),/formal:formal-initas the next step where the probe found a Lean workspace, and, where you tookformalandformal.tomlis absent, the task minted for the formal plugin, named with its title among the first moves; where you did not takeformaland no Lean workspace is found, it says nothing of the plugin. - Names the files it wrote or changed and asks you once whether to commit them, with the message
research-kit set up; on a yes it stages those files alone and commits. It initialises no repository unasked: where the folder is none, it says so and leaves the commit.
A project that already keeps its research elsewhere — notes, a roadmap, a to-do list, a bibliography — is set up the same way first; its material is then brought into the records and the cards as a step of its own, by the skill’s references/migration.md: survey and propose before writing, classify by the kinds’ own tests, carry the open work and every finding, the old measurements among them, and point at the settled, go through the commands wherever one exists, remove nothing, and end with the checks.
The agent runs each skill’s script by the path its skill gives, which a plugin install changes with each release, so the project’s files name none and keep no wrapper over it; a script outside the agent runs one by its path from the project root where the skills are installed into the project, as python3 .agents/skills/flow/scripts/flow.py check, and a plugin install has no such path (Install).
Words
- research-init — the skill that sets a project up: it probes, proposes, re-checks what exists and adds what is missing, rewriting nothing without your word, and reports;
/research:research-init. - probe — the report
setup probeprints: the environment, the project, the kit’s version, the proposals, the upgrade steps and a coverage line; it writes and installs nothing. - pins — the places a project pins the kit: the hooks’
rev, the marketplace’srefand the version of each installed plugin; at the latest release, the skills’ text and scripts are the checks’ release and the newest. [kit] release— the release the setup last brought the project to, a committed line offlow.toml, so a probe or a script on any machine reads the same answer; a flow script older than it refuses to write.latest— the kit’s branch that the release workflow moves to each release tag; a marketplace at it follows the releases and never the default branch’s unreleased work.- required, recommended, optional — the probe’s three words for what the machine has: a required item is one the setup needs, a recommended one is proposed, an optional one serves what the project does; the project’s own items read
present,absent,foundornone.