Documentledger
Documentledger is a documentation freshness ledger for coding-agent workflows. It maps documentation sections to source units and reports affected documentation when linked implementation changes.
Install
python -m pip install documentledger
documentledger --version
For development, install python -m pip install -e ".[test,docs,dev]". Documentledger supports Python 3.10 through 3.13 and requires ledgercore>=0.6.0,<0.7.0.
Quickstart
documentledger init --project-name example
documentledger --json status
documentledger --json scan
documentledger document build-context --bootstrap --out /tmp/documentledger-bootstrap.md
documentledger link propose --all-docs --out-dir /tmp/documentledger-maps
documentledger --json link import-map --directory /tmp/documentledger-maps --check-and-apply
documentledger --json link audit
documentledger --json coverage
After updating and validating an affected section:
documentledger document mark-fresh --doc docs/usage.md --section usage-scan --reason "Updated after scan version VERSION."
Canonical storage
The shared authority is .ledger/ledger.toml schema 3. Documentledger's tool config is .ledger/documentledger/config.toml version 2. Durable state is in the resolved data mount; rendered context and proposals use the resolved cache artifacts mount. Legacy root configs are migration inputs only.
Workflow
- Initialize the canonical project.
- Scan to establish or update the deterministic baseline.
- Inspect
document affectedand boundeddocument build-contextoutput. - Link sections to source units with
link add-sectionor review deterministic proposals. - Update affected documentation and run validation.
- Mark updated sections fresh, audit links, and run
documentledger --json check.
Status
documentledger --json status reports initialization, storage bindings, latest scan counts, and the recommended next action.
Commands
Use documentledger commands or the complete CLI reference to inspect canonical command paths.
State model
Documentledger persists deterministic hashes and integer versions in the canonical data mount. Rendered context and proposals are derived cache artifacts.
Storage migration
Use documentledger migrate status, migrate plan, migrate apply, migrate recover, and migrate cleanup for explicit legacy migration.
Bootstrapping a new repository
The first scan is a baseline; use documentledger document build-context --bootstrap, review deterministic link proposals and coverage (including intentional no-op mappings), then apply them before marking all configured documents fresh with --allow-unlinked.
Documentation and development
The full Sphinx site is in docs/. Build it with:
python -m pip install -e ".[docs]"
python -m sphinx -W --keep-going -b html docs docs/_build/html
Run tests with python -m pytest -q and compile checks with python -m compileall -q documentledger tests.
Compatibility
docledger, plural command groups, root mark-fresh, and legacy storage migration wrappers remain temporary compatibility interfaces. New automation must use documentledger and canonical singular command paths.
License
Apache-2.0. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file documentledger-0.2.1.tar.gz.
File metadata
- Download URL: documentledger-0.2.1.tar.gz
- Upload date:
- Size: 241.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd91ee57fb4f17f848ed03188d9a17c308bdef59fc24d986b26371e007b77b90
|
|
| MD5 |
e59d54f46d05ce0dc074dee80ffe9866
|
|
| BLAKE2b-256 |
20ac35cdced86093c213c6d7274fd5804d61cc533282ce8979dbd9cd0bf92bbc
|
File details
Details for the file documentledger-0.2.1-py3-none-any.whl.
File metadata
- Download URL: documentledger-0.2.1-py3-none-any.whl
- Upload date:
- Size: 82.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25e0a5b5c6970a1919091ce054379657f4f3200ffe47ab298f939569fcea3b74
|
|
| MD5 |
086f96ed032a63cf49dc415a4ed7f8b3
|
|
| BLAKE2b-256 |
8b2876ad9bc19cdcecd07bcbc05f09a600af317c2c5cf2e785f2a4a21a2ee3ca
|