research-kit

Documentation

The flow

The flow is the tool that keeps a project’s research work as records: ideas, questions, tasks, findings whose evidence a machine resolves, the goals the owner forms and the directions they set, one Markdown file each, moved through their states by the flow command. The records, not the chat, are the memory between sessions: a session starts from the inbox, a ranked list of what to do next and the log’s top entry, reads records by id, and changes a state only through a transition. The tool is scripts/flow.py of the flow skill (/research:flow in Claude Code), one Python 3.11 file with no dependencies: the CLI, the validator, the index generator and the selftest; the skill says how to work with it, and this page is the tool itself — its commands, the files it keeps, its bindings, its check and its words. Flow cards is the specification of the records, and Getting started shows the first commands with the files they write. A session’s start and its end are two skills over these commands: What is next (/research:whatsnext) and The freeze (/research:freeze).

What it does

You note an idea, mint a question from it whose body says what would answer it, mint the tasks the question needs, and close each task with its resolution. A finding is minted after the work that produced it, names its evidence, such as a proved declaration or a script that asserts the result, and may answer the question; the check confirms that the evidence exists. Records link to each other: every kind by references, the general link with no rule, and a question by answered_by, blocked_by and serves, an idea by consumed_by, each with its own. A generated index keeps a ranked list of open work and what each ranked record waits on, and flow state prints what a new session reads first, so the agent goes on from its hand and the list instead of asking where things stand. flow check fails when a hand-edited state leaves a record inconsistent, when a record links an id that does not exist, when a finding’s evidence does not resolve, or when the index is out of date; it checks that the records hold together, not who wrote them, and runs offline as a pre-commit hook.

The session

A session is dedicated to its hand: it works the held cards that are its own work one by one until each is closed or walled, then freezes, reports what was done and stops; with four such cards in the hand it processes four cards. A card handed to another session stays held and is not worked here. Every card minted on the way goes to a deck and not to the hand, a task a question spawns in the common deck unless it is minted --for an owner, and ranked by no mint. A question may be answered with no task at all. A task it spawns may be a side story, off the list (flow rank T --clear); it blocks the question (flow block Q --on T) only where the question cannot move without it. A design round on a question is the held question itself: its record is a dated note on the question (flow note Q --body FILE), its discarded options one line each inside it, and no design task is minted for the round; the round mints tasks where a piece of the work is too big. A round on no question, on tooling or a process, is a task tagged design, its record the resolution. Where the agent needs the person’s answer it asks, with its question tool where it has one, in the turn it meets the decision. Before it asks, or puts a decision to the person’s deck, it applies the method skill’s test, whether a test settles the choice: one that does is the agent’s to run, decide and record, and what is correct is never put to the person as a choice. If the person answers, the work goes on, the answer written into the card’s body (flow note) and the log entry. A decision still open at the turn’s end becomes a task in the person’s deck whose title names the decision, flow task "…" --summary "…" --for OWNER, and the card that waits is blocked on it (flow block ID --on TASK --reason "…"); the log’s State paragraph names that task and never carries the decision as prose alone, and the task is drawn into the person’s hand at their word, and made with the answer as its resolution. The answer is sorted by what it is, in the same turn: a standing rule of the project goes into the project’s instructions file, where its rules live; a change of aim is written on the goal or the direction it changes (flow set, flow note), or a new one is minted on the person’s word; something that was found out is a finding; a choice that holds for this one case stays in the task’s resolution, where flow about finds it. The word “ruling” is not used for a record. A card whose remaining steps are the person’s own work is passed to their deck (flow pass ID --to owner --note "…") and leaves the agent’s hand at that moment. Parking stays for a card set down by decision, and for nothing waited on: a date and an outside event’s words are items of a block. A decision the work needs is asked of the person, and the card is blocked on the task in their deck that holds it; a card parked with the revival on the owner's word and the tag revival-owner asks nothing and sleeps until the person brings it up. Every park names its reason and its revival, what would bring the card back; flow park without --revival, or with an empty one, is refused. Where the revival is the person’s word, the park reads flow park ID --reason "…" --revival "on the owner's word" --tag revival-owner, --tag being repeatable and adding to the card’s tags in the same write, and flow find --tag revival-owner lists the cards that wait on the person’s word. The tag belongs to the parking: flow unpark removes it and says so in one line, and a restate removes it too unless --tag revival-owner is given again; the script itself writes and checks neither the tag nor the phrase. flow park on a card parked already restates it: the reason and the revival are replaced, the parking date is kept, one dated note says what they read (park restated; the reason read: OLD; the revival read: OLD, with the tags it added or dropped), and a restate that changes neither reason, revival nor tags is refused as nothing to change. A card parked before a revival was required stands as it is, and its restate names both. A transition’s changed line gives a parked card’s standing with its date, parked since DATE, or parked since DATE, blocked where the card is blocked too; the lists and --json keep the bare word. A question whose answer is not the person’s to rule, and whose search they may postpone, is parked with a finding that says what is true (the working value and whose decision of which day it is, on stated:FILE#anchor evidence, --ref the question and no --answers), its reason naming the finding; it is never closed wrong, and when the answer lands its finding answers the question and the working-value finding is removed. Deviations are the person’s to rule and the agent’s to propose: drawing a card in the middle of a session, taking another after one that took little effort, or drawing a task straight from the deck for a prover that runs in parallel while the session works on something else. A card drawn by a deviation counts against the hand’s limit, one number and no second class of held card; a deviation that finds the hand full is the person’s to settle with the ruling, a card returned or the limit raised. A project’s instructions may carry the person’s standing ruling for one. A session commits at its freeze, or when the person asks; a transition or a ranking commits nothing by itself. In what the agent writes to the person, a record’s first mention in a message carries its title, as task-0012 (the title); later mentions in the same message are the id alone, however long the message; a few records are named each and never as a range of ids.

What the person says

This is guidance and no rule of the flow: the agent judges which card a thought of the person’s is, and the script reads none of it. The person’s own word for a thing names the card’s kind: an idea is minted with flow idea, a question with flow question, a task with flow task, and a goal or a direction is opened on their word alone. A fresh project starts from the idea of the project, which, as it is worked, may grow into a goal, a direction and other cards, as “The mints” of the skill says: where the person names no other kind, the agent starts from an idea, and the next whatsnext ranks and draws it and the session works it from the hand. Elsewhere, where they name no kind and the agent is not sure, it proposes the kind in one question and mints on the answer. The agent writes the body from the dialog, keeping the person’s words and adding context where it is needed, and the title, which says what the card is, and the summary, which explains it, as at any mint (below); the source says the record came from the person, and the day. The card is minted into a deck, and drawn only where the person’s message asks for work on it now. An idea is then worked, what it produces naming it with --ref, and flow consume closes it once it is folded. Reading an idea for a destination you would commit to and for where your interest points is part of working it: it is done while the idea is held, before it is consumed, and never while the idea stands in a deck, the project’s first ideas being the likeliest to hold them; what it finds it puts to you with its question tool where it has one, in the turn, the goal’s title drafted from your words, and mints on your answer (flow goal "…" --ref IDEA, flow direction "…" --ref IDEA), giving the questions it minted from the same idea --serves. One left unanswered is a decision open at the turn’s end: a task in your deck whose title names it, minted --ref IDEA. No card is blocked on it, an idea being never blocked; the decision is folded into that task, which is among what the idea produced, so the idea is consumed like any other once the rest of it is folded. On your answer the task is made with it, the goal or the direction is minted --ref IDEA, and the idea’s questions are given it with flow serves Q +G. A goal and a direction stay yours: none is minted unasked, and an idea that holds neither produces neither. One in an idea not yet drawn waits for that idea’s working; one the agent meets in a finding or in your own words is put to you in the turn in the same way. A reference says nothing of order: cards may be minted ahead, and where they have an obvious order the later one is blocked on the earlier (flow block LATER --on EARLIER --reason "…"), while cards that can be worked in parallel carry no block.

The commands

Transitions Command
an idea, a question, a task, a finding, a goal or a direction minted, the title its positional, each with --summary S, --ref ID, --tag T, --source S and --body FILE, and a card (an idea, a question, a task) with --value V and --for OWNER into that owner’s deck flow idea "…" --summary "…" --value high --for agent; flow question "…" --summary "…" --ref idea-0001 --serves goal-0001 --size medium --value medium; flow task "…" --summary "…" --ref question-0001 --tag research --value low --due YYYY-MM-DD --after "…"; flow finding "…" --summary "…" --evidence formal:Lib/Foo.lean#decl --ref task-0001 --answers question-0001; flow finding "…" --summary "…" --compose finding-0001 finding-0002; flow goal "…"; flow direction "Name" --body FILE
a card into a hand, a hand filled by rank, a card back out into its deck, or into another deck flow draw task-0001 --owner agent, flow draw task-0001 task-0002 --owner agent, flow draw --refill --owner agent, flow return task-0001 --note "…", flow pass question-0004 --to owner --note "…", --to common
close a task with its resolution flow make task-0001 --resolution FILE, flow abort task-0001 --reason "…"
close a question, or open it again flow answer question-0001 --by finding-0002, flow impossible question-0001 --by finding-0002, flow wrong question-0001 --reason "…", flow reopen question-0001 --reason "…"
add evidence to a finding, or swap or retire an item flow evidence finding-0001 stated:papers/alpha.md#FV-1, flow evidence finding-0001 --replace OLD NEW, flow evidence finding-0001 --retire OLD --reason "…"
evidence added to many findings in one run, from rows of JSON Lines flow evidence --from rows.jsonl, flow evidence --from -
a goal reached or given up, a direction dropped, on the owner’s word flow reach goal-0001 --reason "…", flow giveup goal-0001 --reason "…", flow drop direction-0001 --reason "…"
an idea fully processed, closed as consumed, or a consumed idea opened again flow consume idea-0001, flow reopen idea-0001 --reason "…"
drop an open idea, an open question, a task never started or a standing finding flow remove ID --reason "…"
set aside by decision, wait on something; a held card is returned to its owner’s deck by the command flow park ID --reason "…" --revival "…" [--tag T], flow unpark ID --note "…", flow block ID --on question-0002 --on 2026-12-01 --on "the vendor's reply" --reason "…" (or --on question-0002 2026-12-01, several items in one flag, one block on all of them), flow unblock ID --on "the vendor's reply" --note "…"
the ranked next list, of open ideas, questions and tasks flow rank task-0001 1, --insert, flow rank --set ID…, flow rank task-0001 --clear
refresh an open question’s checked date flow checked question-0001
a field changed after the mint flow set task-0001 size small, flow set idea-0001 value high --note "…", flow set idea-0001 value none, flow set task-0001 due 2026-12-01, flow set goal-0001 title "…" --note "…", flow set question-0001 summary "…", flow set idea-0001 title "…" --to-summary
many fields changed in one run, from rows of JSON Lines flow set --from rows.jsonl, flow set --from -
the links changed after the mint flow ref task-0001 +question-0002 -idea-0004, flow serves question-0001 +goal-0001 -direction-0002
a record’s tags after its mint flow tag task-0001 +upkeep -research
a body appended to, under the date, with no file name guessed flow note task-0001 --body FILE

A record has two fields for what it is: title, a line that says what the card is, and summary, a paragraph that explains it, or null. A title is at most [card] title_max characters (100 where unset) and never empty, a summary at most [card] summary_max (500), one line of the file with no newline in it, both counted in characters; a mint or a set over a limit is refused, the refusal giving the length, the limit, where the rest goes, the summary for a title and the body for a summary, and, on a line of its own, the text cut at the limit (at the limit it reads: «…»). flow state prints the project’s limits in its first line, with the values, the evidence forms and each hand’s limit, so a session reads them before its first mint. A mint of an idea, a question, a task or a finding with no --summary is refused, a goal and a direction may have none. An idea, a question and a task carry a third field, value: how much the card is worth to the project, one of [card] values (low, medium and high in rising order where unset) or null while nobody has judged it; a finding, a goal and a direction carry none. --value V at a mint is never required, flow set ID value V changes it and none clears it, --note "why" appended to the body under the date as value set: why, and a question’s checked stays as it was, as it does after flow set ID size; a word outside the list is refused at a mint and at set, the refusal naming the list, and flow check fails one in a record (V3). flow find --value V lists the ideas, questions and tasks of that value, and flow find --value none every card not judged, the closed among them, --state open with it giving the live ones, which are the cards to judge; nothing warns on a card not judged, and the index shows no value. The agent judges a card’s value at its mint, and a question’s and a task’s size, and changes either when the person says so or the work shows otherwise; a value moves no rank by itself, and the whatsnext skill judges the cards it ranks that are not judged and reads value and size when it orders them. flow set ID title "…" appends title set; it read: and what the title read, in a code span (`OLD`, the fence one backtick longer than the longest run of backticks in it, a space inside it where it opens or ends with a backtick), to the body under the date, with the words of --note after it, and flow set ID summary "…" keeps nothing of what it read (--note N appends summary set: N), none clearing it; flow set ID title "NEW" --to-summary makes what the title read the summary and writes no such note, and is refused where the record has a summary and where what the title read is longer than a summary may be. flow set --from FILE writes many sets in one run, where a tree has many titles and summaries to write: FILE, or - for the standard input, holds one JSON object a row, {"id", "field", "value"}, with "note" and, on a title’s row, "to_summary": true where there are any, and every field flow set takes is taken, none clearing what it clears there. --from takes none of ID, FIELD, VALUE, --note and --to-summary beside it: each row carries its own. Each row is validated and applied as a single flow set is, its limits, the title’s note and --to-summary‘s refusals included, and the rows of one record are applied in the file’s order. A row whose value already stands is skipped and writes no note, so the same file is run again after an interruption. A row refused never stops the run and leaves the other rows written; a line that is not JSON, a row that lacks a key and a row that names no record or no field are rows refused like any other. Each changed record is written whole, markdownlint runs once over the written records, and a record that fails is put back as it was and all its rows are refused with the lint’s line; the index is rebuilt once, at the end. The closing line gives the rows written, unchanged and refused and the records changed, and under it each refused row with its number (its line in the file), its id, its field and why, then each record left half written, a row of it written and another refused, which is settled with a single flow set. --json carries written, unchanged, refused (each {"row", "id", "field", "msg"}) and half, and the exit is 1 where a row was refused. flow evidence --from FILE adds evidence to many findings in one run: FILE, or - for the standard input, holds one JSON object a line, {"id": "finding-0012", "evidence": ["form:target", …]}, and it takes none of FINDING, ITEM, --replace and --retire beside it. It is all or none: every row is checked first as flow evidence ID ITEM… checks it (the finding exists and is standing, each item resolves, none is held already or given twice, the items an earlier row gave the same finding counted as held), and one bad row refuses the run, every bad row reported with its row number, its line in the file, and its reason. Then every finding is written and the index rebuilt once. --json carries written (the rows), added (the items), refused (each {"row", "id", "msg"}) and changed (the findings), and the exit is 1 where a row was refused. No check reads a limit on a record already written, and a file’s slug is cut from its title at the mint and never changes. A composite finding is a finding that states as one result what the records hold as several, the clauses of one theorem or the cases of one statement: flow finding "…" --summary "…" --compose ID ID… takes two standing findings or more, refuses any other by name, and adds each to the new finding’s references. Its evidence is the parts’ items in the order of the parts, each item once; --evidence becomes optional beside --compose, its items follow the parts’, and one a part holds is neither repeated nor refused. A finding with neither flag is refused as before, and so is --compose with one id. Nothing is recalculated later: the composite owns its items from the mint on, and a part that changes state notifies its referrers by the usual notice. Where the whole is more than the parts side by side, a formula or an argument over them, it is a finding of its own with evidence of its own and plain --ref references. Only the mints mint: flow make and flow abort close a task and mint nothing, a follow-up being flow task "…" --summary "…" --ref T after it, and a task’s finding is minted after it with flow finding … --ref task-0001, --answers Q where it settles a question; both print the task’s after, the post-done instruction, for the agent to follow. flow make closes any open task, held or not, and requires its resolution and refuses an empty one: a done task says what was done, and carries the day it closed in closed: {date: DAY}, the day of the command, with no reason. A minted task gets no rank by itself, whatever it references: ranks are written only by flow rank, and a task minted for work now is drawn with flow draw ID and ranked at the next ranking, the refill never drawing an unranked card. A card is in a deck and in at most one hand: owner is its deck, a name of [hand] or null for the common one, drawn its hand; draw takes any ready card from the common deck or the owner’s own, return puts a held card back into its owner’s deck, pass moves a card between decks with a note and out of the hand where it was held, and park and block on a held card return it in the same command and say so. flow draw ID… --owner O draws one card or several, all or none: each is checked first as a single draw is, the hand’s limit counted across the call, and a refusal names its card and writes nothing. flow draw --refill --owner O fills a hand with a limit by rank: from the top of the ranked list, every ready card of the common deck or O’s own is drawn until the limit, each ranked card it passes over is printed with why (parked, blocked on …, in owner's deck, held by owner), then the hand as 3 of 4 with the room left; an unranked card is never drawn by it, a hand with no limit and an ID given with the flag are refused, a hand already full draws nothing and says so, and under --json the lists drawn and skipped and the hand’s count, limit and room are its answer. abort takes a started task, held or not, and remove refuses a started task and names abort; every closing clears owner and drawn and keeps started, and reopen brings a card back into the common deck. A question’s closing is its own act, refused for no task that references it; answer, impossible and --answers take a standing finding and an open question, and a closed question is reopened first with flow reopen, which a question or an idea tagged do-not-reopen refuses. An idea’s closing is its own act too, never a mint’s: a card minted from an idea names it with --ref IDEA, which lists the card in the idea’s consumed_by at once, and flow consume IDEA closes the idea once it is fully processed, refused where consumed_by is empty, since an idea that produced nothing is removed with a reason. Views: flow state (the cold-start bundle, opening with the project’s parameters, with the open goals and directions), flow table (the hands, the goals and the directions, the decks and the two piles as they lie, below), flow find (--type, --state, --value (a card’s value, none the cards not judged), --form (repeatable: a finding carrying every form given; --only: those carrying no other), --tag, --owner, --deck (an owner’s cards in no hand, --deck common the common deck’s), --pile (discard or graveyard), --refers, --deep, --depth, --ready (the cards a refill may draw now), --parked, --blocked, --held (each reading the three kinds of card), --ranked, --id, --grep; --refers ID|PATH lists the records naming a record or a repository path by any link, an evidence item, a source that is a path of the tree or a body link, --deep the records naming those and so on with no bound, --depth N those within N steps (1 is plain --refers), --blocked the records whose block holds today, and a removed record is left out unless --state removed, --pile graveyard or --id asks for it; --state ready and --state active are refused, a task’s state being open, and each row prints a card’s standing or a closed card’s pile), flow show ID (a card’s standing and place or a closed card’s pile, its links and back-references by field), flow about ID… (what the records hold on a subject, below), flow graph --from ID (the neighbourhood of ID: the records within --depth N links of it, either direction, 2 where not given, and the edges among them, --depth 0 the whole connected part, the last line saying how many records the bound left out; each link an edge labelled by its field), flow directions (the open directions as the owner’s list), flow tags (every tag with its records, then the untagged; --type), flow artifacts (every repository path the records refer to, with the records naming each and whether it is in the tree), flow parts (the parts of the documents that name a record by a label, below), flow index, flow check, and flow doctor, which names every record and binding written in an older model’s words. flow about ID… is the view a session reads before it analyses, reviews or plans on a subject: what the records already hold on it, from the records alone, written to nothing. Its arguments are one record id or more, of any kind, --depth N (2 where not given), --budget N (14000 characters where not given, as flow state) and --json. The subject is the given records and every record within N links of one of them, either direction, over references, answered_by, serves and the record ids among blocked_by’s items, consumed_by left out as the mirror of a reference; a goal or a direction that is reached is listed and not walked through, since everything serves one, and a removed record is left out. The text opens # About ID (title) and holds these sections, each left out where empty, a record one entry, nearer the given records first and then by id:

  • Hangs from: the goals, directions and questions, each ID — state or standing — title, a question’s summary on the next line;
  • Findings: the standing findings, each ID — title — forms: f1, f2 with its summary on the next line;
  • Closed tasks: the done tasks, newest first by their closing day, each ID — closed DAY — title, and under it the first sentence of its first resolution: note, the note flow make writes, left out where the task has none;
  • Open cards: the open ideas and tasks, each with its standing as flow find prints it.

The closing lines count the records within the depth, say how many the budget left out and the budget that holds them all (N record(s) within depth D of …; M more beyond the budget: --budget N), and end with searched: flow about ID… --depth D, the sentence a report quotes. An unknown id is refused, naming it. --json carries about, depth, hangs_from, findings, closed_tasks, open_cards and left_out, each record {"id", "type", "state", "title", "summary", "distance"} with forms for a finding, standing for an open card and closed and resolution for a done task. A session that analyses, reviews or plans collects what the records hold on its subject with it, on the subject’s question, task or finding, and its report opens with what it found; “not measured”, “not ruled”, “never decided” and “no record tracks it” are written only after a search, and the sentence names the search (flow about …, flow find --grep …). flow table [--top N] prints the table as it lies, one heading a zone and one line a card, and under --json the key zones. A zone is a place cards lie in: one hand for each owner of [hand], every owner but agent first in the file’s order and then agent, the board’s two zones, the goals and the directions, one deck for each owner in the same order, the common deck, the discard pile and the graveyard, in that order; each is {"kind", "owner", "title", "count", "note", "room", "find", "cards"}. kind is hand, board, deck or pile, owner the owner’s name (null for a board zone, the common deck and a pile), title is agent's hand, the goals, the directions, agent's deck, the common deck, the discard pile or the graveyard, and count is every card of the zone. cards are the ones shown, each as flow find --json gives a record: a hand’s all, by rank and then the unranked by the date they were drawn; a board zone’s all, every open goal or every open direction, the oldest first, which --top does not cut; a deck’s first --top (five where not given), the ranked by rank and then the unranked by the date they were created, the oldest first, whatever their standing; a pile’s none. note is 2 held, no limit or 3 of 4 for a hand, 2 open or none set for a board zone, the standings’ counts for a deck (2 ready, 1 parked, 1 blocked, a card both parked and blocked counted under each, and 5 on the ranked list before them for the common deck) and what a pile holds by state (3 done, 1 answered, 1 consumed), empty for a deck with no card; room is the free places of a hand with a limit and null otherwise. find is the query that lists the whole zone as flow find’s flags, {"held": true, "owner": "agent"} for a hand, {"type": "goal", "state": "open"} or {"type": "direction", "state": "open"} for a board zone, {"deck": "agent"} or {"deck": "common"} for a deck and {"pile": "discard"} or {"pile": "graveyard"} for a pile, and selects exactly the zone’s count cards. The dashboard lays the zones as its home page, a hand’s cards, the goals and the directions face up and a deck’s top behind a stack of backs, and each find is the query of the link to the whole zone. The log and the freeze: flow log add FILE writes an entry at the top of the log, flow log archive --before DATE moves the old ones to one file per month, flow state --check checks what a machine can see of a freeze, and flow touched lists the records changed since the log’s newest committed entry, the ones today’s entry names (--unnamed, --ids, --since REV), a record only re-ranked left out and named on a line of its own; flow reflow --check PATH… holds the project’s other prose to one sentence per line, with no flow.toml needed, flow reflow --write TARGET… rewrites files and records to it, and flow reflow --as DEST DRAFT checks a draft before it is placed, DEST a file or a record’s id. Every command takes --json: a record’s keys are its fields, title and summary among them, and a link or a back-reference of flow show is {"id", "title"}. The envelope of --json is ok, command, created, changed, reranked, records and problems, with the keys a command adds. flow show --json answers the record under records[0], beside body, links, backlinks and stated_in; flow find answers the records found under records, a transition the records it created or changed, and flow table answers zones, its records empty. A record’s --json carries beside its fields the keys the flow calculates and never stores: standing and pile of a card, place and lines of every record. place says where a card is, in words: agent, 3 days for a held card (the holder and the days since it was drawn, today for none), agent's deck or common deck for a live card in no hand, discard pile or graveyard for a closed one, and null for a finding, a goal and a direction, which are no cards. lines is a list of {"label", "text"}, only the ones that hold something, in this order, each in finished words and a record named by its title and never by its id alone: waits (each item of a block that holds today, a record by its title, a date and words as written, then the reason), parked (the reason), due (a task’s date), for (the questions a task is connected to, those it references and those that reference it), serves (the goals and directions a question serves), answered by (the finding that settled a question), answers (the questions a finding settles), evidence (a finding’s forms), fresh (it has produced nothing yet, an open idea that produced nothing) or produced (the titles of what a consumed or a worked idea produced), and served by (N open questions, on a goal and a direction). flow init is the write behind the setup, and flow init --print-instructions prints the paragraphs for the instructions file for the bindings as they stand, writing nothing and refusing nothing; flow --help lists every command and flow <command> --help its flags, and neither needs a bindings file; an argument error inside a command (an unrecognised argument, a missing required one) prints that command’s usage line and the error, with exit 2; a command that does not exist is answered with the nearest ones and, for a usual word such as done or close, or a command that went, capture, frame or refine, the way it goes. A --reason is words: an empty one is refused, as an empty --on is. A --body or --resolution is a file, --body FILE, whose text the command takes, never inline words, which are refused as a file not found; - reads the text from the standard input, for flow log add - too. Every text line of a transition that names a record is VERB ID (details) — Title, as a mint’s created ID — Title is, so the record is named to you without a read: changed ID (state, standing; path) — Title, ranked ID (rank N) — Title, unranked ID (was N) — Title, re-ranked ID (N → M) — Title, returned ID (left OWNER's hand for OWNER's deck; why) — Title, passed over ID (rank N, type) — Title, closed ID (answered) — Title and after ID — Title; the title is printed whole and is always the end of its line, and what is free text comes before it or on a line of its own beneath (the passed-over card’s reason, the closed question’s by ID — Title, the instruction after a make, each record of the follow-up notice); --json is unchanged. A transition that closes a ranked record renumbers the ranks below it and prints each as re-ranked ID (N → M) — Title; flow rank --set prints each record it placed as ranked ID (rank N) — Title and each it cleared as unranked ID (was N) — Title. flow rank ID N --insert prints, after its changed line, ranked ID (rank N) — Title for the record it placed, then a re-ranked line for each record it moved. The skill names every flag, and the kit’s tests hold it to the script.

The notice

A transition that changes a record’s state, or parks, unparks, blocks or unblocks it, prints under that record’s changed line the records that refer to it by any link — references, answered_by, serves, consumed_by or an item of blocked_by.on — each on a line of its own with its state: task-0002 (open) — Write up the table, under refers to it, may need a follow-up:; the parts of the project’s documents whose labels name the record follow, each as papers/alpha.md:42 (a document's part). Under --json it is the list notices, [{"id": "question-0003", "refers": [{"id": "task-0002", "state": "open"}]}], empty where there is none, with a key parts, [{"path", "line"}], where a part names the record. A removed record is left out, and so is one the same command minted or changed; a closed one is listed, since a finding removed as false reaches closed work. A mint changes no state and prints none for the record it mints; a finding’s evidence replaced or retired prints none. A finding’s mint prints a note of its own, one line a question after the mint’s own lines, where a task or a finding it names with --ref itself references an open question, a parked one included, that the new finding neither references nor answers: note: task-0002 references question-0003 (the title), which this finding does not: flow ref finding-0009 +question-0003 if it bears on it; one hop and no walk, no record changed, under --json the list notes, [{"ref", "question", "title"}]. The link consumed_by is read only where a card ended badly or came back, so an idea is named for a card it produced only when a question is closed wrong, removed or reopened, a task aborted or removed, or a finding removed; a question answered or impossible, a task done, a park, an unpark, a block, an unblock, a draw and a return name no idea, and flow consume IDEA prints no notice. It is printed by the command that makes the change and nowhere else: flow state --check, flow touched and flow check repeat none of it, and flow show ID lists what refers to a record for whoever looks again. It refuses nothing, fails nothing, warns of nothing afterwards and asks for no reference to be removed: what to do with an open task whose question closed, or with the work that rested on a finding removed as false, is the session’s to decide by hand.

The files it keeps

The records live under the directory flow.toml binds (records/ by default), one subdirectory per kind and an archive for the closed tasks; Flow cards specifies them. Three files stand beside them.

INDEX.md is written by flow index, and refreshed by every transition, never by hand; flow check fails when it differs from a fresh render. Its sections, in order: the counts by kind and state, a finding’s by the forms its evidence carries; Due, where an open task has a due date, soonest first; Next (ranked), each item by its title, a question with what it serves, a waits: line for each parking or block it carries and, on a held card, held by its holder; Hand, one subsection per owner with the cards held, each with its kind or its tags, its drawn date and its references, then the owner’s deck, the cards that are theirs and in no hand, each with what it waits on; Goals, where a goal is open, each by its title with the open questions serving it; Directions, the open ones with their dates and the open questions serving each; Ready, the open tasks in no hand by size, with their tags, their references, their deck where it is an owner’s and their waits; Open questions, those neither parked nor blocked, by their checked date; Parked or blocked questions; Tasks all closed, not read since, the open questions the check’s warning names, by the same rule; Recent findings, each with its forms; Settled, do not re-open, the wrong and impossible questions and those tagged do-not-reopen; and Heap, the open ideas in the common deck, the oldest listed, each closing its bracket with fresh where it produced nothing or produced N for the cards its consumed_by lists, and its count line saying how many of them are fresh. A removed record, a finding among them, is in no list and no count; flow find --state removed lists it, and flow find --id ID opens it. The index never reads the day, so it is the same render until a record changes: a block’s item that is a record settled is left out of its wait, and a question none of whose items is left stands under Open questions, while a date and words are listed as written; flow state names a due date or a block’s date that has passed, flow check warns of a due date, and draw and flow find --blocked read the day.

INBOX.md at the project root, or the file [paths] inbox names, is where the person leaves items between sessions and a freeze leaves one directive for the next; flow init writes it as a title and a comment. No check reads it: the next session’s /research:whatsnext proposes what to make of each item and removes the ones it acted on.

The log is bound by [paths] log and is not a record: its entries are level-2 headings ## YYYY-MM-DD — headline, newest first, each opening with a State paragraph labelled **State.** or **State (…).**, written by flow log add FILE and archived by month by flow log archive; an entry says in one sentence what the session’s own approach to a card was, formed before it read what earlier work left, and which approach it took; the flow skill says the rest.

Directions are records, not a file: flow directions renders the open ones as the owner’s list, - **Name** (date, id) — the words, from their titles and bodies; a question’s serves names one by its id.

flow state prints, first, one line of the project’s parameters read from flow.toml, flow.toml: title ≤ 100 characters, summary ≤ 500; values low, medium, high; evidence forms formal, statistical, …; hands agent 2, human 0 (0 = no limit) (under --json the key parameters, {"title_max", "summary_max", "values", "forms", "hand"}; not on the pages after the first, nor under --check), then, every line with its file and line, the inbox, the index’s Due (within [index] due_within days where that is bound, with a line counting the later ones the index lists), Goals, Directions (the open ones, one line each with its id and title, and none of the questions serving each, the ranked list carrying each question’s serves; a section absent where there are none) and Next (ranked) sections, then each owner’s hand in full with its cards’ drawn dates and ages, each owner’s deck with every card’s standing and the common deck as a count, its ranked cards being on the list above (computed from the records, since the index never reads the day), a line for each due date that has passed and each date a block waits on that has, naming what a block on several still waits on where it holds on the rest, and the log’s top entry; the index is what a session reads next. flow artifacts lists every repository path the records refer to — a probe, a result, a document, by an evidence item, a body link or a source that is a path of the tree — with the records naming each and MISSING where it is not in the tree: the artifacts index, generated from the records as INDEX.md is, with no register to keep consistent. flow artifacts --uncited PATH lists, for one Markdown document of the tree, the places in it that no finding’s evidence anchors to: each heading (by its anchor), each numbered statement (one of [evidence] statement_words then a number opening a line, after optional ** or # marks) and each table row whose first cell matches [evidence] row_id. A place is cited by an evidence item of a standing finding, of a form the flow resolves itself (stated, statistical or reference), whose target is PATH#anchor and resolves to that place; a heading is cited too when a place in its section, up to the next heading of the same or a higher level, is cited, and a heading that opens a numbered statement is one place, of kind statement. It prints one line a place not cited, PATH:LINE: heading|statement|row — its text, cut at 100 characters, in the file’s order, then N place(s) of PATH no finding cites; M cited; K finding(s) cite the file with no anchor, a finding citing PATH with no anchor citing no place. It is a view and exits 0; a path that is not a Markdown file of the tree is refused; --json carries path, uncited (each {"line", "kind", "anchor", "text"}), cited and unanchored, the findings citing the file with no anchor. A landing mints a finding for each result of the artifact that another record could need, not the headline alone, and says in the task’s resolution which results it left without one; this view lists what no finding cites. A place whose line is a part of a document [documents] globs names, labelled with a live record (a standing finding, an open question), counts as cited, and flow artifacts lists such a document with the records its labels name, "via": "label".

Documents compiled from findings

A document of the project states results the records already hold as findings, and never the reverse: a result is minted as a finding, with its evidence, before a document states it. A part of a document says which record it states by a label, an HTML comment in the document’s source that no output renders, holding exactly one record id, a finding’s or a question’s: <!-- finding-0090 -->, the id as the project’s flow.toml shapes ids; any other comment is no label. A label stands outside a code fence and the front matter, alone on a line directly under the line it labels, with no blank line between, the form for a numbered statement under its heading line, or closing a line, after its text, the form for a list item or a table row. The part a label names is that one line. One label names one record and a part that states several findings names their composite; several parts, in one document or in several, may name the same record. The kit stores nothing in the finding and gives a part no id of its own: where a record is stated is calculated from the documents. The level of proof is the project’s [evidence] forms, the same for every finding, and a document sets none of its own.

The binding is the table [documents] of flow.toml, written commented by flow init: globs names the documents read, must the regular expressions a line is a part that must name a finding by, searched on each line of the scanned documents outside code fences, strict whether flow check fails such a part with no label. With globs unset or empty nothing is read and flow check and flow parts say nothing of documents. A must pattern that is no regular expression, a glob that is absolute or climbs out of the tree, a value of the wrong type and another key are refused when flow.toml is read, naming them. flow check reports the codes D1 to D5 of the table below, each naming the document, the line and the record where there is one, and its coverage line says how many documents it read.

flow parts [PATH…] lists the labelled parts of the scanned documents, or of the given ones, each of which must be one of the globs’ files: one line a part, PATH:LINE: ID (title) — the part's line, cut at 100 characters, in the file’s order; then each part that must name a finding and has no label, PATH:LINE: no label — the line; then the failures; then one line a document, PATH: N of M held part(s) labelled, K other part(s) naming a record, and parts: N labelled naming a finding, Q naming an open question, U held part(s) with no label, F failure(s). Its last line says what it does not look at: whether a part’s text is its record’s claim, and whether unlabelled text states a result. --missing prints the parts with no label alone; --strict exits 1 where there is one, whatever strict says in flow.toml, and without it the exit is 1 for a D1 to D4 problem alone. With no globs it prints no documents bound: [documents] globs in flow.toml and exits 0. --json carries documents (each {"path", "held", "labelled", "other"}), parts (each {"path", "line", "id", "text", "must"}), missing (each {"path", "line", "text"}) and problems.

Where a record is stated is read back from the labels: flow show ID prints a block stated in: after the links, one line a part, PATH:LINE — the part's line, and under --json the key stated_in; flow find --refers PATH lists the records a label in the document names beside those naming the path; flow artifacts and flow artifacts --uncited PATH count the labels as above; and the notice of a state change lists the parts naming the record, PATH:LINE (a document's part), beside the records that refer to it.

flow.toml

flow init --log WORKLOG.md writes the bindings file at the project root, with the bindings filled in and the optional ones commented; [card] holds the two limits of a card’s title and summary, in characters, and the levels of a card’s value, in rising order; it is the schema, with every binding explained where it stands, and the kit’s tests hold this page to what init writes. It writes two hands: agent, the agent’s across its sessions, with a limit of four, and owner, the person’s, with none (0 is unlimited); --owner names others. It writes the five evidence forms the kit ships in [evidence] forms; the project keeps the ones it accepts and adds its own words, and an item of a form not listed is refused. The project’s instructions name the log, the registry, the gates that cover the records, the archive rule and what each evidence form means for the project; the skill names no project path itself. It writes [kit] release, the release the setup last brought the project to, at the running plugin’s version, and --force keeps the one the file holds; the setup’s verify step moves it, on the person’s word, once every step up to the installed release is taken, and the page shows it as vX.Y.Z. A value that is no vN.N.N is refused when flow.toml is read.

# flow.toml — the flow's bindings for THIS project.  Every path is relative to this file's
# directory.  The `flow` skill reads it; the project's own instructions name the log, the
# gates and the rest.

[paths]
records = "records"                 # one file per record: ideas/ tasks/ questions/ findings/ goals/ directions/ archive/
index = "records/INDEX.md"          # generated by `flow index`; `flow check` fails on drift
archive = "records/archive"         # closed tasks move here at their closing transition
inbox = "INBOX.md"                 # the person's inbox: dropped between sessions, read at the next one's start
log = "WORKLOG.md"                 # the dated log whose top entry `flow state` prints
log_archive = "WORKLOG-archive"   # `flow log archive` moves the old entries here verbatim, one file per month
# reflow_module = "scripts/reflow.py"   # exports reflow_text(text): one sentence per line; built-in otherwise
# markdownlint_config = ".markdownlint.jsonc"  # a NEW violation after a write reverts it

[prefixes]
idea = "idea"
question = "question"
task = "task"
finding = "finding"
goal = "goal"
direction = "direction"
id_width = 4

[hand]
# The cards an owner's hand may hold at once, ideas, questions and tasks alike, 0 = unlimited: two hands,
# the agent's (across sessions; a subagent works on it) and the person's.  `common` names the common deck, no hand's name.
agent = 4
owner = 0

[card]
title_max = 100     # the longest a card's title may be, in characters: it says what the card is; a mint or a set over it is refused
summary_max = 500   # the longest a card's summary may be: one paragraph that explains it; a mint or a set over it is refused
values = ["low", "medium", "high"]   # the levels of an idea's, a question's and a task's value, in rising order; a word outside is refused

[question]
sizes = ["small", "medium", "large"]

[evidence]
# The forms a finding's evidence takes, each item `form:target`, the finding's trust the forms it carries.
# The kit ships five: formal (a declaration of the prover's library, machine-checked), statistical (a probe of the
# register, or a committed result by its path), peer-reviewed (a card of the library), stated (a row, a
# statement or a heading of a document of the project: its own word, the trust to raise) and reference (any
# other source, a link).  Keep the ones the project accepts and add its own words; the instructions say what
# each means here.
forms = ["formal", "statistical", "peer-reviewed", "stated", "reference"]
# What a document's anchor names beside a heading (`doc.md#its-anchor`): a numbered statement, one of these
# words then its number (`doc.md#Theorem 2.1`, `doc.md#§4.2`), and a table row, whose first cell matches
# row_id (`doc.md#FV-1`).  Unset, the words and the id shown.
# statement_words = ["Theorem", "Proposition", "Lemma", "Corollary", "Definition", "Remark", "Fact", "Conjecture", "Example"]
# row_id = "[A-Z]{2,3}-[A-Za-z0-9]+"
# A probes register: a Markdown table whose first column names each self-asserting script.
# probes = "probes/README.md"
# A form whose targets another tool owns is asked of that tool: one request on its standard input holds every item
# of the form, one answer on its standard output says each resolves or why not (the flow's page names the
# protocol).  Unset, `formal` is asked of the formal plugin installed beside the research one, else `formal` on PATH,
# either only where a formal.toml stands at the root; `formal = []` asks none.  Another prover's, or a form of the
# project's own, binds the whole command here, run at the project root.
# [evidence.resolvers]
# formal = ["formal", "resolve", "--protocol"]

[library]
# The reference library, when the project has one: the command that answers `keys`.  Unset, the
# flow asks the library skill installed beside the flow skill, else `library` on PATH, either only
# where a library.toml stands at the root; `command = []` asks none.
# command = ["library"]

[documents]
# The documents compiled from the records: a part of one names the finding it states, or an open question,
# by a label in its source, `<!-- finding-0012 -->`, alone on the line under the part or closing its line.
# globs = ["papers/*.md"]     # the documents read, from the project root; unset, none, and the labels are not checked
# must = ['^\*\*(Theorem|Proposition|Lemma|Corollary) \d+(\.\d+)*']   # regular expressions: a line one of them
#                                                                    # matches is a part that must name a finding
# strict = false              # true: `flow check` fails a `must` part with no label; false, `flow parts` reports it

[index]
recent_findings = 10
oldest_ideas = 5
# due_within = 14   # `flow state` lists the tasks due within this many days, and every passed date; unset, all

[kit]
# The research-kit release the setup last brought this project to: written by `flow init`, moved by the
# setup's verify step (`/research:research-init`) once every step up to the installed release is taken.  A flow
# script older than it refuses to write, the project having been brought further on another machine.
release = "vX.Y.Z"

Evidence resolvers

An evidence item is form:target. The flow resolves what it owns: a path of the tree, a document’s anchor, a URL’s shape, a probe of the register, a card of the library. A form whose targets another tool owns is asked of that tool, as the library is asked keys and never read: formal evidence is asked of the formal plugin, and the flow reads no manifest. It runs the form’s resolver once with every item of that form on the standard input, one JSON object, and reads back one on the standard output:

{"protocol": 1, "form": "formal", "items": ["Lib/Foo.lean#lemma_L", "Lib/Foo.lean"]}
{"protocol": 1, "items": {"Lib/Foo.lean#lemma_L": {"ok": true}, "Lib/Foo.lean": {"ok": false, "why": "module Lib.Foo is not in the manifest"}}}

Each item is the target as written after form:, and the answer holds one key of items for each target asked: {"ok": true}, {"ok": false, "why": "…"} or {"unchecked": "…"}, with exit 0 whenever the resolver answered, whatever the items say. An answer in another protocol than the flow’s own (the number RESOLVER_PROTOCOL, both scripts carrying it) leaves every item unchecked, with that reason, and is no problem. A resolver that does not answer (a nonzero exit, the limit of 60 seconds passed, no JSON object, a target asked and not answered) leaves its items unchecked at a mint, as the library does, and flow check reports one problem, V6 with no record, the resolver for formal did not answer: ….

The formal resolver is found in this order, the last two only where a formal.toml stands at the root:

  1. the binding [evidence.resolvers] formal = […], the whole command as a list of strings (one string is one word), run as written at the project root; formal = [] asks none;
  2. the formal plugin installed beside the research one, its skills/land/scripts/formal.py run as formal resolve --protocol: next to the research plugin’s directory in a checkout, in the directory of the same version beside it in Claude Code’s cache, or in the land skill’s directory beside the flow skill where the skills were installed flat;
  3. formal on PATH, where the package installs it beside flow, which is the hooks’ environment.

With none found, formal evidence is reported unchecked, as peer-reviewed is with no library, and the coverage line says which route answered or why none did. Another prover, or a form of the project’s own, binds a command that speaks the protocol under its form’s word, any form but statistical, peer-reviewed, stated and reference, which the flow resolves itself. The targets of a bound form are the resolver’s, so the flow reads no path out of them (flow artifacts and flow find --refers name none) and holds the item to form:target and [evidence] forms alone.

The release a project was brought to

[kit] release is a committed fact of the project, so a script on any machine reads the same answer. The flow’s script reads its own release from the SKILL.md beside it, or from the package the remote hooks install; a copy of the script alone has none and refuses nothing on the marker. Where the marker is newer than the script, the project was migrated on another machine or checkout and this plugin, or this hook’s pinned tag, is behind: every write (a transition, flow init --force, flow doctor --fix, flow log add, flow index) is refused and flow check reports the mismatch as a problem (exit 1), each naming both releases and the commands that move the plugin, claude plugin marketplace update research-kit, claude plugin update research@research-kit --scope project and a restart, or prek autoupdate for remote hooks; the reads answer, with a warning on the standard error first. The hooks’ rev is committed, so a checkout gets the tag the migrating commit moved it to. Where the marker is older than the script, nothing refuses: flow state prints one line first, the setup was last brought to vX; this is vY: run /research:research-init, and flow check says nothing. A flow.toml without the line, written before v0.7.0, is a thing for flow doctor’s hand, never mechanical, since the machine does not know which release the project stood at.

The check

Every check exits 0 when clean, 1 when it found problems, each printed with its place, and 2 when it could not run: no bindings file at the root, or one that does not parse. The 2 is its own code so that a hook or a CI job never reads “did not run” as “clean”. flow check --staged outside a git repository is refused with exit 2 as well, and flow reflow --check given a path that is not there; flow state --check exits 1 when a part fails, else 2 when a part could not be decided, else 0; flow doctor exits 1 when it names anything. Each check ends with coverage lines saying what it looked at and what it did not — which route answered for each form asked of a resolver, whether the library answered — so a green says what it did not look at; on a failure, flow check adds a line naming the command that reproduces it, for a session where no skill is loaded. flow.py --selftest plants one defect per code and fails when a code it can report is planted nowhere, and the kit’s tests hold the table below to the script.

flow check

flow check --staged is the same check on what a commit will hold, the git index. It makes a temporary checkout of the index (git checkout-index -a into a directory of its own, from the repository’s top level), runs the check with the project’s counterpart in it as the root, prints what the check prints with the paths shown as the project’s own, exits with the check’s code, and removes the directory however it ends; without the flag the check reads the working tree exactly as before. A tracked path is read from the index only, and a path git ignores, a kept copy or a build’s output an evidence line names, is read from the working tree, since the index holds none; a file that is neither tracked nor ignored is no part of the commit and is not found. The hooks’ entry is flow check --staged, because the runner sets aside the unstaged changes to tracked files and leaves the untracked ones, so a plain check in a hook reads a tree that never existed: a card minted and ranked first but not yet added, or a closed task’s file moved to the archive and not staged, failed a commit of something else. A commit that stages some of a transition’s files and not the rest fails, as the commit would be inconsistent. library check --staged is the library’s, on The library.

Code What it says
V0 a record file cannot be read: no front matter, a value outside the subset the tool writes, a byte that is not UTF-8, or an id another file carries; a file named for a record that reads at another path is named a stray beside that record; the check reads the rest of the tree without it
V1 the record’s type is not one of the six, it has no id, or its id does not match its filename or its type’s prefix
V2 references or consumed_by names an id that does not exist, answered_by names a record that is not a finding, or serves one that is not a goal or a direction, or is one value instead of a list
V3 a field is missing or unknown, a field of an older model among them (flow doctor says what it reads now), or a state (a task’s ready or active among them), a size, a value, an owner, an origin or a rank is not a legal value
V6 a finding has no evidence, an evidence item has no form or a form [evidence] forms does not list, does not resolve by its form’s shape (a document’s anchor among them: a row, a numbered statement or a heading; a path outside the tree, absolute or climbing above the root by .., never resolves), appears twice, or is of a form a resolver answers for and the resolver did not answer (once, with no record named: the resolver for formal did not answer: …)
V9 a held card (drawn set) has no owner or no started date, or carries a parking or a block, whether or not the block holds; a closed card carries an owner or a drawn date; or an owner holds more cards than its hand limit, the three kinds counting alike
V11 the index is missing or stale — run flow index; or in another version’s form, its records unchanged — run flow index once after an upgrade
V12 an open question has no last-checked date
V14 a rank on a closed record (an idea included), two records at one rank, or ranks that are not 1..n
V15 a parking or a block not on an open question or an open task, or without its date and reason, or a block without what it waits on, or with it as one value instead of a list
V17 a removed, aborted or wrong record, a removed finding, a reached or given-up goal or a closed direction has no dated reason in closed, or a record of another state carries one, a done task alone excepted: it carries closed with its date and no reason, and a done task without the date fails with a message naming flow doctor; an idea’s consumed_by is a single id instead of a list, names a record that does not name the idea in references, or lacks a record that does, whatever the idea’s state; or a consumed idea lists no card
V18 an answered or impossible question does not name in answered_by the one finding that settles it (it names a task or a record that is not a finding, or none, which only a legacy question may), answered_by is a list instead of one value, or a question of another state carries one
V19 a body is not one sentence per line
V20 a date — created, checked, drawn, started, or that of a parked, blocked_by or closed — is not an ISO date or is in the future, or a task’s due is not an ISO date (it may lie ahead)
V21 a record is not in its type’s directory (a finding under a shard directory of an older model among them), a closed task is not in the archive, or an open one is
V23 a record cites a library key the library does not hold, or an extract its card does not carry; or the library did not answer
V24 a live record’s body links a repository path that is not in the tree, or one outside it, absolute or climbing above the root by .. (a Markdown link’s target, root-relative; a URL, a bare anchor and a path in backticks are prose)
D1 a label in a document [documents] globs names, <!-- ID -->, names no record of the project, a removed record, or a record that is neither a finding nor a question
D2 a label names a finding that is not standing, or a question that is not open
D3 a label is misplaced: alone on its line with a blank line above it, under another label alone on its line, or with nothing above it; or a part carries two labels
D4 a part that matches a [documents] must pattern carries a label that names a question and not a finding
D5 a part that matches a [documents] must pattern carries no label, reported only where [documents] strict is true

The codes are names, not a sequence: V4, V5, V7, V8, V10, V13, V16 and V22 are unassigned; the D codes are the documents’, each problem naming the document and the line (line N: opens its message) and the record where there is one. No link has a cycle rule, an open task may reference a closed question, a question may serve a closed goal or direction, and a removed finding’s evidence is not resolved: the notice names who refers to a record whose state changes, and the rest is the session’s. Warnings do not fail the check: an open question, not parked and not held, whose tasks, those that reference it and those it references, are all closed and which was not read since, its checked being absent or earlier than the day the latest of those tasks closed (a read on that day counts as a read; a task closes on its closed date, which every closed task carries), and the warning says to answer it, mint a task, park it, or run flow checked ID; a question worked as it stands, which is held, is not named; a task whose due date has passed; a closed or removed record whose body links a path that is gone; and evidence reported unchecked because no resolver, register or library is found for its form, because a resolver answered in a protocol the flow does not read, or because its form is the project’s own and its target no path.

A declaration resolves when it exists in the manifests, whatever its row’s kind, a private declaration’s included: the flow’s claim is existence, and the formal plugin’s resolver answers it. Whether a document may cite it is another claim, the formal plugin’s gates’ at the document row and the citation, and a finding resting on a private declaration is one no document row can cite.

flow state --check

flow state --check checks what a machine can see of a freeze, and prints one line per failure, each with its file:

  • the log’s top entry is not dated today, and the tree has changed since the commit of the newest committed entry, another’s commit on a shared repository included;
  • a record changed since that commit, and no entry from the top down to that one names its id.

An entry names an id by writing it out, or by a range of the same prefix and digit width, finding-0015…0035 (an en dash or three dots for the ellipsis, written with no spaces around it), which names every id of that prefix from 0015 to 0035; a range whose second number is smaller than the first, such as finding-0035…0015, names only the first id, which is written out. A record whose only change since that commit is its rank — the front matter’s other fields and their order, and the body, as the commit has them — is not a change the entry must name: one flow rank T 7 --insert renumbers every ranked record below the one inserted, and the session did not work on those. A question flow rank --set only moved is re-ranked only too: the command writes an order and refreshes no checked date; flow rank ID N, a judgment about that one record, refreshes it, and flow checked ID … records a read, so a question the session reviewed is named. flow touched leaves such a record out of its list and out of --ids, prints it on one line at the end (re-ranked only: id, id, …), and under --json lists the ids as reranked_only.

It prints each hand’s held cards first, as lines for the State paragraph, each with its drawn date and its age in days, and fails on none, since each hand continues its own work; an inbox holding items fails nothing either, since the next session reads it. Before its last line it prints, as a checklist, the steps that are the session’s own and that it cannot see: the conversation’s inventory item by item, the sweep by meaning over the documents the session’s records touch, the agent’s memory checked, and the gates by exit code; the freeze’s report answers each, and under --json they are the list session_steps. Its last line says what it checked; a part it could not decide — no log bound, no git, no committed entry — is named on a line of its own and is not counted as passed: with no failure, the check exits 2. Under --json each failure is a problem of code STATE, and the hands are a list of their own.

flow doctor

flow doctor prints one line per thing an older model wrote, with what it reads now. Of v0.9’s model: a record’s summary, which was its title, with no title (the field renamed title, its words unchanged, and summary: null added, the explanation the project writes by hand) and an idea, a question or a task with no value (value: null added, the level the agent judges at its next whatsnext). Of any model: an idea with consumed_by: null ([] written, the empty form of a list field), the class consumed-null. Of v0.11.5’s model: a done task with no closed day, archived or not (closed: {date: DAY} written, DAY the date of the task’s first resolution: note in the form flow make writes; a done task with no such note is a line for the hand, which says to set the day from the file’s history). Of v0.8.0’s model: a task’s state ready or active (now open; the standing is calculated), an active task’s and a drawn idea’s started (their drawn date, the day the present hold began; both stay held in their owner’s hand), a closed task’s drawn (moved to started, drawn cleared) and the fields a card lacks: started on an idea, a question and a task, owner and drawn on a question, rank on an idea, each null; a ready task had no owner and is in the common deck, and a started a record cannot show stays null. Of v0.7.0’s model: derived_from (now references), a question’s parent, a task’s requires and a finding’s depends_on (each value added to references where it is not there, the field dropped), a question’s direction (added to serves, which becomes a list), blocked (now blocked_by; an item of words holding a date stays words, and flow doctor and flow doctor --fix print a line for each such record, with or without --all, saying a date waited on is an item written alone), a question’s or a goal’s criterion, a task’s dod, a goal’s horizon, why_now and first_move (the words appended to the body as a dated line, DATE — criterion (moved from the field): …, in that order, a null or an empty one dropped with no line), a question’s kind (the tag conjecture where it was that), a task’s rider (the tag rider where it was true), a finding with no state (standing) or closed (null), and an idea’s consumed_by lacking the records that name it in references (read from the references as the fix leaves them, so the older fields folded in are counted, and the missing ones appended in the ids’ order). Of the models before it: a record’s abandoned field (now closed) or state (now removed, or aborted for a task that was drawn), decomposed (now open), kill (the body’s words, as criterion), a task or several findings in a question’s answered_by, answered_by written as a list (now one value), consumed_by written as one id (now a list), a task’s or a finding’s question field (it goes, and the question is added to references where it is not there, unless the question names that finding as its answer), a task’s kind (a tag now), a finding’s status (it goes, the forms of its evidence standing for it; a refuted one gains the tag refuted) and paper (it goes; the document is a reference flow find --refers PATH groups by), an evidence item with no form (the prefix read off its shape: formal: for a declaration, statistical: for a probe, stated: for a statement or row), a statistical or reference item whose document anchor is no row, numbered statement or heading’s anchor (checked as a stated item’s is since v0.5.0; the line names the nearest heading, and the hand rewrites the item), a finding under a shard directory (one findings/ directory now), a question’s direction holding a bold name (the id of a direction record, named in serves), a task of the decision kind or tag that is neither parked nor in an owner’s deck, an owner or a drawn date on a ready task, an owner [hand] does not list on a task or an idea, a field the record lacks; the directions file and [paths] directions (directions are records, flow direction NAME --body FILE for each bullet, which it lists), the [task] section’s kinds, default_kind, decision_kinds, decision_owners and question_optional_kinds, the [finding] section, a missing [evidence] forms, the three manifest bindings [evidence] manifest, manifest_roots and manifest_extension (the manifests are formal.toml’s alone, and the lines are deleted by hand), a third hand, the directions file’s ## Inbox section, a missing inbox, and a missing [kit] release. The lines are of two classes: the mechanical ones, whose line states the exact edit (a field the record lacks, a word renamed, a state read into this model’s, a link folded into references or serves, an idea’s consumed_by given the records that name it, a field’s words moved to the body, a kind or a rider made a tag, a finding given its state, status and paper deleted, an evidence item prefixed by its shape, a finding moved out of a shard, a closed task moved into the archive, a done task given its closed day, answered_by and consumed_by between a list and one value, an idea’s consumed_by: null written [], a direction’s name rewritten to its record’s id once that record exists, an owner cleared on a ready or a closed record, a task’s state read as open, a started written from drawn, a summary that was a title renamed title, the inbox created), and the judgment ones (a task or several findings in answered_by, an entry of an idea’s consumed_by whose record does not name the idea, to be removed or the idea named in that record with flow ref, a decision task (passed to the person’s deck with flow pass, or removed), the directions file’s bullets, a third hand, an owner on a held record, the bindings, [kit] release among them). After them it prints the notes, which never fail: each key flow init writes now, set or commented, that the project’s flow.toml has neither set nor commented, as an earlier init wrote it — [paths] log_archive, [evidence] statement_words and [evidence] row_id for a file of v0.5.0 — with the default the template carries and the command that reads it; under --json they are the list notes, and the setup probe relays their count. Two notes follow them, each one line with a count, that never fail either, --all listing the records under each and --json carrying them as the list card_notes: the live records, open or a standing finding, whose title is over [card] title_max, and the live ideas, questions, tasks and findings with no summary; both read a record of the older model as --fix leaves it, and the project writes the shorter titles and the missing summaries by hand. flow doctor prints the judgment lines one per record and the mechanical classes as one line each with a count (--all lists each edit); flow doctor --fix writes every mechanical edit in place — each record’s edits together, its front matter re-ordered to the schema, no lint, and the reflow only on a body a field’s words were appended to — refreshes the index, and prints one line, the count of mechanical edits written and of records changed, then what it fixed by class and what is left to the hand; where it wrote an edit it also adds one dated entry at the top of the log, naming each class and the records it was written on, the ids in ranges where they run, so that flow state --check and flow touched --unnamed read those records as named, and where it wrote nothing it adds none; it exits 1 while anything is left, 0 otherwise, and a second run after the hand’s part settles what the first could not (a direction’s name, once its record exists). No migration logic exists for the judgment classes: each is settled by hand from its line, then flow check runs; the one hand-write of a field a command owns is a migrated question’s answered_by, once its finding is minted. Nothing refuses on a tree not yet fixed: after an upgrade flow doctor --fix runs first, then the hand’s part and flow check, and only then any mint; flow state prints its line where [kit] release is behind, and flow check fails V3 on each field of an older model until then. Under --json the judgment lines are problems of code DOCTOR, the mechanical ones mechanical with their class, the counts summary, and what --fix wrote fixed (the counts by class) and written (edits, records and classes), log the log’s path where an entry was added.

flow reflow

flow reflow --check PATH… prints each line, as file and line, that the reflow would change, and under it the lines it would become. The generated index, the file flow.toml binds as the index, is not prose under the one-sentence rule, since a row of it holds a block’s reason on one line: --check and --write leave it out where it is among the targets, a directory’s among them, and say so in one line, and named alone it is refused with that reason, exit 2. flow reflow --write TARGET… rewrites each target, a file’s path or a record’s id, one sentence per line by that reflow, leaving a record’s front matter as it is, and prints each file it changed. Markdownlint runs after the rewrite as on any write: a file that fails is put back as it was and refused with the lint’s line, the command exits 1, and the other targets of the run stay rewritten. flow reflow --as DEST DRAFT prints each line of the draft that the reflow would change and each markdownlint violation the draft adds appended to DEST, never one DEST had already. DEST is a file or a record’s id of the project: one outside the project, or in a directory that cannot be written, is refused with a message, exit 2. A DEST that names a minted record is linted as appended to that record, and one named for a record not minted yet as a body under its front matter; any other file that is not there stands for the draft alone, linted with MD041 off, since a record’s title: front matter, which serves as its heading, is not in the draft. Under --json they are problems of code REFLOW and MARKDOWNLINT; the last line says which reflow ran and whether markdownlint did. The built-in reflow leaves a sentence unsplit after the common scholarly abbreviations (cf., e.g., i.e., et al., Prop., Thm., Fig. and their like) but splits after a single capital, as in Theorem A. Then it holds., and a project whose prose carries others, such as a journal’s Amer. and Math., binds its own reflow module, which is the escape.

The hook that asks for the skill

The skill’s text is where the closing forms, the order of a transition and the commands’ flags are in one place, and a session that never loads it learns them by being refused. Claude Code has no way for a skill to name a skill it needs, so the research plugin ships a hook, hooks/hooks.json over hooks/flow_skill.py, one Python file on the standard library, that asks for it:

  • A Skill call that loads research:flow (or flow), and a typed /research:flow, write a marker file under the plugin’s data directory, ${CLAUDE_PLUGIN_DATA}, named from the session’s id and, in a subagent, the agent’s id as well.
  • A Bash call that runs the flow script (python3 PATH/flow.py …, with an environment assignment, uv run, timeout or an interpreter’s option before it, the script run by its own name, a bash -c over one, or the flow console script) in a project whose flow.toml stands at or above the working directory, and that finds no marker, is denied once, with the reason “load the flow skill (research:flow), then run this again”, and the refusal is recorded.
  • The session’s, or the subagent’s, next flow command passes, loaded or not, so one refusal at most and a command taken for a flow command by mistake locks nobody out. A reading is refused as a transition is, the hook not telling one from the other. A command that only names the script, in quotes (a commit message of several lines among them), in a comment or in a here-document, is not a flow command. Anything the hook cannot read, a missing data directory included, passes it with no output, and a pass prints nothing; markers older than a few days are removed when a new one is written.

It is Claude Code’s alone: another agent that installs the plugin runs no hook, and loses nothing but the reminder. The whatsnext and freeze skills still open by loading flow where it is not loaded.

Words

  • record — one Markdown file with YAML front matter and a prose body, of one of six kinds; the records, not the chat, are the memory between sessions.
  • idea — a thought worth keeping that is not yet a question: nothing says what would answer it, no route; one thing, not a basket, its size its independence and not its length; drawn into a hand and worked, it produces cards, goals and directions among them, that reference it and are listed in its consumed_by, until it is consumed, fully processed, or removed.
  • task — work that is big or must outlive the turn, which one owner finishes within its size, its body saying what done means; it references what it is connected to — a question, an idea, another task — or stands alone, and stands across the main axis, its closing never a question’s; a task serves a goal only through the question it references; its tags say what it is, research and upkeep the usual ones, rider one riding the next hand-over; it may carry a due date and a post-done instruction; closed — done, aborted or removed — it moves to the archive.
  • question — what the project has to answer to move the research, its body saying what counts as an answer; a conjecture is one tagged conjecture; it may serve goals and directions; it closes answered, wrong, impossible or removed, and is reopened by flow reopen.
  • finding — a checkable claim whose evidence a machine resolves where its form allows, each item form:target; the forms it carries are its trust, evidence is added, and an item whose file is gone is replaced or retired with a dated note in the body; it stands until it is found false and removed.
  • title — a record’s field that says what the card is, in a line of at most [card] title_max characters, never empty; it is what a list, the index and a refusal print for the record, and what a link names it by.
  • summary — a record’s field that explains the card, one paragraph of at most [card] summary_max characters, or null: what the record states, asks or does, in which setting, and what it is for; an idea, a question, a task and a finding are minted with one, a goal and a direction may have none.
  • value — a card’s field, an idea’s, a question’s or a task’s, that says how much the card is worth to the project: one of [card] values in rising order, or null while nobody has judged it; the agent judges it at the mint and changes it when the person says so or the work shows otherwise, and it moves no rank by itself.
  • goal — a destination the owner commits to, its title the outcome and its body what reached means and how far out it lies, formed by the owner alone, served by questions, reached or given up; it implies its own direction.
  • direction — the way the research moves, the owner’s dated statement of what interests them, a record its name the title and the words the body; a lean on the next moves, never a gate and never an order; it may produce goals along the way, and is dropped by the owner.
  • references — the general link, on every kind: a list of the records a record came from, rests on or is about, in any state, a removed one included; it obliges nothing, and flow ref changes it.
  • answered_by, blocked_by, serves, consumed_by — the four links with a rule: the finding that settles a question; what a question or a task waits on; the goals and directions a question serves; the cards that name an idea in references, written with the reference.
  • mint — the one way a record comes to be, one per kind, each the kind’s name: idea, question, task, finding, goal, direction.
  • transition — a command that writes the records: the mints, draw, return, pass, make, abort, answer, impossible, wrong, reopen, remove, consume, evidence, reach, giveup, drop, park, unpark, block, unblock, rank, checked, set, ref, serves, tag, note; every field of the front matter is written by its command, and tags alone also by hand.
  • draw, refill, return, pass, make, abort — a ready card is drawn into an owner’s hand, from the common deck or the owner’s own, or with --refill a hand is filled by rank from the top of the list to its limit; a held card is returned into its owner’s deck, or passed, held or not, into another deck with a note; a task is made (done, with its resolution) held or not, and a started task aborted (with its dated reason), held or not.
  • answered, wrong, impossible — a question settled by the one finding that answers it; shown stated incorrectly, with a reason; shown unanswerable by a finding; wrong and impossible ones are listed under “Settled, do not re-open”.
  • reopen — a closed question back to open, its answer and its closing cleared, a dated note keeping what it was; refused on a question tagged do-not-reopen.
  • remove — an open idea, an open question, an open task never started or a standing finding dropped with a dated reason in closed; its card is kept, opened by its id, and in no list or count of the index.
  • the notice — the line a transition prints under a record whose state it changed, or that it parked, unparked, blocked or unblocked, naming the records that refer to it; it refuses nothing.
  • park, block — an open question or an open task set aside by decision, with a date, a reason and revival triggers where known, or waiting on a task, a question, a date written alone or words; both may hold at once, the rank stays, and the lists mark the wait; never for lacking a route.
  • blocked — calculated, never marked: a record is blocked while an item of its block holds, a record until it is settled, a date until that day, words until removed by hand.
  • card, deck, hand — an idea, a question and a task are cards, and live in decks and hands, where a finding, a goal and a direction are held by nobody; a card’s owner is its deck, an owner’s name or null for the common deck (common in the commands), and its drawn the hand, the date of the present hold; a new card lands in the common deck unless minted --for an owner, and a card that leaves a hand stays in its owner’s deck.
  • standing — a live card’s held, parked, blocked or ready, calculated and never stored; a card both parked and blocked reads parked, blocked, a held card carries no wait, and an idea is only held or ready; printed by flow show, flow find and flow state.
  • started — the date of a card’s first draw, written by that draw and kept through a return, a pass and the closing.
  • place — where a card is, in words, calculated by flow find --json and flow show --json and never stored: agent, 3 days for a held card, agent's deck or common deck for a live card in no hand, discard pile or graveyard for a closed one, null for a record that is no card.
  • lines — the {"label", "text"} pairs a record’s --json carries for what its card says beside its summary (waits, parked, due, for, serves, answered by, answers, evidence, fresh or produced, served by), each only where it holds something, in finished words, a record named by its title.
  • zone — one place of the table flow table lays out: an owner’s hand, the goals, the directions, an owner’s deck, the common deck, the discard pile or the graveyard, each with its count, its note, its room where a hand has a limit, the flow find flags that list the whole of it and the cards on top of it.
  • pile — where a closed card is, read from its state: the discard pile holds a task done, an idea consumed, a question answered or impossible; the graveyard any card removed, a task aborted and a question wrong; flow find --pile lists one.
  • session — the work between a first flow state and a /research:freeze, dedicated to the agent’s hand: it works the held cards that are its own work one by one until each is closed or walled, then freezes, reports and stops, a card handed to another session staying held and not worked here; every card minted on the way goes to a deck and not to the hand, a question may be answered with no task, and a design round on a question is the held question itself, its record a dated note on it, a round on no question being a task tagged design.
  • hand, hand limit — what an owner holds, the cards drawn into it of the three kinds, and how many at once flow.toml’s [hand] allows; the agent’s spans its sessions, and the person’s is the other; a task handed to a prover’s session stays held in the agent’s hand, and the handoff’s log entry says it is with the prover.
  • owner — a name in [hand]: agent and owner, the person, by default, and the deck a card is in; the skills write those two, and the names a project’s [hand] sets are what the commands take.
  • the ranked list, the next list — the records with a rank, a number alone, in INDEX.md: the schedule of the work, the agent’s hand filled from its top, refreshed by /research:whatsnext when the person asks, when the agent recommends it and the person agrees, or when it is empty, why each stands where it does said in the log’s entry.
  • due date, after — a task’s date, which never moves a rank: the index lists the open tasks that have one under Due, flow state names one that has passed and flow check warns on it; and the words that follow a task’s completion, printed by make and abort for the agent to follow.
  • tag — a free word on a record, no vocabulary validated; flow tags reports every one in use with its records and the untagged.
  • artifact — a repository path a record refers to, a paper, a dataset, a probe, a figure, by an evidence item or a Markdown link in its body; flow artifacts lists them with the records naming each, and the check fails a live record whose path is gone; no record, no register, a stale artifact being a task.
  • the inbox — INBOX.md, where the person leaves items between sessions and a freeze leaves one directive; the next session reads it first, and no rule empties it at a freeze.
  • the log — dated entries, newest first, each opening with a State paragraph; the top one is what a cold session trusts; flow log add writes one at the top, flow log archive moves the old ones to one file per month.
  • the freeze — a session’s end: what a machine can see of it, flow state --check decides — the log’s date and the records it names — and the rest is the session’s, /research:freeze.
  • the registry — the one place the project’s deliverables and their order are stated; the ranked list orders the work, the registry the products.
  • evidence, form, trust — a finding’s evidence items, each form:target; the form one of the words [evidence] forms lists — the kit ships formal (a declaration or a module of the prover’s library, asked of the resolver), statistical (a probe or a committed result), peer-reviewed (a card of the library), stated (a row, a numbered statement or a heading of a document of the project, its own word) and reference (any other source) — and the project adds its own; the set of forms a finding carries is its trust, words with no rank, and a finding resting on stated alone is the trust to raise.
  • declaration manifest — a text file a prover’s build regenerates, one Module.Path name line per declaration, in the formal plugin’s grammar; the flow never reads it, and the plugin’s resolver answers formal items from it, whose claim is existence, not citability.
  • resolver — the command that answers for the evidence items of one form, as formal resolve --protocol does for formal; it speaks the protocol under Evidence resolvers, and the flow asks it once for every item of its form.
  • probe — a self-asserting script, exiting non-zero when its own checks fail, listed in the project’s probes register; a statistical item.
  • do-not-reopen — a tag on a question the index lists under “Settled, do not re-open”, so a settled matter is seen before it is asked again; flow reopen refuses it, and the agent asks the person.
  • legacy — the origin of a record imported from before the flow, the one record written by hand; an answered legacy question may name no finding.
  • text gates — the project’s own checks on prose, such as a linter or a one-sentence-per-line rule, run on a draft before a body or a row is written.
  • clone test — a session is frozen when a clone of the repository on another computer could continue from it; the agent’s memory, the scratchpad and a running subagent do not travel.
  • annex — an optional directory for the artifacts a recorded claim depends on that no other container owns.
  • coverage line — the last line of a check, saying which route answered for each form asked of a resolver, so a green says what it did not look at (also library).