kb
Personal knowledge base — typed AST with org-mode as projection, SQLite-backed
Getting started
Toolchain, task execution, and hook tools are managed by mise.
The Rust toolchain is declared in mise.toml; rustup is an implementation
detail and rust-toolchain.toml is intentionally absent.
With direnv installed, entering the directory prepares the environment. Otherwise:
Tasks
The generated Rust gate includes formatting, TOML formatting, shell linting,
spelling, clippy, nextest, docs, unused-dependency detection, advisory audit,
license/source policy, packaging, and line coverage. Coverage is held to a
repository-local floor of 90% (the generated default is 100%): kb is a
server/MCP/CLI application whose binary entry points and interactive CLI
dispatch are not reachable by in-process tests. See RS-007 in
REPO_INVARIANTS.md.
Design notes
Org-mode AST and parser
The typed org-mode AST (Document, Block, Inline, and friends) is re-used
from the companion tftio-org crate, which
was extracted from this crate. The AST types are byte-for-byte behaviour-identical
across the two crates, so deduplicating them costs nothing.
The parser is deliberately kept in-crate rather than taken from tftio-org.
tftio-org 0.1.0's parser::parse_document enters an infinite loop on pipe /
table input such as "|\n" — a defect this crate's own parser explicitly fixed
and guards with regression tests (tests/v10_phase.rs,
parser_panic_free_pipe_returns_ok). Because that defect ships in a published
dependency version that cannot be patched from here, adopting tftio-org's parser
would reintroduce the hang. Keeping the proven in-crate parser preserves behaviour;
the AST dependency is still shared. Revisit this once a fixed tftio-org is
released.