docguard-cli 0.22.1__tar.gz → 0.23.0__tar.gz

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 (353) hide show
  1. {docguard_cli-0.22.1/extensions/spec-kit-docguard → docguard_cli-0.23.0/.agent}/skills/docguard-fix/SKILL.md +2 -2
  2. {docguard_cli-0.22.1/extensions/spec-kit-docguard → docguard_cli-0.23.0/.agent}/skills/docguard-guard/SKILL.md +2 -2
  3. {docguard_cli-0.22.1/extensions/spec-kit-docguard → docguard_cli-0.23.0/.agent}/skills/docguard-review/SKILL.md +2 -2
  4. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/docguard-score/SKILL.md +2 -2
  5. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/docguard-sync/SKILL.md +1 -1
  6. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.gitignore +2 -1
  7. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.jules/bolt.md +3 -0
  8. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/CHANGELOG.md +46 -0
  9. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/PKG-INFO +4 -4
  10. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/README.md +3 -3
  11. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/ROADMAP.md +16 -4
  12. docguard_cli-0.23.0/assets/docguard-logo.png +0 -0
  13. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/demo.mjs +1 -1
  14. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/diff.mjs +18 -7
  15. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/trace.mjs +1 -99
  16. docguard_cli-0.23.0/cli/config.mjs +228 -0
  17. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/docguard.mjs +2 -217
  18. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/speckit.mjs +14 -0
  19. docguard_cli-0.23.0/cli/shared-trace-patterns.mjs +105 -0
  20. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/doc-quality.mjs +25 -2
  21. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/docs-diff.mjs +16 -6
  22. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/traceability.mjs +2 -52
  23. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-canonical/ARCHITECTURE.md +14 -11
  24. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-canonical/CI-RECIPES.md +2 -0
  25. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-canonical/DATA-MODEL.md +1 -1
  26. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-canonical/ENVIRONMENT.md +1 -1
  27. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-canonical/SECURITY.md +7 -5
  28. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-canonical/SURFACE-AUDIT.md +2 -0
  29. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-canonical/TEST-SPEC.md +6 -4
  30. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/extension.yml +1 -1
  31. {docguard_cli-0.22.1/.agent → docguard_cli-0.23.0/extensions/spec-kit-docguard}/skills/docguard-fix/SKILL.md +2 -2
  32. {docguard_cli-0.22.1/.agent → docguard_cli-0.23.0/extensions/spec-kit-docguard}/skills/docguard-guard/SKILL.md +2 -2
  33. {docguard_cli-0.22.1/.agent → docguard_cli-0.23.0/extensions/spec-kit-docguard}/skills/docguard-review/SKILL.md +2 -2
  34. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/skills/docguard-score/SKILL.md +2 -2
  35. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/skills/docguard-sync/SKILL.md +1 -1
  36. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/package.json +1 -1
  37. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/pyproject.toml +1 -1
  38. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/004-v020-env-var-false-negative/spec.md +2 -0
  39. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/005-hugocross-next-bugs/spec.md +2 -0
  40. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/doc-quality.test.mjs +41 -0
  41. docguard_cli-0.23.0/tests/speckit-bugfix.test.mjs +72 -0
  42. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/traceability.test.mjs +16 -0
  43. docguard_cli-0.23.0/vscode-extension/LICENSE +21 -0
  44. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/vscode-extension/extension.js +21 -5
  45. docguard_cli-0.23.0/vscode-extension/icon.png +0 -0
  46. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/vscode-extension/package.json +2 -2
  47. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.analyze.md +0 -0
  48. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.checklist.md +0 -0
  49. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.clarify.md +0 -0
  50. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.constitution.md +0 -0
  51. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.implement.md +0 -0
  52. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.plan.md +0 -0
  53. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.specify.md +0 -0
  54. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.tasks.md +0 -0
  55. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/commands/speckit.taskstoissues.md +0 -0
  56. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-analyze/SKILL.md +0 -0
  57. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-checklist/SKILL.md +0 -0
  58. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-clarify/SKILL.md +0 -0
  59. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-constitution/SKILL.md +0 -0
  60. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-implement/SKILL.md +0 -0
  61. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-plan/SKILL.md +0 -0
  62. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-specify/SKILL.md +0 -0
  63. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-tasks/SKILL.md +0 -0
  64. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.agent/skills/speckit-taskstoissues/SKILL.md +0 -0
  65. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.docguard.json +0 -0
  66. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.docguardignore +0 -0
  67. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  68. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  69. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.github/dependabot.yml +0 -0
  70. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.github/scripts/patch-catalog.py +0 -0
  71. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.github/workflows/ci.yml +0 -0
  72. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.github/workflows/release.yml +0 -0
  73. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.github/workflows/supply-chain.yml +0 -0
  74. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.github/workflows/sync-speckit-catalog.yml +0 -0
  75. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.jules/palette.md +0 -0
  76. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.jules/sentinel.md +0 -0
  77. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.npmignore +0 -0
  78. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.npmrc +0 -0
  79. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/extensions/.cache/catalog-ebf165086500aab1-metadata.json +0 -0
  80. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/extensions/.cache/catalog-ebf165086500aab1.json +0 -0
  81. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/extensions/.cache/catalog-metadata.json +0 -0
  82. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/extensions/.cache/catalog.json +0 -0
  83. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/init-options.json +0 -0
  84. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/memory/constitution.md +0 -0
  85. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/scripts/bash/check-prerequisites.sh +0 -0
  86. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/scripts/bash/common.sh +0 -0
  87. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/scripts/bash/create-new-feature.sh +0 -0
  88. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/scripts/bash/setup-plan.sh +0 -0
  89. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/scripts/bash/update-agent-context.sh +0 -0
  90. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/templates/agent-file-template.md +0 -0
  91. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/templates/checklist-template.md +0 -0
  92. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/templates/constitution-template.md +0 -0
  93. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/templates/plan-template.md +0 -0
  94. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/templates/spec-template.md +0 -0
  95. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/.specify/templates/tasks-template.md +0 -0
  96. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/AGENTS.md +0 -0
  97. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/CODE_OF_CONDUCT.md +0 -0
  98. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/COMPARISONS.md +0 -0
  99. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/CONTRIBUTING.md +0 -0
  100. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/DRIFT-LOG.md +0 -0
  101. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/LICENSE +0 -0
  102. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/PHILOSOPHY.md +0 -0
  103. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/SECURITY.md +0 -0
  104. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/STANDARD.md +0 -0
  105. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/SUPPLY-CHAIN-AUDIT.md +0 -0
  106. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/SUPPORT.md +0 -0
  107. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/action.yml +0 -0
  108. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/assets/bin/docguard +0 -0
  109. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/assets/demo.gif +0 -0
  110. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/assets/demo.tape +0 -0
  111. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/agents.mjs +0 -0
  112. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/badge.mjs +0 -0
  113. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/ci.mjs +0 -0
  114. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/diagnose.mjs +0 -0
  115. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/explain.mjs +0 -0
  116. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/fix.mjs +0 -0
  117. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/generate.mjs +0 -0
  118. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/guard.mjs +0 -0
  119. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/hooks.mjs +0 -0
  120. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/impact.mjs +0 -0
  121. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/init.mjs +0 -0
  122. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/llms.mjs +0 -0
  123. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/memory.mjs +0 -0
  124. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/publish.mjs +0 -0
  125. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/score.mjs +0 -0
  126. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/setup.mjs +0 -0
  127. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/sync.mjs +0 -0
  128. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/upgrade.mjs +0 -0
  129. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/commands/watch.mjs +0 -0
  130. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/ensure-skills.mjs +0 -0
  131. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/api-doc.mjs +0 -0
  132. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/cdk.mjs +0 -0
  133. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/doc-tools.mjs +0 -0
  134. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/frontend.mjs +0 -0
  135. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/iac.mjs +0 -0
  136. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/integrations.mjs +0 -0
  137. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/memory-plan.mjs +0 -0
  138. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/project-type.mjs +0 -0
  139. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/routes.mjs +0 -0
  140. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/scanners/schemas.mjs +0 -0
  141. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/shared-git.mjs +0 -0
  142. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/shared-ignore.mjs +0 -0
  143. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/shared-source.mjs +0 -0
  144. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/shared.mjs +0 -0
  145. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/api-surface.mjs +0 -0
  146. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/architecture.mjs +0 -0
  147. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/canonical-sync.mjs +0 -0
  148. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/changelog.mjs +0 -0
  149. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/cross-reference.mjs +0 -0
  150. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/docs-coverage.mjs +0 -0
  151. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/docs-sync.mjs +0 -0
  152. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/drift.mjs +0 -0
  153. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/environment.mjs +0 -0
  154. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/freshness.mjs +0 -0
  155. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/generated-staleness.mjs +0 -0
  156. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/metadata-sync.mjs +0 -0
  157. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/metrics-consistency.mjs +0 -0
  158. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/schema-sync.mjs +0 -0
  159. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/security.mjs +0 -0
  160. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/spec-kit.mjs +0 -0
  161. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/structure.mjs +0 -0
  162. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/surface-sync.mjs +0 -0
  163. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/test-spec.mjs +0 -0
  164. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/validators/todo-tracking.mjs +0 -0
  165. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/writers/api-reference.mjs +0 -0
  166. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/writers/fix-memory.mjs +0 -0
  167. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/writers/mechanical.mjs +0 -0
  168. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/cli/writers/sections.mjs +0 -0
  169. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/commands/docguard.fix.md +0 -0
  170. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/commands/docguard.guard.md +0 -0
  171. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/commands/docguard.review.md +0 -0
  172. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/commands/docguard.score.md +0 -0
  173. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/configs/fastify.json +0 -0
  174. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/configs/generic.json +0 -0
  175. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/configs/nextjs.json +0 -0
  176. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/configs/python.json +0 -0
  177. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docguard_cli/__init__.py +0 -0
  178. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docguard_cli/wrapper.py +0 -0
  179. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs/ai-integration.md +0 -0
  180. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs/commands.md +0 -0
  181. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs/configuration.md +0 -0
  182. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs/doc-sections.md +0 -0
  183. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs/faq.md +0 -0
  184. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs/installation.md +0 -0
  185. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs/profiles.md +0 -0
  186. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs/quickstart.md +0 -0
  187. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-canonical/REQUIREMENTS.md +0 -0
  188. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/docs-implementation/MIGRATION-v0.20.md +0 -0
  189. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/01-express-api/README.md +0 -0
  190. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/01-express-api/package.json +0 -0
  191. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/01-express-api/server.js +0 -0
  192. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/02-python-flask/README.md +0 -0
  193. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/02-python-flask/app.py +0 -0
  194. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/02-python-flask/docs-canonical/ARCHITECTURE.md +0 -0
  195. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/02-python-flask/requirements.txt +0 -0
  196. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/03-spec-kit-project/CHANGELOG.md +0 -0
  197. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/03-spec-kit-project/README.md +0 -0
  198. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/03-spec-kit-project/docs-canonical/ARCHITECTURE.md +0 -0
  199. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/03-spec-kit-project/docs-canonical/TEST-SPEC.md +0 -0
  200. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/03-spec-kit-project/package.json +0 -0
  201. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/03-spec-kit-project/src/index.js +0 -0
  202. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/03-spec-kit-project/tests/basic.test.js +0 -0
  203. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/examples/README.md +0 -0
  204. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/LICENSE +0 -0
  205. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/README.md +0 -0
  206. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/commands/diagnose.md +0 -0
  207. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/commands/fix.md +0 -0
  208. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/commands/generate.md +0 -0
  209. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/commands/guard.md +0 -0
  210. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/commands/init.md +0 -0
  211. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/commands/score.md +0 -0
  212. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/commands/sync.md +0 -0
  213. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/commands/trace.md +0 -0
  214. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/scripts/bash/common.sh +0 -0
  215. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/scripts/bash/docguard-check-docs.sh +0 -0
  216. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/scripts/bash/docguard-init-doc.sh +0 -0
  217. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/scripts/bash/docguard-suggest-fix.sh +0 -0
  218. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/templates/extensions.yml +0 -0
  219. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/templates/github-workflows/docguard-autofix.yml +0 -0
  220. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/extensions/spec-kit-docguard/templates/github-workflows/docguard-guard.yml +0 -0
  221. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/pr_description.md +0 -0
  222. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/schemas/docguard-config.schema.json +0 -0
  223. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/001-fix-ignore-validators/plan.md +0 -0
  224. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/001-fix-ignore-validators/spec.md +0 -0
  225. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/001-fix-ignore-validators/tasks.md +0 -0
  226. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/002-fix-test-discovery/plan.md +0 -0
  227. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/002-fix-test-discovery/spec.md +0 -0
  228. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/002-fix-test-discovery/tasks.md +0 -0
  229. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/003-v011-false-positives/plan.md +0 -0
  230. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/003-v011-false-positives/spec.md +0 -0
  231. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/specs/003-v011-false-positives/tasks.md +0 -0
  232. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/ADR.md.template +0 -0
  233. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/AGENTS.md.template +0 -0
  234. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/ARCHITECTURE.md.template +0 -0
  235. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/CHANGELOG.md.template +0 -0
  236. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/CURRENT-STATE.md.template +0 -0
  237. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/DATA-MODEL.md.template +0 -0
  238. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/DEPLOYMENT.md.template +0 -0
  239. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/DRIFT-LOG.md.template +0 -0
  240. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/ENVIRONMENT.md.template +0 -0
  241. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/KNOWN-GOTCHAS.md.template +0 -0
  242. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/REQUIREMENTS.md.template +0 -0
  243. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/ROADMAP.md.template +0 -0
  244. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/RUNBOOKS.md.template +0 -0
  245. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/SECURITY.md.template +0 -0
  246. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/TEST-SPEC.md.template +0 -0
  247. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/TROUBLESHOOTING.md.template +0 -0
  248. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/VENDOR-BUGS.md.template +0 -0
  249. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/ci/github-actions.yml +0 -0
  250. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/commands/docguard.fix.md +0 -0
  251. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/commands/docguard.guard.md +0 -0
  252. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/commands/docguard.init.md +0 -0
  253. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/commands/docguard.review.md +0 -0
  254. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/commands/docguard.update.md +0 -0
  255. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/.docguard.json +0 -0
  256. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/.env.example +0 -0
  257. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/AGENTS.md +0 -0
  258. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/CHANGELOG.md +0 -0
  259. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/DRIFT-LOG.md +0 -0
  260. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/README.md +0 -0
  261. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/docs-canonical/API-REFERENCE.md +0 -0
  262. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/docs-canonical/ARCHITECTURE.md +0 -0
  263. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/docs-canonical/DATA-MODEL.md +0 -0
  264. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/docs-canonical/ENVIRONMENT.md +0 -0
  265. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/docs-canonical/SECURITY.md +0 -0
  266. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/docs-canonical/TEST-SPEC.md +0 -0
  267. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/package.json +0 -0
  268. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/src/api.mjs +0 -0
  269. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/src/notifier.mjs +0 -0
  270. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/src/scheduler.mjs +0 -0
  271. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/templates/demo-fixture/src/worker.mjs +0 -0
  272. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/test-draft.js +0 -0
  273. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/test-metrics.js +0 -0
  274. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/anchor-autofix.test.mjs +0 -0
  275. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/api-doc.test.mjs +0 -0
  276. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/api-surface.test.mjs +0 -0
  277. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/api-write.test.mjs +0 -0
  278. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/architecture.test.mjs +0 -0
  279. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/b7-node-env-symmetry.test.mjs +0 -0
  280. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/backup-failure.test.mjs +0 -0
  281. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/canonical-sync.test.mjs +0 -0
  282. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/cdk-detection.test.mjs +0 -0
  283. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/changed-only-scoping.test.mjs +0 -0
  284. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/changed-only.test.mjs +0 -0
  285. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/changelog.test.mjs +0 -0
  286. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/commands.test.mjs +0 -0
  287. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/cross-reference.test.mjs +0 -0
  288. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/demo-command.test.mjs +0 -0
  289. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/docguardignore.test.mjs +0 -0
  290. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/docs-coverage.test.mjs +0 -0
  291. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/docs-diff.test.mjs +0 -0
  292. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/docs-sync.test.mjs +0 -0
  293. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/drift.test.mjs +0 -0
  294. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/environment.test.mjs +0 -0
  295. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/fix-memory.test.mjs +0 -0
  296. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/fix-suppression.test.mjs +0 -0
  297. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/fixture-projects.test.mjs +0 -0
  298. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/freshness.test.mjs +0 -0
  299. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/frontend-deep.test.mjs +0 -0
  300. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/frontend.test.mjs +0 -0
  301. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/generated-staleness.test.mjs +0 -0
  302. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/guard-classify.test.mjs +0 -0
  303. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/guard-no-throw.test.mjs +0 -0
  304. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/hooks.test.mjs +0 -0
  305. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/i18n.test.mjs +0 -0
  306. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/impact.test.mjs +0 -0
  307. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/init-smart-detection.test.mjs +0 -0
  308. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/integrations.test.mjs +0 -0
  309. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/mechanical.test.mjs +0 -0
  310. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/memory-plan.test.mjs +0 -0
  311. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/metadata-sync.test.mjs +0 -0
  312. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/metrics-consistency.test.mjs +0 -0
  313. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/metrics-dedup.test.mjs +0 -0
  314. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/monorepo-scanning.test.mjs +0 -0
  315. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/multi-spec.test.mjs +0 -0
  316. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/npm-pack-smoke.test.mjs +0 -0
  317. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/patch-0.11.2.test.mjs +0 -0
  318. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/plan-disk-cache.test.mjs +0 -0
  319. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/profile-flag.test.mjs +0 -0
  320. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/project-type.test.mjs +0 -0
  321. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/regenerate-section.test.mjs +0 -0
  322. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/routes-multilang.test.mjs +0 -0
  323. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/routes-nextjs-app-router.test.mjs +0 -0
  324. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/schema-sync.test.mjs +0 -0
  325. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/schemas-multilang.test.mjs +0 -0
  326. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/schemas.test.mjs +0 -0
  327. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/scoping-extended.test.mjs +0 -0
  328. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/section-na-markers.test.mjs +0 -0
  329. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/sections.test.mjs +0 -0
  330. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/security-init-injection.test.mjs +0 -0
  331. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/security.test.mjs +0 -0
  332. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/severity.test.mjs +0 -0
  333. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/shared-git.test.mjs +0 -0
  334. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/shared-source.test.mjs +0 -0
  335. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/stress-test.test.mjs +0 -0
  336. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/structure.test.mjs +0 -0
  337. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/surface-sync.test.mjs +0 -0
  338. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/sweep-nudge.test.mjs +0 -0
  339. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/sync-since.test.mjs +0 -0
  340. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/sync.test.mjs +0 -0
  341. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/test-spec.test.mjs +0 -0
  342. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/todo-tracking.test.mjs +0 -0
  343. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/trace-multilang.test.mjs +0 -0
  344. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/trace-reverse.test.mjs +0 -0
  345. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/upgrade-pr-e2e.test.mjs +0 -0
  346. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/upgrade-pr.test.mjs +0 -0
  347. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/upgrade.test.mjs +0 -0
  348. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/v020-consolidation.test.mjs +0 -0
  349. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/validator-naming.test.mjs +0 -0
  350. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/version-pin.test.mjs +0 -0
  351. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/tests/whats-new.test.mjs +0 -0
  352. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/vscode-extension/.vscodeignore +0 -0
  353. {docguard_cli-0.22.1 → docguard_cli-0.23.0}/vscode-extension/README.md +0 -0
@@ -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.1
9
+ version: 0.23.0
10
10
  source: extensions/spec-kit-docguard/skills/docguard-fix
11
11
  ---
12
- <!-- docguard:version: 0.22.1 -->
12
+ <!-- docguard:version: 0.23.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.22.1
10
+ version: 0.23.0
11
11
  source: extensions/spec-kit-docguard/skills/docguard-guard
12
12
  ---
13
- <!-- docguard:version: 0.22.1 -->
13
+ <!-- docguard:version: 0.23.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.22.1
9
+ version: 0.23.0
10
10
  source: extensions/spec-kit-docguard/skills/docguard-review
11
11
  ---
12
- <!-- docguard:version: 0.22.1 -->
12
+ <!-- docguard:version: 0.23.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.22.1
9
+ version: 0.23.0
10
10
  source: extensions/spec-kit-docguard/skills/docguard-score
11
11
  ---
12
- <!-- docguard:version: 0.22.1 -->
12
+ <!-- docguard:version: 0.23.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.22.1
7
+ version: 0.23.0
8
8
  source: extensions/spec-kit-docguard/skills/docguard-sync
9
9
  ---
10
10
 
@@ -1,8 +1,9 @@
1
1
  # Dependencies
2
2
  node_modules/
3
3
 
4
- # Build artifacts (npm pack output — never commit)
4
+ # Build artifacts (npm pack / vsce package output — never commit)
5
5
  *.tgz
6
+ *.vsix
6
7
 
7
8
  # Internal research (not part of the public package)
8
9
  Research/
@@ -5,3 +5,6 @@
5
5
  ## 2024-05-18 - [O(N*M) String Overhead]
6
6
  **Learning:** To prevent N^2 performance bottlenecks in nested loops (such as comparing a list of items against multiple documents), precomputing expensive operations like `.toLowerCase()` during the initial file load or mapping phase avoids redundant $O(N \times M)$ overhead.
7
7
  **Action:** Precompute expensive string operations and property lookups (like `.toLowerCase()` and `.substring()`) outside of inner loops and during file load mapping phases to improve scaling.
8
+ ## 2024-05-24 - Pre-compile RegExp in nested loops
9
+ **Learning:** Instantiating `new RegExp()` inside nested array methods like `.filter` and `.some` creates a severe O(N*M) performance bottleneck, especially when matching two large lists (e.g., documented tests vs. actual test files).
10
+ **Action:** Always pre-compile regular expressions and derived strings into an array of "matcher" objects outside of the loop before iterating, which shifts the instantiation cost from O(N*M) to O(N).
@@ -7,6 +7,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.23.0] - 2026-05-29
11
+
12
+ Validator-hardening minor release, driven by external field feedback and a full
13
+ self-audit. Theme: make the validators **fit real projects** and **tell the
14
+ truth**, rather than forcing ceremony or over-claiming. Honest fixes only — no
15
+ doc-gaming. Self-audit guard warnings went 20 → 0-of-ours (the only remaining
16
+ warning is a parallel session's untracked file).
17
+
18
+ ### Added
19
+ - **Language-aware guard Traceability** (field Issue 3) — the guard-time
20
+ Traceability validator now understands Python, Go, Rust, Java/Kotlin, Ruby,
21
+ and PHP layouts, not just JS/TS. The multilingual `TEST_PATTERNS` + `TRACE_MAP`
22
+ live in one shared module (`cli/shared-trace-patterns.mjs`) consumed by both
23
+ `docguard trace` and the validator, so they can't drift apart. (The README
24
+ previously claimed this but only the standalone `trace` command delivered it.)
25
+ - **Per-doc negation-load override** (field Issue 14) — `<!-- docguard:quality
26
+ negation-load off — reason -->` (or a numeric threshold), plus a project-wide
27
+ `docQuality.negationLoadThreshold` config. Security/operational/audit docs
28
+ legitimately use "never"/"must not"/"cannot"; this stops false flags without
29
+ weakening the check for tutorials.
30
+ - **Bugfix/lightweight spec type** — `<!-- docguard:spec-type bugfix -->` makes
31
+ the Spec-Kit validator check a defect spec for Root Cause + Fix instead of the
32
+ full feature template (User Scenarios + FR/SC IDs). Narrower check, not a free
33
+ pass.
34
+ - **`docguard explain canonical-sync`** — the count-level companion validator
35
+ was missing from the explainer (field Issue 10).
36
+
37
+ ### Changed
38
+ - **`loadConfig` extracted to `cli/config.mjs`** — breaks the demo↔docguard
39
+ import cycle the Architecture validator flagged (byte-for-byte move, no logic
40
+ change). New modules import config from there, not the CLI entry point.
41
+ - **Docs-Diff** test-file drift now recognises the documented glob convention
42
+ (`tests/*.test.mjs`) instead of demanding every test file be enumerated.
43
+ - **Diff loops pre-compile their regexes** (community PR) — O(N·M) → O(N) on the
44
+ test-file comparison.
45
+ - **Test-Spec** "no mappings" note now points to the expected table format and
46
+ `docguard explain` (field Issue 4).
47
+ - **Canonical docs refreshed** — ARCHITECTURE (config.mjs, 24 validators, 11
48
+ scanners, shared-trace-patterns), SECURITY (real `execFileSync`+allowlist
49
+ subprocess posture), ROADMAP (Phase 4.5 hardening). Genuine review, not
50
+ date-stamping.
51
+
52
+ ### Related (shipped separately)
53
+ - VS Code extension `DocGuard.docguard-vscode` published to the Marketplace
54
+ (v0.4.1), including a command-injection fix in `execSpecguard` (#207).
55
+
10
56
  ## [0.22.1] - 2026-05-29
11
57
 
12
58
  Self-audit + field-feedback patch. Honest fixes only — no doc-gaming. The
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docguard-cli
3
- Version: 0.22.1
3
+ Version: 0.23.0
4
4
  Summary: The enforcement tool for Canonical-Driven Development (CDD). Audit, generate, and guard your project documentation. Zero dependencies.
5
5
  Project-URL: Homepage, https://github.com/raccioly/docguard
6
6
  Project-URL: Documentation, https://github.com/raccioly/docguard#readme
@@ -130,9 +130,9 @@ Recent highlights across the v0.16 → v0.19 line:
130
130
  two commits. Pinpoints regressions without re-running the full suite by hand.
131
131
  - **`docguard upgrade --apply --pr`** — when the config schema bumps, DocGuard migrates
132
132
  `.docguard.json` for you and (optionally) opens a PR with the change.
133
- - **Language-aware `docguard trace`** the standalone `trace` command understands Python, Rust, Go,
134
- Java, Ruby, and PHP layouts in addition to JS/TS. (The guard-time Traceability validator is JS/TS-first
135
- today; broader language parity is on the v0.23 roadmap.)
133
+ - **Language-aware traceability**both `docguard trace` *and* the guard-time Traceability validator
134
+ understand Python, Rust, Go, Java, Ruby, and PHP layouts in addition to JS/TS, via a shared pattern
135
+ set (`cli/shared-trace-patterns.mjs`) so the two never drift apart.
136
136
  - **Per-validator severity overrides** — escalate `freshness` to `high` for production repos,
137
137
  demote `doc-quality` to `low` for prototypes. Configurable per-project.
138
138
  - **JSON Schema for `.docguard.json`** — IDE autocomplete, in-line docs, and validation via
@@ -106,9 +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 `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.)
109
+ - **Language-aware traceability**both `docguard trace` *and* the guard-time Traceability validator
110
+ understand Python, Rust, Go, Java, Ruby, and PHP layouts in addition to JS/TS, via a shared pattern
111
+ set (`cli/shared-trace-patterns.mjs`) so the two never drift apart.
112
112
  - **Per-validator severity overrides** — escalate `freshness` to `high` for production repos,
113
113
  demote `doc-quality` to `low` for prototypes. Configurable per-project.
114
114
  - **JSON Schema for `.docguard.json`** — IDE autocomplete, in-line docs, and validation via
@@ -1,8 +1,8 @@
1
1
  # DocGuard Roadmap
2
2
 
3
- <!-- docguard:version 0.4.0 -->
3
+ <!-- docguard:version 0.5.0 -->
4
4
  <!-- docguard:status living -->
5
- <!-- docguard:last-reviewed 2026-05-26 -->
5
+ <!-- docguard:last-reviewed 2026-05-29 -->
6
6
  <!-- docguard:owner @raccioly -->
7
7
 
8
8
  > The planned evolution of DocGuard and Canonical-Driven Development (CDD).
@@ -10,8 +10,8 @@
10
10
  | Metadata | Value |
11
11
  |----------|-------|
12
12
  | **Status** | ![Status](https://img.shields.io/badge/status-active-brightgreen) |
13
- | **Version** | `0.4.0` |
14
- | **Last Updated** | 2026-03-12 |
13
+ | **Version** | `0.5.0` |
14
+ | **Last Updated** | 2026-05-29 |
15
15
  | **Owner** | [@raccioly](https://github.com/raccioly) |
16
16
 
17
17
  ---
@@ -31,8 +31,20 @@ Make **Canonical-Driven Development** the industry standard for AI-age software
31
31
  | 2 | Polish & Adoption | ✅ Complete | Mar 2026 |
32
32
  | 3 | AI Generate Mode | ✅ Complete | Mar 2026 |
33
33
  | 4 | Integrations | ✅ Complete | Mar 2026 |
34
+ | 4.5 | Continuous Hardening | 🔄 Ongoing | Mar–May 2026 |
34
35
  | 5 | Dashboard (SaaS) | 💭 Future | Q4 2026 |
35
36
 
37
+ ### Phase 4.5: Continuous Hardening (v0.11 → v0.23) 🔄
38
+
39
+ Sustained, feedback-driven maturation since the March milestones:
40
+
41
+ - **Validators grew 9 → 24** — added Canonical-Sync, Surface-Sync, Metrics-Consistency, Doc-Quality, Traceability, Cross-Reference, Generated-Staleness, and more.
42
+ - **Language-aware** test/trace discovery (Python, Go, Rust, Java/Kotlin, Ruby, PHP) shared between `docguard trace` and the guard-time Traceability validator.
43
+ - **Per-doc/per-rule overrides** — `docguard:section … n/a`, `docguard:quality negation-load off`, `docguard:spec-type bugfix` — so the validators fit real projects instead of forcing ceremony.
44
+ - **Security** — closed command-injection vectors in CLI `init` (#190) and the VS Code extension (#207); subprocesses now use `execFileSync` + allowlist validation.
45
+ - **Published the VS Code extension** (`DocGuard.docguard-vscode`) to the Marketplace.
46
+ - **Distribution** — npm + PyPI + GitHub Action + Spec Kit community-catalog auto-sync.
47
+
36
48
  ---
37
49
 
38
50
  ## Phase 0: Research & Standard ✅
@@ -25,7 +25,7 @@ import { spawnSync } from 'node:child_process';
25
25
  import { c } from '../shared.mjs';
26
26
  import { runGuardInternal, classifyResult } from './guard.mjs';
27
27
  import { runScoreInternal } from './score.mjs';
28
- import { loadConfig } from '../docguard.mjs';
28
+ import { loadConfig } from '../config.mjs';
29
29
 
30
30
  const __filename = fileURLToPath(import.meta.url);
31
31
  const __dirname = dirname(__filename);
@@ -347,22 +347,33 @@ function diffTests(dir, config = {}) {
347
347
 
348
348
  // Glob-aware matching (documented entries are often patterns or basenames).
349
349
  const codeArr = [...codeTests];
350
- const docArr = [...docTests];
351
- const matches = (docEntry, codeRel) => {
350
+
351
+ // PERFORMANCE OPTIMIZATION: Pre-compile regular expressions to avoid O(N*M)
352
+ // instantiation bottlenecks inside the nested .filter and .some loops below.
353
+ const docMatchers = [...docTests].map(docEntry => {
352
354
  const entry = String(docEntry).trim();
353
355
  const hasSlash = entry.includes('/');
354
356
  const target = hasSlash ? entry : basename(entry);
355
- const subject = hasSlash ? codeRel : basename(codeRel);
356
357
  const rx = new RegExp('^' + target.replace(/[.+^${}()|[\]\\]/g, '\\$&').replace(/\*+/g, '.*') + '$');
357
- return rx.test(subject);
358
+
359
+ return {
360
+ original: docEntry,
361
+ hasSlash,
362
+ rx
363
+ };
364
+ });
365
+
366
+ const matches = (matcher, codeRel) => {
367
+ const subject = matcher.hasSlash ? codeRel : basename(codeRel);
368
+ return matcher.rx.test(subject);
358
369
  };
359
370
 
360
371
  return {
361
372
  title: 'Test Files',
362
373
  icon: '🧪',
363
- onlyInDocs: docArr.filter(d => !codeArr.some(c => matches(d, c))),
364
- onlyInCode: codeArr.filter(c => !docArr.some(d => matches(d, c))),
365
- matched: docArr.filter(d => codeArr.some(c => matches(d, c))),
374
+ onlyInDocs: docMatchers.filter(m => !codeArr.some(c => matches(m, c))).map(m => m.original),
375
+ onlyInCode: codeArr.filter(c => !docMatchers.some(m => matches(m, c))),
376
+ matched: docMatchers.filter(m => codeArr.some(c => matches(m, c))).map(m => m.original),
366
377
  };
367
378
  }
368
379
 
@@ -25,106 +25,8 @@ const CODE_EXTENSIONS = new Set([
25
25
  // false-negative warnings on Python/Rust/Go/Java projects (reported by the
26
26
  // quick-recon-tool Python user: TEST-SPEC.md was flagged unlinked even
27
27
  // though Python tests existed because `.test.mjs` didn't match `test_*.py`).
28
- // Each `glob` is now a single regex that ALSO matches the equivalent
29
- // patterns in other ecosystems we care about.
30
- const TEST_PATTERNS = [
31
- // JS/TS
32
- /\.test\.[jt]sx?$/, /\.spec\.[jt]sx?$/, /\.test\.(mjs|cjs)$/,
33
- // Python — pytest conventions
34
- /(^|\/)test_[^/]+\.py$/, /[^/]+_test\.py$/, /(^|\/)tests?\/[^/]+\.py$/,
35
- // Go
36
- /_test\.go$/,
37
- // Java/Kotlin — JUnit/TestNG conventions
38
- /(?:Test|Tests|Spec|IT)\.(?:java|kt)$/,
39
- // Rust — tests live in tests/ or as #[cfg(test)] modules; pattern below covers integration tests
40
- /(^|\/)tests\/[^/]+\.rs$/,
41
- // Ruby/RSpec
42
- /_spec\.rb$/, /_test\.rb$/,
43
- // PHP/PHPUnit
44
- /Test\.php$/, /(^|\/)tests?\/[^/]+\.php$/,
45
- ];
28
+ import { TEST_PATTERNS, TRACE_MAP } from '../shared-trace-patterns.mjs';
46
29
 
47
- /**
48
- * Mapping of canonical documents to the code/config artifacts they trace to.
49
- * Each entry defines what source patterns prove coverage of that canonical doc.
50
- *
51
- * v0.16-P2: every glob is now multi-language. JS/TS patterns are preserved
52
- * (the most common case); Python/Rust/Go/Java/Ruby/PHP equivalents are
53
- * appended so non-JS projects don't false-negative.
54
- */
55
- const TRACE_MAP = {
56
- 'ARCHITECTURE.md': {
57
- standard: 'arc42 / C4 Model',
58
- sourcePatterns: [
59
- // Entry points: JS (index/main/app/server.[jt]sx?), Python (__main__.py, main.py, app.py, cli.py),
60
- // Go (main.go, cmd/), Rust (main.rs, lib.rs), Java (Application.java, Main.java)
61
- { label: 'Entry points', glob: /(?:^|\/)(?:index|main|app|server|cli|__main__|Application|Main)\.(?:[jt]sx?|mjs|cjs|py|go|rs|java|kt|rb)$|(?:^|\/)cmd\// },
62
- // Config files: JS (package.json/tsconfig/next.config/vite.config), Python (pyproject.toml/setup.py/setup.cfg),
63
- // Rust (Cargo.toml), Go (go.mod), Java/Kotlin (pom.xml/build.gradle), Ruby (Gemfile), PHP (composer.json)
64
- { label: 'Config files', glob: /(?:^|\/)(?:package\.json|tsconfig|next\.config|vite\.config|pyproject\.toml|setup\.(?:py|cfg)|Cargo\.toml|go\.mod|pom\.xml|build\.gradle|Gemfile|composer\.json)/ },
65
- // Route handlers + module dirs
66
- { label: 'Route handlers / modules', glob: /(?:^|\/)(?:routes?|api|pages|app|controllers?|handlers?|views?|services?)\// },
67
- ],
68
- },
69
- 'DATA-MODEL.md': {
70
- standard: 'C4 Component / ER (Chen)',
71
- sourcePatterns: [
72
- // Schema/model files: JS (schema/model/entity/migration/prisma), Python (models.py/schema.py/Pydantic/SQLAlchemy),
73
- // Go (models/), Rust (struct definitions in models/), Java (entities/)
74
- { label: 'Schema definitions', glob: /(?:schema|model|entity|migration|prisma)/i },
75
- // Type definitions: JS types.ts, Python types.py, Rust types.rs
76
- { label: 'Type definitions', glob: /(?:^|\/)types?\.(?:[jt]sx?|mjs|py|rs|go|java|kt)$/ },
77
- // ORM/database libs (any language)
78
- { label: 'Database configs', glob: /(?:drizzle|knex|sequelize|typeorm|sqlalchemy|alembic|django|diesel|sqlx|gorm|hibernate|active.?record)/i },
79
- ],
80
- },
81
- 'TEST-SPEC.md': {
82
- standard: 'ISO/IEC/IEEE 29119-3',
83
- sourcePatterns: [
84
- // Test files in any ecosystem (mirrors TEST_PATTERNS above)
85
- { label: 'Test files', glob: /\.(?:test|spec)\.(?:mjs|cjs|[jt]sx?)$|(?:^|\/)test_[^/]+\.py$|[^/]+_test\.py$|_test\.go$|(?:Test|Spec|IT)\.(?:java|kt)$|(?:^|\/)tests?\/[^/]+\.(?:rs|py|rb|php)$|_(?:spec|test)\.rb$|Test\.php$/ },
86
- // Test runner configs: JS (jest/vitest/playwright/cypress), Python (pytest.ini/tox.ini), Rust (Cargo.toml has [[test]]),
87
- // Java (pom.xml/build.gradle), Go (no config file typically)
88
- { label: 'Test config', glob: /(?:jest|vitest|playwright|cypress|pytest|tox|phpunit)\.config|(?:^|\/)pytest\.ini$|(?:^|\/)tox\.ini$|(?:^|\/)phpunit\.xml$/ },
89
- { label: 'E2E / integration tests', glob: /(?:^|\/)(?:e2e|integration|tests?\/integration)\// },
90
- ],
91
- },
92
- 'SECURITY.md': {
93
- standard: 'OWASP ASVS v4.0',
94
- sourcePatterns: [
95
- // Auth modules — semantic, language-agnostic
96
- { label: 'Auth modules', glob: /(?:auth|login|session|jwt|oauth|middleware|guard|csrf|cors|permissions?|policy)/i },
97
- // Secret configs — .env family + secrets.* / keyring patterns
98
- { label: 'Secret configs', glob: /\.env(?:\.|$)|(?:^|\/)secrets?\.(?:py|js|ts|yaml|yml|json)$|keyring/i },
99
- // Gitignore + ignore files
100
- { label: 'Ignore files', glob: /^\.(?:git|docker|npm)ignore$/ },
101
- ],
102
- },
103
- 'ENVIRONMENT.md': {
104
- standard: '12-Factor App',
105
- sourcePatterns: [
106
- // .env family across all ecosystems
107
- { label: 'Env files', glob: /\.env(?:\.|$)|(?:^|\/)\.envrc$/ },
108
- // Containerization
109
- { label: 'Container configs', glob: /(?:^|\/)(?:Dockerfile|docker-compose|\.dockerignore|Containerfile)/ },
110
- // Python venv / requirements / lock files
111
- { label: 'Python env', glob: /(?:^|\/)(?:requirements[^/]*\.txt|Pipfile|poetry\.lock|uv\.lock|pyproject\.toml)$/ },
112
- // CI/CD configs
113
- { label: 'CI/CD configs', glob: /(?:^|\/)\.(?:github|gitlab-ci|circleci|drone|gitea)/ },
114
- ],
115
- },
116
- 'API-REFERENCE.md': {
117
- standard: 'OpenAPI 3.1',
118
- sourcePatterns: [
119
- // Route handlers + Python views/urls + Java/Spring controllers
120
- { label: 'Route handlers', glob: /(?:^|\/)(?:routes?|controllers?|handlers?|views?|urls?\.py)/ },
121
- // OpenAPI / API specs
122
- { label: 'API spec', glob: /(?:openapi|swagger|asyncapi)\.(?:json|ya?ml)/ },
123
- // Middleware / decorators
124
- { label: 'API middleware', glob: /(?:^|\/)middleware\/|decorators?\.py$/ },
125
- ],
126
- },
127
- };
128
30
 
129
31
  /**
130
32
  * L-2 / S-3 — Reverse trace: given a code file, find which canonical doc
@@ -0,0 +1,228 @@
1
+ /**
2
+ * DocGuard — configuration loading.
3
+ *
4
+ * Extracted from docguard.mjs (v0.23.0) to break the demo.mjs → docguard.mjs
5
+ * import cycle. demo.mjs runs guard/score against a temp fixture and needs
6
+ * loadConfig, but docguard.mjs statically imports every command (including
7
+ * demo). Importing loadConfig from here — which only pulls shared.mjs and
8
+ * shared-ignore.mjs, never a command module — keeps the import graph acyclic.
9
+ */
10
+
11
+ import { existsSync, readFileSync } from 'node:fs';
12
+ import { resolve, basename } from 'node:path';
13
+ import { c, PROFILES } from './shared.mjs';
14
+ import { mergeIgnoreFile } from './shared-ignore.mjs';
15
+
16
+ export function loadConfig(projectDir) {
17
+ const configPath = resolve(projectDir, '.docguard.json');
18
+ const defaults = {
19
+ projectName: basename(projectDir),
20
+ version: '0.2',
21
+ profile: 'standard',
22
+ requiredFiles: {
23
+ canonical: [
24
+ 'docs-canonical/ARCHITECTURE.md',
25
+ 'docs-canonical/DATA-MODEL.md',
26
+ 'docs-canonical/SECURITY.md',
27
+ 'docs-canonical/TEST-SPEC.md',
28
+ 'docs-canonical/ENVIRONMENT.md',
29
+ ],
30
+ agentFile: ['AGENTS.md', 'CLAUDE.md'],
31
+ changelog: 'CHANGELOG.md',
32
+ driftLog: 'DRIFT-LOG.md',
33
+ },
34
+ // All CDD document types — required vs optional
35
+ documentTypes: {
36
+ // Canonical (design intent) — required by default
37
+ 'docs-canonical/ARCHITECTURE.md': { required: true, category: 'canonical', description: 'System design, components, layer boundaries' },
38
+ 'docs-canonical/DATA-MODEL.md': { required: true, category: 'canonical', description: 'Database schemas, entities, relationships' },
39
+ 'docs-canonical/SECURITY.md': { required: true, category: 'canonical', description: 'Authentication, authorization, secrets management' },
40
+ 'docs-canonical/TEST-SPEC.md': { required: true, category: 'canonical', description: 'Test categories, coverage rules, service-to-test map' },
41
+ 'docs-canonical/ENVIRONMENT.md': { required: true, category: 'canonical', description: 'Environment variables, setup steps, prerequisites' },
42
+ 'docs-canonical/DEPLOYMENT.md': { required: false, category: 'canonical', description: 'Infrastructure, CI/CD pipeline, DNS, monitoring' },
43
+ 'docs-canonical/ADR.md': { required: false, category: 'canonical', description: 'Architecture Decision Records with rationale' },
44
+ // Implementation (current state) — optional by default
45
+ 'docs-implementation/KNOWN-GOTCHAS.md': { required: false, category: 'implementation', description: 'Lessons learned — symptom/gotcha/fix format' },
46
+ 'docs-implementation/TROUBLESHOOTING.md': { required: false, category: 'implementation', description: 'Error diagnosis guides by category' },
47
+ 'docs-implementation/RUNBOOKS.md': { required: false, category: 'implementation', description: 'Operational procedures (deploy, rollback, backup)' },
48
+ 'docs-implementation/CURRENT-STATE.md': { required: false, category: 'implementation', description: 'Deployment status, feature completion, tech debt' },
49
+ 'docs-implementation/VENDOR-BUGS.md': { required: false, category: 'implementation', description: 'Third-party bug tracker with workarounds' },
50
+ // Root files
51
+ 'AGENTS.md': { required: true, category: 'agent', description: 'AI agent behavior rules and project context' },
52
+ 'CHANGELOG.md': { required: true, category: 'tracking', description: 'All notable changes per Keep a Changelog format' },
53
+ 'DRIFT-LOG.md': { required: true, category: 'tracking', description: 'Documented deviations from canonical docs' },
54
+ 'ROADMAP.md': { required: false, category: 'tracking', description: 'Project phases, feature tracking, vision' },
55
+ },
56
+ sourcePatterns: {
57
+ services: 'src/services/**/*.{ts,js,py,java}',
58
+ routes: 'src/routes/**/*.{ts,js,py,java}',
59
+ tests: 'tests/**/*.test.{ts,js,py,java}',
60
+ },
61
+ validators: {
62
+ structure: true,
63
+ docsSync: true,
64
+ drift: true,
65
+ changelog: true,
66
+ architecture: false,
67
+ testSpec: true,
68
+ security: false,
69
+ environment: true,
70
+ freshness: true,
71
+ },
72
+ };
73
+
74
+ if (existsSync(configPath)) {
75
+ try {
76
+ const userConfig = JSON.parse(readFileSync(configPath, 'utf-8'));
77
+
78
+ // Apply profile presets BEFORE merging user config
79
+ // Profile sets the baseline, user config can override anything
80
+ const profileName = userConfig.profile || defaults.profile;
81
+ const profilePreset = PROFILES[profileName];
82
+ const withProfile = profilePreset
83
+ ? deepMerge(defaults, profilePreset)
84
+ : defaults;
85
+
86
+ // v0.17-P4: normalize validator/severity keys before merging so the
87
+ // user can write either kebab-case (`test-spec`) or camelCase (`testSpec`)
88
+ // and the internal lookups (always camelCase) still hit.
89
+ const merged = deepMerge(withProfile, normalizeConfig(userConfig));
90
+ merged.profile = profileName;
91
+
92
+ // Auto-detect project type if not set
93
+ if (!merged.projectType) {
94
+ merged.projectType = autoDetectProjectType(projectDir);
95
+ }
96
+ // Ensure projectTypeConfig has sensible defaults based on type
97
+ merged.projectTypeConfig = {
98
+ ...getProjectTypeDefaults(merged.projectType),
99
+ ...(merged.projectTypeConfig || {}),
100
+ };
101
+ // Normalize testPattern (string) → testPatterns (array) for backward compat
102
+ if (merged.testPattern && !merged.testPatterns) {
103
+ merged.testPatterns = [merged.testPattern];
104
+ } else if (merged.testPattern && merged.testPatterns) {
105
+ // Both set — merge, deduplicate
106
+ if (!merged.testPatterns.includes(merged.testPattern)) {
107
+ merged.testPatterns.push(merged.testPattern);
108
+ }
109
+ }
110
+ // Merge .docguardignore patterns into config.ignore so every validator
111
+ // honors them without having to know about the file.
112
+ mergeIgnoreFile(projectDir, merged);
113
+ return merged;
114
+ } catch (e) {
115
+ console.error(`${c.red}Error parsing .docguard.json: ${e.message}${c.reset}`);
116
+ process.exit(1);
117
+ }
118
+ }
119
+
120
+ // No config file — auto-detect everything
121
+ defaults.projectType = autoDetectProjectType(projectDir);
122
+ defaults.projectTypeConfig = getProjectTypeDefaults(defaults.projectType);
123
+ // .docguardignore is read even when no .docguard.json exists — keeps
124
+ // ignore-only projects (no config but want to skip paths) working.
125
+ mergeIgnoreFile(projectDir, defaults);
126
+ return defaults;
127
+ }
128
+
129
+ // PROFILES is exported from shared.mjs (re-exported at line 43)
130
+
131
+ /**
132
+ * Auto-detect project type from package.json and file structure.
133
+ * Returns: 'cli' | 'library' | 'webapp' | 'api' | 'unknown'
134
+ */
135
+ function autoDetectProjectType(dir) {
136
+ const pkgPath = resolve(dir, 'package.json');
137
+ if (existsSync(pkgPath)) {
138
+ try {
139
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
140
+ const allDeps = { ...(pkg.dependencies || {}), ...(pkg.devDependencies || {}) };
141
+
142
+ // CLI tool: has "bin" field
143
+ if (pkg.bin) return 'cli';
144
+
145
+ // Web app: has a frontend framework
146
+ if (allDeps.next || allDeps.react || allDeps.vue || allDeps['@angular/core'] ||
147
+ allDeps.svelte || allDeps.nuxt || allDeps['@sveltejs/kit']) return 'webapp';
148
+
149
+ // API: has a server framework but no frontend
150
+ if (allDeps.express || allDeps.fastify || allDeps.hono || allDeps.koa) return 'api';
151
+
152
+ // Library: has "main" or "exports" and no framework
153
+ if (pkg.main || pkg.exports || pkg.module) return 'library';
154
+ } catch { /* fall through */ }
155
+ }
156
+
157
+ // Python project
158
+ if (existsSync(resolve(dir, 'manage.py'))) return 'webapp';
159
+ if (existsSync(resolve(dir, 'setup.py')) || existsSync(resolve(dir, 'pyproject.toml'))) return 'library';
160
+
161
+ return 'unknown';
162
+ }
163
+
164
+ /**
165
+ * Get default projectTypeConfig for a given project type.
166
+ */
167
+ function getProjectTypeDefaults(type) {
168
+ const defaults = {
169
+ cli: { needsEnvVars: false, needsEnvExample: false, needsE2E: false, needsDatabase: false, testFramework: 'node:test', runCommand: null },
170
+ library: { needsEnvVars: false, needsEnvExample: false, needsE2E: false, needsDatabase: false, testFramework: 'vitest', runCommand: null },
171
+ webapp: { needsEnvVars: true, needsEnvExample: true, needsE2E: true, needsDatabase: true, testFramework: 'vitest', runCommand: 'npm run dev' },
172
+ api: { needsEnvVars: true, needsEnvExample: true, needsE2E: false, needsDatabase: true, testFramework: 'vitest', runCommand: 'npm run dev' },
173
+ unknown: { needsEnvVars: true, needsEnvExample: true, needsE2E: false, needsDatabase: true, testFramework: null, runCommand: null },
174
+ };
175
+ return defaults[type] || defaults.unknown;
176
+ }
177
+
178
+ /**
179
+ * v0.17-P4: normalize validator-key naming so users can write either
180
+ * `validators: { "test-spec": true }` (kebab-case, matches CLI display)
181
+ * or `validators: { testSpec: true }` (camelCase, matches JSON internals)
182
+ * in `.docguard.json`. We normalize the WHOLE config tree's known validator
183
+ * keys to camelCase before merging. Same treatment applied to `severity`.
184
+ *
185
+ * Non-validator keys are left alone. Unknown keys (forward-compat) are
186
+ * normalized blindly: kebab-case→camelCase always.
187
+ */
188
+ const _KNOWN_VALIDATORS = [
189
+ 'structure', 'docsSync', 'drift', 'changelog', 'testSpec', 'environment',
190
+ 'security', 'architecture', 'freshness', 'traceability', 'docsDiff',
191
+ 'apiSurface', 'metadataSync', 'docsCoverage', 'docQuality', 'todoTracking',
192
+ 'schemaSync', 'specKit', 'crossReference', 'generatedStaleness',
193
+ 'canonicalSync', 'surfaceSync', 'metricsConsistency',
194
+ ];
195
+
196
+ function _kebabToCamel(k) {
197
+ return k.replace(/-([a-z])/g, (_, ch) => ch.toUpperCase());
198
+ }
199
+
200
+ function _normalizeValidatorKeys(map) {
201
+ if (!map || typeof map !== 'object' || Array.isArray(map)) return map;
202
+ const out = {};
203
+ for (const [k, v] of Object.entries(map)) {
204
+ const normalized = k.includes('-') ? _kebabToCamel(k) : k;
205
+ out[normalized] = v;
206
+ }
207
+ return out;
208
+ }
209
+
210
+ function normalizeConfig(cfg) {
211
+ if (!cfg || typeof cfg !== 'object') return cfg;
212
+ const out = { ...cfg };
213
+ if (out.validators) out.validators = _normalizeValidatorKeys(out.validators);
214
+ if (out.severity) out.severity = _normalizeValidatorKeys(out.severity);
215
+ return out;
216
+ }
217
+
218
+ function deepMerge(target, source) {
219
+ const result = { ...target };
220
+ for (const key of Object.keys(source)) {
221
+ if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
222
+ result[key] = deepMerge(target[key] || {}, source[key]);
223
+ } else {
224
+ result[key] = source[key];
225
+ }
226
+ }
227
+ return result;
228
+ }