docguard 0.1.1b4__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.
Files changed (75) hide show
  1. docguard-0.1.1b4/.github/workflows/ci.yml +47 -0
  2. docguard-0.1.1b4/.github/workflows/publish-pypi.yml +52 -0
  3. docguard-0.1.1b4/.gitignore +16 -0
  4. docguard-0.1.1b4/LICENSE +21 -0
  5. docguard-0.1.1b4/PKG-INFO +190 -0
  6. docguard-0.1.1b4/README.md +168 -0
  7. docguard-0.1.1b4/SPEC.md +311 -0
  8. docguard-0.1.1b4/docguard-v1-phases.md +350 -0
  9. docguard-0.1.1b4/docguard_bootstrap/__init__.py +3 -0
  10. docguard-0.1.1b4/docguard_bootstrap/cli.py +172 -0
  11. docguard-0.1.1b4/docs/explainer.md +350 -0
  12. docguard-0.1.1b4/package-lock.json +4364 -0
  13. docguard-0.1.1b4/package.json +68 -0
  14. docguard-0.1.1b4/pyproject.toml +37 -0
  15. docguard-0.1.1b4/src/bypass/env.ts +8 -0
  16. docguard-0.1.1b4/src/bypass/log.ts +27 -0
  17. docguard-0.1.1b4/src/cli/commands/check.ts +150 -0
  18. docguard-0.1.1b4/src/cli/commands/init.ts +134 -0
  19. docguard-0.1.1b4/src/cli/commands/uninstall.ts +26 -0
  20. docguard-0.1.1b4/src/cli/index.ts +70 -0
  21. docguard-0.1.1b4/src/config/defaults.ts +37 -0
  22. docguard-0.1.1b4/src/config/load.ts +107 -0
  23. docguard-0.1.1b4/src/config/schema.ts +74 -0
  24. docguard-0.1.1b4/src/docs/chunk.ts +172 -0
  25. docguard-0.1.1b4/src/docs/load.ts +38 -0
  26. docguard-0.1.1b4/src/docs/parse-markdown.ts +57 -0
  27. docguard-0.1.1b4/src/embeddings/cache.ts +117 -0
  28. docguard-0.1.1b4/src/embeddings/embed.ts +40 -0
  29. docguard-0.1.1b4/src/git/install-hook.ts +75 -0
  30. docguard-0.1.1b4/src/git/staged-diff.ts +109 -0
  31. docguard-0.1.1b4/src/git/staged-files.ts +125 -0
  32. docguard-0.1.1b4/src/git/uninstall-hook.ts +77 -0
  33. docguard-0.1.1b4/src/grading/apply-severity.ts +113 -0
  34. docguard-0.1.1b4/src/index.ts +3 -0
  35. docguard-0.1.1b4/src/llm/groq.ts +78 -0
  36. docguard-0.1.1b4/src/llm/prompts/semantic.ts +83 -0
  37. docguard-0.1.1b4/src/llm/provider.ts +30 -0
  38. docguard-0.1.1b4/src/report/format.ts +56 -0
  39. docguard-0.1.1b4/src/report/print.ts +6 -0
  40. docguard-0.1.1b4/src/retrieval/cosine.ts +15 -0
  41. docguard-0.1.1b4/src/retrieval/path-boost.ts +35 -0
  42. docguard-0.1.1b4/src/retrieval/rank.ts +82 -0
  43. docguard-0.1.1b4/src/rules/deterministic/.gitkeep +0 -0
  44. docguard-0.1.1b4/src/rules/semantic/run.ts +54 -0
  45. docguard-0.1.1b4/src/rules/semantic/validate-response.ts +65 -0
  46. docguard-0.1.1b4/src/types/config.ts +1 -0
  47. docguard-0.1.1b4/src/types/diff.ts +24 -0
  48. docguard-0.1.1b4/src/types/docs.ts +16 -0
  49. docguard-0.1.1b4/src/types/result.ts +37 -0
  50. docguard-0.1.1b4/src/utils/dotenv.ts +66 -0
  51. docguard-0.1.1b4/src/utils/errors.ts +23 -0
  52. docguard-0.1.1b4/src/utils/logger.ts +19 -0
  53. docguard-0.1.1b4/src/utils/paths.ts +22 -0
  54. docguard-0.1.1b4/templates/.docguard.json +33 -0
  55. docguard-0.1.1b4/templates/pre-commit +2 -0
  56. docguard-0.1.1b4/tests/cli/.gitkeep +0 -0
  57. docguard-0.1.1b4/tests/config/.gitkeep +0 -0
  58. docguard-0.1.1b4/tests/config/dotenv.test.ts +83 -0
  59. docguard-0.1.1b4/tests/config/load.test.ts +64 -0
  60. docguard-0.1.1b4/tests/docs/.gitkeep +0 -0
  61. docguard-0.1.1b4/tests/docs/chunk.test.ts +75 -0
  62. docguard-0.1.1b4/tests/fixtures/diffs/.gitkeep +0 -0
  63. docguard-0.1.1b4/tests/fixtures/docs/.gitkeep +0 -0
  64. docguard-0.1.1b4/tests/git/.gitkeep +0 -0
  65. docguard-0.1.1b4/tests/git/hooks.test.ts +81 -0
  66. docguard-0.1.1b4/tests/git/staged.test.ts +107 -0
  67. docguard-0.1.1b4/tests/grading/.gitkeep +0 -0
  68. docguard-0.1.1b4/tests/grading/apply-severity.test.ts +68 -0
  69. docguard-0.1.1b4/tests/llm/.gitkeep +0 -0
  70. docguard-0.1.1b4/tests/llm/validate-response.test.ts +80 -0
  71. docguard-0.1.1b4/tests/retrieval/.gitkeep +0 -0
  72. docguard-0.1.1b4/tests/retrieval/cosine.test.ts +37 -0
  73. docguard-0.1.1b4/tests/retrieval/rank.test.ts +96 -0
  74. docguard-0.1.1b4/tests/rules/.gitkeep +0 -0
  75. docguard-0.1.1b4/tsconfig.json +36 -0
@@ -0,0 +1,47 @@
1
+ name: ci
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ name: typecheck + test
12
+ runs-on: ${{ matrix.os }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-latest, windows-latest]
17
+ node: [18, 20, 22]
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: setup node ${{ matrix.node }}
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: ${{ matrix.node }}
26
+ cache: npm
27
+
28
+ - name: install
29
+ run: npm ci
30
+
31
+ - name: typecheck
32
+ run: npm run typecheck
33
+
34
+ - name: build
35
+ run: npm run build
36
+
37
+ - name: test
38
+ run: npm test
39
+
40
+ - name: verify hook uses LF line endings
41
+ if: runner.os != 'Windows'
42
+ shell: bash
43
+ run: |
44
+ if grep -qU $'\r' templates/pre-commit; then
45
+ echo "templates/pre-commit contains CRLF"
46
+ exit 1
47
+ fi
@@ -0,0 +1,52 @@
1
+ name: publish-pypi
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ release:
6
+ types: [published]
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ name: build python package
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: setup python
21
+ uses: actions/setup-python@v5
22
+ with:
23
+ python-version: "3.11"
24
+
25
+ - name: install build tool
26
+ run: python -m pip install --upgrade build
27
+
28
+ - name: build distributions
29
+ run: python -m build
30
+
31
+ - name: upload dist artifacts
32
+ uses: actions/upload-artifact@v4
33
+ with:
34
+ name: python-dist
35
+ path: dist/
36
+
37
+ publish:
38
+ name: publish to pypi
39
+ runs-on: ubuntu-latest
40
+ needs: build
41
+ environment:
42
+ name: pypi
43
+
44
+ steps:
45
+ - name: download dist artifacts
46
+ uses: actions/download-artifact@v4
47
+ with:
48
+ name: python-dist
49
+ path: dist/
50
+
51
+ - name: publish package
52
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,16 @@
1
+ node_modules/
2
+ dist/
3
+ *.log
4
+ .env
5
+ .env.local
6
+
7
+ .docguard/cache/
8
+ .docguard/bypass.log
9
+ .docguard/errors.log
10
+
11
+ .DS_Store
12
+ Thumbs.db
13
+ .vscode/
14
+ .idea/
15
+ __pycache__/
16
+ *.pyc
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mobasshir khan
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,190 @@
1
+ Metadata-Version: 2.4
2
+ Name: docguard
3
+ Version: 0.1.1b4
4
+ Summary: Python companion CLI for bootstrapping the Node-based DocGuard tool in uv-managed projects.
5
+ Author: mobasshir khan
6
+ License: MIT
7
+ License-File: LICENSE
8
+ Keywords: docguard,documentation,git-hooks,pre-commit,uv
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Quality Assurance
19
+ Classifier: Topic :: Software Development :: Version Control :: Git
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+
23
+ # DocGuard
24
+
25
+ > **Early beta — expect rough edges.** Documentation-aware pre-commit guard for AI-assisted development.
26
+
27
+ DocGuard reads your project's markdown docs, looks at staged changes across any text-based language, and blocks commits that contradict the rules you've written down. It is not a linter. It enforces *your* project's documented intent.
28
+
29
+ ```
30
+ BLOCK services/user_service.py:18 [architecture]
31
+ Direct database call from request handler
32
+ Cited: docs/architecture.md:23
33
+ "All database access must go through the repository layer"
34
+
35
+ Summary: 1 error(s), 0 warning(s).
36
+ Commit blocked. Bypass: git commit --no-verify or DOCGUARD_BYPASS=1 git commit
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ npm install --save-dev @mobasshirkhan/docguard
45
+ npx docguard init
46
+ ```
47
+
48
+ For `uv`-managed Python projects, you can bootstrap from this repo through `uvx`:
49
+
50
+ ```bash
51
+ uvx --from git+https://github.com/mobi2400/DocsGuard-.git docguard install
52
+ ```
53
+
54
+ That Python helper installs the npm package in the current repo and then runs `docguard init`. Use `--package-manager` if you want `pnpm`, `yarn`, or `bun` instead of auto-detecting.
55
+
56
+ `docguard init` will:
57
+
58
+ - write `.docguard.json`
59
+ - install a `pre-commit` hook (Husky-aware, falls back to `.git/hooks/`)
60
+ - update `.gitignore`
61
+ - pre-warm the local embedding model (~25 MB one-time download)
62
+
63
+ You also need a Groq API key (free tier works). Three ways to set it:
64
+
65
+ **`.env` file in your project root (easiest):**
66
+ ```
67
+ GROQ_API_KEY=gsk_...
68
+ ```
69
+ DocGuard reads `.env` from the repo root automatically. Existing shell env vars are not overridden.
70
+
71
+ **Or shell session:**
72
+ ```bash
73
+ export GROQ_API_KEY=gsk_...
74
+ ```
75
+
76
+ **Or system-wide (Windows):**
77
+ ```powershell
78
+ setx GROQ_API_KEY "gsk_..."
79
+ ```
80
+
81
+ Get a key at [console.groq.com](https://console.groq.com). Without one, DocGuard skips semantic checks and lets commits through.
82
+
83
+ ## Requirements
84
+
85
+ - Node `>= 18.17`
86
+ - Disk: `@xenova/transformers` adds ~70 MB to `node_modules` (local embeddings, no per-commit API cost)
87
+
88
+ ## Usage
89
+
90
+ The hook runs automatically on every `git commit`. To run manually:
91
+
92
+ ```bash
93
+ docguard check
94
+ ```
95
+
96
+ Bypass:
97
+
98
+ ```bash
99
+ git commit --no-verify # standard git escape hatch
100
+ DOCGUARD_BYPASS=1 git commit # explicit, logged to .docguard/bypass.log
101
+ ```
102
+
103
+ Uninstall:
104
+
105
+ ```bash
106
+ docguard uninstall # removes hook + cache
107
+ docguard uninstall --purge # also removes .docguard.json
108
+ ```
109
+
110
+ ## Configuration
111
+
112
+ `.docguard.json`:
113
+
114
+ ```json
115
+ {
116
+ "docs": ["./docs/**/*.md"],
117
+ "ignore": [
118
+ "**/*.test.*",
119
+ "**/*.spec.*",
120
+ "**/__tests__/**",
121
+ "**/test/**",
122
+ "**/tests/**",
123
+ "**/__pycache__/**",
124
+ "**/.pytest_cache/**",
125
+ "**/node_modules/**",
126
+ "**/.venv/**",
127
+ "**/venv/**",
128
+ "**/vendor/**"
129
+ ],
130
+ "severity": {
131
+ "security": "block",
132
+ "architecture": "warn",
133
+ "api-contract": "warn",
134
+ "naming": "warn",
135
+ "style": "warn"
136
+ },
137
+ "priority": {
138
+ "./docs/architecture.md": "critical"
139
+ },
140
+ "llm": {
141
+ "provider": "groq",
142
+ "model": "llama-3.3-70b-versatile"
143
+ },
144
+ "retrieval": {
145
+ "topK": 6,
146
+ "minScore": 0.15
147
+ },
148
+ "timeoutMs": 5000
149
+ }
150
+ ```
151
+
152
+ - **severity** — per-category, never per-named-rule. Categories are fixed: `security`, `architecture`, `api-contract`, `naming`, `style`.
153
+ - **priority** — boost retrieval ranking for critical docs.
154
+ - **timeoutMs** — hard cap on the semantic check. On timeout, commit is allowed.
155
+
156
+ ## How it works
157
+
158
+ 1. Reads staged hunks via `git diff --cached`.
159
+ 2. Splits configured markdown into ≤1500-char chunks by heading.
160
+ 3. Embeds chunks locally with MiniLM (`@xenova/transformers`), cached to `.docguard/cache/`.
161
+ 4. Ranks chunks against the diff by cosine + path overlap + priority.
162
+ 5. Sends only the top-relevant chunks plus the diff to Groq for judgment.
163
+ 6. Validates the response: every violation must cite a `chunk_id` with a quote that is a real substring of the chunk. Otherwise it's downgraded to a warning.
164
+
165
+ DocGuard is language-agnostic at review time: if Git can stage it as text, DocGuard can compare that diff against your docs. The current package runtime is still Node-based, but the repository under review can be Python, Go, Java, Ruby, PHP, Rust, mixed-language monorepos, or anything similar.
166
+
167
+ For Python and `uv` users, the companion bootstrap CLI supports:
168
+
169
+ ```bash
170
+ uvx --from git+https://github.com/mobi2400/DocsGuard-.git docguard install
171
+ uvx --from git+https://github.com/mobi2400/DocsGuard-.git docguard check
172
+ uvx --from git+https://github.com/mobi2400/DocsGuard-.git docguard uninstall
173
+ ```
174
+
175
+ ## Trust guarantees
176
+
177
+ - **No telemetry.** Nothing leaves your machine except the redacted diff + relevant doc chunks going to Groq for the semantic check.
178
+ - **Citation-or-downgrade.** Every blocking violation must reference a real chunk and quote real text. Hallucinated citations are auto-downgraded to warn.
179
+ - **DocGuard never blocks on its own bugs.** Internal errors fail open (commit proceeds, error logged).
180
+ - **Bypass is local, visible, and logged.**
181
+
182
+ ## Project docs
183
+
184
+ - [SPEC.md](SPEC.md) — locked v1 build spec
185
+ - [docguard-v1-phases.md](docguard-v1-phases.md) — phased build plan
186
+ - [docs/explainer.md](docs/explainer.md) — long-form intro
187
+
188
+ ## License
189
+
190
+ MIT
@@ -0,0 +1,168 @@
1
+ # DocGuard
2
+
3
+ > **Early beta — expect rough edges.** Documentation-aware pre-commit guard for AI-assisted development.
4
+
5
+ DocGuard reads your project's markdown docs, looks at staged changes across any text-based language, and blocks commits that contradict the rules you've written down. It is not a linter. It enforces *your* project's documented intent.
6
+
7
+ ```
8
+ BLOCK services/user_service.py:18 [architecture]
9
+ Direct database call from request handler
10
+ Cited: docs/architecture.md:23
11
+ "All database access must go through the repository layer"
12
+
13
+ Summary: 1 error(s), 0 warning(s).
14
+ Commit blocked. Bypass: git commit --no-verify or DOCGUARD_BYPASS=1 git commit
15
+ ```
16
+
17
+ ---
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm install --save-dev @mobasshirkhan/docguard
23
+ npx docguard init
24
+ ```
25
+
26
+ For `uv`-managed Python projects, you can bootstrap from this repo through `uvx`:
27
+
28
+ ```bash
29
+ uvx --from git+https://github.com/mobi2400/DocsGuard-.git docguard install
30
+ ```
31
+
32
+ That Python helper installs the npm package in the current repo and then runs `docguard init`. Use `--package-manager` if you want `pnpm`, `yarn`, or `bun` instead of auto-detecting.
33
+
34
+ `docguard init` will:
35
+
36
+ - write `.docguard.json`
37
+ - install a `pre-commit` hook (Husky-aware, falls back to `.git/hooks/`)
38
+ - update `.gitignore`
39
+ - pre-warm the local embedding model (~25 MB one-time download)
40
+
41
+ You also need a Groq API key (free tier works). Three ways to set it:
42
+
43
+ **`.env` file in your project root (easiest):**
44
+ ```
45
+ GROQ_API_KEY=gsk_...
46
+ ```
47
+ DocGuard reads `.env` from the repo root automatically. Existing shell env vars are not overridden.
48
+
49
+ **Or shell session:**
50
+ ```bash
51
+ export GROQ_API_KEY=gsk_...
52
+ ```
53
+
54
+ **Or system-wide (Windows):**
55
+ ```powershell
56
+ setx GROQ_API_KEY "gsk_..."
57
+ ```
58
+
59
+ Get a key at [console.groq.com](https://console.groq.com). Without one, DocGuard skips semantic checks and lets commits through.
60
+
61
+ ## Requirements
62
+
63
+ - Node `>= 18.17`
64
+ - Disk: `@xenova/transformers` adds ~70 MB to `node_modules` (local embeddings, no per-commit API cost)
65
+
66
+ ## Usage
67
+
68
+ The hook runs automatically on every `git commit`. To run manually:
69
+
70
+ ```bash
71
+ docguard check
72
+ ```
73
+
74
+ Bypass:
75
+
76
+ ```bash
77
+ git commit --no-verify # standard git escape hatch
78
+ DOCGUARD_BYPASS=1 git commit # explicit, logged to .docguard/bypass.log
79
+ ```
80
+
81
+ Uninstall:
82
+
83
+ ```bash
84
+ docguard uninstall # removes hook + cache
85
+ docguard uninstall --purge # also removes .docguard.json
86
+ ```
87
+
88
+ ## Configuration
89
+
90
+ `.docguard.json`:
91
+
92
+ ```json
93
+ {
94
+ "docs": ["./docs/**/*.md"],
95
+ "ignore": [
96
+ "**/*.test.*",
97
+ "**/*.spec.*",
98
+ "**/__tests__/**",
99
+ "**/test/**",
100
+ "**/tests/**",
101
+ "**/__pycache__/**",
102
+ "**/.pytest_cache/**",
103
+ "**/node_modules/**",
104
+ "**/.venv/**",
105
+ "**/venv/**",
106
+ "**/vendor/**"
107
+ ],
108
+ "severity": {
109
+ "security": "block",
110
+ "architecture": "warn",
111
+ "api-contract": "warn",
112
+ "naming": "warn",
113
+ "style": "warn"
114
+ },
115
+ "priority": {
116
+ "./docs/architecture.md": "critical"
117
+ },
118
+ "llm": {
119
+ "provider": "groq",
120
+ "model": "llama-3.3-70b-versatile"
121
+ },
122
+ "retrieval": {
123
+ "topK": 6,
124
+ "minScore": 0.15
125
+ },
126
+ "timeoutMs": 5000
127
+ }
128
+ ```
129
+
130
+ - **severity** — per-category, never per-named-rule. Categories are fixed: `security`, `architecture`, `api-contract`, `naming`, `style`.
131
+ - **priority** — boost retrieval ranking for critical docs.
132
+ - **timeoutMs** — hard cap on the semantic check. On timeout, commit is allowed.
133
+
134
+ ## How it works
135
+
136
+ 1. Reads staged hunks via `git diff --cached`.
137
+ 2. Splits configured markdown into ≤1500-char chunks by heading.
138
+ 3. Embeds chunks locally with MiniLM (`@xenova/transformers`), cached to `.docguard/cache/`.
139
+ 4. Ranks chunks against the diff by cosine + path overlap + priority.
140
+ 5. Sends only the top-relevant chunks plus the diff to Groq for judgment.
141
+ 6. Validates the response: every violation must cite a `chunk_id` with a quote that is a real substring of the chunk. Otherwise it's downgraded to a warning.
142
+
143
+ DocGuard is language-agnostic at review time: if Git can stage it as text, DocGuard can compare that diff against your docs. The current package runtime is still Node-based, but the repository under review can be Python, Go, Java, Ruby, PHP, Rust, mixed-language monorepos, or anything similar.
144
+
145
+ For Python and `uv` users, the companion bootstrap CLI supports:
146
+
147
+ ```bash
148
+ uvx --from git+https://github.com/mobi2400/DocsGuard-.git docguard install
149
+ uvx --from git+https://github.com/mobi2400/DocsGuard-.git docguard check
150
+ uvx --from git+https://github.com/mobi2400/DocsGuard-.git docguard uninstall
151
+ ```
152
+
153
+ ## Trust guarantees
154
+
155
+ - **No telemetry.** Nothing leaves your machine except the redacted diff + relevant doc chunks going to Groq for the semantic check.
156
+ - **Citation-or-downgrade.** Every blocking violation must reference a real chunk and quote real text. Hallucinated citations are auto-downgraded to warn.
157
+ - **DocGuard never blocks on its own bugs.** Internal errors fail open (commit proceeds, error logged).
158
+ - **Bypass is local, visible, and logged.**
159
+
160
+ ## Project docs
161
+
162
+ - [SPEC.md](SPEC.md) — locked v1 build spec
163
+ - [docguard-v1-phases.md](docguard-v1-phases.md) — phased build plan
164
+ - [docs/explainer.md](docs/explainer.md) — long-form intro
165
+
166
+ ## License
167
+
168
+ MIT