intent-verify
intent-verify is a deterministic, zero-LLM command-line tool that checks whether a repo's source still lexically covers the acceptance items written in a markdown spec, INTENT.md, or handoff doc — and returns verified, partial, or missing.
Use it when your repo has an INTENT.md, SPEC.md, or handoff doc but nobody knows whether the code still matches it. It is a fast guardrail for catching spec drift before review, release, or handoff.
How it works
intent-verify is intentionally simple and fully deterministic — no model, no network:
- Parse acceptance items from the spec (inline
Accepts:/Requirements:/Scope:lines and bullet/numbered lists under matching headings). - Tokenize each item, dropping common stop words.
- For each item, compute the fraction of its tokens that appear as substrings somewhere in the repo's source files (the spec file itself is excluded from the evidence).
- Score each item against two thresholds and roll up to a single verdict.
Coverage is a lexical token-overlap signal, not a semantic judgment.
Install
pip install intent-verify
For local development:
pip install -e ".[dev]"
60-second quickstart
Given a spec like:
# Intent
## Accepts
- uploads PDF invoices
- retries provider timeout
run:
intent-verify check --spec INTENT.md --repo .
You get a per-item breakdown and a single verdict:
intent-verify: INTENT.md vs . (12 files)
[OK 100%] uploads PDF invoices
[PART 50%] retries provider timeout
[LOW 20%] writes audit log for rejected invoices
intent-verify: MISSING — 1/3 items below 30% (avg 57%)
(The file count, percentages, and items above are illustrative — your numbers depend on your spec and repo.)
The exit code mirrors the verdict, so it drops straight into CI or a pre-commit hook:
| Verdict | Meaning | Exit code |
|---|---|---|
verified |
every parsed item cleared the verified threshold | 0 |
partial |
at least one item is only partly covered | 1 |
missing |
at least one item fell below the per-item minimum | 2 |
Usage
intent-verify check --spec INTENT.md --repo .
intent-verify check --spec SPEC.md --repo . --json
intent-verify check --spec docs/handoff.md --repo src --min-verified 0.75 --min-item 0.35
Flags:
--spec— path to the markdown spec, intent, or handoff file (required).--repo— path to the repo or source tree to scan (required).--section— target a specific markdown heading, for exampleRequirements.--json— emit machine-readable JSON instead of text.--min-verified— coverage an item must clear to count as verified (default0.7).--min-item— minimum per-item coverage before an item is treated as missing (default0.3).
What it parses
By default it extracts items from:
- inline lines such as
Accepts: upload PDF invoices, retry on timeout - markdown sections such as
## Acceptswith bullet or numbered items (Accepts,Requirements,Scopeheadings, or a custom one via--section)
JSON output
intent-verify check --spec INTENT.md --repo . --json
The JSON object includes spec_path, repo_path, files_scanned, average_coverage, verdict, the thresholds used, and an items[] array with each item's parsed text, tokens, coverage, and verdict.
Limitations / what it does NOT do
- Not runtime agent intent verification. It does not authorize or monitor AI-agent actions, MCP/tool calls, or permissions; it checks static repository source against a markdown spec.
- Lexical, not semantic. It matches tokens as substrings; it does not understand meaning, control flow, or behavior.
- It can over-credit. A token appearing anywhere in any scanned file counts, even if it is in a comment, a string, or an unrelated context.
- It can under-credit. A correct implementation written with different vocabulary than the spec will score low.
- It is not proof of correctness and does not replace tests or code review. It answers "does the implementation visibly cover the stated scope?" — not "is the software correct?"
- It needs a human-readable spec. With no
INTENT.md/SPEC.md/requirements/handoff file there is nothing to check against. - Source-file scope only. It scans a fixed set of source extensions (Python, JS/TS, Go, Rust, shell, config, markdown, etc.) and skips common build/vendor directories.
Development
ruff check .
python3 -m pytest -q
python3 -m py_compile src/intent_verify/*.py
Repository layout
src/intent_verify/
tests/
examples/
Part of the Hermes Labs reliability stack. Complementary siblings, not duplicates: rule-audit analyzes logical contradictions in system prompts, and lintlang lints agent-config structure — intent-verify instead checks spec-vs-code drift.
About Hermes Labs
Hermes Labs is an independent AI-reliability lab building open-source tools that catch silent failure modes in production AI. More at hermes-labs.ai.
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 intent_verify-0.1.2.tar.gz.
File metadata
- Download URL: intent_verify-0.1.2.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c68c4382ed4144854325ed5bda63ef4402dfa05f9e563766747b0928011cf03
|
|
| MD5 |
1297769d8fae276b05077811f3d5d7b1
|
|
| BLAKE2b-256 |
f86d66b81ed68dc0816cf2967692f8e9e6dd6cb77263ecd86eb5d7ce39f959b2
|
Provenance
The following attestation bundles were made for intent_verify-0.1.2.tar.gz:
Publisher:
publish.yml on hermes-labs-ai/intent-verify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intent_verify-0.1.2.tar.gz -
Subject digest:
6c68c4382ed4144854325ed5bda63ef4402dfa05f9e563766747b0928011cf03 - Sigstore transparency entry: 2341141493
- Sigstore integration time:
-
Permalink:
hermes-labs-ai/intent-verify@5d931d5bb825ec4386c350a8e199ad0e9ca4a76a -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/hermes-labs-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5d931d5bb825ec4386c350a8e199ad0e9ca4a76a -
Trigger Event:
release
-
Statement type:
File details
Details for the file intent_verify-0.1.2-py3-none-any.whl.
File metadata
- Download URL: intent_verify-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d387faf54a8f9ff64cd387fc2db1ee3bff9cf79c11ba08f509bd867fd4a758e0
|
|
| MD5 |
6cd333027b22208a342a21a3820f8a8f
|
|
| BLAKE2b-256 |
97aadc2133b0fa5bd1c3798373f8c20214cce7c3ebb8eae7e3768a15baf7a113
|
Provenance
The following attestation bundles were made for intent_verify-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on hermes-labs-ai/intent-verify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intent_verify-0.1.2-py3-none-any.whl -
Subject digest:
d387faf54a8f9ff64cd387fc2db1ee3bff9cf79c11ba08f509bd867fd4a758e0 - Sigstore transparency entry: 2341141498
- Sigstore integration time:
-
Permalink:
hermes-labs-ai/intent-verify@5d931d5bb825ec4386c350a8e199ad0e9ca4a76a -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/hermes-labs-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5d931d5bb825ec4386c350a8e199ad0e9ca4a76a -
Trigger Event:
release
-
Statement type: