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.0
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 and Markdown heading IDs Relative links, images, reference links, 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. Potentially stale environment names are warnings. Undocumented options, environment variables, settings fields, and undeclared agent tools are 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.0
        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.0

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.0
File Size Uploaded Provenance
claimlint-0.1.0.tar.gz 39.7 kB With provenance Details

Built distribution (wheel)

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

Total release size: 75.5 kB

Release files / claimlint-0.1.0.tar.gz

Download URL claimlint-0.1.0.tar.gz
Size 39.7 kB
Tags Source
SHA-256 checksum
How to use checksums
705e2d5a8a62c6f98d439bc5e992a92f8843648dcfb98ff12cc5474c8ecb2051
BLAKE2b-256 checksum
How to use checksums
f9a5fb1ed24cc4e3b96570afcc953035651ad08fa7088ad1f998998eace6da7f
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 23, 2026.

Transparency log

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

Download URL claimlint-0.1.0-py3-none-any.whl
Size 35.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50c6a0ad549202646b897adc37180420f58129b18b11d29f106b8028e58f71c8
BLAKE2b-256 checksum
How to use checksums
88e51c67e54ee5f657a97b1761cff49820878ae09fafa430166d3268af62570c
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 23, 2026.

Transparency log

Security for claimlint 0.1.0

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.0.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 23, 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.0 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