docguard-cli 0.37.1 → 0.38.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.
Files changed (29) hide show
  1. package/README.md +6 -4
  2. package/cli/commands/reconcile.mjs +42 -0
  3. package/cli/commands/retire.mjs +11 -15
  4. package/cli/commands/specs.mjs +179 -3
  5. package/cli/commands/sync.mjs +16 -44
  6. package/cli/docguard.mjs +36 -2
  7. package/cli/scanners/document-lifecycle.mjs +19 -43
  8. package/cli/scanners/lifecycle-context.mjs +50 -0
  9. package/cli/scanners/reconciliation.mjs +141 -0
  10. package/cli/scanners/requirement-evidence.mjs +41 -8
  11. package/cli/scanners/retirement-manifest.mjs +52 -0
  12. package/cli/scanners/spec-registry.mjs +36 -9
  13. package/cli/shared-sync-scope.mjs +35 -0
  14. package/cli/validators/traceability.mjs +2 -1
  15. package/cli/writers/file-transaction.mjs +85 -0
  16. package/cli/writers/spec-outcomes.mjs +27 -0
  17. package/extensions/spec-kit-docguard/README.md +6 -2
  18. package/extensions/spec-kit-docguard/commands/complete.md +38 -0
  19. package/extensions/spec-kit-docguard/extension.yml +20 -4
  20. package/extensions/spec-kit-docguard/skills/docguard-fix/SKILL.md +2 -2
  21. package/extensions/spec-kit-docguard/skills/docguard-guard/SKILL.md +2 -2
  22. package/extensions/spec-kit-docguard/skills/docguard-review/SKILL.md +2 -2
  23. package/extensions/spec-kit-docguard/skills/docguard-score/SKILL.md +2 -2
  24. package/extensions/spec-kit-docguard/skills/docguard-sync/SKILL.md +2 -2
  25. package/extensions/spec-kit-docguard/templates/extensions.yml +16 -0
  26. package/extensions/spec-kit-docguard/templates/github-workflows/docguard-guard.yml +1 -1
  27. package/package.json +1 -1
  28. package/schemas/docguard-specs.schema.json +19 -2
  29. package/templates/ci/github-actions.yml +1 -1
@@ -3,7 +3,7 @@ schema_version: "1.0"
3
3
  extension:
4
4
  id: "docguard"
5
5
  name: "DocGuard — CDD Enforcement"
6
- version: "0.37.1"
6
+ version: "0.38.0"
7
7
  description: "Canonical-Driven Development enforcement as a true spec-kit extension. LLM-first design with automated validators, 5 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"
@@ -57,6 +57,10 @@ provides:
57
57
  file: "commands/preflight.md"
58
58
  description: "Gate a generated specification against registry integrity and prior intent"
59
59
 
60
+ - name: "speckit.docguard.complete"
61
+ file: "commands/complete.md"
62
+ description: "Plan the reviewed implemented-to-verified lifecycle transaction"
63
+
60
64
  # GitHub Actions workflow starters — copyable templates users drop into
61
65
  # .github/workflows/ for guard/fix/sync/score integration.
62
66
  workflows:
@@ -88,9 +92,21 @@ hooks:
88
92
  description: "Load current spec intent and block specification on stale lifecycle state"
89
93
 
90
94
  after_implement:
91
- command: "speckit.docguard.guard"
92
- optional: false
93
- description: "Quality gate — ensures docs stay in sync with code"
95
+ - command: "speckit.docguard.guard"
96
+ optional: false
97
+ priority: 5
98
+ description: "Quality gate — ensures docs stay in sync with code"
99
+ - command: "speckit.docguard.complete"
100
+ optional: true
101
+ priority: 10
102
+ prompt: "Review evidence and plan this spec's completion transaction?"
103
+ description: "Plan lifecycle verification after implementation"
104
+
105
+ after_converge:
106
+ command: "speckit.docguard.complete"
107
+ optional: true
108
+ prompt: "Review evidence and plan this converged spec's completion transaction?"
109
+ description: "Plan lifecycle verification after convergence"
94
110
 
95
111
  before_tasks:
96
112
  command: "speckit.docguard.preflight"
@@ -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.37.1
9
+ version: 0.38.0
10
10
  source: extensions/spec-kit-docguard/skills/docguard-fix
11
11
  ---
12
- <!-- docguard:version: 0.37.1 -->
12
+ <!-- docguard:version: 0.38.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.37.1
10
+ version: 0.38.0
11
11
  source: extensions/spec-kit-docguard/skills/docguard-guard
12
12
  ---
13
- <!-- docguard:version: 0.37.1 -->
13
+ <!-- docguard:version: 0.38.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.37.1
9
+ version: 0.38.0
10
10
  source: extensions/spec-kit-docguard/skills/docguard-review
11
11
  ---
12
- <!-- docguard:version: 0.37.1 -->
12
+ <!-- docguard:version: 0.38.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.37.1
9
+ version: 0.38.0
10
10
  source: extensions/spec-kit-docguard/skills/docguard-score
11
11
  ---
12
- <!-- docguard:version: 0.37.1 -->
12
+ <!-- docguard:version: 0.38.0 -->
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.37.1
7
+ version: 0.38.0
8
8
  source: extensions/spec-kit-docguard/skills/docguard-sync
9
9
  ---
10
- <!-- docguard:version: 0.37.1 -->
10
+ <!-- docguard:version: 0.38.0 -->
11
11
 
12
12
  # DocGuard Sync Skill
13
13
 
@@ -26,6 +26,22 @@ hooks:
26
26
  description: "Validate documentation passes CDD standards after implementation"
27
27
  enabled: true
28
28
  optional: false
29
+ priority: 5
30
+ - extension: docguard
31
+ command: speckit.docguard.complete
32
+ description: "Plan reviewed lifecycle verification after implementation"
33
+ enabled: true
34
+ optional: true
35
+ priority: 10
36
+ prompt: "Review evidence and plan this spec's completion transaction?"
37
+
38
+ after_converge:
39
+ - extension: docguard
40
+ command: speckit.docguard.complete
41
+ description: "Plan reviewed lifecycle verification after convergence"
42
+ enabled: true
43
+ optional: true
44
+ prompt: "Review evidence and plan this converged spec's completion transaction?"
29
45
 
30
46
  # Gate the generated spec before /speckit.tasks creates implementation work.
31
47
  before_tasks:
@@ -35,7 +35,7 @@ jobs:
35
35
  node-version: '20'
36
36
 
37
37
  - name: Install DocGuard
38
- run: npm install --global --ignore-scripts docguard-cli@0.37.1
38
+ run: npm install --global --ignore-scripts docguard-cli@0.38.0
39
39
 
40
40
  - name: Run DocGuard
41
41
  shell: bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docguard-cli",
3
- "version": "0.37.1",
3
+ "version": "0.38.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": {
@@ -8,7 +8,7 @@
8
8
  "required": ["$schema", "schemaVersion", "specs", "tombstones"],
9
9
  "properties": {
10
10
  "$schema": { "const": "https://raccioly.github.io/docguard/schemas/docguard-specs.schema.json" },
11
- "schemaVersion": { "const": 1 },
11
+ "schemaVersion": { "const": 2 },
12
12
  "specs": {
13
13
  "type": "array",
14
14
  "items": { "$ref": "#/definitions/spec" }
@@ -75,13 +75,18 @@
75
75
  "reconciliation": {
76
76
  "type": "object",
77
77
  "additionalProperties": false,
78
- "required": ["lastReviewedRevision"],
78
+ "required": ["lastReviewedRevision", "outcomes"],
79
79
  "properties": {
80
80
  "lastReviewedRevision": {
81
81
  "anyOf": [
82
82
  { "type": "null" },
83
83
  { "type": "string", "pattern": "^[0-9a-f]{40}([0-9a-f]{24})?$" }
84
84
  ]
85
+ },
86
+ "outcomes": {
87
+ "type": "array",
88
+ "maxItems": 20,
89
+ "items": { "$ref": "#/definitions/outcome" }
85
90
  }
86
91
  }
87
92
  }
@@ -96,6 +101,18 @@
96
101
  "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
97
102
  }
98
103
  },
104
+ "outcome": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "required": ["revision", "reason", "evidence", "deviations", "successor"],
108
+ "properties": {
109
+ "revision": { "type": "string", "pattern": "^[0-9a-f]{40}([0-9a-f]{24})?$" },
110
+ "reason": { "type": "string", "minLength": 1, "maxLength": 500 },
111
+ "evidence": { "type": "array", "maxItems": 100, "items": { "type": "string", "minLength": 1 } },
112
+ "deviations": { "type": "array", "maxItems": 20, "items": { "type": "string", "minLength": 1, "maxLength": 500 } },
113
+ "successor": { "anyOf": [{ "type": "null" }, { "$ref": "#/definitions/specId" }] }
114
+ }
115
+ },
99
116
  "testEvidence": {
100
117
  "type": "object",
101
118
  "additionalProperties": false,
@@ -31,7 +31,7 @@ jobs:
31
31
  node-version: '20'
32
32
 
33
33
  - name: Install DocGuard
34
- run: npm install --global --ignore-scripts docguard-cli@0.37.1
34
+ run: npm install --global --ignore-scripts docguard-cli@0.38.0
35
35
 
36
36
  - name: Run DocGuard
37
37
  shell: bash