@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
|
@@ -16,6 +16,8 @@ This pattern applies whenever:
|
|
|
16
16
|
```
|
|
17
17
|
prev_issue_count = Infinity
|
|
18
18
|
iteration = 0
|
|
19
|
+
previous_conflict_property = null
|
|
20
|
+
conflict_return_count = 0
|
|
19
21
|
|
|
20
22
|
LOOP:
|
|
21
23
|
1. Run checker/validator on current output
|
|
@@ -23,15 +25,30 @@ LOOP:
|
|
|
23
25
|
3. If PASSED or only INFO-level issues:
|
|
24
26
|
-> Accept output, exit loop
|
|
25
27
|
4. If BLOCKER or WARNING issues found:
|
|
26
|
-
a. iteration
|
|
27
|
-
b. If iteration > 3:
|
|
28
|
+
a. If iteration + 1 > 3:
|
|
28
29
|
-> Escalate to user (see "After 3 Iterations" below)
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
b. Parse issue count from checker output
|
|
31
|
+
c. If issue_count >= prev_issue_count:
|
|
31
32
|
-> Escalate to user: "Revision loop stalled (issue count not decreasing)"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
d. prev_issue_count = issue_count
|
|
34
|
+
e. Re-spawn the producing agent with checker feedback appended
|
|
35
|
+
f. If the agent returns REVISION_CONFLICT:
|
|
36
|
+
-> conflict_return_count += 1
|
|
37
|
+
-> If conflict_return_count >= 3:
|
|
38
|
+
escalate through the iteration-cap gate
|
|
39
|
+
-> If it names the same required_property as the previous conflict:
|
|
40
|
+
escalate as a stall (the resolution did not take)
|
|
41
|
+
Else: previous_conflict_property = current required_property
|
|
42
|
+
resolve it (see "Conflict Return" below) and go to step e.
|
|
43
|
+
Do NOT increment iteration -- the conflict was not a failed attempt.
|
|
44
|
+
Else: previous_conflict_property = null (a normal revision ends the conflict chain --
|
|
45
|
+
a LATER, unrelated conflict on the same property must not be misread as a repeat)
|
|
46
|
+
g. iteration += 1
|
|
47
|
+
h. After revision completes, go to LOOP
|
|
48
|
+
|
|
49
|
+
The increment is step g, AFTER the producing agent returns. An iteration counted at step a is
|
|
50
|
+
already spent by the time a REVISION_CONFLICT comes back, so it cannot then be withheld, and the
|
|
51
|
+
cap would punish the agent for correctly refusing to apply incompatible advice.
|
|
35
52
|
```
|
|
36
53
|
|
|
37
54
|
### Issue Count Tracking
|
|
@@ -45,19 +62,38 @@ Display iteration progress before each revision spawn:
|
|
|
45
62
|
|
|
46
63
|
When re-spawning the producing agent for revision, pass the checker's YAML-formatted issues. The checker's output contains a `## Issues` heading followed by a YAML block. Parse this block and pass it verbatim to the revision agent.
|
|
47
64
|
|
|
65
|
+
The field names are the plan-checker's schema (`agents/gsd-plan-checker.md` → `<issue_structure>`):
|
|
66
|
+
`plan`, `dimension`, `severity`, `required_property`, `description`, `task`, `fix_hint`. There is no
|
|
67
|
+
`suggested_fix` field and no `finding` or `affected_field` field — those names were drift, and every
|
|
68
|
+
producer now emits the schema above.
|
|
69
|
+
|
|
48
70
|
```
|
|
49
71
|
<checker_issues>
|
|
50
|
-
The issues below are in YAML format. Each has: dimension, severity,
|
|
51
|
-
|
|
52
|
-
|
|
72
|
+
The issues below are in YAML format. Each has: dimension, severity,
|
|
73
|
+
required_property, description, fix_hint.
|
|
74
|
+
|
|
75
|
+
BINDING: required_property (the invariant that must hold), description (the
|
|
76
|
+
evidence it does not), severity. NON-BINDING: fix_hint -- ONE example route to
|
|
77
|
+
the property, never an instruction.
|
|
78
|
+
|
|
79
|
+
Satisfy the required_property of ALL BLOCKER issues. Satisfy WARNING issues
|
|
80
|
+
where feasible.
|
|
53
81
|
|
|
54
82
|
{YAML issues block from checker output -- passed verbatim}
|
|
55
83
|
</checker_issues>
|
|
56
84
|
|
|
57
85
|
<revision_instructions>
|
|
58
86
|
Address ALL BLOCKER and WARNING issues identified above.
|
|
59
|
-
- For each BLOCKER: make
|
|
87
|
+
- For each BLOCKER: make required_property true. Its fix_hint is one example
|
|
88
|
+
route; a smaller or different mechanism that makes the same property true
|
|
89
|
+
addresses the issue in full -- report which mechanism you used.
|
|
60
90
|
- For each WARNING: address or explain why it's acceptable
|
|
91
|
+
- Before editing, re-check locked decisions, active capability guidance, and
|
|
92
|
+
constraints the existing output already encodes. If a fix_hint would
|
|
93
|
+
contradict one of those, or the property is unreachable without breaking one,
|
|
94
|
+
do NOT apply it and do NOT work around it: return REVISION_CONFLICT naming
|
|
95
|
+
the conflict and the alternatives considered, having addressed every
|
|
96
|
+
non-conflicting issue.
|
|
61
97
|
- Do NOT introduce new issues while fixing existing ones
|
|
62
98
|
- Preserve all content not flagged by the checker
|
|
63
99
|
This is revision iteration {N} of max 3. Previous iteration had {prev_count}
|
|
@@ -65,6 +101,75 @@ issues. You must reduce the count or the loop will terminate.
|
|
|
65
101
|
</revision_instructions>
|
|
66
102
|
```
|
|
67
103
|
|
|
104
|
+
### Conflict Return (REVISION_CONFLICT)
|
|
105
|
+
|
|
106
|
+
A revision agent that returns `REVISION_CONFLICT` has not failed and has not stalled. Handle it
|
|
107
|
+
BEFORE the iteration counter and the stall check — a conflict is not resolvable by re-running the
|
|
108
|
+
same loop, so spending retry budget on it only exhausts the cap:
|
|
109
|
+
|
|
110
|
+
**This protocol is shared.** Every revision-bearing workflow follows it — `plan-phase`, `quick`,
|
|
111
|
+
`ui-phase`, and `verify-work`'s gap-plan loop. `plan-phase` @-imports this reference and states
|
|
112
|
+
only its own bindings (counter name, artifact path, next step). The other three do not import it,
|
|
113
|
+
so they restate the operative rules inline; this section is the authority they must agree with.
|
|
114
|
+
|
|
115
|
+
1. **Do not spend budget.** Do NOT increment the iteration counter and do NOT update
|
|
116
|
+
`prev_issue_count`. Do NOT re-spawn the checker yet — the conflict is not a revised output.
|
|
117
|
+
2. **Record**, where the host has a channel an arbitration loop reads. `review.md` emits one
|
|
118
|
+
fixed writer-owned slot immediately after the artifact title, between
|
|
119
|
+
`<!-- gsd:plan-revision-conflicts:begin -->` and
|
|
120
|
+
`<!-- gsd:plan-revision-conflicts:end -->`. When `workflow.plan_review_convergence` is enabled
|
|
121
|
+
and the phase `*-REVIEWS.md` already exists, `plan-phase` appends one line per conflict under
|
|
122
|
+
`## Plan-Revision Conflicts` inside that slot:
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
- [ ] REVISION_CONFLICT {dimension}/{plan} — required_property: {property} | conflicts with: {locked decision D-nn / CLAUDE.md rule / plan constraint} | alternatives: {the agent's alternatives}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
A checkbox, not a table row: `- [ ] REVISION_CONFLICT` is open and `- [x] REVISION_CONFLICT`
|
|
129
|
+
is resolved. The reader counts matching open lines only inside the first fixed slot after the
|
|
130
|
+
artifact title; an identical marker in reviewer output is not state. An open line in the owned
|
|
131
|
+
slot blocks convergence even if this run is abandoned.
|
|
132
|
+
A workflow with no such channel (`quick` has no phase and no REVIEWS.md) skips this step.
|
|
133
|
+
|
|
134
|
+
Before appending, reuse the existing open line instead of appending a duplicate when its
|
|
135
|
+
sanitized fields identify the same conflict. This makes persisted conflict state idempotent.
|
|
136
|
+
|
|
137
|
+
**Sanitize before writing — the conflict text is agent-authored.** Every field comes from the
|
|
138
|
+
producing agent. Before appending, for EACH field: collapse every newline and tab to a single
|
|
139
|
+
space, and strip any leading `#`, `-`, `|` or backtick-fence run. Otherwise an embedded
|
|
140
|
+
newline can forge an extra conflict-shaped record inside the owned slot. One conflict is exactly
|
|
141
|
+
one line beginning `- [ ]`. Never append agent text verbatim, and never append a fenced block.
|
|
142
|
+
3. **Resolve** — present the conflict and its alternatives to the user and ask which to take
|
|
143
|
+
(pattern: `gsd-core/references/gate-prompts.md`): adopt a named alternative / override the
|
|
144
|
+
named constraint and apply the hint / amend the constraint itself. Each option resolves the
|
|
145
|
+
conflict. Accepting the output with the blocker still open is NOT offered here — the blocking
|
|
146
|
+
`required_property` still fails, and that choice belongs to the cap escalation.
|
|
147
|
+
4. **Close** — the workflow that wrote the line owns flipping it to `- [x]` once the resolution
|
|
148
|
+
has been applied, appending ` | resolved: {chosen resolution}`. Readers only read. A line left
|
|
149
|
+
open is a live blocker, never a stale artifact.
|
|
150
|
+
5. **Re-spawn** with the chosen resolution, then re-evaluate the return from the top of this
|
|
151
|
+
handler — never fall through to the checker spawn. A second conflict is still a conflict, not
|
|
152
|
+
a revised output, and handing it to the checker would check the conflict message.
|
|
153
|
+
|
|
154
|
+
**Bounded — two ways, because one is evadable.** Not incrementing must not make this path
|
|
155
|
+
unbounded:
|
|
156
|
+
|
|
157
|
+
- **Repeat.** A conflict naming the SAME `required_property` twice in a row means the chosen
|
|
158
|
+
resolution did not take. Stop re-spawning; escalate as a stall.
|
|
159
|
+
- **Total.** Count every conflict return in this revision loop, whatever property each names. On
|
|
160
|
+
the THIRD, stop and escalate — an agent that alternates property names never trips the repeat
|
|
161
|
+
rule, so the repeat rule alone leaves the loop unbounded. This total is what actually bounds the
|
|
162
|
+
path; the repeat rule just catches the common case sooner.
|
|
163
|
+
|
|
164
|
+
Both escalate through the same gate the iteration cap uses. A conflict still never consumes a
|
|
165
|
+
revision iteration — the cap on conflicts is separate from, and additional to, the cap on
|
|
166
|
+
revisions.
|
|
167
|
+
|
|
168
|
+
**No workflow hands a conflict to a loop and returns.** Asking the user is the route everywhere;
|
|
169
|
+
recording is in addition to asking, never instead of it. `plan-phase` in particular never invokes
|
|
170
|
+
`/gsd:plan-review-convergence` — it runs *inside* that loop, so invoking it would be a cycle, and
|
|
171
|
+
"was I invoked by convergence?" is not a question the orchestrator can answer at runtime.
|
|
172
|
+
|
|
68
173
|
### After 3 Iterations
|
|
69
174
|
|
|
70
175
|
If issues persist after 3 revision cycles:
|
|
@@ -95,3 +200,5 @@ If issues persist after 3 revision cycles:
|
|
|
95
200
|
- **Each iteration gets a fresh agent spawn** -- don't try to continue in the same context
|
|
96
201
|
- **Checker feedback must be inlined** -- the revision agent needs to see exactly what failed
|
|
97
202
|
- **Don't silently swallow issues** -- always present the final state to the user after exiting the loop
|
|
203
|
+
- **A remediation hint is an example, not an order** -- an issue satisfied through a smaller valid
|
|
204
|
+
mechanism is addressed, and counts as resolved for the issue-count and stall checks
|
|
@@ -19,7 +19,7 @@ preserves named-dispatch behavior on older GSD installs that lack the query.
|
|
|
19
19
|
|
|
20
20
|
The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3 / #2510) regardless of the
|
|
21
21
|
resolved type — on non-Claude runtimes with no `agent_skills` config,
|
|
22
|
-
`
|
|
22
|
+
`gsd_run query agent-skills <role>` returns the installed agent prompt as
|
|
23
23
|
the block. So a coder dispatch with the planner persona injected gives kimi-code
|
|
24
24
|
the planner's behavior in the coder built-in's process.
|
|
25
25
|
|
|
@@ -94,9 +94,10 @@ After completion, create SUMMARY.md with:
|
|
|
94
94
|
**RED - Write failing test:**
|
|
95
95
|
1. Create test file following project conventions
|
|
96
96
|
2. Write test describing expected behavior (from `<behavior>` element)
|
|
97
|
-
3. Run test - it MUST fail
|
|
98
|
-
4.
|
|
99
|
-
5.
|
|
97
|
+
3. Run test - it MUST fail **intentionally** (#3770): the TARGET test you named must be the test that fails, on an assertion for the planned behavior. A nonzero exit alone is NOT RED — syntax errors, zero-test discovery, fixture crashes, parser errors, and unrelated assertions are INVALID_RED and must not authorize GREEN.
|
|
98
|
+
4. Persist the RED evidence record (command, exit code, failing test, expected result, actual result) and verify it: `gsd_run check tdd-red-evidence <record.json>`. Only verdict `RED_EVIDENCE_OK` satisfies the RED gate; `INVALID_RED` blocks GREEN until the RED phase is fixed.
|
|
99
|
+
5. If test passes: feature exists or test is wrong. Investigate.
|
|
100
|
+
6. Commit: `test({phase}-{plan}): add failing test for [feature]`
|
|
100
101
|
|
|
101
102
|
**GREEN - Implement to pass:**
|
|
102
103
|
1. Write minimal code to make test pass
|
|
@@ -256,26 +257,30 @@ When `workflow.tdd_mode` is enabled in config, the RED/GREEN/REFACTOR gate seque
|
|
|
256
257
|
|
|
257
258
|
| Gate | Required | Commit Pattern | Validation |
|
|
258
259
|
|------|----------|---------------|------------|
|
|
259
|
-
| RED | Yes | `test({phase}-{plan}): ...` | Test exists AND fails before implementation |
|
|
260
|
+
| RED | Yes | `test({phase}-{plan}): ...` | Test exists AND fails before implementation — intentionally: `check tdd-red-evidence` returns `RED_EVIDENCE_OK` (target test failed on an assertion for the behavior; anything else is INVALID_RED) |
|
|
260
261
|
| GREEN | Yes | `feat({phase}-{plan}): ...` | Test passes after implementation |
|
|
261
262
|
| REFACTOR | No | `refactor({phase}-{plan}): ...` | Tests still pass after cleanup |
|
|
262
263
|
|
|
263
264
|
### Fail-Fast Rules
|
|
264
265
|
|
|
265
266
|
1. **Unexpected GREEN in RED phase:** If the test passes before any implementation code is written, STOP. The feature may already exist or the test is wrong. Investigate before proceeding.
|
|
266
|
-
2. **
|
|
267
|
-
3. **
|
|
267
|
+
2. **INVALID_RED in RED phase (#3770):** A nonzero exit is not RED by itself. Zero-test discovery, fixture/load crashes, nonzero exits with no failing test, unrelated failing tests, and unexpected greens all classify as INVALID_RED (`gsd_run check tdd-red-evidence`). STOP and fix the RED phase — do NOT proceed to GREEN.
|
|
268
|
+
3. **Missing RED commit:** If no `test(...)` commit precedes the `feat(...)` commit, the TDD discipline was violated. Flag in SUMMARY.md.
|
|
269
|
+
4. **REFACTOR breaks tests:** Undo the refactor immediately. Commit was premature — refactor in smaller steps.
|
|
268
270
|
|
|
269
271
|
### Executor Gate Validation
|
|
270
272
|
|
|
271
273
|
After completing a `type: tdd` plan, the executor validates the git log:
|
|
272
274
|
```bash
|
|
275
|
+
# The commit protocol promises no zero-padding for ${PHASE}/${PLAN} — strip both and
|
|
276
|
+
# match the commit-scope position anchored (#4003).
|
|
277
|
+
PHASE_N=$((10#${PHASE})); PLAN_N=$((10#${PLAN}))
|
|
273
278
|
# Check for RED gate commit
|
|
274
|
-
git log --oneline --grep="^test(
|
|
279
|
+
git log --oneline -E --grep="^test\((0*${PHASE_N})-(0*${PLAN_N})\):" | head -1
|
|
275
280
|
# Check for GREEN gate commit
|
|
276
|
-
git log --oneline --grep="^feat(
|
|
281
|
+
git log --oneline -E --grep="^feat\((0*${PHASE_N})-(0*${PLAN_N})\):" | head -1
|
|
277
282
|
# Check for optional REFACTOR gate commit
|
|
278
|
-
git log --oneline --grep="^refactor(
|
|
283
|
+
git log --oneline -E --grep="^refactor\((0*${PHASE_N})-(0*${PLAN_N})\):" | head -1
|
|
279
284
|
```
|
|
280
285
|
|
|
281
286
|
If RED or GREEN gate commits are missing, add a `## TDD Gate Compliance` section to SUMMARY.md with the violation details.
|
|
@@ -289,9 +294,7 @@ When `workflow.tdd_mode` is enabled, the execute-phase orchestrator inserts a co
|
|
|
289
294
|
### Review Checkpoint Format
|
|
290
295
|
|
|
291
296
|
```
|
|
292
|
-
|
|
293
|
-
TDD REVIEW — Phase {X}
|
|
294
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
297
|
+
### TDD REVIEW — Phase {X}
|
|
295
298
|
|
|
296
299
|
TDD Plans: {count} | Gate violations: {count}
|
|
297
300
|
|
|
@@ -2,14 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
Visual patterns for user-facing GSD output. Orchestrators @-reference this file.
|
|
4
4
|
|
|
5
|
+
## Separators and Banners
|
|
6
|
+
|
|
7
|
+
**Never emit a fixed-width run of box-drawing characters.** A run of `━`, `─` or
|
|
8
|
+
`═` is ordinary text to the host that renders your output. In a narrower pane it
|
|
9
|
+
wraps, leaving orphan glyphs on a second line and coming apart from the heading it
|
|
10
|
+
was meant to frame. Markdown adapts to the available width; a 53-character rule
|
|
11
|
+
does not.
|
|
12
|
+
|
|
13
|
+
Three forms, and nothing else:
|
|
14
|
+
|
|
15
|
+
| Need | Emit |
|
|
16
|
+
|---|---|
|
|
17
|
+
| A titled section — stage, phase, checkpoint, completion, error | `### {TITLE}` (ATX heading) |
|
|
18
|
+
| A break between two sections | `---` on its own line, **with a blank line above it** |
|
|
19
|
+
| A framed panel of rows | `### {TITLE}` followed by the rows as plain lines |
|
|
20
|
+
|
|
21
|
+
**The blank line above `---` is load-bearing, not cosmetic.** A `---` placed
|
|
22
|
+
directly under a line of text is parsed as a setext heading underline for that
|
|
23
|
+
line, not as a thematic break — the rule silently swallows the line above it. A
|
|
24
|
+
blank line is what makes it a thematic break. (A blank line *after* `---` is
|
|
25
|
+
optional: a thematic break is a leaf block, so whatever follows starts a new
|
|
26
|
+
block either way. Add one where it reads better.)
|
|
27
|
+
|
|
28
|
+
**A stage banner is a heading alone — do not put a `---` above it.** An ATX
|
|
29
|
+
heading already separates, and it cannot be misparsed the way a bare `---` can.
|
|
30
|
+
|
|
31
|
+
### Why this is unconditional, not per-runtime
|
|
32
|
+
|
|
33
|
+
The alternative considered was a `rendersMarkdown` capability key, keeping
|
|
34
|
+
line-art for terminal-oriented runtimes and Markdown for Markdown hosts. It was
|
|
35
|
+
rejected: it needs a new descriptor key across every runtime plus the resolver,
|
|
36
|
+
and it leaves two output conventions to keep in sync forever — the divergence
|
|
37
|
+
class this repo already has a defect entry for. A heading and a thematic break
|
|
38
|
+
carry the same structure in a plain terminal that a rule pair did, without
|
|
39
|
+
committing to a width, so the second convention buys nothing. If a runtime ever
|
|
40
|
+
turns up that genuinely needs line-art, add the key then, against that evidence.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
5
44
|
## Stage Banners
|
|
6
45
|
|
|
7
46
|
Use for major workflow transitions.
|
|
8
47
|
|
|
9
48
|
```
|
|
10
|
-
|
|
11
|
-
GSD ► {STAGE NAME}
|
|
12
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
49
|
+
### GSD ► {STAGE NAME}
|
|
13
50
|
```
|
|
14
51
|
|
|
15
52
|
**Stage names (uppercase):**
|
|
@@ -25,20 +62,18 @@ Use for major workflow transitions.
|
|
|
25
62
|
|
|
26
63
|
---
|
|
27
64
|
|
|
28
|
-
## Checkpoint
|
|
65
|
+
## Checkpoint Panels
|
|
29
66
|
|
|
30
|
-
User action required.
|
|
67
|
+
User action required.
|
|
31
68
|
|
|
32
69
|
```
|
|
33
|
-
|
|
34
|
-
║ CHECKPOINT: {Type} ║
|
|
35
|
-
╚══════════════════════════════════════════════════════════════╝
|
|
70
|
+
### CHECKPOINT: {Type}
|
|
36
71
|
|
|
37
72
|
{Content}
|
|
38
73
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
**→ {ACTION PROMPT}**
|
|
42
77
|
```
|
|
43
78
|
|
|
44
79
|
**Types:**
|
|
@@ -60,6 +95,9 @@ User action required. 62-character width.
|
|
|
60
95
|
🎉 Milestone complete (only in banner)
|
|
61
96
|
```
|
|
62
97
|
|
|
98
|
+
Status symbols are single characters, not runs — they do not wrap and are
|
|
99
|
+
unaffected by the separator rule above.
|
|
100
|
+
|
|
63
101
|
---
|
|
64
102
|
|
|
65
103
|
## Progress Display
|
|
@@ -79,6 +117,9 @@ Tasks: 2/4 complete
|
|
|
79
117
|
Plans: 3/5 complete
|
|
80
118
|
```
|
|
81
119
|
|
|
120
|
+
The bar itself is a fixed 10-cell gauge, not a separator; it is intentionally
|
|
121
|
+
fixed-width and stays as it is.
|
|
122
|
+
|
|
82
123
|
---
|
|
83
124
|
|
|
84
125
|
## Spawning Indicators
|
|
@@ -104,7 +145,7 @@ Plans: 3/5 complete
|
|
|
104
145
|
Always at end of major completions.
|
|
105
146
|
|
|
106
147
|
```
|
|
107
|
-
|
|
148
|
+
---
|
|
108
149
|
|
|
109
150
|
## ▶ Next Up
|
|
110
151
|
|
|
@@ -114,23 +155,19 @@ Always at end of major completions.
|
|
|
114
155
|
|
|
115
156
|
`{copy-paste command}`
|
|
116
157
|
|
|
117
|
-
|
|
158
|
+
---
|
|
118
159
|
|
|
119
160
|
**Also available:**
|
|
120
161
|
- `/gsd-alternative-1` — description
|
|
121
162
|
- `/gsd-alternative-2` — description
|
|
122
|
-
|
|
123
|
-
───────────────────────────────────────────────────────────────
|
|
124
163
|
```
|
|
125
164
|
|
|
126
165
|
---
|
|
127
166
|
|
|
128
|
-
## Error
|
|
167
|
+
## Error Panel
|
|
129
168
|
|
|
130
169
|
```
|
|
131
|
-
|
|
132
|
-
║ ERROR ║
|
|
133
|
-
╚══════════════════════════════════════════════════════════════╝
|
|
170
|
+
### ERROR
|
|
134
171
|
|
|
135
172
|
{Error description}
|
|
136
173
|
|
|
@@ -149,14 +186,21 @@ Always at end of major completions.
|
|
|
149
186
|
| 3 | ○ | 0/2 | 0% |
|
|
150
187
|
```
|
|
151
188
|
|
|
189
|
+
Table rules use ASCII `-`, never box-drawing characters.
|
|
190
|
+
|
|
152
191
|
---
|
|
153
192
|
|
|
154
193
|
## Anti-Patterns
|
|
155
194
|
|
|
156
|
-
-
|
|
157
|
-
-
|
|
195
|
+
- Fixed-width runs of `━`, `─` or `═` as separators — they wrap in a narrow pane
|
|
196
|
+
- Box panels drawn with double-line box characters (U+2554, U+2557, U+255A, U+255D, U+2551, U+2560, U+2563) — the borders wrap independently of their contents. They are named here by code point rather than shown, because the guard below rejects the characters themselves anywhere in shipped content.
|
|
197
|
+
- A `---` directly under a line of text with no blank line between — that is a setext heading underline, not a break, and it swallows the line above
|
|
198
|
+
- Boxing a heading between two rules — the heading is the separator
|
|
199
|
+
- Mixing banner styles (`===`, `***`)
|
|
158
200
|
- Skipping `GSD ►` prefix in banners
|
|
159
201
|
- Random emoji (`🚀`, `✨`, `💫`)
|
|
160
202
|
- Missing Next Up block after completions
|
|
161
203
|
|
|
204
|
+
Enforced by `tests/responsive-separators.test.cjs`.
|
|
205
|
+
|
|
162
206
|
</ui_patterns>
|
|
@@ -69,5 +69,5 @@ closed). The **open subset is prose-owned in [domain-probes.md](./domain-probes.
|
|
|
69
69
|
real-time/offline/optimistic-UI, deep accessibility (WCAG breadth), i18n / RTL depth, and
|
|
70
70
|
emerging interaction paradigms (gesture/voice/reduced-motion/print) are open-ended and
|
|
71
71
|
cue-triggered — they do not belong in this closed taxonomy. This probe **complements** the
|
|
72
|
-
`gsd-ui-checker`
|
|
72
|
+
`gsd-ui-checker` seven quality dimensions (it adds a state-coverage axis); it does not change the
|
|
73
73
|
BLOCK/FLAG/PASS enum or the dimensions themselves.
|
|
@@ -34,7 +34,7 @@ Reference: `gsd-core/references/questioning.md` for the full anti-pattern list.
|
|
|
34
34
|
|
|
35
35
|
## State Management Anti-Patterns
|
|
36
36
|
|
|
37
|
-
15. **No direct Write/Edit to STATE.md or ROADMAP.md for mutations.** Always use `
|
|
37
|
+
15. **No direct Write/Edit to STATE.md or ROADMAP.md for mutations.** Always use `gsd_run query` for registered state/roadmap handlers (e.g. `state.update`, `state.advance-plan`, `roadmap.update-plan-progress`), or legacy `node …/gsd-tools.cjs` for CLI-only commands. Direct Write tool usage bypasses safe update logic and is unsafe in multi-session environments. Exception: first-time creation of STATE.md from template is allowed.
|
|
38
38
|
|
|
39
39
|
## Behavioral Rules
|
|
40
40
|
|
|
@@ -53,7 +53,7 @@ Reference: `gsd-core/references/questioning.md` for the full anti-pattern list.
|
|
|
53
53
|
## GSD-Specific Rules
|
|
54
54
|
|
|
55
55
|
24. **Do not** check for `mode === 'auto'` or `mode === 'autonomous'` -- GSD uses `yolo` config flag. Check `yolo: true` for autonomous mode, absence or `false` for interactive mode.
|
|
56
|
-
25. **Prefer `
|
|
56
|
+
25. **Prefer `gsd_run query`** for orchestration when a handler exists; when shelling out to the legacy CLI, go through the same `gsd_run` launcher rather than naming the shim file. The shim is not on PATH under any name ending in `.cjs`, and an agent that meets the bare filename falls back to searching the filesystem for it — on Git Bash for Windows that is a full-drive `find.exe` traversal (#3809). `gsd_run` resolves the CommonJS shim itself across every runtime home.
|
|
57
57
|
26. **Plan files MUST follow `{padded_phase}-{NN}-PLAN.md` pattern** (e.g., `01-01-PLAN.md`). Never use `PLAN-01.md`, `plan-01.md`, or any other variation -- gsd-tools detection depends on this exact pattern.
|
|
58
58
|
27. **Do not start executing the next plan before writing the SUMMARY.md for the current plan** -- downstream plans may reference it via `@` includes.
|
|
59
59
|
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Convergence Evidence Gate (#3304)
|
|
2
|
+
|
|
3
|
+
Bounds Step 7's anti-pattern scan so an approved gap-closure contract can
|
|
4
|
+
actually close. Applies **only** when `is_re_verification = true` (Step 0) —
|
|
5
|
+
a first pass has no prior contract to be out-of-contract from, so this gate
|
|
6
|
+
is a pure no-op there.
|
|
7
|
+
|
|
8
|
+
## The problem this closes
|
|
9
|
+
|
|
10
|
+
Steps 4-7c re-verify at full, unbounded scope on every re-verification pass —
|
|
11
|
+
that is documented, intended design, not the bug. The bug is narrower: Step
|
|
12
|
+
7's `Categorize:` line lets the verifier's own free-form judgment label
|
|
13
|
+
*anything* it believes "prevents goal" a 🛑 Blocker, and Step 9 Rule 1
|
|
14
|
+
promotes any 🛑 Blocker straight into `status: gaps_found` — with no
|
|
15
|
+
distinction between a blocker tied to what the gap-closure round was actually
|
|
16
|
+
supposed to fix and a blocker that is simply a new opinion formed on this
|
|
17
|
+
pass. Reported real-world instance: a re-verification cycle promoted four
|
|
18
|
+
"architectural and security observations" to blockers, none backed by a
|
|
19
|
+
failing test, none traceable to a requirement/decision/prior gap, reverting a
|
|
20
|
+
completed, all-green gap-closure round and recommending another `--gaps`
|
|
21
|
+
cycle — with no bound on how many times that could repeat.
|
|
22
|
+
|
|
23
|
+
Truths, artifacts, and key links (Steps 3-6) can **never** produce this
|
|
24
|
+
failure mode: Step 0 re-verification mode reuses the must-haves extracted in
|
|
25
|
+
Step 2 verbatim ("Skip to Step 3") rather than re-establishing them, so
|
|
26
|
+
whatever a truth/artifact/link *is* was fixed before this re-verification
|
|
27
|
+
round started. Only Step 7's blanket per-file scan is unbounded by that
|
|
28
|
+
must-haves contract — which is exactly the mechanism the issue's diagnosis
|
|
29
|
+
names. This gate therefore touches Step 7 only.
|
|
30
|
+
|
|
31
|
+
## Definitions
|
|
32
|
+
|
|
33
|
+
**Self-evidencing blocker (unaffected by this gate).** The debt-marker gate
|
|
34
|
+
(`TBD`/`FIXME`/`XXX` with no `issue #123`/`PR #123`/`#123`/`DEF-*` reference
|
|
35
|
+
on the same line) is the *only* Step 7 category with zero judgment
|
|
36
|
+
component — a regex match plus the absence of a follow-up reference, nothing
|
|
37
|
+
inferred. Its own textual presence in the file is the deterministic evidence.
|
|
38
|
+
It keeps blocking unconditionally, exactly as before. Do **not** extend this
|
|
39
|
+
carve-out to any other Step 7 category (stub classification, hollow props,
|
|
40
|
+
empty implementations, console-log-only): every one of those already
|
|
41
|
+
requires judgment per Step 7's own "Stub classification" paragraph ("a grep
|
|
42
|
+
match is a STUB only when the value flows to rendering... and no other code
|
|
43
|
+
path populates it with real data") — that judgment is exactly what this gate
|
|
44
|
+
exists to check.
|
|
45
|
+
|
|
46
|
+
**New-scope finding.** Any Step 7 🛑 Blocker other than a self-evidencing one
|
|
47
|
+
(above) is a new-scope finding **unless** either of the following holds, in
|
|
48
|
+
which case it is in-contract and blocks unconditionally, evidence or not:
|
|
49
|
+
|
|
50
|
+
1. **Carried-forward gap** — it matches an item in the previous
|
|
51
|
+
VERIFICATION.md's `gaps:` list, using the same 80%-token-overlap matching
|
|
52
|
+
algorithm Step 3b already uses for override matching (normalize to
|
|
53
|
+
lowercase, strip punctuation, collapse whitespace, tokenize, intersect).
|
|
54
|
+
2. **Regression** — the flagged file was modified since the previous
|
|
55
|
+
VERIFICATION.md's `verified:` timestamp. Check file-level, not
|
|
56
|
+
line-level — an LLM agent re-deriving precise line provenance mid-pass is
|
|
57
|
+
unreliable; file-level modification is a single, robust command:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git log --since="$PREV_VERIFIED_TS" --oneline -- "$file"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
A non-empty result means the file changed since the prior pass — the
|
|
64
|
+
gap-closure round could plausibly have introduced this finding, so it's
|
|
65
|
+
self-evidencing as a regression and blocks. **Fail closed**: if git
|
|
66
|
+
history is unavailable, ambiguous, or the timestamp can't be parsed,
|
|
67
|
+
treat the file as modified (blocks). The imprecision this trades away
|
|
68
|
+
(a big file with one unrelated hunk touched treats every pattern in it as
|
|
69
|
+
"new") only ever makes *more* things block, never fewer — consistent with
|
|
70
|
+
`<adversarial_stance>`.
|
|
71
|
+
|
|
72
|
+
A finding that is neither a carried-forward gap nor on a file modified since
|
|
73
|
+
the prior pass predates the gap-closure round entirely and was never flagged
|
|
74
|
+
as a gap then — this is the literal "some findings predated the gap
|
|
75
|
+
implementation and had previously been explicitly treated as non-blocking"
|
|
76
|
+
case from the issue.
|
|
77
|
+
|
|
78
|
+
**Deterministic evidence** — required for a new-scope finding to stay
|
|
79
|
+
blocking. One of:
|
|
80
|
+
|
|
81
|
+
- A **named test that FAILS when actually run** (red). Run exactly one test,
|
|
82
|
+
the same discipline Step 7b already uses for behavioral spot-checks —
|
|
83
|
+
never the full suite. Record the exact command and the failing output.
|
|
84
|
+
- **Another concrete, reproducible artifact** — a command + output that
|
|
85
|
+
demonstrates the defect (a crash, a probe failure, a reproducible bad
|
|
86
|
+
response). An assertion, opinion, or architectural preference with no test
|
|
87
|
+
and no reproducible command output is not evidence, however well-reasoned.
|
|
88
|
+
|
|
89
|
+
## The gate
|
|
90
|
+
|
|
91
|
+
- New-scope finding **with** deterministic evidence → 🛑 Blocker, unchanged.
|
|
92
|
+
This includes evidenced security findings — they are preserved and still
|
|
93
|
+
block.
|
|
94
|
+
- New-scope finding **without** deterministic evidence → downgrade out of
|
|
95
|
+
the blocker set. Record it in the `advisory:` frontmatter list (parallel to
|
|
96
|
+
the existing Step 9b `deferred:` list) with its reasoning intact. It does
|
|
97
|
+
**not** count toward Step 9 Rule 1's `gaps_found` trigger and does **not**
|
|
98
|
+
revert a completed must-have or, on its own, justify another
|
|
99
|
+
`/gsd:plan-phase --gaps` cycle.
|
|
100
|
+
|
|
101
|
+
This changes nothing else: a carried-forward gap or a regression still
|
|
102
|
+
blocks with or without a pre-existing requirement to point at, and every
|
|
103
|
+
non-Step-7 trigger (FAILED truth, MISSING/STUB artifact, NOT_WIRED link) is
|
|
104
|
+
untouched, since those can never be new-scope in the first place.
|
|
105
|
+
|
|
106
|
+
## What this deliberately does NOT implement
|
|
107
|
+
|
|
108
|
+
The issue as filed proposed a broader rule: a finding is advisory whenever
|
|
109
|
+
it is untraceable to a requirement/decision/prior-gap (conditions A and B),
|
|
110
|
+
regardless of evidence. The maintainer approved **condition C only** —
|
|
111
|
+
evidence, not contract-traceability, is the bar. A finding with no
|
|
112
|
+
pre-existing requirement to point at but with a real failing test still
|
|
113
|
+
blocks. Do not implement A/B: that would demote a genuine, reproducible
|
|
114
|
+
defect to advisory purely for being newly discovered, which is exactly the
|
|
115
|
+
deferral this project's no-defer rule forbids. This gate narrows *when a
|
|
116
|
+
blocker needs proof*, not *what counts as in scope*.
|
|
117
|
+
|
|
118
|
+
## Advisory frontmatter
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
advisory: # Only if new-scope findings lack deterministic evidence (Step 7)
|
|
122
|
+
- finding: "Short description of the new-scope concern"
|
|
123
|
+
category: architectural | security | other
|
|
124
|
+
reason: "Why this was raised; what would resolve it"
|
|
125
|
+
evidence_status: "none provided" # or cite what was attempted but inconclusive
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Report section
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
### Advisory (New Scope, Unevidenced)
|
|
132
|
+
|
|
133
|
+
New-scope findings from Step 7 with no deterministic evidence — reported,
|
|
134
|
+
not blocking, do not revert a completed must-have.
|
|
135
|
+
|
|
136
|
+
| # | Finding | Category | Why Advisory |
|
|
137
|
+
|---|---------|----------|--------------|
|
|
138
|
+
| 1 | {finding} | {category} | new-scope, no deterministic evidence |
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Include this section (even if empty, stating "None") whenever
|
|
142
|
+
`is_re_verification = true` ran — an omitted section reads as "not
|
|
143
|
+
checked," not "checked and clean."
|
|
144
|
+
|
|
145
|
+
## Worked example (from the issue's reported incident)
|
|
146
|
+
|
|
147
|
+
Prior pass: `gaps_found`, 4 items — all closed by approved gap-closure plans,
|
|
148
|
+
re-verification begins.
|
|
149
|
+
|
|
150
|
+
- Finding: "the retry loop's backoff strategy is architecturally fragile
|
|
151
|
+
under sustained load." Not in the prior `gaps:` list. The flagged file was
|
|
152
|
+
last modified 3 weeks before this verification pass (before the
|
|
153
|
+
gap-closure plans even started) — not a regression. No test run, no
|
|
154
|
+
reproducible command demonstrating a failure. → **advisory**, does not
|
|
155
|
+
block, does not revert the 4 closed gaps.
|
|
156
|
+
- Finding: `TBD: handle the timeout case` left in a file the gap-closure plan
|
|
157
|
+
edited this pass. → self-evidencing debt marker, unaffected by this gate,
|
|
158
|
+
blocks exactly as it always has.
|
|
159
|
+
- Finding: a previously-closed gap's file now fails the SAME named test that
|
|
160
|
+
originally proved it broken. → carried-forward gap, blocks.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Verify Command Path Resolvability (#2401)
|
|
2
|
+
|
|
3
|
+
> Reference file for gsd-plan-checker agent. Loaded on-demand via `@` reference.
|
|
4
|
+
|
|
5
|
+
**Question:** Does each `<automated>` command's target directory actually resolve from the
|
|
6
|
+
executor's cwd (the project root)? Format sanity above asks whether the *pattern* can match;
|
|
7
|
+
this asks whether the command can *run at all*.
|
|
8
|
+
|
|
9
|
+
**Do not hand-reason the filesystem.** #2401 is precisely the failure of doing so: this
|
|
10
|
+
checker flagged a bad `cd ../../frontend` (correct), then prescribed two successively-wrong
|
|
11
|
+
replacement paths — the second citing a `package.json` that did not exist. Consume the
|
|
12
|
+
deterministic probe result, never re-derive it yourself.
|
|
13
|
+
|
|
14
|
+
`gsd-core/workflows/plan-phase.md` already runs the probe **before** spawning this checker and
|
|
15
|
+
interpolates the result into the verification prompt as `{VERIFY_PATHS}`, inside a
|
|
16
|
+
`<verify_command_path_probe>` block. This dimension reads that already-supplied JSON — it never
|
|
17
|
+
invokes `gsd_run check verify-command-paths` itself. If `{VERIFY_PATHS}` is absent from the
|
|
18
|
+
prompt, treat this dimension as silent (nothing to check) rather than trying to run the probe.
|
|
19
|
+
|
|
20
|
+
The probe never executes command text (PLAN.md is untrusted, LLM-authored). It recognizes two
|
|
21
|
+
grounded forms — a leading `cd <literal>` chain and `npm --prefix <literal>` — and refuses to
|
|
22
|
+
guess at anything else.
|
|
23
|
+
|
|
24
|
+
**Process:** for each row in `.commands`, act on `severity` only:
|
|
25
|
+
|
|
26
|
+
| `severity` | `reason` | Action |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `blocker` | `missing_dir` / `no_manifest` | **BLOCKER** — quote `rawTarget` and `target` verbatim |
|
|
29
|
+
| `warning` | `dynamic_path` / `outside_root` / `script_missing` / `manifest_unreadable` | **WARNING** |
|
|
30
|
+
| `none` | — | silent |
|
|
31
|
+
|
|
32
|
+
Rules:
|
|
33
|
+
- **Report, never prescribe.** State the target that failed to resolve and what was missing.
|
|
34
|
+
Choosing the replacement is the planner's job — it now receives the prior phase's proven
|
|
35
|
+
commands (see `prior_verify_commands` in the planning context).
|
|
36
|
+
- `status: pending_creation` means an earlier task in this phase creates that directory. **Not
|
|
37
|
+
a finding.** Say nothing.
|
|
38
|
+
- `unresolvable` means the probe could not ground the path (a variable, glob, substitution, or
|
|
39
|
+
`~`). That is a WARNING, never a BLOCKER — and never a licence to guess the literal path.
|
|
40
|
+
- A non-empty `readError` means the probe **could not look**. Report that as a WARNING in its
|
|
41
|
+
own words; it is not a clean bill of health.
|
|
42
|
+
- `MISSING …` sentinels are Dimension 8's business — this dimension stays silent on them.
|
|
@@ -14,7 +14,7 @@ The user-flow form mirrors what a real user does: open, fill, click, see. No HTT
|
|
|
14
14
|
## When this framing applies
|
|
15
15
|
|
|
16
16
|
The framing fires when:
|
|
17
|
-
- The phase under verification has `**Mode:** mvp` in ROADMAP.md (parsed via `
|
|
17
|
+
- The phase under verification has `**Mode:** mvp` in ROADMAP.md (parsed via `gsd_run query roadmap.get-phase --pick mode`).
|
|
18
18
|
- AND the phase has a user-story-formatted goal (set by `/gsd mvp-phase` per Phase 2): "As a [user role], I want to [capability], so that [outcome]."
|
|
19
19
|
|
|
20
20
|
If the phase has `mode: mvp` but the goal is NOT in user-story format, the verifier surfaces this as a discrepancy and asks the user to run `/gsd mvp-phase` to reformat the goal — same pattern as the planner agent under MVP_MODE (per `gsd-core/references/planner-mvp-mode.md`).
|