Expand description
kanbrain’s core: entries and their markdown files, tags, and the operations on them (brain).
Shared by the command line (kb) and the kanban desktop app (kanbrain, which also takes its commands).
See docs/development.md for an overview of the modules.
It’s published on crates.io only because kanbrain, the command line, depends on it. Its API serves those two
programs and changes with them: it isn’t meant for other crates, and its versions follow kanbrain’s.
Modules§
- api
- Operations by entry id, for the command line: what an agent (or a script)
does without a screen. They go through the same
Brainactions as the desktop app, so tracking rules, tag colors and file names behave exactly as there. - brain
- The brain: every entry in the data folder, and the operations on them. Time is always tracked: each task in
doinghas its clock running.doingholds one task started by a person (starting another is refused, not made room for); agents’, which may run one per subagent, aren’t limited. Each brain (the central one, each project repository) has its own, so work in different projects can run side by side. The command line and the desktop app both go through it, so tracking rules, tag colors and file names behave the same everywhere. It holds no screen state; the desktop app keeps its own. - cli
- The command line: which command to run, with its options.
- export
- Reports as markdown: what the desktop app’s report shows, as tables.
- migrate
- Data format versions and migrations. A brain’s files (entries,
tags.md,last-id, a project’s cards and registry) follow a format numbered in itsformatfile,FORMATfor those this version writes. Formats change only with a migration, which brings a brain from the one before: when a brain is opened to be changed, and for every registered brain onkb update, the migrations it lacks run in order, under its write lock, after a copy of it goes to the user’s cache. A brain in a newer format than this version knows is refused entirely, read or written: an olderkbreading a teammate’s.brain/from git would misread what it doesn’t know, and rewriting it would lose it. - model
- Entries (tasks, notes and decisions), their links, status history, time-tracking sessions, comments and activity.
- period
- Calendar periods used by reports: an hour, a day, an ISO week (Monday–Sunday) or a month.
- platform
- Operating-system specifics.
- projects
- Projects: work that keeps its tasks next to its code, in one or more repositories. Each repository
has its own
.brain/(its own tasks, numbered from 1) and belongs to a project; several services of one project are several repositories with the same project name.initregisters each in the central brain’sprojects.md, so the kanban app can show every project and filter by one, or by one of its repositories. - store
- The data folder: one
NNNN-slug.mdfile per task,tags.md, and exported reports inreports/. - tags
- Tag colors: a 16-color palette assigned without repeats, stored in
tags.md.