@opengsd/gsd-core 1.11.0 → 1.13.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.opencode/plugins/gsd-core.js +12 -0
- package/agents/gsd-code-fixer.md +1 -1
- package/agents/gsd-debug-session-manager.md +1 -1
- package/agents/gsd-debugger.md +1 -1
- package/agents/gsd-dom-verifier.md +169 -0
- package/agents/gsd-eval-auditor.md +1 -1
- package/agents/gsd-executor.md +78 -42
- package/agents/gsd-framework-selector.md +1 -3
- package/agents/gsd-intel-updater.md +1 -1
- package/agents/gsd-mempalace-curator.md +0 -1
- package/agents/gsd-pattern-mapper.md +11 -0
- package/agents/gsd-phase-researcher.md +3 -1
- package/agents/gsd-plan-checker.md +91 -112
- package/agents/gsd-planner.md +20 -4
- package/agents/gsd-project-researcher.md +1 -1
- package/agents/gsd-research-synthesizer.md +2 -2
- package/agents/gsd-roadmapper.md +15 -11
- package/agents/gsd-ui-checker.md +82 -7
- package/agents/gsd-ui-researcher.md +70 -3
- package/agents/gsd-verifier.md +24 -2
- package/bin/install.js +847 -200
- package/commands/gsd/discuss-phase.md +1 -1
- package/commands/gsd/execute-phase.md +1 -1
- package/commands/gsd/import.md +1 -1
- package/commands/gsd/ns-workflow.md +2 -1
- package/commands/gsd/phase.md +1 -1
- package/commands/gsd/quick-batch.md +105 -0
- package/commands/gsd/quick.md +8 -4
- package/commands/gsd/surface.md +18 -8
- package/gsd-core/bin/gsd-tools.cjs +761 -100
- package/gsd-core/bin/lib/active-workstream-store.cjs +8 -0
- package/gsd-core/bin/lib/adr-parser.cjs +13 -7
- package/gsd-core/bin/lib/agent-install-check.cjs +162 -0
- package/gsd-core/bin/lib/api-coverage.cjs +30 -9
- package/gsd-core/bin/lib/artifacts.cjs +2 -0
- package/gsd-core/bin/lib/assumption-delta.cjs +30 -11
- package/gsd-core/bin/lib/audit.cjs +163 -41
- package/gsd-core/bin/lib/broken-windows.cjs +306 -28
- package/gsd-core/bin/lib/capability-activation.cjs +27 -0
- package/gsd-core/bin/lib/capability-lock.cjs +10 -4
- package/gsd-core/bin/lib/capability-registry.cjs +785 -144
- package/gsd-core/bin/lib/capability-state.cjs +25 -4
- package/gsd-core/bin/lib/capability-validator.cjs +321 -18
- package/gsd-core/bin/lib/capability-writer.cjs +14 -4
- package/gsd-core/bin/lib/check-command-router.cjs +229 -6
- package/gsd-core/bin/lib/claude-orchestration.cjs +10 -25
- package/gsd-core/bin/lib/cli-exit.cjs +496 -10
- package/gsd-core/bin/lib/clusters.cjs +1 -0
- package/gsd-core/bin/lib/code-review-depth.cjs +288 -0
- package/gsd-core/bin/lib/codex-agent-toml.cjs +410 -4
- package/gsd-core/bin/lib/command-aliases.cjs +16 -0
- package/gsd-core/bin/lib/command-arg-projection.cjs +144 -14
- package/gsd-core/bin/lib/command-routing-hub.cjs +31 -2
- package/gsd-core/bin/lib/commands.cjs +877 -54
- package/gsd-core/bin/lib/complexity-trigger.cjs +26 -6
- package/gsd-core/bin/lib/config-loader.cjs +121 -29
- package/gsd-core/bin/lib/config.cjs +92 -2
- package/gsd-core/bin/lib/configuration.cjs +129 -37
- package/gsd-core/bin/lib/core-utils.cjs +118 -14
- package/gsd-core/bin/lib/decisions.cjs +213 -1
- package/gsd-core/bin/lib/edge-probe.cjs +23 -2
- package/gsd-core/bin/lib/estimate-cli.cjs +55 -11
- package/gsd-core/bin/lib/exit-code-registry.cjs +98 -0
- package/gsd-core/bin/lib/file-overlap-partitioner.cjs +74 -0
- package/gsd-core/bin/lib/frontmatter.cjs +975 -326
- package/gsd-core/bin/lib/gap-checker.cjs +41 -8
- package/gsd-core/bin/lib/git-base-branch.cjs +182 -39
- package/gsd-core/bin/lib/health-diagnostic-rules/consistency.cjs +7 -3
- package/gsd-core/bin/lib/health-diagnostic-rules/phase-structure.cjs +8 -2
- package/gsd-core/bin/lib/health-diagnostic-rules/roadmap-disk-consistency.cjs +60 -14
- package/gsd-core/bin/lib/health-diagnostic-rules/state-consistency.cjs +75 -22
- package/gsd-core/bin/lib/health-diagnostic-rules/worktree-health.cjs +22 -8
- package/gsd-core/bin/lib/health-diagnostic.cjs +23 -3
- package/gsd-core/bin/lib/host-integration.cjs +96 -11
- package/gsd-core/bin/lib/init-command-router.cjs +132 -21
- package/gsd-core/bin/lib/init.cjs +252 -56
- package/gsd-core/bin/lib/install-engine.cjs +252 -15
- package/gsd-core/bin/lib/install-model-override-resolver.cjs +78 -1
- package/gsd-core/bin/lib/install-profiles.cjs +100 -18
- package/gsd-core/bin/lib/installer-migration-report.cjs +4 -0
- package/gsd-core/bin/lib/installer-migrations/010-antigravity-retire-confighome-artifacts.cjs +169 -0
- package/gsd-core/bin/lib/installer-migrations.cjs +10 -7
- package/gsd-core/bin/lib/intel.cjs +101 -26
- package/gsd-core/bin/lib/io.cjs +195 -15
- package/gsd-core/bin/lib/learnings.cjs +85 -14
- package/gsd-core/bin/lib/legacy-cleanup.cjs +8 -2
- package/gsd-core/bin/lib/loop-resolver.cjs +14 -8
- package/gsd-core/bin/lib/markdown-table.cjs +175 -4
- package/gsd-core/bin/lib/milestone.cjs +112 -7
- package/gsd-core/bin/lib/model-catalog.cjs +177 -19
- package/gsd-core/bin/lib/model-resolver.cjs +10 -28
- package/gsd-core/bin/lib/onboard-projection.cjs +5 -1
- package/gsd-core/bin/lib/phase-command-router.cjs +13 -6
- package/gsd-core/bin/lib/phase-estimation.cjs +17 -8
- package/gsd-core/bin/lib/phase-id.cjs +321 -13
- package/gsd-core/bin/lib/phase-lifecycle.cjs +24 -16
- package/gsd-core/bin/lib/phase-locator.cjs +138 -17
- package/gsd-core/bin/lib/phase.cjs +1175 -115
- package/gsd-core/bin/lib/plan-document.cjs +273 -0
- package/gsd-core/bin/lib/plan-scan.cjs +13 -2
- package/gsd-core/bin/lib/planning-command-router.cjs +61 -0
- package/gsd-core/bin/lib/planning-inspect.cjs +1168 -0
- package/gsd-core/bin/lib/planning-snapshot.cjs +165 -34
- package/gsd-core/bin/lib/planning-workspace.cjs +159 -28
- package/gsd-core/bin/lib/probe-core.cjs +4 -1
- package/gsd-core/bin/lib/profile-pipeline-command-router.cjs +50 -7
- package/gsd-core/bin/lib/profile-pipeline.cjs +6 -3
- package/gsd-core/bin/lib/quick-batch-command-router.cjs +285 -0
- package/gsd-core/bin/lib/quick-batch-dispatch.cjs +250 -0
- package/gsd-core/bin/lib/quick-batch.cjs +840 -0
- package/gsd-core/bin/lib/real-home-guard.cjs +419 -0
- package/gsd-core/bin/lib/refactor-trigger-command-router.cjs +71 -45
- package/gsd-core/bin/lib/review-lane-descriptor.cjs +62 -14
- package/gsd-core/bin/lib/review-lane-invocation.cjs +73 -1
- package/gsd-core/bin/lib/review-lane-runner.cjs +136 -10
- package/gsd-core/bin/lib/roadmap-command-router.cjs +45 -31
- package/gsd-core/bin/lib/roadmap-parser.cjs +577 -41
- package/gsd-core/bin/lib/roadmap.cjs +248 -64
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +329 -41
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +16 -17
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +320 -109
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +487 -83
- package/gsd-core/bin/lib/runtime-identity.cjs +234 -0
- package/gsd-core/bin/lib/runtime-slash.cjs +72 -2
- package/gsd-core/bin/lib/shell-command-projection.cjs +75 -8
- package/gsd-core/bin/lib/smart-entry.cjs +19 -31
- package/gsd-core/bin/lib/spec-section.cjs +12 -7
- package/gsd-core/bin/lib/state-command-router.cjs +47 -18
- package/gsd-core/bin/lib/state-contract.cjs +359 -0
- package/gsd-core/bin/lib/state-document.cjs +216 -5
- package/gsd-core/bin/lib/state-md-schema.cjs +231 -0
- package/gsd-core/bin/lib/state-transition.cjs +850 -145
- package/gsd-core/bin/lib/state.cjs +1629 -287
- package/gsd-core/bin/lib/surface.cjs +33 -10
- package/gsd-core/bin/lib/task-command-router.cjs +111 -1
- package/gsd-core/bin/lib/task-content-resolution.cjs +368 -0
- package/gsd-core/bin/lib/tdd-red-evidence.cjs +133 -0
- package/gsd-core/bin/lib/teams-status.cjs +4 -1
- package/gsd-core/bin/lib/uat-predicate.cjs +58 -20
- package/gsd-core/bin/lib/uat.cjs +2542 -387
- package/gsd-core/bin/lib/ui-consideration-probe.cjs +9 -1
- package/gsd-core/bin/lib/ui-safety-gate.cjs +37 -7
- package/gsd-core/bin/lib/unusable-input.cjs +13 -0
- package/gsd-core/bin/lib/update-context.cjs +6 -2
- package/gsd-core/bin/lib/validate-command-router.cjs +2 -2
- package/gsd-core/bin/lib/validate.cjs +230 -12
- package/gsd-core/bin/lib/vendor/README.md +43 -5
- package/gsd-core/bin/lib/vendor/js-yaml.cjs +3014 -0
- package/gsd-core/bin/lib/verification-command-router.cjs +2 -1
- package/gsd-core/bin/lib/verification.cjs +287 -13
- package/gsd-core/bin/lib/verify-command-grounding.cjs +846 -0
- package/gsd-core/bin/lib/verify-command-router.cjs +1 -0
- package/gsd-core/bin/lib/verify.cjs +441 -56
- package/gsd-core/bin/lib/workstream-inventory.cjs +20 -2
- package/gsd-core/bin/lib/workstream-name-policy.cjs +25 -4
- package/gsd-core/bin/lib/worktree-base-ref.cjs +66 -12
- package/gsd-core/bin/lib/worktree-safety.cjs +185 -21
- package/gsd-core/bin/shared/config-defaults.manifest.json +7 -1
- package/gsd-core/bin/shared/config-schema.manifest.json +13 -0
- package/gsd-core/bin/shared/exit-codes.json +8 -0
- package/gsd-core/bin/shared/exit-codes.sh +20 -0
- package/gsd-core/bin/shared/model-catalog.json +8 -1
- package/gsd-core/bin/verify-reapply-patches.cjs +70 -3
- package/gsd-core/references/agent-contracts.md +6 -5
- package/gsd-core/references/api-coverage.md +24 -2
- package/gsd-core/references/autonomous-smart-discuss.md +3 -3
- package/gsd-core/references/checkpoints.md +37 -19
- package/gsd-core/references/decimal-phase-calculation.md +5 -5
- package/gsd-core/references/edge-probe.md +17 -5
- package/gsd-core/references/execute-mvp-tdd.md +18 -18
- package/gsd-core/references/execute-phase-between-wave-reset.md +9 -12
- package/gsd-core/references/execute-phase-response-language.md +6 -0
- package/gsd-core/references/execute-phase-wave-guard.md +11 -9
- package/gsd-core/references/executor-examples.md +42 -0
- package/gsd-core/references/failing-direction.md +78 -0
- package/gsd-core/references/few-shot-examples/plan-checker.md +15 -15
- package/gsd-core/references/gate-prompts.md +1 -1
- package/gsd-core/references/git-integration.md +5 -5
- package/gsd-core/references/git-planning-commit.md +3 -3
- package/gsd-core/references/gsd-run-resolver.md +1 -1
- package/gsd-core/references/loop-hook-dispatch.md +22 -0
- package/gsd-core/references/model-profiles.md +1 -1
- package/gsd-core/references/mvp-concepts.md +2 -2
- package/gsd-core/references/nyquist-compliance.md +74 -0
- package/gsd-core/references/offer-next.md +3 -5
- package/gsd-core/references/phase-argument-parsing.md +3 -3
- package/gsd-core/references/plan-checker-examples.md +41 -0
- package/gsd-core/references/planner-antipatterns.md +25 -0
- package/gsd-core/references/planner-chunked.md +5 -1
- package/gsd-core/references/planner-coupling.md +42 -0
- package/gsd-core/references/planner-failing-direction.md +53 -0
- package/gsd-core/references/planner-human-verify-mode.md +15 -1
- package/gsd-core/references/planner-quick-batch.md +71 -0
- package/gsd-core/references/planner-reviews.md +47 -0
- package/gsd-core/references/planner-revision.md +76 -3
- package/gsd-core/references/planner-verify-command-grounding.md +17 -0
- package/gsd-core/references/planning-config.md +39 -9
- package/gsd-core/references/response-language-directive.md +9 -0
- package/gsd-core/references/reviewer-instances.md +31 -0
- package/gsd-core/references/revision-loop.md +118 -11
- package/gsd-core/references/runtime-aware-dispatch.md +1 -1
- package/gsd-core/references/tdd.md +15 -12
- package/gsd-core/references/ui-brand.md +65 -21
- package/gsd-core/references/ui-consideration-probe.md +1 -1
- package/gsd-core/references/universal-anti-patterns.md +2 -2
- package/gsd-core/references/verifier-evidence-gate.md +160 -0
- package/gsd-core/references/verify-command-path-resolvability.md +42 -0
- package/gsd-core/references/verify-mvp-mode.md +1 -1
- package/gsd-core/references/workstream-flag.md +11 -11
- package/gsd-core/templates/README.md +1 -1
- package/gsd-core/templates/SECURITY.md +3 -3
- package/gsd-core/templates/UI-SPEC.md +25 -3
- package/gsd-core/templates/VALIDATION.md +3 -3
- package/gsd-core/templates/phase-prompt.md +7 -0
- package/gsd-core/templates/state.md +7 -0
- package/gsd-core/templates/verification-report.md +5 -0
- package/gsd-core/workflows/_runtime-launcher.snippet.sh +1 -1
- package/gsd-core/workflows/add-backlog.md +3 -1
- package/gsd-core/workflows/add-phase.md +5 -3
- package/gsd-core/workflows/add-tests.md +4 -9
- package/gsd-core/workflows/add-todo.md +2 -2
- package/gsd-core/workflows/ai-integration-phase.md +5 -10
- package/gsd-core/workflows/analyze-dependencies.md +2 -0
- package/gsd-core/workflows/audit-fix.md +14 -3
- package/gsd-core/workflows/audit-milestone.md +11 -9
- package/gsd-core/workflows/audit-uat.md +19 -2
- package/gsd-core/workflows/autonomous/steps/converge-fail-fast.md +2 -2
- package/gsd-core/workflows/autonomous.md +12 -26
- package/gsd-core/workflows/check-todos.md +2 -2
- package/gsd-core/workflows/cleanup.md +3 -3
- package/gsd-core/workflows/code-review/steps/structural-pre-pass.md +16 -14
- package/gsd-core/workflows/code-review-fix.md +3 -1
- package/gsd-core/workflows/code-review.md +192 -69
- package/gsd-core/workflows/complete-milestone.md +28 -14
- package/gsd-core/workflows/debug.md +6 -4
- package/gsd-core/workflows/diagnose-issues.md +17 -7
- package/gsd-core/workflows/discuss-phase/modes/advisor.md +3 -1
- package/gsd-core/workflows/discuss-phase/modes/all.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/analyze.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/auto.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/batch.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/chain.md +5 -7
- package/gsd-core/workflows/discuss-phase/modes/default.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/power.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/text.md +3 -1
- package/gsd-core/workflows/discuss-phase/templates/context.md +2 -0
- package/gsd-core/workflows/discuss-phase/templates/discussion-log.md +2 -0
- package/gsd-core/workflows/discuss-phase-assumptions/steps/auto-advance-dispatch.md +1 -3
- package/gsd-core/workflows/discuss-phase-assumptions.md +3 -3
- package/gsd-core/workflows/discuss-phase-power.md +2 -0
- package/gsd-core/workflows/discuss-phase.md +2 -2
- package/gsd-core/workflows/do.md +46 -19
- package/gsd-core/workflows/docs-update.md +6 -5
- package/gsd-core/workflows/edit-phase.md +3 -1
- package/gsd-core/workflows/eval-review.md +5 -10
- package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +3 -1
- package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +129 -11
- package/gsd-core/workflows/execute-phase/steps/gap-closure-artifacts.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/partial-wave.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/per-plan-executor-routing.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +29 -5
- package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +2 -2
- package/gsd-core/workflows/execute-phase/steps/protected-branch.md +21 -0
- package/gsd-core/workflows/execute-phase/steps/regression-gate-run.md +4 -2
- package/gsd-core/workflows/execute-phase/steps/tdd-applicability-resolution.md +25 -0
- package/gsd-core/workflows/execute-phase/steps/wave-post-gate-hooks.md +39 -0
- package/gsd-core/workflows/execute-phase/steps/worktree-recovery-policy.md +2 -0
- package/gsd-core/workflows/execute-phase.md +68 -66
- package/gsd-core/workflows/execute-plan.md +25 -20
- package/gsd-core/workflows/explore.md +3 -1
- package/gsd-core/workflows/extract-learnings.md +3 -1
- package/gsd-core/workflows/fast.md +8 -2
- package/gsd-core/workflows/forensics.md +3 -1
- package/gsd-core/workflows/graduation.md +6 -6
- package/gsd-core/workflows/health.md +4 -7
- package/gsd-core/workflows/help/modes/brief.md +2 -0
- package/gsd-core/workflows/help/modes/default.md +2 -0
- package/gsd-core/workflows/help/modes/full.md +12 -0
- package/gsd-core/workflows/help/modes/topic.md +2 -0
- package/gsd-core/workflows/help.md +2 -0
- package/gsd-core/workflows/import.md +17 -14
- package/gsd-core/workflows/inbox.md +5 -6
- package/gsd-core/workflows/ingest-docs.md +45 -12
- package/gsd-core/workflows/insert-phase.md +7 -5
- package/gsd-core/workflows/list-phase-assumptions.md +2 -0
- package/gsd-core/workflows/list-seeds.md +7 -3
- package/gsd-core/workflows/list-workspaces.md +3 -1
- package/gsd-core/workflows/manager.md +15 -26
- package/gsd-core/workflows/map-codebase.md +3 -1
- package/gsd-core/workflows/milestone-summary.md +3 -1
- package/gsd-core/workflows/mvp-phase.md +3 -3
- package/gsd-core/workflows/new-milestone.md +10 -22
- package/gsd-core/workflows/new-project/steps/auto-mode-config.md +1 -1
- package/gsd-core/workflows/new-project.md +17 -29
- package/gsd-core/workflows/new-workspace.md +2 -2
- package/gsd-core/workflows/next.md +4 -2
- package/gsd-core/workflows/node-repair.md +2 -0
- package/gsd-core/workflows/note.md +2 -0
- package/gsd-core/workflows/onboard.md +1 -1
- package/gsd-core/workflows/pause-work.md +20 -5
- package/gsd-core/workflows/plan-phase/steps/adr-ingest-express-path.md +1 -1
- package/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +100 -18
- package/gsd-core/workflows/plan-phase/steps/prd-express-path.md +4 -4
- package/gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md +12 -3
- package/gsd-core/workflows/plan-phase.md +251 -54
- package/gsd-core/workflows/plan-review-convergence.md +148 -19
- package/gsd-core/workflows/plant-seed.md +3 -3
- package/gsd-core/workflows/pr-branch.md +195 -51
- package/gsd-core/workflows/profile-user.md +17 -15
- package/gsd-core/workflows/progress/steps/forensic-audit.md +1 -1
- package/gsd-core/workflows/progress.md +52 -15
- package/gsd-core/workflows/quick/steps/discussion-phase.md +1 -3
- package/gsd-core/workflows/quick/steps/plan-checker-loop.md +38 -5
- package/gsd-core/workflows/quick/steps/quick-verification.md +2 -4
- package/gsd-core/workflows/quick/steps/research-phase.md +5 -7
- package/gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.md +3 -3
- package/gsd-core/workflows/quick-batch/steps/batch-init.md +55 -0
- package/gsd-core/workflows/quick-batch/steps/completion.md +65 -0
- package/gsd-core/workflows/quick-batch/steps/merge-wave.md +100 -0
- package/gsd-core/workflows/quick-batch/steps/plan-checker-loop.md +147 -0
- package/gsd-core/workflows/quick-batch/steps/planner-wave.md +158 -0
- package/gsd-core/workflows/quick-batch/steps/research-phase.md +95 -0
- package/gsd-core/workflows/quick-batch/steps/resume-mode.md +49 -0
- package/gsd-core/workflows/quick-batch/steps/verification-wave.md +73 -0
- package/gsd-core/workflows/quick-batch/steps/worktree-dispatch.md +169 -0
- package/gsd-core/workflows/quick-batch.md +203 -0
- package/gsd-core/workflows/quick.md +33 -32
- package/gsd-core/workflows/reapply-patches.md +2 -0
- package/gsd-core/workflows/remove-phase.md +6 -4
- package/gsd-core/workflows/remove-workspace.md +3 -3
- package/gsd-core/workflows/resume-project.md +14 -14
- package/gsd-core/workflows/review.md +404 -21
- package/gsd-core/workflows/scan.md +3 -1
- package/gsd-core/workflows/section-manifest.json +12 -0
- package/gsd-core/workflows/secure-phase.md +3 -3
- package/gsd-core/workflows/session-report.md +2 -0
- package/gsd-core/workflows/settings-advanced.md +9 -9
- package/gsd-core/workflows/settings-integrations.md +66 -32
- package/gsd-core/workflows/settings.md +4 -6
- package/gsd-core/workflows/ship.md +22 -16
- package/gsd-core/workflows/sketch-wrap-up.md +13 -17
- package/gsd-core/workflows/sketch.md +13 -19
- package/gsd-core/workflows/smart-entry.md +4 -6
- package/gsd-core/workflows/spec-phase.md +31 -4
- package/gsd-core/workflows/spike-wrap-up.md +9 -11
- package/gsd-core/workflows/spike.md +21 -32
- package/gsd-core/workflows/stats.md +4 -2
- package/gsd-core/workflows/sync-skills.md +13 -5
- package/gsd-core/workflows/thread.md +13 -7
- package/gsd-core/workflows/transition.md +7 -5
- package/gsd-core/workflows/ui-phase.md +36 -21
- package/gsd-core/workflows/ui-review.md +7 -11
- package/gsd-core/workflows/ultraplan-phase.md +7 -13
- package/gsd-core/workflows/undo.md +9 -17
- package/gsd-core/workflows/update.md +47 -48
- package/gsd-core/workflows/validate-phase.md +3 -3
- package/gsd-core/workflows/verify-work/steps/automated-ui-verification.md +25 -1
- package/gsd-core/workflows/verify-work/steps/mvp-uat-framing.md +1 -1
- package/gsd-core/workflows/verify-work.md +106 -21
- package/hooks/dist/gsd-agent-isolation-guard.js +77 -38
- package/hooks/dist/gsd-check-update-worker.js +19 -2
- package/hooks/dist/gsd-config-reload.js +18 -12
- package/hooks/dist/gsd-context-monitor.js +302 -22
- package/hooks/dist/gsd-cursor-post-tool.js +3 -1
- package/hooks/dist/gsd-cursor-pre-tool.js +3 -1
- package/hooks/dist/gsd-cursor-session-start.js +2 -1
- package/hooks/dist/gsd-cursor-stop.js +2 -1
- package/hooks/dist/gsd-cursor-subagent-start.js +28 -23
- package/hooks/dist/gsd-cursor-subagent-stop.js +3 -1
- package/hooks/dist/gsd-ensure-canonical-path.js +2 -1
- package/hooks/dist/gsd-graphify-update.sh +22 -18
- package/hooks/dist/gsd-node-runner.sh +77 -0
- package/hooks/dist/gsd-phase-boundary.sh +1 -0
- package/hooks/dist/gsd-prompt-guard.js +46 -12
- package/hooks/dist/gsd-read-guard.js +18 -7
- package/hooks/dist/gsd-read-injection-scanner.js +22 -13
- package/hooks/dist/gsd-secret-read-guard.js +1079 -0
- package/hooks/dist/gsd-session-state.sh +1 -0
- package/hooks/dist/gsd-statusline.js +222 -29
- package/hooks/dist/gsd-validate-commit.sh +523 -12
- package/hooks/dist/gsd-windsurf-pre-command.js +16 -11
- package/hooks/dist/gsd-windsurf-pre-write.js +22 -13
- package/hooks/dist/gsd-workflow-guard.js +36 -17
- package/hooks/dist/gsd-worktree-path-guard.js +36 -21
- package/hooks/dist/gsd-write-guard.js +35 -25
- package/hooks/dist/lib/cli-exit.js +560 -0
- package/hooks/dist/lib/exit-code-registry.js +98 -0
- package/hooks/dist/lib/git-cmd.js +210 -1
- package/hooks/dist/lib/git-probe.js +84 -0
- package/hooks/dist/lib/hook-exit.js +81 -0
- package/hooks/dist/lib/injection-patterns.js +36 -6
- package/hooks/dist/managed-hooks-registry.cjs +4 -0
- package/hooks/gsd-agent-isolation-guard.js +77 -38
- package/hooks/gsd-check-update-worker.js +19 -2
- package/hooks/gsd-config-reload.js +18 -12
- package/hooks/gsd-context-monitor.js +302 -22
- package/hooks/gsd-cursor-post-tool.js +3 -1
- package/hooks/gsd-cursor-pre-tool.js +3 -1
- package/hooks/gsd-cursor-session-start.js +2 -1
- package/hooks/gsd-cursor-stop.js +2 -1
- package/hooks/gsd-cursor-subagent-start.js +28 -23
- package/hooks/gsd-cursor-subagent-stop.js +3 -1
- package/hooks/gsd-ensure-canonical-path.js +2 -1
- package/hooks/gsd-graphify-update.sh +22 -18
- package/hooks/gsd-node-runner.sh +77 -0
- package/hooks/gsd-phase-boundary.sh +1 -0
- package/hooks/gsd-prompt-guard.js +46 -12
- package/hooks/gsd-read-guard.js +18 -7
- package/hooks/gsd-read-injection-scanner.js +22 -13
- package/hooks/gsd-secret-read-guard.js +1079 -0
- package/hooks/gsd-session-state.sh +1 -0
- package/hooks/gsd-statusline.js +222 -29
- package/hooks/gsd-validate-commit.sh +523 -12
- package/hooks/gsd-windsurf-pre-command.js +16 -11
- package/hooks/gsd-windsurf-pre-write.js +22 -13
- package/hooks/gsd-workflow-guard.js +36 -17
- package/hooks/gsd-worktree-path-guard.js +36 -21
- package/hooks/gsd-write-guard.js +35 -25
- package/hooks/hooks.json +6 -0
- package/hooks/lib/cli-exit.js +560 -0
- package/hooks/lib/exit-code-registry.js +98 -0
- package/hooks/lib/git-cmd.js +210 -1
- package/hooks/lib/git-probe.js +84 -0
- package/hooks/lib/hook-exit.js +81 -0
- package/hooks/lib/injection-patterns.js +36 -6
- package/hooks/managed-hooks-registry.cjs +4 -0
- package/package.json +14 -9
- package/scripts/base64-scan.sh +74 -12
- package/scripts/build-hooks.js +12 -0
- package/scripts/check-glossary-refs.cjs +77 -15
- package/scripts/check-mutation-score-ratchet.cjs +156 -0
- package/scripts/ci-check-job-near-cap.cjs +49 -0
- package/scripts/ci-pr-mergeability.cjs +262 -0
- package/scripts/ci-test-scope.cjs +52 -12
- package/scripts/ci-timeout-report.cjs +230 -0
- package/scripts/docs-guard-registry.cjs +406 -0
- package/scripts/gen-capability-registry.cjs +8 -6
- package/scripts/gen-exit-code-docs.cjs +318 -0
- package/scripts/gen-exit-code-registry.cjs +891 -0
- package/scripts/gen-features.cjs +836 -0
- package/scripts/gen-hooks-cli-exit.cjs +239 -0
- package/scripts/gen-install-tree-fixtures.cjs +2 -2
- package/scripts/gen-loop-host-contract.cjs +189 -4
- package/scripts/gen-scripts-cli-exit.cjs +185 -0
- package/scripts/gen-state-md-docs.cjs +727 -0
- package/scripts/{test-failure-reasons.cjs → gsd-test-gate-reasons.cjs} +6 -0
- package/scripts/lib/ci-job-timing.cjs +72 -0
- package/scripts/lib/cli-exit.cjs +546 -44
- package/scripts/lib/drift-scan.cjs +32 -2
- package/scripts/lib/exit-code-registry.cjs +98 -0
- package/scripts/lib/ndjson-reporter.cjs +119 -0
- package/scripts/lib/shellcheck-fetch.cjs +247 -0
- package/scripts/lint-allow-test-rule-refs.allowlist.json +0 -6
- package/scripts/lint-allow-test-rule-refs.effective-ceiling.json +1 -1
- package/scripts/lint-allow-test-rule-refs.unverified-ceiling.json +1 -1
- package/scripts/lint-docs-guard-registration.cjs +495 -0
- package/scripts/lint-docs-guard-registration.exempt-baseline.cjs +198 -0
- package/scripts/lint-eslint-glob-coverage.allowlist.json +4 -0
- package/scripts/{lint-fix-has-regression-test.cjs → lint-fix-has-regression-tests.cjs} +12 -6
- package/scripts/lint-health-diagnostic-rule-table.cjs +65 -8
- package/scripts/lint-mutation-test-derivation-drift.cjs +86 -0
- package/scripts/lint-phase-enumeration-drift.cjs +45 -14
- package/scripts/lint-phase-id-drift.cjs +133 -8
- package/scripts/lint-planning-prompt-drift.cjs +38 -1
- package/scripts/lint-portable-grep.cjs +176 -0
- package/scripts/lint-removed-but-needed.cjs +184 -16
- package/scripts/lint-response-language-coverage.cjs +524 -0
- package/scripts/lint-seam-enforcement.cjs +182 -0
- package/scripts/lint-slug-derivation-drift.cjs +921 -0
- package/scripts/lint-source-test-name-collision.cjs +241 -0
- package/scripts/lint-state-write-path-drift.cjs +337 -432
- package/scripts/lint-test-file-count.allowlist.json +124 -4
- package/scripts/lint-test-file-count.cjs +25 -3
- package/scripts/lint-unreachable-guard-drift.cjs +51 -64
- package/scripts/lint-vendored-deps.cjs +208 -35
- package/scripts/lint-workflow-shellcheck-baseline.json +1027 -0
- package/scripts/lint-workflow-shellcheck.cjs +614 -0
- package/scripts/mutation-matrix.cjs +599 -50
- package/scripts/npm-audit-baseline.cjs +376 -0
- package/scripts/prompt-injection-scan.sh +83 -14
- package/scripts/require-issue-link-policy.cjs +16 -1
- package/scripts/secret-scan.sh +75 -13
- package/scripts/select-docs-guards.cjs +56 -0
- package/scripts/sync-runtime-launcher.cjs +22 -3
- package/skills/gsd-discuss-phase/SKILL.md +1 -1
- package/skills/gsd-execute-phase/SKILL.md +1 -1
- package/skills/gsd-import/SKILL.md +1 -1
- package/skills/gsd-ns-workflow/SKILL.md +1 -0
- package/skills/gsd-phase/SKILL.md +1 -1
- package/skills/gsd-quick/SKILL.md +8 -4
- package/skills/gsd-quick-batch/SKILL.md +105 -0
- package/skills/gsd-surface/SKILL.md +18 -8
- package/vscode/package.json +1 -1
- package/bin/lib/ui-safety-gate.cjs +0 -109
- package/scripts/lint-emitted-drift-ack.cjs +0 -344
- package/scripts/state-write-path-drift-baseline.json +0 -19
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"workflow.use_worktrees",
|
|
30
30
|
"workflow.worktree_skip_hooks",
|
|
31
31
|
"workflow.code_review_command",
|
|
32
|
+
"workflow.code_review_depth_overrides",
|
|
32
33
|
"workflow.plan_bounce",
|
|
33
34
|
"workflow.plan_bounce_script",
|
|
34
35
|
"workflow.plan_bounce_passes",
|
|
@@ -43,16 +44,22 @@
|
|
|
43
44
|
"ship.pr_body_sections",
|
|
44
45
|
"git.branching_strategy",
|
|
45
46
|
"git.base_branch",
|
|
47
|
+
"git.protected_branches",
|
|
48
|
+
"git.allow_default_branch_commits",
|
|
46
49
|
"git.create_tag",
|
|
47
50
|
"git.phase_branch_template",
|
|
48
51
|
"git.milestone_branch_template",
|
|
49
52
|
"git.quick_branch_template",
|
|
50
53
|
"planning.commit_docs",
|
|
54
|
+
"planning.pr_strict",
|
|
51
55
|
"planning.search_gitignored",
|
|
52
56
|
"planning.sub_repos",
|
|
57
|
+
"planning.chunked_parallel",
|
|
58
|
+
"agent_tools",
|
|
53
59
|
"review.default_reviewers",
|
|
54
60
|
"review.max_prompt_tokens",
|
|
55
61
|
"review.max_prompt_tokens_per_reviewer",
|
|
62
|
+
"review.parallel_lanes",
|
|
56
63
|
"workflow.cross_ai_execution",
|
|
57
64
|
"workflow.cross_ai_command",
|
|
58
65
|
"workflow.cross_ai_timeout",
|
|
@@ -75,6 +82,7 @@
|
|
|
75
82
|
"statusline.show_context_tokens",
|
|
76
83
|
"statusline.state_format",
|
|
77
84
|
"statusline.show_git",
|
|
85
|
+
"statusline.show_state_freshness",
|
|
78
86
|
"workflow.max_discuss_passes",
|
|
79
87
|
"features.thinking_partner",
|
|
80
88
|
"context",
|
|
@@ -113,6 +121,11 @@
|
|
|
113
121
|
"workflow._auto_chain_active"
|
|
114
122
|
],
|
|
115
123
|
"dynamicKeyPatterns": [
|
|
124
|
+
{
|
|
125
|
+
"topLevel": "agent_tools",
|
|
126
|
+
"source": "^agent_tools\\.(\\*|[a-zA-Z0-9_-]+)$",
|
|
127
|
+
"description": "agent_tools.<selector>"
|
|
128
|
+
},
|
|
116
129
|
{
|
|
117
130
|
"topLevel": "agent_skills",
|
|
118
131
|
"source": "^agent_skills\\.[a-zA-Z0-9_-]+$",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
[
|
|
2
|
+
{ "code": 2, "name": "HOOK_DENY", "meaning": "Hook protocol deny — the harness blocks the tool call", "owner": "hook-adapter", "authorizedBy": "ADR-3889" },
|
|
3
|
+
{ "code": 64, "name": "USAGE", "meaning": "Caller error — bad argv, unknown subcommand, missing argument", "owner": "generic", "authorizedBy": "ADR-3889" },
|
|
4
|
+
{ "code": 66, "name": "NO_INPUT", "meaning": "Ran; zero units were in scope, and that emptiness is known to be genuine", "owner": "generic", "authorizedBy": "ADR-3889" },
|
|
5
|
+
{ "code": 69, "name": "UNAVAILABLE", "meaning": "Could not run — prerequisite absent, input unreadable, scope unestablished", "owner": "generic", "authorizedBy": "ADR-3889" },
|
|
6
|
+
{ "code": 70, "name": "INTERNAL", "meaning": "Self-failure — crash, timeout, killed subprocess", "owner": "generic", "authorizedBy": "ADR-3889" },
|
|
7
|
+
{ "code": 80, "name": "DEGRADED", "meaning": "Ran to completion and is reporting a condition through its result payload rather than as a process failure", "owner": "gsd-tools", "authorizedBy": "ADR-3889 + ADR-2980" }
|
|
8
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# GENERATED FILE — DO NOT EDIT BY HAND.
|
|
3
|
+
# Source of truth: gsd-core/bin/shared/exit-codes.json. Regenerate with:
|
|
4
|
+
# node scripts/gen-exit-code-registry.cjs --write
|
|
5
|
+
#
|
|
6
|
+
# One `export EXIT_<NAME>=<code>` per gsd-core/bin/shared/exit-codes.json
|
|
7
|
+
# entry (ADR-3889 §2, #3905/#3906/#3908). POSIX sh, safe under `set -u`:
|
|
8
|
+
# sourcing this file only ever ASSIGNS variables, never reads one, so it
|
|
9
|
+
# cannot trip an unset-variable check regardless of the caller's existing
|
|
10
|
+
# environment.
|
|
11
|
+
#
|
|
12
|
+
# Usage (from a scanner under scripts/):
|
|
13
|
+
# . "$(dirname "$0")/../gsd-core/bin/shared/exit-codes.sh"
|
|
14
|
+
# exit "$EXIT_UNAVAILABLE"
|
|
15
|
+
export EXIT_HOOK_DENY=2
|
|
16
|
+
export EXIT_USAGE=64
|
|
17
|
+
export EXIT_NO_INPUT=66
|
|
18
|
+
export EXIT_UNAVAILABLE=69
|
|
19
|
+
export EXIT_INTERNAL=70
|
|
20
|
+
export EXIT_DEGRADED=80
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"openai": {
|
|
113
113
|
"opus": { "low": { "model": "gpt-5.6-terra", "reasoning_effort": "medium" }, "medium": { "model": "gpt-5.6-sol", "reasoning_effort": "high" }, "high": { "model": "gpt-5.6-sol", "reasoning_effort": "xhigh" } },
|
|
114
114
|
"sonnet": { "low": { "model": "gpt-5.6-luna", "reasoning_effort": "low" }, "medium": { "model": "gpt-5.6-terra", "reasoning_effort": "medium" }, "high": { "model": "gpt-5.6-sol", "reasoning_effort": "medium" } },
|
|
115
|
-
"haiku": { "low": { "model": "gpt-5.6-luna", "reasoning_effort": "
|
|
115
|
+
"haiku": { "low": { "model": "gpt-5.6-luna", "reasoning_effort": "low" }, "medium": { "model": "gpt-5.6-luna", "reasoning_effort": "medium" }, "high": { "model": "gpt-5.6-terra", "reasoning_effort": "medium" } }
|
|
116
116
|
},
|
|
117
117
|
"google": {
|
|
118
118
|
"opus": { "low": { "model": "gemini-2.5-flash-lite" }, "medium": { "model": "gemini-3-flash" }, "high": { "model": "gemini-3.1-pro-preview" } },
|
|
@@ -130,6 +130,12 @@
|
|
|
130
130
|
"haiku": { "low": null, "medium": null, "high": null }
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
+
"codexModelEffort": {
|
|
134
|
+
"_baseline": ["low", "medium", "high", "xhigh", "max"],
|
|
135
|
+
"gpt-5.6-sol": ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
136
|
+
"gpt-5.6-terra": ["low", "medium", "high", "xhigh", "max"],
|
|
137
|
+
"gpt-5.6-luna": ["low", "medium", "high", "xhigh", "max"]
|
|
138
|
+
},
|
|
133
139
|
"agents": {
|
|
134
140
|
"gsd-planner": { "golden": "opus", "balanced": "opus", "budget": "sonnet", "phaseType": "planning", "routingTier": "heavy" },
|
|
135
141
|
"gsd-roadmapper": { "golden": "opus", "balanced": "sonnet", "budget": "sonnet", "phaseType": "planning", "routingTier": "heavy" },
|
|
@@ -149,6 +155,7 @@
|
|
|
149
155
|
"gsd-ui-auditor": { "golden": "sonnet", "balanced": "sonnet", "budget": "haiku", "phaseType": "verification", "routingTier": "light" },
|
|
150
156
|
"gsd-doc-writer": { "golden": "opus", "balanced": "sonnet", "budget": "haiku", "phaseType": "execution", "routingTier": "standard" },
|
|
151
157
|
"gsd-doc-verifier": { "golden": "sonnet", "balanced": "sonnet", "budget": "haiku", "phaseType": "verification", "routingTier": "light" },
|
|
158
|
+
"gsd-dom-verifier": { "golden": "sonnet", "balanced": "sonnet", "budget": "haiku", "phaseType": "verification", "routingTier": "light" },
|
|
152
159
|
|
|
153
160
|
"gsd-advisor-researcher": { "golden": "opus", "balanced": "sonnet", "budget": "haiku", "phaseType": "research", "routingTier": "standard" },
|
|
154
161
|
"gsd-ai-researcher": { "golden": "opus", "balanced": "sonnet", "budget": "haiku", "phaseType": "research", "routingTier": "standard" },
|
|
@@ -184,9 +184,72 @@ const REASON = Object.freeze({
|
|
|
184
184
|
FAIL_USER_LINES_MISSING: 'fail_user_lines_missing',
|
|
185
185
|
});
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
/**
|
|
188
|
+
* #4086: resolve where a backed-up file's INSTALLED counterpart lives.
|
|
189
|
+
* Primary is the config-dir-relative join (the manifest key's native form).
|
|
190
|
+
* For skills/ keys of a runtime whose skills kind declares a `home` override
|
|
191
|
+
* (codex global → $HOME/.agents/skills), the file lives OUTSIDE configDir, so
|
|
192
|
+
* when the primary path is absent we fall back to the runtime's ACTUAL skills
|
|
193
|
+
* root — derived from the same `resolveRuntimeArtifactLayout` seam the
|
|
194
|
+
* installer writes through. Returns the primary path unchanged whenever the
|
|
195
|
+
* fallback is impossible (no manifest, no runtime, no override, no file).
|
|
196
|
+
*/
|
|
197
|
+
function resolveInstalledPath(configDir, relPath, skillsRedirect) {
|
|
198
|
+
const primary = path.join(configDir, relPath);
|
|
199
|
+
if (!skillsRedirect) return primary;
|
|
200
|
+
const hashKey = relPath.replace(/\\/g, '/');
|
|
201
|
+
if (!hashKey.startsWith(skillsRedirect.prefix)) return primary;
|
|
202
|
+
if (fs.existsSync(primary)) return primary;
|
|
203
|
+
const alt = path.join(skillsRedirect.root, hashKey.slice(skillsRedirect.prefix.length));
|
|
204
|
+
return fs.existsSync(alt) ? alt : primary;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* #4086: build the skills-root fallback descriptor for a config dir from its
|
|
209
|
+
* own gsd-file-manifest.json (runtime + scope) and the runtime-artifact
|
|
210
|
+
* layout seam. Returns null whenever any step is unavailable — the verifier
|
|
211
|
+
* then behaves exactly as before (config-dir-relative only). Lazy + guarded
|
|
212
|
+
* require: runtime-artifact-layout.cjs is a built lib; a layout-unaware
|
|
213
|
+
* invocation must never crash the gate.
|
|
214
|
+
*/
|
|
215
|
+
function resolveSkillsRedirect(configDir) {
|
|
216
|
+
try {
|
|
217
|
+
const manifest = JSON.parse(
|
|
218
|
+
fs.readFileSync(path.join(configDir, 'gsd-file-manifest.json'), 'utf8'),
|
|
219
|
+
);
|
|
220
|
+
if (!manifest || typeof manifest.runtime !== 'string' || !manifest.runtime) return null;
|
|
221
|
+
const scope = manifest.scope === 'local' ? 'local' : 'global';
|
|
222
|
+
const { resolveRuntimeArtifactLayout } = require('./lib/runtime-artifact-layout.cjs');
|
|
223
|
+
const layout = resolveRuntimeArtifactLayout(manifest.runtime, configDir, scope);
|
|
224
|
+
const kind = layout.kinds.find((k) => k.kind === 'skills');
|
|
225
|
+
if (!kind) return null;
|
|
226
|
+
const root = path.resolve(path.join(kind.home || configDir, kind.destSubpath));
|
|
227
|
+
const resolvedConfig = path.resolve(configDir);
|
|
228
|
+
if (root === resolvedConfig || root.startsWith(resolvedConfig + path.sep)) return null;
|
|
229
|
+
// Same descriptor-driven manifest prefix writeManifest uses for skills
|
|
230
|
+
// keys (hermes nests under 'skills/gsd/', everyone else 'skills/'), read
|
|
231
|
+
// from the same shipped registry the installer's _resolveHostBehaviors
|
|
232
|
+
// consults — never a re-derived literal (generative-fix-divergence guard).
|
|
233
|
+
let prefix = 'skills/';
|
|
234
|
+
try {
|
|
235
|
+
const { runtimes: registryRuntimes } = require('./lib/capability-registry.cjs');
|
|
236
|
+
const declared = registryRuntimes
|
|
237
|
+
&& registryRuntimes[manifest.runtime]
|
|
238
|
+
&& registryRuntimes[manifest.runtime].runtime
|
|
239
|
+
&& registryRuntimes[manifest.runtime].runtime.hostBehaviors;
|
|
240
|
+
if (declared && typeof declared.skillsManifestPrefix === 'string') {
|
|
241
|
+
prefix = declared.skillsManifestPrefix;
|
|
242
|
+
}
|
|
243
|
+
} catch { /* keep default prefix */ }
|
|
244
|
+
return { root, prefix };
|
|
245
|
+
} catch {
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function verifyFile({ relPath, patchesDir, configDir, pristineDir, pristineHashes, skillsRedirect }) {
|
|
188
251
|
const backupPath = path.join(patchesDir, relPath);
|
|
189
|
-
const installedPath =
|
|
252
|
+
const installedPath = resolveInstalledPath(configDir, relPath, skillsRedirect);
|
|
190
253
|
const result = { file: relPath, status: 'ok', missing: [], reason: null };
|
|
191
254
|
|
|
192
255
|
if (!fs.existsSync(backupPath) || !fs.statSync(backupPath).isFile()) {
|
|
@@ -336,6 +399,9 @@ function main() {
|
|
|
336
399
|
// Bug #3657: read pristine_hashes from backup-meta.json once and share
|
|
337
400
|
// across all per-file verifications so each can detect drift independently.
|
|
338
401
|
const pristineHashes = readPristineHashes(opts.patchesDir);
|
|
402
|
+
// #4086: skills-root fallback for runtimes whose skills kind declares a
|
|
403
|
+
// `home` override outside configDir (codex global → $HOME/.agents/skills).
|
|
404
|
+
const skillsRedirect = resolveSkillsRedirect(opts.configDir);
|
|
339
405
|
const results = files.map((relPath) =>
|
|
340
406
|
verifyFile({
|
|
341
407
|
relPath,
|
|
@@ -343,6 +409,7 @@ function main() {
|
|
|
343
409
|
configDir: opts.configDir,
|
|
344
410
|
pristineDir: opts.pristineDir,
|
|
345
411
|
pristineHashes,
|
|
412
|
+
skillsRedirect,
|
|
346
413
|
}),
|
|
347
414
|
);
|
|
348
415
|
|
|
@@ -396,4 +463,4 @@ if (require.main === module) {
|
|
|
396
463
|
runMain(main);
|
|
397
464
|
}
|
|
398
465
|
|
|
399
|
-
module.exports = { computeUserAddedLines, isSignificantLine, verifyFile, walk, REASON, readPristineHashes, sha256 };
|
|
466
|
+
module.exports = { computeUserAddedLines, isSignificantLine, verifyFile, walk, REASON, readPristineHashes, sha256, resolveInstalledPath, resolveSkillsRedirect };
|
|
@@ -11,18 +11,19 @@ This doc describes what IS, not what should be. Casing inconsistencies are docum
|
|
|
11
11
|
| Agent | Role | Completion Markers | Consumed by | Kind |
|
|
12
12
|
|-------|------|--------------------|--------------|------|
|
|
13
13
|
| gsd-ai-researcher | AI framework research | No marker (writes the AI-SPEC.md framework section via Edit) | `gsd-core/workflows/ai-integration-phase.md` reads the AI-SPEC.md section after the agent returns | artifact+query |
|
|
14
|
-
| gsd-planner | Plan creation | `## PLANNING COMPLETE`, `## OUTLINE COMPLETE`, `## PHASE SPLIT RECOMMENDED`, `## ⚠ Source Audit`, `## CHECKPOINT REACHED`, `## PLANNING INCONCLUSIVE` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md`, `gsd-core/workflows/plan-review-convergence.md`, `gsd-core/workflows/quick.md` | sentinel-match |
|
|
14
|
+
| gsd-planner | Plan creation | `## PLANNING COMPLETE`, `## OUTLINE COMPLETE`, `## PHASE SPLIT RECOMMENDED`, `## ⚠ Source Audit`, `## CHECKPOINT REACHED`, `## PLANNING INCONCLUSIVE`, `## REVISION_CONFLICT` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md`, `gsd-core/workflows/plan-review-convergence.md`, `gsd-core/workflows/quick.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/verify-work.md` | sentinel-match |
|
|
15
15
|
| gsd-executor | Plan execution | `## PLAN COMPLETE`, `## CHECKPOINT REACHED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md`, `agents/gsd-debug-session-manager.md`, `agents/gsd-debugger.md` | sentinel-match |
|
|
16
16
|
| gsd-phase-researcher | Phase-scoped research | `## RESEARCH COMPLETE`, `## RESEARCH BLOCKED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/research-phase.md`, `agents/gsd-project-researcher.md` | sentinel-match |
|
|
17
17
|
| gsd-project-researcher | Project-wide research | `## RESEARCH COMPLETE`, `## RESEARCH BLOCKED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/research-phase.md`, `agents/gsd-phase-researcher.md` | sentinel-match |
|
|
18
|
-
| gsd-plan-checker | Plan validation | `## VERIFICATION PASSED`, `## ISSUES FOUND` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/ui-phase.md`, `gsd-core/workflows/verify-work.md`, `agents/gsd-ui-checker.md` | sentinel-match |
|
|
18
|
+
| gsd-plan-checker | Plan validation | `## VERIFICATION PASSED`, `## ISSUES FOUND` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/import.md`, `gsd-core/workflows/ui-phase.md`, `gsd-core/workflows/verify-work.md`, `agents/gsd-ui-checker.md` | sentinel-match |
|
|
19
19
|
| gsd-research-synthesizer | Multi-research synthesis | `## SYNTHESIS COMPLETE`, `## SYNTHESIS BLOCKED` (unconsumed: blocked-research return — spawners detect failure via the #222 SUMMARY.md-on-disk check, no dispatch branch keys on the marker) | `gsd-core/workflows/new-milestone.md`, `gsd-core/workflows/new-project.md` | sentinel-match |
|
|
20
20
|
| gsd-debugger | Debug investigation | `## DEBUG COMPLETE`, `## ROOT CAUSE FOUND`, `## CHECKPOINT REACHED`, `## INVESTIGATION INCONCLUSIVE`, `## TDD CHECKPOINT`, `## FIX REJECTED BY GUARDRAIL` | `agents/gsd-debug-session-manager.md`, `gsd-core/workflows/diagnose-issues.md`, `gsd-core/workflows/plan-phase.md`, `agents/gsd-executor.md` | sentinel-match |
|
|
21
21
|
| gsd-debug-session-manager | Debug checkpoint loop | `## DEBUG SESSION COMPLETE`, `## CONTINUE_REQUIRED` | `gsd-core/workflows/debug.md` | sentinel-match |
|
|
22
|
-
| gsd-roadmapper | Roadmap creation/revision | `## ROADMAP CREATED`, `## ROADMAP REVISED`, `## ROADMAP BLOCKED
|
|
22
|
+
| gsd-roadmapper | Roadmap creation/revision | `## ROADMAP CREATED`, `## ROADMAP REVISED`, `## ROADMAP BLOCKED` | `gsd-core/workflows/new-milestone.md`, `gsd-core/workflows/new-project.md` | sentinel-match |
|
|
23
23
|
| gsd-ui-auditor | UI review | `## UI REVIEW COMPLETE` | `gsd-core/workflows/ui-review.md` | sentinel-match |
|
|
24
|
+
| gsd-dom-verifier | Live-DOM UAT verification | No marker (writes `{phase}-DOM-VERIFY.md` directly; the frontmatter `outcome` / `reason` scalars carry the verdict, and `could_not_look` is never conflated with `nothing_to_report`) | `{phase}-DOM-VERIFY.md` artifact, written by the `live-dom-uat` capability's `execute:wave:post` step dispatched from `gsd-core/workflows/execute-phase.md` | artifact+query |
|
|
24
25
|
| gsd-ui-checker | UI validation | `## ISSUES FOUND`, `## UI-SPEC VERIFIED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/ui-phase.md`, `gsd-core/workflows/verify-work.md`, `agents/gsd-plan-checker.md` | sentinel-match |
|
|
25
|
-
| gsd-ui-researcher | UI spec creation | `## UI-SPEC COMPLETE`, `## UI-SPEC BLOCKED` | `gsd-core/workflows/ui-phase.md` | sentinel-match |
|
|
26
|
+
| gsd-ui-researcher | UI spec creation | `## UI-SPEC COMPLETE`, `## UI-SPEC BLOCKED`, `## REVISION_CONFLICT` | `gsd-core/workflows/ui-phase.md` | sentinel-match |
|
|
26
27
|
| gsd-verifier | Post-execution verification | `## Verification Complete` (unconsumed: Marker Rule 2 recorded decision — intentional title-case marker; completion is detected via the artifact route, nothing matches the marker) | `*-VERIFICATION.md` artifact + `gsd_run query verification.status` in `gsd-core/workflows/verify-work.md` | artifact+query |
|
|
27
28
|
| gsd-integration-checker | Cross-phase integration check | `## Integration Check Complete` (unconsumed: Marker Rule 2 recorded decision — intentional title-case marker; the auditor reads the inline report, nothing matches the marker) | `gsd-core/workflows/audit-milestone.md` reads the agent's inline return text directly (agent has no Write tool -- it cannot write an artifact) | structured-return |
|
|
28
29
|
| gsd-nyquist-auditor | Sampling audit | `## PARTIAL`, `## ESCALATE`, `## GAPS FILLED` (non-standard) | `gsd-core/workflows/validate-phase.md`, `gsd-core/workflows/secure-phase.md`, `agents/gsd-security-auditor.md` | sentinel-match |
|
|
@@ -56,7 +57,7 @@ This doc describes what IS, not what should be. Casing inconsistencies are docum
|
|
|
56
57
|
- `structured-return` -- the agent has no way to write files (no `Write` tool) or simply doesn't; it returns parseable sections, a table, or JSON inline, and the caller reads that return text directly
|
|
57
58
|
5. Markers must appear as H2 headings (`## `) at the start of a line in the agent's final output
|
|
58
59
|
6. The `Consumed by` / `Kind` columns are machine-enforced by `check:contract-drift` (`scripts/check-contract-drift.cjs`), which cross-checks this table against what each `agents/*.md` file actually emits in-fence and what every `gsd-core/workflows/**`, `commands/**`, and `agents/**` file actually consumes. Update this table whenever an agent's return contract changes -- a stale row is a violation the check will report, not something to leave for later.
|
|
59
|
-
7. A marker entry annotated `(unconsumed: <reason>)` is emitted deliberately but matched by no workflow, command, or agent —
|
|
60
|
+
7. A marker entry annotated `(unconsumed: <reason>)` is emitted deliberately but matched by no workflow, command, or agent — a display/presentation format no orchestrator branch consumes (the `## ROADMAP DRAFT` header was the canonical case until #3797 folded its content into `## ROADMAP CREATED`). The check still verifies the marker is declared **and** emitted, and still counts it for case-collision purposes; only the consumer requirement is waived. Use it for display formats, never to silence a real orphan.
|
|
60
61
|
|
|
61
62
|
## Key Handoff Contracts
|
|
62
63
|
|
|
@@ -53,7 +53,26 @@ compound modifiers ("Resolver-only API"), and first-party-qualified services
|
|
|
53
53
|
`capabilities/ai-integration/fragments/api-coverage-plan-pre.md`.
|
|
54
54
|
2. **Seal time (`verify:pre`).** The blocking `api-coverage.verify-pre` gate
|
|
55
55
|
runs `check api-coverage.verify-pre <phase-dir>` and blocks unless a valid
|
|
56
|
-
matrix exists (or no integration is detected
|
|
56
|
+
matrix exists (or no integration is detected in a scope it could actually
|
|
57
|
+
read).
|
|
58
|
+
|
|
59
|
+
### Seal-time outcomes
|
|
60
|
+
|
|
61
|
+
| Condition | Verdict |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Valid `COVERAGE.md` matrix | pass |
|
|
64
|
+
| `No external API integration: <reason>` declaration | pass (the reasoned human overrule) |
|
|
65
|
+
| Malformed / partial matrix | **block** |
|
|
66
|
+
| No matrix, integration signal found | **block** |
|
|
67
|
+
| No matrix, no signal, scope was read | pass |
|
|
68
|
+
| No matrix, **scope could not be established** | **block** — `scope_unavailable: true` (#3909) |
|
|
69
|
+
| Phase token unresolvable | **block** |
|
|
70
|
+
| Plan file exists but unreadable | **block** |
|
|
71
|
+
| No `.planning/phases` tree at all | pass — not a GSD project layout |
|
|
72
|
+
|
|
73
|
+
The last four are the fail-closed arms: the gate refuses to certify "no
|
|
74
|
+
external-API integration" from scope it did not read. A phase with real plans
|
|
75
|
+
and no API vocabulary is the fifth row, and is unaffected.
|
|
57
76
|
|
|
58
77
|
## The coverage matrix format
|
|
59
78
|
|
|
@@ -126,7 +145,10 @@ zero — the matrix is the durable subtraction record.
|
|
|
126
145
|
|
|
127
146
|
```bash
|
|
128
147
|
echo "$PHASE_SCOPE" | node gsd-core/bin/lib/api-coverage.cjs --json
|
|
129
|
-
# exit 0 = integration detected, 1 = none,
|
|
148
|
+
# exit 0 = integration detected, 1 = none (real input, examined, no signal)
|
|
149
|
+
# NO_INPUT = stdin was empty or whitespace-only (registry code — ADR-3889 Phase 3, #3907)
|
|
150
|
+
# UNAVAILABLE = stdin read failed (registry code)
|
|
151
|
+
# NO_INPUT/UNAVAILABLE emit {"skipped":true,"reason":"no_input"|"stdin_error"} — no `detected` key
|
|
130
152
|
```
|
|
131
153
|
|
|
132
154
|
The detector is a pure function (`detectApiIntegration` → `{ detected, signals,
|
|
@@ -5,7 +5,7 @@ Smart discuss is the autonomous-optimized variant of `gsd-discuss-phase`. It pro
|
|
|
5
5
|
**Inputs:** `PHASE_NUM` from execute_phase. Run init to get phase paths:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
PHASE_STATE=$(
|
|
8
|
+
PHASE_STATE=$(gsd_run query init.phase-op ${PHASE_NUM})
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Parse from JSON: `phase_dir`, `phase_slug`, `padded_phase`, `phase_name`.
|
|
@@ -94,7 +94,7 @@ Read the 3-5 most relevant files to understand existing patterns.
|
|
|
94
94
|
**Get phase details:**
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
DETAIL=$(
|
|
97
|
+
DETAIL=$(gsd_run query roadmap.get-phase ${PHASE_NUM})
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
Extract `goal`, `requirements`, `success_criteria` from the JSON response.
|
|
@@ -266,7 +266,7 @@ Write the file.
|
|
|
266
266
|
**Commit:**
|
|
267
267
|
|
|
268
268
|
```bash
|
|
269
|
-
|
|
269
|
+
gsd_run query commit "docs(${PADDED_PHASE}): smart discuss context" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
270
270
|
```
|
|
271
271
|
|
|
272
272
|
Display confirmation:
|
|
@@ -30,7 +30,7 @@ The gate spans two layers, and both must honor it. `gsd-executor` refuses to aut
|
|
|
30
30
|
|
|
31
31
|
**When:** Claude completed automated work, human confirms it works correctly.
|
|
32
32
|
|
|
33
|
-
> **Default mode (#3309): `workflow.human_verify_mode = end-of-phase`.** New projects do NOT halt mid-flight at `checkpoint:human-verify
|
|
33
|
+
> **Default mode (#3309): `workflow.human_verify_mode = end-of-phase`.** New projects do NOT halt mid-flight at *planner-emitted* `checkpoint:human-verify` tasks. (The executor-synthesized **tracer feedback gate** is the one runtime checkpoint this mode also governs, with its own precedence chain — see "Tracer feedback gate (#3299)" below.) The planner suppresses those task emissions and embeds the verification details into the relevant `auto` task's `<verify><human-check>` block; the verifier harvests every `<verify><human-check>` at end-of-phase (Step 8) and consolidates them into the existing `human_needed` → `{phase_num}-UAT.md` flow in `workflows/execute-phase.md`. The user reviews everything in one batch.
|
|
34
34
|
>
|
|
35
35
|
> **Why this is the default:** every mid-flight halt costs a full executor cold-start (CLAUDE.md, MEMORY.md, STATE.md, plan re-read on respawn) because subagent context is discarded across the pause. A plan with N human-verify checkpoints pays the cold-start cost N+1 times — measured at "tens of thousands of tokens" per round-trip on real projects.
|
|
36
36
|
>
|
|
@@ -107,6 +107,30 @@ The gate spans two layers, and both must honor it. `gsd-executor` refuses to aut
|
|
|
107
107
|
<resume-signal>Type "approved" or describe issues</resume-signal>
|
|
108
108
|
</task>
|
|
109
109
|
```
|
|
110
|
+
|
|
111
|
+
### Tracer feedback gate (#3299)
|
|
112
|
+
|
|
113
|
+
A `type="tracer"` task is followed by an early integration checkpoint on the proven slice, run BEFORE any expansion task. This checkpoint is **synthesized by the executor at runtime** — no planner emits it — so planner-side `human_verify_mode` suppression cannot reach it. It must therefore consult the mode itself.
|
|
114
|
+
|
|
115
|
+
Evaluate the rows **in order** and take the first that matches — they are a precedence chain, not independent conditions:
|
|
116
|
+
|
|
117
|
+
| # | Run | Tracer `<verify>` | Behavior |
|
|
118
|
+
|---|---|---|---|
|
|
119
|
+
| 1 | **Any run, any mode** (incl. auto) | task carries `gate="blocking-human"` | **STOP → `checkpoint:human-verify`.** Never auto-continued. |
|
|
120
|
+
| 2 | Auto mode active (`AUTO_CHAIN`/`AUTO_CFG`) | any (row 1 already took `blocking-human`) | Re-run verify; HALT on failure, continue on success. **Pre-existing behavior — unchanged by #3299.** |
|
|
121
|
+
| 3 | Interactive, `end-of-phase` (default) | only `<automated>` | Re-run verify; HALT on failure, continue to expansion on success — **no checkpoint** |
|
|
122
|
+
| 4 | Interactive, `end-of-phase` | carries `<human-check>` | STOP → `checkpoint:human-verify` |
|
|
123
|
+
| 5 | Interactive, `mid-flight` | any | STOP → `checkpoint:human-verify` |
|
|
124
|
+
|
|
125
|
+
**Carve-outs — the #3299 auto-continue (row 3) applies ONLY when all three hold:** the run is interactive, the mode is `end-of-phase`, and the tracer's `<verify>` contains only `<automated>`. Anything else STOPs or falls to the pre-existing auto-mode branch. HALT-on-failure is unconditional in rows 2 and 3 alike: a failing tracer never becomes an approvable checkpoint and never proceeds to expansion, because layering expansion onto a broken slice is the failure this gate exists to prevent.
|
|
126
|
+
|
|
127
|
+
Row 1 is deliberately **not** scoped to interactive runs. Golden rule 6 above states that `gate="blocking-human"` stops for a human in *every* mode including auto-mode, and a precedence chain that let an autonomous run continue past it would make this file assert two incompatible rules about the same gate. No planner emits `gate` on a `type="tracer"` task today, but `src/verify.cts` parses only `type` and does not consult `gate` on non-checkpoint tasks, so a hand-authored, imported, or externally-generated `PLAN.md` can carry it and validate — unreachable by our planner is not unreachable.
|
|
128
|
+
|
|
129
|
+
Read `HUMAN_VERIFY_MODE` with an explicit default — `workflow.human_verify_mode` is absent from `SCHEMA_DEFAULTS`, so a bare `config-get` exits non-zero with `Key not found` on any project whose `config.json` predates #3309:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
HUMAN_VERIFY_MODE=$(gsd_run query config-get workflow.human_verify_mode --default end-of-phase --raw 2>/dev/null || echo "end-of-phase")
|
|
133
|
+
```
|
|
110
134
|
</type>
|
|
111
135
|
|
|
112
136
|
<type name="decision">
|
|
@@ -299,9 +323,7 @@ When Claude encounters `type="checkpoint:*"`:
|
|
|
299
323
|
|
|
300
324
|
**For checkpoint:human-verify:**
|
|
301
325
|
```
|
|
302
|
-
|
|
303
|
-
║ CHECKPOINT: Verification Required ║
|
|
304
|
-
╚═══════════════════════════════════════════════════════╝
|
|
326
|
+
### CHECKPOINT: Verification Required
|
|
305
327
|
|
|
306
328
|
Progress: 5/8 tasks complete
|
|
307
329
|
Task: Responsive dashboard layout
|
|
@@ -314,16 +336,14 @@ How to verify:
|
|
|
314
336
|
3. Tablet (768px): Sidebar collapses to icons
|
|
315
337
|
4. Mobile (375px): Sidebar hidden, hamburger menu appears
|
|
316
338
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
**→ YOUR ACTION: Type "approved" or describe issues**
|
|
320
342
|
```
|
|
321
343
|
|
|
322
344
|
**For checkpoint:decision:**
|
|
323
345
|
```
|
|
324
|
-
|
|
325
|
-
║ CHECKPOINT: Decision Required ║
|
|
326
|
-
╚═══════════════════════════════════════════════════════╝
|
|
346
|
+
### CHECKPOINT: Decision Required
|
|
327
347
|
|
|
328
348
|
Progress: 2/6 tasks complete
|
|
329
349
|
Task: Select authentication provider
|
|
@@ -345,16 +365,14 @@ Options:
|
|
|
345
365
|
Pros: Free, no vendor lock-in, widely adopted
|
|
346
366
|
Cons: More setup work, DIY security updates
|
|
347
367
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
**→ YOUR ACTION: Select supabase, clerk, or nextauth**
|
|
351
371
|
```
|
|
352
372
|
|
|
353
373
|
**For checkpoint:human-action:**
|
|
354
374
|
```
|
|
355
|
-
|
|
356
|
-
║ CHECKPOINT: Action Required ║
|
|
357
|
-
╚═══════════════════════════════════════════════════════╝
|
|
375
|
+
### CHECKPOINT: Action Required
|
|
358
376
|
|
|
359
377
|
Progress: 3/8 tasks complete
|
|
360
378
|
Task: Deploy to Vercel
|
|
@@ -369,9 +387,9 @@ What you need to do:
|
|
|
369
387
|
|
|
370
388
|
I'll verify: vercel whoami returns your account
|
|
371
389
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
**→ YOUR ACTION: Type "done" when authenticated**
|
|
375
393
|
```
|
|
376
394
|
</execution_protocol>
|
|
377
395
|
|
|
@@ -6,7 +6,7 @@ Calculate the next decimal phase number for urgent insertions.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# Get next decimal phase after phase 6
|
|
9
|
-
|
|
9
|
+
gsd_run query phase.next-decimal 6
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Output:
|
|
@@ -32,13 +32,13 @@ With existing decimals:
|
|
|
32
32
|
## Extract Values
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
|
-
DECIMAL_PHASE=$(
|
|
36
|
-
BASE_PHASE=$(
|
|
35
|
+
DECIMAL_PHASE=$(gsd_run query phase.next-decimal "${AFTER_PHASE}" --pick next)
|
|
36
|
+
BASE_PHASE=$(gsd_run query phase.next-decimal "${AFTER_PHASE}" --pick base_phase)
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
Or with --raw flag:
|
|
40
40
|
```bash
|
|
41
|
-
DECIMAL_PHASE=$(
|
|
41
|
+
DECIMAL_PHASE=$(gsd_run query phase.next-decimal "${AFTER_PHASE}" --raw)
|
|
42
42
|
# Returns just: 06.1
|
|
43
43
|
```
|
|
44
44
|
|
|
@@ -56,7 +56,7 @@ DECIMAL_PHASE=$(gsd-tools query phase.next-decimal "${AFTER_PHASE}" --raw)
|
|
|
56
56
|
Decimal phase directories use the full decimal number:
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
SLUG=$(
|
|
59
|
+
SLUG=$(gsd_run query generate-slug "$DESCRIPTION" --raw)
|
|
60
60
|
PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
|
|
61
61
|
mkdir -p "$PHASE_DIR"
|
|
62
62
|
```
|
|
@@ -41,11 +41,23 @@ core finding that the spec layer is the measured weak point:
|
|
|
41
41
|
|
|
42
42
|
## Inputs
|
|
43
43
|
|
|
44
|
-
A list of requirements, each a `{ id, text, shapes? }` record where `text` is a
|
|
45
|
-
statement
|
|
46
|
-
|
|
47
|
-
`shapes` is absent, a heuristic
|
|
48
|
-
|
|
44
|
+
A list of requirements, each a `{ id, text, text_en?, shapes? }` record where `text` is a
|
|
45
|
+
testable statement, `text_en` is an optional English translation of `text`, and `shapes` is an
|
|
46
|
+
optional author-supplied override of the data/behavior shape. The five shapes are:
|
|
47
|
+
`numeric-range`, `collection`, `text`, `stateful`, `io`. When `shapes` is absent, a heuristic
|
|
48
|
+
classifier proposes them from the requirement prose — reading `text_en` in preference to
|
|
49
|
+
`text` when present (`text_en ?? text`) — (propose-then-confirm); the author may correct the
|
|
50
|
+
shape.
|
|
51
|
+
|
|
52
|
+
**The classifier reads English; `text` does not have to be.** The heuristic cues (`SHAPE_CUES`)
|
|
53
|
+
are English word-boundary patterns, so a requirement whose `text` is not English classifies to
|
|
54
|
+
zero shapes unless `text_en` supplies a faithful English translation. A project running with
|
|
55
|
+
`response_language` set should populate `text_en` for every requirement; `text` keeps its own
|
|
56
|
+
meaning — the requirement's own text, in whatever language the SPEC uses — and is never
|
|
57
|
+
translated or overwritten. `text_en` is engine input, not part of the SPEC. `id` is never
|
|
58
|
+
translated. Prose that matches no cue in either field surfaces as `unclassified` (#1110) — the
|
|
59
|
+
probe contributes nothing for that requirement. Where a requirement carries no cue even in
|
|
60
|
+
English, author `shapes` explicitly rather than leaning on the classifier.
|
|
49
61
|
|
|
50
62
|
## Taxonomy (8 categories)
|
|
51
63
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
# Execute-Phase —
|
|
1
|
+
# Execute-Phase — TDD Gate (Runtime Enforcement)
|
|
2
2
|
|
|
3
|
-
> Loaded by `execute-phase` workflow and `gsd-executor` agent
|
|
3
|
+
> Loaded by `execute-phase` workflow and `gsd-executor` agent when `TDD_MODE=true` for the phase (#4011 — the gate no longer requires MVP mode; MVP may imply TDD, but TDD never requires MVP). Defines the runtime gate that blocks behavior-adding tasks until a failing-test commit exists.
|
|
4
4
|
|
|
5
5
|
## When this gate fires
|
|
6
6
|
|
|
7
|
-
- `
|
|
8
|
-
- `TDD_MODE` is `true` (resolved from `--tdd` flag → `workflow.tdd_mode` config).
|
|
7
|
+
- `TDD_MODE` is `true` (resolved from `--tdd` flag → `workflow.tdd_mode` config). MVP mode is NOT required (#4011).
|
|
9
8
|
- The current task being executed has `tdd="true"` in its `<task>` frontmatter (set by the planner per Phase 1).
|
|
10
9
|
- The task's `<behavior>` block lists at least one expected behavior.
|
|
11
10
|
|
|
@@ -13,15 +12,18 @@ If any of these is false, the gate is inactive — execution proceeds normally.
|
|
|
13
12
|
|
|
14
13
|
## What the gate checks
|
|
15
14
|
|
|
16
|
-
For each task gated by
|
|
15
|
+
For each task gated by TDD, the executor MUST verify (before running the implementation step):
|
|
17
16
|
|
|
18
17
|
1. **A failing-test commit exists.** Search git log on the current branch for a commit matching `test({phase}-{plan})` whose subject mentions the same plan as the current task. The commit must touch a test file (`*.test.*`, `*.spec.*`, `tests/**`).
|
|
19
|
-
2. **The test was actually red.**
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
2. **The test was actually red — INTENTIONALLY (#3770).** A nonzero exit is not RED by itself: syntax errors, zero-test discovery, fixture crashes, parser errors, and unrelated assertions are INVALID_RED. The executor must persist the RED evidence record (command, exit code, failing test, expected result from `<behavior>`, actual result) and verify it:
|
|
19
|
+
```bash
|
|
20
|
+
gsd_run check tdd-red-evidence <record.json> --raw
|
|
21
|
+
```
|
|
22
|
+
- `RED_EVIDENCE_OK` (reason `target_test_failed`): the TARGET test named by the plan failed on a real assertion — the ONLY verdict that authorizes GREEN.
|
|
23
|
+
- `INVALID_RED` (reasons `unexpected_green`, `zero_tests_discovered`, `nonzero_exit_without_test_failure`, `fixture_or_load_failure`, `no_target_test_failure`, `invalid_record`, `unreadable_record`): the gate trips — halt, fix the RED phase (test identity, fixture, discovery), and re-verify before any implementation step. A `RED:` prefix or `(RED)` tag in the commit message is NOT sufficient evidence on its own.
|
|
22
24
|
3. **No implementation commit yet.** No `feat({phase}-{plan})` commit may exist for the same plan ID before the failing-test commit.
|
|
23
25
|
|
|
24
|
-
If any check fails, the gate trips.
|
|
26
|
+
If any check fails, the gate trips. For check 2, an INVALID_RED verdict (`check tdd-red-evidence`) trips the gate — the executor MUST halt and block the implementation step.
|
|
25
27
|
|
|
26
28
|
## What "behavior-adding task" means
|
|
27
29
|
|
|
@@ -40,11 +42,9 @@ The executor MUST:
|
|
|
40
42
|
2. Emit a structured halt report:
|
|
41
43
|
|
|
42
44
|
```
|
|
43
|
-
|
|
44
|
-
MVP+TDD GATE TRIPPED — Plan {plan_id}, Task {task_id}
|
|
45
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
45
|
+
### TDD GATE TRIPPED — Plan {plan_id}, Task {task_id}
|
|
46
46
|
|
|
47
|
-
Reason: {missing_red_commit | red_commit_not_failing | feat_before_test}
|
|
47
|
+
Reason: {missing_red_commit | red_commit_not_failing | feat_before_test | invalid_red}
|
|
48
48
|
|
|
49
49
|
Behavior expected to be tested:
|
|
50
50
|
- {first behavior bullet}
|
|
@@ -58,24 +58,24 @@ The executor MUST:
|
|
|
58
58
|
3. Exit the current execution wave cleanly. Do NOT roll back any prior commits in the same wave.
|
|
59
59
|
4. Update `STATE.md` with `last_gate_trip: {plan_id}/{task_id}` so the user can resume after writing the test.
|
|
60
60
|
|
|
61
|
-
## Escalation: end-of-phase TDD review under
|
|
61
|
+
## Escalation: end-of-phase TDD review under TDD
|
|
62
62
|
|
|
63
63
|
The existing end-of-phase TDD review (in `workflows/execute-phase.md`'s `tdd_review_checkpoint` step) is normally **advisory** — it surfaces gate violations but does not block phase completion.
|
|
64
64
|
|
|
65
|
-
Under
|
|
65
|
+
Under TDD mode, escalate this to **blocking**:
|
|
66
66
|
- If any TDD plan is missing a RED or GREEN commit, the executor MUST refuse to mark the phase complete.
|
|
67
67
|
- The user is shown the same review table, but the verdict line reads:
|
|
68
|
-
> "Phase blocked: {N} TDD plan(s) violate the RED→GREEN gate sequence under
|
|
68
|
+
> "Phase blocked: {N} TDD plan(s) violate the RED→GREEN gate sequence under TDD. Resolve and re-run /gsd execute-phase, or override with `/gsd execute-phase {phase} --force-mvp-gate` to ship anyway."
|
|
69
69
|
|
|
70
70
|
The `--force-mvp-gate` flag is documented but not introduced by this plan — it is the escape hatch the spec mentions; if the user later builds it, the workflow already references the contract.
|
|
71
71
|
|
|
72
72
|
## What this gate does NOT do
|
|
73
73
|
|
|
74
74
|
- It does not enforce REFACTOR commits. REFACTOR remains optional (per `gsd-core/references/tdd.md`).
|
|
75
|
-
- It does not check test quality (the test could be trivially
|
|
75
|
+
- It does not check test quality (the test could be trivially weak). That's the planner's job. It DOES check that the RED failure was intentional — the target test failing an assertion (#3770).
|
|
76
76
|
- It does not run tests. The executor only inspects git log + file system. Running tests is the implementation step's job.
|
|
77
77
|
- It does not gate config-only or doc-only tasks (see "behavior-adding task" definition).
|
|
78
78
|
|
|
79
79
|
## Compatibility with existing TDD discipline
|
|
80
80
|
|
|
81
|
-
This gate is additive to `gsd-core/references/tdd.md`. Tasks not under
|
|
81
|
+
This gate is additive to `gsd-core/references/tdd.md`. Tasks not under TDD mode continue to use the existing advisory TDD discipline (RED/GREEN/REFACTOR commits with end-of-phase review checkpoint). Only the runtime gate and the blocking escalation are new.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
7b. **Pre-wave dependency check (waves 2+ only):**
|
|
2
|
-
Before wave N+1, run `
|
|
2
|
+
Before wave N+1, run `gsd_run query verify.key-links {phase_dir}/{plan}-PLAN.md` for each upcoming plan.
|
|
3
3
|
If any PRIOR-wave artifact link fails, present:
|
|
4
4
|
- `## Cross-Plan Wiring Gap` with plan/link/from/pattern rows
|
|
5
5
|
- Options: investigate+fix before continue, or continue with cascade risk
|
|
@@ -24,19 +24,16 @@
|
|
|
24
24
|
# Unset per-wave manifest so wave N+1 creates a fresh one (#3384, #1369).
|
|
25
25
|
unset WAVE_WORKTREE_MANIFEST
|
|
26
26
|
|
|
27
|
-
# Between-wave base
|
|
28
|
-
# advanced. Re-
|
|
29
|
-
#
|
|
30
|
-
#
|
|
27
|
+
# Between-wave base re-check (#1369, #3659): after wave N merges and tracking commits,
|
|
28
|
+
# HEAD has advanced. Re-asserting worktree.baseRef:"head" is deliberately NOT done here —
|
|
29
|
+
# the runtime harness does not read project-settings baseRef (#48), so in
|
|
30
|
+
# harness-worktree mode the setting cannot influence the fork base. The safety re-check
|
|
31
|
+
# below compares HEAD against the REAL fork base and degrades the remaining waves
|
|
32
|
+
# whenever they diverge, avoiding the base-mismatch FATAL in executor agents.
|
|
31
33
|
if [ "$ISOLATION" = "harness-worktree" ] && [ "$USE_WORKTREES" != "false" ]; then
|
|
32
|
-
gsd_run query worktree.
|
|
33
|
-
|
|
34
|
-
# Safety re-check: evaluate degradation AFTER the wave N commits. If HEAD has diverged
|
|
35
|
-
# from origin/HEAD and baseRef is NOT "head", degrade remaining waves to sequential to
|
|
36
|
-
# avoid the base-mismatch FATAL in executor agents.
|
|
37
|
-
_BETWEEN_DEGRADE=$(gsd_run query worktree.base-check --pick shouldDegrade 2>/dev/null || echo "false")
|
|
34
|
+
_BETWEEN_DEGRADE=$(gsd_run query worktree.base-check --mode "$ISOLATION" --pick shouldDegrade 2>/dev/null || echo "false")
|
|
38
35
|
if [ "$_BETWEEN_DEGRADE" = "true" ]; then
|
|
39
|
-
_DEGRADE_MSG=$(gsd_run query worktree.base-check --pick message 2>/dev/null || true)
|
|
36
|
+
_DEGRADE_MSG=$(gsd_run query worktree.base-check --mode "$ISOLATION" --pick message 2>/dev/null || true)
|
|
40
37
|
[ -n "$_DEGRADE_MSG" ] && printf '%s\n' "$_DEGRADE_MSG" >&2
|
|
41
38
|
printf 'Degrading to sequential mode for remaining waves: HEAD advanced past worktree fork base after wave %s merge (#1369).\n' "${N}" >&2
|
|
42
39
|
# Both must move together (#2652): dispatch keys on ISOLATION.
|