docguard-cli 0.20.0__tar.gz → 0.21.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.
- {docguard_cli-0.20.0/extensions/spec-kit-docguard → docguard_cli-0.21.0/.agent}/skills/docguard-fix/SKILL.md +2 -2
- {docguard_cli-0.20.0/extensions/spec-kit-docguard → docguard_cli-0.21.0/.agent}/skills/docguard-guard/SKILL.md +2 -2
- {docguard_cli-0.20.0/extensions/spec-kit-docguard → docguard_cli-0.21.0/.agent}/skills/docguard-review/SKILL.md +2 -2
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/docguard-score/SKILL.md +2 -2
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/docguard-sync/SKILL.md +1 -1
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.github/workflows/ci.yml +2 -2
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.github/workflows/release.yml +3 -3
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/CHANGELOG.md +81 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/PKG-INFO +11 -3
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/README.md +10 -2
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/action.yml +3 -3
- docguard_cli-0.21.0/cli/commands/demo.mjs +241 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/init.mjs +68 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/docguard.mjs +22 -1
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/extension.yml +1 -1
- {docguard_cli-0.20.0/.agent → docguard_cli-0.21.0/extensions/spec-kit-docguard}/skills/docguard-fix/SKILL.md +2 -2
- {docguard_cli-0.20.0/.agent → docguard_cli-0.21.0/extensions/spec-kit-docguard}/skills/docguard-guard/SKILL.md +2 -2
- {docguard_cli-0.20.0/.agent → docguard_cli-0.21.0/extensions/spec-kit-docguard}/skills/docguard-review/SKILL.md +2 -2
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/skills/docguard-score/SKILL.md +2 -2
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/skills/docguard-sync/SKILL.md +1 -1
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/package.json +1 -1
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/pyproject.toml +1 -1
- docguard_cli-0.21.0/templates/demo-fixture/.docguard.json +8 -0
- docguard_cli-0.21.0/templates/demo-fixture/.env.example +5 -0
- docguard_cli-0.21.0/templates/demo-fixture/AGENTS.md +14 -0
- docguard_cli-0.21.0/templates/demo-fixture/CHANGELOG.md +13 -0
- docguard_cli-0.21.0/templates/demo-fixture/DRIFT-LOG.md +3 -0
- docguard_cli-0.21.0/templates/demo-fixture/README.md +17 -0
- docguard_cli-0.21.0/templates/demo-fixture/docs-canonical/API-REFERENCE.md +36 -0
- docguard_cli-0.21.0/templates/demo-fixture/docs-canonical/ARCHITECTURE.md +30 -0
- docguard_cli-0.21.0/templates/demo-fixture/docs-canonical/DATA-MODEL.md +30 -0
- docguard_cli-0.21.0/templates/demo-fixture/docs-canonical/ENVIRONMENT.md +20 -0
- docguard_cli-0.21.0/templates/demo-fixture/docs-canonical/SECURITY.md +15 -0
- docguard_cli-0.21.0/templates/demo-fixture/docs-canonical/TEST-SPEC.md +10 -0
- docguard_cli-0.21.0/templates/demo-fixture/package.json +10 -0
- docguard_cli-0.21.0/templates/demo-fixture/src/api.mjs +18 -0
- docguard_cli-0.21.0/templates/demo-fixture/src/notifier.mjs +23 -0
- docguard_cli-0.21.0/templates/demo-fixture/src/scheduler.mjs +8 -0
- docguard_cli-0.21.0/templates/demo-fixture/src/worker.mjs +15 -0
- docguard_cli-0.21.0/tests/demo-command.test.mjs +96 -0
- docguard_cli-0.21.0/tests/init-smart-detection.test.mjs +124 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.analyze.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.checklist.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.clarify.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.constitution.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.implement.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.plan.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.specify.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.tasks.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/commands/speckit.taskstoissues.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-analyze/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-checklist/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-clarify/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-constitution/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-implement/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-plan/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-specify/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-tasks/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.agent/skills/speckit-taskstoissues/SKILL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.docguard.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.docguardignore +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.github/dependabot.yml +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.github/scripts/patch-catalog.py +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.github/workflows/supply-chain.yml +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.github/workflows/sync-speckit-catalog.yml +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.gitignore +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.jules/bolt.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.jules/palette.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.jules/sentinel.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.npmignore +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.npmrc +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/extensions/.cache/catalog-ebf165086500aab1-metadata.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/extensions/.cache/catalog-ebf165086500aab1.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/extensions/.cache/catalog-metadata.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/extensions/.cache/catalog.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/init-options.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/memory/constitution.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/scripts/bash/check-prerequisites.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/scripts/bash/common.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/scripts/bash/create-new-feature.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/scripts/bash/setup-plan.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/scripts/bash/update-agent-context.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/templates/agent-file-template.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/templates/checklist-template.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/templates/constitution-template.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/templates/plan-template.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/templates/spec-template.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/.specify/templates/tasks-template.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/AGENTS.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/CODE_OF_CONDUCT.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/COMPARISONS.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/CONTRIBUTING.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/DRIFT-LOG.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/LICENSE +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/PHILOSOPHY.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/ROADMAP.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/SECURITY.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/STANDARD.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/SUPPLY-CHAIN-AUDIT.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/SUPPORT.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/agents.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/badge.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/ci.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/diagnose.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/diff.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/explain.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/fix.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/generate.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/guard.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/hooks.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/impact.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/llms.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/memory.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/publish.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/score.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/setup.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/sync.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/trace.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/upgrade.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/commands/watch.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/ensure-skills.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/api-doc.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/cdk.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/doc-tools.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/frontend.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/iac.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/integrations.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/memory-plan.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/project-type.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/routes.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/schemas.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/scanners/speckit.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/shared-git.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/shared-ignore.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/shared-source.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/shared.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/api-surface.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/architecture.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/canonical-sync.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/changelog.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/cross-reference.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/doc-quality.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/docs-coverage.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/docs-diff.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/docs-sync.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/drift.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/environment.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/freshness.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/generated-staleness.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/metadata-sync.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/metrics-consistency.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/schema-sync.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/security.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/spec-kit.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/structure.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/test-spec.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/todo-tracking.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/validators/traceability.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/writers/api-reference.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/writers/fix-memory.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/writers/mechanical.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/cli/writers/sections.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/commands/docguard.fix.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/commands/docguard.guard.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/commands/docguard.review.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/commands/docguard.score.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/configs/fastify.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/configs/generic.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/configs/nextjs.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/configs/python.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docguard_cli/__init__.py +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docguard_cli/wrapper.py +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs/ai-integration.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs/commands.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs/configuration.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs/doc-sections.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs/faq.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs/installation.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs/profiles.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs/quickstart.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-canonical/ARCHITECTURE.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-canonical/CI-RECIPES.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-canonical/DATA-MODEL.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-canonical/ENVIRONMENT.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-canonical/REQUIREMENTS.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-canonical/SECURITY.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-canonical/SURFACE-AUDIT.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-canonical/TEST-SPEC.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/docs-implementation/MIGRATION-v0.20.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/01-express-api/README.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/01-express-api/package.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/01-express-api/server.js +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/02-python-flask/README.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/02-python-flask/app.py +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/02-python-flask/docs-canonical/ARCHITECTURE.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/02-python-flask/requirements.txt +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/03-spec-kit-project/CHANGELOG.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/03-spec-kit-project/README.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/03-spec-kit-project/docs-canonical/ARCHITECTURE.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/03-spec-kit-project/docs-canonical/TEST-SPEC.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/03-spec-kit-project/package.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/03-spec-kit-project/src/index.js +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/03-spec-kit-project/tests/basic.test.js +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/examples/README.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/LICENSE +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/README.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/commands/diagnose.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/commands/fix.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/commands/generate.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/commands/guard.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/commands/init.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/commands/score.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/commands/sync.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/commands/trace.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/scripts/bash/common.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/scripts/bash/docguard-check-docs.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/scripts/bash/docguard-init-doc.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/scripts/bash/docguard-suggest-fix.sh +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/templates/extensions.yml +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/templates/github-workflows/docguard-autofix.yml +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/extensions/spec-kit-docguard/templates/github-workflows/docguard-guard.yml +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/pr_description.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/schemas/docguard-config.schema.json +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/001-fix-ignore-validators/plan.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/001-fix-ignore-validators/spec.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/001-fix-ignore-validators/tasks.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/002-fix-test-discovery/plan.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/002-fix-test-discovery/spec.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/002-fix-test-discovery/tasks.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/003-v011-false-positives/plan.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/003-v011-false-positives/spec.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/specs/003-v011-false-positives/tasks.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/ADR.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/AGENTS.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/ARCHITECTURE.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/CHANGELOG.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/CURRENT-STATE.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/DATA-MODEL.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/DEPLOYMENT.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/DRIFT-LOG.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/ENVIRONMENT.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/KNOWN-GOTCHAS.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/REQUIREMENTS.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/ROADMAP.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/RUNBOOKS.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/SECURITY.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/TEST-SPEC.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/TROUBLESHOOTING.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/VENDOR-BUGS.md.template +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/ci/github-actions.yml +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/commands/docguard.fix.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/commands/docguard.guard.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/commands/docguard.init.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/commands/docguard.review.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/templates/commands/docguard.update.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/test-draft.js +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/test-metrics.js +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/anchor-autofix.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/api-doc.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/api-surface.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/api-write.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/architecture.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/b7-node-env-symmetry.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/backup-failure.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/canonical-sync.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/cdk-detection.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/changed-only-scoping.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/changed-only.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/changelog.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/commands.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/cross-reference.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/doc-quality.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/docguardignore.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/docs-coverage.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/docs-diff.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/docs-sync.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/drift.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/environment.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/fix-memory.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/fix-suppression.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/fixture-projects.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/freshness.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/frontend-deep.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/frontend.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/generated-staleness.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/guard-classify.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/guard-no-throw.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/hooks.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/i18n.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/impact.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/integrations.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/mechanical.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/memory-plan.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/metadata-sync.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/metrics-consistency.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/metrics-dedup.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/monorepo-scanning.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/multi-spec.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/npm-pack-smoke.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/patch-0.11.2.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/plan-disk-cache.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/profile-flag.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/project-type.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/regenerate-section.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/routes-multilang.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/schema-sync.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/schemas-multilang.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/schemas.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/scoping-extended.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/section-na-markers.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/sections.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/security.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/severity.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/shared-git.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/shared-source.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/stress-test.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/structure.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/sweep-nudge.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/sync-since.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/sync.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/test-spec.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/todo-tracking.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/trace-multilang.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/trace-reverse.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/traceability.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/upgrade-pr-e2e.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/upgrade-pr.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/upgrade.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/v020-consolidation.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/validator-naming.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/version-pin.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/tests/whats-new.test.mjs +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/vscode-extension/.vscodeignore +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/vscode-extension/README.md +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/vscode-extension/extension.js +0 -0
- {docguard_cli-0.20.0 → docguard_cli-0.21.0}/vscode-extension/package.json +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.
|
|
9
|
+
version: 0.21.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-fix
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.21.0 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Fix Skill
|
|
15
15
|
|
|
@@ -7,10 +7,10 @@ description: Run DocGuard guard validation against Canonical-Driven Development
|
|
|
7
7
|
compatibility: Requires DocGuard CLI installed (npm i -g docguard-cli or npx docguard-cli)
|
|
8
8
|
metadata:
|
|
9
9
|
author: docguard
|
|
10
|
-
version: 0.
|
|
10
|
+
version: 0.21.0
|
|
11
11
|
source: extensions/spec-kit-docguard/skills/docguard-guard
|
|
12
12
|
---
|
|
13
|
-
<!-- docguard:version: 0.
|
|
13
|
+
<!-- docguard:version: 0.21.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.
|
|
9
|
+
version: 0.21.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-review
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.21.0 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Review Skill
|
|
15
15
|
|
|
@@ -6,10 +6,10 @@ description: CDD maturity assessment with category-aware improvement roadmap. Ru
|
|
|
6
6
|
compatibility: Requires DocGuard CLI installed (npm i -g docguard-cli or npx docguard-cli)
|
|
7
7
|
metadata:
|
|
8
8
|
author: docguard
|
|
9
|
-
version: 0.
|
|
9
|
+
version: 0.21.0
|
|
10
10
|
source: extensions/spec-kit-docguard/skills/docguard-score
|
|
11
11
|
---
|
|
12
|
-
<!-- docguard:version: 0.
|
|
12
|
+
<!-- docguard:version: 0.21.0 -->
|
|
13
13
|
|
|
14
14
|
# DocGuard Score Skill
|
|
15
15
|
|
|
@@ -4,7 +4,7 @@ description: Keep canonical documentation ALWAYS UP TO DATE. Refreshes code-trut
|
|
|
4
4
|
compatibility: Requires DocGuard CLI installed (npm i -g docguard-cli or npx docguard-cli)
|
|
5
5
|
metadata:
|
|
6
6
|
author: docguard
|
|
7
|
-
version: 0.
|
|
7
|
+
version: 0.21.0
|
|
8
8
|
source: extensions/spec-kit-docguard/skills/docguard-sync
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
with:
|
|
20
20
|
fetch-depth: 0 # Full git history for freshness validator
|
|
21
21
|
|
|
22
|
-
- uses: actions/setup-node@
|
|
22
|
+
- uses: actions/setup-node@v6
|
|
23
23
|
with:
|
|
24
24
|
node-version: ${{ matrix.node-version }}
|
|
25
25
|
|
|
@@ -82,7 +82,7 @@ jobs:
|
|
|
82
82
|
needs: test
|
|
83
83
|
steps:
|
|
84
84
|
- uses: actions/checkout@v5
|
|
85
|
-
- uses: actions/setup-node@
|
|
85
|
+
- uses: actions/setup-node@v6
|
|
86
86
|
with:
|
|
87
87
|
node-version: 20
|
|
88
88
|
registry-url: 'https://registry.npmjs.org'
|
|
@@ -52,7 +52,7 @@ jobs:
|
|
|
52
52
|
- uses: actions/checkout@v5
|
|
53
53
|
with:
|
|
54
54
|
fetch-depth: 0
|
|
55
|
-
- uses: actions/setup-node@
|
|
55
|
+
- uses: actions/setup-node@v6
|
|
56
56
|
with:
|
|
57
57
|
node-version: ${{ matrix.node-version }}
|
|
58
58
|
- name: Run Tests
|
|
@@ -151,7 +151,7 @@ jobs:
|
|
|
151
151
|
runs-on: ubuntu-latest
|
|
152
152
|
steps:
|
|
153
153
|
- uses: actions/checkout@v5
|
|
154
|
-
- uses: actions/setup-node@
|
|
154
|
+
- uses: actions/setup-node@v6
|
|
155
155
|
with:
|
|
156
156
|
node-version: 20
|
|
157
157
|
registry-url: 'https://registry.npmjs.org'
|
|
@@ -167,7 +167,7 @@ jobs:
|
|
|
167
167
|
runs-on: ubuntu-latest
|
|
168
168
|
steps:
|
|
169
169
|
- uses: actions/checkout@v5
|
|
170
|
-
- uses: actions/setup-python@
|
|
170
|
+
- uses: actions/setup-python@v6
|
|
171
171
|
with:
|
|
172
172
|
python-version: '3.12'
|
|
173
173
|
|
|
@@ -7,6 +7,87 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.21.0] - 2026-05-26
|
|
11
|
+
|
|
12
|
+
**Time-to-value.** The funnel-unblocker release. Until v0.21, a dev shopping
|
|
13
|
+
for documentation tools had to install DocGuard, run `init`, write some
|
|
14
|
+
canonical docs, and only then could they see what the tool actually does.
|
|
15
|
+
v0.21 compresses that to **30 seconds, zero install**:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx docguard-cli demo
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Plus: `docguard init` now auto-detects existing projects and switches to
|
|
22
|
+
"scan and propose" mode (reverse-engineering canonical docs from your code)
|
|
23
|
+
instead of dumping a blank skeleton. The blank-skeleton path is still one
|
|
24
|
+
flag away (`--skeleton`).
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **`docguard demo`** — the marquee feature of this release. Copies a baked-in
|
|
29
|
+
fixture (`templates/demo-fixture/` — a 4-service payments API with
|
|
30
|
+
intentional drift) to a temp directory, git-inits it, runs guard + score
|
|
31
|
+
against it, then prints a **curated narrative**: top-5 findings spanning
|
|
32
|
+
multiple validators, each annotated with the real-world impact ("Your AI
|
|
33
|
+
agent reads the architecture doc and gives wrong answers about how the
|
|
34
|
+
system works"), the CDD maturity score, and a clear three-line CTA showing
|
|
35
|
+
both `npm install -g` and `npx` paths. Temp fixture is cleaned up on exit
|
|
36
|
+
(or kept via `--keep` for inspection). Total time: ~0.5s for the guard
|
|
37
|
+
run; total experience: ~30s from `npx` to the install CTA.
|
|
38
|
+
- **`templates/demo-fixture/`** — ships with the package (already in
|
|
39
|
+
`files: ["templates/"]`). 12-file pretend "acme-payments" project with
|
|
40
|
+
drift across 7 validator categories: undocumented 4th service, missing
|
|
41
|
+
API endpoint in reference, env var drift between `.env.example` and
|
|
42
|
+
`ENVIRONMENT.md`, `CHANGELOG` missing `[Unreleased]`, README sections
|
|
43
|
+
per Standard README spec missing, etc.
|
|
44
|
+
- **`docguard init --skeleton`** — explicit opt-in to the v0.20 blank-template
|
|
45
|
+
behavior. For greenfield projects where the scan would find nothing.
|
|
46
|
+
- **`docguard demo --keep`** — preserves the temp fixture and reports its
|
|
47
|
+
path. Useful for poking around what a real-world DocGuard-managed project
|
|
48
|
+
looks like.
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- **Smart `docguard init` first-run.** When `init` runs in a directory that
|
|
53
|
+
has existing source code (`cli/`, `src/`, `lib/`, `app/`, or 10+ source
|
|
54
|
+
files at top level) AND no `docs-canonical/`, it automatically dispatches
|
|
55
|
+
to `runGenerate` with `--plan` — the "scan and propose" path. Heuristic
|
|
56
|
+
opts out for: `--skeleton`, `--wizard`, `--skip-prompts` (CI), explicit
|
|
57
|
+
`--profile`, or projects that already have canonical docs (re-init case).
|
|
58
|
+
Result: the 80% of adopters who arrive with an existing codebase get
|
|
59
|
+
immediate value from the very first command, instead of staring at a
|
|
60
|
+
blank skeleton.
|
|
61
|
+
- **`--help` updates.** New top section: "First-time? Try the demo (no
|
|
62
|
+
install, no setup): `npx docguard-cli demo`". `demo` listed in Tools.
|
|
63
|
+
`init` description updated to mention the new auto-detect behavior and
|
|
64
|
+
the `--skeleton` opt-out.
|
|
65
|
+
- **README.** New CTA block at the top under the H1, above the Table of
|
|
66
|
+
Contents: prominent `npx docguard-cli demo` callout drives the funnel.
|
|
67
|
+
Validator/command counts updated by `canonical-sync` to 14 commands.
|
|
68
|
+
|
|
69
|
+
### Tests
|
|
70
|
+
|
|
71
|
+
- 582 → **596 tests** (+14):
|
|
72
|
+
- `tests/demo-command.test.mjs` (6): demo exits 0; output contains banner
|
|
73
|
+
+ findings + score + CTA; `--quiet` suppresses banner; temp fixture is
|
|
74
|
+
cleaned up by default; `--keep` preserves it; top-5 findings span 3+
|
|
75
|
+
distinct validators (variety, not noise).
|
|
76
|
+
- `tests/init-smart-detection.test.mjs` (8): empty dir → skeleton; dir
|
|
77
|
+
with `src/` → smart mode; dir with `cli/` → smart mode; `--skeleton`
|
|
78
|
+
forces skeleton even with code present; `--skip-prompts` keeps skeleton
|
|
79
|
+
(CI determinism); pre-existing canonical docs skip smart mode; 10+
|
|
80
|
+
top-level Python files trigger smart mode; <10 + no code dir → skeleton.
|
|
81
|
+
|
|
82
|
+
### Strategic context
|
|
83
|
+
|
|
84
|
+
This is item #2 from the v0.19 SURFACE-AUDIT's adoption-friction analysis
|
|
85
|
+
("no demo path — devs have to install, init, write docs, run guard just to
|
|
86
|
+
see what we do"). v0.20 closed friction #1 (surface sprawl); v0.21 closes
|
|
87
|
+
#2 (time-to-value). Next up per the 5-release arc: v0.22 — AI-native fix
|
|
88
|
+
loop (`docguard fix --apply` calls Claude/Codex and opens a PR with the
|
|
89
|
+
fix end-to-end).
|
|
90
|
+
|
|
10
91
|
## [0.20.0] - 2026-05-26
|
|
11
92
|
|
|
12
93
|
**Consolidation.** 21 user-facing commands become 13. The promise from
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docguard-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.21.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
|
|
@@ -36,6 +36,14 @@ Description-Content-Type: text/markdown
|
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
+
> **✨ See what DocGuard catches in 30 seconds — no install, no setup:**
|
|
40
|
+
> ```bash
|
|
41
|
+
> npx docguard-cli demo
|
|
42
|
+
> ```
|
|
43
|
+
> Runs against a baked-in sample project with intentional drift and shows you the findings + a clear path to fixing them.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
39
47
|
## Table of Contents
|
|
40
48
|
|
|
41
49
|
- [What is DocGuard?](#what-is-docguard)
|
|
@@ -75,7 +83,7 @@ DocGuard is an official [GitHub Spec Kit](https://github.com/github/spec-kit) co
|
|
|
75
83
|
|
|
76
84
|
```mermaid
|
|
77
85
|
graph TD
|
|
78
|
-
CLI["CLI Entry<br/>docguard.mjs"] --> Commands["Commands (
|
|
86
|
+
CLI["CLI Entry<br/>docguard.mjs"] --> Commands["Commands (14)"]
|
|
79
87
|
Commands --> guard["guard"]
|
|
80
88
|
Commands --> generate["generate"]
|
|
81
89
|
Commands --> score["score"]
|
|
@@ -259,7 +267,7 @@ This installs DocGuard's slash commands (`/docguard.guard`, `/docguard.review`,
|
|
|
259
267
|
|
|
260
268
|
## Usage
|
|
261
269
|
|
|
262
|
-
DocGuard ships **
|
|
270
|
+
DocGuard ships **14 commands** (the "Daily 5" + 9 situational tools, including the zero-install `demo`). Six additional one-shot scaffolders are accessed via `docguard init --with <name>`. Eight v0.19 commands continue to work as deprecation aliases through v0.20.x — see [MIGRATION-v0.20.md](docs-implementation/MIGRATION-v0.20.md).
|
|
263
271
|
|
|
264
272
|
**The Daily 5** — what you'll reach for 95% of the time:
|
|
265
273
|
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
> **✨ See what DocGuard catches in 30 seconds — no install, no setup:**
|
|
16
|
+
> ```bash
|
|
17
|
+
> npx docguard-cli demo
|
|
18
|
+
> ```
|
|
19
|
+
> Runs against a baked-in sample project with intentional drift and shows you the findings + a clear path to fixing them.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
15
23
|
## Table of Contents
|
|
16
24
|
|
|
17
25
|
- [What is DocGuard?](#what-is-docguard)
|
|
@@ -51,7 +59,7 @@ DocGuard is an official [GitHub Spec Kit](https://github.com/github/spec-kit) co
|
|
|
51
59
|
|
|
52
60
|
```mermaid
|
|
53
61
|
graph TD
|
|
54
|
-
CLI["CLI Entry<br/>docguard.mjs"] --> Commands["Commands (
|
|
62
|
+
CLI["CLI Entry<br/>docguard.mjs"] --> Commands["Commands (14)"]
|
|
55
63
|
Commands --> guard["guard"]
|
|
56
64
|
Commands --> generate["generate"]
|
|
57
65
|
Commands --> score["score"]
|
|
@@ -235,7 +243,7 @@ This installs DocGuard's slash commands (`/docguard.guard`, `/docguard.review`,
|
|
|
235
243
|
|
|
236
244
|
## Usage
|
|
237
245
|
|
|
238
|
-
DocGuard ships **
|
|
246
|
+
DocGuard ships **14 commands** (the "Daily 5" + 9 situational tools, including the zero-install `demo`). Six additional one-shot scaffolders are accessed via `docguard init --with <name>`. Eight v0.19 commands continue to work as deprecation aliases through v0.20.x — see [MIGRATION-v0.20.md](docs-implementation/MIGRATION-v0.20.md).
|
|
239
247
|
|
|
240
248
|
**The Daily 5** — what you'll reach for 95% of the time:
|
|
241
249
|
|
|
@@ -77,7 +77,7 @@ runs:
|
|
|
77
77
|
using: 'composite'
|
|
78
78
|
steps:
|
|
79
79
|
- name: Setup Node.js
|
|
80
|
-
uses: actions/setup-node@
|
|
80
|
+
uses: actions/setup-node@v6
|
|
81
81
|
with:
|
|
82
82
|
node-version: ${{ inputs.node-version }}
|
|
83
83
|
|
|
@@ -247,7 +247,7 @@ runs:
|
|
|
247
247
|
|
|
248
248
|
- name: Post Fix Summary to PR Comment
|
|
249
249
|
if: (inputs.command == 'fix' || inputs.command == 'sync') && inputs.comment-on-pr == 'true' && github.event_name == 'pull_request'
|
|
250
|
-
uses: actions/github-script@
|
|
250
|
+
uses: actions/github-script@v9
|
|
251
251
|
with:
|
|
252
252
|
script: |
|
|
253
253
|
const count = parseInt('${{ steps.fix.outputs.fixes-applied }}' || '0', 10);
|
|
@@ -288,7 +288,7 @@ runs:
|
|
|
288
288
|
|
|
289
289
|
- name: Post Score to PR Comment
|
|
290
290
|
if: inputs.command == 'score' && github.event_name == 'pull_request'
|
|
291
|
-
uses: actions/github-script@
|
|
291
|
+
uses: actions/github-script@v9
|
|
292
292
|
with:
|
|
293
293
|
script: |
|
|
294
294
|
const score = '${{ steps.run.outputs.score }}' || '?';
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Demo Command — v0.21.
|
|
3
|
+
*
|
|
4
|
+
* The 30-second "ah-ha" experience for devs shopping for doc tools.
|
|
5
|
+
*
|
|
6
|
+
* npx docguard-cli demo
|
|
7
|
+
*
|
|
8
|
+
* Spins up a baked-in fixture project (`templates/demo-fixture/`) — a 4-service
|
|
9
|
+
* payments API with INTENTIONAL doc drift — runs guard against it, and prints
|
|
10
|
+
* a curated narrative with real-world-impact annotations + a clear install CTA.
|
|
11
|
+
*
|
|
12
|
+
* Zero install required, zero damage to the user's environment: the fixture
|
|
13
|
+
* is copied to a temp directory, git-initialized there, and cleaned up on exit.
|
|
14
|
+
*
|
|
15
|
+
* Why this exists: per SURFACE-AUDIT v0.21 plan, the #2 friction point for
|
|
16
|
+
* adoption was "no demo path — devs have to install, init, write docs, run
|
|
17
|
+
* guard just to see what we do." This command compresses that to 30 seconds.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { mkdtempSync, rmSync, cpSync, existsSync, writeFileSync } from 'node:fs';
|
|
21
|
+
import { resolve, dirname, join } from 'node:path';
|
|
22
|
+
import { tmpdir } from 'node:os';
|
|
23
|
+
import { fileURLToPath } from 'node:url';
|
|
24
|
+
import { spawnSync } from 'node:child_process';
|
|
25
|
+
import { c } from '../shared.mjs';
|
|
26
|
+
import { runGuardInternal, classifyResult } from './guard.mjs';
|
|
27
|
+
import { runScoreInternal } from './score.mjs';
|
|
28
|
+
import { loadConfig } from '../docguard.mjs';
|
|
29
|
+
|
|
30
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
31
|
+
const __dirname = dirname(__filename);
|
|
32
|
+
const FIXTURE_SRC = resolve(__dirname, '../../templates/demo-fixture');
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Each warning pattern gets a 1-2 line "real-world impact" gloss. Keyed by
|
|
36
|
+
* a regex on the warning text; the first match wins. Falls back to the
|
|
37
|
+
* generic gloss for unrecognized warnings (so this dictionary stays
|
|
38
|
+
* resilient as validators evolve).
|
|
39
|
+
*
|
|
40
|
+
* The point: turn validator-speak ("Missing 'Setup Steps' section") into
|
|
41
|
+
* adopter-speak ("New devs spend an hour figuring out how to run this").
|
|
42
|
+
*/
|
|
43
|
+
const IMPACT_GLOSS = [
|
|
44
|
+
{
|
|
45
|
+
re: /env var.*not documented|missing.*Environment Variables/i,
|
|
46
|
+
impact: 'New devs hit cryptic "X is undefined" runtime errors at boot. CI bypasses the missing var entirely.',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
re: /[Aa]rchitecture|service.*not (in|mentioned)|not in [Aa]rchitecture/,
|
|
50
|
+
impact: 'Your AI agent reads the architecture doc and gives wrong answers about how the system works.',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
re: /missing.*Usage|missing.*License|README/,
|
|
54
|
+
impact: 'First-time visitors bounce. The README is the storefront — empty sections = lost trust.',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
re: /endpoint|route|API-REFERENCE/i,
|
|
58
|
+
impact: 'Clients call a documented endpoint that no longer exists, or worse — miss a new endpoint entirely.',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
re: /Test-Spec|test.*directory|test files/,
|
|
62
|
+
impact: 'Your TEST-SPEC doesn\'t reflect reality. New tests get written in the wrong place.',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
re: /Unreleased.*section|Changelog/,
|
|
66
|
+
impact: 'Release automation can\'t auto-detect what\'s pending. Versioning becomes manual guesswork.',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
re: /Spec.?Kit/i,
|
|
70
|
+
impact: 'Specs aren\'t structured for AI agents to use. You miss the multiplier on spec-driven development.',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
re: /Config file.*not mentioned/,
|
|
74
|
+
impact: 'Devs see an unknown config file and don\'t know if it\'s safe to delete or required.',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
re: /unlinked doc|not in your requiredFiles/,
|
|
78
|
+
impact: 'Doc lives in canonical/ but isn\'t in the manifest — guard skips it, drift accumulates silently.',
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
function getImpact(warning) {
|
|
83
|
+
for (const { re, impact } of IMPACT_GLOSS) {
|
|
84
|
+
if (re.test(warning)) return impact;
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Set up a temp copy of the fixture, git-init it, return the path.
|
|
91
|
+
*/
|
|
92
|
+
function setupFixture() {
|
|
93
|
+
const dir = mkdtempSync(join(tmpdir(), 'docguard-demo-'));
|
|
94
|
+
cpSync(FIXTURE_SRC, dir, { recursive: true });
|
|
95
|
+
// Initialize git so any history-aware validators (Freshness, Drift-Comments)
|
|
96
|
+
// can run without erroring. Identity is set locally so commit succeeds on
|
|
97
|
+
// CI runners that have no global git identity.
|
|
98
|
+
const opts = { cwd: dir, stdio: 'ignore' };
|
|
99
|
+
spawnSync('git', ['init', '-q', '-b', 'main'], opts);
|
|
100
|
+
spawnSync('git', ['config', 'user.email', 'demo@docguard.dev'], opts);
|
|
101
|
+
spawnSync('git', ['config', 'user.name', 'docguard-demo'], opts);
|
|
102
|
+
spawnSync('git', ['add', '-A'], opts);
|
|
103
|
+
spawnSync('git', ['commit', '-q', '-m', 'fixture'], opts);
|
|
104
|
+
return dir;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Pretty-print a curated guard run.
|
|
109
|
+
*/
|
|
110
|
+
function presentResults(guardData, scoreData) {
|
|
111
|
+
const allWarnings = [];
|
|
112
|
+
for (const v of guardData.validators) {
|
|
113
|
+
for (const w of (v.warnings || [])) {
|
|
114
|
+
allWarnings.push({ validator: v.name, message: w, severity: v.severity });
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
console.log(`\n${c.bold}🔍 What DocGuard found in your fixture:${c.reset}`);
|
|
119
|
+
console.log(`${c.dim} Validators run: ${guardData.validators.length} · Warnings: ${allWarnings.length} · Time: ~0.5s${c.reset}\n`);
|
|
120
|
+
|
|
121
|
+
// Pick up to 5 warnings showing VARIETY across validators (not 5 from the
|
|
122
|
+
// same one). Dedupe by validator name; within each validator group, pick
|
|
123
|
+
// the highest-severity warning. Then rank the picks by severity.
|
|
124
|
+
const sev = { high: 0, medium: 1, low: 2 };
|
|
125
|
+
const byValidator = new Map();
|
|
126
|
+
for (const w of allWarnings) {
|
|
127
|
+
const prev = byValidator.get(w.validator);
|
|
128
|
+
if (!prev || (sev[w.severity] ?? 1) < (sev[prev.severity] ?? 1)) {
|
|
129
|
+
byValidator.set(w.validator, w);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const ranked = [...byValidator.values()].sort((a, b) => {
|
|
133
|
+
return (sev[a.severity] ?? 1) - (sev[b.severity] ?? 1);
|
|
134
|
+
});
|
|
135
|
+
const top = ranked.slice(0, 5);
|
|
136
|
+
|
|
137
|
+
for (let i = 0; i < top.length; i++) {
|
|
138
|
+
const w = top[i];
|
|
139
|
+
const sev = w.severity === 'high' ? `${c.red}[HIGH]${c.reset}`
|
|
140
|
+
: w.severity === 'low' ? `${c.dim}[LOW]${c.reset}`
|
|
141
|
+
: `${c.yellow}[MED]${c.reset}`;
|
|
142
|
+
console.log(` ${c.bold}${i + 1}.${c.reset} ${sev} ${c.cyan}${w.validator}${c.reset}`);
|
|
143
|
+
console.log(` ${c.dim}${w.message}${c.reset}`);
|
|
144
|
+
const impact = getImpact(w.message);
|
|
145
|
+
if (impact) {
|
|
146
|
+
console.log(` ${c.green}→${c.reset} ${impact}`);
|
|
147
|
+
}
|
|
148
|
+
console.log('');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (allWarnings.length > top.length) {
|
|
152
|
+
console.log(` ${c.dim}... and ${allWarnings.length - top.length} more. Run \`docguard guard\` in your repo to see everything.${c.reset}\n`);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Score line
|
|
156
|
+
if (scoreData && typeof scoreData.score === 'number') {
|
|
157
|
+
const grade = scoreData.score >= 90 ? 'A' : scoreData.score >= 80 ? 'B' : scoreData.score >= 70 ? 'C' : scoreData.score >= 60 ? 'D' : 'F';
|
|
158
|
+
const color = scoreData.score >= 80 ? c.green : scoreData.score >= 60 ? c.yellow : c.red;
|
|
159
|
+
console.log(`${c.bold}📊 CDD Maturity Score:${c.reset} ${color}${scoreData.score}/100 (${grade})${c.reset}`);
|
|
160
|
+
console.log(`${c.dim} ↑ This is the fixture's score. Yours will hopefully be higher.${c.reset}\n`);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function printCTA() {
|
|
165
|
+
console.log(`${c.bold}🛠️ Fixing drift like this:${c.reset}`);
|
|
166
|
+
console.log(` ${c.cyan}docguard fix --write${c.reset} ${c.dim}— patches the mechanical stuff (version refs, counts, anchors)${c.reset}`);
|
|
167
|
+
console.log(` ${c.cyan}docguard sync --write${c.reset} ${c.dim}— refreshes code-truth sections to match the codebase${c.reset}`);
|
|
168
|
+
console.log(` ${c.cyan}docguard diagnose${c.reset} ${c.dim}— generates an AI prompt for the prose drift (Claude/GPT/Cursor)${c.reset}\n`);
|
|
169
|
+
|
|
170
|
+
console.log(`${c.bold}🚀 Try it on YOUR project:${c.reset}`);
|
|
171
|
+
console.log(` ${c.green}npm install -g docguard-cli${c.reset}`);
|
|
172
|
+
console.log(` ${c.green}cd your-project${c.reset}`);
|
|
173
|
+
console.log(` ${c.green}docguard init${c.reset} ${c.dim}— scans existing code and proposes canonical docs${c.reset}`);
|
|
174
|
+
console.log(` ${c.green}docguard guard${c.reset} ${c.dim}— see what we catch${c.reset}\n`);
|
|
175
|
+
|
|
176
|
+
console.log(`${c.dim}Or stay zero-install:${c.reset}`);
|
|
177
|
+
console.log(` ${c.green}npx docguard-cli init${c.reset}`);
|
|
178
|
+
console.log(` ${c.green}npx docguard-cli guard${c.reset}\n`);
|
|
179
|
+
|
|
180
|
+
console.log(`${c.bold}📚 Learn more:${c.reset} ${c.cyan}https://github.com/raccioly/docguard${c.reset}`);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Public entry point — `docguard demo`.
|
|
185
|
+
*
|
|
186
|
+
* @param {string} _projectDir — ignored; demo uses its own temp fixture
|
|
187
|
+
* @param {object} _config — ignored
|
|
188
|
+
* @param {object} flags — supports --quiet (skip banner) and --keep (don't cleanup fixture)
|
|
189
|
+
*/
|
|
190
|
+
export function runDemo(_projectDir, _config, flags = {}) {
|
|
191
|
+
if (!flags.quiet) {
|
|
192
|
+
console.log(`\n${c.bold}🎬 DocGuard Demo${c.reset} ${c.dim}— see what we catch in 30 seconds${c.reset}`);
|
|
193
|
+
console.log(`${c.dim} No install. No setup. We're running against a sample 4-service payments API${c.reset}`);
|
|
194
|
+
console.log(`${c.dim} with intentional drift between code and docs.${c.reset}\n`);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (!existsSync(FIXTURE_SRC)) {
|
|
198
|
+
console.error(`${c.red}Demo fixture not found at ${FIXTURE_SRC}.${c.reset}`);
|
|
199
|
+
console.error(`${c.dim}If this is a packaging bug, please file an issue.${c.reset}`);
|
|
200
|
+
process.exit(1);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
let fixture;
|
|
204
|
+
try {
|
|
205
|
+
fixture = setupFixture();
|
|
206
|
+
if (!flags.quiet) console.log(`${c.dim} Fixture ready at ${fixture}${c.reset}\n`);
|
|
207
|
+
} catch (err) {
|
|
208
|
+
if (fixture) rmSync(fixture, { recursive: true, force: true });
|
|
209
|
+
console.error(`${c.red}Failed to set up demo fixture: ${err.message}${c.reset}`);
|
|
210
|
+
process.exit(1);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Run guard + score against the fixture
|
|
214
|
+
let guardData, scoreData;
|
|
215
|
+
try {
|
|
216
|
+
// Load full config (defaults + fixture's .docguard.json) — same path the
|
|
217
|
+
// real `docguard guard` uses. The fixture ships its own .docguard.json
|
|
218
|
+
// so this hydrates the right project name + profile.
|
|
219
|
+
const config = loadConfig(fixture);
|
|
220
|
+
guardData = runGuardInternal(fixture, config);
|
|
221
|
+
scoreData = runScoreInternal(fixture, config);
|
|
222
|
+
} catch (err) {
|
|
223
|
+
rmSync(fixture, { recursive: true, force: true });
|
|
224
|
+
console.error(`${c.red}Demo guard run failed: ${err.message}${c.reset}`);
|
|
225
|
+
process.exit(1);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
presentResults(guardData, scoreData);
|
|
229
|
+
printCTA();
|
|
230
|
+
|
|
231
|
+
// Cleanup unless --keep
|
|
232
|
+
if (!flags.keep) {
|
|
233
|
+
rmSync(fixture, { recursive: true, force: true });
|
|
234
|
+
if (!flags.quiet) console.log(`${c.dim} Fixture cleaned up.${c.reset}`);
|
|
235
|
+
} else {
|
|
236
|
+
console.log(`${c.dim} Fixture kept at ${fixture} (--keep)${c.reset}`);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Always exit 0 — the demo is informational, never a failure
|
|
240
|
+
process.exit(0);
|
|
241
|
+
}
|
|
@@ -92,6 +92,61 @@ function askQuestion(prompt) {
|
|
|
92
92
|
|
|
93
93
|
// ── Init Command ─────────────────────────────────────────────────────────
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* v0.21 — Smart first-run detection.
|
|
97
|
+
*
|
|
98
|
+
* Heuristic: if the user is running `docguard init` against a project that
|
|
99
|
+
* already has substantial source code (cli/, src/, lib/, app/, or 10+ source
|
|
100
|
+
* files at depth 1-2) AND has no docs-canonical/ yet, switch from the
|
|
101
|
+
* skeleton-first path to the "scan and propose" path — i.e. dispatch to
|
|
102
|
+
* `docguard generate --plan` which reverse-engineers canonical docs from
|
|
103
|
+
* existing code.
|
|
104
|
+
*
|
|
105
|
+
* Rationale: blank skeletons feel useless for existing projects (the dev
|
|
106
|
+
* has to write everything from scratch). The scan path delivers immediate
|
|
107
|
+
* value: "here's what your project actually does, mapped to canonical doc
|
|
108
|
+
* shape." That's a 30-second wow for the 80% of adopters who arrive with
|
|
109
|
+
* an existing codebase.
|
|
110
|
+
*
|
|
111
|
+
* Opt out: `docguard init --skeleton` forces the blank-template path
|
|
112
|
+
* (preserves the v0.20 behavior for greenfield projects and CI flows).
|
|
113
|
+
*
|
|
114
|
+
* @returns {boolean} true if smart-detection fired and dispatched
|
|
115
|
+
*/
|
|
116
|
+
function shouldRunGenerate(projectDir, flags) {
|
|
117
|
+
if (flags.skeleton) return false; // explicit opt-out
|
|
118
|
+
if (flags.skipPrompts) return false; // non-interactive (CI) keeps deterministic skeleton path
|
|
119
|
+
if (flags.wizard) return false; // wizard has its own scan step
|
|
120
|
+
if (flags.profile) return false; // explicit profile = user knows what they want
|
|
121
|
+
|
|
122
|
+
// If canonical docs already exist, this is a re-init, not a first-run.
|
|
123
|
+
const canonicalDir = resolve(projectDir, 'docs-canonical');
|
|
124
|
+
if (existsSync(canonicalDir)) {
|
|
125
|
+
try {
|
|
126
|
+
const entries = readdirSync(canonicalDir).filter(f => f.endsWith('.md'));
|
|
127
|
+
if (entries.length > 0) return false;
|
|
128
|
+
} catch { /* fall through */ }
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Existing-code signals: any of cli/, src/, lib/, app/ as a directory.
|
|
132
|
+
const codeDirs = ['cli', 'src', 'lib', 'app'];
|
|
133
|
+
for (const d of codeDirs) {
|
|
134
|
+
if (existsSync(resolve(projectDir, d))) return true;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Fallback: count source files at top level (Python / Rust / Go projects
|
|
138
|
+
// often don't use src/ — files live at the root).
|
|
139
|
+
try {
|
|
140
|
+
const exts = ['.py', '.rs', '.go', '.java', '.rb', '.ts', '.tsx', '.mjs', '.js'];
|
|
141
|
+
const topLevel = readdirSync(projectDir).filter(f => {
|
|
142
|
+
return exts.some(e => f.endsWith(e));
|
|
143
|
+
});
|
|
144
|
+
if (topLevel.length >= 10) return true;
|
|
145
|
+
} catch { /* fall through */ }
|
|
146
|
+
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
|
|
95
150
|
export async function runInit(projectDir, config, flags) {
|
|
96
151
|
// v0.20: `--wizard` dispatches to the full interactive onboarding (formerly
|
|
97
152
|
// `docguard setup`). Done before profile validation so the wizard can ask
|
|
@@ -101,6 +156,19 @@ export async function runInit(projectDir, config, flags) {
|
|
|
101
156
|
return runSetup(projectDir, config, flags);
|
|
102
157
|
}
|
|
103
158
|
|
|
159
|
+
// v0.21: smart first-run — for existing projects without canonical docs,
|
|
160
|
+
// dispatch to `generate --plan` (the "scan and propose" path). Opt out
|
|
161
|
+
// with --skeleton or by setting --profile/--skip-prompts/--wizard explicitly.
|
|
162
|
+
if (shouldRunGenerate(projectDir, flags)) {
|
|
163
|
+
console.log(`${c.bold}🔍 DocGuard Init — Smart Mode${c.reset}`);
|
|
164
|
+
console.log(`${c.dim} Detected existing project with code but no canonical docs.${c.reset}`);
|
|
165
|
+
console.log(`${c.dim} Switching to "scan and propose" mode — DocGuard will reverse-engineer${c.reset}`);
|
|
166
|
+
console.log(`${c.dim} canonical docs from your code instead of dumping a blank skeleton.${c.reset}`);
|
|
167
|
+
console.log(`${c.dim} (Opt out: ${c.cyan}docguard init --skeleton${c.dim} for the blank-template path.)${c.reset}\n`);
|
|
168
|
+
const { runGenerate } = await import('./generate.mjs');
|
|
169
|
+
return runGenerate(projectDir, config, { ...flags, plan: true });
|
|
170
|
+
}
|
|
171
|
+
|
|
104
172
|
const profileName = flags.profile || 'standard';
|
|
105
173
|
const profile = PROFILES[profileName];
|
|
106
174
|
|