attune-verify
Generation fact-checker for the attune-* family. Verifies named entities in LLM-generated content actually exist — imports import, CLI flags are real, links resolve, counts match source — so hallucinations that pass unit tests are caught before they reach a reader.
Install
pip install attune-verify
With the optional LLM semantic layer (requires attune-rag):
pip install 'attune-verify[rag]'
Quick start
from attune_verify import verify, VerifyContext
from pathlib import Path
ctx = VerifyContext(
project_root=Path("."),
allowed_help_cmds=frozenset(["attune"]),
)
result = verify(generated_content, ctx)
if not result.ok:
for f in result.findings:
print(f"{f.kind}: {f.detail}")
Part of the attune family
- attune-rag grounds generation in accurate retrieved sources (input-side)
- attune-verify checks that named entities in the output actually exist (output-side)
Together they bracket generation: rag verifies "is this claim supported?"; verify checks "does this named thing exist?"
What each checker verifies
| Checker | Claim it settles | Truth source you declare |
|---|---|---|
| imports | every import in a Python code fence resolves, by full dotted path | env_python |
| flags | every --flag in an inline span or shell fence appears in that command's --help |
help_commands / allowed_help_cmds |
| links | every local markdown link target exists under the project | project_root |
| counts | every numeric claim matches the number it names | count_sources |
Findings are error when a claim is refuted and warning when it cannot be
checked — an unverifiable claim is never a silent pass. result.ok is False
only on errors; raise_if_failed(result) turns it into a hard gate.
Status
Beta — the deterministic core (imports, flags, links, counts) is stable and
guarded by a labeled precision/recall corpus (gated ≥ 0.95 each) and mutation
testing (gated ≥ 0.75). The public API above (verify, VerifyContext,
VerifyResult, Finding, FindingKind, raise_if_failed, and the Judge
protocol) is what beta covers: it will not change shape without a deprecation
in a minor release. The LLM semantic layer is optional via the [rag] extra
and is the least settled part of the surface.
Links are read from prose only. Inline ([text](target)) and all three
reference forms — full [text][label], collapsed [text][], and shortcut
[text] — resolve against the document's [label]: target definitions. An
explicit reference whose label is never defined is an error: it renders as
literal text, so the link does not exist. An undefined shortcut is ordinary
prose (the [3] case is not a broken link) and is skipped, as are GFM
footnotes, which share the same syntax.
Known limitations
- Short flags (
-v) are not checked; only--longforms are. - A flag written as bare
`--flag`in prose is attributed to the nearest preceding word, so it may degrade to a warning rather than resolve. - Counts are matched to a source by keyword overlap with the claim's surrounding text; a numeric claim whose context names no source is skipped rather than guessed at.
License
Apache 2.0
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 attune_verify-0.4.0.tar.gz.
File metadata
- Download URL: attune_verify-0.4.0.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a3d3261b3101e67421d3f0041fe87e680d7773908be20075b8c237f6e9ec5df
|
|
| MD5 |
42caca90d6b76e864d67eeb6966a737a
|
|
| BLAKE2b-256 |
849782ede946f11c8e2e0fa835d4a0aa2cb5d921a2d285ac63b6236955e3a4d1
|
Provenance
The following attestation bundles were made for attune_verify-0.4.0.tar.gz:
Publisher:
publish-pypi.yml on Smart-AI-Memory/attune-verify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
attune_verify-0.4.0.tar.gz -
Subject digest:
8a3d3261b3101e67421d3f0041fe87e680d7773908be20075b8c237f6e9ec5df - Sigstore transparency entry: 2425334682
- Sigstore integration time:
-
Permalink:
Smart-AI-Memory/attune-verify@4e89cb22ee2292093fe7452f434324a9366d30b6 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/Smart-AI-Memory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4e89cb22ee2292093fe7452f434324a9366d30b6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file attune_verify-0.4.0-py3-none-any.whl.
File metadata
- Download URL: attune_verify-0.4.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81296cd18c5dadb9357648da9e2613911684c54cf6e80ece91502ca0f3af265b
|
|
| MD5 |
365743bbd0a3201e9276d2ce3b5c111a
|
|
| BLAKE2b-256 |
8df7bdfcf97f83fe9da2088e95be211ec81e69237de3e9342576697ad7cafdab
|
Provenance
The following attestation bundles were made for attune_verify-0.4.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on Smart-AI-Memory/attune-verify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
attune_verify-0.4.0-py3-none-any.whl -
Subject digest:
81296cd18c5dadb9357648da9e2613911684c54cf6e80ece91502ca0f3af265b - Sigstore transparency entry: 2425335028
- Sigstore integration time:
-
Permalink:
Smart-AI-Memory/attune-verify@4e89cb22ee2292093fe7452f434324a9366d30b6 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/Smart-AI-Memory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4e89cb22ee2292093fe7452f434324a9366d30b6 -
Trigger Event:
release
-
Statement type: