docguard-cli 0.9.10__tar.gz → 0.10.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 (236) hide show
  1. {docguard_cli-0.9.10/extensions/spec-kit-docguard → docguard_cli-0.10.0/.agent}/skills/docguard-guard/SKILL.md +3 -2
  2. docguard_cli-0.10.0/.github/dependabot.yml +20 -0
  3. docguard_cli-0.10.0/.github/workflows/supply-chain.yml +23 -0
  4. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.github/workflows/sync-speckit-catalog.yml +37 -20
  5. docguard_cli-0.10.0/.jules/bolt.md +7 -0
  6. docguard_cli-0.10.0/.jules/palette.md +7 -0
  7. docguard_cli-0.10.0/.jules/sentinel.md +4 -0
  8. docguard_cli-0.10.0/.npmrc +7 -0
  9. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/AGENTS.md +15 -1
  10. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/CHANGELOG.md +37 -0
  11. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/DRIFT-LOG.md +1 -0
  12. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/PKG-INFO +4 -3
  13. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/README.md +3 -2
  14. docguard_cli-0.10.0/SUPPLY-CHAIN-AUDIT.md +84 -0
  15. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/diagnose.mjs +23 -15
  16. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/diff.mjs +110 -137
  17. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/fix.mjs +39 -3
  18. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/generate.mjs +57 -27
  19. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/guard.mjs +45 -24
  20. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/score.mjs +24 -2
  21. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/docguard.mjs +0 -0
  22. docguard_cli-0.10.0/cli/scanners/api-doc.mjs +122 -0
  23. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/scanners/doc-tools.mjs +1 -1
  24. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/scanners/routes.mjs +45 -32
  25. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/shared-ignore.mjs +43 -0
  26. docguard_cli-0.10.0/cli/shared-source.mjs +247 -0
  27. docguard_cli-0.10.0/cli/validators/api-surface.mjs +179 -0
  28. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/architecture.mjs +4 -3
  29. docguard_cli-0.10.0/cli/validators/changelog.mjs +79 -0
  30. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/doc-quality.mjs +3 -2
  31. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/docs-coverage.mjs +9 -14
  32. docguard_cli-0.10.0/cli/validators/docs-diff.mjs +295 -0
  33. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/docs-sync.mjs +30 -24
  34. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/drift.mjs +6 -2
  35. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/environment.mjs +43 -3
  36. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/freshness.mjs +4 -3
  37. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/metadata-sync.mjs +11 -6
  38. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/metrics-consistency.mjs +4 -2
  39. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/schema-sync.mjs +19 -10
  40. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/security.mjs +20 -7
  41. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/structure.mjs +8 -1
  42. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/test-spec.mjs +26 -17
  43. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/todo-tracking.mjs +21 -8
  44. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/validators/traceability.mjs +61 -36
  45. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/commands/docguard.guard.md +5 -4
  46. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs/quickstart.md +1 -1
  47. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs-canonical/TEST-SPEC.md +2 -1
  48. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/README.md +1 -1
  49. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/commands/guard.md +6 -5
  50. {docguard_cli-0.9.10/.agent → docguard_cli-0.10.0/extensions/spec-kit-docguard}/skills/docguard-guard/SKILL.md +3 -2
  51. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/package.json +1 -1
  52. docguard_cli-0.10.0/pr_description.md +16 -0
  53. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/pyproject.toml +1 -1
  54. docguard_cli-0.10.0/specs/002-fix-test-discovery/plan.md +113 -0
  55. docguard_cli-0.10.0/specs/002-fix-test-discovery/spec.md +87 -0
  56. docguard_cli-0.10.0/specs/002-fix-test-discovery/tasks.md +40 -0
  57. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/commands/docguard.guard.md +3 -3
  58. docguard_cli-0.10.0/test-draft.js +20 -0
  59. docguard_cli-0.10.0/test-metrics.js +2 -0
  60. docguard_cli-0.10.0/tests/api-doc.test.mjs +103 -0
  61. docguard_cli-0.10.0/tests/api-surface.test.mjs +96 -0
  62. docguard_cli-0.10.0/tests/architecture.test.mjs +108 -0
  63. docguard_cli-0.10.0/tests/backup-failure.test.mjs +60 -0
  64. docguard_cli-0.10.0/tests/changelog.test.mjs +141 -0
  65. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/tests/commands.test.mjs +302 -2
  66. docguard_cli-0.10.0/tests/doc-quality.test.mjs +93 -0
  67. docguard_cli-0.10.0/tests/docs-coverage.test.mjs +105 -0
  68. docguard_cli-0.10.0/tests/docs-diff.test.mjs +62 -0
  69. docguard_cli-0.10.0/tests/docs-sync.test.mjs +179 -0
  70. docguard_cli-0.10.0/tests/drift.test.mjs +84 -0
  71. docguard_cli-0.10.0/tests/environment.test.mjs +146 -0
  72. docguard_cli-0.10.0/tests/freshness.test.mjs +162 -0
  73. docguard_cli-0.10.0/tests/guard-classify.test.mjs +41 -0
  74. docguard_cli-0.10.0/tests/hooks.test.mjs +117 -0
  75. docguard_cli-0.10.0/tests/metadata-sync.test.mjs +138 -0
  76. docguard_cli-0.10.0/tests/metrics-consistency.test.mjs +103 -0
  77. docguard_cli-0.10.0/tests/monorepo-scanning.test.mjs +64 -0
  78. docguard_cli-0.10.0/tests/schema-sync.test.mjs +112 -0
  79. docguard_cli-0.10.0/tests/schemas.test.mjs +126 -0
  80. docguard_cli-0.10.0/tests/security.test.mjs +146 -0
  81. docguard_cli-0.10.0/tests/shared-source.test.mjs +86 -0
  82. docguard_cli-0.10.0/tests/structure.test.mjs +132 -0
  83. docguard_cli-0.10.0/tests/test-spec.test.mjs +137 -0
  84. docguard_cli-0.10.0/tests/todo-tracking.test.mjs +73 -0
  85. docguard_cli-0.10.0/tests/traceability.test.mjs +141 -0
  86. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/vscode-extension/extension.js +85 -74
  87. docguard_cli-0.9.10/cli/validators/changelog.mjs +0 -39
  88. docguard_cli-0.9.10/cli/validators/docs-diff.mjs +0 -252
  89. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.analyze.md +0 -0
  90. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.checklist.md +0 -0
  91. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.clarify.md +0 -0
  92. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.constitution.md +0 -0
  93. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.implement.md +0 -0
  94. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.plan.md +0 -0
  95. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.specify.md +0 -0
  96. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.tasks.md +0 -0
  97. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/commands/speckit.taskstoissues.md +0 -0
  98. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/docguard-fix/SKILL.md +0 -0
  99. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/docguard-review/SKILL.md +0 -0
  100. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/docguard-score/SKILL.md +0 -0
  101. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-analyze/SKILL.md +0 -0
  102. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-checklist/SKILL.md +0 -0
  103. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-clarify/SKILL.md +0 -0
  104. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-constitution/SKILL.md +0 -0
  105. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-implement/SKILL.md +0 -0
  106. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-plan/SKILL.md +0 -0
  107. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-specify/SKILL.md +0 -0
  108. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-tasks/SKILL.md +0 -0
  109. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.agent/skills/speckit-taskstoissues/SKILL.md +0 -0
  110. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.docguard.json +0 -0
  111. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.docguardignore +0 -0
  112. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  113. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  114. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.github/scripts/patch-catalog.py +0 -0
  115. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.github/workflows/ci.yml +0 -0
  116. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.github/workflows/release.yml +0 -0
  117. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.gitignore +0 -0
  118. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.npmignore +0 -0
  119. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/extensions/.cache/catalog-ebf165086500aab1-metadata.json +0 -0
  120. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/extensions/.cache/catalog-ebf165086500aab1.json +0 -0
  121. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/extensions/.cache/catalog-metadata.json +0 -0
  122. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/extensions/.cache/catalog.json +0 -0
  123. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/init-options.json +0 -0
  124. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/memory/constitution.md +0 -0
  125. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/scripts/bash/check-prerequisites.sh +0 -0
  126. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/scripts/bash/common.sh +0 -0
  127. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/scripts/bash/create-new-feature.sh +0 -0
  128. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/scripts/bash/setup-plan.sh +0 -0
  129. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/scripts/bash/update-agent-context.sh +0 -0
  130. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/templates/agent-file-template.md +0 -0
  131. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/templates/checklist-template.md +0 -0
  132. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/templates/constitution-template.md +0 -0
  133. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/templates/plan-template.md +0 -0
  134. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/templates/spec-template.md +0 -0
  135. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/.specify/templates/tasks-template.md +0 -0
  136. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/CODE_OF_CONDUCT.md +0 -0
  137. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/COMPARISONS.md +0 -0
  138. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/CONTRIBUTING.md +0 -0
  139. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/LICENSE +0 -0
  140. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/PHILOSOPHY.md +0 -0
  141. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/ROADMAP.md +0 -0
  142. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/SECURITY.md +0 -0
  143. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/STANDARD.md +0 -0
  144. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/SUPPORT.md +0 -0
  145. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/action.yml +0 -0
  146. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/agents.mjs +0 -0
  147. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/badge.mjs +0 -0
  148. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/ci.mjs +0 -0
  149. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/hooks.mjs +0 -0
  150. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/init.mjs +0 -0
  151. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/llms.mjs +0 -0
  152. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/publish.mjs +0 -0
  153. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/setup.mjs +0 -0
  154. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/trace.mjs +0 -0
  155. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/commands/watch.mjs +0 -0
  156. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/ensure-skills.mjs +0 -0
  157. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/scanners/schemas.mjs +0 -0
  158. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/scanners/speckit.mjs +0 -0
  159. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/cli/shared.mjs +0 -0
  160. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/commands/docguard.fix.md +0 -0
  161. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/commands/docguard.review.md +0 -0
  162. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/commands/docguard.score.md +0 -0
  163. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/configs/fastify.json +0 -0
  164. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/configs/generic.json +0 -0
  165. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/configs/nextjs.json +0 -0
  166. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/configs/python.json +0 -0
  167. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docguard_cli/__init__.py +0 -0
  168. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docguard_cli/wrapper.py +0 -0
  169. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs/ai-integration.md +0 -0
  170. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs/commands.md +0 -0
  171. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs/configuration.md +0 -0
  172. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs/faq.md +0 -0
  173. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs/installation.md +0 -0
  174. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs/profiles.md +0 -0
  175. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs-canonical/ARCHITECTURE.md +0 -0
  176. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs-canonical/DATA-MODEL.md +0 -0
  177. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs-canonical/ENVIRONMENT.md +0 -0
  178. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/docs-canonical/SECURITY.md +0 -0
  179. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/01-express-api/README.md +0 -0
  180. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/01-express-api/package.json +0 -0
  181. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/01-express-api/server.js +0 -0
  182. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/02-python-flask/README.md +0 -0
  183. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/02-python-flask/app.py +0 -0
  184. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/02-python-flask/docs-canonical/ARCHITECTURE.md +0 -0
  185. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/02-python-flask/requirements.txt +0 -0
  186. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/03-spec-kit-project/CHANGELOG.md +0 -0
  187. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/03-spec-kit-project/README.md +0 -0
  188. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/03-spec-kit-project/docs-canonical/ARCHITECTURE.md +0 -0
  189. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/03-spec-kit-project/docs-canonical/TEST-SPEC.md +0 -0
  190. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/03-spec-kit-project/package.json +0 -0
  191. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/03-spec-kit-project/src/index.js +0 -0
  192. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/03-spec-kit-project/tests/basic.test.js +0 -0
  193. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/examples/README.md +0 -0
  194. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/LICENSE +0 -0
  195. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/commands/diagnose.md +0 -0
  196. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/commands/generate.md +0 -0
  197. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/commands/init.md +0 -0
  198. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/commands/score.md +0 -0
  199. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/commands/trace.md +0 -0
  200. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/extension.yml +0 -0
  201. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/scripts/bash/common.sh +0 -0
  202. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/scripts/bash/docguard-check-docs.sh +0 -0
  203. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/scripts/bash/docguard-init-doc.sh +0 -0
  204. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/scripts/bash/docguard-suggest-fix.sh +0 -0
  205. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/skills/docguard-fix/SKILL.md +0 -0
  206. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/skills/docguard-review/SKILL.md +0 -0
  207. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/skills/docguard-score/SKILL.md +0 -0
  208. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/extensions/spec-kit-docguard/templates/extensions.yml +0 -0
  209. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/specs/001-fix-ignore-validators/plan.md +0 -0
  210. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/specs/001-fix-ignore-validators/spec.md +0 -0
  211. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/specs/001-fix-ignore-validators/tasks.md +0 -0
  212. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/ADR.md.template +0 -0
  213. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/AGENTS.md.template +0 -0
  214. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/ARCHITECTURE.md.template +0 -0
  215. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/CHANGELOG.md.template +0 -0
  216. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/CURRENT-STATE.md.template +0 -0
  217. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/DATA-MODEL.md.template +0 -0
  218. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/DEPLOYMENT.md.template +0 -0
  219. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/DRIFT-LOG.md.template +0 -0
  220. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/ENVIRONMENT.md.template +0 -0
  221. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/KNOWN-GOTCHAS.md.template +0 -0
  222. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/REQUIREMENTS.md.template +0 -0
  223. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/ROADMAP.md.template +0 -0
  224. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/RUNBOOKS.md.template +0 -0
  225. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/SECURITY.md.template +0 -0
  226. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/TEST-SPEC.md.template +0 -0
  227. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/TROUBLESHOOTING.md.template +0 -0
  228. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/VENDOR-BUGS.md.template +0 -0
  229. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/ci/github-actions.yml +0 -0
  230. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/commands/docguard.fix.md +0 -0
  231. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/commands/docguard.init.md +0 -0
  232. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/commands/docguard.review.md +0 -0
  233. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/templates/commands/docguard.update.md +0 -0
  234. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/vscode-extension/.vscodeignore +0 -0
  235. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/vscode-extension/README.md +0 -0
  236. {docguard_cli-0.9.10 → docguard_cli-0.10.0}/vscode-extension/package.json +0 -0
@@ -78,7 +78,8 @@ Classify every non-passing check using this priority matrix:
78
78
 
79
79
  **HIGH (fix before commit)**:
80
80
  - Doc Sections failures (missing required sections)
81
- - Drift detection (undocumented code deviations)
81
+ - Drift-Comments (a `// DRIFT:` comment without a DRIFT-LOG.md entry)
82
+ - API-Surface (API-REFERENCE.md documents an endpoint that no longer exists in code)
82
83
  - Changelog gaps
83
84
  - Traceability breaks
84
85
 
@@ -138,7 +139,7 @@ For each finding, provide a **specific, actionable fix** — not "fix the issue"
138
139
 
139
140
  Based on the triage results:
140
141
 
141
- - **If all PASS**: "All 19 validators passed. Project is CDD-compliant. Ready to commit."
142
+ - **If all PASS**: "All 20 validators passed. Project is CDD-compliant. Ready to commit."
142
143
  - **If only MEDIUM/LOW warnings**: "Non-blocking warnings found. Safe to commit, but consider running `/docguard.fix` for automated remediation."
143
144
  - **If HIGH or CRITICAL failures**: "Blocking issues found. Fix these before committing. Suggest running `/docguard.fix --doc [most impactful doc]` next."
144
145
 
@@ -0,0 +1,20 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "npm"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ cooldown:
8
+ default-days: 7
9
+ semver-minor-days: 3
10
+ semver-patch-days: 3
11
+ - package-ecosystem: "pip"
12
+ directory: "/"
13
+ schedule:
14
+ interval: "weekly"
15
+ cooldown:
16
+ default-days: 7
17
+ - package-ecosystem: "github-actions"
18
+ directory: "/"
19
+ schedule:
20
+ interval: "weekly"
@@ -0,0 +1,23 @@
1
+ name: Supply-Chain Security
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ schedule:
7
+ - cron: '30 12 * * 1' # Mondays at 12:30 UTC
8
+ push:
9
+ branches: [main]
10
+
11
+ permissions:
12
+ actions: read
13
+ contents: read
14
+ security-events: write
15
+
16
+ jobs:
17
+ osv-scan-pr:
18
+ if: github.event_name == 'pull_request'
19
+ uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@v2.3.8"
20
+
21
+ osv-scan-scheduled:
22
+ if: github.event_name != 'pull_request'
23
+ uses: "google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@v2.3.8"
@@ -112,6 +112,7 @@ jobs:
112
112
  run: |
113
113
  VERSION="${{ steps.meta.outputs.version }}"
114
114
  BRANCH="update-docguard"
115
+ PR_TITLE="chore: update DocGuard extension to v${VERSION}"
115
116
 
116
117
  # Build PR body
117
118
  cat > /tmp/pr-body.md << 'HEADER'
@@ -133,30 +134,46 @@ jobs:
133
134
  echo "---" >> /tmp/pr-body.md
134
135
  echo "*This PR was automatically generated by the DocGuard release pipeline.*" >> /tmp/pr-body.md
135
136
 
136
- # Try to create PR first — if it already exists, edit it instead
137
- PR_URL=$(gh pr create \
137
+ # Check if PR already exists using multiple detection methods
138
+ EXISTING_PR=""
139
+
140
+ # Method 1: gh pr list with --head filter
141
+ EXISTING_PR=$(gh pr list \
138
142
  --repo github/spec-kit \
139
143
  --head "raccioly:${BRANCH}" \
140
- --base main \
141
- --title "chore: update DocGuard extension to v${VERSION}" \
142
- --body-file /tmp/pr-body.md 2>&1) && {
143
- echo "✅ Created new PR: $PR_URL"
144
- } || {
145
- echo "PR already exists updating title and body..."
146
- # Find the existing PR number
144
+ --state open \
145
+ --json number \
146
+ --jq '.[0].number' 2>/dev/null || echo "")
147
+
148
+ # Method 2: search by branch name if method 1 failed
149
+ if [ -z "$EXISTING_PR" ] || [ "$EXISTING_PR" = "null" ]; then
147
150
  EXISTING_PR=$(gh pr list \
148
151
  --repo github/spec-kit \
149
- --head "raccioly:${BRANCH}" \
150
152
  --state open \
153
+ --search "head:raccioly:${BRANCH}" \
151
154
  --json number \
152
155
  --jq '.[0].number' 2>/dev/null || echo "")
153
- if [ -n "$EXISTING_PR" ] && [ "$EXISTING_PR" != "null" ]; then
154
- gh pr edit "$EXISTING_PR" \
155
- --repo github/spec-kit \
156
- --title "chore: update DocGuard extension to v${VERSION}" \
157
- --body-file /tmp/pr-body.md
158
- echo "✅ Updated existing PR #${EXISTING_PR}"
159
- else
160
- echo " Branch force-pushed — PR content is updated via the branch"
161
- fi
162
- }
156
+ fi
157
+
158
+ if [ -n "$EXISTING_PR" ] && [ "$EXISTING_PR" != "null" ]; then
159
+ # PR exists — update title and body to match new version
160
+ echo "Found existing PR #${EXISTING_PR} — updating title and body..."
161
+ gh pr edit "$EXISTING_PR" \
162
+ --repo github/spec-kit \
163
+ --title "$PR_TITLE" \
164
+ --body-file /tmp/pr-body.md
165
+ echo "✅ Updated existing PR #${EXISTING_PR} to v${VERSION}"
166
+ else
167
+ # Try to create new PR
168
+ PR_URL=$(gh pr create \
169
+ --repo github/spec-kit \
170
+ --head "raccioly:${BRANCH}" \
171
+ --base main \
172
+ --title "$PR_TITLE" \
173
+ --body-file /tmp/pr-body.md 2>&1) && {
174
+ echo "✅ Created new PR: $PR_URL"
175
+ } || {
176
+ echo "⚠️ Could not create or find PR — branch was force-pushed with v${VERSION} content"
177
+ }
178
+ fi
179
+
@@ -0,0 +1,7 @@
1
+ ## 2024-05-18 - [Optimization]
2
+ **Learning:** Found string.includes early return could speed up checkUntrackedTodos in cli/validators/todo-tracking.mjs.
3
+ **Action:** Implement fast early return with includes check before doing expensive splitting or matching.
4
+
5
+ ## 2024-05-18 - [O(N*M) String Overhead]
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
+ **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.
@@ -0,0 +1,7 @@
1
+ ## 2024-04-16 - Web UI Components Constraint
2
+ **Learning:** The docguard repository consists entirely of a Node.js CLI tool and a VS Code extension; it lacks web UI components (e.g., HTML, CSS, React, Vue), meaning traditional web-focused micro-UX enhancements do not apply.
3
+ **Action:** Do not attempt traditional web-based UX enhancements here. Focus on CLI paradigms or skip UX enhancement requests if web-centric.
4
+
5
+ ## 2024-04-16 - Context-Aware Status Bar Tooltips
6
+ **Learning:** VS Code extension status bar items can display multiple forms of feedback, but static tooltips fail to explain state changes. Providing context-aware tooltip text (e.g., explaining why a threshold warning icon appears) greatly improves the usability for developers monitoring CLI outputs inline.
7
+ **Action:** Always map status bar dynamic properties (icon, text, backgroundColor) to corresponding informative tooltips that explain what the visual change means.
@@ -0,0 +1,4 @@
1
+ ## 2025-05-18 - [Command Injection via execSync]
2
+ **Vulnerability:** Found multiple instances where user-controlled inputs (`projectDir`, `filePath`) were interpolated directly into shell commands via `execSync` (e.g., `execSync(\`node "\${cliPath}" init --dir "\${projectDir}"\`)`).
3
+ **Learning:** This is a classic command injection vulnerability. If `projectDir` contains shell metacharacters like `;`, `&&`, or `||`, it allows arbitrary command execution.
4
+ **Prevention:** Always use `execFileSync` (or `execFile` for async) instead of `execSync` when executing commands with dynamic inputs. Pass arguments as an array to ensure they are passed directly to the executable without shell interpolation.
@@ -0,0 +1,7 @@
1
+ # Supply-Chain Security Hardening
2
+ # Applied: 2026-05-14T14:19:27Z
3
+ # Blocks install scripts from untrusted packages.
4
+ # Requires 7-day maturity for all versions.
5
+ ignore-scripts=true
6
+ min-release-age=7d
7
+ audit-level=moderate
@@ -41,7 +41,7 @@
41
41
  | Command | Purpose |
42
42
  |---------|---------|
43
43
  | `diagnose` | **Primary** — identify issues + generate AI fix prompts |
44
- | `guard` | Validate project (CI gate) — 19 validators |
44
+ | `guard` | Validate project (CI gate) — 20 validators |
45
45
  | `generate` | Reverse-engineer docs from code |
46
46
  | `fix --doc <name>` | AI prompt for specific document |
47
47
  | `score` | CDD maturity score (0-100) |
@@ -102,3 +102,17 @@ extensions/spec-kit-docguard/
102
102
  - Test requirements in TEST-SPEC.md must be met
103
103
  - Run `docguard guard` before pushing — all checks must pass
104
104
  - All file writes use `safeWrite()` — backups before overwrite
105
+
106
+
107
+ ## Agent Rules
108
+
109
+ ### Dependencies
110
+ - Never add a package without first verifying it exists on the official registry (npm/PyPI).
111
+ - Always pin to exact versions in package.json/requirements.txt. No ^, ~, or >= ranges.
112
+ - Prefer packages with >10k weekly downloads and >1 maintainer.
113
+ - If you suggest a package, confirm its first-publish date is older than 30 days.
114
+ - Never modify .npmrc, pnpm-workspace.yaml, or dependabot.yml without explicit user confirmation.
115
+
116
+ ### CI/CD
117
+ - Never write a workflow using `pull_request_target` with checkout of PR-controlled refs.
118
+ - Always pin third-party GitHub Actions to commit SHA, not @v1 or @main.
@@ -7,6 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.10.0] - 2026-05-22
11
+
12
+ ### Added
13
+ - **API-Surface validator** (`cli/validators/api-surface.mjs`) — compares endpoints documented in `docs-canonical/API-REFERENCE.md` against the project's real API surface (OpenAPI spec, monorepo-aware code route scan). Flags documented-but-deleted endpoints (HIGH/error when confirmed by a spec; warning on heuristic code-scan) and present-but-undocumented endpoints (warning). Brings the validator count to **20**.
14
+ - **`N/A` result state** in `guard` — a validator that finds nothing to check now renders a neutral `➖ [N/A]` with a reason instead of a misleading green ✅. "Nothing to check" is no longer indistinguishable from "checked and clean". Exposed via `classifyResult()`; surfaced in text, `--format json`, `diagnose`, and `ci`.
15
+ - **`cli/shared-source.mjs`** — monorepo-aware source resolution honoring `config.sourceRoot`, npm `workspaces`, and `pnpm-workspace.yaml`: `resolveSourceRoots()`, `collectPackageJsons()`, `detectDocker()`, `grepEnvUsage()`.
16
+ - **`cli/scanners/api-doc.mjs`** — robust API-REFERENCE.md parser (headings + table rows) with path normalization (`:id ≡ {id}`, strips backticks/pipes/trailing slashes) and exact-match endpoint comparison.
17
+ - **`docguard fix --doc api-reference`** — generates an AI prompt to reconcile API-REFERENCE.md with the real API surface.
18
+ - **39 new tests** (api-doc, api-surface, shared-source, monorepo-scanning, guard-classify). Total: **214**.
19
+
20
+ ### Changed
21
+ - **Monorepo awareness across validators** — `schema-sync`, `docs-coverage`, `docs-sync`, `test-spec`, `metadata-sync`, and test-file discovery now honor `config.sourceRoot`/workspaces instead of hardcoded root-relative paths. Previously these silently passed on monorepos whose code lives under e.g. `backend/src`.
22
+ - **Environment validator now checks code truth** — compares documented env vars against actual `process.env` / `import.meta.env` usage (`.env.example` counts as documentation), replacing the prior section-heading-presence heuristic.
23
+ - **Test-Spec verifies files, not glyphs** — a Source-to-Test/Journey row passes only if the referenced test file actually exists; the author-typed ✅ is no longer trusted as proof of coverage.
24
+ - **Changelog validator** now implements the documented staged-change check: warns when staged code files exist but `CHANGELOG.md` is not staged (git-aware; N/A otherwise).
25
+ - **`Drift` validator renamed to `Drift-Comments`** to clarify it checks `// DRIFT:` comment ↔ DRIFT-LOG.md bookkeeping, not doc/code drift. Config key (`drift`) is unchanged.
26
+ - **Doc Sections** uses anchored heading matching instead of substring (no longer satisfied by a table-of-contents link or code block).
27
+
28
+ ### Fixed
29
+ - **`guard` no longer reports a confident green ✅ for checks that validated nothing** — removed hand-rolled `passed=1/total=1` auto-passes in `drift`, `architecture`, `test-spec`, and `security` (empty scan).
30
+ - **Eliminated false positives** that previously masked real drift: tech-stack/env-var "documented but not found" on monorepos, parser-garbage "data entities" (`table`, `index`, `foreign`), the greedy route regex emitting `/api/` + stray backticks, and the test-file path/basename and glob-pattern mismatches ("N documented but not found"). Documented endpoints/tests that genuinely no longer exist are now reported as real drift.
31
+ - **Security scan** anchored to a scanned-file count — an empty scan now warns ("no source files were scanned") instead of reporting a false "no secrets" pass.
32
+
33
+ ## [0.9.11] - 2026-03-18
34
+
35
+ ### Added
36
+ - **`globMatch()` in `shared-ignore.mjs`** — Purpose-built positive file matching with hardcoded `node_modules` exclusion at any depth. Distinct from `buildIgnoreFilter()` (which is for ignore/skip filtering).
37
+ - **6 new tests** — `globMatch` node_modules rejection (2), valid path matching (1), multi-pattern (1), CI detection (1), function load (1). Total tests: 46.
38
+
39
+ ### Fixed
40
+ - **Docs-Diff no longer scans `node_modules` for test files** — `getTestFilesFromPatterns()` now uses `globMatch()` instead of repurposing `buildIgnoreFilter()`. The `**` glob no longer matches through `node_modules/` directories.
41
+ - **CI detection supports enterprise systems** — `calcTestingScore()` now recognizes `buildspec.yml`, `amplify.yml`, `Jenkinsfile`, `.circleci/config.yml`, `.gitlab-ci.yml`, `.travis.yml`, and `turbo.json` with a `"test"` task.
42
+ - **Multi-pattern test resolution works correctly** — `testPatterns` array resolves files from all patterns with proper deduplication via Set.
43
+
10
44
  ## [0.9.10] - 2026-03-18
11
45
 
12
46
  ### Added — Unified Ignore System & Scorer Alignment
@@ -363,3 +397,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
363
397
  - Zero dependencies — pure Node.js
364
398
  - GitHub CI workflow (Node 18/20/22 matrix)
365
399
  - MIT license
400
+
401
+ ### Fixed
402
+ - Added missing tests for the `watch` CLI command to verify it runs and reacts properly.
@@ -9,3 +9,4 @@
9
9
  | 2026-03-13 | `cli/commands/generate.mjs` | ARCHITECTURE.md | DRIFT-LOG.md template includes `// DRIFT: reason` as placeholder text. | Info | By design — template content |
10
10
  | 2026-03-13 | `cli/commands/agents.mjs` | ARCHITECTURE.md | Agent config generators include `// DRIFT: reason` as instruction text for AI agents. 3 occurrences across Windsurf, Cursor, and generic agent configs. | Info | By design — instruction content |
11
11
  | 2026-03-13 | `cli/validators/drift.mjs` | ARCHITECTURE.md | Drift validator references `// DRIFT:` pattern in JSDoc and regex. | Info | By design — validator implementation |
12
+ | 2026-05-12 | `tests/drift.test.mjs` | ARCHITECTURE.md | Drift validator tests use `// DRIFT:` comments to simulate project files having drift comments. | Info | By design — test implementation |
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docguard-cli
3
- Version: 0.9.10
3
+ Version: 0.10.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
@@ -275,7 +275,7 @@ DocGuard runs **19 automated validators** on every `guard` check:
275
275
  | 1 | **Structure** | Required CDD files exist | ✅ On |
276
276
  | 2 | **Doc Sections** | Canonical docs have required sections | ✅ On |
277
277
  | 3 | **Docs-Sync** | Routes/services referenced in docs + OpenAPI cross-check | ✅ On |
278
- | 4 | **Drift** | `// DRIFT:` comments logged in DRIFT-LOG.md | ✅ On |
278
+ | 4 | **Drift-Comments** | `// DRIFT:` comments logged in DRIFT-LOG.md | ✅ On |
279
279
  | 5 | **Changelog** | CHANGELOG.md has [Unreleased] section | ✅ On |
280
280
  | 6 | **Test-Spec** | Tests exist per TEST-SPEC.md rules | ✅ On |
281
281
  | 7 | **Environment** | Env vars documented, .env.example exists | ✅ On |
@@ -291,6 +291,7 @@ DocGuard runs **19 automated validators** on every `guard` check:
291
291
  | 17 | **TODO-Tracking** | Untracked TODOs/FIXMEs and skipped tests | ✅ On |
292
292
  | 18 | **Schema-Sync** | Database models documented in DATA-MODEL.md | ✅ On |
293
293
  | 19 | **Spec-Kit** | Spec quality validation (FR-IDs, mandatory sections, phased tasks) | ✅ On |
294
+ | 20 | **API-Surface** | API-REFERENCE.md endpoints match the real API surface (OpenAPI spec / routes); flags documented-but-deleted endpoints | ✅ On |
294
295
 
295
296
  ---
296
297
 
@@ -344,7 +345,7 @@ DocGuard provides AI agent slash commands for integrated workflows. Installed au
344
345
 
345
346
  | Command | What It Does |
346
347
  |:--------|:-------------|
347
- | `/docguard.guard` | Run quality validation — check all 19 validators |
348
+ | `/docguard.guard` | Run quality validation — check all 20 validators |
348
349
  | `/docguard.review` | Analyze doc quality and suggest improvements |
349
350
  | `/docguard.fix` | Generate targeted fix prompts for specific issues |
350
351
  | `/docguard.score` | Show CDD maturity score with category breakdown |
@@ -251,7 +251,7 @@ DocGuard runs **19 automated validators** on every `guard` check:
251
251
  | 1 | **Structure** | Required CDD files exist | ✅ On |
252
252
  | 2 | **Doc Sections** | Canonical docs have required sections | ✅ On |
253
253
  | 3 | **Docs-Sync** | Routes/services referenced in docs + OpenAPI cross-check | ✅ On |
254
- | 4 | **Drift** | `// DRIFT:` comments logged in DRIFT-LOG.md | ✅ On |
254
+ | 4 | **Drift-Comments** | `// DRIFT:` comments logged in DRIFT-LOG.md | ✅ On |
255
255
  | 5 | **Changelog** | CHANGELOG.md has [Unreleased] section | ✅ On |
256
256
  | 6 | **Test-Spec** | Tests exist per TEST-SPEC.md rules | ✅ On |
257
257
  | 7 | **Environment** | Env vars documented, .env.example exists | ✅ On |
@@ -267,6 +267,7 @@ DocGuard runs **19 automated validators** on every `guard` check:
267
267
  | 17 | **TODO-Tracking** | Untracked TODOs/FIXMEs and skipped tests | ✅ On |
268
268
  | 18 | **Schema-Sync** | Database models documented in DATA-MODEL.md | ✅ On |
269
269
  | 19 | **Spec-Kit** | Spec quality validation (FR-IDs, mandatory sections, phased tasks) | ✅ On |
270
+ | 20 | **API-Surface** | API-REFERENCE.md endpoints match the real API surface (OpenAPI spec / routes); flags documented-but-deleted endpoints | ✅ On |
270
271
 
271
272
  ---
272
273
 
@@ -320,7 +321,7 @@ DocGuard provides AI agent slash commands for integrated workflows. Installed au
320
321
 
321
322
  | Command | What It Does |
322
323
  |:--------|:-------------|
323
- | `/docguard.guard` | Run quality validation — check all 19 validators |
324
+ | `/docguard.guard` | Run quality validation — check all 20 validators |
324
325
  | `/docguard.review` | Analyze doc quality and suggest improvements |
325
326
  | `/docguard.fix` | Generate targeted fix prompts for specific issues |
326
327
  | `/docguard.score` | Show CDD maturity score with category breakdown |
@@ -0,0 +1,84 @@
1
+ # Supply-Chain Security Audit
2
+
3
+ > **Purpose:** Recurring read-only audit of this repository for npm/PyPI supply-chain risks.
4
+ > Designed to run unattended in Jules Scheduled Tasks.
5
+
6
+ ## ⚠️ Critical Safety Rule
7
+
8
+ **Do NOT run** `npm install`, `pip install`, `npm audit fix`, or any state-changing command.
9
+ This is a **read-only** audit.
10
+
11
+ ---
12
+
13
+ ## Audit Phases
14
+
15
+ ### Phase 1: Known-Bad Packages
16
+
17
+ Scan all lockfiles (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `requirements*.txt`, `poetry.lock`, `pyproject.toml`) for known-malicious packages:
18
+
19
+ **May 2026 — TanStack/Mini Shai-Hulud (CVE-2026-45321):**
20
+ - `@tanstack/router` 1.121.4–1.121.6
21
+ - `@tanstack/start`, `@tanstack/react-router`, `@tanstack/vue-router`, `@tanstack/solid-router`
22
+
23
+ **May 2026 — TeamPCP/Mistral:**
24
+ - `@mistralai/mistralai` 1.5.0 (npm) / `mistralai` 2.4.6 (PyPI)
25
+ - `intercom-client` 6.4.0, `@ctrl/tinycolor` 4.2.0
26
+ - `guardrails-ai` 0.10.1, `litellm` 1.82.8, `lightning` 2.6.2–2.6.3
27
+
28
+ ### Phase 2: IOCs on Disk
29
+
30
+ Search for:
31
+ - Worm loaders: `router_init.js`, `router_runtime.js`, `setup.mjs` in `node_modules/`
32
+ - C2 domains: `filev2.getsession.org`, `git-tanstack.com`, `api.masscan.cloud`, `83.142.209.194`
33
+ - Persistence: `~/Library/LaunchAgents/com.user.gh-token-monitor.plist` (macOS), `~/.config/systemd/user/gh-token-monitor.service` (Linux)
34
+ - Git artifacts: remotes containing `shai-hulud`, commits by `claude <claude@users.noreply.github.com>`
35
+
36
+ ### Phase 3: Slopsquatting
37
+
38
+ For every direct dependency:
39
+ - Flag packages with <1,000 weekly downloads named like a popular package
40
+ - Flag packages added in AI-authored commits
41
+ - Check for phantom imports (imported but not declared in package.json)
42
+
43
+ ### Phase 4: Freshness Violations
44
+
45
+ - CRITICAL: package published <48 hours ago
46
+ - HIGH: package published <7 days ago
47
+ - MEDIUM: package published <30 days ago
48
+ - Flag any floating version ranges (`^`, `~`, `>=`, `*`, `latest`)
49
+
50
+ ### Phase 5: Install-Script Exposure
51
+
52
+ - Check for `preinstall`/`postinstall` hooks in package.json
53
+ - Verify `.npmrc` has `ignore-scripts=true`
54
+ - Count packages with `hasInstallScript` in lockfile
55
+
56
+ ### Phase 6: CI/CD Attack Surface
57
+
58
+ For each `.github/workflows/*.yml`:
59
+ - `pull_request_target` + checkout of PR code = CRITICAL
60
+ - Third-party actions not pinned to commit SHA = HIGH
61
+ - `secrets.*` exposed in PR workflows = HIGH
62
+ - Missing `permissions:` block = MEDIUM
63
+
64
+ ---
65
+
66
+ ## Output
67
+
68
+ Save findings to `./reports/SUPPLY-CHAIN-AUDIT-YYYY-MM-DD.md`.
69
+
70
+ If CRITICAL or HIGH findings exist, open a PR with title:
71
+ `[supply-chain] Audit findings for YYYY-MM-DD`
72
+
73
+ ---
74
+
75
+ ## Remediation
76
+
77
+ If Phase 1 or 2 hits:
78
+ > ⚠️ DO NOT revoke GitHub tokens first. Remove persistence daemon first, then rotate credentials.
79
+
80
+ If Phase 4 hits:
81
+ > Pin all versions to exact in package.json. Add `min-release-age=7d` to .npmrc.
82
+
83
+ If Phase 6 hits:
84
+ > Pin third-party actions to 40-char commit SHA. Replace `pull_request_target` with `pull_request`.
@@ -20,20 +20,21 @@ import { detectAgentMode, isSpecKitInitialized } from '../ensure-skills.mjs';
20
20
  import { existsSync, readFileSync } from 'node:fs';
21
21
  import { resolve, dirname } from 'node:path';
22
22
  import { fileURLToPath } from 'node:url';
23
- import { execSync } from 'node:child_process';
23
+ import { execSync, execFileSync } from 'node:child_process';
24
24
 
25
25
  // Map validator failures to the right fix --doc target
26
26
  const VALIDATOR_TO_DOC = {
27
- 'Structure': null, // structural — needs init, not doc fix
28
- 'Doc Sections': null, // section-level — maps to specific doc
29
- 'Docs-Sync': null, // cross-reference — needs manual review
30
- 'Drift': null, // drift log maintenance
31
- 'Changelog': null, // changelog maintenance
32
- 'Test-Spec': 'test-spec',
33
- 'Environment': 'environment',
34
- 'Security': 'security',
35
- 'Architecture': 'architecture',
36
- 'Freshness': null, // freshness — maps to stale doc
27
+ 'Structure': null, // structural — needs init, not doc fix
28
+ 'Doc Sections': null, // section-level — maps to specific doc
29
+ 'Docs-Sync': null, // cross-reference — needs manual review
30
+ 'Drift-Comments': null, // drift log maintenance
31
+ 'Changelog': null, // changelog maintenance
32
+ 'API-Surface': 'api-reference',
33
+ 'Test-Spec': 'test-spec',
34
+ 'Environment': 'environment',
35
+ 'Security': 'security',
36
+ 'Architecture': 'architecture',
37
+ 'Freshness': null, // freshness — maps to stale doc
37
38
  };
38
39
 
39
40
  // Actionable fix instructions per validator (LLM-first: includes both skill and CLI commands)
@@ -59,9 +60,16 @@ const FIX_INSTRUCTIONS = {
59
60
  description: 'Documentation references are out of sync with code. Review and update component maps.',
60
61
  autoFixable: false,
61
62
  },
62
- 'Drift': {
63
+ 'Drift-Comments': {
63
64
  action: 'Update DRIFT-LOG.md',
64
- description: 'Code deviates from canonical docs without logged reasons. Add DRIFT entries or update the canonical docs.',
65
+ description: 'A // DRIFT: code comment has no matching DRIFT-LOG.md entry. Add the entry or remove the comment.',
66
+ autoFixable: false,
67
+ },
68
+ 'API-Surface': {
69
+ action: 'Reconcile API-REFERENCE.md with the actual API surface',
70
+ command: 'docguard fix --doc api-reference',
71
+ llmCommand: '/docguard.fix --doc api-reference',
72
+ description: 'docs-canonical/API-REFERENCE.md documents endpoints that no longer exist in code (or omits real ones). Remove deleted endpoints and add missing ones to match the OpenAPI spec / route definitions, then log the change in CHANGELOG.md and DRIFT-LOG.md.',
65
73
  autoFixable: false,
66
74
  },
67
75
  'Changelog': {
@@ -127,7 +135,7 @@ export function runDiagnose(projectDir, config, flags) {
127
135
  // Run init to create missing files
128
136
  try {
129
137
  const cliPath = resolve(dirname(fileURLToPath(import.meta.url)), '..', 'docguard.mjs');
130
- execSync(`node "${cliPath}" init --dir "${projectDir}"`, {
138
+ execFileSync(process.execPath, [cliPath, 'init', '--dir', projectDir], {
131
139
  encoding: 'utf-8',
132
140
  stdio: 'pipe',
133
141
  });
@@ -136,7 +144,7 @@ export function runDiagnose(projectDir, config, flags) {
136
144
  // Run generate to fill in MISSING content only (never --force, which would overwrite existing docs)
137
145
  try {
138
146
  const cliPath = resolve(dirname(fileURLToPath(import.meta.url)), '..', 'docguard.mjs');
139
- execSync(`node "${cliPath}" generate --dir "${projectDir}"`, {
147
+ execFileSync(process.execPath, [cliPath, 'generate', '--dir', projectDir], {
140
148
  encoding: 'utf-8',
141
149
  stdio: 'pipe',
142
150
  });