Storage
Durable and derived files
storage.yamlstores schema metadata, project UUID, state version, and compact scan counts.scan.yamlstores the currentdocumentledger.scan.v5baseline and deltas.source-index.jsonstores the deterministic source-unit inventory.docs/*.yamlstoresdocumentledger.doc_record.v4records and section links.artifactsstores rendered context and link proposals as derived cache output.
Ownership and invariants
Manifest and binding ownership belongs to ledgercore; tool config, scan, source index, and document records belong to Documentledger. Project UUIDs must agree across manifest and storage metadata. Read-only commands validate but do not repair bindings or rewrite records. Writers use atomic transitions, monotonically incremented integer versions, and no persisted timestamps. Git history is sufficient for older baselines.
Inspect storage
documentledger storage where
documentledger storage validate --strict
Use migration commands for legacy layouts. Do not hand-edit .ledger/ data and do not make a documentation build perform migration or repair.