Skip to main content

Crate primum

Crate primum 

Source

Modules§

cli
The command line. Writes go through store, reads through store::load and the same ItemView the web page gets, so the terminal and the page always agree.
conflicts
Conflicts a sync could not decide: conflicts/<STEM>.json, one file per item, tracked so every machine sees them and anyone can resolve them. The item file holds the first value of each; the record holds both.
history
A project’s history: a bare git repository at .primum/history.git whose work tree is the project folder. Every git call primum makes is in this module.
import
A one-time import of a videre-board board (board.py’s data/items.json and its specs and plans) into an empty project.
item_file
One item, one markdown file: a flat YAML front matter, then the body. primum writes exactly the form below and reads it with this parser; any other shape is an error naming the file and line, never a silent default.
merge
The three-way merge of one item, field by field, against the common ancestor. Git’s line merge cannot be used on item files: two people changing status and impact, adjacent lines, is a git conflict. Pure: the text merge of bodies is passed in.
migrate
Brings a board made by an earlier version up to date, once: per-lane ids (TODO:7, items/TODO-7.md) become one counter (#3, items/3.md). Also the rewriting of references in text, which sync’s renumbering uses.
model
Items, lanes and the board’s priority: the same formula and order as the page, so the terminal and the browser always agree.
projects
Where projects are, found from the folder primum runs in: nothing is machine-wide.
server
The local web board: axum routes, the JSON API and the pages.
store
A project’s items on disk. Every change takes the project lock, reads the files, writes only what changed (temporary file, then rename), removes closed ids from every needs, and rewrites BOARD.md.
sync
Sync with the project’s remote: commit outside edits, fetch, renumber new items whose ids were taken on the remote, merge (primum decides items field by field; git only carries), settle, push. Only a true conflict is left for a person, in conflicts/.