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

Initialize the project and inspect the capability contract before selecting a workflow:

documentledger init --project-name example
documentledger --json capabilities
documentledger --json status

For incremental documentation updates, use the capability-aware review and finish path:

documentledger review
# edit the affected documentation sections
documentledger finish
documentledger --json status

review scans current files, reports affected sections and relevant mapping work, and applies only safe exact mappings. finish audits links, runs configured validation commands, and records freshness only when all gates pass. For an unchanged section, provide a reason with --reviewed-no-change DOC#SECTION=REASON; use --generated-verified DOC#SECTION=REASON for verified generated references.

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 and inspect documentledger --json capabilities.
  2. Use documentledger review for incremental changes. It scans, summarizes affected sections and relevant unmapped production changes, and links only deterministic exact candidates.
  3. Inspect documentledger review --details or bounded documentledger document build-context --affected when more evidence is needed. Resolve ambiguous mappings deliberately.
  4. Edit affected documentation and run the configured validation commands.
  5. Run documentledger finish, supplying an explicit no-change or generated-reference decision when needed. It writes freshness only after mapping review, link audit, and configured validation succeed.
  6. Inspect documentledger --json status and documentledger --json check.

For bootstrapping or manual control, the lower-level scan, document affected, document build-context, link propose/link import-map, link audit, and document mark-fresh commands remain available. document mark-fresh is the explicit low-level freshness operation; use it only after reviewing mappings and completing validation.

Status

documentledger --json status reports workspace initialization, storage bindings, scan counts, mapping/freshness state, and a recommended next action. The top-level state distinguishes bootstrap_required, mapping_incomplete, incremental_affected, and incremental_clean. The freshness_state is affected or clean; mapping_state is bootstrap_required, review_required, or complete. Test, private, and generated changes are excluded from mapping review by default unless mapping_review_roles opts them in.

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. For bootstrap, use documentledger document build-context --bootstrap, review deterministic proposals and coverage (including intentional no-op mappings), then apply them. document mark-fresh --all --allow-unlinked remains an explicit low-level bootstrap operation when its broader scope is intentional; the normal incremental path uses review and finish.

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 compatibility interfaces. New automation should probe documentledger --json capabilities and use canonical singular command paths. document mark-fresh remains available for explicit low-level workflows; prefer review and finish when their capabilities are advertised.

License

Apache-2.0. See LICENSE.

Metadata

Release files for documentledger 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for documentledger 0.2.3
File Size Uploaded Provenance Actions
documentledger-0.2.3.tar.gz 440.0 kB Without provenance Details for documentledger-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for documentledger 0.2.3
File Interpreter ABI Platform Actions
documentledger-0.2.3-py3-none-any.whl Python 3 none any Details for documentledger-0.2.3-py3-none-any.whl

Total release size: 560.1 kB

Release files / documentledger-0.2.3.tar.gz

Download URL documentledger-0.2.3.tar.gz
Size 440.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7e9821aec6bf46bc15b72b1df63a819a17fadaf8a6dd81b35f1171c018b95901
BLAKE2b-256 checksum
How to use checksums
805067316670bec7ff503b7edcf68617ba58502b81eaf8c19953b90877ad5599
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / documentledger-0.2.3-py3-none-any.whl

Download URL documentledger-0.2.3-py3-none-any.whl
Size 120.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4561d594bfe1d4670225d90bd28f857d3f32b9941a4add668ed8b65463f96b23
BLAKE2b-256 checksum
How to use checksums
86716955c8bdd04c5baff724c931804926265848f86e422e90232a249e949c8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for documentledger 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page