Documentation folders
Documentation folders
Each project carries a nested tree of markdown docs. Organize them into folders, add files (inline or from disk, at any depth), and browse the tree in the monitor:
kanbanr doc folder design --name "Design" --description "Architecture & design notes"
kanbanr doc add design/overview.md --content "# Overview\n…"
kanbanr doc add design/customer/portal.md --file ./portal-notes.md # nested, any depth
kanbanr doc tree
Diagrams & images in docs
Docs are more than text — the viewer renders diagrams and embedded images:
-
Embedded images. Add an image as a binary asset, then reference it by a relative name from a markdown file in the same folder (names resolve per-folder, so they’re meaningful in any docs folder — not just one):
kanbanr doc add design/architecture.png --file ./architecture.png # store the image asset<!-- in design/overview.md (same folder) --> The view daemon serves the asset from your data folder — nothing leaves your machine.
-
Mermaid diagrams. A fenced
mermaidcode block renders to a live diagram (flowchart, sequence, state, gantt and the rest of Mermaid’s types), drawn by Pele in the monitor’s light or dark colours:```mermaid flowchart LR A[Claude] --> B[kanbanr CLI] --> C[(data/ git repo)] ``` -
Diagrams are checked when they are written (FEAT-200). Every
mermaidblock in a spec or a markdown doc is linted onfeature add/edit,doc addandbatch, and the problems are printed as warnings — the write still succeeds:created FEAT-012 (Planned) diagram: FEAT-012 spec, diagram #1, line 14: `;` ends the statement early, so the rest of the message is lost — use a comma or words (semicolon_in_text)kanbanr doctorlists every problem on the board, and a gate can requirediagrams_valid(see Processes). A project that wants a broken diagram refused outright turns on strict mode withkanbanr config diagrams --strict on; a refused write changes nothing, and a batch carrying one changes nothing at all.The lint catches the common mistakes, each named by its rule: an empty block or one with no diagram type (
empty_block,unknown_type); a;with text after it in a sequence message, note or alias, or a class relation label (semicolon_in_text);" | { } ( ) [ ]in an unquoted flowchart label, or a label never closed (label_punctuation,unbalanced_label);endas a node or participant id (end_as_id); asubgraph,alt,loopor other block not closed byend, or unbalanced{}(unbalanced_block); and a sequence line that is no statement (unknown_statement). It flags only what Pele, which draws the monitor’s and the book’s diagrams, rejects — Pele is the authority, and the review page runs its real parse before Approve.Two habits avoid nearly all of it: quote flowchart labels —
A["f(x) {y}"], notA[f(x)]— and keep sequence messages to plain words, without;, braces or quotes. GitHub’s own Mermaid is stricter than Pele: it rejectsA[x; y], which Pele draws, so quoting is the advice even where the lint is silent. -
Any other diagram tool — PlantUML, Graphviz/DOT, D2, Excalidraw, draw.io — works too: export it to PNG/SVG and embed it as an image asset (as above). Mermaid blocks also render natively on GitHub, so the same docs look right in your repo.