Skip to main content

PyPI - Version PyPI - Python Version

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

  1. Initialize the canonical project.
  2. Scan to establish or update the deterministic baseline.
  3. Inspect document affected and bounded document build-context output.
  4. Link sections to source units with link add-section or review deterministic proposals.
  5. Update affected documentation and run validation.
  6. 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

documentledger-0.2.1.tar.gz (241.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

documentledger-0.2.1-py3-none-any.whl (82.6 kB view details)

Uploaded Python 3

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

Hashes for documentledger-0.2.1.tar.gz
Algorithm Hash digest
SHA256 dd91ee57fb4f17f848ed03188d9a17c308bdef59fc24d986b26371e007b77b90
MD5 e59d54f46d05ce0dc074dee80ffe9866
BLAKE2b-256 20ac35cdced86093c213c6d7274fd5804d61cc533282ce8979dbd9cd0bf92bbc

See more details on using hashes here.

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

Hashes for documentledger-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 25e0a5b5c6970a1919091ce054379657f4f3200ffe47ab298f939569fcea3b74
MD5 086f96ed032a63cf49dc415a4ed7f8b3
BLAKE2b-256 8b2876ad9bc19cdcecd07bcbc05f09a600af317c2c5cf2e785f2a4a21a2ee3ca

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page