@jtf19/vibecoding-kit 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +84 -0
- package/CHANGELOG.md +28 -0
- package/CLAUDE.md +137 -0
- package/CODE_OF_CONDUCT.md +30 -0
- package/CONTRIBUTING.md +69 -0
- package/LICENSE +67 -0
- package/README.md +162 -0
- package/SECURITY.md +34 -0
- package/adapters/claude/install.md +70 -0
- package/adapters/claude/plugin.json +38 -0
- package/adapters/claude/settings.example.json +15 -0
- package/adapters/codex/hooks.example.json +15 -0
- package/adapters/codex/install.md +72 -0
- package/adapters/codex/plugin.json +58 -0
- package/adapters/cursor/hooks.example.json +17 -0
- package/adapters/cursor/install.md +72 -0
- package/adapters/cursor/plugin.json +42 -0
- package/adapters/opencode/install.md +95 -0
- package/adapters/opencode/plugin.js +56 -0
- package/adapters/opencode/plugin.json +58 -0
- package/adapters/pi/extension.ts +56 -0
- package/adapters/pi/install.md +95 -0
- package/adapters/pi/plugin.json +58 -0
- package/bin/vibe-cli-usage.mjs +43 -0
- package/bin/vibe.mjs +120 -0
- package/docs/acceptance-checklist.md +1226 -0
- package/docs/architecture-debt-burndown.md +537 -0
- package/docs/architecture.md +77 -0
- package/docs/ci-evidence-onboarding.md +143 -0
- package/docs/development.md +71 -0
- package/docs/evidence-authoring.md +188 -0
- package/docs/golden-path.md +179 -0
- package/docs/install-acceptance-checklist.md +90 -0
- package/docs/install-claude.md +41 -0
- package/docs/install-codex.md +41 -0
- package/docs/install-cursor.md +41 -0
- package/docs/install-experience-roadmap.md +394 -0
- package/docs/install.md +119 -0
- package/docs/maintainer-guide.md +197 -0
- package/docs/phase-1-implementation.md +848 -0
- package/docs/phase-2-roadmap.md +142 -0
- package/docs/quick-recipes.md +115 -0
- package/docs/readiness-interpretation.md +105 -0
- package/docs/readiness-troubleshooting.md +209 -0
- package/docs/release-check-reference.md +63 -0
- package/docs/release-guide.md +481 -0
- package/docs/release-notes.md +75 -0
- package/docs/runtime-contract.md +1010 -0
- package/docs/runtime-maintainer-validation.md +212 -0
- package/docs/runtime-roadmap.md +2265 -0
- package/docs/skill-authoring-guide.md +150 -0
- package/docs/submodule-guide.md +131 -0
- package/docs/team-adoption.md +113 -0
- package/docs/user-guide.md +108 -0
- package/docs/vibecoding-fork-analysis.md +398 -0
- package/docs/workflow-chaining.md +539 -0
- package/examples/ci/README.md +61 -0
- package/examples/ci/ci-evidence-input.example.json +56 -0
- package/examples/ci/generate-diff-coverage.mjs +90 -0
- package/examples/ci/generate-test-evidence.mjs +82 -0
- package/examples/ci/github-actions-readiness.yml +108 -0
- package/examples/claude-project/README.md +57 -0
- package/examples/codex-project/README.md +57 -0
- package/examples/cursor-project/README.md +57 -0
- package/examples/full-chain/README.md +63 -0
- package/examples/full-chain/architecture-design.md +128 -0
- package/examples/full-chain/commit-readiness.json +31 -0
- package/examples/full-chain/delivery-traceability.yaml +32 -0
- package/examples/full-chain/diff-coverage.json +73 -0
- package/examples/full-chain/evidence.json +20 -0
- package/examples/full-chain/implementation-plan.md +54 -0
- package/examples/full-chain/product-acceptance.md +86 -0
- package/examples/full-chain/product-discovery.md +84 -0
- package/examples/full-chain/product-spec.md +88 -0
- package/examples/full-chain/scenario-acceptance.yaml +32 -0
- package/examples/full-chain/test-evidence.json +29 -0
- package/examples/full-chain/ui-design-contract.md +87 -0
- package/examples/golden-path/README.md +84 -0
- package/examples/golden-path/diff-coverage.json +66 -0
- package/examples/golden-path/implementation-plan.md +62 -0
- package/examples/golden-path/product-spec.md +96 -0
- package/examples/golden-path/test-evidence.json +29 -0
- package/examples/runtime-fixtures/architecture-design.md +128 -0
- package/examples/runtime-fixtures/commit-readiness.json +31 -0
- package/examples/runtime-fixtures/delivery-traceability.yaml +32 -0
- package/examples/runtime-fixtures/diff-coverage.json +73 -0
- package/examples/runtime-fixtures/evidence.json +20 -0
- package/examples/runtime-fixtures/implementation-plan.md +54 -0
- package/examples/runtime-fixtures/negative/commit-readiness-boundary-escalated.json +27 -0
- package/examples/runtime-fixtures/negative/delivery-traceability-bad-ref.yaml +32 -0
- package/examples/runtime-fixtures/negative/diff-coverage-changed-file-without-task-ref.json +40 -0
- package/examples/runtime-fixtures/negative/diff-coverage-operation-mismatch.json +38 -0
- package/examples/runtime-fixtures/negative/diff-coverage-required-task-missing.json +24 -0
- package/examples/runtime-fixtures/negative/diff-coverage-unexpected-file.json +20 -0
- package/examples/runtime-fixtures/negative/test-evidence-missing-output-digest.json +23 -0
- package/examples/runtime-fixtures/negative/test-evidence-risky-task-missing.json +29 -0
- package/examples/runtime-fixtures/product-acceptance.md +86 -0
- package/examples/runtime-fixtures/product-discovery.md +84 -0
- package/examples/runtime-fixtures/product-spec.md +88 -0
- package/examples/runtime-fixtures/scenario-acceptance.yaml +32 -0
- package/examples/runtime-fixtures/test-evidence.json +29 -0
- package/examples/runtime-fixtures/ui-design-contract.md +87 -0
- package/hooks/post-tool-compact/README.md +47 -0
- package/hooks/session-start/README.md +112 -0
- package/hooks/session-start/session-start-state-boundary-contract.mjs +161 -0
- package/hooks/session-start/session-start.md +29 -0
- package/hooks/session-start/session-start.mjs +49 -0
- package/hooks/workflow-handoff/README.md +44 -0
- package/hooks/workflow-handoff/workflow-handoff.md +11 -0
- package/package.json +72 -0
- package/skills/using-vibecoding/SKILL.md +396 -0
- package/skills/vibe-brainstorming/SKILL.md +98 -0
- package/skills/vibe-context-compact/SKILL.md +95 -0
- package/skills/vibe-debugging/SKILL.md +87 -0
- package/skills/vibe-dispatching-parallel-work/SKILL.md +144 -0
- package/skills/vibe-executing-plans/SKILL.md +114 -0
- package/skills/vibe-finishing-a-development-branch/SKILL.md +110 -0
- package/skills/vibe-implementation/SKILL.md +84 -0
- package/skills/vibe-planning/SKILL.md +102 -0
- package/skills/vibe-product-acceptance/SKILL.md +106 -0
- package/skills/vibe-product-discovery/SKILL.md +107 -0
- package/skills/vibe-product-spec/SKILL.md +105 -0
- package/skills/vibe-receiving-code-review/SKILL.md +110 -0
- package/skills/vibe-requesting-code-review/SKILL.md +106 -0
- package/skills/vibe-review/SKILL.md +106 -0
- package/skills/vibe-subagent-driven-development/SKILL.md +198 -0
- package/skills/vibe-systematic-debugging/SKILL.md +106 -0
- package/skills/vibe-test-driven-development/SKILL.md +112 -0
- package/skills/vibe-ui-design/SKILL.md +107 -0
- package/skills/vibe-verification/SKILL.md +84 -0
- package/skills/vibe-verification-before-completion/SKILL.md +170 -0
- package/skills/vibe-workspace-isolation/SKILL.md +158 -0
- package/skills/vibe-writing-plans/SKILL.md +137 -0
- package/skills/vibe-writing-skills/SKILL.md +118 -0
- package/templates/AGENTS.md +88 -0
- package/templates/CLAUDE.md +88 -0
- package/templates/VIBE-CODING.md +157 -0
- package/templates/architecture-design.md +139 -0
- package/templates/delivery-traceability.yaml +52 -0
- package/templates/evidence/README.md +117 -0
- package/templates/evidence/diff-coverage.json +34 -0
- package/templates/evidence/test-evidence.json +29 -0
- package/templates/implementation-plan.md +73 -0
- package/templates/product-acceptance.md +84 -0
- package/templates/product-discovery.md +81 -0
- package/templates/product-spec.md +84 -0
- package/templates/scenario-acceptance.yaml +37 -0
- package/templates/ui-design-contract.md +86 -0
- package/tools/vibe-architecture-check/README.md +66 -0
- package/tools/vibe-architecture-check/index.mjs +691 -0
- package/tools/vibe-compact/README.md +65 -0
- package/tools/vibe-compact/compact-contract.mjs +63 -0
- package/tools/vibe-compact/index.mjs +111 -0
- package/tools/vibe-doctor/README.md +200 -0
- package/tools/vibe-doctor/index.mjs +1721 -0
- package/tools/vibe-init/README.md +231 -0
- package/tools/vibe-init/index.mjs +369 -0
- package/tools/vibe-init/init-cli-args.mjs +100 -0
- package/tools/vibe-init/init-entry-merge-model.mjs +33 -0
- package/tools/vibe-init/init-install-manifest-model.mjs +137 -0
- package/tools/vibe-init/init-installed-agent-experience-contract.mjs +172 -0
- package/tools/vibe-init/init-platform-model.mjs +11 -0
- package/tools/vibe-init/init-presentation.mjs +149 -0
- package/tools/vibe-lifecycle/README.md +37 -0
- package/tools/vibe-lifecycle/index.mjs +365 -0
- package/tools/vibe-lifecycle/lifecycle-cli-args.mjs +104 -0
- package/tools/vibe-lifecycle/lifecycle-summary-model.mjs +67 -0
- package/tools/vibe-lifecycle/lifecycle-uninstall-plan-model.mjs +11 -0
- package/tools/vibe-plugin-pack/README.md +105 -0
- package/tools/vibe-plugin-pack/index.mjs +302 -0
- package/tools/vibe-plugin-pack/plugin-pack-cli.mjs +39 -0
- package/tools/vibe-plugin-pack/plugin-pack-manifest.mjs +37 -0
- package/tools/vibe-profile/index.mjs +212 -0
- package/tools/vibe-release-check/README.md +123 -0
- package/tools/vibe-release-check/command-manifest/release-check-base-commands.mjs +23 -0
- package/tools/vibe-release-check/command-manifest/release-check-closeout-commands.mjs +16 -0
- package/tools/vibe-release-check/command-manifest/release-check-command-metadata.mjs +32 -0
- package/tools/vibe-release-check/command-manifest/release-check-completion-commands.mjs +41 -0
- package/tools/vibe-release-check/command-manifest/release-check-full-chain-commands.mjs +12 -0
- package/tools/vibe-release-check/command-manifest/release-check-golden-path-commands.mjs +12 -0
- package/tools/vibe-release-check/command-manifest/release-check-install-commands.mjs +26 -0
- package/tools/vibe-release-check/command-manifest/release-check-learning-smoke-commands.mjs +21 -0
- package/tools/vibe-release-check/command-manifest/release-check-methodology-commands.mjs +27 -0
- package/tools/vibe-release-check/command-manifest/release-check-runtime-smoke-commands.mjs +116 -0
- package/tools/vibe-release-check/command-manifest/release-check-token-smoke-commands.mjs +21 -0
- package/tools/vibe-release-check/index.mjs +223 -0
- package/tools/vibe-release-check/release-check-behavior-smoke.mjs +177 -0
- package/tools/vibe-release-check/release-check-cli.mjs +37 -0
- package/tools/vibe-release-check/release-check-command-manifest.mjs +49 -0
- package/tools/vibe-release-check/release-check-completion-fixtures.mjs +151 -0
- package/tools/vibe-release-check/release-check-completion-suite.mjs +110 -0
- package/tools/vibe-release-check/release-check-dispatch.mjs +116 -0
- package/tools/vibe-release-check/release-check-full-chain-suite.mjs +55 -0
- package/tools/vibe-release-check/release-check-golden-path-suite.mjs +85 -0
- package/tools/vibe-release-check/release-check-install-marker-specs.mjs +133 -0
- package/tools/vibe-release-check/release-check-install-suite.mjs +112 -0
- package/tools/vibe-release-check/release-check-json-assertion-helpers.mjs +157 -0
- package/tools/vibe-release-check/release-check-json-markers.mjs +33 -0
- package/tools/vibe-release-check/release-check-learning-fixture-specs.mjs +199 -0
- package/tools/vibe-release-check/release-check-learning-suite.mjs +249 -0
- package/tools/vibe-release-check/release-check-live-behavior-smoke-fixture.mjs +406 -0
- package/tools/vibe-release-check/release-check-methodology-suite.mjs +108 -0
- package/tools/vibe-release-check/release-check-package-boundary-smoke.mjs +111 -0
- package/tools/vibe-release-check/release-check-platform-transcript-smoke-fixture.mjs +150 -0
- package/tools/vibe-release-check/release-check-readonly-marker-data.mjs +1 -0
- package/tools/vibe-release-check/release-check-readonly-marker-smoke-specs.mjs +170 -0
- package/tools/vibe-release-check/release-check-run-summary.mjs +67 -0
- package/tools/vibe-release-check/release-check-runtime-automation-fixtures.mjs +1 -0
- package/tools/vibe-release-check/release-check-runtime-automation-governance-reply-trace-smoke-helpers.mjs +224 -0
- package/tools/vibe-release-check/release-check-runtime-automation-governance-smoke-specs.mjs +215 -0
- package/tools/vibe-release-check/release-check-runtime-automation-governance-suite.mjs +5 -0
- package/tools/vibe-release-check/release-check-runtime-automation-methodology-smoke-specs.mjs +157 -0
- package/tools/vibe-release-check/release-check-runtime-automation-methodology-suite.mjs +130 -0
- package/tools/vibe-release-check/release-check-runtime-automation-platform-smoke-helpers.mjs +306 -0
- package/tools/vibe-release-check/release-check-runtime-automation-platform-suite.mjs +30 -0
- package/tools/vibe-release-check/release-check-runtime-automation-smoke-fixtures.mjs +53 -0
- package/tools/vibe-release-check/release-check-runtime-automation-source-candidate-smoke-helpers.mjs +506 -0
- package/tools/vibe-release-check/release-check-runtime-automation-source-suite.mjs +5 -0
- package/tools/vibe-release-check/release-check-runtime-automation-subagents-lifecycle-smoke-helpers.mjs +305 -0
- package/tools/vibe-release-check/release-check-runtime-automation-subagents-suite.mjs +25 -0
- package/tools/vibe-release-check/release-check-runtime-automation-suite.mjs +25 -0
- package/tools/vibe-release-check/release-check-runtime-daemon-bounded-run-smoke-helpers.mjs +243 -0
- package/tools/vibe-release-check/release-check-runtime-daemon-suite.mjs +5 -0
- package/tools/vibe-release-check/release-check-runtime-dispatch-fixtures.mjs +129 -0
- package/tools/vibe-release-check/release-check-runtime-dispatch-suite.mjs +5 -0
- package/tools/vibe-release-check/release-check-runtime-execution-approval-smoke-helpers.mjs +274 -0
- package/tools/vibe-release-check/release-check-runtime-execution-approval-suite.mjs +5 -0
- package/tools/vibe-release-check/release-check-runtime-execution-base-suite.mjs +388 -0
- package/tools/vibe-release-check/release-check-runtime-execution-recovery-suite.mjs +412 -0
- package/tools/vibe-release-check/release-check-runtime-execution-scheduler-suite.mjs +261 -0
- package/tools/vibe-release-check/release-check-runtime-execution-suite.mjs +11 -0
- package/tools/vibe-release-check/release-check-runtime-flow-smoke.mjs +347 -0
- package/tools/vibe-release-check/release-check-runtime-handoff-fixture-specs.mjs +211 -0
- package/tools/vibe-release-check/release-check-runtime-handoff-fixtures.mjs +11 -0
- package/tools/vibe-release-check/release-check-runtime-handoff-smoke-specs.mjs +86 -0
- package/tools/vibe-release-check/release-check-runtime-handoff-suite.mjs +316 -0
- package/tools/vibe-release-check/release-check-runtime-ledger-fixture-specs.mjs +9 -0
- package/tools/vibe-release-check/release-check-runtime-ledger-fixtures.mjs +51 -0
- package/tools/vibe-release-check/release-check-runtime-ledger-suite.mjs +24 -0
- package/tools/vibe-release-check/release-check-runtime-scheduler-fixture-specs.mjs +129 -0
- package/tools/vibe-release-check/release-check-runtime-scheduler-fixtures.mjs +10 -0
- package/tools/vibe-release-check/release-check-runtime-sdd-suite.mjs +535 -0
- package/tools/vibe-release-check/release-check-runtime-smoke-harness.mjs +140 -0
- package/tools/vibe-release-check/release-check-runtime-surface-expectations.mjs +106 -0
- package/tools/vibe-release-check/release-check-runtime-surface-smoke.mjs +112 -0
- package/tools/vibe-release-check/release-check-runtime-task-artifact-suite.mjs +105 -0
- package/tools/vibe-release-check/release-check-runtime-task-fixture-specs.mjs +270 -0
- package/tools/vibe-release-check/release-check-runtime-task-fixtures.mjs +19 -0
- package/tools/vibe-release-check/release-check-runtime.mjs +53 -0
- package/tools/vibe-release-check/release-check-stage103-118-fixtures.mjs +214 -0
- package/tools/vibe-release-check/release-check-stage103-118-smoke-specs.mjs +97 -0
- package/tools/vibe-release-check/release-check-stage103-118-smoke.mjs +861 -0
- package/tools/vibe-release-check/release-check-stage11-smoke.mjs +66 -0
- package/tools/vibe-release-check/release-check-stage119-120-fixture-specs.mjs +119 -0
- package/tools/vibe-release-check/release-check-stage119-120-smoke.mjs +325 -0
- package/tools/vibe-release-check/release-check-stage12-smoke.mjs +59 -0
- package/tools/vibe-release-check/release-check-stage121-136-fixture-specs.mjs +26 -0
- package/tools/vibe-release-check/release-check-stage121-136-fixtures.mjs +591 -0
- package/tools/vibe-release-check/release-check-stage121-136-smoke.mjs +917 -0
- package/tools/vibe-release-check/release-check-stage13-smoke.mjs +78 -0
- package/tools/vibe-release-check/release-check-stage137-140-smoke.mjs +534 -0
- package/tools/vibe-release-check/release-check-stage14-smoke.mjs +101 -0
- package/tools/vibe-release-check/release-check-stage141-148-smoke.mjs +1143 -0
- package/tools/vibe-release-check/release-check-stage15-smoke.mjs +132 -0
- package/tools/vibe-release-check/release-check-stage50-53-smoke.mjs +429 -0
- package/tools/vibe-release-check/release-check-subagent-adapter-bridge-smoke.mjs +162 -0
- package/tools/vibe-release-check/release-check-suite-plan-smoke.mjs +86 -0
- package/tools/vibe-release-check/release-check-suites.mjs +164 -0
- package/tools/vibe-release-check/release-check-test-run-smoke.mjs +59 -0
- package/tools/vibe-release-check/release-check-timing.mjs +98 -0
- package/tools/vibe-release-check/release-check-token-suite.mjs +260 -0
- package/tools/vibe-release-check/release-check-workflow-entry-suite.mjs +195 -0
- package/tools/vibe-release-check/release-check-workflow-governance-fixtures.mjs +138 -0
- package/tools/vibe-release-check/release-check-workflow-governance-smoke-suite.mjs +768 -0
- package/tools/vibe-release-check/release-check-workflow-ux-smoke.mjs +456 -0
- package/tools/vibe-runtime/README.md +2637 -0
- package/tools/vibe-runtime/index.mjs +3117 -0
- package/tools/vibe-runtime/runtime-adapter-bootstrap-matrix.mjs +264 -0
- package/tools/vibe-runtime/runtime-adapter-entry-acceptance.mjs +310 -0
- package/tools/vibe-runtime/runtime-adapter-packaging-consistency-command.mjs +131 -0
- package/tools/vibe-runtime/runtime-adapter-packaging-consistency.mjs +253 -0
- package/tools/vibe-runtime/runtime-advice-hub-model.mjs +175 -0
- package/tools/vibe-runtime/runtime-agent-session-start-contract.mjs +138 -0
- package/tools/vibe-runtime/runtime-artifact-ref-validation.mjs +281 -0
- package/tools/vibe-runtime/runtime-automatic-verification-gate-contract.mjs +134 -0
- package/tools/vibe-runtime/runtime-automation-boundary-text.mjs +7 -0
- package/tools/vibe-runtime/runtime-automation-command.mjs +367 -0
- package/tools/vibe-runtime/runtime-automation-plan-model.mjs +239 -0
- package/tools/vibe-runtime/runtime-automation-policy-model.mjs +175 -0
- package/tools/vibe-runtime/runtime-automation-readiness.mjs +347 -0
- package/tools/vibe-runtime/runtime-autopilot-lab-profile-contract.mjs +223 -0
- package/tools/vibe-runtime/runtime-behavioral-evaluation-contract.mjs +529 -0
- package/tools/vibe-runtime/runtime-behavioral-negative-gate-matrix.mjs +274 -0
- package/tools/vibe-runtime/runtime-bounded-attempt-policy-model.mjs +13 -0
- package/tools/vibe-runtime/runtime-bounded-foreground-command-executor-contract.mjs +288 -0
- package/tools/vibe-runtime/runtime-capability-registry.mjs +250 -0
- package/tools/vibe-runtime/runtime-cli-args.mjs +550 -0
- package/tools/vibe-runtime/runtime-cli-command-specs.mjs +63 -0
- package/tools/vibe-runtime/runtime-cli-dispatch.mjs +21 -0
- package/tools/vibe-runtime/runtime-cli-evidence-option-specs.mjs +193 -0
- package/tools/vibe-runtime/runtime-cli-evidence-options.mjs +28 -0
- package/tools/vibe-runtime/runtime-cli-from-options.mjs +222 -0
- package/tools/vibe-runtime/runtime-cli-low-risk-option-specs.mjs +128 -0
- package/tools/vibe-runtime/runtime-cli-main.mjs +32 -0
- package/tools/vibe-runtime/runtime-cli-option-default-families.mjs +454 -0
- package/tools/vibe-runtime/runtime-cli-option-defaults.mjs +33 -0
- package/tools/vibe-runtime/runtime-cli-option-handlers.mjs +82 -0
- package/tools/vibe-runtime/runtime-cli-usage.mjs +316 -0
- package/tools/vibe-runtime/runtime-cli-value-options.mjs +74 -0
- package/tools/vibe-runtime/runtime-close-loop-dashboard.mjs +283 -0
- package/tools/vibe-runtime/runtime-closeout-parity-contract.mjs +214 -0
- package/tools/vibe-runtime/runtime-command-container.mjs +26 -0
- package/tools/vibe-runtime/runtime-command-surface-registry.mjs +383 -0
- package/tools/vibe-runtime/runtime-command-wrapper-deps.mjs +13 -0
- package/tools/vibe-runtime/runtime-commit-readiness-envelope.mjs +281 -0
- package/tools/vibe-runtime/runtime-completion-boundary-text.mjs +7 -0
- package/tools/vibe-runtime/runtime-completion-bundle-contract.mjs +71 -0
- package/tools/vibe-runtime/runtime-completion-chain-assembly.mjs +48 -0
- package/tools/vibe-runtime/runtime-completion-command.mjs +50 -0
- package/tools/vibe-runtime/runtime-completion-evidence-bundle.mjs +269 -0
- package/tools/vibe-runtime/runtime-completion-evidence-descriptors.mjs +156 -0
- package/tools/vibe-runtime/runtime-completion-local-evidence-gates.mjs +164 -0
- package/tools/vibe-runtime/runtime-completion-presentation.mjs +71 -0
- package/tools/vibe-runtime/runtime-completion-readiness-summary.mjs +159 -0
- package/tools/vibe-runtime/runtime-confirmed-one-shot-plan.mjs +300 -0
- package/tools/vibe-runtime/runtime-context-budget-entry-defaults-command.mjs +77 -0
- package/tools/vibe-runtime/runtime-context-budget-entry-defaults.mjs +341 -0
- package/tools/vibe-runtime/runtime-contract-marker-registry.mjs +13 -0
- package/tools/vibe-runtime/runtime-contributor-guardrail-command.mjs +78 -0
- package/tools/vibe-runtime/runtime-contributor-guardrail-evidence.mjs +319 -0
- package/tools/vibe-runtime/runtime-control-plane-command.mjs +237 -0
- package/tools/vibe-runtime/runtime-control-plane-evals-artifacts.mjs +123 -0
- package/tools/vibe-runtime/runtime-control-plane-evals-boundary-model.mjs +75 -0
- package/tools/vibe-runtime/runtime-control-plane-evals-cases.mjs +547 -0
- package/tools/vibe-runtime/runtime-control-plane-evals-command.mjs +527 -0
- package/tools/vibe-runtime/runtime-control-plane-evals-report-validation.mjs +209 -0
- package/tools/vibe-runtime/runtime-control-plane-planner-artifacts.mjs +457 -0
- package/tools/vibe-runtime/runtime-control-plane-planning-command.mjs +563 -0
- package/tools/vibe-runtime/runtime-control-plane-planning-input.mjs +99 -0
- package/tools/vibe-runtime/runtime-control-plane-planning-listing.mjs +48 -0
- package/tools/vibe-runtime/runtime-control-plane-planning-presentation.mjs +246 -0
- package/tools/vibe-runtime/runtime-control-plane-planning-validation.mjs +529 -0
- package/tools/vibe-runtime/runtime-control-plane-readonly-command.mjs +537 -0
- package/tools/vibe-runtime/runtime-control-plane-readonly-deps.mjs +146 -0
- package/tools/vibe-runtime/runtime-control-plane-release-evidence.mjs +525 -0
- package/tools/vibe-runtime/runtime-control-plane-release-gates.mjs +369 -0
- package/tools/vibe-runtime/runtime-control-plane-router-planning-model.mjs +152 -0
- package/tools/vibe-runtime/runtime-control-plane-routing-artifacts.mjs +588 -0
- package/tools/vibe-runtime/runtime-controlled-change-delivery-contract.mjs +165 -0
- package/tools/vibe-runtime/runtime-controlled-execution-gate-contract.mjs +141 -0
- package/tools/vibe-runtime/runtime-controlled-long-running-automation-contract.mjs +184 -0
- package/tools/vibe-runtime/runtime-controlled-subagent-orchestration-contract.mjs +169 -0
- package/tools/vibe-runtime/runtime-daemon-command.mjs +166 -0
- package/tools/vibe-runtime/runtime-daemon-state-lifecycle-model.mjs +359 -0
- package/tools/vibe-runtime/runtime-delivery-methodology-command.mjs +17 -0
- package/tools/vibe-runtime/runtime-delivery-methodology-gates.mjs +277 -0
- package/tools/vibe-runtime/runtime-diff-coverage-envelope.mjs +301 -0
- package/tools/vibe-runtime/runtime-dispatch-command.mjs +484 -0
- package/tools/vibe-runtime/runtime-dispatch-readonly-artifacts.mjs +406 -0
- package/tools/vibe-runtime/runtime-dispatch-state-lifecycle-model.mjs +199 -0
- package/tools/vibe-runtime/runtime-durable-state-recovery-contract.mjs +172 -0
- package/tools/vibe-runtime/runtime-entry-advice-model.mjs +201 -0
- package/tools/vibe-runtime/runtime-entry-deps-builder.mjs +54 -0
- package/tools/vibe-runtime/runtime-entry-presentation.mjs +82 -0
- package/tools/vibe-runtime/runtime-entry-summary-model.mjs +343 -0
- package/tools/vibe-runtime/runtime-entry-trigger-discipline.mjs +341 -0
- package/tools/vibe-runtime/runtime-entry-trigger-tightening-command.mjs +79 -0
- package/tools/vibe-runtime/runtime-entry-trigger-tightening.mjs +357 -0
- package/tools/vibe-runtime/runtime-eval-catalog-model.mjs +101 -0
- package/tools/vibe-runtime/runtime-eval-transcript-fixtures.mjs +218 -0
- package/tools/vibe-runtime/runtime-evidence-intake-envelope.mjs +278 -0
- package/tools/vibe-runtime/runtime-evidence-repair-model.mjs +180 -0
- package/tools/vibe-runtime/runtime-executable-plan-contract.mjs +428 -0
- package/tools/vibe-runtime/runtime-execution-approval-lifecycle-models.mjs +278 -0
- package/tools/vibe-runtime/runtime-execution-candidate-approval-artifacts.mjs +227 -0
- package/tools/vibe-runtime/runtime-execution-command.mjs +544 -0
- package/tools/vibe-runtime/runtime-execution-enabled-bridge-model.mjs +113 -0
- package/tools/vibe-runtime/runtime-execution-enabled-closeout-boundary.mjs +89 -0
- package/tools/vibe-runtime/runtime-execution-enabled-preflight-model.mjs +185 -0
- package/tools/vibe-runtime/runtime-execution-enabled-profile-contract.mjs +127 -0
- package/tools/vibe-runtime/runtime-execution-enabled-run-envelope.mjs +153 -0
- package/tools/vibe-runtime/runtime-execution-evidence-binder.mjs +537 -0
- package/tools/vibe-runtime/runtime-execution-plan-artifacts.mjs +136 -0
- package/tools/vibe-runtime/runtime-execution-policy-artifacts.mjs +377 -0
- package/tools/vibe-runtime/runtime-execution-presentation.mjs +174 -0
- package/tools/vibe-runtime/runtime-execution-readonly-artifacts.mjs +228 -0
- package/tools/vibe-runtime/runtime-execution-run-preflight-artifacts.mjs +265 -0
- package/tools/vibe-runtime/runtime-execution-safety-artifacts.mjs +131 -0
- package/tools/vibe-runtime/runtime-execution-state-write-lifecycle-model.mjs +99 -0
- package/tools/vibe-runtime/runtime-experience-friction-matrix.mjs +395 -0
- package/tools/vibe-runtime/runtime-experience-learning-pattern.mjs +354 -0
- package/tools/vibe-runtime/runtime-experience-regression-dashboard.mjs +398 -0
- package/tools/vibe-runtime/runtime-experience-upgrade-command.mjs +92 -0
- package/tools/vibe-runtime/runtime-experience-upgrade-prioritizer.mjs +451 -0
- package/tools/vibe-runtime/runtime-foreground-worker-plan.mjs +275 -0
- package/tools/vibe-runtime/runtime-git-diff-read-model.mjs +322 -0
- package/tools/vibe-runtime/runtime-governance-attestation.mjs +304 -0
- package/tools/vibe-runtime/runtime-governance-command.mjs +609 -0
- package/tools/vibe-runtime/runtime-governance-convergence-reports.mjs +601 -0
- package/tools/vibe-runtime/runtime-governance-pr-models.mjs +551 -0
- package/tools/vibe-runtime/runtime-governance-presentation.mjs +67 -0
- package/tools/vibe-runtime/runtime-governance-route-model.mjs +194 -0
- package/tools/vibe-runtime/runtime-governance-surface-reports.mjs +495 -0
- package/tools/vibe-runtime/runtime-hooks-boundary-model.mjs +356 -0
- package/tools/vibe-runtime/runtime-hooks-command.mjs +286 -0
- package/tools/vibe-runtime/runtime-human-completion-evidence-model.mjs +220 -0
- package/tools/vibe-runtime/runtime-human-friendly-aliases.mjs +250 -0
- package/tools/vibe-runtime/runtime-implementation-methodology-command.mjs +17 -0
- package/tools/vibe-runtime/runtime-implementation-methodology-gates.mjs +164 -0
- package/tools/vibe-runtime/runtime-implementation-task-registry.mjs +334 -0
- package/tools/vibe-runtime/runtime-install-experience-command.mjs +120 -0
- package/tools/vibe-runtime/runtime-install-experience-score.mjs +334 -0
- package/tools/vibe-runtime/runtime-installed-multiround-ux-acceptance.mjs +149 -0
- package/tools/vibe-runtime/runtime-interaction-command-domain-registry.mjs +46 -0
- package/tools/vibe-runtime/runtime-interaction-command.mjs +648 -0
- package/tools/vibe-runtime/runtime-interaction-completion-command.mjs +220 -0
- package/tools/vibe-runtime/runtime-interaction-entry-command.mjs +130 -0
- package/tools/vibe-runtime/runtime-interaction-workflow-envelopes.mjs +412 -0
- package/tools/vibe-runtime/runtime-learning-advice-model.mjs +157 -0
- package/tools/vibe-runtime/runtime-learning-artifact-model.mjs +509 -0
- package/tools/vibe-runtime/runtime-learning-audit-model.mjs +106 -0
- package/tools/vibe-runtime/runtime-learning-interaction-command.mjs +220 -0
- package/tools/vibe-runtime/runtime-learning-observation-model.mjs +124 -0
- package/tools/vibe-runtime/runtime-learning-presentation.mjs +84 -0
- package/tools/vibe-runtime/runtime-learning-run-preview-model.mjs +184 -0
- package/tools/vibe-runtime/runtime-lease-command.mjs +95 -0
- package/tools/vibe-runtime/runtime-lease-state-lifecycle-model.mjs +247 -0
- package/tools/vibe-runtime/runtime-list-presentation.mjs +7 -0
- package/tools/vibe-runtime/runtime-live-behavior-transcript-model.mjs +164 -0
- package/tools/vibe-runtime/runtime-local-behavior-eval-contracts-command.mjs +76 -0
- package/tools/vibe-runtime/runtime-local-behavior-eval-contracts.mjs +382 -0
- package/tools/vibe-runtime/runtime-local-commit-automation-gate.mjs +254 -0
- package/tools/vibe-runtime/runtime-local-json-input.mjs +32 -0
- package/tools/vibe-runtime/runtime-methodology-coverage-map.mjs +398 -0
- package/tools/vibe-runtime/runtime-methodology-coverage-marker-specs.mjs +61 -0
- package/tools/vibe-runtime/runtime-methodology-coverage-presentation.mjs +26 -0
- package/tools/vibe-runtime/runtime-methodology-gate-model.mjs +154 -0
- package/tools/vibe-runtime/runtime-methodology-gate-output-envelope.mjs +4 -0
- package/tools/vibe-runtime/runtime-methodology-interaction-command.mjs +147 -0
- package/tools/vibe-runtime/runtime-methodology-presentation.mjs +76 -0
- package/tools/vibe-runtime/runtime-methodology-route-model.mjs +93 -0
- package/tools/vibe-runtime/runtime-next-action-console.mjs +388 -0
- package/tools/vibe-runtime/runtime-next-action-evidence-prompts-command.mjs +84 -0
- package/tools/vibe-runtime/runtime-next-action-evidence-prompts.mjs +327 -0
- package/tools/vibe-runtime/runtime-observability-command.mjs +96 -0
- package/tools/vibe-runtime/runtime-observability-presentation.mjs +30 -0
- package/tools/vibe-runtime/runtime-observability-readiness-model.mjs +204 -0
- package/tools/vibe-runtime/runtime-patch-queue-contract.mjs +151 -0
- package/tools/vibe-runtime/runtime-plan-action-manifest.mjs +334 -0
- package/tools/vibe-runtime/runtime-planner-route-model.mjs +75 -0
- package/tools/vibe-runtime/runtime-platform-acceptance-command.mjs +216 -0
- package/tools/vibe-runtime/runtime-platform-capability-artifacts.mjs +156 -0
- package/tools/vibe-runtime/runtime-platform-capability-model.mjs +105 -0
- package/tools/vibe-runtime/runtime-platform-command.mjs +329 -0
- package/tools/vibe-runtime/runtime-platform-presentation.mjs +78 -0
- package/tools/vibe-runtime/runtime-platform-session-artifacts.mjs +857 -0
- package/tools/vibe-runtime/runtime-platform-transcript-example-pack.mjs +293 -0
- package/tools/vibe-runtime/runtime-platform-transcript-intake-model.mjs +247 -0
- package/tools/vibe-runtime/runtime-platform-transcript-replay-model.mjs +371 -0
- package/tools/vibe-runtime/runtime-policy-catalog.mjs +54 -0
- package/tools/vibe-runtime/runtime-product-methodology-command.mjs +17 -0
- package/tools/vibe-runtime/runtime-product-methodology-gates.mjs +316 -0
- package/tools/vibe-runtime/runtime-progressive-entry-ux.mjs +237 -0
- package/tools/vibe-runtime/runtime-queue-command.mjs +98 -0
- package/tools/vibe-runtime/runtime-queue-state-lifecycle-model.mjs +318 -0
- package/tools/vibe-runtime/runtime-readiness-gate-split.mjs +196 -0
- package/tools/vibe-runtime/runtime-readonly-local-json-output-envelope.mjs +24 -0
- package/tools/vibe-runtime/runtime-recovery-classification-models.mjs +412 -0
- package/tools/vibe-runtime/runtime-recovery-command.mjs +107 -0
- package/tools/vibe-runtime/runtime-recovery-presentation.mjs +65 -0
- package/tools/vibe-runtime/runtime-recovery-state-lifecycle-model.mjs +419 -0
- package/tools/vibe-runtime/runtime-release-command-deps.mjs +4 -0
- package/tools/vibe-runtime/runtime-release-command.mjs +225 -0
- package/tools/vibe-runtime/runtime-release-state-lifecycle-model.mjs +48 -0
- package/tools/vibe-runtime/runtime-reply-artifact-lifecycle-model.mjs +84 -0
- package/tools/vibe-runtime/runtime-reply-command.mjs +488 -0
- package/tools/vibe-runtime/runtime-retry-command.mjs +223 -0
- package/tools/vibe-runtime/runtime-retry-run-gate-model.mjs +151 -0
- package/tools/vibe-runtime/runtime-review-envelope.mjs +449 -0
- package/tools/vibe-runtime/runtime-review-feedback-gate.mjs +160 -0
- package/tools/vibe-runtime/runtime-runbook-executor-preview-contract.mjs +361 -0
- package/tools/vibe-runtime/runtime-scheduler-command.mjs +8 -0
- package/tools/vibe-runtime/runtime-scheduler-risk-artifacts.mjs +775 -0
- package/tools/vibe-runtime/runtime-scheduler-state-lifecycle-model.mjs +53 -0
- package/tools/vibe-runtime/runtime-sdd-consumption-command.mjs +386 -0
- package/tools/vibe-runtime/runtime-sdd-evidence-chain-model.mjs +200 -0
- package/tools/vibe-runtime/runtime-sdd-handoff-chain-model.mjs +168 -0
- package/tools/vibe-runtime/runtime-sdd-implementer-artifact-model.mjs +90 -0
- package/tools/vibe-runtime/runtime-sdd-loop-command.mjs +659 -0
- package/tools/vibe-runtime/runtime-sdd-plan-preflight-model.mjs +121 -0
- package/tools/vibe-runtime/runtime-sdd-review-package-command.mjs +197 -0
- package/tools/vibe-runtime/runtime-sdd-review-package-model.mjs +183 -0
- package/tools/vibe-runtime/runtime-sdd-task-brief-model.mjs +144 -0
- package/tools/vibe-runtime/runtime-self-test-gate-profile.mjs +225 -0
- package/tools/vibe-runtime/runtime-sequential-stage-runbook.mjs +406 -0
- package/tools/vibe-runtime/runtime-session-checkpoint-model.mjs +217 -0
- package/tools/vibe-runtime/runtime-session-skill-command.mjs +241 -0
- package/tools/vibe-runtime/runtime-session-start-example-command.mjs +122 -0
- package/tools/vibe-runtime/runtime-session-start-example-pack.mjs +290 -0
- package/tools/vibe-runtime/runtime-session-start-shape-acceptance.mjs +344 -0
- package/tools/vibe-runtime/runtime-skill-contract-schema.mjs +221 -0
- package/tools/vibe-runtime/runtime-skill-route-registry.mjs +47 -0
- package/tools/vibe-runtime/runtime-skill-runtime-traceability-map.mjs +268 -0
- package/tools/vibe-runtime/runtime-source-merge-apply-boundary-model.mjs +130 -0
- package/tools/vibe-runtime/runtime-source-merge-artifacts.mjs +920 -0
- package/tools/vibe-runtime/runtime-source-merge-command.mjs +160 -0
- package/tools/vibe-runtime/runtime-source-merge-entry-command.mjs +153 -0
- package/tools/vibe-runtime/runtime-source-patch-plan-model.mjs +119 -0
- package/tools/vibe-runtime/runtime-stage-scriptlet.mjs +430 -0
- package/tools/vibe-runtime/runtime-staged-commit-readiness.mjs +469 -0
- package/tools/vibe-runtime/runtime-state-directory-model.mjs +7 -0
- package/tools/vibe-runtime/runtime-state-io.mjs +41 -0
- package/tools/vibe-runtime/runtime-state-paths.mjs +231 -0
- package/tools/vibe-runtime/runtime-state-presence-model.mjs +6 -0
- package/tools/vibe-runtime/runtime-state-risk-paths.mjs +70 -0
- package/tools/vibe-runtime/runtime-subagent-adapter-dispatch-command.mjs +266 -0
- package/tools/vibe-runtime/runtime-subagent-boundary-contracts.mjs +118 -0
- package/tools/vibe-runtime/runtime-subagent-permission-command.mjs +78 -0
- package/tools/vibe-runtime/runtime-subagent-permission-gate-model.mjs +131 -0
- package/tools/vibe-runtime/runtime-subagent-permission-visibility.mjs +294 -0
- package/tools/vibe-runtime/runtime-subagents-artifact-specs.mjs +257 -0
- package/tools/vibe-runtime/runtime-subagents-command.mjs +10 -0
- package/tools/vibe-runtime/runtime-subagents-eligibility-model.mjs +340 -0
- package/tools/vibe-runtime/runtime-subagents-platform-session-proxies.mjs +54 -0
- package/tools/vibe-runtime/runtime-subagents-presentation.mjs +91 -0
- package/tools/vibe-runtime/runtime-subagents-risk-artifacts.mjs +853 -0
- package/tools/vibe-runtime/runtime-subagents-stage-artifact-model.mjs +538 -0
- package/tools/vibe-runtime/runtime-subagents-tail-routing-model.mjs +48 -0
- package/tools/vibe-runtime/runtime-suite-plan-model.mjs +194 -0
- package/tools/vibe-runtime/runtime-superpowers-comparison-matrix.mjs +399 -0
- package/tools/vibe-runtime/runtime-superpowers-gap-matrix.mjs +307 -0
- package/tools/vibe-runtime/runtime-superpowers-parity-command.mjs +102 -0
- package/tools/vibe-runtime/runtime-superpowers-parity-profile-contract.mjs +183 -0
- package/tools/vibe-runtime/runtime-superpowers-parity-scorecard.mjs +460 -0
- package/tools/vibe-runtime/runtime-superpowers-regression-guard.mjs +270 -0
- package/tools/vibe-runtime/runtime-superpowers-style-eval-pack.mjs +367 -0
- package/tools/vibe-runtime/runtime-task-commit-gates.mjs +62 -0
- package/tools/vibe-runtime/runtime-task-commit-readiness.mjs +66 -0
- package/tools/vibe-runtime/runtime-task-commit-sidecar.mjs +65 -0
- package/tools/vibe-runtime/runtime-tdd-trace-contract.mjs +277 -0
- package/tools/vibe-runtime/runtime-test-evidence-model.mjs +196 -0
- package/tools/vibe-runtime/runtime-test-run-command-deps.mjs +7 -0
- package/tools/vibe-runtime/runtime-test-run-command.mjs +108 -0
- package/tools/vibe-runtime/runtime-token-economy-model.mjs +336 -0
- package/tools/vibe-runtime/runtime-token-interaction-command.mjs +381 -0
- package/tools/vibe-runtime/runtime-token-savior-budget.mjs +370 -0
- package/tools/vibe-runtime/runtime-tokens-command-deps.mjs +17 -0
- package/tools/vibe-runtime/runtime-tokens-command.mjs +117 -0
- package/tools/vibe-runtime/runtime-tokens-presentation.mjs +45 -0
- package/tools/vibe-runtime/runtime-trace-command.mjs +283 -0
- package/tools/vibe-runtime/runtime-trace-source-registry.mjs +132 -0
- package/tools/vibe-runtime/runtime-verification-gate-chain-model.mjs +131 -0
- package/tools/vibe-runtime/runtime-verification-repair-loop-plan.mjs +188 -0
- package/tools/vibe-runtime/runtime-workflow-alias-boundary-text.mjs +7 -0
- package/tools/vibe-runtime/runtime-workflow-alias-interaction-command.mjs +145 -0
- package/tools/vibe-runtime/runtime-workflow-command-deps.mjs +41 -0
- package/tools/vibe-runtime/runtime-workflow-command.mjs +191 -0
- package/tools/vibe-runtime/runtime-workflow-discipline-summary.mjs +164 -0
- package/tools/vibe-runtime/runtime-workflow-entry-envelopes.mjs +156 -0
- package/tools/vibe-runtime/runtime-workflow-ledger-command.mjs +239 -0
- package/tools/vibe-runtime/runtime-workflow-ledger-state-lifecycle-model.mjs +46 -0
- package/tools/vibe-runtime/runtime-workflow-loop-contract.mjs +259 -0
- package/tools/vibe-runtime/runtime-workflow-next-step-gate-model.mjs +106 -0
- package/tools/vibe-runtime/runtime-workflow-presentation.mjs +355 -0
- package/tools/vibe-runtime/runtime-workflow-readiness-model.mjs +176 -0
- package/tools/vibe-runtime/runtime-workflow-run-plan-model.mjs +207 -0
- package/tools/vibe-runtime/runtime-workflow-start-model.mjs +229 -0
- package/tools/vibe-runtime/runtime-workflow-state-artifacts.mjs +381 -0
- package/tools/vibe-runtime/runtime-workflow-state-helpers.mjs +456 -0
- package/tools/vibe-runtime/runtime-workflow-state-summary.mjs +65 -0
- package/tools/vibe-runtime/runtime-workflow-state-validation.mjs +104 -0
- package/tools/vibe-runtime/runtime-workflow-ux-model.mjs +205 -0
- package/tools/vibe-runtime/runtime-workspace-boundary-text.mjs +7 -0
- package/tools/vibe-runtime/runtime-workspace-isolation-command.mjs +295 -0
- package/tools/vibe-runtime/state-core-paths.mjs +113 -0
- package/tools/vibe-runtime/state-extension-paths.mjs +198 -0
- package/tools/vibe-runtime/state-safe-paths.mjs +2 -0
- package/tools/vibe-runtime-check/README.md +110 -0
- package/tools/vibe-runtime-check/architecture-tool-contracts.mjs +150 -0
- package/tools/vibe-runtime-check/index.mjs +186 -0
- package/tools/vibe-runtime-check/install-summary-adoption-contracts.mjs +115 -0
- package/tools/vibe-runtime-check/marker-contract-core.mjs +20 -0
- package/tools/vibe-runtime-check/product-artifact-contracts.mjs +24 -0
- package/tools/vibe-runtime-check/release-check-install-placement-contracts.mjs +166 -0
- package/tools/vibe-runtime-check/release-runtime-suite-layer-contracts.mjs +137 -0
- package/tools/vibe-runtime-check/runtime-architecture-manifest-drift-contracts.mjs +128 -0
- package/tools/vibe-runtime-check/runtime-automation-readiness-contracts.mjs +404 -0
- package/tools/vibe-runtime-check/runtime-capability-registry-contracts.mjs +299 -0
- package/tools/vibe-runtime-check/runtime-check-diagnostics-presentation.mjs +71 -0
- package/tools/vibe-runtime-check/runtime-cli-surface-contracts.mjs +156 -0
- package/tools/vibe-runtime-check/runtime-close-loop-contracts.mjs +163 -0
- package/tools/vibe-runtime-check/runtime-contract-delivery-registry.mjs +19 -0
- package/tools/vibe-runtime-check/runtime-contract-implementation-registry.mjs +23 -0
- package/tools/vibe-runtime-check/runtime-contract-local-evidence-registry.mjs +43 -0
- package/tools/vibe-runtime-check/runtime-contract-product-registry.mjs +83 -0
- package/tools/vibe-runtime-check/runtime-contract-registry.mjs +19 -0
- package/tools/vibe-runtime-check/runtime-control-plane-contracts.mjs +14 -0
- package/tools/vibe-runtime-check/runtime-doc-contract-marker-specs.mjs +349 -0
- package/tools/vibe-runtime-check/runtime-doc-contracts.mjs +24 -0
- package/tools/vibe-runtime-check/runtime-doc-marker-contracts.mjs +25 -0
- package/tools/vibe-runtime-check/runtime-entry-size-contracts.mjs +477 -0
- package/tools/vibe-runtime-check/runtime-experience-cli-contract-specs.mjs +98 -0
- package/tools/vibe-runtime-check/runtime-experience-cli-contracts.mjs +12 -0
- package/tools/vibe-runtime-check/runtime-experience-contracts.mjs +187 -0
- package/tools/vibe-runtime-check/runtime-governance-learning-token-contract-specs.mjs +92 -0
- package/tools/vibe-runtime-check/runtime-governance-learning-token-contracts.mjs +12 -0
- package/tools/vibe-runtime-check/runtime-high-risk-boundary-contracts.mjs +35 -0
- package/tools/vibe-runtime-check/runtime-high-risk-boundary-matrix.mjs +75 -0
- package/tools/vibe-runtime-check/runtime-index-import-boundary-contracts.mjs +192 -0
- package/tools/vibe-runtime-check/runtime-optimization-boundary-contracts.mjs +49 -0
- package/tools/vibe-runtime-check/runtime-pure-model-boundary-contracts.mjs +176 -0
- package/tools/vibe-runtime-check/runtime-release-closeout-contracts.mjs +25 -0
- package/tools/vibe-runtime-check/runtime-roadmap-marker-specs.mjs +559 -0
- package/tools/vibe-runtime-check/runtime-source-bundle.mjs +119 -0
- package/tools/vibe-runtime-check/runtime-tool-readme-contracts.mjs +93 -0
- package/tools/vibe-runtime-check/runtime-tool-readme-marker-specs.mjs +952 -0
- package/tools/vibe-runtime-check/workflow-skill-contracts.mjs +129 -0
- package/tools/vibe-runtime-check/workflow-skill-route-registry-contracts.mjs +106 -0
- package/tools/vibe-runtime-check/workflow-ux-contracts.mjs +46 -0
|
@@ -0,0 +1,1721 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import process from 'node:process';
|
|
6
|
+
import { spawnSync } from 'node:child_process';
|
|
7
|
+
import {
|
|
8
|
+
runtimeCliSurfaceFiles,
|
|
9
|
+
runtimeRequiredToolFiles,
|
|
10
|
+
} from '../vibe-runtime/runtime-command-surface-registry.mjs';
|
|
11
|
+
import { createSourceTextReader } from '../vibe-runtime-check/runtime-source-bundle.mjs';
|
|
12
|
+
import { runtimeDocContractMarkerSpecs } from '../vibe-runtime-check/runtime-doc-contract-marker-specs.mjs';
|
|
13
|
+
import {
|
|
14
|
+
runtimeToolCliSurfaceMarkerSpecs,
|
|
15
|
+
runtimeToolReadmeMarkerSpecs,
|
|
16
|
+
} from '../vibe-runtime-check/runtime-tool-readme-marker-specs.mjs';
|
|
17
|
+
|
|
18
|
+
const installedBase = '.vibecoding';
|
|
19
|
+
const runtimeManifestFile = `${installedBase}/runtime-installed.json`;
|
|
20
|
+
const installConfigFile = `${installedBase}/config.json`;
|
|
21
|
+
|
|
22
|
+
const skillFiles = [
|
|
23
|
+
'skills/using-vibecoding/SKILL.md',
|
|
24
|
+
'skills/vibe-brainstorming/SKILL.md',
|
|
25
|
+
'skills/vibe-product-discovery/SKILL.md',
|
|
26
|
+
'skills/vibe-product-spec/SKILL.md',
|
|
27
|
+
'skills/vibe-ui-design/SKILL.md',
|
|
28
|
+
'skills/vibe-planning/SKILL.md',
|
|
29
|
+
'skills/vibe-writing-skills/SKILL.md',
|
|
30
|
+
'skills/vibe-writing-plans/SKILL.md',
|
|
31
|
+
'skills/vibe-workspace-isolation/SKILL.md',
|
|
32
|
+
'skills/vibe-subagent-driven-development/SKILL.md',
|
|
33
|
+
'skills/vibe-dispatching-parallel-work/SKILL.md',
|
|
34
|
+
'skills/vibe-test-driven-development/SKILL.md',
|
|
35
|
+
'skills/vibe-executing-plans/SKILL.md',
|
|
36
|
+
'skills/vibe-product-acceptance/SKILL.md',
|
|
37
|
+
'skills/vibe-debugging/SKILL.md',
|
|
38
|
+
'skills/vibe-systematic-debugging/SKILL.md',
|
|
39
|
+
'skills/vibe-implementation/SKILL.md',
|
|
40
|
+
'skills/vibe-requesting-code-review/SKILL.md',
|
|
41
|
+
'skills/vibe-review/SKILL.md',
|
|
42
|
+
'skills/vibe-receiving-code-review/SKILL.md',
|
|
43
|
+
'skills/vibe-verification/SKILL.md',
|
|
44
|
+
'skills/vibe-verification-before-completion/SKILL.md',
|
|
45
|
+
'skills/vibe-finishing-a-development-branch/SKILL.md',
|
|
46
|
+
'skills/vibe-context-compact/SKILL.md',
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const workflowSkillFiles = skillFiles.filter((file) => !file.includes('using-vibecoding'));
|
|
50
|
+
|
|
51
|
+
const platformNames = ['claude', 'codex', 'cursor', 'opencode', 'pi'];
|
|
52
|
+
|
|
53
|
+
const platformAdapterFiles = {
|
|
54
|
+
claude: [
|
|
55
|
+
'adapters/claude/plugin.json',
|
|
56
|
+
'adapters/claude/install.md',
|
|
57
|
+
'adapters/claude/settings.example.json',
|
|
58
|
+
],
|
|
59
|
+
codex: [
|
|
60
|
+
'adapters/codex/plugin.json',
|
|
61
|
+
'adapters/codex/hooks.example.json',
|
|
62
|
+
'adapters/codex/install.md',
|
|
63
|
+
],
|
|
64
|
+
cursor: [
|
|
65
|
+
'adapters/cursor/plugin.json',
|
|
66
|
+
'adapters/cursor/hooks.example.json',
|
|
67
|
+
'adapters/cursor/install.md',
|
|
68
|
+
],
|
|
69
|
+
opencode: [
|
|
70
|
+
'adapters/opencode/plugin.json',
|
|
71
|
+
'adapters/opencode/plugin.js',
|
|
72
|
+
'adapters/opencode/install.md',
|
|
73
|
+
],
|
|
74
|
+
pi: [
|
|
75
|
+
'adapters/pi/plugin.json',
|
|
76
|
+
'adapters/pi/extension.ts',
|
|
77
|
+
'adapters/pi/install.md',
|
|
78
|
+
],
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const platformEntryFiles = {
|
|
82
|
+
claude: ['CLAUDE.md'],
|
|
83
|
+
codex: ['AGENTS.md'],
|
|
84
|
+
cursor: ['AGENTS.md'],
|
|
85
|
+
opencode: [],
|
|
86
|
+
pi: [],
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const docs = [
|
|
90
|
+
'docs/phase-1-implementation.md',
|
|
91
|
+
'docs/phase-2-roadmap.md',
|
|
92
|
+
'docs/install-experience-roadmap.md',
|
|
93
|
+
'docs/runtime-roadmap.md',
|
|
94
|
+
'docs/runtime-contract.md',
|
|
95
|
+
'docs/workflow-chaining.md',
|
|
96
|
+
'docs/golden-path.md',
|
|
97
|
+
'docs/install.md',
|
|
98
|
+
'docs/user-guide.md',
|
|
99
|
+
'docs/team-adoption.md',
|
|
100
|
+
'docs/evidence-authoring.md',
|
|
101
|
+
'docs/ci-evidence-onboarding.md',
|
|
102
|
+
'docs/readiness-interpretation.md',
|
|
103
|
+
'docs/readiness-troubleshooting.md',
|
|
104
|
+
'docs/acceptance-checklist.md',
|
|
105
|
+
'docs/release-guide.md',
|
|
106
|
+
'docs/submodule-guide.md',
|
|
107
|
+
'docs/install-claude.md',
|
|
108
|
+
'docs/install-codex.md',
|
|
109
|
+
'docs/install-cursor.md',
|
|
110
|
+
'docs/skill-authoring-guide.md',
|
|
111
|
+
];
|
|
112
|
+
|
|
113
|
+
const repoGuideFiles = {
|
|
114
|
+
'README.md': [
|
|
115
|
+
'tools/vibe-init/README.md',
|
|
116
|
+
'tools/vibe-doctor/README.md',
|
|
117
|
+
'tools/vibe-plugin-pack/README.md',
|
|
118
|
+
'tools/vibe-runtime-check/README.md',
|
|
119
|
+
'tools/vibe-runtime/README.md',
|
|
120
|
+
'docs/runtime-roadmap.md',
|
|
121
|
+
'docs/runtime-contract.md',
|
|
122
|
+
'docs/golden-path.md',
|
|
123
|
+
'docs/evidence-authoring.md',
|
|
124
|
+
'docs/ci-evidence-onboarding.md',
|
|
125
|
+
'docs/readiness-interpretation.md',
|
|
126
|
+
'docs/readiness-troubleshooting.md',
|
|
127
|
+
'docs/acceptance-checklist.md',
|
|
128
|
+
'docs/release-guide.md',
|
|
129
|
+
'docs/install-experience-roadmap.md',
|
|
130
|
+
],
|
|
131
|
+
'docs/release-guide.md': [
|
|
132
|
+
'docs/acceptance-checklist.md',
|
|
133
|
+
'docs/submodule-guide.md',
|
|
134
|
+
'docs/install-experience-roadmap.md',
|
|
135
|
+
'docs/runtime-roadmap.md',
|
|
136
|
+
'docs/runtime-contract.md',
|
|
137
|
+
'tools/vibe-plugin-pack/index.mjs',
|
|
138
|
+
'tools/vibe-release-check/index.mjs',
|
|
139
|
+
],
|
|
140
|
+
'docs/acceptance-checklist.md': [
|
|
141
|
+
'docs/phase-2-roadmap.md',
|
|
142
|
+
'docs/install-experience-roadmap.md',
|
|
143
|
+
'docs/submodule-guide.md',
|
|
144
|
+
'tools/vibe-plugin-pack/index.mjs',
|
|
145
|
+
'tools/vibe-runtime-check/index.mjs',
|
|
146
|
+
'tools/vibe-runtime/index.mjs',
|
|
147
|
+
'tools/vibe-release-check/index.mjs',
|
|
148
|
+
],
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const submodulePaths = [
|
|
152
|
+
'fork/distill',
|
|
153
|
+
'fork/ECC',
|
|
154
|
+
'fork/superpowers',
|
|
155
|
+
'fork/token-savior',
|
|
156
|
+
];
|
|
157
|
+
|
|
158
|
+
const entryTemplateFiles = [
|
|
159
|
+
'templates/CLAUDE.md',
|
|
160
|
+
'templates/AGENTS.md',
|
|
161
|
+
];
|
|
162
|
+
|
|
163
|
+
const installedRulesTemplateFiles = [
|
|
164
|
+
'templates/VIBE-CODING.md',
|
|
165
|
+
];
|
|
166
|
+
|
|
167
|
+
const productArtifactTemplateFiles = [
|
|
168
|
+
'templates/product-discovery.md',
|
|
169
|
+
'templates/product-spec.md',
|
|
170
|
+
'templates/ui-design-contract.md',
|
|
171
|
+
'templates/product-acceptance.md',
|
|
172
|
+
'templates/scenario-acceptance.yaml',
|
|
173
|
+
'templates/architecture-design.md',
|
|
174
|
+
'templates/delivery-traceability.yaml',
|
|
175
|
+
'templates/implementation-plan.md',
|
|
176
|
+
];
|
|
177
|
+
|
|
178
|
+
const evidenceTemplateGuideFiles = [
|
|
179
|
+
'templates/evidence/README.md',
|
|
180
|
+
];
|
|
181
|
+
|
|
182
|
+
const evidenceTemplateFiles = [
|
|
183
|
+
'templates/evidence/test-evidence.json',
|
|
184
|
+
'templates/evidence/diff-coverage.json',
|
|
185
|
+
];
|
|
186
|
+
|
|
187
|
+
const templateFiles = [
|
|
188
|
+
...entryTemplateFiles,
|
|
189
|
+
...installedRulesTemplateFiles,
|
|
190
|
+
...productArtifactTemplateFiles,
|
|
191
|
+
...evidenceTemplateGuideFiles,
|
|
192
|
+
...evidenceTemplateFiles,
|
|
193
|
+
];
|
|
194
|
+
|
|
195
|
+
const toolFiles = [
|
|
196
|
+
'bin/vibe.mjs',
|
|
197
|
+
'tools/vibe-init/README.md',
|
|
198
|
+
'tools/vibe-doctor/README.md',
|
|
199
|
+
'tools/vibe-lifecycle/index.mjs',
|
|
200
|
+
'tools/vibe-lifecycle/README.md',
|
|
201
|
+
'tools/vibe-plugin-pack/index.mjs',
|
|
202
|
+
'tools/vibe-plugin-pack/README.md',
|
|
203
|
+
'tools/vibe-compact/index.mjs',
|
|
204
|
+
'tools/vibe-compact/README.md',
|
|
205
|
+
'tools/vibe-runtime-check/index.mjs',
|
|
206
|
+
'tools/vibe-runtime-check/runtime-contract-registry.mjs',
|
|
207
|
+
'tools/vibe-runtime-check/runtime-contract-product-registry.mjs',
|
|
208
|
+
'tools/vibe-runtime-check/runtime-contract-delivery-registry.mjs',
|
|
209
|
+
'tools/vibe-runtime-check/runtime-contract-implementation-registry.mjs',
|
|
210
|
+
'tools/vibe-runtime-check/runtime-contract-local-evidence-registry.mjs',
|
|
211
|
+
'tools/vibe-runtime-check/product-artifact-contracts.mjs',
|
|
212
|
+
'tools/vibe-runtime-check/README.md',
|
|
213
|
+
'tools/vibe-architecture-check/index.mjs',
|
|
214
|
+
'tools/vibe-architecture-check/README.md',
|
|
215
|
+
...runtimeRequiredToolFiles,
|
|
216
|
+
'tools/vibe-release-check/index.mjs',
|
|
217
|
+
'tools/vibe-release-check/release-check-runtime.mjs',
|
|
218
|
+
'tools/vibe-release-check/release-check-json-markers.mjs',
|
|
219
|
+
'tools/vibe-release-check/release-check-workflow-ux-smoke.mjs',
|
|
220
|
+
'tools/vibe-release-check/release-check-completion-suite.mjs',
|
|
221
|
+
'tools/vibe-release-check/release-check-runtime-ledger-suite.mjs',
|
|
222
|
+
'tools/vibe-release-check/release-check-runtime-ledger-fixtures.mjs',
|
|
223
|
+
'tools/vibe-release-check/release-check-runtime-handoff-fixtures.mjs',
|
|
224
|
+
'tools/vibe-release-check/release-check-runtime-task-fixtures.mjs',
|
|
225
|
+
'tools/vibe-release-check/release-check-runtime-dispatch-fixtures.mjs',
|
|
226
|
+
'tools/vibe-release-check/release-check-runtime-scheduler-fixtures.mjs',
|
|
227
|
+
'tools/vibe-release-check/release-check-runtime-scheduler-fixture-specs.mjs',
|
|
228
|
+
'tools/vibe-release-check/release-check-runtime-handoff-suite.mjs',
|
|
229
|
+
'tools/vibe-release-check/release-check-runtime-task-artifact-suite.mjs',
|
|
230
|
+
'tools/vibe-release-check/release-check-runtime-dispatch-suite.mjs',
|
|
231
|
+
'tools/vibe-release-check/release-check-runtime-execution-suite.mjs',
|
|
232
|
+
'tools/vibe-release-check/release-check-runtime-execution-base-suite.mjs',
|
|
233
|
+
'tools/vibe-release-check/release-check-runtime-execution-approval-suite.mjs',
|
|
234
|
+
'tools/vibe-release-check/release-check-runtime-execution-scheduler-suite.mjs',
|
|
235
|
+
'tools/vibe-release-check/release-check-runtime-execution-recovery-suite.mjs',
|
|
236
|
+
'tools/vibe-release-check/release-check-runtime-daemon-suite.mjs',
|
|
237
|
+
'tools/vibe-release-check/release-check-runtime-automation-suite.mjs',
|
|
238
|
+
'tools/vibe-release-check/release-check-runtime-automation-fixtures.mjs',
|
|
239
|
+
'tools/vibe-release-check/release-check-runtime-automation-methodology-suite.mjs',
|
|
240
|
+
'tools/vibe-release-check/release-check-runtime-automation-subagents-suite.mjs',
|
|
241
|
+
'tools/vibe-release-check/release-check-runtime-automation-platform-suite.mjs',
|
|
242
|
+
'tools/vibe-release-check/release-check-runtime-automation-source-suite.mjs',
|
|
243
|
+
'tools/vibe-release-check/release-check-runtime-automation-governance-suite.mjs',
|
|
244
|
+
'tools/vibe-release-check/release-check-full-chain-suite.mjs',
|
|
245
|
+
'tools/vibe-release-check/release-check-golden-path-suite.mjs',
|
|
246
|
+
'tools/vibe-release-check/release-check-methodology-suite.mjs',
|
|
247
|
+
'tools/vibe-release-check/release-check-workflow-entry-suite.mjs',
|
|
248
|
+
'tools/vibe-release-check/release-check-learning-suite.mjs',
|
|
249
|
+
'tools/vibe-release-check/release-check-token-suite.mjs',
|
|
250
|
+
'tools/vibe-release-check/command-manifest/release-check-command-metadata.mjs',
|
|
251
|
+
'tools/vibe-release-check/command-manifest/release-check-full-chain-commands.mjs',
|
|
252
|
+
'tools/vibe-release-check/README.md',
|
|
253
|
+
];
|
|
254
|
+
|
|
255
|
+
const productArtifactFixtureFiles = [
|
|
256
|
+
'examples/runtime-fixtures/product-discovery.md',
|
|
257
|
+
'examples/runtime-fixtures/product-spec.md',
|
|
258
|
+
'examples/runtime-fixtures/ui-design-contract.md',
|
|
259
|
+
'examples/runtime-fixtures/product-acceptance.md',
|
|
260
|
+
'examples/runtime-fixtures/scenario-acceptance.yaml',
|
|
261
|
+
'examples/runtime-fixtures/evidence.json',
|
|
262
|
+
'examples/runtime-fixtures/architecture-design.md',
|
|
263
|
+
'examples/runtime-fixtures/delivery-traceability.yaml',
|
|
264
|
+
'examples/runtime-fixtures/implementation-plan.md',
|
|
265
|
+
'examples/runtime-fixtures/test-evidence.json',
|
|
266
|
+
'examples/runtime-fixtures/diff-coverage.json',
|
|
267
|
+
'examples/runtime-fixtures/commit-readiness.json',
|
|
268
|
+
'examples/runtime-fixtures/negative/delivery-traceability-bad-ref.yaml',
|
|
269
|
+
'examples/runtime-fixtures/negative/test-evidence-missing-output-digest.json',
|
|
270
|
+
'examples/runtime-fixtures/negative/diff-coverage-unexpected-file.json',
|
|
271
|
+
'examples/runtime-fixtures/negative/commit-readiness-boundary-escalated.json',
|
|
272
|
+
'examples/runtime-fixtures/negative/diff-coverage-changed-file-without-task-ref.json',
|
|
273
|
+
'examples/runtime-fixtures/negative/diff-coverage-required-task-missing.json',
|
|
274
|
+
'examples/runtime-fixtures/negative/diff-coverage-operation-mismatch.json',
|
|
275
|
+
'examples/runtime-fixtures/negative/test-evidence-risky-task-missing.json',
|
|
276
|
+
'examples/golden-path/README.md',
|
|
277
|
+
'examples/golden-path/product-spec.md',
|
|
278
|
+
'examples/golden-path/implementation-plan.md',
|
|
279
|
+
'examples/golden-path/test-evidence.json',
|
|
280
|
+
'examples/golden-path/diff-coverage.json',
|
|
281
|
+
'examples/full-chain/README.md',
|
|
282
|
+
'examples/full-chain/product-discovery.md',
|
|
283
|
+
'examples/full-chain/product-spec.md',
|
|
284
|
+
'examples/full-chain/ui-design-contract.md',
|
|
285
|
+
'examples/full-chain/product-acceptance.md',
|
|
286
|
+
'examples/full-chain/scenario-acceptance.yaml',
|
|
287
|
+
'examples/full-chain/evidence.json',
|
|
288
|
+
'examples/full-chain/architecture-design.md',
|
|
289
|
+
'examples/full-chain/delivery-traceability.yaml',
|
|
290
|
+
'examples/full-chain/implementation-plan.md',
|
|
291
|
+
'examples/full-chain/test-evidence.json',
|
|
292
|
+
'examples/full-chain/diff-coverage.json',
|
|
293
|
+
'examples/full-chain/commit-readiness.json',
|
|
294
|
+
];
|
|
295
|
+
|
|
296
|
+
const ciEvidenceExampleFiles = [
|
|
297
|
+
'examples/ci/README.md',
|
|
298
|
+
'examples/ci/ci-evidence-input.example.json',
|
|
299
|
+
'examples/ci/generate-test-evidence.mjs',
|
|
300
|
+
'examples/ci/generate-diff-coverage.mjs',
|
|
301
|
+
'examples/ci/github-actions-readiness.yml',
|
|
302
|
+
];
|
|
303
|
+
|
|
304
|
+
const hookFiles = [
|
|
305
|
+
'hooks/session-start/README.md',
|
|
306
|
+
'hooks/session-start/session-start.md',
|
|
307
|
+
'hooks/session-start/session-start.mjs',
|
|
308
|
+
'hooks/post-tool-compact/README.md',
|
|
309
|
+
'hooks/workflow-handoff/README.md',
|
|
310
|
+
'hooks/workflow-handoff/workflow-handoff.md',
|
|
311
|
+
];
|
|
312
|
+
|
|
313
|
+
const handoffMarkers = [
|
|
314
|
+
'## 下一步调用',
|
|
315
|
+
'## Workflow Handoff',
|
|
316
|
+
'current_skill:',
|
|
317
|
+
'next_skill:',
|
|
318
|
+
'handoff:',
|
|
319
|
+
'stop_condition:',
|
|
320
|
+
];
|
|
321
|
+
|
|
322
|
+
const acceptancePrompts = [
|
|
323
|
+
'我想给这个项目加一个新功能,先帮我规划一下。',
|
|
324
|
+
'这个功能不工作,帮我排查。',
|
|
325
|
+
'实现完成了,帮我确认能不能交付。',
|
|
326
|
+
];
|
|
327
|
+
|
|
328
|
+
const entryFileMarkers = {
|
|
329
|
+
'CLAUDE.md': ['Vibecoding Kit', '.vibecoding/skills/', 'using-vibecoding'],
|
|
330
|
+
'AGENTS.md': ['Vibecoding Kit', '.vibecoding/skills/'],
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
const entryWorkflowMarkers = [
|
|
334
|
+
'vibe-brainstorming',
|
|
335
|
+
'vibe-product-discovery',
|
|
336
|
+
'vibe-product-spec',
|
|
337
|
+
'vibe-ui-design',
|
|
338
|
+
'vibe-writing-skills',
|
|
339
|
+
'vibe-writing-plans',
|
|
340
|
+
'vibe-workspace-isolation',
|
|
341
|
+
'vibe-subagent-driven-development',
|
|
342
|
+
'vibe-dispatching-parallel-work',
|
|
343
|
+
'vibe-test-driven-development',
|
|
344
|
+
'vibe-executing-plans',
|
|
345
|
+
'vibe-product-acceptance',
|
|
346
|
+
'vibe-systematic-debugging',
|
|
347
|
+
'vibe-requesting-code-review',
|
|
348
|
+
'vibe-receiving-code-review',
|
|
349
|
+
'vibe-verification-before-completion',
|
|
350
|
+
'vibe-finishing-a-development-branch',
|
|
351
|
+
];
|
|
352
|
+
|
|
353
|
+
const installedEntryCardMarkers = [
|
|
354
|
+
'受控 agent 沙盒',
|
|
355
|
+
'using-vibecoding',
|
|
356
|
+
'workflow_start.entry_summary',
|
|
357
|
+
'entry_summary.state_gap_is_expected=true',
|
|
358
|
+
'completion_evidence.task_completion_summary',
|
|
359
|
+
'blocked_reasons',
|
|
360
|
+
'readiness gates',
|
|
361
|
+
'不授权自动执行命令',
|
|
362
|
+
'subagent',
|
|
363
|
+
'平台 API',
|
|
364
|
+
'git',
|
|
365
|
+
'push',
|
|
366
|
+
'PR',
|
|
367
|
+
'merge',
|
|
368
|
+
'.vibecoding/VIBE-CODING.md',
|
|
369
|
+
];
|
|
370
|
+
|
|
371
|
+
const installedEntryProtocolMarkers = [
|
|
372
|
+
'默认交互协议',
|
|
373
|
+
'Vibecoding workflow 是任务路由和质量护栏',
|
|
374
|
+
'任务分流',
|
|
375
|
+
'质量底线',
|
|
376
|
+
'升级到完整 workflow 的条件',
|
|
377
|
+
'vibe-brainstorming',
|
|
378
|
+
'vibe-product-discovery',
|
|
379
|
+
'vibe-product-spec',
|
|
380
|
+
'vibe-ui-design',
|
|
381
|
+
'vibe-planning',
|
|
382
|
+
'vibe-writing-plans',
|
|
383
|
+
'vibe-product-acceptance',
|
|
384
|
+
'vibe-systematic-debugging',
|
|
385
|
+
'vibe-verification-before-completion',
|
|
386
|
+
'vibe-finishing-a-development-branch',
|
|
387
|
+
];
|
|
388
|
+
|
|
389
|
+
const managedBlockStartMarker = '<!-- vibecoding:start';
|
|
390
|
+
const managedBlockEndMarker = '<!-- vibecoding:end -->';
|
|
391
|
+
const managedBlockPattern = /<!-- vibecoding:start[^>]*-->[\s\S]*?<!-- vibecoding:end -->/g;
|
|
392
|
+
|
|
393
|
+
function usage() {
|
|
394
|
+
return `Vibecoding Kit Doctor\n\nUsage:\n node tools/vibe-doctor/index.mjs [root]\n node tools/vibe-doctor/index.mjs --workflow-entry [root]\n\nOptions:\n --workflow-entry Run Stage 95 workflow entry health checks only.\n --help, -h Show this help.\n\nChecks a Vibecoding Kit source repo or an installed business project layout.\n`;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
function parseArgs(argv) {
|
|
398
|
+
const options = { help: false, workflowEntry: false, root: process.cwd() };
|
|
399
|
+
const positional = [];
|
|
400
|
+
|
|
401
|
+
for (const arg of argv) {
|
|
402
|
+
if (arg === '--help' || arg === '-h') {
|
|
403
|
+
options.help = true;
|
|
404
|
+
} else if (arg === '--workflow-entry') {
|
|
405
|
+
options.workflowEntry = true;
|
|
406
|
+
} else if (arg.startsWith('-')) {
|
|
407
|
+
throw new Error(`Unknown argument: ${arg}`);
|
|
408
|
+
} else {
|
|
409
|
+
positional.push(arg);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
if (positional.length > 1) throw new Error(`Expected at most one root path, received ${positional.length}.`);
|
|
414
|
+
if (positional.length === 1) options.root = path.resolve(positional[0]);
|
|
415
|
+
|
|
416
|
+
return options;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
let options;
|
|
420
|
+
try {
|
|
421
|
+
options = parseArgs(process.argv.slice(2));
|
|
422
|
+
} catch (error) {
|
|
423
|
+
console.error(`Error: ${error.message}`);
|
|
424
|
+
console.error('');
|
|
425
|
+
console.error(usage());
|
|
426
|
+
process.exit(1);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if (options.help) {
|
|
430
|
+
console.log(usage());
|
|
431
|
+
process.exit(0);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
const root = options.root;
|
|
435
|
+
const results = [];
|
|
436
|
+
|
|
437
|
+
function toNative(relativePath) {
|
|
438
|
+
return path.join(root, ...relativePath.split('/'));
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
function exists(relativePath) {
|
|
442
|
+
return fs.existsSync(toNative(relativePath));
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
function isDirectory(relativePath) {
|
|
446
|
+
try {
|
|
447
|
+
return fs.statSync(toNative(relativePath)).isDirectory();
|
|
448
|
+
} catch {
|
|
449
|
+
return false;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
function readText(relativePath) {
|
|
454
|
+
return fs.readFileSync(toNative(relativePath), 'utf8');
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
let sourceTextReader;
|
|
458
|
+
|
|
459
|
+
function getSourceTextReader() {
|
|
460
|
+
if (!sourceTextReader) sourceTextReader = createSourceTextReader({ exists, readText });
|
|
461
|
+
return sourceTextReader;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
function readExistingTextBundle(files) {
|
|
465
|
+
return getSourceTextReader().joinSourceTexts(files);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
function add(status, label, detail = '', fix = '') {
|
|
469
|
+
results.push({ status, label, detail, fix });
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
function ok(label, detail = '') {
|
|
473
|
+
add('ok', label, detail);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
function warn(label, detail = '', fix = '') {
|
|
477
|
+
add('warn', label, detail, fix);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
function fail(label, detail = '', fix = '') {
|
|
481
|
+
add('fail', label, detail, fix);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
function prefixed(base, relativePath) {
|
|
485
|
+
if (!base) return relativePath;
|
|
486
|
+
return `${base}/${relativePath}`;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
function detectedInstalledPlatforms() {
|
|
490
|
+
const byAdapter = platformNames.filter((platform) => {
|
|
491
|
+
const adapterDirectory = `${installedBase}/adapters/${platform}`;
|
|
492
|
+
return isDirectory(adapterDirectory) || platformAdapterFiles[platform].some((file) => exists(prefixed(installedBase, file)));
|
|
493
|
+
});
|
|
494
|
+
|
|
495
|
+
if (byAdapter.length > 0) return byAdapter;
|
|
496
|
+
|
|
497
|
+
const byEntry = [];
|
|
498
|
+
if (exists('CLAUDE.md')) byEntry.push('claude');
|
|
499
|
+
if (exists('AGENTS.md')) byEntry.push('codex', 'cursor');
|
|
500
|
+
return [...new Set(byEntry)];
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
function detectLayout() {
|
|
504
|
+
if (isDirectory(installedBase) && isDirectory(`${installedBase}/skills`)) {
|
|
505
|
+
const platforms = detectedInstalledPlatforms();
|
|
506
|
+
const requiredEntryFiles = [...new Set(platforms.flatMap((platform) => platformEntryFiles[platform]))];
|
|
507
|
+
|
|
508
|
+
return {
|
|
509
|
+
name: 'installed',
|
|
510
|
+
base: installedBase,
|
|
511
|
+
platforms,
|
|
512
|
+
requiredDirectories: [
|
|
513
|
+
installedBase,
|
|
514
|
+
`${installedBase}/skills`,
|
|
515
|
+
`${installedBase}/adapters`,
|
|
516
|
+
`${installedBase}/hooks`,
|
|
517
|
+
],
|
|
518
|
+
optionalDirectories: [
|
|
519
|
+
`${installedBase}/docs`,
|
|
520
|
+
`${installedBase}/examples`,
|
|
521
|
+
],
|
|
522
|
+
requiredRootFiles: requiredEntryFiles,
|
|
523
|
+
optionalRootFiles: [],
|
|
524
|
+
requiredKitFiles: [`${installedBase}/VIBE-CODING.md`, installConfigFile],
|
|
525
|
+
optionalKitFiles: [runtimeManifestFile],
|
|
526
|
+
docsRequired: false,
|
|
527
|
+
examplesRequired: false,
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return {
|
|
532
|
+
name: 'repo',
|
|
533
|
+
base: '',
|
|
534
|
+
platforms: platformNames,
|
|
535
|
+
requiredDirectories: ['skills', 'adapters', 'hooks', 'docs', 'examples', 'bin'],
|
|
536
|
+
optionalDirectories: [],
|
|
537
|
+
requiredRootFiles: ['README.md', 'package.json', 'CLAUDE.md', 'AGENTS.md'],
|
|
538
|
+
optionalRootFiles: [],
|
|
539
|
+
requiredKitFiles: [],
|
|
540
|
+
optionalKitFiles: [],
|
|
541
|
+
docsRequired: true,
|
|
542
|
+
examplesRequired: true,
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
function parseFrontmatter(text) {
|
|
547
|
+
const match = text.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);
|
|
548
|
+
if (!match) return null;
|
|
549
|
+
|
|
550
|
+
const body = match[1];
|
|
551
|
+
return {
|
|
552
|
+
name: /^name:\s*.+$/m.test(body),
|
|
553
|
+
description: /^description:\s*.+$/m.test(body),
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
function checkDirectories(layout) {
|
|
558
|
+
for (const directory of layout.requiredDirectories) {
|
|
559
|
+
if (isDirectory(directory)) {
|
|
560
|
+
ok(`${directory}/ exists`);
|
|
561
|
+
} else {
|
|
562
|
+
fail(`${directory}/ missing`, '', `Create or install required directory: ${directory}/`);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
for (const directory of layout.optionalDirectories) {
|
|
567
|
+
if (isDirectory(directory)) {
|
|
568
|
+
ok(`${directory}/ exists`);
|
|
569
|
+
} else {
|
|
570
|
+
ok(`${directory}/ skipped`, 'Optional. Use --with-docs to install docs and examples.');
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
function checkEntryWorkflowMarkers(file, options = {}) {
|
|
576
|
+
const { required = true, onlyWhenVibecodingEntry = false } = options;
|
|
577
|
+
if (!exists(file)) return;
|
|
578
|
+
|
|
579
|
+
const text = readText(file);
|
|
580
|
+
if (onlyWhenVibecodingEntry && !text.includes('Vibecoding Kit') && !text.includes('.vibecoding/skills/')) {
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
const missing = entryWorkflowMarkers.filter((marker) => !text.includes(marker));
|
|
585
|
+
if (missing.length === 0) {
|
|
586
|
+
ok(`${file} references current workflow skills`);
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
const detail = `Missing workflow marker(s): ${missing.join(', ')}`;
|
|
591
|
+
const fix = `Update ${file} from the repo entry files so it references the full source-repo workflow table.`;
|
|
592
|
+
if (required) {
|
|
593
|
+
fail(`${file} workflow markers out of date`, detail, fix);
|
|
594
|
+
} else {
|
|
595
|
+
warn(`${file} workflow markers out of date`, detail, fix);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
function checkEntryManagedBlock(file, options = {}) {
|
|
600
|
+
const { required = false, onlyWhenVibecodingEntry = false } = options;
|
|
601
|
+
if (!exists(file)) return;
|
|
602
|
+
|
|
603
|
+
const text = readText(file);
|
|
604
|
+
if (onlyWhenVibecodingEntry && !text.includes('Vibecoding Kit') && !text.includes('.vibecoding/skills/')) {
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
const blocks = [...text.matchAll(managedBlockPattern)];
|
|
609
|
+
const hasStart = text.includes(managedBlockStartMarker);
|
|
610
|
+
const hasEnd = text.includes(managedBlockEndMarker);
|
|
611
|
+
|
|
612
|
+
if (blocks.length === 1) {
|
|
613
|
+
ok(`${file} has Vibecoding managed block`);
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
if (blocks.length > 1) {
|
|
618
|
+
fail(
|
|
619
|
+
`${file} has multiple Vibecoding managed blocks`,
|
|
620
|
+
`Found ${blocks.length} managed blocks.`,
|
|
621
|
+
`Keep exactly one ${managedBlockStartMarker} / ${managedBlockEndMarker} block in ${file}.`,
|
|
622
|
+
);
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
if (hasStart || hasEnd) {
|
|
627
|
+
fail(
|
|
628
|
+
`${file} has incomplete Vibecoding managed block`,
|
|
629
|
+
`Start marker present: ${hasStart}; end marker present: ${hasEnd}.`,
|
|
630
|
+
`Restore both ${managedBlockStartMarker} and ${managedBlockEndMarker}, or rerun vibe-init --merge=replace after fixing the block boundary.`,
|
|
631
|
+
);
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
const fix = `Run vibe-init --merge=preview for this target, then use --merge=append to add a managed block without overwriting user content.`;
|
|
636
|
+
if (required) {
|
|
637
|
+
warn(`${file} managed block missing`, 'Entry references Vibecoding but is not managed for safe future updates.', fix);
|
|
638
|
+
} else {
|
|
639
|
+
ok(`${file} managed block not present`, 'Optional unless this entry is managed by vibe-init.');
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
function checkInstalledEntryCardMarkers(file, options = {}) {
|
|
644
|
+
const { required = true, onlyWhenVibecodingEntry = false } = options;
|
|
645
|
+
if (!exists(file)) return;
|
|
646
|
+
|
|
647
|
+
const text = readText(file);
|
|
648
|
+
if (onlyWhenVibecodingEntry && !text.includes('Vibecoding Kit') && !text.includes('.vibecoding/skills/')) {
|
|
649
|
+
return;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
const missing = installedEntryCardMarkers.filter((marker) => !text.includes(marker));
|
|
653
|
+
if (missing.length === 0) {
|
|
654
|
+
ok(`${file} exposes lightweight user entry card`);
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
const detail = `Missing entry card marker(s): ${missing.join(', ')}`;
|
|
659
|
+
const fix = `Update ${file} from templates/ so installed projects expose a concise sandbox entry and link to .vibecoding/VIBE-CODING.md for full rules.`;
|
|
660
|
+
if (required) {
|
|
661
|
+
fail(`${file} lightweight entry card out of date`, detail, fix);
|
|
662
|
+
} else {
|
|
663
|
+
warn(`${file} lightweight entry card out of date`, detail, fix);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
function checkInstalledRulesProtocolMarkers(file, options = {}) {
|
|
668
|
+
const { required = true } = options;
|
|
669
|
+
if (!exists(file)) return;
|
|
670
|
+
|
|
671
|
+
const text = readText(file);
|
|
672
|
+
const missing = installedEntryProtocolMarkers.filter((marker) => !text.includes(marker));
|
|
673
|
+
if (missing.length === 0) {
|
|
674
|
+
ok(`${file} defines full installed interaction protocol`);
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
const detail = `Missing protocol marker(s): ${missing.join(', ')}`;
|
|
679
|
+
const fix = `Update ${file} from templates/VIBE-CODING.md so installed projects keep full workflow routing, quality guardrails, and explicit upgrade conditions.`;
|
|
680
|
+
if (required) {
|
|
681
|
+
fail(`${file} full interaction protocol out of date`, detail, fix);
|
|
682
|
+
} else {
|
|
683
|
+
warn(`${file} full interaction protocol out of date`, detail, fix);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
function checkInstalledEntryFile(file, required = false) {
|
|
688
|
+
if (!exists(file)) {
|
|
689
|
+
const detail = required ? 'Expected for detected installed platform.' : 'Expected when installing the matching platform.';
|
|
690
|
+
if (required) {
|
|
691
|
+
fail(`${file} missing`, detail, `Run vibe-init for the matching platform or manually add ${file} from templates/.`);
|
|
692
|
+
} else {
|
|
693
|
+
warn(`${file} missing`, detail, `Install the matching platform or add ${file} if this project should support it.`);
|
|
694
|
+
}
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
ok(`${file} exists`);
|
|
699
|
+
|
|
700
|
+
const text = readText(file);
|
|
701
|
+
const missing = entryFileMarkers[file].filter((marker) => !text.includes(marker));
|
|
702
|
+
|
|
703
|
+
if (missing.length === 0) {
|
|
704
|
+
ok(`${file} references Vibecoding installed layout`);
|
|
705
|
+
checkEntryManagedBlock(file, { required: true });
|
|
706
|
+
checkInstalledEntryCardMarkers(file, { required: true });
|
|
707
|
+
} else {
|
|
708
|
+
warn(
|
|
709
|
+
`${file} may need manual Vibecoding merge`,
|
|
710
|
+
`Missing marker(s): ${missing.join(', ')}`,
|
|
711
|
+
`Run vibe-init --merge-preview for this target, then copy the suggested ${file} snippet into the existing entry file.`,
|
|
712
|
+
);
|
|
713
|
+
checkInstalledEntryCardMarkers(file, { required: false, onlyWhenVibecodingEntry: true });
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
function checkRootFiles(layout) {
|
|
718
|
+
for (const file of layout.requiredRootFiles) {
|
|
719
|
+
if (layout.name === 'installed' && entryFileMarkers[file]) {
|
|
720
|
+
checkInstalledEntryFile(file, true);
|
|
721
|
+
} else if (exists(file)) {
|
|
722
|
+
ok(`${file} exists`);
|
|
723
|
+
if (layout.name === 'repo' && entryFileMarkers[file]) {
|
|
724
|
+
checkEntryWorkflowMarkers(file, { required: true });
|
|
725
|
+
}
|
|
726
|
+
} else {
|
|
727
|
+
fail(`${file} missing`, '', `Restore ${file} in repo layout or run vibe-init for an installed target.`);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
for (const file of layout.optionalRootFiles) {
|
|
732
|
+
if (layout.name === 'installed' && entryFileMarkers[file]) {
|
|
733
|
+
checkInstalledEntryFile(file);
|
|
734
|
+
} else if (exists(file)) {
|
|
735
|
+
ok(`${file} exists`);
|
|
736
|
+
} else {
|
|
737
|
+
warn(`${file} missing`, 'Expected when installing the matching platform.', `Install the matching platform or add ${file} from templates/.`);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
for (const file of layout.requiredKitFiles) {
|
|
742
|
+
if (exists(file)) {
|
|
743
|
+
ok(`${file} exists`);
|
|
744
|
+
if (file.endsWith('VIBE-CODING.md')) {
|
|
745
|
+
checkInstalledRulesProtocolMarkers(file, { required: true });
|
|
746
|
+
}
|
|
747
|
+
} else {
|
|
748
|
+
fail(`${file} missing`, '', `Run vibe-init again or restore ${file} from templates/VIBE-CODING.md.`);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
for (const file of layout.optionalKitFiles || []) {
|
|
753
|
+
if (exists(file)) {
|
|
754
|
+
ok(`${file} exists`);
|
|
755
|
+
} else {
|
|
756
|
+
ok(`${file} skipped`, 'Optional. Install with --with-runtime to add explicit runtime opt-in boundary metadata.');
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
const standardPackageScripts = {
|
|
762
|
+
check: 'node tools/vibe-runtime-check/index.mjs',
|
|
763
|
+
'check:arch': 'node tools/vibe-architecture-check/index.mjs --root . --json',
|
|
764
|
+
'check:doctor': 'node tools/vibe-doctor/index.mjs',
|
|
765
|
+
'release:fast': 'node tools/vibe-release-check/index.mjs --suite fast --quiet',
|
|
766
|
+
'release:runtime': 'node tools/vibe-release-check/index.mjs --suite runtime --quiet',
|
|
767
|
+
'release:install': 'node tools/vibe-release-check/index.mjs --suite install --quiet',
|
|
768
|
+
'release:learning': 'node tools/vibe-release-check/index.mjs --suite learning --quiet',
|
|
769
|
+
'release:tokens': 'node tools/vibe-release-check/index.mjs --suite tokens --quiet',
|
|
770
|
+
'demo:golden-path': 'node tools/vibe-release-check/index.mjs --suite golden-path --quiet',
|
|
771
|
+
'demo:full-chain': 'node tools/vibe-release-check/index.mjs --suite full-chain --quiet',
|
|
772
|
+
};
|
|
773
|
+
|
|
774
|
+
function checkPackageScripts(layout) {
|
|
775
|
+
if (layout.name !== 'repo' || !exists('package.json')) return;
|
|
776
|
+
|
|
777
|
+
let manifest;
|
|
778
|
+
try {
|
|
779
|
+
manifest = JSON.parse(readText('package.json'));
|
|
780
|
+
} catch (error) {
|
|
781
|
+
fail('package.json is invalid JSON', error.message, 'Restore valid JSON before running package scripts.');
|
|
782
|
+
return;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
const scripts = manifest.scripts || {};
|
|
786
|
+
const missing = Object.entries(standardPackageScripts).filter(([name, command]) => scripts[name] !== command);
|
|
787
|
+
if (missing.length === 0) {
|
|
788
|
+
ok('package.json exposes standard verification scripts');
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
fail(
|
|
793
|
+
'package.json verification scripts incomplete',
|
|
794
|
+
`Missing or changed script(s): ${missing.map(([name]) => name).join(', ')}`,
|
|
795
|
+
'Keep npm scripts aligned with README.md and docs/release-guide.md so maintainers can run the standard checks consistently.',
|
|
796
|
+
);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
function checkSkillFile(file) {
|
|
800
|
+
if (!exists(file)) {
|
|
801
|
+
fail(`${file} missing`, '', `Restore ${file} from skills/ or rerun vibe-init for installed layout.`);
|
|
802
|
+
return;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
ok(`${file} exists`);
|
|
806
|
+
|
|
807
|
+
const text = readText(file);
|
|
808
|
+
const frontmatter = parseFrontmatter(text);
|
|
809
|
+
|
|
810
|
+
if (!frontmatter) {
|
|
811
|
+
fail(`${file} frontmatter missing`, '', 'Add YAML frontmatter with name and description.');
|
|
812
|
+
return;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
if (frontmatter.name && frontmatter.description) {
|
|
816
|
+
ok(`${file} frontmatter has name and description`);
|
|
817
|
+
} else {
|
|
818
|
+
fail(`${file} frontmatter incomplete`, 'Expected name and description.', 'Add both name and description to the skill frontmatter.');
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
function checkSkills(layout) {
|
|
823
|
+
for (const file of skillFiles.map((entry) => prefixed(layout.base, entry))) {
|
|
824
|
+
checkSkillFile(file);
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
function checkHandoff(layout) {
|
|
829
|
+
for (const file of workflowSkillFiles.map((entry) => prefixed(layout.base, entry))) {
|
|
830
|
+
if (!exists(file)) continue;
|
|
831
|
+
|
|
832
|
+
const text = readText(file);
|
|
833
|
+
const missing = handoffMarkers.filter((marker) => !text.includes(marker));
|
|
834
|
+
|
|
835
|
+
if (missing.length === 0) {
|
|
836
|
+
ok(`${file} has workflow handoff markers`);
|
|
837
|
+
} else {
|
|
838
|
+
fail(`${file} handoff markers missing`, missing.join(', '), 'Add 下一步调用 and Workflow Handoff sections to keep explicit workflow chaining stable.');
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
const router = prefixed(layout.base, 'skills/using-vibecoding/SKILL.md');
|
|
843
|
+
if (exists(router)) {
|
|
844
|
+
const text = readText(router);
|
|
845
|
+
const routerMarkers = [
|
|
846
|
+
'## 分层交互协议',
|
|
847
|
+
'### L0:轻量路由层',
|
|
848
|
+
'### L1:标准执行层',
|
|
849
|
+
'### L2:完整 workflow 层',
|
|
850
|
+
'## Skill 选择表',
|
|
851
|
+
'## Workflow Handoff 规则',
|
|
852
|
+
'## 完整 workflow 参考',
|
|
853
|
+
'## 输出要求',
|
|
854
|
+
...entryWorkflowMarkers,
|
|
855
|
+
];
|
|
856
|
+
const missing = routerMarkers.filter((marker) => !text.includes(marker));
|
|
857
|
+
|
|
858
|
+
if (missing.length === 0) {
|
|
859
|
+
ok(`${router} defines lightweight routing and handoff rules`);
|
|
860
|
+
} else {
|
|
861
|
+
fail(`${router} routing markers missing`, missing.join(', '), 'Restore the lightweight routing, upgrade conditions, and handoff sections in using-vibecoding so it remains the workflow entry point.');
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
function validateRuntimeBridgeMetadata(file, manifest) {
|
|
867
|
+
const bridge = manifest.runtimeBridge;
|
|
868
|
+
if (!bridge || typeof bridge !== 'object' || Array.isArray(bridge)) {
|
|
869
|
+
fail(`${file} runtimeBridge metadata missing`, '', 'Add runtimeBridge metadata with manual mode and no automatic execution capabilities.');
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
const expected = {
|
|
874
|
+
supported: true,
|
|
875
|
+
mode: 'manual',
|
|
876
|
+
canReadDispatchIntent: true,
|
|
877
|
+
canAutoExecuteSkill: false,
|
|
878
|
+
canCallSubagent: false,
|
|
879
|
+
canTouchGit: false,
|
|
880
|
+
};
|
|
881
|
+
const mismatches = Object.entries(expected)
|
|
882
|
+
.filter(([key, value]) => bridge[key] !== value)
|
|
883
|
+
.map(([key, value]) => `${key}=${value}`);
|
|
884
|
+
|
|
885
|
+
if (mismatches.length === 0) {
|
|
886
|
+
ok(`${file} declares manual runtime bridge capability`);
|
|
887
|
+
} else {
|
|
888
|
+
fail(
|
|
889
|
+
`${file} runtimeBridge capability unsafe`,
|
|
890
|
+
`Expected marker(s): ${mismatches.join(', ')}`,
|
|
891
|
+
'Keep Stage 5 adapter bridge read-only: manual mode, dispatch intent readable, no skill execution, no subagent, no git.',
|
|
892
|
+
);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
function validateSessionStartBootstrapMetadata(file, manifest) {
|
|
897
|
+
const bootstrap = manifest.sessionStartBootstrap;
|
|
898
|
+
if (!bootstrap || typeof bootstrap !== 'object' || Array.isArray(bootstrap)) {
|
|
899
|
+
fail(`${file} sessionStartBootstrap metadata missing`, '', 'Add sessionStartBootstrap metadata that points to the lightweight session-start bootstrap command.');
|
|
900
|
+
return;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
const expected = {
|
|
904
|
+
supported: true,
|
|
905
|
+
injectsFullSkill: false,
|
|
906
|
+
writesRuntimeState: false,
|
|
907
|
+
autoRunsNextSkill: false,
|
|
908
|
+
};
|
|
909
|
+
const mismatches = Object.entries(expected)
|
|
910
|
+
.filter(([key, value]) => bootstrap[key] !== value)
|
|
911
|
+
.map(([key, value]) => `${key}=${value}`);
|
|
912
|
+
|
|
913
|
+
if (typeof bootstrap.command !== 'string' || !bootstrap.command.includes('.vibecoding/hooks/session-start/session-start.mjs')) {
|
|
914
|
+
mismatches.push('command=.vibecoding/hooks/session-start/session-start.mjs');
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
if (mismatches.length === 0) {
|
|
918
|
+
ok(`${file} declares lightweight session-start bootstrap`);
|
|
919
|
+
} else {
|
|
920
|
+
fail(
|
|
921
|
+
`${file} sessionStartBootstrap capability unsafe`,
|
|
922
|
+
`Expected marker(s): ${mismatches.join(', ')}`,
|
|
923
|
+
'Keep session-start bootstrap lightweight: no full skill injection, no runtime state write, no automatic next_skill execution.',
|
|
924
|
+
);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
function validateHookBootstrapReference(file, manifest) {
|
|
929
|
+
const text = JSON.stringify(manifest);
|
|
930
|
+
const required = [
|
|
931
|
+
'session-start/session-start.mjs',
|
|
932
|
+
'using-vibecoding',
|
|
933
|
+
'lightweight routing',
|
|
934
|
+
];
|
|
935
|
+
const missing = required.filter((marker) => !text.includes(marker));
|
|
936
|
+
|
|
937
|
+
if (missing.length === 0) {
|
|
938
|
+
ok(`${file} references lightweight session-start bootstrap`);
|
|
939
|
+
} else {
|
|
940
|
+
fail(
|
|
941
|
+
`${file} session-start bootstrap reference missing`,
|
|
942
|
+
`Missing marker(s): ${missing.join(', ')}`,
|
|
943
|
+
'Keep adapter hook examples wired to .vibecoding/hooks/session-start/session-start.mjs and the lightweight routing message.',
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
function checkAdapters(layout) {
|
|
949
|
+
const expectedAdapterFiles = layout.platforms.flatMap((platform) => platformAdapterFiles[platform]);
|
|
950
|
+
|
|
951
|
+
if (layout.name === 'installed' && expectedAdapterFiles.length === 0) {
|
|
952
|
+
fail(
|
|
953
|
+
`${installedBase}/adapters/ platform missing`,
|
|
954
|
+
'Expected at least one installed platform adapter.',
|
|
955
|
+
'Run vibe-init with --platform claude|cursor|codex|all.',
|
|
956
|
+
);
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
for (const file of expectedAdapterFiles.map((entry) => prefixed(layout.base, entry))) {
|
|
961
|
+
if (exists(file)) {
|
|
962
|
+
ok(`${file} exists`);
|
|
963
|
+
} else {
|
|
964
|
+
fail(`${file} missing`, '', `Install the matching platform adapter or restore ${file}.`);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
for (const file of expectedAdapterFiles.filter((entry) => entry.endsWith('.json')).map((entry) => prefixed(layout.base, entry))) {
|
|
969
|
+
if (!exists(file)) continue;
|
|
970
|
+
|
|
971
|
+
try {
|
|
972
|
+
const manifest = JSON.parse(readText(file));
|
|
973
|
+
ok(`${file} is valid JSON`);
|
|
974
|
+
if (file.endsWith('plugin.json')) {
|
|
975
|
+
validateRuntimeBridgeMetadata(file, manifest);
|
|
976
|
+
validateSessionStartBootstrapMetadata(file, manifest);
|
|
977
|
+
} else if (file.endsWith('hooks.example.json')) {
|
|
978
|
+
validateHookBootstrapReference(file, manifest);
|
|
979
|
+
}
|
|
980
|
+
} catch (error) {
|
|
981
|
+
fail(`${file} invalid JSON`, error.message, 'Fix the JSON syntax or restore the adapter manifest from adapters/.');
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
function checkDocs(layout) {
|
|
987
|
+
for (const file of docs.map((entry) => prefixed(layout.base, entry))) {
|
|
988
|
+
if (exists(file)) {
|
|
989
|
+
ok(`${file} exists`);
|
|
990
|
+
} else if (layout.docsRequired) {
|
|
991
|
+
fail(`${file} missing`, '', `Restore ${file} in docs/.`);
|
|
992
|
+
} else {
|
|
993
|
+
ok(`${file} skipped`, 'Optional. Use --with-docs to install docs.');
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
const acceptance = prefixed(layout.base, 'docs/acceptance-checklist.md');
|
|
998
|
+
if (exists(acceptance)) {
|
|
999
|
+
const text = readText(acceptance);
|
|
1000
|
+
const missing = acceptancePrompts.filter((prompt) => !text.includes(prompt));
|
|
1001
|
+
|
|
1002
|
+
if (missing.length === 0) {
|
|
1003
|
+
ok(`${acceptance} includes acceptance prompts`);
|
|
1004
|
+
} else {
|
|
1005
|
+
warn(`${acceptance} acceptance prompts incomplete`, missing.join(' | '), 'Restore the expected smoke prompts in docs/acceptance-checklist.md.');
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
const runtimeAuditMarkers = ['execute --from-dispatch --preflight', 'policy snapshot', 'idempotency_key', 'daemon --scan --dry-run', 'retry preview', 'watcher disabled', 'pickup-dry-run', 'handoff_sha256', 'heartbeat_started'];
|
|
1009
|
+
const missingRuntimeAudit = runtimeAuditMarkers.filter((marker) => !text.includes(marker));
|
|
1010
|
+
if (missingRuntimeAudit.length === 0) {
|
|
1011
|
+
ok(`${acceptance} includes enhanced runtime audit markers`);
|
|
1012
|
+
} else if (layout.docsRequired) {
|
|
1013
|
+
warn(`${acceptance} enhanced runtime audit markers incomplete`, `Missing marker(s): ${missingRuntimeAudit.join(', ')}`, 'Update docs/acceptance-checklist.md with Stage 7-10 enhanced runtime audit acceptance markers.');
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
const runtimeContract = prefixed(layout.base, 'docs/runtime-contract.md');
|
|
1018
|
+
if (exists(runtimeContract)) {
|
|
1019
|
+
const text = readText(runtimeContract);
|
|
1020
|
+
const markers = ['Stage 7.5 stale claim audit', 'Stage 7.6 claim recovery policy preview', 'Stage 7.9 ack reason contract', 'Stage 7.10 claim event digest enforcement', 'Stage 8.4 pickup readiness audit', 'Stage 8.7 pickup package verification', 'Stage 8.8 platform capability matrix', 'Stage 8.9 no-session adapter dry-run', 'Stage 8.10 pickup handoff digest', 'Stage 9.5 idempotency / policy snapshot', 'Stage 10.6 retry policy preview', 'Stage 10.13 daemon lease / heartbeat model'];
|
|
1021
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1022
|
+
if (missing.length === 0) {
|
|
1023
|
+
ok(`${runtimeContract} includes enhanced Stage 7-10 runtime contract markers`);
|
|
1024
|
+
} else if (layout.docsRequired) {
|
|
1025
|
+
warn(`${runtimeContract} enhanced Stage 7-10 markers incomplete`, `Missing marker(s): ${missing.join(', ')}`, 'Update docs/runtime-contract.md with stale recovery, digest-bound pickup, policy snapshot, and scheduler audit contracts.');
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
const runtimeRoadmap = prefixed(layout.base, 'docs/runtime-roadmap.md');
|
|
1030
|
+
if (exists(runtimeRoadmap)) {
|
|
1031
|
+
const text = readText(runtimeRoadmap);
|
|
1032
|
+
const markers = ['Stage 7.5 / 7.6', 'Stage 8.4 / 8.6', 'Stage 9.2 / 9.5', 'Stage 10.3-10.6', 'daemon --scan --dry-run'];
|
|
1033
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1034
|
+
if (missing.length === 0) {
|
|
1035
|
+
ok(`${runtimeRoadmap} includes enhanced Stage 7-10 roadmap markers`);
|
|
1036
|
+
} else if (layout.docsRequired) {
|
|
1037
|
+
warn(`${runtimeRoadmap} enhanced Stage 7-10 markers incomplete`, `Missing marker(s): ${missing.join(', ')}`, 'Update docs/runtime-roadmap.md with enhanced Stage 7-10 read-only audit roadmap markers.');
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
const workflowChaining = prefixed(layout.base, 'docs/workflow-chaining.md');
|
|
1042
|
+
if (exists(workflowChaining)) {
|
|
1043
|
+
const text = readText(workflowChaining);
|
|
1044
|
+
const missing = entryWorkflowMarkers.filter((marker) => !text.includes(marker));
|
|
1045
|
+
|
|
1046
|
+
if (missing.length === 0) {
|
|
1047
|
+
ok(`${workflowChaining} includes current workflow chain markers`);
|
|
1048
|
+
} else if (layout.docsRequired) {
|
|
1049
|
+
fail(
|
|
1050
|
+
`${workflowChaining} workflow chain markers incomplete`,
|
|
1051
|
+
`Missing marker(s): ${missing.join(', ')}`,
|
|
1052
|
+
'Update docs/workflow-chaining.md so it documents every current workflow skill and next_skill rule.',
|
|
1053
|
+
);
|
|
1054
|
+
} else {
|
|
1055
|
+
warn(
|
|
1056
|
+
`${workflowChaining} workflow chain markers incomplete`,
|
|
1057
|
+
`Missing marker(s): ${missing.join(', ')}`,
|
|
1058
|
+
'Update the installed docs copy from the current kit if docs were installed with --with-docs.',
|
|
1059
|
+
);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
function checkExamples(layout) {
|
|
1065
|
+
for (const platform of ['claude-project', 'codex-project', 'cursor-project']) {
|
|
1066
|
+
const file = prefixed(layout.base, `examples/${platform}/README.md`);
|
|
1067
|
+
if (exists(file)) {
|
|
1068
|
+
ok(`${file} exists`);
|
|
1069
|
+
} else if (layout.examplesRequired) {
|
|
1070
|
+
warn(`${file} missing`, '', `Restore ${file} or document why this example is intentionally omitted.`);
|
|
1071
|
+
} else {
|
|
1072
|
+
ok(`${file} skipped`, 'Optional. Use --with-docs to install examples.');
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
if (layout.name === 'repo') {
|
|
1077
|
+
for (const file of productArtifactFixtureFiles) {
|
|
1078
|
+
if (exists(file)) ok(`${file} exists`);
|
|
1079
|
+
else fail(`${file} missing`, '', 'Restore product/UI runtime fixtures so release smoke can validate artifact gates.');
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
for (const file of ciEvidenceExampleFiles) {
|
|
1083
|
+
if (exists(file)) ok(`${file} exists`);
|
|
1084
|
+
else fail(`${file} missing`, '', 'Restore CI evidence examples so teams can generate local evidence envelopes outside runtime.');
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
function checkTemplates(layout) {
|
|
1090
|
+
if (layout.name !== 'repo') return;
|
|
1091
|
+
|
|
1092
|
+
for (const file of entryTemplateFiles) {
|
|
1093
|
+
if (exists(file)) {
|
|
1094
|
+
ok(`${file} exists`);
|
|
1095
|
+
checkInstalledEntryCardMarkers(file, { required: true });
|
|
1096
|
+
checkEntryManagedBlock(file, { required: true });
|
|
1097
|
+
} else {
|
|
1098
|
+
fail(`${file} missing`, '', `Restore ${file}; vibe-init uses templates for business project entry files.`);
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
for (const file of installedRulesTemplateFiles) {
|
|
1103
|
+
if (exists(file)) {
|
|
1104
|
+
ok(`${file} exists`);
|
|
1105
|
+
checkInstalledRulesProtocolMarkers(file, { required: true });
|
|
1106
|
+
} else {
|
|
1107
|
+
fail(`${file} missing`, '', 'Restore templates/VIBE-CODING.md; installed projects use it for full Vibecoding rules.');
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
for (const file of productArtifactTemplateFiles) {
|
|
1112
|
+
if (!exists(file)) {
|
|
1113
|
+
fail(`${file} missing`, '', 'Restore product/UI artifact templates.');
|
|
1114
|
+
continue;
|
|
1115
|
+
}
|
|
1116
|
+
const text = readText(file);
|
|
1117
|
+
const markers = file.endsWith('delivery-traceability.yaml')
|
|
1118
|
+
? ['artifact_kind', 'source_skill', 'status', 'boundary:', 'links:', 'Evidence']
|
|
1119
|
+
: ['artifact_kind', 'source_skill', 'status', 'Boundary', 'Evidence'];
|
|
1120
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1121
|
+
if (missing.length === 0) ok(`${file} defines product/UI delivery artifact contract markers`);
|
|
1122
|
+
else fail(`${file} artifact template markers missing`, `Missing marker(s): ${missing.join(', ')}`, 'Keep product/UI and delivery templates checkable by methodology artifact gates.');
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
for (const file of evidenceTemplateGuideFiles) {
|
|
1126
|
+
if (exists(file)) ok(`${file} exists`);
|
|
1127
|
+
else fail(`${file} missing`, '', 'Restore evidence template onboarding guide so users can fill local evidence envelopes safely.');
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
for (const file of evidenceTemplateFiles) {
|
|
1131
|
+
if (!exists(file)) {
|
|
1132
|
+
fail(`${file} missing`, '', 'Restore local evidence JSON templates.');
|
|
1133
|
+
continue;
|
|
1134
|
+
}
|
|
1135
|
+
const text = readText(file);
|
|
1136
|
+
const markers = file.endsWith('test-evidence.json')
|
|
1137
|
+
? ['artifact_kind', 'test-evidence', 'runs', 'output_digest', 'task_refs', 'scenario_refs', 'boundary_assertions']
|
|
1138
|
+
: ['artifact_kind', 'diff-coverage-evidence', 'planned_files', 'changed_files', 'task_coverage', 'unexpected_files', 'missing_files', 'boundary_assertions'];
|
|
1139
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1140
|
+
if (missing.length === 0) ok(`${file} defines local evidence template contract markers`);
|
|
1141
|
+
else fail(`${file} evidence template markers missing`, `Missing marker(s): ${missing.join(', ')}`, 'Keep local evidence templates copy-ready for user or CI generated envelopes.');
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
function checkSessionStartBootstrap(layout) {
|
|
1146
|
+
const script = prefixed(layout.base, 'hooks/session-start/session-start.mjs');
|
|
1147
|
+
if (!exists(script)) return;
|
|
1148
|
+
|
|
1149
|
+
const boundaryContract = prefixed(layout.base, 'hooks/session-start/session-start-state-boundary-contract.mjs');
|
|
1150
|
+
const boundaryContractText = exists(boundaryContract) ? readText(boundaryContract) : '';
|
|
1151
|
+
const text = [
|
|
1152
|
+
readText(script),
|
|
1153
|
+
boundaryContractText,
|
|
1154
|
+
boundaryContractText.includes('stateDirectoryName') ? '.vibecoding-state/' : '',
|
|
1155
|
+
].join('\n');
|
|
1156
|
+
const markers = [
|
|
1157
|
+
'additionalContext',
|
|
1158
|
+
'additional_context',
|
|
1159
|
+
'hookSpecificOutput',
|
|
1160
|
+
'cursor-sdk',
|
|
1161
|
+
'.vibecoding-state/',
|
|
1162
|
+
'Do not inject the full skill content',
|
|
1163
|
+
'Do not auto-run next_skill',
|
|
1164
|
+
'using-vibecoding',
|
|
1165
|
+
'selected_skill=using-vibecoding',
|
|
1166
|
+
'visible_route=',
|
|
1167
|
+
'next_manual_action=',
|
|
1168
|
+
'context_policy=',
|
|
1169
|
+
'hidden_execution=false',
|
|
1170
|
+
'command_execution=false',
|
|
1171
|
+
'skill_execution_claimed=false',
|
|
1172
|
+
'subagent_dispatch_claimed=false',
|
|
1173
|
+
'git_write_claimed=false',
|
|
1174
|
+
'platform_api=false',
|
|
1175
|
+
'model_invocation=false',
|
|
1176
|
+
'business_source_write=false',
|
|
1177
|
+
];
|
|
1178
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1179
|
+
|
|
1180
|
+
if (missing.length === 0) {
|
|
1181
|
+
ok(`${script} preserves lightweight bootstrap boundary`);
|
|
1182
|
+
} else {
|
|
1183
|
+
fail(
|
|
1184
|
+
`${script} lightweight bootstrap boundary incomplete`,
|
|
1185
|
+
`Missing marker(s): ${missing.join(', ')}`,
|
|
1186
|
+
'Keep session-start.mjs lightweight and compatible with SDK, Cursor, and Claude hook output shapes.',
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
function checkHookFiles(layout) {
|
|
1192
|
+
for (const file of hookFiles.map((entry) => prefixed(layout.base, entry))) {
|
|
1193
|
+
if (exists(file)) {
|
|
1194
|
+
ok(`${file} exists`);
|
|
1195
|
+
} else {
|
|
1196
|
+
fail(`${file} missing`, '', `Restore ${file}; hook-assisted workflow guidance depends on it.`);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
checkSessionStartBootstrap(layout);
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
function checkToolFiles(layout) {
|
|
1204
|
+
if (layout.name !== 'repo') return;
|
|
1205
|
+
|
|
1206
|
+
for (const file of toolFiles) {
|
|
1207
|
+
if (exists(file)) {
|
|
1208
|
+
ok(`${file} exists`);
|
|
1209
|
+
} else {
|
|
1210
|
+
fail(`${file} missing`, '', `Restore ${file}; it is part of the release tooling surface.`);
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
function checkPluginPackTool(layout) {
|
|
1216
|
+
if (layout.name !== 'repo') return;
|
|
1217
|
+
const tool = 'tools/vibe-plugin-pack/index.mjs';
|
|
1218
|
+
if (!exists(tool)) return;
|
|
1219
|
+
|
|
1220
|
+
const text = [
|
|
1221
|
+
readText(tool),
|
|
1222
|
+
exists('tools/vibe-plugin-pack/plugin-pack-manifest.mjs') ? readText('tools/vibe-plugin-pack/plugin-pack-manifest.mjs') : '',
|
|
1223
|
+
].join('\n');
|
|
1224
|
+
const markers = [
|
|
1225
|
+
'adapters/claude/plugin.json',
|
|
1226
|
+
'adapters/codex/plugin.json',
|
|
1227
|
+
'adapters/cursor/plugin.json',
|
|
1228
|
+
'adapters/opencode/plugin.json',
|
|
1229
|
+
'adapters/pi/plugin.json',
|
|
1230
|
+
'.claude-plugin',
|
|
1231
|
+
'.codex-plugin',
|
|
1232
|
+
'.cursor-plugin',
|
|
1233
|
+
'.opencode-plugin',
|
|
1234
|
+
'.pi-extension',
|
|
1235
|
+
'sessionStartBootstrap',
|
|
1236
|
+
'.vibecoding/hooks/session-start/session-start.mjs',
|
|
1237
|
+
'projectInstallRequired',
|
|
1238
|
+
'runtime-state',
|
|
1239
|
+
'.vibecoding-state/',
|
|
1240
|
+
'--check',
|
|
1241
|
+
'--dry-run',
|
|
1242
|
+
];
|
|
1243
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1244
|
+
|
|
1245
|
+
if (missing.length === 0) {
|
|
1246
|
+
ok(`${tool} preserves UX-6 plugin packaging contract`);
|
|
1247
|
+
} else {
|
|
1248
|
+
fail(
|
|
1249
|
+
`${tool} UX-6 plugin packaging contract incomplete`,
|
|
1250
|
+
`Missing marker(s): ${missing.join(', ')}`,
|
|
1251
|
+
'Keep plugin pack generated from adapters/, with session-start bootstrap support, project install separation, dry-run/check modes, and no runtime state packaging.',
|
|
1252
|
+
);
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
function checkRepoGuideLinks(layout) {
|
|
1257
|
+
if (layout.name !== 'repo') return;
|
|
1258
|
+
|
|
1259
|
+
for (const [file, markers] of Object.entries(repoGuideFiles)) {
|
|
1260
|
+
if (!exists(file)) continue;
|
|
1261
|
+
|
|
1262
|
+
const text = readText(file);
|
|
1263
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1264
|
+
|
|
1265
|
+
if (missing.length === 0) {
|
|
1266
|
+
ok(`${file} includes key guide links`);
|
|
1267
|
+
} else {
|
|
1268
|
+
warn(
|
|
1269
|
+
`${file} key guide links incomplete`,
|
|
1270
|
+
`Missing marker(s): ${missing.join(', ')}`,
|
|
1271
|
+
`Add the missing reference(s) so users can navigate installation, acceptance, release, and submodule docs.`,
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
function checkRepoLocalStateIgnore(layout) {
|
|
1278
|
+
if (layout.name !== 'repo') return;
|
|
1279
|
+
|
|
1280
|
+
if (!exists('.gitignore')) {
|
|
1281
|
+
warn('.gitignore missing', 'Cannot verify local runtime ledger ignore boundary.', 'Add .vibecoding-state/ to the repo ignore rules.');
|
|
1282
|
+
return;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
const text = readText('.gitignore');
|
|
1286
|
+
if (text.includes('.vibecoding-state/')) {
|
|
1287
|
+
ok('.gitignore excludes .vibecoding-state/');
|
|
1288
|
+
} else {
|
|
1289
|
+
fail('.gitignore does not exclude .vibecoding-state/', '', 'Add .vibecoding-state/ so explicit runtime ledger files are not committed.');
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
const repoRuntimeStage3MarkerChecks = {
|
|
1294
|
+
'docs/runtime-contract.md': ['JSON handoff', 'JSON-first', 'legacy fallback', 'no automatic next_skill execution', 'Handoff quality:', 'artifacts --dry-run', 'artifacts --write', 'task-brief.md', 'review-gate.md', 'evidence.md', 'goal', 'key_decisions', 'tasks --dry-run', 'tasks --write', '.vibecoding-state/tasks/', 'brief.md', 'report.md', 'task id', 'Windows 保留设备名', '尾随', 'unique within a workflow handoff', 'depends_on', 'cyclic task dependency', 'Task readiness', 'review_status', 'needs_fix', 'waived', 'status --json', 'validate-handoff --json', 'next --dry-run --json', 'tasks --dry-run --json', 'schema_version', 'state_present', 'summary.selected_count', 'artifact_paths', '完整 workflow ledger', 'record-handoff --json', 'artifacts --json', 'tasks --write --json', 'reset --json', 'next --dry-run --dispatch-intent', 'dispatch intent', 'runtimeBridge', 'manual', 'canAutoExecuteSkill', 'platform_hints', 'dispatch_event', 'Stage 5 transition table', 'vibe-planning -> vibe-implementation', 'vibe-receiving-code-review -> vibe-implementation', 'vibe-dispatching-parallel-work -> vibe-executing-plans', 'vibe-workspace-isolation -> vibe-executing-plans', 'vibe-writing-skills -> vibe-test-driven-development', 'vibe-debugging -> vibe-implementation', 'vibe-requesting-code-review -> vibe-verification-before-completion', 'vibe-context-compact -> vibe-verification', 'clean dispatch intent', 'next --confirm --dispatch', 'confirm-dispatch', 'dispatch envelope', 'allowed transition', 'review gate', 'task readiness gate', 'dispatches', 'dispatches --list', 'dispatches --show', 'dispatches --verify', 'read-only dispatch audit', 'confirm-dispatch event verification', 'Dispatch Claim / Ack Gate', 'Stage 7.1 claim input hardening', 'Stage 7.2 ack lifecycle hardening', 'Stage 7.3 claims audit hardening', 'dispatches --claim', 'dispatches --ack', 'dispatches --claims', 'dispatch-claims', 'Adapter Pickup Package Gate', 'dispatches --pickup', 'pickup package', 'Stage 8.1 pickup package manifest', 'Stage 8.2 pickup readiness gates', 'Stage 8.3 pickup read-only audit', 'auto claim', 'session', 'Supervised Executor Gate', 'execute --from-dispatch', 'execution envelope', 'Stage 9.1 execution preflight gates', 'Stage 9.2 execution preflight audit / planned execution envelope', 'Stage 9.3 immutability guarantees', '.vibecoding-state/executions/', 'skill_execution', 'Optional Daemon / Watcher Gate', 'daemon --dry-run', 'daemon --once --confirm', 'Stage 10.1 daemon command gate', 'Stage 10.2 once-run envelope', 'Stage 10.3 scheduler scan dry-run / failure isolation', '.vibecoding-state/daemon-runs/', 'long_running', 'watcher', 'dispatch_scan_execution', 'Supervised Real Executor v1', 'execute --confirm --run', 'supervised-run', 'runtime_action', 'executions --list', 'executions --show', 'executions --verify', 'execution lifecycle', 'allowlist', 'Execution Audit Hardening', 'status: running', 'terminal status', 'timestamp 单调性', 'evidence.stdout_excerpt', 'runtime_action=false', 'runtime_action=true', 'No git, worktree, subagent, daemon, MCP, or business source file'],
|
|
1295
|
+
'tools/vibe-runtime/index.mjs': ['JSON handoff', 'parseJsonHandoff', 'parseLegacyHandoff', 'Vibecoding Runtime Next Step', "status: 'ready'", 'Action: no skill was executed.', 'Action: status is read-only. No workflow state was changed.', 'Handoff quality:', 'Action: handoff was recorded. No next skill was executed.', 'Vibecoding Runtime Handoff Validation', 'handoff was validated. No workflow state was changed.', 'Vibecoding Runtime Artifacts', 'artifacts were previewed. No files were written.', 'artifacts were written. No next skill was executed.', 'task-brief.md', 'review-gate.md', 'evidence.md', 'Goal', 'Key decisions', 'Review focus', 'Risk gate', 'Evidence gate', 'Evidence gaps to fill', 'Decisions requiring evidence', 'Vibecoding Runtime Task Artifacts', 'task artifacts were previewed. No files were written.', 'task artifacts were written. No next skill was executed.', 'Task filter:', 'Tasks selected:', 'Duplicate task id:', 'Task ids must be unique within a workflow handoff.', 'validateTaskDependencies', 'Unknown task dependency', 'Self task dependency is not allowed', 'Cyclic task dependency detected', 'Task readiness:', 'Dependency readiness', 'taskArtifactsDirectoryName', 'brief.md', 'report.md', 'Spec compliance gate', 'validateTaskId', 'windowsReservedTaskBasenames', 'trailing dots or spaces', 'review_status', 'Review state', 'reviewSummaryStatus', 'jsonSchemaVersion', 'writeJsonEnvelope', "writeJsonEnvelope('status'", "writeJsonEnvelope('validate-handoff'", "writeJsonEnvelope('next'", 'tasks --json is only supported with dry-run output', 'reset does not support --json in this stage', 'record-handoff does not support --json in this stage', 'state_present', 'selected_count', 'artifact_paths', 'readinessSourceTasks', 'Vibecoding Runtime Dispatch Intent', 'dispatchIntentEnvelope', 'platform_hints', 'adapterRuntimeBridge', 'dispatch_event', 'next --dispatch-intent requires --dry-run', 'next --confirm --dispatch', 'confirm-dispatch', 'Vibecoding Runtime Confirm Dispatch', 'dispatch envelope', 'allowed transition', 'review gate', 'task readiness gate', 'dispatchesDirectoryName', 'forbiddenDispatchActions', 'Vibecoding Runtime Dispatch Audit', 'dispatches --list', 'dispatches --show', 'dispatches --verify', 'dispatchAuditEnvelope', 'verifyDispatchEvent', 'read-only dispatch audit', 'confirm-dispatch event verification', 'dispatchClaimsDirectoryName', 'dispatchClaimSafety', 'dispatch-claim', 'dispatch-ack', 'dispatch-claims-list', 'dispatch event was claimed for manual pickup', 'dispatch claim acknowledgement was recorded', 'dispatch claim state was listed', 'dispatches --pickup', 'dispatch-pickup', 'Vibecoding Runtime Dispatch Pickup', 'dispatch pickup package was generated for manual use', 'auto_claim', 'session_create', 'execute --from-dispatch', 'Vibecoding Runtime Supervised Executor', 'execution envelope', 'executionSafety', 'skill_execution=false', 'runtime_action', 'supervised-run', 'generate-supervised-handoff-package', 'stage11AllowedExecutionSkills', 'executionsDirectoryName', 'Vibecoding Runtime Execution Audit', 'executions-audit-list', 'executions-audit-show', 'executions-audit-verify', 'validateExecutionEnvelope', 'execute --run requires --confirm', 'supervisedRunBaseEnvelope', 'writeRunningThenCompleteExecution', 'writeExecutionPayload', 'execution.lifecycle is required', 'execution.lifecycle must start with running', 'execution.lifecycle terminal status must match execution.status', 'evidence.stdout_excerpt is required', 'daemon --dry-run', 'daemon --once --confirm', 'Vibecoding Runtime Daemon Gate', 'daemon once-run envelope', 'daemonSafety', 'daemonRunsDirectoryName', 'dispatch_scan_execution'],
|
|
1296
|
+
'tools/vibe-runtime-check/index.mjs': ['Stage 3 JSON handoff', 'legacy fallback', 'Vibecoding Runtime Next Step', 'Handoff quality:', 'Stage 4 artifacts', 'artifacts --dry-run', 'artifacts --write', 'goal', 'key_decisions', 'Risk gate', 'Evidence gaps to fill', 'tasks --dry-run', 'tasks --write', '.vibecoding-state/tasks/', 'Spec compliance gate', 'review_status', 'depends_on', 'cyclic task dependency', 'Task readiness', 'validateTaskId', 'windowsReservedTaskBasenames', 'Vibecoding Runtime Handoff Validation', 'Task filter:', 'Duplicate task id:', 'status --json', 'validate-handoff --json', 'next --dry-run --json', 'tasks --dry-run --json', 'schema_version', 'state_present', 'selected_count', 'artifact_paths', 'next --dry-run --dispatch-intent', 'dispatch intent', 'runtimeBridge', 'platform_hints', 'next --confirm --dispatch', 'confirm-dispatch', 'dispatches --claim', 'dispatches --ack', 'dispatches --claims', 'dispatch-claims', 'Dispatch Claim / Ack Gate', 'Adapter Pickup Package Gate', 'dispatches --pickup', 'pickup package', 'Supervised Executor Gate', 'execute --from-dispatch', 'execution envelope', 'Supervised Real Executor v1', 'execute --confirm --run', 'supervised-run', 'runtime_action', 'executions --list', 'executions --show', 'executions --verify', 'execution lifecycle', 'allowlist', 'Optional Daemon / Watcher Gate', 'daemon --dry-run', 'daemon --once --confirm', 'daemon-runs'],
|
|
1297
|
+
'tools/vibe-release-check/index.mjs': ['runtime-json-handoff.md', 'runtime-legacy-handoff.md', 'runtime-blocked-handoff.md', 'runtime-stopped-handoff.md', 'runtime-quality-handoff.md', 'runtime-clean-dispatch-intent-handoff.json', 'artifacts', 'task-brief.md', 'review-gate.md', 'evidence.md', 'Goal', 'Key decisions', 'Review focus', 'Risk gate', 'Evidence gaps to fill', 'Decisions requiring evidence', 'taskArtifactFiles', 'tasks', 'brief.md', 'report.md', 'Spec compliance gate', 'invalidTaskIdHandoffFile', 'reservedTaskIdHandoffFile', 'trailingDotTaskIdHandoffFile', 'duplicateTaskIdHandoffFile', 'unknownDependencyHandoffFile', 'selfDependencyHandoffFile', 'cyclicDependencyHandoffFile', 'Task readiness:', 'invalidFencedJsonTaskIdHandoffFile', 'invalidReviewWaiverHandoffFile', 'validate-handoff', 'taskFilterTarget', 'review_status', 'assertJsonMarkers', 'schema_version', 'status --json', 'validate-handoff --json', 'next --dry-run --json', 'next --dry-run --dispatch-intent --json', 'next --dispatch-intent', 'next --confirm --dispatch-intent', 'dispatch_event', 'adapter_bridge', 'platform_hints', 'adapter_ready', 'gates.dispatchable', 'tasks --dry-run --task --json', 'tasks --dry-run --task dependency --json', 'record-handoff does not support --json in this stage', 'artifacts --dry-run', '--json', 'tasks --write', 'reset', 'selected_count', 'next --confirm --dispatch', 'runtime-invalid-transition-dispatch-handoff.json', 'confirm-dispatch', 'dispatches', 'safety.confirmed', 'dispatches --list --json', 'dispatches --show --json', 'dispatches --verify --json', 'dispatches --claim', 'dispatches --ack', 'dispatches --claims', 'dispatch-claims', 'Dispatch event already has an active claim', 'Dispatch claim actor mismatch', 'Invalid dispatch ack status: consumed', 'manual-pickup-recorded', 'dispatches --pickup', 'dispatch-pickup', 'pickup package', 'dispatch claim status is skipped; pickup package is read-only and does not imply execution readiness', 'pickup.dispatch_event_path', 'pickup.claim_state_path', 'verification.ok', 'execute --from-dispatch', 'execute --dry-run', 'execute --confirm', 'execute --run requires --confirm', 'execute --confirm --run', 'supervised-run', 'runtime_action', 'execution.lifecycle.0.status', 'execution.allowlisted', 'executions --list --json', 'executions --show --json', 'executions --verify --json', 'Execution file must not include path separators', 'execution envelope', 'skill_execution', 'missing-lifecycle.execution.json', 'missing-running.execution.json', 'mismatched-terminal.execution.json', 'invalid-timestamp.execution.json', 'bad-runtime-action.execution.json', 'bad-skill-execution.execution.json', 'bad-platform-api.execution.json', 'bad-git.execution.json', 'bad-worktree.execution.json', 'Execution target skill is not allowlisted for supervised run', 'daemon --dry-run', 'daemon --once --confirm', 'daemon-runs', 'daemon once-run envelope', 'dispatch_scan_execution', 'invalid-json.json', 'invalid-mode.json', 'missing-forbidden-action.json'],
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
function readRuntimeCheckStage3MarkerText() {
|
|
1301
|
+
return [
|
|
1302
|
+
readText('tools/vibe-runtime-check/index.mjs'),
|
|
1303
|
+
exists('tools/vibe-runtime-check/runtime-cli-surface-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-cli-surface-contracts.mjs') : '',
|
|
1304
|
+
exists('tools/vibe-runtime-check/runtime-control-plane-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-control-plane-contracts.mjs') : '',
|
|
1305
|
+
exists('tools/vibe-runtime-check/runtime-doc-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-doc-contracts.mjs') : '',
|
|
1306
|
+
exists('tools/vibe-runtime-check/runtime-doc-marker-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-doc-marker-contracts.mjs') : '',
|
|
1307
|
+
exists('tools/vibe-runtime-check/runtime-doc-contract-marker-specs.mjs') ? readText('tools/vibe-runtime-check/runtime-doc-contract-marker-specs.mjs') : '',
|
|
1308
|
+
runtimeDocContractMarkerSpecs.flatMap((spec) => spec.markers).join('\n'),
|
|
1309
|
+
exists('tools/vibe-runtime-check/runtime-tool-readme-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-tool-readme-contracts.mjs') : '',
|
|
1310
|
+
exists('tools/vibe-runtime-check/runtime-tool-readme-marker-specs.mjs') ? readText('tools/vibe-runtime-check/runtime-tool-readme-marker-specs.mjs') : '',
|
|
1311
|
+
runtimeToolReadmeMarkerSpecs.flatMap((spec) => spec.markers).join('\n'),
|
|
1312
|
+
runtimeToolCliSurfaceMarkerSpecs.flatMap((spec) => spec.markers).join('\n'),
|
|
1313
|
+
exists('tools/vibe-runtime-check/workflow-ux-contracts.mjs') ? readText('tools/vibe-runtime-check/workflow-ux-contracts.mjs') : '',
|
|
1314
|
+
exists('tools/vibe-runtime-check/runtime-release-closeout-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-release-closeout-contracts.mjs') : '',
|
|
1315
|
+
exists('tools/vibe-runtime-check/runtime-close-loop-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-close-loop-contracts.mjs') : '',
|
|
1316
|
+
exists('tools/vibe-runtime-check/runtime-governance-learning-token-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-governance-learning-token-contracts.mjs') : '',
|
|
1317
|
+
exists('tools/vibe-runtime-check/runtime-experience-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-experience-contracts.mjs') : '',
|
|
1318
|
+
exists('tools/vibe-runtime-check/runtime-experience-cli-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-experience-cli-contracts.mjs') : '',
|
|
1319
|
+
exists('tools/vibe-runtime-check/runtime-capability-registry-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-capability-registry-contracts.mjs') : '',
|
|
1320
|
+
exists('tools/vibe-runtime-check/runtime-automation-readiness-contracts.mjs') ? readText('tools/vibe-runtime-check/runtime-automation-readiness-contracts.mjs') : '',
|
|
1321
|
+
exists('tools/vibe-runtime-check/runtime-contract-registry.mjs') ? readText('tools/vibe-runtime-check/runtime-contract-registry.mjs') : '',
|
|
1322
|
+
exists('tools/vibe-runtime-check/product-artifact-contracts.mjs') ? readText('tools/vibe-runtime-check/product-artifact-contracts.mjs') : '',
|
|
1323
|
+
].join('\n');
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
function readReleaseCheckStage3MarkerText() {
|
|
1327
|
+
return [
|
|
1328
|
+
readText('tools/vibe-release-check/index.mjs'),
|
|
1329
|
+
exists('tools/vibe-release-check/release-check-runtime-ledger-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-ledger-suite.mjs') : '',
|
|
1330
|
+
exists('tools/vibe-release-check/release-check-runtime-ledger-fixtures.mjs') ? readText('tools/vibe-release-check/release-check-runtime-ledger-fixtures.mjs') : '',
|
|
1331
|
+
exists('tools/vibe-release-check/release-check-runtime-handoff-fixtures.mjs') ? readText('tools/vibe-release-check/release-check-runtime-handoff-fixtures.mjs') : '',
|
|
1332
|
+
exists('tools/vibe-release-check/release-check-runtime-handoff-fixture-specs.mjs') ? readText('tools/vibe-release-check/release-check-runtime-handoff-fixture-specs.mjs') : '',
|
|
1333
|
+
exists('tools/vibe-release-check/release-check-runtime-handoff-smoke-specs.mjs') ? readText('tools/vibe-release-check/release-check-runtime-handoff-smoke-specs.mjs') : '',
|
|
1334
|
+
exists('tools/vibe-release-check/release-check-runtime-task-fixtures.mjs') ? readText('tools/vibe-release-check/release-check-runtime-task-fixtures.mjs') : '',
|
|
1335
|
+
exists('tools/vibe-release-check/release-check-runtime-task-fixture-specs.mjs') ? readText('tools/vibe-release-check/release-check-runtime-task-fixture-specs.mjs') : '',
|
|
1336
|
+
exists('tools/vibe-release-check/release-check-runtime-dispatch-fixtures.mjs') ? readText('tools/vibe-release-check/release-check-runtime-dispatch-fixtures.mjs') : '',
|
|
1337
|
+
exists('tools/vibe-release-check/release-check-runtime-scheduler-fixtures.mjs') ? readText('tools/vibe-release-check/release-check-runtime-scheduler-fixtures.mjs') : '',
|
|
1338
|
+
exists('tools/vibe-release-check/release-check-runtime-handoff-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-handoff-suite.mjs') : '',
|
|
1339
|
+
exists('tools/vibe-release-check/release-check-runtime-task-artifact-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-task-artifact-suite.mjs') : '',
|
|
1340
|
+
exists('tools/vibe-release-check/release-check-runtime-dispatch-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-dispatch-suite.mjs') : '',
|
|
1341
|
+
exists('tools/vibe-release-check/release-check-runtime-flow-smoke.mjs') ? readText('tools/vibe-release-check/release-check-runtime-flow-smoke.mjs') : '',
|
|
1342
|
+
exists('tools/vibe-release-check/release-check-runtime-execution-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-execution-suite.mjs') : '',
|
|
1343
|
+
exists('tools/vibe-release-check/release-check-runtime-execution-base-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-execution-base-suite.mjs') : '',
|
|
1344
|
+
exists('tools/vibe-release-check/release-check-runtime-execution-approval-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-execution-approval-suite.mjs') : '',
|
|
1345
|
+
exists('tools/vibe-release-check/release-check-runtime-execution-scheduler-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-execution-scheduler-suite.mjs') : '',
|
|
1346
|
+
exists('tools/vibe-release-check/release-check-runtime-execution-recovery-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-execution-recovery-suite.mjs') : '',
|
|
1347
|
+
exists('tools/vibe-release-check/release-check-runtime-daemon-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-daemon-suite.mjs') : '',
|
|
1348
|
+
exists('tools/vibe-release-check/release-check-runtime-daemon-bounded-run-smoke-helpers.mjs') ? readText('tools/vibe-release-check/release-check-runtime-daemon-bounded-run-smoke-helpers.mjs') : '',
|
|
1349
|
+
exists('tools/vibe-release-check/release-check-runtime-automation-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-automation-suite.mjs') : '',
|
|
1350
|
+
exists('tools/vibe-release-check/release-check-runtime-automation-fixtures.mjs') ? readText('tools/vibe-release-check/release-check-runtime-automation-fixtures.mjs') : '',
|
|
1351
|
+
exists('tools/vibe-release-check/release-check-runtime-automation-methodology-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-automation-methodology-suite.mjs') : '',
|
|
1352
|
+
exists('tools/vibe-release-check/release-check-runtime-automation-subagents-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-automation-subagents-suite.mjs') : '',
|
|
1353
|
+
exists('tools/vibe-release-check/release-check-runtime-automation-platform-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-automation-platform-suite.mjs') : '',
|
|
1354
|
+
exists('tools/vibe-release-check/release-check-runtime-automation-source-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-automation-source-suite.mjs') : '',
|
|
1355
|
+
exists('tools/vibe-release-check/release-check-runtime-automation-governance-suite.mjs') ? readText('tools/vibe-release-check/release-check-runtime-automation-governance-suite.mjs') : '',
|
|
1356
|
+
exists('tools/vibe-release-check/release-check-command-manifest.mjs') ? readText('tools/vibe-release-check/release-check-command-manifest.mjs') : '',
|
|
1357
|
+
exists('tools/vibe-release-check/release-check-dispatch.mjs') ? readText('tools/vibe-release-check/release-check-dispatch.mjs') : '',
|
|
1358
|
+
].join('\n');
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
function readRepoRuntimeStage3MarkerText(file) {
|
|
1362
|
+
if (file === 'tools/vibe-runtime/index.mjs') return readExistingTextBundle(runtimeCliSurfaceFiles);
|
|
1363
|
+
if (file === 'tools/vibe-runtime-check/index.mjs') return readRuntimeCheckStage3MarkerText();
|
|
1364
|
+
if (file === 'tools/vibe-release-check/index.mjs') return readReleaseCheckStage3MarkerText();
|
|
1365
|
+
return readText(file);
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
function checkRepoRuntimeStage3Markers(layout) {
|
|
1369
|
+
if (layout.name !== 'repo') return;
|
|
1370
|
+
|
|
1371
|
+
for (const [file, markers] of Object.entries(repoRuntimeStage3MarkerChecks)) {
|
|
1372
|
+
if (!exists(file)) continue;
|
|
1373
|
+
|
|
1374
|
+
const text = readRepoRuntimeStage3MarkerText(file);
|
|
1375
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1376
|
+
if (missing.length === 0) {
|
|
1377
|
+
ok(`${file} includes Stage 3/4 runtime markers`);
|
|
1378
|
+
} else {
|
|
1379
|
+
fail(
|
|
1380
|
+
`${file} Stage 3/4 runtime markers incomplete`,
|
|
1381
|
+
`Missing marker(s): ${missing.join(', ')}`,
|
|
1382
|
+
'Keep JSON handoff, JSON-first parsing, legacy fallback, artifacts generation, and release smoke markers synchronized for repo layout.',
|
|
1383
|
+
);
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
function checkInstalledPlatformEntries(layout) {
|
|
1389
|
+
if (layout.name !== 'installed') return;
|
|
1390
|
+
|
|
1391
|
+
const hasClaudeEntry = exists('CLAUDE.md');
|
|
1392
|
+
const hasAgentsEntry = exists('AGENTS.md');
|
|
1393
|
+
const hasClaudeAdapter = layout.platforms.includes('claude');
|
|
1394
|
+
const hasCodexAdapter = layout.platforms.includes('codex');
|
|
1395
|
+
const hasCursorAdapter = layout.platforms.includes('cursor');
|
|
1396
|
+
|
|
1397
|
+
const missingEntries = layout.platforms.flatMap((platform) => platformEntryFiles[platform]).filter((file, index, files) => {
|
|
1398
|
+
return files.indexOf(file) === index && !exists(file);
|
|
1399
|
+
});
|
|
1400
|
+
|
|
1401
|
+
const extraEntryPlatforms = [];
|
|
1402
|
+
if (hasClaudeEntry && !hasClaudeAdapter) extraEntryPlatforms.push('claude');
|
|
1403
|
+
if (hasAgentsEntry && !hasCodexAdapter && !hasCursorAdapter) extraEntryPlatforms.push('codex/cursor');
|
|
1404
|
+
|
|
1405
|
+
if (missingEntries.length === 0) {
|
|
1406
|
+
ok('installed platform entry files match detected adapters');
|
|
1407
|
+
} else {
|
|
1408
|
+
warn(
|
|
1409
|
+
'installed platform entry files incomplete',
|
|
1410
|
+
`Missing entry file(s): ${missingEntries.join(', ')}`,
|
|
1411
|
+
'Run vibe-init for the matching platform or merge the corresponding template entry file.',
|
|
1412
|
+
);
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
if (extraEntryPlatforms.length > 0) {
|
|
1416
|
+
warn(
|
|
1417
|
+
'installed entry files reference platforms without adapters',
|
|
1418
|
+
`Entry-implied platform(s): ${extraEntryPlatforms.join(', ')}`,
|
|
1419
|
+
'Install the missing adapter or remove the stale platform entry from the project entry file.',
|
|
1420
|
+
);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
function checkInstalledConfig(layout) {
|
|
1425
|
+
if (layout.name !== 'installed') return;
|
|
1426
|
+
if (!exists(installConfigFile)) return;
|
|
1427
|
+
|
|
1428
|
+
let config;
|
|
1429
|
+
try {
|
|
1430
|
+
config = JSON.parse(readText(installConfigFile));
|
|
1431
|
+
ok(`${installConfigFile} is valid JSON`);
|
|
1432
|
+
} catch (error) {
|
|
1433
|
+
fail(`${installConfigFile} JSON invalid`, error.message, 'Run vibe repair --confirm to regenerate the install lifecycle config.');
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
const failures = [];
|
|
1438
|
+
if (config.version !== 1) failures.push('version must be 1');
|
|
1439
|
+
if (config.profile !== 'standard') failures.push('profile must be standard');
|
|
1440
|
+
if (!['lightweight', 'vibe-guided'].includes(config.interaction)) failures.push('interaction must be lightweight or vibe-guided');
|
|
1441
|
+
if (!Array.isArray(config.platforms) || config.platforms.length === 0) failures.push('platforms must be a non-empty array');
|
|
1442
|
+
else {
|
|
1443
|
+
const invalidPlatforms = config.platforms.filter((platform) => !platformNames.includes(platform));
|
|
1444
|
+
if (invalidPlatforms.length > 0) failures.push(`unsupported platform(s): ${invalidPlatforms.join(', ')}`);
|
|
1445
|
+
}
|
|
1446
|
+
if (typeof config.runtime?.enabled !== 'boolean') failures.push('runtime.enabled must be boolean');
|
|
1447
|
+
if (!config.managed_entries || typeof config.managed_entries !== 'object' || Array.isArray(config.managed_entries)) failures.push('managed_entries must be an object');
|
|
1448
|
+
|
|
1449
|
+
const lifecycle = config.lifecycle || {};
|
|
1450
|
+
for (const key of ['update', 'repair', 'uninstall']) {
|
|
1451
|
+
if (typeof lifecycle[key] !== 'string') failures.push(`lifecycle.${key} must be documented`);
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
if (failures.length > 0) {
|
|
1455
|
+
fail(
|
|
1456
|
+
`${installConfigFile} lifecycle contract invalid`,
|
|
1457
|
+
`Violation(s): ${failures.join(', ')}`,
|
|
1458
|
+
'Run vibe repair --confirm to regenerate .vibecoding/config.json from the installed project state.',
|
|
1459
|
+
);
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
ok(`${installConfigFile} preserves install lifecycle contract`);
|
|
1464
|
+
|
|
1465
|
+
const configuredEntries = config.managed_entries || {};
|
|
1466
|
+
for (const [file, managed] of Object.entries(configuredEntries)) {
|
|
1467
|
+
if (!entryFileMarkers[file]) continue;
|
|
1468
|
+
if (!exists(file)) {
|
|
1469
|
+
if (managed === true) warn(`${installConfigFile} references missing managed entry`, file, `Run vibe repair --confirm to restore ${file}.`);
|
|
1470
|
+
continue;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
const blockCount = [...readText(file).matchAll(managedBlockPattern)].length;
|
|
1474
|
+
if (managed === true && blockCount !== 1) {
|
|
1475
|
+
warn(`${installConfigFile} managed entry state is stale`, `${file} expected one managed block, found ${blockCount}.`, 'Run vibe repair --dry-run to inspect the repair plan.');
|
|
1476
|
+
} else if (managed === false && blockCount === 1) {
|
|
1477
|
+
warn(`${installConfigFile} managed entry state is stale`, `${file} has a managed block but config marks it false.`, 'Run vibe repair --confirm to refresh .vibecoding/config.json.');
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
function checkInstalledRuntimeOptIn(layout) {
|
|
1483
|
+
if (layout.name !== 'installed') return;
|
|
1484
|
+
if (!exists(runtimeManifestFile)) return;
|
|
1485
|
+
|
|
1486
|
+
ok(`${runtimeManifestFile} exists`);
|
|
1487
|
+
let manifest;
|
|
1488
|
+
try {
|
|
1489
|
+
manifest = JSON.parse(readText(runtimeManifestFile));
|
|
1490
|
+
} catch {
|
|
1491
|
+
fail(`${runtimeManifestFile} JSON invalid`, '', 'Reinstall runtime opt-in manifest with vibe-init --with-runtime.');
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
const failures = [];
|
|
1496
|
+
if (manifest.version !== 1) failures.push('version must be 1');
|
|
1497
|
+
if (manifest.stage !== 'Stage 55') failures.push('stage must be Stage 55');
|
|
1498
|
+
if (manifest.manifest_kind !== 'installed-runtime-opt-in') failures.push('manifest_kind must be installed-runtime-opt-in');
|
|
1499
|
+
if (manifest.opt_in !== true) failures.push('opt_in must be true');
|
|
1500
|
+
if (manifest.default_enabled !== false) failures.push('default_enabled must be false');
|
|
1501
|
+
if (manifest.kit_directory !== installedBase) failures.push(`kit_directory must be ${installedBase}`);
|
|
1502
|
+
|
|
1503
|
+
const installedProjectEntrypoints = manifest.installed_project_entrypoints || {};
|
|
1504
|
+
if (installedProjectEntrypoints.runtime_cli_present !== false) failures.push('installed_project_entrypoints.runtime_cli_present must be false');
|
|
1505
|
+
if (installedProjectEntrypoints.doctor_cli_present !== false) failures.push('installed_project_entrypoints.doctor_cli_present must be false');
|
|
1506
|
+
|
|
1507
|
+
const runtimeInvocation = manifest.runtime_invocation || {};
|
|
1508
|
+
if (runtimeInvocation.mode !== 'external-kit-repo-or-package') failures.push('runtime_invocation.mode must be external-kit-repo-or-package');
|
|
1509
|
+
if (runtimeInvocation.project_argument !== '<project-root>') failures.push('runtime_invocation.project_argument must be <project-root>');
|
|
1510
|
+
if (runtimeInvocation.local_project_tool_entrypoints !== false) failures.push('runtime_invocation.local_project_tool_entrypoints must be false');
|
|
1511
|
+
|
|
1512
|
+
const recommendedCommands = Array.isArray(manifest.recommended_commands) ? manifest.recommended_commands : [];
|
|
1513
|
+
if (recommendedCommands.length < 2) failures.push('recommended_commands must contain external kit repo/package examples');
|
|
1514
|
+
if (recommendedCommands.some((command) => /^node tools\//.test(String(command)))) failures.push('recommended_commands must not claim local project tools/ entrypoints');
|
|
1515
|
+
|
|
1516
|
+
const legacyEntrypoints = ['runtime_entrypoint', 'doctor_entrypoint'].filter((key) => key in manifest);
|
|
1517
|
+
if (legacyEntrypoints.length > 0) failures.push(`legacy direct entrypoint fields must be removed: ${legacyEntrypoints.join(', ')}`);
|
|
1518
|
+
|
|
1519
|
+
const boundaries = manifest.boundaries || {};
|
|
1520
|
+
for (const key of ['creates_state_directory_by_default', 'auto_runtime_enabled', 'hook_registration', 'daemon', 'watcher', 'mcp', 'platform_api', 'session_create', 'runtime_action', 'business_source_write', 'source_merge', 'git', 'worktree', 'external_network']) {
|
|
1521
|
+
if (boundaries[key] !== false) failures.push(`boundaries.${key} must be false`);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
if (failures.length === 0) {
|
|
1525
|
+
ok(`${runtimeManifestFile} preserves Stage 55 installed runtime opt-in boundary`);
|
|
1526
|
+
} else {
|
|
1527
|
+
fail(
|
|
1528
|
+
`${runtimeManifestFile} Stage 55 boundary invalid`,
|
|
1529
|
+
`Violation(s): ${failures.join(', ')}`,
|
|
1530
|
+
'Regenerate the installed runtime opt-in manifest so installed projects advertise opt-in metadata only, rely on an external Vibecoding kit runtime entrypoint, and keep hooks, daemon, MCP, state creation, and automatic runtime execution disabled by default.',
|
|
1531
|
+
);
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
function checkWorkflowEntryHealth(layout) {
|
|
1536
|
+
const skillFile = prefixed(layout.base, 'skills/using-vibecoding/SKILL.md');
|
|
1537
|
+
const entryFiles = [...new Set([...layout.requiredRootFiles, ...layout.optionalRootFiles].filter((file) => entryFileMarkers[file]))];
|
|
1538
|
+
const requiredMarkers = [
|
|
1539
|
+
'using-vibecoding',
|
|
1540
|
+
'workflow --start',
|
|
1541
|
+
'workflow --receipt',
|
|
1542
|
+
'entry --contract',
|
|
1543
|
+
'不要声称已使用某个 skill',
|
|
1544
|
+
'验证策略',
|
|
1545
|
+
'subagent 只有在用户明确允许',
|
|
1546
|
+
];
|
|
1547
|
+
|
|
1548
|
+
if (exists(skillFile)) {
|
|
1549
|
+
const text = readText(skillFile);
|
|
1550
|
+
const missing = requiredMarkers.filter((marker) => !text.includes(marker));
|
|
1551
|
+
if (missing.length === 0) ok(`${skillFile} preserves Stage 95 workflow entry protocol`);
|
|
1552
|
+
else fail(`${skillFile} Stage 95 workflow entry protocol incomplete`, `Missing marker(s): ${missing.join(', ')}`, 'Sync using-vibecoding with entry contract, visible receipt, workflow start, and permission boundaries.');
|
|
1553
|
+
} else {
|
|
1554
|
+
fail(`${skillFile} missing`, '', 'Restore using-vibecoding so workflow entry health can be checked.');
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
for (const file of entryFiles) {
|
|
1558
|
+
if (!exists(file)) {
|
|
1559
|
+
warn(`${file} unavailable for workflow entry health`, 'Entry file is absent for this layout.', 'Install or merge the matching Vibecoding entry template.');
|
|
1560
|
+
continue;
|
|
1561
|
+
}
|
|
1562
|
+
const text = readText(file);
|
|
1563
|
+
const markers = ['using-vibecoding', 'workflow --start', '验证策略', 'subagent 只有在用户明确允许'];
|
|
1564
|
+
const missing = markers.filter((marker) => !text.includes(marker));
|
|
1565
|
+
if (missing.length === 0) ok(`${file} includes Stage 95 start-here guidance`);
|
|
1566
|
+
else warn(`${file} Stage 95 start-here guidance incomplete`, `Missing marker(s): ${missing.join(', ')}`, `Update ${file} from templates/ so installed agents see the low-friction start-here protocol.`);
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
const runtimeReadme = layout.name === 'repo' ? 'tools/vibe-runtime/README.md' : '';
|
|
1570
|
+
if (runtimeReadme && exists(runtimeReadme)) {
|
|
1571
|
+
const text = readText(runtimeReadme);
|
|
1572
|
+
const missing = ['Stage 91-95', 'workflow --start', 'workflow --receipt', 'entry --contract', 'onboarding --brief'].filter((marker) => !text.includes(marker));
|
|
1573
|
+
if (missing.length === 0) ok(`${runtimeReadme} documents Stage 91-95 onboarding flow`);
|
|
1574
|
+
else warn(`${runtimeReadme} Stage 91-95 onboarding docs incomplete`, `Missing marker(s): ${missing.join(', ')}`, 'Document the entry contract, visible receipt, start command, sequence, and onboarding brief.');
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
function checkArchitectureHealth(layout) {
|
|
1579
|
+
if (layout.name !== 'repo') return;
|
|
1580
|
+
const tool = 'tools/vibe-architecture-check/index.mjs';
|
|
1581
|
+
if (!exists(tool)) {
|
|
1582
|
+
warn(`${tool} missing`, 'Architecture-first coding warnings are unavailable.', 'Restore the project-level architecture check tool.');
|
|
1583
|
+
return;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
const result = spawnSync(process.execPath, [tool, '--root', root, '--json'], { cwd: root, encoding: 'utf8', timeout: 30000, maxBuffer: 5 * 1024 * 1024 });
|
|
1587
|
+
if (result.status !== 0) {
|
|
1588
|
+
warn('architecture check could not run', (result.stderr || result.stdout || '').trim(), 'Keep tools/vibe-architecture-check/index.mjs runnable and warning-only.');
|
|
1589
|
+
return;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
try {
|
|
1593
|
+
const report = JSON.parse(result.stdout);
|
|
1594
|
+
const warningCount = Number(report.warning_count || 0);
|
|
1595
|
+
if (warningCount === 0) {
|
|
1596
|
+
ok('architecture check reports no drift warnings');
|
|
1597
|
+
} else {
|
|
1598
|
+
const examples = (report.warnings || []).slice(0, 3).map((item) => `${item.file}:${item.rule}`).join(', ');
|
|
1599
|
+
warn('architecture check reports warning-only drift signals', `${warningCount} warning(s). Examples: ${examples}`, 'Use these signals as module-boundary review prompts; warnings do not fail doctor.');
|
|
1600
|
+
}
|
|
1601
|
+
} catch (error) {
|
|
1602
|
+
warn('architecture check JSON output invalid', error.message, 'Keep architecture check --json machine-readable.');
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
function checkSubmodules(layout) {
|
|
1607
|
+
if (layout.name !== 'repo') return;
|
|
1608
|
+
|
|
1609
|
+
if (!exists('.gitmodules')) {
|
|
1610
|
+
warn('.gitmodules missing', 'fork/ references cannot be tracked as submodules.', 'Restore .gitmodules or document why fork/ references are not used.');
|
|
1611
|
+
return;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
ok('.gitmodules exists');
|
|
1615
|
+
|
|
1616
|
+
const gitmodules = readText('.gitmodules');
|
|
1617
|
+
for (const submodulePath of submodulePaths) {
|
|
1618
|
+
if (!gitmodules.includes(`path = ${submodulePath}`)) {
|
|
1619
|
+
warn(
|
|
1620
|
+
`${submodulePath} not listed in .gitmodules`,
|
|
1621
|
+
'Expected reference project submodule.',
|
|
1622
|
+
`Register it with git submodule add --force <url> ${submodulePath}, or update docs/submodule-guide.md if intentionally removed.`,
|
|
1623
|
+
);
|
|
1624
|
+
continue;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
if (!exists(submodulePath)) {
|
|
1628
|
+
warn(
|
|
1629
|
+
`${submodulePath} missing`,
|
|
1630
|
+
'Submodule path is registered but not present in the working tree.',
|
|
1631
|
+
'Run git submodule update --init --recursive.',
|
|
1632
|
+
);
|
|
1633
|
+
} else {
|
|
1634
|
+
ok(`${submodulePath} submodule path exists`);
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
function doctorResultGroup(status) {
|
|
1640
|
+
if (status === 'fail') return 'Blocking';
|
|
1641
|
+
if (status === 'warn') return 'Warnings';
|
|
1642
|
+
return 'Info';
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
function doctorNextManualAction(counts) {
|
|
1646
|
+
if (counts.fail > 0) return 'Fix blocking diagnostics first, then re-run doctor.';
|
|
1647
|
+
if (counts.warn > 0) return 'Review warnings and decide whether they block your local adoption path.';
|
|
1648
|
+
return 'No doctor action required.';
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
function printResults(layout) {
|
|
1652
|
+
const counts = results.reduce(
|
|
1653
|
+
(acc, item) => {
|
|
1654
|
+
acc[item.status] += 1;
|
|
1655
|
+
return acc;
|
|
1656
|
+
},
|
|
1657
|
+
{ ok: 0, warn: 0, fail: 0 },
|
|
1658
|
+
);
|
|
1659
|
+
|
|
1660
|
+
console.log('Vibecoding Kit Doctor');
|
|
1661
|
+
console.log(`Root: ${root}`);
|
|
1662
|
+
console.log(`Layout: ${layout.name}`);
|
|
1663
|
+
if (layout.platforms.length > 0) {
|
|
1664
|
+
console.log(`Platforms: ${layout.platforms.join(', ')}`);
|
|
1665
|
+
}
|
|
1666
|
+
console.log(`Health summary: ${counts.fail} blocking, ${counts.warn} warning, ${counts.ok} info/pass`);
|
|
1667
|
+
console.log(`Next manual action: ${doctorNextManualAction(counts)}`);
|
|
1668
|
+
console.log('');
|
|
1669
|
+
|
|
1670
|
+
for (const status of ['fail', 'warn', 'ok']) {
|
|
1671
|
+
const group = results.filter((item) => item.status === status);
|
|
1672
|
+
if (group.length === 0) continue;
|
|
1673
|
+
console.log(`${doctorResultGroup(status)}:`);
|
|
1674
|
+
for (const item of group) {
|
|
1675
|
+
const prefix = item.status === 'ok' ? '[ok]' : item.status === 'warn' ? '[warn]' : '[fail]';
|
|
1676
|
+
console.log(`${prefix} ${item.label}`);
|
|
1677
|
+
if (item.detail) {
|
|
1678
|
+
console.log(` ${item.detail}`);
|
|
1679
|
+
}
|
|
1680
|
+
if (item.fix) {
|
|
1681
|
+
console.log(` fix: ${item.fix}`);
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
console.log('');
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
console.log(`Result: ${counts.fail > 0 ? 'failed' : counts.warn > 0 ? 'passed with warnings' : 'passed'}`);
|
|
1688
|
+
console.log(`Checks: ${counts.ok} ok, ${counts.warn} warn, ${counts.fail} fail`);
|
|
1689
|
+
|
|
1690
|
+
if (counts.fail > 0) {
|
|
1691
|
+
process.exitCode = 1;
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
const layout = detectLayout();
|
|
1696
|
+
if (options.workflowEntry) {
|
|
1697
|
+
checkWorkflowEntryHealth(layout);
|
|
1698
|
+
printResults(layout);
|
|
1699
|
+
} else {
|
|
1700
|
+
checkDirectories(layout);
|
|
1701
|
+
checkRootFiles(layout);
|
|
1702
|
+
checkPackageScripts(layout);
|
|
1703
|
+
checkSkills(layout);
|
|
1704
|
+
checkHandoff(layout);
|
|
1705
|
+
checkAdapters(layout);
|
|
1706
|
+
checkDocs(layout);
|
|
1707
|
+
checkExamples(layout);
|
|
1708
|
+
checkTemplates(layout);
|
|
1709
|
+
checkHookFiles(layout);
|
|
1710
|
+
checkToolFiles(layout);
|
|
1711
|
+
checkArchitectureHealth(layout);
|
|
1712
|
+
checkPluginPackTool(layout);
|
|
1713
|
+
checkRepoGuideLinks(layout);
|
|
1714
|
+
checkRepoLocalStateIgnore(layout);
|
|
1715
|
+
checkRepoRuntimeStage3Markers(layout);
|
|
1716
|
+
checkInstalledPlatformEntries(layout);
|
|
1717
|
+
checkInstalledConfig(layout);
|
|
1718
|
+
checkInstalledRuntimeOptIn(layout);
|
|
1719
|
+
checkSubmodules(layout);
|
|
1720
|
+
printResults(layout);
|
|
1721
|
+
}
|