Skip to main content

claimlint

Catch checkable documentation drift before a maintainer or coding agent follows it.

claimlint compares Markdown examples and agent instructions with Python source and project metadata. Findings include the documentation line, source reference, and the concrete claim that failed. Detection uses no model and makes no network requests.

Requires Python 3.10 or newer and a project with a pyproject.toml.

Install and run

Install the release:

python -m pip install claimlint==0.1.1
claimlint check .

Or install from a source checkout:

python -m pip install .
claimlint check .
claimlint --version
claimlint check . --format json
claimlint check . --select DP002,DP003,DP006 --min-severity error

The distribution name is claimlint. The original working name, docproof, belongs to an existing project. See the usefulness assessment for the comparison and design choices.

What it checks

Check Evidence Scope
DP001 argparse definitions or opt-in help output Documented options and subcommands for project console scripts
DP002 AST symbol table and local re-exports Project-owned dotted references and imports in Python examples
DP003 AST function/method signatures Bound arguments of calls in complete Python examples
DP004 Subprocess exit status and traceback Opt-in execution of Python fences, one fresh process per block
DP005 Literal environment reads and settings fields Environment names and pydantic settings documentation coverage
DP006 Filesystem, Markdown IDs and static renderer configuration Relative links, images, MyST labels, MkDocs routes and anchors
DP007 Project metadata, Makefile, filesystem Commands and file/test paths in AGENTS.md and CLAUDE.md

Unknown flags, symbols, invalid calls, missing agent paths, and broken links are errors. Settings field mismatches are warnings. Missing literal environment reads are skipped because dependencies or dynamic readers may handle them. Environment coverage notes describe missing mentions in searched documents, including supplemental RST and root changelogs. Undocumented options, settings fields, and undeclared agent tools are also notes. Notes do not fail the default gate. --min-severity note makes documentation coverage a gate too.

A report names how many documents it read and how many claims each check examined or skipped. Dynamic namespaces, decorators, unpacked arguments, unsupported CLI frameworks, and external names are skipped where they prevent a reliable decision. A clean report applies to those checks and documents only. See limits.

Example finding

README.md:12: error DP003 Call to demo.render(text, *, width='...') does not bind: got an unexpected keyword argument 'columns'
  source: src/demo/__init__.py:4
  evidence: {"claim": "render('hello', columns=80)", "signature": "(text, *, width='...')"}

This is illustrative output. The planted example repositories and their expected findings are under tests/fixtures.

The parser can also be used directly:

from claimlint.docs_parser import parse_text

claims = parse_text("# Usage\n\nCall `demo.render()`.\n", "README.md")
assert claims[0].kind == "heading"
assert claims[1].line == 3

Configuration

[tool.claimlint]
docs = ["README.md", "docs/**/*.md"]
agent_files = ["**/AGENTS.md", "**/CLAUDE.md"]
ignore_paths = ["docs/archive/**"]
select = ["DP001", "DP002", "DP003", "DP005", "DP006", "DP007"]
ignore = []
# Optional for unconventional layouts; defaults to src/ when present, otherwise the root.
source_roots = ["src"]

[tool.claimlint.entry_points]
# Override or add a console script's module:function target.
# demo = "demo.cli:main"

Configuration belongs in the checked project's pyproject file. Document globs and source roots must stay inside that project. By default, README.md, docs Markdown, and nested agent files are scanned. Virtual environments, build output, Git internals, and node_modules are excluded. Tests, examples, and docs are excluded from the source index.

Put an HTML comment directly before the relevant inline claim, paragraph, link, or fence:

<!-- claimlint: ignore DP001,DP003 -->
```python
# An intentionally incomplete example.
```

<!-- claimlint: skip --> excludes the next claim or block from all checks, including execution. The original docproof: spelling is accepted for the supplied spec's compatibility.

Baselines

claimlint baseline .
claimlint baseline . --output .claimlint-baseline.json --select DP001,DP002,DP003,DP005,DP006,DP007
claimlint check . --baseline .claimlint-baseline.json

The baseline stores finding identities rather than line numbers, so adding paragraphs does not resurrect an existing finding. Changing a failing claim or its error creates a new identity. Paths passed to --baseline, --output, and --summary are relative to the shell's current directory.

Trusted execution

claimlint check . --introspect-cli --timeout 5
claimlint check . --run-examples --timeout 5

Both flags execute project code with your Python interpreter and installed dependencies. Use them only on trusted projects. A temporary example working directory and a timeout are not an operating-system sandbox: examples still have your filesystem, credentials, network access, and ability to start child processes. Use an isolated CI runner when needed. The static default never imports the checked project.

Runtime help traversal supports argparse-style subcommands and Click-style Commands sections. It is bounded to five levels and fifty invocations per entry point. Required application initialization or custom help formatting may leave a subtree unverified.

Optional Codex fixes

claimlint fix .
claimlint fix . --codex codex --timeout 120 --select DP002,DP003,DP006
claimlint fix . --apply

Requires an authenticated Codex CLI. This optional step sends the affected document and finding evidence to your configured Codex service and may consume model usage. It runs in a temporary directory with a read-only sandbox request. The backend returns a diff; the validator accepts only the requested document, exact patch context, no new suppression, the original finding gone, and no new findings across the selected static checks.

Dry runs print the validated diff. Only --apply writes documentation. Validation uses a temporary project copy and never executes model-edited examples. Notes are not auto-fixed. Live backend availability depends on your Codex installation; rejection and timeout are surfaced.

GitHub Actions

The root composite action installs claimlint and emits line annotations plus a job summary. It requires no model API key and runs static checks by default:

jobs:
  docs:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v6
      - uses: wenshanvincent-creator/claimlint@v0.1.1
        with:
          path: .
          min-severity: warning

For reproducible action use, replace the version tag with its reviewed immutable commit. The CI workflow tests supported Python versions, lints, dogfoods static and runtime checks, and builds the wheel and source archive. The action does not post PR comments or open PRs; job summaries and annotations require only read permissions and work on fork pull requests.

To produce a summary outside Actions:

claimlint check . --format github --summary claimlint-summary.md

Exit codes: 0 no finding at the chosen threshold; 1 findings (or rejected fixes); 2 invalid usage/configuration or an operational error.

Development

python -m pip install -e ".[dev]"
python -m pytest
ruff check .
claimlint check .
python -m build

See CONTRIBUTING, the changelog, and release steps. MIT licensed.

Metadata

Release files for claimlint 0.1.1

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

Source distribution (sdist)

Source distribution for claimlint 0.1.1
File Size Uploaded Provenance
claimlint-0.1.1.tar.gz 44.5 kB With provenance Details

Built distribution (wheel)

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

Total release size: 83.1 kB

Release files / claimlint-0.1.1.tar.gz

Download URL claimlint-0.1.1.tar.gz
Size 44.5 kB
Tags Source
SHA-256 checksum
How to use checksums
42caa67d5cdf10178b6228bc4afadc5e220b6634a28aaf3486c156964c9e9551
BLAKE2b-256 checksum
How to use checksums
66f91401945014c996030b40d19e8cc21575ad49ed48ad587394ff1ad56866ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / claimlint-0.1.1-py3-none-any.whl

Download URL claimlint-0.1.1-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67dfe6c009b1f26b915cb8553f87b42afb80786b4cc652a5cd3d6f4227a635f3
BLAKE2b-256 checksum
How to use checksums
38c836279a0d3e202b38781df99ace441cc13ac81ab066d11d85fef4fa49be57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for claimlint 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for claimlint-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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