docguard-cli 0.9.5__py3-none-any.whl
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.
docguard_cli/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""DocGuard CLI — Python wrapper for the Node.js documentation quality tool."""
|
docguard_cli/wrapper.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
DocGuard CLI — Python wrapper
|
|
4
|
+
|
|
5
|
+
Runs the Node.js DocGuard CLI via `npx` or a local installation.
|
|
6
|
+
This allows Python developers to use DocGuard without manually
|
|
7
|
+
installing npm. Node.js 18+ is required.
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
pip install docguard-cli
|
|
11
|
+
docguard guard
|
|
12
|
+
docguard diagnose
|
|
13
|
+
docguard score
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
import os
|
|
17
|
+
import shutil
|
|
18
|
+
import subprocess
|
|
19
|
+
import sys
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def find_node():
|
|
23
|
+
"""Find a usable Node.js binary (>= 18)."""
|
|
24
|
+
for cmd in ("node", "node18", "node20", "node22"):
|
|
25
|
+
path = shutil.which(cmd)
|
|
26
|
+
if path:
|
|
27
|
+
try:
|
|
28
|
+
version = subprocess.check_output(
|
|
29
|
+
[path, "--version"], text=True, stderr=subprocess.DEVNULL
|
|
30
|
+
).strip()
|
|
31
|
+
major = int(version.lstrip("v").split(".")[0])
|
|
32
|
+
if major >= 18:
|
|
33
|
+
return path
|
|
34
|
+
except (subprocess.CalledProcessError, ValueError):
|
|
35
|
+
continue
|
|
36
|
+
return None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def find_npx():
|
|
40
|
+
"""Find npx binary."""
|
|
41
|
+
return shutil.which("npx")
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def find_local_cli():
|
|
45
|
+
"""Find locally installed DocGuard CLI (node_modules or global)."""
|
|
46
|
+
# Check if installed globally via npm
|
|
47
|
+
npx = find_npx()
|
|
48
|
+
if npx:
|
|
49
|
+
return None # Will use npx path
|
|
50
|
+
|
|
51
|
+
# Check node_modules in current project
|
|
52
|
+
local = os.path.join(os.getcwd(), "node_modules", ".bin", "docguard")
|
|
53
|
+
if os.path.isfile(local):
|
|
54
|
+
return local
|
|
55
|
+
|
|
56
|
+
return None
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def main():
|
|
60
|
+
"""Entry point for the `docguard` command."""
|
|
61
|
+
args = sys.argv[1:]
|
|
62
|
+
|
|
63
|
+
node = find_node()
|
|
64
|
+
if not node:
|
|
65
|
+
print(
|
|
66
|
+
"Error: Node.js 18+ is required but not found.\n"
|
|
67
|
+
"Install from: https://nodejs.org/\n"
|
|
68
|
+
"Or via nvm: nvm install 20",
|
|
69
|
+
file=sys.stderr,
|
|
70
|
+
)
|
|
71
|
+
sys.exit(1)
|
|
72
|
+
|
|
73
|
+
npx = find_npx()
|
|
74
|
+
local_cli = find_local_cli()
|
|
75
|
+
|
|
76
|
+
if local_cli:
|
|
77
|
+
# Use locally installed DocGuard
|
|
78
|
+
cmd = [node, local_cli] + args
|
|
79
|
+
elif npx:
|
|
80
|
+
# Use npx to run DocGuard (auto-downloads if needed)
|
|
81
|
+
cmd = [npx, "-y", "docguard-cli@latest"] + args
|
|
82
|
+
else:
|
|
83
|
+
print(
|
|
84
|
+
"Error: npx not found. Install Node.js 18+ which includes npm/npx.\n"
|
|
85
|
+
"Install from: https://nodejs.org/",
|
|
86
|
+
file=sys.stderr,
|
|
87
|
+
)
|
|
88
|
+
sys.exit(1)
|
|
89
|
+
|
|
90
|
+
try:
|
|
91
|
+
result = subprocess.run(cmd, check=False)
|
|
92
|
+
sys.exit(result.returncode)
|
|
93
|
+
except FileNotFoundError:
|
|
94
|
+
print(f"Error: Could not execute: {' '.join(cmd)}", file=sys.stderr)
|
|
95
|
+
sys.exit(1)
|
|
96
|
+
except KeyboardInterrupt:
|
|
97
|
+
sys.exit(130)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
if __name__ == "__main__":
|
|
101
|
+
main()
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: docguard-cli
|
|
3
|
+
Version: 0.9.5
|
|
4
|
+
Summary: The enforcement tool for Canonical-Driven Development (CDD). Audit, generate, and guard your project documentation. Zero dependencies.
|
|
5
|
+
Project-URL: Homepage, https://github.com/raccioly/docguard
|
|
6
|
+
Project-URL: Documentation, https://github.com/raccioly/docguard#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/raccioly/docguard
|
|
8
|
+
Project-URL: Issues, https://github.com/raccioly/docguard/issues
|
|
9
|
+
Author-email: Ricardo Accioly <raccioly@gmail.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: architecture,audit,canonical,cdd,documentation,guard,quality,spec-driven,spec-kit,validation
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: JavaScript
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Topic :: Documentation
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
Requires-Python: >=3.8
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# DocGuard
|
|
26
|
+
|
|
27
|
+
> **AI-native documentation enforcement for Canonical-Driven Development (CDD).**
|
|
28
|
+
> AI diagnoses. AI fixes. AI verifies. Humans review.
|
|
29
|
+
|
|
30
|
+
[](https://www.npmjs.com/package/docguard-cli)
|
|
31
|
+
[](https://opensource.org/licenses/MIT)
|
|
32
|
+
[](https://nodejs.org)
|
|
33
|
+
[](package.json)
|
|
34
|
+
[](https://github.com/marketplace/actions/docguard-cdd-compliance)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## What is CDD?
|
|
39
|
+
|
|
40
|
+
**Canonical-Driven Development** is a methodology where canonical documentation drives every phase of a project — from initial design through ongoing maintenance. Unlike traditional development where docs are written after code (and quickly rot), CDD treats documentation as the authoritative source that code must conform to.
|
|
41
|
+
|
|
42
|
+
| Traditional | CDD |
|
|
43
|
+
|-------------|-----|
|
|
44
|
+
| Code first, docs maybe | Docs first, code conforms |
|
|
45
|
+
| Docs rot silently | Drift is tracked explicitly |
|
|
46
|
+
| Docs are optional | Docs are required and validated |
|
|
47
|
+
| One agent, one context | Any agent, shared context |
|
|
48
|
+
|
|
49
|
+
**DocGuard** is the CLI tool that enforces CDD — auditing, generating, and guarding your project documentation.
|
|
50
|
+
|
|
51
|
+
📖 **[Read the full philosophy](PHILOSOPHY.md)** | 📋 **[Read the standard](STANDARD.md)** | ⚖️ **[See comparisons](COMPARISONS.md)** | 🗺️ **[Roadmap](ROADMAP.md)**
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
# The primary command — AI diagnoses AND fixes everything
|
|
59
|
+
npx docguard-cli diagnose
|
|
60
|
+
|
|
61
|
+
# Generate CDD docs from an existing codebase
|
|
62
|
+
npx docguard-cli generate
|
|
63
|
+
|
|
64
|
+
# Start from scratch (minimal setup for side projects)
|
|
65
|
+
npx docguard-cli init --profile starter
|
|
66
|
+
|
|
67
|
+
# Start from scratch (full enterprise setup)
|
|
68
|
+
npx docguard-cli init
|
|
69
|
+
|
|
70
|
+
# CI gate — pass/fail for pipelines
|
|
71
|
+
npx docguard-cli guard
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
No installation needed. Zero dependencies. Works with Node.js 18+.
|
|
75
|
+
|
|
76
|
+
### Install
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
# Run directly (no install)
|
|
80
|
+
npx docguard-cli diagnose
|
|
81
|
+
|
|
82
|
+
# Or install globally
|
|
83
|
+
npm i -g docguard-cli
|
|
84
|
+
docguard diagnose
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### GitHub Action
|
|
88
|
+
|
|
89
|
+
```yaml
|
|
90
|
+
- uses: raccioly/docguard@v0.5.0
|
|
91
|
+
with:
|
|
92
|
+
command: guard
|
|
93
|
+
fail-on-warning: true
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### The AI Loop
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
diagnose → AI reads prompts → AI fixes docs → guard verifies
|
|
100
|
+
↑ ↓
|
|
101
|
+
└───────────────── issues found? ←──────────────────────┘
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`diagnose` is the primary command. It runs all validators, maps every failure to an AI-actionable fix prompt, and outputs a remediation plan. Your AI agent runs it, fixes the docs, and runs `guard` to verify. Zero human intervention.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Usage
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# Initialize CDD docs for your project
|
|
112
|
+
npx docguard-cli init
|
|
113
|
+
|
|
114
|
+
# Reverse-engineer docs from existing code
|
|
115
|
+
npx docguard-cli generate
|
|
116
|
+
|
|
117
|
+
# Validate project — use as CI gate
|
|
118
|
+
npx docguard-cli guard
|
|
119
|
+
|
|
120
|
+
# Get AI-actionable fix prompts
|
|
121
|
+
npx docguard-cli diagnose
|
|
122
|
+
|
|
123
|
+
# Check CDD maturity score
|
|
124
|
+
npx docguard-cli score
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 13 Commands
|
|
130
|
+
|
|
131
|
+
### 🔮 Generate — Reverse-engineer docs from code
|
|
132
|
+
```
|
|
133
|
+
$ npx docguard-cli generate
|
|
134
|
+
|
|
135
|
+
🔮 DocGuard Generate — my-project
|
|
136
|
+
Scanning codebase to generate canonical documentation...
|
|
137
|
+
|
|
138
|
+
Detected Stack:
|
|
139
|
+
language: TypeScript ^5.0
|
|
140
|
+
framework: Next.js ^14.0
|
|
141
|
+
database: PostgreSQL
|
|
142
|
+
orm: Drizzle 0.33
|
|
143
|
+
testing: Vitest
|
|
144
|
+
hosting: AWS Amplify
|
|
145
|
+
|
|
146
|
+
✅ ARCHITECTURE.md (4 components, 6 tech)
|
|
147
|
+
✅ DATA-MODEL.md (12 entities detected)
|
|
148
|
+
✅ ENVIRONMENT.md (18 env vars detected)
|
|
149
|
+
✅ TEST-SPEC.md (45 tests, 8/10 services mapped)
|
|
150
|
+
✅ SECURITY.md (auth: NextAuth.js)
|
|
151
|
+
✅ AGENTS.md
|
|
152
|
+
✅ CHANGELOG.md
|
|
153
|
+
✅ DRIFT-LOG.md
|
|
154
|
+
|
|
155
|
+
Generated: 8 Skipped: 0
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Detects:** Next.js, React, Vue, Angular, Fastify, Express, Hono, Django, FastAPI, SvelteKit, and more.
|
|
159
|
+
**Scans for:** Routes, models, services, tests, env vars, components, middleware.
|
|
160
|
+
|
|
161
|
+
### 📊 Score — CDD maturity assessment
|
|
162
|
+
```
|
|
163
|
+
$ npx docguard-cli score
|
|
164
|
+
|
|
165
|
+
Category Breakdown
|
|
166
|
+
|
|
167
|
+
structure ████████████████████ 100% (×25) = 25 pts
|
|
168
|
+
docQuality ██████████████████░░ 90% (×20) = 18 pts
|
|
169
|
+
testing █████████░░░░░░░░░░░ 45% (×15) = 7 pts
|
|
170
|
+
security █████████████████░░░ 85% (×10) = 9 pts
|
|
171
|
+
environment ██████████████░░░░░░ 70% (×10) = 7 pts
|
|
172
|
+
drift ████████████████████ 100% (×10) = 10 pts
|
|
173
|
+
changelog ██████████████░░░░░░ 70% (×5) = 4 pts
|
|
174
|
+
architecture █████████████████░░░ 85% (×5) = 4 pts
|
|
175
|
+
|
|
176
|
+
CDD Maturity Score: 83/100 (A)
|
|
177
|
+
Great — Strong CDD compliance
|
|
178
|
+
|
|
179
|
+
Top improvements:
|
|
180
|
+
→ testing: Add tests/ directory and configure TEST-SPEC.md
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 🔍 Diff — Canonical docs vs code comparison
|
|
184
|
+
```
|
|
185
|
+
$ npx docguard-cli diff
|
|
186
|
+
|
|
187
|
+
🛣️ API Routes
|
|
188
|
+
In code but not documented:
|
|
189
|
+
+ src/routes/webhooks.ts
|
|
190
|
+
+ src/routes/admin/settings.ts
|
|
191
|
+
✓ In sync: 12 routes
|
|
192
|
+
|
|
193
|
+
🔧 Environment Variables
|
|
194
|
+
Documented but not found in .env.example:
|
|
195
|
+
− REDIS_URL
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 🤖 Agents — Generate agent-specific configs
|
|
199
|
+
```
|
|
200
|
+
$ npx docguard-cli agents
|
|
201
|
+
|
|
202
|
+
✅ Cursor: .cursor/rules/cdd.mdc
|
|
203
|
+
✅ GitHub Copilot: .github/copilot-instructions.md
|
|
204
|
+
✅ Cline: .clinerules
|
|
205
|
+
✅ Windsurf: .windsurfrules
|
|
206
|
+
✅ Claude Code: CLAUDE.md
|
|
207
|
+
✅ Gemini CLI: .gemini/settings.json
|
|
208
|
+
|
|
209
|
+
Created: 6 Skipped: 0
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### 🔍 Audit — What docs exist/missing
|
|
213
|
+
```
|
|
214
|
+
$ npx docguard-cli audit
|
|
215
|
+
|
|
216
|
+
Score: 8/8 required files (100%)
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### 🏗️ Init — Create CDD docs from templates
|
|
220
|
+
```
|
|
221
|
+
$ npx docguard-cli init
|
|
222
|
+
|
|
223
|
+
Created 9 files (8 docs + .docguard.json)
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### 🛡️ Guard — Validate project against docs
|
|
227
|
+
```
|
|
228
|
+
$ npx docguard-cli guard
|
|
229
|
+
|
|
230
|
+
✅ Structure 8/8 checks passed
|
|
231
|
+
✅ Doc Sections 10/10 checks passed
|
|
232
|
+
✅ Drift 1/1 checks passed
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## CLI Flags
|
|
238
|
+
|
|
239
|
+
| Flag | Description | Commands |
|
|
240
|
+
|------|-------------|----------|
|
|
241
|
+
| `--dir <path>` | Project directory (default: `.`) | All |
|
|
242
|
+
| `--verbose` | Show detailed output | All |
|
|
243
|
+
| `--format json` | Output as JSON for CI/CD | score, diff |
|
|
244
|
+
| `--fix` | Auto-create missing files | guard |
|
|
245
|
+
| `--force` | Overwrite existing files | generate, agents, init |
|
|
246
|
+
| `--agent <name>` | Target specific agent | agents |
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## 18 Validators
|
|
251
|
+
|
|
252
|
+
| # | Validator | What It Checks | Default |
|
|
253
|
+
|---|-----------|---------------|---------|
|
|
254
|
+
| 1 | **Structure** | Required CDD files exist | ✅ On |
|
|
255
|
+
| 2 | **Doc Sections** | Canonical docs have required sections | ✅ On |
|
|
256
|
+
| 3 | **Docs-Sync** | Routes/services referenced in docs + OpenAPI cross-check | ✅ On |
|
|
257
|
+
| 4 | **Drift** | `// DRIFT:` comments logged in DRIFT-LOG.md | ✅ On |
|
|
258
|
+
| 5 | **Changelog** | CHANGELOG.md has [Unreleased] section | ✅ On |
|
|
259
|
+
| 6 | **Test-Spec** | Tests exist per TEST-SPEC.md rules | ✅ On |
|
|
260
|
+
| 7 | **Environment** | Env vars documented, .env.example exists | ✅ On |
|
|
261
|
+
| 8 | **Security** | No hardcoded secrets in source code | ✅ On |
|
|
262
|
+
| 9 | **Architecture** | Imports follow layer boundaries | ✅ On |
|
|
263
|
+
| 10 | **Freshness** | Docs not stale relative to code changes | ✅ On |
|
|
264
|
+
| 11 | **Traceability** | Canonical docs linked to source + V-Model requirement IDs | ✅ On |
|
|
265
|
+
| 12 | **Docs-Diff** | Code artifacts match documented entities | ✅ On |
|
|
266
|
+
| 13 | **Metadata-Sync** | Version refs consistent across docs | ✅ On |
|
|
267
|
+
| 14 | **Docs-Coverage** | Code features referenced in documentation | ✅ On |
|
|
268
|
+
| 15 | **Metrics-Consistency** | Hardcoded numbers match actual counts | ✅ On |
|
|
269
|
+
| 16 | **Doc-Quality** | Writing quality (readability, passive voice, atomicity) | ✅ On |
|
|
270
|
+
| 17 | **TODO-Tracking** | Untracked TODOs/FIXMEs and skipped tests | ✅ On |
|
|
271
|
+
| 18 | **Schema-Sync** | Database models documented in DATA-MODEL.md | ✅ On |
|
|
272
|
+
| 19 | **Spec-Kit** | GitHub Spec Kit artifact detection and CDD mapping | ✅ On |
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 18 Templates
|
|
277
|
+
|
|
278
|
+
Every template includes professional metadata: `docguard:version`, `docguard:status`, badges, and revision history.
|
|
279
|
+
|
|
280
|
+
| Template | Type | Purpose |
|
|
281
|
+
|----------|------|---------|
|
|
282
|
+
| ARCHITECTURE.md | Canonical | System design, components, boundaries |
|
|
283
|
+
| DATA-MODEL.md | Canonical | Schemas, entities, relationships |
|
|
284
|
+
| SECURITY.md | Canonical | Auth, permissions, secrets |
|
|
285
|
+
| TEST-SPEC.md | Canonical | Required tests, coverage |
|
|
286
|
+
| ENVIRONMENT.md | Canonical | Env vars, setup steps |
|
|
287
|
+
| DEPLOYMENT.md | Canonical | Infrastructure, CI/CD, DNS |
|
|
288
|
+
| ADR.md | Canonical | Architecture Decision Records |
|
|
289
|
+
| ROADMAP.md | Canonical | Project phases, feature tracking |
|
|
290
|
+
| REQUIREMENTS.md | Canonical | Requirement IDs, V-Model traceability |
|
|
291
|
+
| KNOWN-GOTCHAS.md | Implementation | Symptom/gotcha/fix entries |
|
|
292
|
+
| TROUBLESHOOTING.md | Implementation | Error diagnosis guides |
|
|
293
|
+
| RUNBOOKS.md | Implementation | Operational procedures |
|
|
294
|
+
| VENDOR-BUGS.md | Implementation | Third-party issue tracker |
|
|
295
|
+
| CURRENT-STATE.md | Implementation | Deployment status, tech debt |
|
|
296
|
+
| AGENTS.md | Agent | AI agent behavior rules |
|
|
297
|
+
| CHANGELOG.md | Tracking | Change log |
|
|
298
|
+
| DRIFT-LOG.md | Tracking | Deviation tracking |
|
|
299
|
+
| llms.txt | Generated | AI-friendly project summary (llmstxt.org) |
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## CDD File Structure
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
your-project/
|
|
307
|
+
├── docs-canonical/ # Design intent (the "blueprint")
|
|
308
|
+
│ ├── ARCHITECTURE.md # System design, components, boundaries
|
|
309
|
+
│ ├── DATA-MODEL.md # Database schemas, entity relationships
|
|
310
|
+
│ ├── SECURITY.md # Auth, permissions, secrets
|
|
311
|
+
│ ├── TEST-SPEC.md # Required tests, coverage rules
|
|
312
|
+
│ ├── ENVIRONMENT.md # Environment variables, setup
|
|
313
|
+
│ └── REQUIREMENTS.md # Requirement IDs, V-Model traceability
|
|
314
|
+
│
|
|
315
|
+
├── docs-implementation/ # Current state (optional)
|
|
316
|
+
│ ├── KNOWN-GOTCHAS.md # Lessons learned
|
|
317
|
+
│ ├── TROUBLESHOOTING.md # Error solutions
|
|
318
|
+
│ ├── RUNBOOKS.md # Operational procedures
|
|
319
|
+
│ └── CURRENT-STATE.md # What's deployed now
|
|
320
|
+
│
|
|
321
|
+
├── AGENTS.md # AI agent behavior rules
|
|
322
|
+
├── CHANGELOG.md # Change tracking
|
|
323
|
+
├── DRIFT-LOG.md # Documented deviations
|
|
324
|
+
├── llms.txt # AI-friendly project summary
|
|
325
|
+
└── .docguard.json # DocGuard configuration
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## CI/CD Integration
|
|
331
|
+
|
|
332
|
+
### GitHub Actions
|
|
333
|
+
|
|
334
|
+
```yaml
|
|
335
|
+
name: DocGuard
|
|
336
|
+
on: [pull_request]
|
|
337
|
+
jobs:
|
|
338
|
+
guard:
|
|
339
|
+
runs-on: ubuntu-latest
|
|
340
|
+
steps:
|
|
341
|
+
- uses: actions/checkout@v4
|
|
342
|
+
- uses: actions/setup-node@v4
|
|
343
|
+
with:
|
|
344
|
+
node-version: '20'
|
|
345
|
+
- run: npx docguard-cli guard
|
|
346
|
+
- run: npx docguard-cli score --format json
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Pre-commit Hook
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
# .git/hooks/pre-commit
|
|
353
|
+
#!/bin/sh
|
|
354
|
+
npx docguard-cli guard
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## Agent Compatibility
|
|
360
|
+
|
|
361
|
+
DocGuard works with **every major AI coding agent**:
|
|
362
|
+
|
|
363
|
+
| Agent | Compatibility | Auto-Generate Config |
|
|
364
|
+
|-------|:---:|:---:|
|
|
365
|
+
| Google Antigravity | ✅ | — |
|
|
366
|
+
| Claude Code | ✅ | `docguard agents --agent claude` |
|
|
367
|
+
| GitHub Copilot | ✅ | `docguard agents --agent copilot` |
|
|
368
|
+
| Cursor | ✅ | `docguard agents --agent cursor` |
|
|
369
|
+
| Windsurf | ✅ | `docguard agents --agent windsurf` |
|
|
370
|
+
| Cline | ✅ | `docguard agents --agent cline` |
|
|
371
|
+
| Gemini CLI | ✅ | `docguard agents --agent gemini` |
|
|
372
|
+
| Kiro (AWS) | ✅ | — |
|
|
373
|
+
|
|
374
|
+
All canonical docs are **plain markdown** — any agent can read them. No vendor lock-in.
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Contributing
|
|
379
|
+
|
|
380
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
## Research Credits
|
|
385
|
+
|
|
386
|
+
DocGuard's quality evaluation and documentation generation patterns are informed by peer-reviewed research from the University of Arizona and the Joint Interoperability Test Command (JITC), U.S. Department of Defense:
|
|
387
|
+
|
|
388
|
+
- **AITPG** — AI-driven Test Plan Generator using Multi-Agent Debate and RAG ([Lopez et al., IEEE TSE 2026](Research/AITPG.pdf))
|
|
389
|
+
- **TRACE** — Telecom Root Cause Analysis through Calibrated Explainability ([Lopez et al., IEEE TMLCN 2026](Research/TRACE.pdf))
|
|
390
|
+
|
|
391
|
+
Lead researcher: **[Martin Manuel Lopez](https://github.com/martinmanuel9)** · [ORCID 0009-0002-7652-2385](https://orcid.org/0009-0002-7652-2385)
|
|
392
|
+
|
|
393
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md#research--academic-credits) for full citations and concept attributions.
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## License
|
|
398
|
+
|
|
399
|
+
[MIT](LICENSE) — Free to use, modify, and distribute.
|
|
400
|
+
|
|
401
|
+
---
|
|
402
|
+
|
|
403
|
+
**Made with ❤️ by [Ricardo Accioly](https://github.com/raccioly)**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
docguard_cli/__init__.py,sha256=e1GHirOyNeR_y4B0wuNhPbayyCiRCqZJs9tYVC1GVPk,82
|
|
2
|
+
docguard_cli/wrapper.py,sha256=UkQN2i_qEUTbTJDGuU_GGxe54swOy4sWqxZyQFnf78M,2609
|
|
3
|
+
docguard_cli-0.9.5.dist-info/METADATA,sha256=k2k8mOF0PleLkDEZNyln_-8BdJK_uf7EFT0Ya16xQwA,13979
|
|
4
|
+
docguard_cli-0.9.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
5
|
+
docguard_cli-0.9.5.dist-info/entry_points.txt,sha256=fnyQ7wetIdeLQh9twTx59Lq3pnfHzCrhFL1f5e3hJ0I,55
|
|
6
|
+
docguard_cli-0.9.5.dist-info/licenses/LICENSE,sha256=gQ9PJNsgxXTDVYfhspPfwlj1ba3MeDnbL8G0dqN2jLE,1072
|
|
7
|
+
docguard_cli-0.9.5.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ricardo Accioly
|
|
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.
|