docguard-cli 0.23.0 → 0.24.0
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 +1 -1
- package/cli/commands/diff.mjs +1 -1
- package/cli/commands/explain.mjs +178 -17
- package/cli/commands/fix.mjs +17 -2
- package/cli/commands/generate.mjs +2 -2
- package/cli/commands/guard.mjs +86 -11
- package/cli/commands/hooks.mjs +12 -7
- package/cli/commands/init.mjs +18 -6
- package/cli/commands/score.mjs +147 -61
- package/cli/commands/setup.mjs +2 -2
- package/cli/commands/trace.mjs +3 -3
- package/cli/commands/upgrade.mjs +61 -13
- package/cli/config.mjs +18 -1
- package/cli/docguard.mjs +19 -0
- package/cli/ensure-skills.mjs +24 -26
- package/cli/scanners/api-doc.mjs +17 -3
- package/cli/scanners/doc-tools.mjs +32 -15
- package/cli/scanners/frontend.mjs +24 -8
- package/cli/scanners/js-ast.mjs +432 -0
- package/cli/scanners/memory-plan.mjs +1 -1
- package/cli/scanners/py-ast.mjs +213 -0
- package/cli/scanners/routes.mjs +194 -69
- package/cli/scanners/schemas.mjs +97 -51
- package/cli/shared-git.mjs +0 -0
- package/cli/shared-ignore.mjs +16 -1
- package/cli/shared-source.mjs +59 -2
- package/cli/shared-trace-patterns.mjs +13 -0
- package/cli/shared.mjs +60 -1
- package/cli/validator-markers.mjs +91 -0
- package/cli/validators/api-surface.mjs +37 -3
- package/cli/validators/canonical-sync.mjs +22 -19
- package/cli/validators/doc-quality.mjs +2 -42
- package/cli/validators/docs-coverage.mjs +13 -0
- package/cli/validators/docs-sync.mjs +4 -3
- package/cli/validators/drift.mjs +3 -2
- package/cli/validators/freshness.mjs +47 -15
- package/cli/validators/metadata-sync.mjs +21 -11
- package/cli/validators/metrics-consistency.mjs +45 -17
- package/cli/validators/security.mjs +13 -5
- package/cli/validators/structure.mjs +6 -5
- package/cli/validators/surface-sync.mjs +7 -5
- package/cli/validators/test-spec.mjs +76 -51
- package/cli/validators/todo-tracking.mjs +4 -2
- package/cli/validators/traceability.mjs +11 -3
- package/cli/writers/sections.mjs +32 -19
- package/docs/commands.md +1 -1
- package/docs/configuration.md +11 -0
- package/docs/faq.md +1 -1
- package/extensions/spec-kit-docguard/README.md +1 -1
- package/extensions/spec-kit-docguard/extension.yml +2 -2
- package/extensions/spec-kit-docguard/skills/docguard-fix/SKILL.md +2 -2
- package/extensions/spec-kit-docguard/skills/docguard-guard/SKILL.md +2 -2
- package/extensions/spec-kit-docguard/skills/docguard-review/SKILL.md +2 -2
- package/extensions/spec-kit-docguard/skills/docguard-score/SKILL.md +2 -2
- package/extensions/spec-kit-docguard/skills/docguard-sync/SKILL.md +2 -1
- package/extensions/spec-kit-docguard/templates/github-workflows/docguard-autofix.yml +3 -2
- package/extensions/spec-kit-docguard/templates/github-workflows/docguard-guard.yml +2 -2
- package/package.json +5 -3
package/docs/commands.md
CHANGED
package/docs/configuration.md
CHANGED
|
@@ -73,6 +73,17 @@ See [Profiles](./profiles.md) for details.
|
|
|
73
73
|
| `environment` | `true` | Setup steps, env vars, prerequisites, .env.example |
|
|
74
74
|
| `freshness` | varies | Docs updated recently relative to code changes (git-based) |
|
|
75
75
|
|
|
76
|
+
## Muting a validator
|
|
77
|
+
|
|
78
|
+
Two ways to turn a validator off, for two different intents:
|
|
79
|
+
|
|
80
|
+
| Intent | How | Renders as |
|
|
81
|
+
|--------|-----|-----------|
|
|
82
|
+
| Operational toggle (CI speed, not relevant *right now*) | `.docguard.json` → `"validators": { "testSpec": false }` | silent — disabled |
|
|
83
|
+
| **Intentional non-applicability** (POC with no tests, library with no auth) | inline marker in a canonical doc or `AGENTS.md`:<br>`<!-- docguard:validator testSpec n/a — POC, no automated tests yet -->` | `➖ Test-Spec [N/A] (declared N/A: …)` — visible, git-tracked |
|
|
84
|
+
|
|
85
|
+
The marker is preferred when the validator genuinely does not apply: the rationale lives next to the declaration, travels with the repo, and shows up honestly as N/A rather than a hidden skip or a fake green check. The key is the validator key from the table above (case/separator tolerant — `test-spec` works too); a mistyped key is reported as a warning rather than silently ignored. A no-tests POC typically marks both `testSpec` and `traceability` N/A.
|
|
86
|
+
|
|
76
87
|
## Project Type Detection
|
|
77
88
|
|
|
78
89
|
DocGuard auto-detects your project type from `package.json`:
|
package/docs/faq.md
CHANGED
|
@@ -129,7 +129,7 @@ Only if you install hooks (`docguard hooks`). Without hooks, it's advisory only.
|
|
|
129
129
|
|
|
130
130
|
### Does DocGuard have dependencies?
|
|
131
131
|
|
|
132
|
-
**
|
|
132
|
+
**One.** `@babel/parser` (exact-pinned), for AST-accurate JS/TS parsing — and it's loaded *optionally*, so DocGuard still runs (on the regex fallback tier) if it's ever missing. Everything else is pure Node.js built-ins. Works with Node.js 18+. Python parsing optionally shells out to the project's own `python3`.
|
|
133
133
|
|
|
134
134
|
### Does it work with non-JavaScript projects?
|
|
135
135
|
|
|
@@ -12,7 +12,7 @@ Enterprise-grade Canonical-Driven Development (CDD) enforcement and **AI-readabl
|
|
|
12
12
|
- **5 AI Skills** — docguard-fix, docguard-guard, docguard-sync, docguard-review, docguard-score (enterprise-grade behavior protocols, not just step-lists)
|
|
13
13
|
- **Workflow Chaining** — YAML handoffs enable guard → sync → fix → review → score flows
|
|
14
14
|
- **Spec Kit Hooks** — Quality gate integrations at implement, tasks, and review phases
|
|
15
|
-
- **
|
|
15
|
+
- **Minimal Dependencies** — one pinned, optional-load parser (`@babel/parser`); Node.js built-ins otherwise
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
@@ -3,8 +3,8 @@ schema_version: "1.0"
|
|
|
3
3
|
extension:
|
|
4
4
|
id: "docguard"
|
|
5
5
|
name: "DocGuard — CDD Enforcement"
|
|
6
|
-
version: "0.
|
|
7
|
-
description: "Canonical-Driven Development enforcement as a true spec-kit extension. LLM-first design with
|
|
6
|
+
version: "0.24.0"
|
|
7
|
+
description: "Canonical-Driven Development enforcement as a true spec-kit extension. LLM-first design with automated validators, 4 AI behavior skills, spec-kit skill chaining, and workflow hooks. One pinned runtime dependency (@babel/parser); pure Node.js otherwise."
|
|
8
8
|
author: "Ricardo Accioly"
|
|
9
9
|
repository: "https://github.com/raccioly/docguard"
|
|
10
10
|
license: "MIT"
|
|
@@ -6,10 +6,10 @@ description: AI-driven documentation repair with structured research workflow, t
|
|
|
6
6
|
compatibility: Requires DocGuard CLI installed (npm i -g docguard-cli or npx docguard-cli)
|
|
7
7
|
metadata:
|
|
8
8
|
author: docguard
|
|
9
|
-
version: 0.
|
|
9
|
+
version: 0.24.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-fix
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.24.0 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Fix Skill
|
|
15
15
|
|
|
@@ -7,10 +7,10 @@ description: Run DocGuard guard validation against Canonical-Driven Development
|
|
|
7
7
|
compatibility: Requires DocGuard CLI installed (npm i -g docguard-cli or npx docguard-cli)
|
|
8
8
|
metadata:
|
|
9
9
|
author: docguard
|
|
10
|
-
version: 0.
|
|
10
|
+
version: 0.24.0
|
|
11
11
|
source: extensions/spec-kit-docguard/skills/docguard-guard
|
|
12
12
|
---
|
|
13
|
-
<!-- docguard:version: 0.
|
|
13
|
+
<!-- docguard:version: 0.24.0 -->
|
|
14
14
|
|
|
15
15
|
# DocGuard Guard Skill
|
|
16
16
|
|
|
@@ -6,10 +6,10 @@ description: Cross-document consistency analysis and quality assessment. Perform
|
|
|
6
6
|
compatibility: Requires DocGuard CLI installed (npm i -g docguard-cli or npx docguard-cli)
|
|
7
7
|
metadata:
|
|
8
8
|
author: docguard
|
|
9
|
-
version: 0.
|
|
9
|
+
version: 0.24.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-review
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.24.0 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Review Skill
|
|
15
15
|
|
|
@@ -6,10 +6,10 @@ description: CDD maturity assessment with category-aware improvement roadmap. Ru
|
|
|
6
6
|
compatibility: Requires DocGuard CLI installed (npm i -g docguard-cli or npx docguard-cli)
|
|
7
7
|
metadata:
|
|
8
8
|
author: docguard
|
|
9
|
-
version: 0.
|
|
9
|
+
version: 0.24.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-score
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.24.0 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Score Skill
|
|
15
15
|
|
|
@@ -4,9 +4,10 @@ description: Keep canonical documentation ALWAYS UP TO DATE. Refreshes code-trut
|
|
|
4
4
|
compatibility: Requires DocGuard CLI installed (npm i -g docguard-cli or npx docguard-cli)
|
|
5
5
|
metadata:
|
|
6
6
|
author: docguard
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.24.0
|
|
8
8
|
source: extensions/spec-kit-docguard/skills/docguard-sync
|
|
9
9
|
---
|
|
10
|
+
<!-- docguard:version: 0.24.0 -->
|
|
10
11
|
|
|
11
12
|
# DocGuard Sync Skill
|
|
12
13
|
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
# Setup:
|
|
14
14
|
# 1. Copy this file to .github/workflows/docguard-autofix.yml
|
|
15
15
|
# 2. Ensure the workflow has the permissions block below (write access).
|
|
16
|
-
# 3.
|
|
16
|
+
# 3. Pinned to the `@v0.24.0` release tag for reproducible CI. Change it to a
|
|
17
|
+
# newer tag to upgrade, or to `@main` to always track the latest (unpinned).
|
|
17
18
|
#
|
|
18
19
|
# Security note: this workflow makes commits back to the PR branch. It refuses
|
|
19
20
|
# to run on PRs from forks (where pushing back is impossible by design).
|
|
@@ -43,7 +44,7 @@ jobs:
|
|
|
43
44
|
fetch-depth: 0
|
|
44
45
|
|
|
45
46
|
- name: Run DocGuard fix --write + auto-commit + PR comment
|
|
46
|
-
uses: raccioly/docguard@
|
|
47
|
+
uses: raccioly/docguard@v0.24.0
|
|
47
48
|
with:
|
|
48
49
|
command: fix
|
|
49
50
|
auto-commit: 'true'
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
fetch-depth: 0
|
|
29
29
|
|
|
30
30
|
- name: Run all validators
|
|
31
|
-
uses: raccioly/docguard@
|
|
31
|
+
uses: raccioly/docguard@v0.24.0
|
|
32
32
|
with:
|
|
33
33
|
command: guard
|
|
34
34
|
# Flip to 'true' once your repo is clean — turns warnings into hard failures.
|
|
@@ -42,7 +42,7 @@ jobs:
|
|
|
42
42
|
- uses: actions/checkout@v4
|
|
43
43
|
|
|
44
44
|
- name: Score & comment
|
|
45
|
-
uses: raccioly/docguard@
|
|
45
|
+
uses: raccioly/docguard@v0.24.0
|
|
46
46
|
with:
|
|
47
47
|
command: score
|
|
48
48
|
format: json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docguard-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
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": {
|
|
@@ -45,6 +45,9 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=18.0.0"
|
|
47
47
|
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@babel/parser": "7.29.7"
|
|
50
|
+
},
|
|
48
51
|
"files": [
|
|
49
52
|
"cli/",
|
|
50
53
|
"templates/",
|
|
@@ -56,6 +59,5 @@
|
|
|
56
59
|
"PHILOSOPHY.md",
|
|
57
60
|
"README.md",
|
|
58
61
|
"LICENSE"
|
|
59
|
-
]
|
|
60
|
-
"dependencies": {}
|
|
62
|
+
]
|
|
61
63
|
}
|