# ADR-0001: One derived SQLite artifact, one current contract - Status: accepted (implementation baseline) - Date: 2026-11-25 - Context: `marqdo-knowledge-development.md` §1, §7, §12, §17 ## Decision 1. `marqdo-knowledge` persists exactly one knowledge artifact per root: `.marqdo/knowledge.sqlite`. It is derived, rebuildable and private to the tool. No `knowledge.yaml`, node manifest, JSONL graph, vector file or separate knowledge IR is created or read. 2. The only machine input for Marqdo program semantics is the core CLI's current public Analysis (`marqdo.analysis`, revision 3) produced by `check ENTRY --emit PATH`. There is no second Analysis shape, version probe, legacy reader or fallback parser. 3. The public CLI contract is exactly three business subcommands: `compile`, `check`, `query`. No `init/search/graph/impact/export/serve` aliases. 4. Query never writes graph facts; `compile` is the only write path; `check` never writes. 5. Schema changes are explicit and destructive: the tool rejects an old schema revision and asks for `compile --rebuild`. There is no automatic migration. 6. Freshness is content-based: query compares the recorded input digests with the current root and refuses to serve a stale snapshot unless the user explicitly passes `--snapshot`. ## Consequences * Deleting the database loses nothing; a rebuild is the only recovery needed. * Incremental compilation must prove semantic equivalence to a full compile. The implementation keeps a digest-guarded cache of normalised document facts inside the database so that unchanged Analysis contexts are not re-invoked; the cache is derived data and is verified on every use. * Schema revision, Analysis revision and product version are independent numbers. They are not bumped for cosmetic alignment. * There is one producer and one validator for each boundary; retiring a shape means deleting it, not keeping a compatibility branch.