Documentledger
Documentledger is a documentation freshness ledger for coding-agent workflows. It records repository scans, maps documentation files to source units, reports stale documentation when linked implementation changes, and renders bounded update context for agents.
Start here
Workflows
- Usage
- Initialize
- Inspect status and next action
- Scan
- Inspect documents and source units
- Add broad and precise links {#link-documentation-to-sources}
- Propose, import, and audit links
- Build context, update, and validate
- Mark fresh
- JSON, human, and profile output
- Ledger state and commit policy
- Storage commands
- Validate ledger state
- Bootstrapping a new repository
- Limitations
- Bootstrapping a new repository
- Incremental workflow
- Continuous integration
- Migration
Reference
- Configuration reference
- CLI reference
- Global options
- Canonical commands
- init
- status
- info
- doctor
- check
- next-action
- scan
- coverage
- commands
- help
- config show
- config validate
- schema list
- schema show
- schema values
- document list
- document sections
- document affected
- document stale
- document build-context
- document mark-fresh
- source list
- source show
- link list
- link add
- link remove
- link add-section
- link remove-section
- link import-map
- link audit
- link propose
- storage where
- storage validate
- migrate status
- migrate plan
- migrate apply
- migrate recover
- migrate cleanup
- Compatibility commands
- Storage
- Schemas
- Errors
- API reference
Project
- Architecture
- Canonical project resolution
- Command registration and metadata
- CLI state and result envelopes {#cli-structure-and-errors}
- Configuration parsing
- Storage and atomic state transitions {#storage-model}
- Scanning and source-unit identity {#scanning-algorithm}
- Markdown sections and markers
- Link graph and tracked hashes
- Affectedness and context
- Migration boundary
- Persistence and testing boundaries
- ledgercore integration
- Development
- Troubleshooting
- The executable is not found
- A deprecation warning appears
- Canonical storage binding is invalid
- Configuration validation fails
- There is no baseline or no links
- Check reports stale sections
- Source index is missing or corrupt
- Cursor or selector errors occur
- Mapping batch validation fails
- Migration conflicts or is interrupted
- Sphinx fails with warnings or autodoc import errors
- Status reports uninitialized
- Scan fails with storage missing
- A changed source is reported as unlinked
- Every change makes too many docs stale
- Mark fresh fails with unlinked doc
- Sphinx build is not found
- The Sphinx build warns about files inside the virtual environment
- Storage migration errors
- Changelog
Documentation freshness workflow
The supported workflow is:
Run
documentledger --json statusto inspect the canonical workspace.Run
documentledger --json scanto compare current source and documentation hashes with the latest baseline.Run
documentledger --json document affectedto find sections affected by linked source-unit changes.Run
documentledger document build-context --affected --out /tmp/documentledger-context.mdto render bounded update context.Inspect the affected sections and linked source evidence before editing.
Update the affected sections, run configured validation commands, then mark them fresh with
documentledger document mark-fresh --doc DOC --section SECTION --reason "Docs updated after scan version VERSION.".
Documentledger stores durable state in the resolved data mount under .ledger/documentledger/. Do not edit canonical .ledger/ records directly.