docguard-cli 0.9.5 → 0.9.7
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.
- package/README.md +281 -203
- package/cli/commands/diff.mjs +16 -3
- package/cli/commands/init.mjs +4 -0
- package/cli/commands/setup.mjs +455 -0
- package/cli/docguard.mjs +12 -0
- package/cli/ensure-skills.mjs +96 -0
- package/cli/validators/doc-quality.mjs +2 -2
- package/cli/validators/docs-sync.mjs +41 -6
- package/cli/validators/metrics-consistency.mjs +2 -1
- package/cli/validators/todo-tracking.mjs +11 -6
- package/commands/docguard.fix.md +37 -17
- package/commands/docguard.guard.md +45 -12
- package/commands/docguard.review.md +37 -19
- package/commands/docguard.score.md +36 -17
- package/docs/installation.md +37 -19
- package/docs/quickstart.md +21 -6
- package/extensions/spec-kit-docguard/LICENSE +21 -0
- package/extensions/spec-kit-docguard/README.md +103 -0
- package/extensions/spec-kit-docguard/commands/diagnose.md +43 -0
- package/extensions/spec-kit-docguard/commands/generate.md +50 -0
- package/extensions/spec-kit-docguard/commands/guard.md +73 -0
- package/extensions/spec-kit-docguard/commands/init.md +38 -0
- package/extensions/spec-kit-docguard/commands/score.md +53 -0
- package/extensions/spec-kit-docguard/commands/trace.md +56 -0
- package/extensions/spec-kit-docguard/extension.yml +92 -0
- package/extensions/spec-kit-docguard/scripts/bash/common.sh +106 -0
- package/extensions/spec-kit-docguard/scripts/bash/docguard-check-docs.sh +153 -0
- package/extensions/spec-kit-docguard/scripts/bash/docguard-init-doc.sh +153 -0
- package/extensions/spec-kit-docguard/scripts/bash/docguard-suggest-fix.sh +107 -0
- package/extensions/spec-kit-docguard/skills/docguard-fix/SKILL.md +218 -0
- package/extensions/spec-kit-docguard/skills/docguard-guard/SKILL.md +167 -0
- package/extensions/spec-kit-docguard/skills/docguard-review/SKILL.md +182 -0
- package/extensions/spec-kit-docguard/skills/docguard-score/SKILL.md +178 -0
- package/extensions/spec-kit-docguard/templates/extensions.yml +39 -0
- package/package.json +2 -1
- package/templates/commands/docguard.fix.md +35 -39
- package/templates/commands/docguard.guard.md +26 -13
- package/templates/commands/docguard.init.md +35 -28
- package/templates/commands/docguard.review.md +33 -23
- package/templates/commands/docguard.update.md +15 -4
|
@@ -1,44 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Review documentation quality — identify drift, coverage gaps, and improvements
|
|
3
|
+
handoffs:
|
|
4
|
+
- label: Fix Issues
|
|
5
|
+
agent: docguard.fix
|
|
6
|
+
prompt: Fix the documentation issues identified in the review
|
|
7
|
+
- label: Run Guard
|
|
8
|
+
agent: docguard.guard
|
|
9
|
+
prompt: Validate all checks pass after review
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# /docguard.review — Review Documentation vs Code
|
|
2
13
|
|
|
3
14
|
You are an AI agent reviewing documentation quality and detecting drift between docs and code.
|
|
4
15
|
|
|
5
|
-
## Step 1: Run
|
|
16
|
+
## Step 1: Run Diagnostics
|
|
6
17
|
|
|
7
18
|
```bash
|
|
8
|
-
npx docguard
|
|
19
|
+
npx docguard-cli diagnose
|
|
20
|
+
npx docguard-cli diff
|
|
21
|
+
npx docguard-cli score
|
|
9
22
|
```
|
|
10
23
|
|
|
11
|
-
Read
|
|
24
|
+
Read all output. Identify where documentation no longer matches the codebase.
|
|
12
25
|
|
|
13
|
-
## Step 2:
|
|
26
|
+
## Step 2: Semantic Analysis (Beyond CLI)
|
|
14
27
|
|
|
15
|
-
|
|
16
|
-
npx docguard guard
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Note any failed validators — these indicate docs that need updating.
|
|
20
|
-
|
|
21
|
-
## Step 3: Check Freshness
|
|
28
|
+
For each canonical doc, verify alignment with actual code:
|
|
22
29
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
| Analysis | What to Check |
|
|
31
|
+
|----------|--------------|
|
|
32
|
+
| Architecture ↔ Code | Components in ARCHITECTURE.md exist as real modules |
|
|
33
|
+
| Data Model ↔ Code | Schemas in DATA-MODEL.md match actual implementations |
|
|
34
|
+
| Security Claims | Auth mechanisms in SECURITY.md match actual code |
|
|
35
|
+
| Test Coverage | Critical flows in TEST-SPEC.md have actual test files |
|
|
36
|
+
| Terminology | Same concepts named consistently across all docs |
|
|
28
37
|
|
|
29
|
-
## Step
|
|
38
|
+
## Step 3: Update Stale Docs
|
|
30
39
|
|
|
31
40
|
For each stale or drifted document:
|
|
32
41
|
1. Read the relevant source code files
|
|
33
|
-
2. Update the
|
|
42
|
+
2. Update the specific section that changed
|
|
34
43
|
3. Update the `docguard:last-reviewed` date to today
|
|
35
44
|
4. If the change is intentional drift, add an entry to DRIFT-LOG.md
|
|
45
|
+
5. Add entry to CHANGELOG.md under [Unreleased]
|
|
36
46
|
|
|
37
|
-
## Step
|
|
47
|
+
## Step 4: Verify
|
|
38
48
|
|
|
39
49
|
```bash
|
|
40
|
-
npx docguard guard
|
|
41
|
-
npx docguard score
|
|
50
|
+
npx docguard-cli guard
|
|
51
|
+
npx docguard-cli score
|
|
42
52
|
```
|
|
43
53
|
|
|
44
|
-
Report
|
|
54
|
+
Report findings, changes made, and the final score.
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Update canonical docs after code changes — detect drift and sync documentation
|
|
3
|
+
handoffs:
|
|
4
|
+
- label: Run Guard
|
|
5
|
+
agent: docguard.guard
|
|
6
|
+
prompt: Validate all checks pass after updates
|
|
7
|
+
- label: Check Score
|
|
8
|
+
agent: docguard.score
|
|
9
|
+
prompt: Show CDD maturity score after updates
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# /docguard.update — Update Docs After Code Changes
|
|
2
13
|
|
|
3
14
|
You are an AI agent that updates documentation to reflect recent code changes.
|
|
4
15
|
|
|
@@ -37,8 +48,8 @@ For each affected document:
|
|
|
37
48
|
## Step 4: Verify
|
|
38
49
|
|
|
39
50
|
```bash
|
|
40
|
-
npx docguard guard
|
|
41
|
-
npx docguard score
|
|
51
|
+
npx docguard-cli guard
|
|
52
|
+
npx docguard-cli score
|
|
42
53
|
```
|
|
43
54
|
|
|
44
|
-
All checks should pass. Report the changes made.
|
|
55
|
+
All checks should pass. Report the changes made and the final score.
|