docguard-cli 0.36.0 → 0.36.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/extensions/spec-kit-docguard/README.md +6 -6
- package/extensions/spec-kit-docguard/commands/sync.md +1 -1
- package/extensions/spec-kit-docguard/extension.yml +2 -2
- package/extensions/spec-kit-docguard/scripts/bash/common.sh +9 -17
- package/extensions/spec-kit-docguard/scripts/bash/docguard-check-docs.sh +18 -11
- package/extensions/spec-kit-docguard/skills/docguard-fix/SKILL.md +3 -3
- 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 -2
- package/extensions/spec-kit-docguard/templates/github-workflows/docguard-guard.yml +1 -1
- package/package.json +1 -1
- package/templates/ci/github-actions.yml +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# DocGuard — CDD Enforcement Extension for Spec Kit
|
|
2
2
|
|
|
3
|
-
Enterprise-grade Canonical-Driven Development (CDD) enforcement and **AI-readable project memory** for [Spec Kit](https://github.com/github/spec-kit). DocGuard builds
|
|
3
|
+
Enterprise-grade Canonical-Driven Development (CDD) enforcement and **AI-readable project memory** for [Spec Kit](https://github.com/github/spec-kit). DocGuard builds source-derived documentation context for supported code (`generate --plan`), refreshes generated sections as code changes (`sync`), and checks configured rules (`guard`) — with deterministic mechanical fixes (`fix --write`) where it can and grounded agent prompts where prose is needed.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **Language-
|
|
7
|
+
- **Configurable validators** — Structure, Security, Doc Quality, Test-Spec, Drift-Comments, API-Surface, Freshness, Cross-Reference, and more; use `docguard --help` for the current surface
|
|
8
|
+
- **Language-specific extraction** — Supported checks cover several languages and monorepos. Coverage varies by detector; unsupported inputs remain unverified.
|
|
9
9
|
- **AI-powered Generate** — `generate --plan` builds the code-truth skeleton in `<!-- docguard:section -->` markers and emits a structured agent task manifest; the AI writes the prose.
|
|
10
|
-
- **
|
|
10
|
+
- **Refresh and review** — `sync` surgically refreshes code-truth doc sections in place, **preserves human prose**, flags prose for agent review.
|
|
11
11
|
- **Mechanical `fix --write`** — deterministic, no-LLM: remove stale documented endpoints, refresh stale "N validators" counts, replace stale version refs, insert missing `## [Unreleased]`.
|
|
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
|
|
@@ -20,7 +20,7 @@ Enterprise-grade Canonical-Driven Development (CDD) enforcement and **AI-readabl
|
|
|
20
20
|
npm install -g docguard-cli
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Spec Kit orchestration scripts require a local `node_modules/docguard-cli` installation or `docguard` on PATH; they do not implicitly download a CLI. Direct CLI use via npx remains available:
|
|
24
24
|
```bash
|
|
25
25
|
npx docguard-cli guard
|
|
26
26
|
```
|
|
@@ -45,7 +45,7 @@ docguard score
|
|
|
45
45
|
|
|
46
46
|
| Command | Alias | Purpose |
|
|
47
47
|
|---------|-------|---------|
|
|
48
|
-
| `speckit.docguard.guard` | `docguard.guard` | Run
|
|
48
|
+
| `speckit.docguard.guard` | `docguard.guard` | Run configurable quality gate with severity triage |
|
|
49
49
|
| `speckit.docguard.fix` | `docguard.fix` | AI-driven documentation repair with codebase research |
|
|
50
50
|
| `speckit.docguard.review` | `docguard.review` | Cross-document semantic consistency analysis (read-only) |
|
|
51
51
|
| `speckit.docguard.score` | `docguard.score` | CDD maturity score with ROI improvement roadmap |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: Refresh canonical code-truth sections and flag prose for review — refresh code-truth sections in place, preserve human prose
|
|
3
3
|
allowed-tools: Bash, Read, Edit
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -3,7 +3,7 @@ schema_version: "1.0"
|
|
|
3
3
|
extension:
|
|
4
4
|
id: "docguard"
|
|
5
5
|
name: "DocGuard — CDD Enforcement"
|
|
6
|
-
version: "0.36.
|
|
6
|
+
version: "0.36.1"
|
|
7
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"
|
|
@@ -27,7 +27,7 @@ provides:
|
|
|
27
27
|
commands:
|
|
28
28
|
- name: "speckit.docguard.guard"
|
|
29
29
|
file: "commands/guard.md"
|
|
30
|
-
description: "Run
|
|
30
|
+
description: "Run configurable quality gate with severity triage and remediation plan"
|
|
31
31
|
|
|
32
32
|
- name: "speckit.docguard.fix"
|
|
33
33
|
file: "commands/generate.md"
|
|
@@ -23,25 +23,17 @@ find_docguard_root() {
|
|
|
23
23
|
|
|
24
24
|
find_docguard_cli() {
|
|
25
25
|
local root="${1:-$(pwd)}"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
echo "docguard-cli"
|
|
36
|
-
return 0
|
|
37
|
-
fi
|
|
38
|
-
|
|
39
|
-
# Fall back to npx
|
|
40
|
-
if command -v npx >/dev/null 2>&1; then
|
|
41
|
-
echo "npx docguard-cli"
|
|
26
|
+
local entry
|
|
27
|
+
for entry in "$root/cli/docguard.mjs" "$root/node_modules/docguard-cli/cli/docguard.mjs"; do
|
|
28
|
+
if [ -f "$entry" ] && command -v node >/dev/null 2>&1; then
|
|
29
|
+
printf '%q %q\n' "$(command -v node)" "$entry"
|
|
30
|
+
return 0
|
|
31
|
+
fi
|
|
32
|
+
done
|
|
33
|
+
if command -v docguard >/dev/null 2>&1; then
|
|
34
|
+
printf '%q\n' "$(command -v docguard)"
|
|
42
35
|
return 0
|
|
43
36
|
fi
|
|
44
|
-
|
|
45
37
|
return 1
|
|
46
38
|
}
|
|
47
39
|
|
|
@@ -104,17 +104,24 @@ if $JSON_MODE; then
|
|
|
104
104
|
# Optionally include score and guard
|
|
105
105
|
EXTRAS=""
|
|
106
106
|
if $VERBOSE; then
|
|
107
|
-
SCORE_OUTPUT=$(eval $CLI_CMD score --format json
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
SCORE_OUTPUT=$(eval "$CLI_CMD score --format json")
|
|
108
|
+
SCORE=$(printf '%s' "$SCORE_OUTPUT" | node -e '
|
|
109
|
+
const d=JSON.parse(require("fs").readFileSync(0,"utf8"));
|
|
110
|
+
if(!Number.isFinite(d.score) || d.score<0 || d.score>100) throw Error("Invalid DocGuard score");
|
|
111
|
+
process.stdout.write(String(d.score));
|
|
112
|
+
')
|
|
113
|
+
GUARD_STATUS=0
|
|
114
|
+
GUARD_OUTPUT=$(eval "$CLI_CMD guard --format json") || GUARD_STATUS=$?
|
|
115
|
+
EXTRAS=$(printf '%s' "$GUARD_OUTPUT" | node -e '
|
|
116
|
+
const d=JSON.parse(require("fs").readFileSync(0,"utf8"));
|
|
117
|
+
const exit=Number(process.argv[2]);
|
|
118
|
+
const expected={PASS:0,WARN:2,FAIL:1};
|
|
119
|
+
if(!Object.hasOwn(expected,d.status) || expected[d.status]!==exit ||
|
|
120
|
+
!Number.isInteger(d.passed) || !Number.isInteger(d.total) ||
|
|
121
|
+
d.passed<0 || d.total<d.passed) throw Error("Invalid DocGuard guard report");
|
|
122
|
+
const fields={score:Number(process.argv[1]),guardPass:d.passed,guardTotal:d.total,guardStatus:d.status};
|
|
123
|
+
process.stdout.write(","+JSON.stringify(fields).slice(1,-1));
|
|
124
|
+
' "$SCORE" "$GUARD_STATUS")
|
|
118
125
|
fi
|
|
119
126
|
|
|
120
127
|
# Check for spec-kit
|
|
@@ -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.36.
|
|
9
|
+
version: 0.36.1
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-fix
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.36.
|
|
12
|
+
<!-- docguard:version: 0.36.1 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Fix Skill
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ If no arguments, fix ALL issues found by `docguard diagnose`.
|
|
|
25
25
|
|
|
26
26
|
## Goal
|
|
27
27
|
|
|
28
|
-
Research the actual codebase to generate or repair canonical documentation that passes DocGuard's
|
|
28
|
+
Research the actual codebase to generate or repair canonical documentation that passes DocGuard's configurable guard suite. This skill replaces generic templates with real, project-specific content and iterates until quality checks pass.
|
|
29
29
|
|
|
30
30
|
## Operating Constraints
|
|
31
31
|
|
|
@@ -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.36.
|
|
10
|
+
version: 0.36.1
|
|
11
11
|
source: extensions/spec-kit-docguard/skills/docguard-guard
|
|
12
12
|
---
|
|
13
|
-
<!-- docguard:version: 0.36.
|
|
13
|
+
<!-- docguard:version: 0.36.1 -->
|
|
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.36.
|
|
9
|
+
version: 0.36.1
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-review
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.36.
|
|
12
|
+
<!-- docguard:version: 0.36.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.36.
|
|
9
|
+
version: 0.36.1
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-score
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.36.
|
|
12
|
+
<!-- docguard:version: 0.36.1 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Score Skill
|
|
15
15
|
|
|
@@ -4,10 +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.36.
|
|
7
|
+
version: 0.36.1
|
|
8
8
|
source: extensions/spec-kit-docguard/skills/docguard-sync
|
|
9
9
|
---
|
|
10
|
-
<!-- docguard:version: 0.36.
|
|
10
|
+
<!-- docguard:version: 0.36.1 -->
|
|
11
11
|
|
|
12
12
|
# DocGuard Sync Skill
|
|
13
13
|
|
package/package.json
CHANGED