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.
Argus executes each task against your actual codebase, reporting what the code really does. You choose how Argus investigates the code — pick the backend that fits your setup:
codex— OpenAI Codex CLI subprocessclaude_code— Claude Code CLI subprocess (claude -p)local— a built-in minimal agent loop that uses filesystem tools and calls any OpenAI-compatible API directly (no external CLI required)
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
Hermes and Argus are configured independently, so you can run a cheaper planner model for Hermes and a stronger coder model for Argus (or point them at entirely different API endpoints).
Config File Example
[hermes]
model = "gpt-5.4"
base_url = "https://api.openai.com/v1"
# api_key_env = "OPENAI_API_KEY" # optional — defaults to OPENAI_API_KEY
[argus]
backend = "local" # "codex" | "claude_code" | "local"
model = "gpt-5.4"
base_url = "https://api.openai.com/v1"
# api_key_env = "OPENAI_API_KEY"
# Only read when argus.backend = "codex"
[argus.codex]
provider = "openai"
wire_api = "responses"
# path = "/usr/local/bin/codex" # optional: explicit codex binary path
# Only read when argus.backend = "claude_code"
[argus.claude_code]
# path = "/usr/local/bin/claude" # optional: explicit claude binary path
# Only read when argus.backend = "local"
[argus.local]
max_iterations = 25 # per-task agent loop cap
max_read_bytes = 200000 # per read_file call
[limits]
max_dispatches = 20 # max Argus dispatches per Hermes run
max_iterations = 50 # max Hermes loop iterations
argus_task_timeout = 1200 # seconds per Argus task (codex / claude_code backends)
token_budget = 524288 # Hermes context budget before compression
Note: The previous flat format (top-level
model/base_urland a[codex]section) is no longer supported. LyingDocs will exit with a clear migration error if it sees the old shape — move to[hermes]/[argus]as shown above.
Environment Variables
| Variable | Description |
|---|---|
OPENAI_API_KEY |
Required. API key used by both agents unless overridden via api_key_env |
HERMES_MODEL |
Hermes LLM model name |
HERMES_BASE_URL |
Hermes API base URL |
ARGUS_BACKEND |
codex, claude_code, or local |
ARGUS_MODEL |
Argus LLM model name |
ARGUS_BASE_URL |
Argus API base URL |
ARGUS_CODEX_PROVIDER |
Codex backend: provider name |
ARGUS_CODEX_WIRE_API |
Codex backend: provider wire_api (responses or chat) |
ARGUS_CODEX_PATH |
Codex backend: explicit path to the codex binary |
ARGUS_CLAUDE_CODE_PATH |
Claude Code backend: explicit path to the claude binary |
ARGUS_TASK_TIMEOUT |
Timeout per Argus task (seconds, used by codex / claude_code backends) |
TOKEN_BUDGET |
Hermes context tokens before compression |
Argus Backends
Argus is the "deep code analysis" side of the pipeline. Pick one backend in lyingdocs.toml (or via --argus-backend):
local (no external CLI required)
A built-in agent loop that uses list_directory / read_file / search_code / finish tools and calls any OpenAI-compatible chat completions API directly. Best for getting started — only needs an API key.
[argus]
backend = "local"
model = "gpt-5.4"
base_url = "https://api.openai.com/v1"
codex (OpenAI Codex CLI)
npm install -g @openai/codex
[argus]
backend = "codex"
[argus.codex]
provider = "openai"
wire_api = "responses"
# path = "/usr/local/bin/codex" # optional
Codex is auto-detected in this order:
- Explicit path from config (
argus.codex.path) - System
PATH(which codex) - Local
node_modules/.bin/codex
claude_code (Claude Code)
[argus]
backend = "claude_code"
model = "claude-sonnet-4-6"
[argus.claude_code]
# path = "/usr/local/bin/claude" # optional; else resolved via PATH
Invoked as claude -p <prompt> --model <argus_model> --output-format text with cwd set to your code root.
CLI Reference
# Full analysis
lyingdocs analyze --doc-path docs/ --code-path . -o output/audit
# Pick the Argus backend on the command line
lyingdocs analyze --doc-path docs/ --code-path . --argus-backend=local
# Different models for Hermes and Argus
lyingdocs analyze --doc-path docs/ --code-path . \
--hermes-model gpt-4o-mini \
--argus-model gpt-5.4
# Resume interrupted analysis
lyingdocs analyze --doc-path docs/ --code-path . --resume
# With explicit config file
lyingdocs analyze --doc-path docs/ --code-path . --config myconfig.toml
# Show version
lyingdocs version
Available flags: --hermes-model, --hermes-base-url, --argus-backend {codex,claude_code,local}, --argus-model, --argus-base-url, --argus-codex-provider, --argus-codex-wire-api, --max-dispatches, --max-iterations, --config, --resume.
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 — Argus now runs on Codex, Claude Code, or a built-in local agent
- Deeper analysis — multi-hop reasoning across doc hierarchies; version-aware diffing to catch when code changed but docs didn't
- Customization for papers — a "paper mode" that treats academic papers as documentation and surfaces misalignments between paper claims and code behavior
- 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.1.tar.gz.
File metadata
- Download URL: lyingdocs-0.1.1.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ab92f4b60d77444fa6ef448edb30adca2fe10bac69308d3983711c0c2ba70ea
|
|
| MD5 |
e99a5485c2fafbb1a6412c15b6a9a3a5
|
|
| BLAKE2b-256 |
2f2942fff3257b1a91a5ee1c780fb6aec47b0ea22e5d40e0e0974f4a0150f4da
|
Provenance
The following attestation bundles were made for lyingdocs-0.1.1.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.1.tar.gz -
Subject digest:
0ab92f4b60d77444fa6ef448edb30adca2fe10bac69308d3983711c0c2ba70ea - Sigstore transparency entry: 1280491394
- Sigstore integration time:
-
Permalink:
KMing-L/lying-docs@98a44e96d3ffa24f5bf920f56a372c31d13f50f8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/KMing-L
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@98a44e96d3ffa24f5bf920f56a372c31d13f50f8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lyingdocs-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lyingdocs-0.1.1-py3-none-any.whl
- Upload date:
- Size: 36.2 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 |
b733e9ac56abb3a76685d850c4507682a4d64b2ffe6b7cf65dc7d84beba01888
|
|
| MD5 |
1aa7624de23f779cbe188c2721b56b44
|
|
| BLAKE2b-256 |
0fb2e82c1304e3c3ddd314f020a05c8cab48f834cd3b21d0909bd0906df5f542
|
Provenance
The following attestation bundles were made for lyingdocs-0.1.1-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.1-py3-none-any.whl -
Subject digest:
b733e9ac56abb3a76685d850c4507682a4d64b2ffe6b7cf65dc7d84beba01888 - Sigstore transparency entry: 1280491397
- Sigstore integration time:
-
Permalink:
KMing-L/lying-docs@98a44e96d3ffa24f5bf920f56a372c31d13f50f8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/KMing-L
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@98a44e96d3ffa24f5bf920f56a372c31d13f50f8 -
Trigger Event:
push
-
Statement type: