docguard-cli 0.9.7 β†’ 0.9.8

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 CHANGED
@@ -22,6 +22,8 @@
22
22
  - [Templates](#-templates)
23
23
  - [AI Agent Support](#-ai-agent-support)
24
24
  - [Slash Commands](#-slash-commands)
25
+ - [Examples](#-examples)
26
+ - [Testing](#-testing)
25
27
  - [CI/CD Integration](#%EF%B8%8F-cicd-integration)
26
28
  - [File Structure](#-file-structure)
27
29
  - [Configuration](#%EF%B8%8F-configuration)
@@ -44,6 +46,39 @@ DocGuard is an official [GitHub Spec Kit](https://github.com/github/spec-kit) co
44
46
 
45
47
  πŸ“– **[Philosophy](PHILOSOPHY.md)** Β· πŸ“‹ **[CDD Standard](STANDARD.md)** Β· βš–οΈ **[Comparisons](COMPARISONS.md)** Β· πŸ—ΊοΈ **[Roadmap](ROADMAP.md)**
46
48
 
49
+ ### Architecture
50
+
51
+ ```mermaid
52
+ graph TD
53
+ CLI["CLI Entry<br/>docguard.mjs"] --> Commands["Commands (15)"]
54
+ Commands --> guard["guard"]
55
+ Commands --> generate["generate"]
56
+ Commands --> score["score"]
57
+ Commands --> diagnose["diagnose"]
58
+ Commands --> setup["setup wizard"]
59
+ Commands --> other["diff Β· init Β· fix Β· trace<br/>agents Β· hooks Β· badge Β· ci Β· watch"]
60
+
61
+ guard --> Validators["Validators (19)"]
62
+ generate --> Scanners["Scanners (4)<br/>routes Β· schemas Β· doc-tools Β· speckit"]
63
+ score --> Scoring["Weighted Scoring<br/>8 categories"]
64
+ diagnose --> Validators
65
+ diagnose --> AIPrompts["AI-Ready<br/>Fix Prompts"]
66
+
67
+ Validators --> Output["Output"]
68
+ Scanners --> Output
69
+ Scoring --> Output
70
+ Output --> Terminal["Terminal"]
71
+ Output --> JSON["JSON"]
72
+ Output --> Badge["Badge"]
73
+
74
+ style CLI fill:#2d5016,color:#fff
75
+ style Validators fill:#1a3a5c,color:#fff
76
+ style Scanners fill:#1a3a5c,color:#fff
77
+ style Output fill:#5c3a1a,color:#fff
78
+ ```
79
+
80
+ > **Distribution**: Node.js core (npm) Β· Python wrapper (PyPI) Β· GitHub Action (`action.yml`) Β· Spec Kit Extension (ZIP)
81
+
47
82
  ---
48
83
 
49
84
  ## ⚑ Quick Start
@@ -335,6 +370,44 @@ For advanced users and CI/CD pipelines, DocGuard includes bash scripts with `--j
335
370
 
336
371
  ---
337
372
 
373
+ ## πŸ“ Examples
374
+
375
+ Three real-world projects to see DocGuard in action:
376
+
377
+ | Example | Scenario | What You'll See |
378
+ |---------|----------|----------------|
379
+ | [01-express-api](examples/01-express-api/) | Node.js API with **zero docs** | Cold-start: `generate` β†’ instant coverage |
380
+ | [02-python-flask](examples/02-python-flask/) | Python app with **drifted docs** | Drift detection: catch when docs lie |
381
+ | [03-spec-kit-project](examples/03-spec-kit-project/) | Full CDD + Spec Kit | Gold standard: what maturity looks like |
382
+
383
+ See [examples/README.md](examples/README.md) for step-by-step instructions.
384
+
385
+ ---
386
+
387
+ ## πŸ§ͺ Testing
388
+
389
+ ### Test Suite
390
+
391
+ ```bash
392
+ npm test # 33 tests across 18 describe blocks
393
+ ```
394
+
395
+ Covers all 15 CLI commands, project type detection, compliance profiles, JSON output format, and help completeness.
396
+
397
+ ### CI Matrix
398
+
399
+ | Node.js | OS | Status |
400
+ |---------|-----|--------|
401
+ | 18 | ubuntu-latest | βœ… |
402
+ | 20 | ubuntu-latest | βœ… |
403
+ | 22 | ubuntu-latest | βœ… |
404
+
405
+ ### Self-Validation (Dogfooding)
406
+
407
+ DocGuard runs its own `guard`, `score`, `diff`, `diagnose`, and `badge` commands against itself in CI β€” ensuring the tool passes its own checks.
408
+
409
+ ---
410
+
338
411
  ## βš™οΈ CI/CD Integration
339
412
 
340
413
  ### GitHub Actions
@@ -362,7 +435,7 @@ npx docguard-cli hooks --type pre-commit
362
435
  ### GitHub Marketplace
363
436
 
364
437
  ```yaml
365
- - uses: raccioly/docguard@v0.9.5
438
+ - uses: raccioly/docguard@v0.9.7
366
439
  with:
367
440
  command: guard
368
441
  fail-on-warning: true
@@ -40,6 +40,7 @@ export function validateMetadataSync(projectDir, config) {
40
40
  const vParts = currentVersion.split('.');
41
41
  const major = parseInt(vParts[0], 10);
42
42
  const minor = parseInt(vParts[1], 10);
43
+ const patch = parseInt(vParts[2], 10);
43
44
 
44
45
  // ── Check 1: extension.yml version sync ──
45
46
  const extFiles = findExtensionYmls(projectDir);
@@ -101,9 +102,15 @@ export function validateMetadataSync(projectDir, config) {
101
102
  const fParts = foundVersion.split('.');
102
103
  const fMajor = parseInt(fParts[0], 10);
103
104
  const fMinor = parseInt(fParts[1], 10);
105
+ const fPatch = parseInt(fParts[2], 10);
104
106
 
105
- // Only flag if same major but older minor (same package, stale ref)
106
- if (fMajor === major && fMinor < minor && foundVersion !== currentVersion) {
107
+ // Only flag if same major but older version (same package, stale ref)
108
+ const isOlder = fMajor === major && (
109
+ fMinor < minor ||
110
+ (fMinor === minor && fPatch < patch)
111
+ );
112
+
113
+ if (isOlder && foundVersion !== currentVersion) {
107
114
  total++;
108
115
  warnings.push(
109
116
  `${relPath} references "v${foundVersion}" in an actionable context (URL/install/declaration) but current version is "${currentVersion}"`
@@ -3,7 +3,7 @@ schema_version: "1.0"
3
3
  extension:
4
4
  id: "docguard"
5
5
  name: "DocGuard β€” CDD Enforcement"
6
- version: "0.9.7"
6
+ version: "0.9.8"
7
7
  description: "Canonical-Driven Development enforcement with enterprise-grade AI skills. 19 automated validators, structured research workflows, quality validation loops, and spec-kit integration hooks. Zero dependencies."
8
8
  author: "Ricardo Accioly"
9
9
  repository: "https://github.com/raccioly/docguard"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docguard-cli",
3
- "version": "0.9.7",
3
+ "version": "0.9.8",
4
4
  "description": "The enforcement tool for Canonical-Driven Development (CDD). Audit, generate, and guard your project documentation.",
5
5
  "type": "module",
6
6
  "bin": {