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.
Files changed (40) hide show
  1. package/README.md +281 -203
  2. package/cli/commands/diff.mjs +16 -3
  3. package/cli/commands/init.mjs +4 -0
  4. package/cli/commands/setup.mjs +455 -0
  5. package/cli/docguard.mjs +12 -0
  6. package/cli/ensure-skills.mjs +96 -0
  7. package/cli/validators/doc-quality.mjs +2 -2
  8. package/cli/validators/docs-sync.mjs +41 -6
  9. package/cli/validators/metrics-consistency.mjs +2 -1
  10. package/cli/validators/todo-tracking.mjs +11 -6
  11. package/commands/docguard.fix.md +37 -17
  12. package/commands/docguard.guard.md +45 -12
  13. package/commands/docguard.review.md +37 -19
  14. package/commands/docguard.score.md +36 -17
  15. package/docs/installation.md +37 -19
  16. package/docs/quickstart.md +21 -6
  17. package/extensions/spec-kit-docguard/LICENSE +21 -0
  18. package/extensions/spec-kit-docguard/README.md +103 -0
  19. package/extensions/spec-kit-docguard/commands/diagnose.md +43 -0
  20. package/extensions/spec-kit-docguard/commands/generate.md +50 -0
  21. package/extensions/spec-kit-docguard/commands/guard.md +73 -0
  22. package/extensions/spec-kit-docguard/commands/init.md +38 -0
  23. package/extensions/spec-kit-docguard/commands/score.md +53 -0
  24. package/extensions/spec-kit-docguard/commands/trace.md +56 -0
  25. package/extensions/spec-kit-docguard/extension.yml +92 -0
  26. package/extensions/spec-kit-docguard/scripts/bash/common.sh +106 -0
  27. package/extensions/spec-kit-docguard/scripts/bash/docguard-check-docs.sh +153 -0
  28. package/extensions/spec-kit-docguard/scripts/bash/docguard-init-doc.sh +153 -0
  29. package/extensions/spec-kit-docguard/scripts/bash/docguard-suggest-fix.sh +107 -0
  30. package/extensions/spec-kit-docguard/skills/docguard-fix/SKILL.md +218 -0
  31. package/extensions/spec-kit-docguard/skills/docguard-guard/SKILL.md +167 -0
  32. package/extensions/spec-kit-docguard/skills/docguard-review/SKILL.md +182 -0
  33. package/extensions/spec-kit-docguard/skills/docguard-score/SKILL.md +178 -0
  34. package/extensions/spec-kit-docguard/templates/extensions.yml +39 -0
  35. package/package.json +2 -1
  36. package/templates/commands/docguard.fix.md +35 -39
  37. package/templates/commands/docguard.guard.md +26 -13
  38. package/templates/commands/docguard.init.md +35 -28
  39. package/templates/commands/docguard.review.md +33 -23
  40. package/templates/commands/docguard.update.md +15 -4
@@ -1,44 +1,54 @@
1
- # /docguard.review — Review documentation vs code for drift
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 Diff
16
+ ## Step 1: Run Diagnostics
6
17
 
7
18
  ```bash
8
- npx docguard diff
19
+ npx docguard-cli diagnose
20
+ npx docguard-cli diff
21
+ npx docguard-cli score
9
22
  ```
10
23
 
11
- Read the output carefully. It shows where documentation no longer matches the codebase.
24
+ Read all output. Identify where documentation no longer matches the codebase.
12
25
 
13
- ## Step 2: Run Guard
26
+ ## Step 2: Semantic Analysis (Beyond CLI)
14
27
 
15
- ```bash
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
- For each file listed in the guard output with a freshness warning:
24
- 1. Read the document
25
- 2. Read the related source code
26
- 3. Compare: does the doc accurately describe the current code?
27
- 4. If not, update the doc to match reality
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 4: Update Stale Docs
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 document to match current implementation
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 5: Verify
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 the final results to the user.
54
+ Report findings, changes made, and the final score.
@@ -1,4 +1,15 @@
1
- # /docguard.update — Update canonical docs after code changes
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.