Skip to content
Set it up

/source

/source <file> turns a document you received (a report, a regulation, a dataset, a deck) into a source: a card with an ID (S1, S2…). The document is read once; from then on people and agents read the card, and a number taken from it cites it with the page: S2, p. 9.

The cards are one file each, read by a file-per-record type of the schema (usually source, in sources/). If the repo has none, it proposes one first.

What is code, what is the agent

The mechanical part is plancia source, in plain code:

Command What it does
plancia source Which type and folder hold the cards, the next free ID, whether PDFs can be read
plancia source add <file> --write Checks the original (its sha256, and whether it is filed already) and writes a new card with the next free ID
plancia source text <ID> --pages 1-5 The original’s text, page by page: cheaper than reading pages as images
plancia source check <ID> Finds every quote of the card word for word in the original, with its page
plancia source index --write Rewrites the table of the folder’s README from the cards

PDFs are read with pdftotext (poppler) when it is installed; otherwise the agent passes the text with --text.

The agent reads the parts that matter to the project, and fills the card: in five lines what it is, who says it and its limits; the facts the project needs, each with its page; quotes copied exactly. Then it proposes where each fact goes (a number next to the analysis that uses it, a person in the people registry) and applies that only after your yes.

Confidential documents

Contracts, offers, documents with personal data: the original stays out of git, and the card says file: outside the repo and holds only the summary and the numbers.

A newer source

A report of the following year does not overwrite the old card: the old one gets status: superseded and superseded_by: <new ID>, and plancia radius <old ID> lists every decision and document that relied on it, to reread with the new numbers.