docguard-cli 0.22.0 → 0.22.1
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 +3 -2
- package/cli/commands/explain.mjs +11 -0
- package/cli/validators/test-spec.mjs +1 -1
- package/extensions/spec-kit-docguard/commands/guard.md +2 -2
- package/extensions/spec-kit-docguard/extension.yml +1 -1
- package/extensions/spec-kit-docguard/skills/docguard-fix/SKILL.md +2 -2
- package/extensions/spec-kit-docguard/skills/docguard-guard/SKILL.md +3 -3
- 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 +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,8 +106,9 @@ Recent highlights across the v0.16 → v0.19 line:
|
|
|
106
106
|
two commits. Pinpoints regressions without re-running the full suite by hand.
|
|
107
107
|
- **`docguard upgrade --apply --pr`** — when the config schema bumps, DocGuard migrates
|
|
108
108
|
`.docguard.json` for you and (optionally) opens a PR with the change.
|
|
109
|
-
- **Language-aware
|
|
110
|
-
Java, Ruby, and PHP layouts in addition to JS/TS.
|
|
109
|
+
- **Language-aware `docguard trace`** — the standalone `trace` command understands Python, Rust, Go,
|
|
110
|
+
Java, Ruby, and PHP layouts in addition to JS/TS. (The guard-time Traceability validator is JS/TS-first
|
|
111
|
+
today; broader language parity is on the v0.23 roadmap.)
|
|
111
112
|
- **Per-validator severity overrides** — escalate `freshness` to `high` for production repos,
|
|
112
113
|
demote `doc-quality` to `low` for prototypes. Configurable per-project.
|
|
113
114
|
- **JSON Schema for `.docguard.json`** — IDE autocomplete, in-line docs, and validation via
|
package/cli/commands/explain.mjs
CHANGED
|
@@ -150,6 +150,17 @@ const EXPLAINERS = {
|
|
|
150
150
|
example: 'AGENTS.md says "22 validators" and `docguard guard` shows 22 active validators',
|
|
151
151
|
standard: 'CDD principle: documented metrics match reality',
|
|
152
152
|
},
|
|
153
|
+
canonicalSync: {
|
|
154
|
+
title: 'Canonical-Sync — README count claims match code-truth (DocGuard repo only)',
|
|
155
|
+
what: 'Count-level check (complementing surface-sync\'s item-level check). Verifies that numeric claims in the README — "ships N commands", "N validators", mermaid diagram counts — match what the code actually exposes. N/A unless the project opts in via `canonicalSync` config; primarily for DocGuard\'s own repo.',
|
|
156
|
+
why: 'Hardcoded counts in prose and diagrams drift silently every time a command or validator is added/removed. A README claiming "23 validators" when there are 24 erodes trust and misleads AI agents reading the docs.',
|
|
157
|
+
triggers: [
|
|
158
|
+
['README.md claims "N validators" but guard reports M', 'Update the count. `docguard fix --write` handles this mechanically across all docs.'],
|
|
159
|
+
['architecture diagram has stale counts', 'Update the count inside the mermaid block (fix --write does not edit mermaid; do it manually).'],
|
|
160
|
+
],
|
|
161
|
+
example: 'README says "24 validators" and the architecture mermaid says "Validators (24)" — both matching the live registry',
|
|
162
|
+
standard: 'CDD principle: documented counts match implemented counts',
|
|
163
|
+
},
|
|
153
164
|
surfaceSync: {
|
|
154
165
|
title: 'Surface-Sync — every code-derived list entry is documented',
|
|
155
166
|
what: 'Item-level check (complementing canonical-sync\'s count-level check). For each configured surface (e.g. commands → `cli/commands/*.mjs`), compares the discovered files against the names appearing in table rows / bullet lists in target docs (README.md, AGENTS.md). Warns when a code item is missing from the doc, or a doc item is missing from code.',
|
|
@@ -175,7 +175,7 @@ export function validateTestSpec(projectDir, config) {
|
|
|
175
175
|
|
|
176
176
|
if (hasTestDir || hasColocated || hasConfigTests) {
|
|
177
177
|
// Tests exist but the spec maps none of them → not applicable, not a pass.
|
|
178
|
-
results.note = 'TEST-SPEC.md declares no service-to-test mappings';
|
|
178
|
+
results.note = 'TEST-SPEC.md declares no service-to-test mappings. Add a "## Source-to-Test Map" table with `| Source | Test file | Status |` columns — run `docguard explain "no service-to-test mappings"` for the exact format.';
|
|
179
179
|
} else {
|
|
180
180
|
results.warnings.push(
|
|
181
181
|
'No test directory or co-located test files found. ' +
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Run
|
|
2
|
+
description: "Run the full quality gate with severity triage and actionable remediation"
|
|
3
3
|
handoffs:
|
|
4
4
|
- label: Fix All Issues
|
|
5
5
|
agent: docguard.fix
|
|
@@ -43,7 +43,7 @@ npx --yes docguard-cli@latest guard $ARGUMENTS
|
|
|
43
43
|
|
|
44
44
|
5. Re-run guard after fixes. Iterate until all checks pass (max 3 iterations).
|
|
45
45
|
|
|
46
|
-
## Validators
|
|
46
|
+
## Validators
|
|
47
47
|
|
|
48
48
|
| Validator | What It Checks |
|
|
49
49
|
|-----------|---------------|
|
|
@@ -3,7 +3,7 @@ schema_version: "1.0"
|
|
|
3
3
|
extension:
|
|
4
4
|
id: "docguard"
|
|
5
5
|
name: "DocGuard — CDD Enforcement"
|
|
6
|
-
version: "0.22.
|
|
6
|
+
version: "0.22.1"
|
|
7
7
|
description: "Canonical-Driven Development enforcement as a true spec-kit extension. LLM-first design with 19 automated validators, 4 AI behavior skills, spec-kit skill chaining, and workflow hooks. Zero NPM runtime dependencies."
|
|
8
8
|
author: "Ricardo Accioly"
|
|
9
9
|
repository: "https://github.com/raccioly/docguard"
|
|
@@ -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.22.
|
|
9
|
+
version: 0.22.1
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-fix
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.22.
|
|
12
|
+
<!-- docguard:version: 0.22.1 -->
|
|
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.22.
|
|
10
|
+
version: 0.22.1
|
|
11
11
|
source: extensions/spec-kit-docguard/skills/docguard-guard
|
|
12
12
|
---
|
|
13
|
-
<!-- docguard:version: 0.22.
|
|
13
|
+
<!-- docguard:version: 0.22.1 -->
|
|
14
14
|
|
|
15
15
|
# DocGuard Guard Skill
|
|
16
16
|
|
|
@@ -24,7 +24,7 @@ You **MUST** consider the user input before proceeding (if not empty).
|
|
|
24
24
|
|
|
25
25
|
## Goal
|
|
26
26
|
|
|
27
|
-
Execute DocGuard's
|
|
27
|
+
Execute DocGuard's full guard validator suite against the current project, parse structured results, triage findings by severity and impact, and produce an actionable remediation plan. This skill transforms raw CLI output into an AI-digestible quality assessment.
|
|
28
28
|
|
|
29
29
|
## Pre-Execution Checks
|
|
30
30
|
|
|
@@ -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.22.
|
|
9
|
+
version: 0.22.1
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-review
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.22.
|
|
12
|
+
<!-- docguard:version: 0.22.1 -->
|
|
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.22.
|
|
9
|
+
version: 0.22.1
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-score
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.22.
|
|
12
|
+
<!-- docguard:version: 0.22.1 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Score Skill
|
|
15
15
|
|
|
@@ -4,7 +4,7 @@ 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.22.
|
|
7
|
+
version: 0.22.1
|
|
8
8
|
source: extensions/spec-kit-docguard/skills/docguard-sync
|
|
9
9
|
---
|
|
10
10
|
|
package/package.json
CHANGED