lyingdocs 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ __pycache__/
2
+ *.egg-info/
3
+ dist/
4
+ build/
5
+
6
+ lyingdocs.toml
7
+ .env
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 LyingDocs Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,174 @@
1
+ Metadata-Version: 2.4
2
+ Name: lyingdocs
3
+ Version: 0.1.0
4
+ Summary: Autonomous documentation-code misalignment detection using LLM agents
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.11
8
+ Requires-Dist: openai>=1.0
9
+ Requires-Dist: python-dotenv>=1.0
10
+ Provides-Extra: dev
11
+ Requires-Dist: build; extra == 'dev'
12
+ Requires-Dist: pytest; extra == 'dev'
13
+ Requires-Dist: ruff; extra == 'dev'
14
+ Description-Content-Type: text/markdown
15
+
16
+ <p align="center">
17
+ <img src="assets/logo.png" alt="lyingdocs" width="200" />
18
+ </p>
19
+
20
+ <h1 align="center">LyingDocs</h1>
21
+
22
+ <p align="center">
23
+ Your docs are lying. Here's how to find out.
24
+ </p>
25
+
26
+ ---
27
+
28
+ 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.
29
+
30
+ LyingDocs deploys two autonomous agents against your repository to surface these inconsistencies before your users do.
31
+
32
+ ---
33
+
34
+ ## How it works
35
+
36
+ **Hermes** autonomously traverses your documentation, plans an audit strategy, and dispatches targeted analysis tasks.
37
+
38
+ **Codex** executes each task against your actual codebase, reporting what the code *really* does.
39
+
40
+ Hermes reconciles the two — and writes you a report.
41
+
42
+ ---
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install lyingdocs
48
+ ```
49
+
50
+ ## Quick Start
51
+
52
+ ```bash
53
+ export OPENAI_API_KEY="sk-..."
54
+
55
+ lyingdocs analyze --doc-path docs/ --code-path . -o output/audit
56
+ ```
57
+
58
+ ## Configuration
59
+
60
+ LyingDocs loads configuration from multiple sources (later overrides earlier):
61
+
62
+ 1. **Built-in defaults** (OpenAI API, gpt-4o)
63
+ 2. **Config file** — `lyingdocs.toml` in project root, or `~/.config/lyingdocs/config.toml`
64
+ 3. **Environment variables** / `.env` file
65
+ 4. **CLI arguments**
66
+
67
+ ### Config File Example
68
+
69
+ ```toml
70
+ base_url = "https://api.openai.com/v1"
71
+ model = "gpt-5.4"
72
+
73
+ [codex]
74
+ enabled = true
75
+ provider = "openai"
76
+ wire_api = "responses"
77
+ # path = "/usr/local/bin/codex" # optional: explicit path to codex binary
78
+
79
+ [limits]
80
+ max_dispatches = 20
81
+ max_iterations = 50
82
+ codex_task_timeout = 1200
83
+ token_budget = 524288
84
+ ```
85
+
86
+ ### Environment Variables
87
+
88
+ | Variable | Description |
89
+ |----------|-------------|
90
+ | `OPENAI_API_KEY` | **Required.** Your OpenAI API key |
91
+ | `BASE_URL` | API base URL |
92
+ | `MODEL` | LLM model name |
93
+ | `CODEX_PROVIDER` | Codex CLI model provider |
94
+ | `CODEX_WIRE_API` | Codex CLI provider wire_api setting ('responses' or 'chat') |
95
+ | `CODEX_PATH` | Explicit path to codex binary |
96
+ | `CODEX_TASK_TIMEOUT` | Timeout per codex task (seconds) |
97
+ | `TOKEN_BUDGET` | Max context tokens before compression |
98
+
99
+ ---
100
+
101
+ ## Codex CLI Setup
102
+
103
+ LyingDocs optionally uses [OpenAI Codex CLI](https://github.com/openai/codex) for deep code analysis. Without it, the agent will still work but rely on documentation analysis only.
104
+
105
+ ```bash
106
+ npm install -g @openai/codex
107
+
108
+ # Or disable entirely
109
+ lyingdocs analyze --doc-path docs/ --code-path . --no-codex
110
+ ```
111
+
112
+ LyingDocs auto-detects Codex in this order:
113
+ 1. Explicit path from config (`codex.path`)
114
+ 2. System PATH (`which codex`)
115
+ 3. Local `node_modules/.bin/codex`
116
+
117
+ ---
118
+
119
+ ## CLI Reference
120
+
121
+ ```bash
122
+ # Full analysis
123
+ lyingdocs analyze --doc-path docs/ --code-path . -o output/audit
124
+
125
+ # With custom model
126
+ lyingdocs analyze --doc-path docs/ --code-path . -m gpt-4o-mini
127
+
128
+ # Resume interrupted analysis
129
+ lyingdocs analyze --doc-path docs/ --code-path . --resume
130
+
131
+ # Without Codex
132
+ lyingdocs analyze --doc-path docs/ --code-path . --no-codex
133
+
134
+ # With explicit config file
135
+ lyingdocs analyze --doc-path docs/ --code-path . --config myconfig.toml
136
+
137
+ # Show version
138
+ lyingdocs version
139
+ ```
140
+
141
+ ---
142
+
143
+ ## Misalignment Categories
144
+
145
+ | Category | Description |
146
+ |----------|-------------|
147
+ | **LogicMismatch** | Code contradicts documentation |
148
+ | **PhantomSpec** | Documentation describes non-existent features |
149
+ | **ShadowLogic** | Important undocumented code logic |
150
+ | **HardcodedDrift** | Supposedly configurable values that are hardcoded |
151
+
152
+ ---
153
+
154
+ ## Roadmap
155
+
156
+ - [ ] **Multi-harness support** — plug in Claude Code or any code agent alongside Codex
157
+ - [ ] **Deeper analysis** — multi-hop reasoning across doc hierarchies; version-aware diffing to catch when code changed but docs didn't
158
+ - [ ] **Auto-fix mode** — Hermes proposes doc patches; you review and apply
159
+
160
+ ---
161
+
162
+ ## For Researchers 🔬
163
+
164
+ A paper is just another kind of documentation — a translation of code into human language, written under deadline, reviewed long after the implementation settled.
165
+
166
+ 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.
167
+
168
+ The problem is the same. Paper is documentation for code. LyingDocs is for papers too.
169
+
170
+ ---
171
+
172
+ ## License
173
+
174
+ MIT
@@ -0,0 +1,159 @@
1
+ <p align="center">
2
+ <img src="assets/logo.png" alt="lyingdocs" width="200" />
3
+ </p>
4
+
5
+ <h1 align="center">LyingDocs</h1>
6
+
7
+ <p align="center">
8
+ Your docs are lying. Here's how to find out.
9
+ </p>
10
+
11
+ ---
12
+
13
+ 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.
14
+
15
+ LyingDocs deploys two autonomous agents against your repository to surface these inconsistencies before your users do.
16
+
17
+ ---
18
+
19
+ ## How it works
20
+
21
+ **Hermes** autonomously traverses your documentation, plans an audit strategy, and dispatches targeted analysis tasks.
22
+
23
+ **Codex** executes each task against your actual codebase, reporting what the code *really* does.
24
+
25
+ Hermes reconciles the two — and writes you a report.
26
+
27
+ ---
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ pip install lyingdocs
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ ```bash
38
+ export OPENAI_API_KEY="sk-..."
39
+
40
+ lyingdocs analyze --doc-path docs/ --code-path . -o output/audit
41
+ ```
42
+
43
+ ## Configuration
44
+
45
+ LyingDocs loads configuration from multiple sources (later overrides earlier):
46
+
47
+ 1. **Built-in defaults** (OpenAI API, gpt-4o)
48
+ 2. **Config file** — `lyingdocs.toml` in project root, or `~/.config/lyingdocs/config.toml`
49
+ 3. **Environment variables** / `.env` file
50
+ 4. **CLI arguments**
51
+
52
+ ### Config File Example
53
+
54
+ ```toml
55
+ base_url = "https://api.openai.com/v1"
56
+ model = "gpt-5.4"
57
+
58
+ [codex]
59
+ enabled = true
60
+ provider = "openai"
61
+ wire_api = "responses"
62
+ # path = "/usr/local/bin/codex" # optional: explicit path to codex binary
63
+
64
+ [limits]
65
+ max_dispatches = 20
66
+ max_iterations = 50
67
+ codex_task_timeout = 1200
68
+ token_budget = 524288
69
+ ```
70
+
71
+ ### Environment Variables
72
+
73
+ | Variable | Description |
74
+ |----------|-------------|
75
+ | `OPENAI_API_KEY` | **Required.** Your OpenAI API key |
76
+ | `BASE_URL` | API base URL |
77
+ | `MODEL` | LLM model name |
78
+ | `CODEX_PROVIDER` | Codex CLI model provider |
79
+ | `CODEX_WIRE_API` | Codex CLI provider wire_api setting ('responses' or 'chat') |
80
+ | `CODEX_PATH` | Explicit path to codex binary |
81
+ | `CODEX_TASK_TIMEOUT` | Timeout per codex task (seconds) |
82
+ | `TOKEN_BUDGET` | Max context tokens before compression |
83
+
84
+ ---
85
+
86
+ ## Codex CLI Setup
87
+
88
+ LyingDocs optionally uses [OpenAI Codex CLI](https://github.com/openai/codex) for deep code analysis. Without it, the agent will still work but rely on documentation analysis only.
89
+
90
+ ```bash
91
+ npm install -g @openai/codex
92
+
93
+ # Or disable entirely
94
+ lyingdocs analyze --doc-path docs/ --code-path . --no-codex
95
+ ```
96
+
97
+ LyingDocs auto-detects Codex in this order:
98
+ 1. Explicit path from config (`codex.path`)
99
+ 2. System PATH (`which codex`)
100
+ 3. Local `node_modules/.bin/codex`
101
+
102
+ ---
103
+
104
+ ## CLI Reference
105
+
106
+ ```bash
107
+ # Full analysis
108
+ lyingdocs analyze --doc-path docs/ --code-path . -o output/audit
109
+
110
+ # With custom model
111
+ lyingdocs analyze --doc-path docs/ --code-path . -m gpt-4o-mini
112
+
113
+ # Resume interrupted analysis
114
+ lyingdocs analyze --doc-path docs/ --code-path . --resume
115
+
116
+ # Without Codex
117
+ lyingdocs analyze --doc-path docs/ --code-path . --no-codex
118
+
119
+ # With explicit config file
120
+ lyingdocs analyze --doc-path docs/ --code-path . --config myconfig.toml
121
+
122
+ # Show version
123
+ lyingdocs version
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Misalignment Categories
129
+
130
+ | Category | Description |
131
+ |----------|-------------|
132
+ | **LogicMismatch** | Code contradicts documentation |
133
+ | **PhantomSpec** | Documentation describes non-existent features |
134
+ | **ShadowLogic** | Important undocumented code logic |
135
+ | **HardcodedDrift** | Supposedly configurable values that are hardcoded |
136
+
137
+ ---
138
+
139
+ ## Roadmap
140
+
141
+ - [ ] **Multi-harness support** — plug in Claude Code or any code agent alongside Codex
142
+ - [ ] **Deeper analysis** — multi-hop reasoning across doc hierarchies; version-aware diffing to catch when code changed but docs didn't
143
+ - [ ] **Auto-fix mode** — Hermes proposes doc patches; you review and apply
144
+
145
+ ---
146
+
147
+ ## For Researchers 🔬
148
+
149
+ A paper is just another kind of documentation — a translation of code into human language, written under deadline, reviewed long after the implementation settled.
150
+
151
+ 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.
152
+
153
+ The problem is the same. Paper is documentation for code. LyingDocs is for papers too.
154
+
155
+ ---
156
+
157
+ ## License
158
+
159
+ MIT
@@ -0,0 +1,3 @@
1
+ """LyingDocs: Documentation-Code Misalignment Detection."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,5 @@
1
+ """Allow running as: python -m lyingdocs"""
2
+
3
+ from .cli import main
4
+
5
+ main()