Autonomous documentation-code misalignment detection using LLM agents
Project description
LyingDocs
Your docs are lying. Here's how to find out.
Every codebase has them: features documented but never shipped, behavior that quietly diverged from the spec, values claimed to be configurable that are hardcoded deep in a function nobody reads. In the age of Vibe Coding, developers ship both code and docs through LLMs — fast, fluid, and increasingly misaligned.
LyingDocs deploys two autonomous agents against your repository to surface these inconsistencies before your users do.
How it works
Hermes autonomously traverses your documentation, plans an audit strategy, and dispatches targeted analysis tasks.
Codex executes each task against your actual codebase, reporting what the code really does.
Hermes reconciles the two — and writes you a report.
Installation
pip install lyingdocs
Quick Start
export OPENAI_API_KEY="sk-..."
lyingdocs analyze --doc-path docs/ --code-path . -o output/audit
Configuration
LyingDocs loads configuration from multiple sources (later overrides earlier):
- Built-in defaults (OpenAI API, gpt-4o)
- Config file —
lyingdocs.tomlin project root, or~/.config/lyingdocs/config.toml - Environment variables /
.envfile - CLI arguments
Config File Example
base_url = "https://api.openai.com/v1"
model = "gpt-5.4"
[codex]
enabled = true
provider = "openai"
wire_api = "responses"
# path = "/usr/local/bin/codex" # optional: explicit path to codex binary
[limits]
max_dispatches = 20
max_iterations = 50
codex_task_timeout = 1200
token_budget = 524288
Environment Variables
| Variable | Description |
|---|---|
OPENAI_API_KEY |
Required. Your OpenAI API key |
BASE_URL |
API base URL |
MODEL |
LLM model name |
CODEX_PROVIDER |
Codex CLI model provider |
CODEX_WIRE_API |
Codex CLI provider wire_api setting ('responses' or 'chat') |
CODEX_PATH |
Explicit path to codex binary |
CODEX_TASK_TIMEOUT |
Timeout per codex task (seconds) |
TOKEN_BUDGET |
Max context tokens before compression |
Codex CLI Setup
LyingDocs optionally uses OpenAI Codex CLI for deep code analysis. Without it, the agent will still work but rely on documentation analysis only.
npm install -g @openai/codex
# Or disable entirely
lyingdocs analyze --doc-path docs/ --code-path . --no-codex
LyingDocs auto-detects Codex in this order:
- Explicit path from config (
codex.path) - System PATH (
which codex) - Local
node_modules/.bin/codex
CLI Reference
# Full analysis
lyingdocs analyze --doc-path docs/ --code-path . -o output/audit
# With custom model
lyingdocs analyze --doc-path docs/ --code-path . -m gpt-4o-mini
# Resume interrupted analysis
lyingdocs analyze --doc-path docs/ --code-path . --resume
# Without Codex
lyingdocs analyze --doc-path docs/ --code-path . --no-codex
# With explicit config file
lyingdocs analyze --doc-path docs/ --code-path . --config myconfig.toml
# Show version
lyingdocs version
Misalignment Categories
| Category | Description |
|---|---|
| LogicMismatch | Code contradicts documentation |
| PhantomSpec | Documentation describes non-existent features |
| ShadowLogic | Important undocumented code logic |
| HardcodedDrift | Supposedly configurable values that are hardcoded |
Roadmap
- Multi-harness support — plug in Claude Code or any code agent alongside Codex
- Deeper analysis — multi-hop reasoning across doc hierarchies; version-aware diffing to catch when code changed but docs didn't
- Auto-fix mode — Hermes proposes doc patches; you review and apply
For Researchers 🔬
A paper is just another kind of documentation — a translation of code into human language, written under deadline, reviewed long after the implementation settled.
If you've ever wondered whether your repo can be used by other researchers, or whether there are misalignments between your paper and your code, LyingDocs can help you find out.
The problem is the same. Paper is documentation for code. LyingDocs is for papers too.
License
MIT
Project details
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 lyingdocs-0.1.0.tar.gz.
File metadata
- Download URL: lyingdocs-0.1.0.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c659fda1bc1859845579913b5d5fb11ea5f19d6bb3b7af0d998e0ae0b422073
|
|
| MD5 |
4e9facabff2a258e3256ea13ac1c1a61
|
|
| BLAKE2b-256 |
374d95e67cd19a50995ba52239dd72ac08aaa064be1d78aa9da3f98a551c954f
|
Provenance
The following attestation bundles were made for lyingdocs-0.1.0.tar.gz:
Publisher:
publish.yml on KMing-L/lying-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lyingdocs-0.1.0.tar.gz -
Subject digest:
5c659fda1bc1859845579913b5d5fb11ea5f19d6bb3b7af0d998e0ae0b422073 - Sigstore transparency entry: 1279879860
- Sigstore integration time:
-
Permalink:
KMing-L/lying-docs@620addaef1f9b6b34553cf2bb98913708885a47c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KMing-L
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@620addaef1f9b6b34553cf2bb98913708885a47c -
Trigger Event:
push
-
Statement type:
File details
Details for the file lyingdocs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lyingdocs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08df3f84bfb4c2b235fb0e4ad8321cbd903be4d8440cb8455ef32acb50d0da84
|
|
| MD5 |
95e2ddd5040915834c49833003f795ec
|
|
| BLAKE2b-256 |
0dc2c8d7658c11fbb4adbb8b3a455ca529ff1337994451ec0e4c85c3db881419
|
Provenance
The following attestation bundles were made for lyingdocs-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on KMing-L/lying-docs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lyingdocs-0.1.0-py3-none-any.whl -
Subject digest:
08df3f84bfb4c2b235fb0e4ad8321cbd903be4d8440cb8455ef32acb50d0da84 - Sigstore transparency entry: 1279879864
- Sigstore integration time:
-
Permalink:
KMing-L/lying-docs@620addaef1f9b6b34553cf2bb98913708885a47c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KMing-L
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@620addaef1f9b6b34553cf2bb98913708885a47c -
Trigger Event:
push
-
Statement type: