docguard-cli 0.11.1 → 0.12.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 +34 -15
- package/cli/commands/diff.mjs +15 -17
- package/cli/commands/guard.mjs +124 -7
- package/cli/commands/init.mjs +52 -1
- package/cli/commands/upgrade.mjs +250 -0
- package/cli/docguard.mjs +32 -3
- package/cli/ensure-skills.mjs +8 -1
- package/cli/shared-ignore.mjs +50 -0
- package/cli/shared-source.mjs +17 -6
- package/cli/shared.mjs +62 -0
- package/cli/validators/cross-reference.mjs +281 -0
- package/cli/validators/docs-coverage.mjs +4 -1
- package/cli/validators/environment.mjs +9 -3
- package/commands/docguard.guard.md +2 -2
- package/docs/quickstart.md +1 -1
- package/extensions/spec-kit-docguard/README.md +1 -1
- package/extensions/spec-kit-docguard/commands/guard.md +1 -1
- package/extensions/spec-kit-docguard/extension.yml +11 -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/extensions/spec-kit-docguard/templates/github-workflows/docguard-autofix.yml +51 -0
- package/extensions/spec-kit-docguard/templates/github-workflows/docguard-guard.yml +48 -0
- package/package.json +1 -1
- package/templates/commands/docguard.guard.md +2 -2
|
@@ -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.12.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-fix
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.12.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.12.0
|
|
11
11
|
source: extensions/spec-kit-docguard/skills/docguard-guard
|
|
12
12
|
---
|
|
13
|
-
<!-- docguard:version: 0.
|
|
13
|
+
<!-- docguard:version: 0.12.0 -->
|
|
14
14
|
|
|
15
15
|
# DocGuard Guard Skill
|
|
16
16
|
|
|
@@ -139,7 +139,7 @@ For each finding, provide a **specific, actionable fix** — not "fix the issue"
|
|
|
139
139
|
|
|
140
140
|
Based on the triage results:
|
|
141
141
|
|
|
142
|
-
- **If all PASS**: "All
|
|
142
|
+
- **If all PASS**: "All 21 validators passed. Project is CDD-compliant. Ready to commit."
|
|
143
143
|
- **If only MEDIUM/LOW warnings**: "Non-blocking warnings found. Safe to commit, but consider running `/docguard.fix` for automated remediation."
|
|
144
144
|
- **If HIGH or CRITICAL failures**: "Blocking issues found. Fix these before committing. Suggest running `/docguard.fix --doc [most impactful doc]` next."
|
|
145
145
|
|
|
@@ -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.12.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-review
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.12.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.12.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-score
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.12.0 -->
|
|
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.
|
|
7
|
+
version: 0.12.0
|
|
8
8
|
source: extensions/spec-kit-docguard/skills/docguard-sync
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# DocGuard Auto-Fix — applies mechanical doc fixes on every PR.
|
|
2
|
+
#
|
|
3
|
+
# What this does on each PR:
|
|
4
|
+
# 1. Runs `docguard fix --write` (deterministic fixes: version bumps,
|
|
5
|
+
# counts, endpoint removal from API-REFERENCE, changelog stubs).
|
|
6
|
+
# 2. If anything changed, commits the diff back to the PR branch as
|
|
7
|
+
# `docguard-bot` and posts a summary comment.
|
|
8
|
+
# 3. If nothing changed, posts a "no fixes needed" comment.
|
|
9
|
+
#
|
|
10
|
+
# Prose rewrites (entire-section regenerations) still need an AI agent —
|
|
11
|
+
# run `/docguard.fix` in your editor for those.
|
|
12
|
+
#
|
|
13
|
+
# Setup:
|
|
14
|
+
# 1. Copy this file to .github/workflows/docguard-autofix.yml
|
|
15
|
+
# 2. Ensure the workflow has the permissions block below (write access).
|
|
16
|
+
# 3. (Optional) Pin to a specific DocGuard version by changing `@main` to a tag.
|
|
17
|
+
#
|
|
18
|
+
# Security note: this workflow makes commits back to the PR branch. It refuses
|
|
19
|
+
# to run on PRs from forks (where pushing back is impossible by design).
|
|
20
|
+
name: DocGuard Auto-Fix
|
|
21
|
+
|
|
22
|
+
on:
|
|
23
|
+
pull_request:
|
|
24
|
+
types: [opened, synchronize, reopened]
|
|
25
|
+
|
|
26
|
+
permissions:
|
|
27
|
+
contents: write # commit fixes back to the PR branch
|
|
28
|
+
pull-requests: write # post the summary comment
|
|
29
|
+
|
|
30
|
+
jobs:
|
|
31
|
+
autofix:
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
# Skip on fork PRs — the next step would error trying to push.
|
|
34
|
+
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
35
|
+
steps:
|
|
36
|
+
- name: Checkout PR branch (with write token)
|
|
37
|
+
uses: actions/checkout@v4
|
|
38
|
+
with:
|
|
39
|
+
ref: ${{ github.event.pull_request.head.ref }}
|
|
40
|
+
# Default GITHUB_TOKEN has the contents:write scope granted above.
|
|
41
|
+
# For org-protected branches or commit signing, swap in a PAT/App token.
|
|
42
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
43
|
+
fetch-depth: 0
|
|
44
|
+
|
|
45
|
+
- name: Run DocGuard fix --write + auto-commit + PR comment
|
|
46
|
+
uses: raccioly/docguard@main
|
|
47
|
+
with:
|
|
48
|
+
command: fix
|
|
49
|
+
auto-commit: 'true'
|
|
50
|
+
comment-on-pr: 'true'
|
|
51
|
+
commit-message: 'docs: apply DocGuard mechanical fixes'
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# DocGuard Guard — runs all 20 validators on every PR and main push.
|
|
2
|
+
#
|
|
3
|
+
# This is the canonical CI gate. It does NOT modify your repo — it only
|
|
4
|
+
# reports. Pair with `docguard-autofix.yml` if you want mechanical fixes
|
|
5
|
+
# applied automatically.
|
|
6
|
+
#
|
|
7
|
+
# Setup:
|
|
8
|
+
# 1. Copy this file to .github/workflows/docguard-guard.yml
|
|
9
|
+
# 2. (Optional) Set `fail-on-warning: 'true'` to make warnings block the PR.
|
|
10
|
+
name: DocGuard Guard
|
|
11
|
+
|
|
12
|
+
on:
|
|
13
|
+
push:
|
|
14
|
+
branches: [main]
|
|
15
|
+
pull_request:
|
|
16
|
+
branches: [main]
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
pull-requests: write # only needed for the optional score comment below
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
guard:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
|
|
30
|
+
- name: Run all validators
|
|
31
|
+
uses: raccioly/docguard@main
|
|
32
|
+
with:
|
|
33
|
+
command: guard
|
|
34
|
+
# Flip to 'true' once your repo is clean — turns warnings into hard failures.
|
|
35
|
+
fail-on-warning: 'false'
|
|
36
|
+
|
|
37
|
+
# Optional: post the CDD score on every PR as a tracked metric.
|
|
38
|
+
score:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
if: github.event_name == 'pull_request'
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
|
|
44
|
+
- name: Score & comment
|
|
45
|
+
uses: raccioly/docguard@main
|
|
46
|
+
with:
|
|
47
|
+
command: score
|
|
48
|
+
format: json
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Run DocGuard guard validation — check all
|
|
2
|
+
description: Run DocGuard guard validation — check all 21 validators and fix any issues
|
|
3
3
|
handoffs:
|
|
4
4
|
- label: Fix Issues
|
|
5
5
|
agent: docguard.fix
|
|
@@ -19,7 +19,7 @@ You are an AI agent enforcing Canonical-Driven Development (CDD) compliance usin
|
|
|
19
19
|
npx docguard-cli guard
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Read the output. It shows pass (✅), warn (⚠️), or fail (❌) for each of the
|
|
22
|
+
Read the output. It shows pass (✅), warn (⚠️), or fail (❌) for each of the 21 validators:
|
|
23
23
|
|
|
24
24
|
| Priority | Validators |
|
|
25
25
|
|----------|-----------|
|