Expand description
dbmd-core — the reference library for db.md, the open database in
plain files.
db.md is one directory: raw evidence in sources/, atomic typed data in
records/, curator-synthesized narrative in wiki/, and a single DB.md
config file at the root. Records are markdown files with YAML frontmatter;
relationships are wiki-links; the index is the derived, write-through
index.md / index.jsonl catalog plus embedded ripgrep.
This crate owns all toolkit logic. The dbmd binary (dbmd-cli) is a
thin wrapper that parses args, calls into here, and formats output. Any
Rust tool wanting to be db.md-aware can cargo add dbmd-core and get the
full library — the same shape as ripgrep, where the grep/ignore libs do
the work and rg is a thin CLI.
§Hard invariants this crate is built to uphold
- Zero AI/LLM dependencies. No provider SDKs, no API keys, no model
calls, no embeddings, no vectors, no ANN — anywhere, ever. The agent
driving
dbmdis the semantic layer;dbmdis a deterministic tool. - The interactive loop is O(changed), never O(store). Loop ops
(
graph::backlinks,validate::validate_working_set,index::Index::on_write, …) never callstore::Store::walk. Whole- store walks belong only to SWEEP ops (validate::validate_all,index::Index::rebuild_all,stats). - Wiki-links are full store-relative paths. A short-form wiki-link is a
validation error (
validatecodeWIKI_LINK_SHORT_FORM). - Embedded ripgrep. Free-text body search uses the
grep+ignorecrates in-process; the toolkit never bundles or shells out torg. Structured loop reads (graph::backlinks,query::Query) ride theindex.jsonlsidecars instead, never a frontmatter tree scan.
Re-exports§
pub use extract::ExtractError;pub use extract::Extracted;pub use extract::Format;pub use extract::MetaValue;pub use graph::ContextSlice;pub use index::Index;pub use index::IndexLevel;pub use index::IndexRecord;pub use log::Log;pub use log::LogEntry;pub use log::LogKind;pub use parser::Config;pub use parser::FieldSpec;pub use parser::Frontmatter;pub use parser::MarkdownLink;pub use parser::ParseError;pub use parser::Schema;pub use parser::Section;pub use parser::Shape;pub use parser::WikiLink;pub use query::Query;pub use render::Outline;pub use render::Tree;pub use store::infer_type_from_path;pub use store::layer_for_type;pub use store::Layer;pub use store::NotAStore;pub use store::Store;pub use store::StoreError;pub use time::now;pub use validate::Issue;pub use validate::Severity;
Modules§
- extract
- Document text extraction — the
dbmd extractengine. - graph
graph— the wiki-link relationship layer.- index
index— the hierarchical content catalog.- log
log— the append-only, month-rotating chronological log.- parser
parser— read and write db.md markdown files.- query
query— Dataview-style filters, sidecar-backed.- render
render— data structures for the structural views, no output formatting.- stats
stats— store overview, computed on demand (a SWEEP, likedu— never a maintained or precomputed cache).- store
store— walk, locate, and shard a db.md store.- summary
summary— the deterministic default-summarycomposer.- time
- Canonical wall-clock for write-surface timestamp seeding.
- validate
validate— the validation engine.
Enums§
- Error
- Top-level error for
dbmd-coreoperations.