@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
|
@@ -66,7 +66,7 @@ for the plan-checker gate to be meaningful.
|
|
|
66
66
|
Load all context in one call (paths only to minimize orchestrator context):
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
_GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$
|
|
69
|
+
_GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; _gsd_at() { for _p; do if [ -f "$_p" ]; then GSD_TOOLS="$_p"; return 0; fi; done; return 1; }; if _gsd_at "${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}" "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" "${_GSD_RUNTIME_ROOT}/.codex/gsd-core/bin/${_GSD_SHIM_NAME}"; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif unset -f gsd_run; _G="$(command -v gsd_run)"; then GSD_TOOLS="$_G"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif _gsd_at "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/gsd-core/bin/${_GSD_SHIM_NAME}" "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; then gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd_run is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi; GSD_IDENTITY_STATUS=unverified; case "$(gsd_run runtime-identity --raw 2>/dev/null || true)" in '{"packageName":"@opengsd/gsd-core"'*'}') GSD_IDENTITY_STATUS=ok;; esac; export GSD_IDENTITY_STATUS; [ "$GSD_IDENTITY_STATUS" = ok ] || echo "WARNING: \"$GSD_TOOLS\" did not prove it is @opengsd/gsd-core - it is either a different package or an @opengsd/gsd-core older than the runtime-identity verb. See docs/how-to/diagnose-a-foreign-gsd-tools.md" >&2; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${GSD_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${GSD_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
|
|
70
70
|
GRAN_PARAM=""; if [[ "$ARGUMENTS" =~ (^|[[:space:]])--granularity[[:space:]]+([^[:space:]-][^[:space:]]*) ]]; then GRAN_PARAM="--granularity ${BASH_REMATCH[2]}"; fi
|
|
71
71
|
PRD_PARAM=""; if [[ "$ARGUMENTS" =~ (^|[[:space:]])--prd[[:space:]]+([^[:space:]-][^[:space:]]*) ]]; then PRD_PARAM="--prd ${BASH_REMATCH[2]}"; fi
|
|
72
72
|
INGEST_PARAM=""; if [[ "$ARGUMENTS" =~ (^|[[:space:]])--ingest[[:space:]]+([^[:space:]-][^[:space:]]*) ]]; then INGEST_PARAM="--ingest ${BASH_REMATCH[2]}"; fi
|
|
@@ -86,19 +86,21 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
|
86
86
|
AGENT_SKILLS_RESEARCHER=$(gsd_run query agent-skills gsd-phase-researcher)
|
|
87
87
|
AGENT_SKILLS_PLANNER=$(gsd_run query agent-skills gsd-planner)
|
|
88
88
|
AGENT_SKILLS_CHECKER=$(gsd_run query agent-skills gsd-plan-checker)
|
|
89
|
-
CONTEXT_WINDOW=$(gsd_run query config-get context_window 2>/dev/null || echo "200000")
|
|
90
|
-
MVP_MODE_CFG=$(gsd_run query config-get workflow.mvp_mode 2>/dev/null || echo "false")
|
|
89
|
+
CONTEXT_WINDOW=$(gsd_run query config-get context_window --raw 2>/dev/null || echo "200000")
|
|
90
|
+
MVP_MODE_CFG=$(gsd_run query config-get workflow.mvp_mode --raw 2>/dev/null || echo "false")
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
When the tdd capability's `workflow.tdd_mode` is active (resolved via the plan:pre render-hooks), the planner agent is instructed to apply `type: tdd` to eligible tasks using heuristics from `gsd-core/references/tdd.md`. The TDD guidance is injected via the tdd capability's contribution hook at §5.6; no inline config-get is needed.
|
|
94
94
|
|
|
95
95
|
When `CONTEXT_WINDOW >= 500000`, the planner prompt includes the 3 most recent prior-phase CONTEXT.md/SUMMARY.md files plus any phases in the current phase's `Depends on:` field (explicit deps load regardless of recency).
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
**#2401 — `prior_verify_commands` is NOT part of that enrichment and is never gated on `CONTEXT_WINDOW`.** It is a handful of one-line `<automated>` commands harvested from the nearest prior phase that had any; the payload is tiny and its absence at 200k is exactly what made the planner re-invent a verify command and author an unrunnable path. Surface it at every context window.
|
|
98
|
+
|
|
99
|
+
Parse JSON for: `researcher_model`, `planner_model`, `checker_model`, `research_enabled`, `plan_checker_enabled`, `nyquist_validation_enabled`, `commit_docs`, `text_mode`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_reviews`, `has_plans`, `plan_count`, `phase_status` (#3569), `planning_exists`, `roadmap_exists`, `phase_req_ids`, `response_language`, `granularity`, `prior_verify_commands` (#2401 — array of `{phase, plan, task, command}`, possibly empty; emitted at every context window).
|
|
98
100
|
|
|
99
101
|
**#2517:** omit the `model=` param from an `Agent()` call when its `researcher`/`planner`/`checker`_model is `"inherit"` or empty — passing `model=""` 404s on non-Claude runtimes; omitting inherits the orchestrator model (mirrors execute-phase).
|
|
100
102
|
|
|
101
|
-
**If `response_language` is set:** All user-facing orchestrator output MUST be in `{response_language}`; technical terms, code, paths, and subagent prompts stay in English. Pass `response_language: {value}` into every spawned subagent prompt.
|
|
103
|
+
**If `response_language` is set:** All user-facing orchestrator output — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be in `{response_language}`; technical terms, code, paths, and subagent prompts stay in English. Pass `response_language: {value}` into every spawned subagent prompt.
|
|
102
104
|
|
|
103
105
|
**File paths (for <required_reading> blocks):** `state_path`, `roadmap_path`, `requirements_path`, `context_path`, `research_path`, `verification_path`, `uat_path`, `reviews_path`. These are null if files don't exist.
|
|
104
106
|
|
|
@@ -188,7 +190,7 @@ Set `phase_dir="${expected_phase_dir}"` after creation.
|
|
|
188
190
|
|
|
189
191
|
Set `CHUNKED_MODE` from flag or config:
|
|
190
192
|
```bash
|
|
191
|
-
CHUNKED_CFG=$(gsd_run query config-get workflow.plan_chunked 2>/dev/null || echo "false")
|
|
193
|
+
CHUNKED_CFG=$(gsd_run query config-get workflow.plan_chunked --raw 2>/dev/null || echo "false")
|
|
192
194
|
CHUNKED_MODE=false
|
|
193
195
|
if [[ "$ARGUMENTS" =~ --chunked ]] || [[ "$CHUNKED_CFG" == "true" ]]; then
|
|
194
196
|
CHUNKED_MODE=true
|
|
@@ -232,7 +234,7 @@ If `context_path` is not null, display: `Using phase context from: ${context_pat
|
|
|
232
234
|
|
|
233
235
|
Read discuss mode for context gate label:
|
|
234
236
|
```bash
|
|
235
|
-
DISCUSS_MODE=$(gsd_run query config-get workflow.discuss_mode 2>/dev/null || echo "discuss")
|
|
237
|
+
DISCUSS_MODE=$(gsd_run query config-get workflow.discuss_mode --raw 2>/dev/null || echo "discuss")
|
|
236
238
|
```
|
|
237
239
|
|
|
238
240
|
If `TEXT_MODE` is true, present as a plain-text numbered list:
|
|
@@ -285,6 +287,43 @@ fi
|
|
|
285
287
|
|
|
286
288
|
If `AI_SPEC_FILE` is non-empty, pass `AI_SPEC_PATH` and `FRAMEWORK_LINE` to the planner in step 8 so it can reference the AI design contract. If it is empty, the active `ai-integration` capability hook in step 5.6 handles any AI-system nudge or `/gsd:ai-integration-phase` dispatch.
|
|
287
289
|
|
|
290
|
+
## 4.6. Context Drift Pre-Check (drift plan:pre gate)
|
|
291
|
+
|
|
292
|
+
Capability-driven dispatch, same lazy-init pattern already used elsewhere in this file for
|
|
293
|
+
`PLAN_PRE_HOOKS_JSON`:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
if [ -z "${PLAN_PRE_HOOKS_JSON:-}" ]; then
|
|
297
|
+
PLAN_PRE_HOOKS_JSON=$(gsd_run loop render-hooks plan:pre --raw)
|
|
298
|
+
fi
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
If `activeHooks` (from `PLAN_PRE_HOOKS_JSON`) has a `kind == "gate"`, `capId == "drift"`,
|
|
302
|
+
`check.query == "verify.context-drift"` entry (`workflow.context_drift_precheck` on), run the
|
|
303
|
+
check before either the research-reuse decision (§5.1) or the pattern-mapper reuse decision
|
|
304
|
+
(§7.8) can fire — both would otherwise silently reuse a stale artifact with zero signal.
|
|
305
|
+
Otherwise skip to §5.
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
DRIFT=$(gsd_run verify context-drift "${PHASE}" 2>/dev/null || echo '{"skipped":true}')
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
If `skipped` is true, continue silently to §5 — nothing to compare (no CONTEXT.md yet, no
|
|
312
|
+
upstream artifacts yet, or the phase directory did not resolve).
|
|
313
|
+
|
|
314
|
+
If `stale_artifacts` is a non-empty array, print `message` verbatim (it names each stale
|
|
315
|
+
artifact and the command to regenerate it). Then:
|
|
316
|
+
|
|
317
|
+
- If `DRIFT.block` is `false` (the default, `workflow.context_drift_action: warn`): continue to
|
|
318
|
+
§5 — this is advisory only, exactly like the codebase-drift pre-check at §5.65.
|
|
319
|
+
- If `DRIFT.block` is `true` (opt-in `workflow.context_drift_action: block`): **exit the
|
|
320
|
+
plan-phase workflow** rather than continuing. Do not spawn the researcher, the planner, or the
|
|
321
|
+
pattern mapper against a premise the user has not yet reconciled. Point the user at re-running
|
|
322
|
+
`/gsd:plan-phase {X}` once the named artifacts are regenerated, or at disabling the check with
|
|
323
|
+
`gsd_run query config-set workflow.context_drift_action warn` if the flag was a false positive.
|
|
324
|
+
|
|
325
|
+
If `stale_artifacts` is empty, continue silently to §5 — nothing to report.
|
|
326
|
+
|
|
288
327
|
## 5. Handle Research
|
|
289
328
|
|
|
290
329
|
**Skip if:** `--gaps` flag or `--skip-research` flag or `--reviews` flag.
|
|
@@ -335,9 +374,7 @@ If user selects "Skip research": skip to step 6.
|
|
|
335
374
|
|
|
336
375
|
Display banner:
|
|
337
376
|
```
|
|
338
|
-
|
|
339
|
-
GSD ► RESEARCHING PHASE {X}
|
|
340
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
377
|
+
### GSD ► RESEARCHING PHASE {X}
|
|
341
378
|
|
|
342
379
|
◆ Spawning researcher... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
343
380
|
```
|
|
@@ -372,7 +409,7 @@ Agent(
|
|
|
372
409
|
)
|
|
373
410
|
```
|
|
374
411
|
|
|
375
|
-
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
412
|
+
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. Never call `ScheduleWakeup` or any host wake/sleep-scheduling tool to literalize this wait (#4079) — the Agent() call returns on its own; a partial-args wake call surfaces a red validation error.
|
|
376
413
|
|
|
377
414
|
### Handle Researcher Return
|
|
378
415
|
|
|
@@ -421,6 +458,8 @@ test -f "${PHASE_DIR}/${PADDED_PHASE}-VALIDATION.md" && echo "VALIDATION_CREATED
|
|
|
421
458
|
PLAN_PRE_HOOKS_JSON=$(gsd_run loop render-hooks plan:pre --raw)
|
|
422
459
|
```
|
|
423
460
|
|
|
461
|
+
**Contribution dispatch (#3606):** inject every `kind == "contribution"` fragment from `PLAN_PRE_HOOKS_JSON` per @gsd-core/references/loop-hook-dispatch.md, in array order, into the role each entry's `into` names — planner-targeted ones land in the prompt block below, orchestrator-targeted ones in your working context. The security specialization below is one such contribution, not a replacement for the generic dispatch.
|
|
462
|
+
|
|
424
463
|
Resolve active contribution hooks from `PLAN_PRE_HOOKS_JSON` where `kind == "contribution"` and `capId == "security"`.
|
|
425
464
|
|
|
426
465
|
**If no active security contribution hook exists:** Skip to step 5.6.
|
|
@@ -430,9 +469,7 @@ Resolve active contribution hooks from `PLAN_PRE_HOOKS_JSON` where `kind == "con
|
|
|
430
469
|
Display banner:
|
|
431
470
|
|
|
432
471
|
```
|
|
433
|
-
|
|
434
|
-
GSD ► SECURITY THREAT MODEL REQUIRED (ASVS L{SECURITY_ASVS})
|
|
435
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
472
|
+
### GSD ► SECURITY THREAT MODEL REQUIRED (ASVS L{SECURITY_ASVS})
|
|
436
473
|
|
|
437
474
|
Each PLAN.md must include a <threat_model> block.
|
|
438
475
|
Block on: {SECURITY_BLOCK} severity threats.
|
|
@@ -518,7 +555,8 @@ Output this markdown directly (not as a code block):
|
|
|
518
555
|
## ⚠ UI-SPEC.md missing for Phase {N}
|
|
519
556
|
▶ Recommended next step:
|
|
520
557
|
`/gsd:ui-phase {N} ${GSD_WS}` — generate UI design contract before planning
|
|
521
|
-
|
|
558
|
+
|
|
559
|
+
---
|
|
522
560
|
Also available:
|
|
523
561
|
- `/gsd:plan-phase {N} --skip-ui ${GSD_WS}` — plan without UI-SPEC (not recommended for frontend phases)
|
|
524
562
|
```
|
|
@@ -546,8 +584,6 @@ map is refreshed first. (`drift_action: auto-remap` stays at `execute:wave:post`
|
|
|
546
584
|
ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null || true
|
|
547
585
|
```
|
|
548
586
|
|
|
549
|
-
**If exists AND `--reviews` flag:** Skip prompt — go straight to replanning (the purpose of `--reviews` is to replan with review feedback).
|
|
550
|
-
|
|
551
587
|
**If exists AND no `--reviews` flag:** Offer: 1) Add more plans, 2) View existing, 3) Replan from scratch.
|
|
552
588
|
|
|
553
589
|
## 7. Use Context Paths from INIT
|
|
@@ -583,6 +619,11 @@ UI_SPEC_FILE=$(ls "${PHASE_DIR_FOR_SPEC}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
|
583
619
|
UI_SPEC_PATH="${UI_SPEC_FILE}"
|
|
584
620
|
```
|
|
585
621
|
|
|
622
|
+
**If plans exist AND the `--reviews` flag is set:** Before replanning from `--reviews`, scan
|
|
623
|
+
`REVIEWS_PATH` for open plan-revision conflicts inside the writer-owned delimiter pair. Go
|
|
624
|
+
straight to replanning with those records included, and flip the matching line to `- [x]` once
|
|
625
|
+
the chosen resolution is applied, using the SAME close gate as step 12 below.
|
|
626
|
+
|
|
586
627
|
## 7.5. Verify Nyquist Artifacts
|
|
587
628
|
|
|
588
629
|
Skip if `nyquist_validation_enabled` is false OR `research_enabled` is false.
|
|
@@ -601,7 +642,7 @@ VALIDATION_EXISTS=$(ls "${PHASE_DIR}"/*-VALIDATION.md 2>/dev/null | head -1)
|
|
|
601
642
|
If missing and Nyquist is still enabled/applicable — ask user:
|
|
602
643
|
1. Re-run: `/gsd:plan-phase {PHASE} --research ${GSD_WS}`
|
|
603
644
|
2. Disable Nyquist with the exact command:
|
|
604
|
-
`
|
|
645
|
+
`gsd_run query config-set workflow.nyquist_validation false`
|
|
605
646
|
3. Continue anyway (plans fail Dimension 8)
|
|
606
647
|
|
|
607
648
|
Proceed to Step 7.8 (or Step 8 if pattern mapper is disabled) only if user selects 2 or 3.
|
|
@@ -614,9 +655,7 @@ Pattern mapper activation is owned by the `pattern-mapper` capability's `plan:pr
|
|
|
614
655
|
|
|
615
656
|
Display banner:
|
|
616
657
|
```
|
|
617
|
-
|
|
618
|
-
GSD ► PATTERN MAPPING PHASE {X}
|
|
619
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
658
|
+
### GSD ► PATTERN MAPPING PHASE {X}
|
|
620
659
|
|
|
621
660
|
◆ Spawning pattern mapper... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
622
661
|
```
|
|
@@ -636,7 +675,7 @@ Agent(
|
|
|
636
675
|
)
|
|
637
676
|
```
|
|
638
677
|
|
|
639
|
-
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
678
|
+
> **ORCHESTRATOR RULE — ALL RUNTIMES**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available. Never call `ScheduleWakeup` or any host wake/sleep-scheduling tool to literalize this wait (#4079) — the Agent() call returns on its own; a partial-args wake call surfaces a red validation error.
|
|
640
679
|
|
|
641
680
|
**Handle return:**
|
|
642
681
|
- **`## PATTERN MAPPING COMPLETE`:** Update `PATTERNS_PATH` to the created file path, continue to step 8.
|
|
@@ -686,9 +725,7 @@ independent of the teams-status guard above, AC2).
|
|
|
686
725
|
|
|
687
726
|
Display banner:
|
|
688
727
|
```
|
|
689
|
-
|
|
690
|
-
GSD ► PLANNING PHASE {X}
|
|
691
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
728
|
+
### GSD ► PLANNING PHASE {X}
|
|
692
729
|
|
|
693
730
|
◆ Spawning planner... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
694
731
|
```
|
|
@@ -725,6 +762,17 @@ ${CONTEXT_WINDOW >= 500000 ? `
|
|
|
725
762
|
- Skip all other prior phases to stay within context budget
|
|
726
763
|
` : ''}
|
|
727
764
|
</required_reading>
|
|
765
|
+
${prior_verify_commands.length > 0 ? `
|
|
766
|
+
<proven_verify_commands>
|
|
767
|
+
**Verify commands the previous phase actually ran (#2401) — reuse before re-deriving.** These
|
|
768
|
+
are the `<automated>` commands from the nearest prior phase that had any. They resolved from
|
|
769
|
+
the executor's cwd in a real run, so a path here is grounded evidence, not a guess. When this
|
|
770
|
+
phase's build/test story is the same, **copy the command verbatim**; do not re-derive a
|
|
771
|
+
directory. Surfaced at every context window — not part of the 1M enrichment above.
|
|
772
|
+
|
|
773
|
+
{For each entry in \`prior_verify_commands\`: \`- Phase {phase} · {task}: \\\`{command}\\\`\`}
|
|
774
|
+
</proven_verify_commands>
|
|
775
|
+
` : ''}
|
|
728
776
|
${API_SURFACE_PATH ? `
|
|
729
777
|
<intel_surface_hint>
|
|
730
778
|
**API Surface (HINT — may be incomplete):** When \`intel.enabled\` is true, \`${API_SURFACE_PATH}\` lists symbols extracted from the codebase by regex/JS analysis. Prefer symbols listed there when referencing existing code. This surface is regex/JS-derived and MAY BE INCOMPLETE — a symbol's absence means *unknown*, not *nonexistent*. Never treat the surface as exhaustive. If you reference a symbol that is not in the surface and this phase creates it, list it under "Artifacts this phase produces".
|
|
@@ -737,13 +785,52 @@ ${AGENT_SKILLS_PLANNER}
|
|
|
737
785
|
|
|
738
786
|
For each current actionable finding in REVIEWS.md, the planner MUST either:
|
|
739
787
|
- incorporate it into a PLAN.md task, `<action>`, `<acceptance_criteria>`, `<verify>`, `must_haves`, threat model, or artifact list; or
|
|
740
|
-
- explicitly document a deferral/rejection rationale in the relevant PLAN.md
|
|
788
|
+
- explicitly document a deferral/rejection rationale in the relevant PLAN.md, using the Review Dispositions Ledger in `gsd-core/references/planner-reviews.md`.
|
|
741
789
|
|
|
742
790
|
Historical findings already incorporated, explicitly deferred/rejected in PLAN.md, or marked fully resolved do not require new plan changes.
|
|
743
791
|
</review_incorporation_contract>
|
|
744
792
|
|
|
745
793
|
**Phase requirement IDs (every ID MUST appear in a plan's `requirements` field):** {phase_req_ids}
|
|
746
794
|
|
|
795
|
+
<tracked_source_paths>
|
|
796
|
+
**Tracked-source paths (#3645):** Every path you write into PLAN.md —
|
|
797
|
+
`files_modified`, `must_haves.artifacts`, action paths, and paths inherited
|
|
798
|
+
from `{PATTERNS_PATH}` or prior-phase plans — must name git-tracked source,
|
|
799
|
+
never a gitignored install/runtime mirror (e.g. `<root>/.gsd/capabilities/<id>/...`
|
|
800
|
+
synced from a plugin's tracked tree; executor edits to a mirror die on the
|
|
801
|
+
next capability sync). Verify existing-file paths with `git ls-files -- <path>`
|
|
802
|
+
(non-empty = tracked); resolve a gitignored hit to its tracked origin
|
|
803
|
+
(`plugins/*/.gsd/capabilities/<id>/...`, root `capabilities/<id>/...`). A
|
|
804
|
+
not-yet-existing path is a new file — keep the intended path. Re-verify
|
|
805
|
+
inherited paths: fix a mirror path, never inherit. Submodule files: check
|
|
806
|
+
from within the submodule.
|
|
807
|
+
</tracked_source_paths>
|
|
808
|
+
|
|
809
|
+
<failing_direction_contract>
|
|
810
|
+
**Stated failing direction (#3172):** Every runnable `<automated>` verify command
|
|
811
|
+
you write MUST be followed by a `<fails_when>` sibling naming what output
|
|
812
|
+
constitutes failure — an exit code, a string in the output, a missing line. A
|
|
813
|
+
command with no expressible failure mode is not an acceptance test.
|
|
814
|
+
|
|
815
|
+
```xml
|
|
816
|
+
<verify>
|
|
817
|
+
<automated>npm --prefix apps/api test -- auth.spec.ts</automated>
|
|
818
|
+
<fails_when>non-zero exit, or "0 passed" in the summary line</fails_when>
|
|
819
|
+
</verify>
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
One statement per runnable command, placed immediately after it: within a task
|
|
823
|
+
each `<fails_when>` binds to the nearest preceding `<automated>`, and the first
|
|
824
|
+
statement after a command is the binding one. Name an OBSERVABLE signal, never
|
|
825
|
+
the word "failure" — `non-zero exit` is complete, `the command fails` is a
|
|
826
|
+
restatement. `TBD`/`TODO`/`N/A`/`none`/`unknown`/`?`/`-` are rejected outright as
|
|
827
|
+
whole values. The `MISSING — Wave 0 …` sentinel is exempt: it is not runnable, so
|
|
828
|
+
it has no failure mode to state. Ask yourself: if this command were silently
|
|
829
|
+
doing nothing, what in its output would tell me? If you cannot answer, fix the
|
|
830
|
+
command — do not invent a statement for it.
|
|
831
|
+
Rules + worked examples: @gsd-core/references/planner-failing-direction.md
|
|
832
|
+
</failing_direction_contract>
|
|
833
|
+
|
|
747
834
|
**Project instructions:** Read ./CLAUDE.md or ./.claude/CLAUDE.md if either exists — follow project-specific guidelines
|
|
748
835
|
**Project skills:** Check .claude/skills/ or .agents/skills/ directory (if either exists) — read SKILL.md files, plans should account for project skill rules
|
|
749
836
|
|
|
@@ -964,13 +1051,24 @@ Use AskUserQuestion for each gap (or batch if multiple gaps).
|
|
|
964
1051
|
|
|
965
1052
|
Display banner:
|
|
966
1053
|
```
|
|
967
|
-
|
|
968
|
-
GSD ► VERIFYING PLANS
|
|
969
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1054
|
+
### GSD ► VERIFYING PLANS
|
|
970
1055
|
|
|
971
1056
|
◆ Spawning plan checker... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
972
1057
|
```
|
|
973
1058
|
|
|
1059
|
+
**Verify-command probes (#2401, #3172).** Before spawning, run both deterministic probes and
|
|
1060
|
+
hand their JSON to the checker. The first resolves each `<automated>` command's target; the
|
|
1061
|
+
second reports which runnable commands carry a `<fails_when>` statement naming their failure
|
|
1062
|
+
signal. Neither executes command text, and neither prescribes a replacement — the first reports
|
|
1063
|
+
which `<automated>` targets resolve, which do not, and which it refused to guess at; the second
|
|
1064
|
+
reports which commands state a failure signal and never authors one. Handing both over is what
|
|
1065
|
+
stops the checker hand-reasoning the filesystem or the plans.
|
|
1066
|
+
|
|
1067
|
+
```bash
|
|
1068
|
+
VERIFY_PATHS=$(gsd_run check verify-command-paths "${PHASE}" --raw)
|
|
1069
|
+
FAILING_DIRECTIONS=$(gsd_run check verify-failure-directions "${PHASE}" --raw)
|
|
1070
|
+
```
|
|
1071
|
+
|
|
974
1072
|
Checker prompt:
|
|
975
1073
|
|
|
976
1074
|
```markdown
|
|
@@ -990,6 +1088,31 @@ Checker prompt:
|
|
|
990
1088
|
|
|
991
1089
|
${AGENT_SKILLS_CHECKER}
|
|
992
1090
|
|
|
1091
|
+
<verify_command_path_probe>
|
|
1092
|
+
**Deterministic verify-command path probe (#2401)** — already run; do NOT re-derive these
|
|
1093
|
+
verdicts by reading the filesystem yourself. Act on `severity` per the "Verify Command Path
|
|
1094
|
+
Resolvability" dimension: `blocker` → BLOCKER, `warning` → WARNING, `none` → silent.
|
|
1095
|
+
`status: pending_creation` is not a finding. A non-empty `readError` means the probe could not
|
|
1096
|
+
look — a WARNING, not a pass. Report the failing target verbatim; never prescribe a
|
|
1097
|
+
replacement path.
|
|
1098
|
+
|
|
1099
|
+
```json
|
|
1100
|
+
{VERIFY_PATHS}
|
|
1101
|
+
```
|
|
1102
|
+
</verify_command_path_probe>
|
|
1103
|
+
|
|
1104
|
+
<failing_direction_probe>
|
|
1105
|
+
**Deterministic failing-direction probe (#3172)** — already run; do NOT re-derive these verdicts
|
|
1106
|
+
by re-reading the plans yourself. Act on `severity` per check 8f: `blocker` → BLOCKER,
|
|
1107
|
+
`warning` → WARNING, `none` → silent. `status: sentinel` is a Wave-0 `MISSING` placeholder and is
|
|
1108
|
+
not a finding. A non-empty `readError` means the probe could not look — a WARNING, not a pass.
|
|
1109
|
+
Quote the command that has no stated failure mode; never author the statement for the planner.
|
|
1110
|
+
|
|
1111
|
+
```json
|
|
1112
|
+
{FAILING_DIRECTIONS}
|
|
1113
|
+
```
|
|
1114
|
+
</failing_direction_probe>
|
|
1115
|
+
|
|
993
1116
|
<review_incorporation_verification>
|
|
994
1117
|
**If Mode is reviews:** Read REVIEWS.md and verify each current actionable review finding is visible in executable PLAN.md content or explicitly deferred/rejected in the relevant PLAN.md. A finding remains actionable if it requires a concrete plan task, `<action>`, `<acceptance_criteria>`, `<verify>`, `must_haves`, threat-model item, stale-path correction, or execution contract change before /gsd:execute-phase runs.
|
|
995
1118
|
|
|
@@ -1082,9 +1205,9 @@ Track `stall_reentry_count` (starts at 0; incremented each time "Adjust approach
|
|
|
1082
1205
|
|
|
1083
1206
|
**If iteration_count < 3:**
|
|
1084
1207
|
|
|
1085
|
-
Parse issue count from checker return: count BLOCKER + WARNING entries in the YAML issues block (structured output from gsd-plan-checker). If the checker's return contains no YAML issues block (i.e., the plan was approved with no issues), treat `issue_count` as 0 and skip the stall check — the plan passed. Proceed to step 13.
|
|
1208
|
+
Parse issue count from checker return: count BLOCKER + WARNING entries in the YAML issues block (structured output from gsd-plan-checker); an entry whose severity is missing or unrecognized counts as a BLOCKER (fail closed). If the checker's return contains no YAML issues block (i.e., the plan was approved with no issues), treat `issue_count` as 0 and skip the stall check — the plan passed. Proceed to step 13 — likewise when every entry in the block is explicitly INFO (display them as advisories). Advisory format: `ℹ advisory — {dimension}: {description}` per INFO entry, listed once before the step-13 output.
|
|
1086
1209
|
|
|
1087
|
-
Display: `Revision iteration {N}/3 -- {blocker_count} blockers, {warning_count} warnings`
|
|
1210
|
+
Display (only when entering the revision loop — skip if the paragraph above already proceeded to step 13): `Revision iteration {N}/3 -- {blocker_count} blockers, {warning_count} warnings`
|
|
1088
1211
|
|
|
1089
1212
|
**Stall detection:** If `issue_count >= prev_issue_count`:
|
|
1090
1213
|
Display: `Revision loop stalled — issue count not decreasing ({issue_count} issues remain after {N} iterations)`
|
|
@@ -1124,9 +1247,14 @@ ${AGENT_SKILLS_PLANNER}
|
|
|
1124
1247
|
</revision_context>
|
|
1125
1248
|
|
|
1126
1249
|
<instructions>
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1250
|
+
`required_property` + evidence + severity BIND. `fix_hint` is ONE non-binding example route: a
|
|
1251
|
+
smaller or different mechanism reaching the same property resolves it — say which. Re-check CONTEXT.md's locked decisions, capability guidance, and existing plan constraints
|
|
1252
|
+
BEFORE editing; if a hint would contradict one, or the
|
|
1253
|
+
property is unreachable without breaking one, return `## REVISION_CONFLICT` with the conflict and
|
|
1254
|
+
the alternatives rather than applying or working around it. Full contract:
|
|
1255
|
+
`gsd-core/references/planner-revision.md`.
|
|
1256
|
+
|
|
1257
|
+
Do NOT replan from scratch unless fundamental. Return what changed.
|
|
1130
1258
|
</instructions>
|
|
1131
1259
|
```
|
|
1132
1260
|
|
|
@@ -1142,10 +1270,83 @@ Agent(
|
|
|
1142
1270
|
|
|
1143
1271
|
**ORCHESTRATOR RULE — ALL RUNTIMES:** (7.99; no marker, mtimes only) `TS=$(date +%s)`; repeat `PLANNER_STALL_RESULT=$(gsd_stall_watch "$TS" "{outputFile}" "${PHASE_DIR}"'/*-PLAN.md')` while waiting/active — `stalled` -> 1) Accept as revised, to step 13, 2) Retry, 3) Stop.
|
|
1144
1272
|
|
|
1145
|
-
|
|
1273
|
+
**If the planner returns `## REVISION_CONFLICT`:** follow the shared Conflict Return protocol in
|
|
1274
|
+
`gsd-core/references/revision-loop.md`, with this workflow's bindings:
|
|
1275
|
+
|
|
1276
|
+
```bash
|
|
1277
|
+
if ! CONVERGENCE_ENABLED=$(gsd_run query config-get workflow.plan_review_convergence --raw 2>/dev/null); then
|
|
1278
|
+
echo "BLOCKED: cannot read workflow.plan_review_convergence." >&2
|
|
1279
|
+
exit 1
|
|
1280
|
+
fi
|
|
1281
|
+
REVIEWS_FILE="${REVIEWS_PATH}"
|
|
1282
|
+
if [ "${CONVERGENCE_ENABLED}" = "true" ] && [ -n "${REVIEWS_FILE}" ] && [ ! -f "${REVIEWS_FILE}" ]; then
|
|
1283
|
+
echo "BLOCKED: cannot persist plan-revision conflict -- REVIEWS_PATH not a regular file: ${REVIEWS_FILE}" >&2
|
|
1284
|
+
exit 1
|
|
1285
|
+
fi
|
|
1286
|
+
```
|
|
1287
|
+
|
|
1288
|
+
- Counter not spent: `iteration_count`.
|
|
1289
|
+
- Record channel: `$REVIEWS_FILE`'s `## Plan-Revision Conflicts` section. plan-phase wrote the
|
|
1290
|
+
line, so plan-phase closes it.
|
|
1291
|
+
- After re-spawning, return to this step, not the checker.
|
|
1292
|
+
- Escalates via the iteration cap on repeated `required_property`, and on the THIRD conflict
|
|
1293
|
+
return of this loop whatever property it names.
|
|
1294
|
+
- Sanitize-then-insert is real shell; fields reach `awk` via `ENVIRON`, never `-v` (decodes
|
|
1295
|
+
literal `\n` as a real newline). Export the row's
|
|
1296
|
+
`CONFLICT_DIMENSION/_PLAN/_PROPERTY/_CONSTRAINT/_ALTERNATIVES`, then run:
|
|
1297
|
+
|
|
1298
|
+
```bash
|
|
1299
|
+
if [ "${CONVERGENCE_ENABLED}" = "true" ] && [ -n "${REVIEWS_FILE}" ]; then
|
|
1300
|
+
san() { printf '%s' "$1" | tr '\r\n\t' ' ' | sed -E 's/^[[:space:]]*[#|`-]+[[:space:]]*//'; }
|
|
1301
|
+
LINE="- [ ] REVISION_CONFLICT $(san "${CONFLICT_DIMENSION}")/$(san "${CONFLICT_PLAN}") — required_property: $(san "${CONFLICT_PROPERTY}") | conflicts with: $(san "${CONFLICT_CONSTRAINT}") | alternatives: $(san "${CONFLICT_ALTERNATIVES}")"
|
|
1302
|
+
END='<!-- gsd:plan-revision-conflicts:end -->'
|
|
1303
|
+
TMP=$(mktemp "${REVIEWS_FILE}.XXXXXX")
|
|
1304
|
+
if ! LINE="$LINE" END="$END" awk '
|
|
1305
|
+
{ cur = $0; sub(/\r$/, "", cur) }
|
|
1306
|
+
cur == ENVIRON["LINE"] { seen = 1 }
|
|
1307
|
+
cur == ENVIRON["END"] && !ins { if (!seen) print ENVIRON["LINE"]; ins = 1 }
|
|
1308
|
+
{ print }
|
|
1309
|
+
END { if (!ins) exit 2 }
|
|
1310
|
+
' "${REVIEWS_FILE}" > "${TMP}"; then
|
|
1311
|
+
rm -f "${TMP}"
|
|
1312
|
+
echo "BLOCKED: no end delimiter in '${REVIEWS_FILE}'." >&2
|
|
1313
|
+
exit 1
|
|
1314
|
+
fi
|
|
1315
|
+
mv "${TMP}" "${REVIEWS_FILE}"
|
|
1316
|
+
fi
|
|
1317
|
+
```
|
|
1318
|
+
|
|
1319
|
+
**Otherwise (revised plans, not `## REVISION_CONFLICT`):** if this re-spawn followed a
|
|
1320
|
+
resolved conflict, close its record — nothing persists across fences, so export `REVIEWS_FILE`,
|
|
1321
|
+
the same `CONFLICT_DIMENSION`/`CONFLICT_PLAN` used to open it, and `CONFLICT_RESOLUTION` (a
|
|
1322
|
+
one-line summary). Then run:
|
|
1323
|
+
|
|
1324
|
+
```bash
|
|
1325
|
+
if [ "${CONVERGENCE_ENABLED}" = "true" ] && [ -n "${REVIEWS_FILE}" ]; then
|
|
1326
|
+
san() { printf '%s' "$1" | tr '\r\n\t' ' ' | sed -E 's/^[[:space:]]*[#|`-]+[[:space:]]*//'; }
|
|
1327
|
+
PREFIX="- [ ] REVISION_CONFLICT $(san "${CONFLICT_DIMENSION}")/$(san "${CONFLICT_PLAN}") — "
|
|
1328
|
+
RES=$(printf '%s' "${CONFLICT_RESOLUTION}" | tr '\r\n\t' ' ')
|
|
1329
|
+
TMP=$(mktemp "${REVIEWS_FILE}.XXXXXX")
|
|
1330
|
+
if ! PREFIX="$PREFIX" RES="$RES" awk '
|
|
1331
|
+
{ cur = $0; sub(/\r$/, "", cur) }
|
|
1332
|
+
!d && index(cur, ENVIRON["PREFIX"]) == 1 { print "- [x]" substr(cur, 6) " | resolved: " ENVIRON["RES"]; d = 1; next }
|
|
1333
|
+
{ print }
|
|
1334
|
+
END { if (!d) exit 2 }
|
|
1335
|
+
' "${REVIEWS_FILE}" > "${TMP}"; then
|
|
1336
|
+
rm -f "${TMP}"
|
|
1337
|
+
echo "BLOCKED: no open conflict '${CONFLICT_DIMENSION}/${CONFLICT_PLAN}' in '${REVIEWS_FILE}'." >&2
|
|
1338
|
+
exit 1
|
|
1339
|
+
fi
|
|
1340
|
+
mv "${TMP}" "${REVIEWS_FILE}"
|
|
1341
|
+
fi
|
|
1342
|
+
```
|
|
1343
|
+
|
|
1344
|
+
Spawn checker again (step 10), then increment `iteration_count`.
|
|
1146
1345
|
|
|
1147
1346
|
**If iteration_count >= 3:**
|
|
1148
1347
|
|
|
1348
|
+
Recount BLOCKER + WARNING by the same rule — an entry whose severity is missing or unrecognized counts as a BLOCKER (fail closed). If `issue_count` is 0 — PASSED, or every entry in the block is explicitly INFO — display any advisories and proceed to step 13; the gate below fires on everything else (#3724).
|
|
1349
|
+
|
|
1149
1350
|
Display: `Max iterations reached. {N} issues remain:` + issue list
|
|
1150
1351
|
|
|
1151
1352
|
Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
|
|
@@ -1165,15 +1366,13 @@ Skipping bounce step.
|
|
|
1165
1366
|
|
|
1166
1367
|
**Read pass count:**
|
|
1167
1368
|
```bash
|
|
1168
|
-
BOUNCE_PASSES=$(gsd_run query config-get workflow.plan_bounce_passes 2>/dev/null || echo "2")
|
|
1369
|
+
BOUNCE_PASSES=$(gsd_run query config-get workflow.plan_bounce_passes --raw 2>/dev/null || echo "2")
|
|
1169
1370
|
BOUNCE_SCRIPT=$(gsd_run query config-get workflow.plan_bounce_script --raw 2>/dev/null || true)
|
|
1170
1371
|
```
|
|
1171
1372
|
|
|
1172
1373
|
Display banner:
|
|
1173
1374
|
```
|
|
1174
|
-
|
|
1175
|
-
GSD ► BOUNCING PLANS (External Refinement)
|
|
1176
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1375
|
+
### GSD ► BOUNCING PLANS (External Refinement)
|
|
1177
1376
|
|
|
1178
1377
|
Script: ${BOUNCE_SCRIPT}
|
|
1179
1378
|
Max passes: ${BOUNCE_PASSES}
|
|
@@ -1282,7 +1481,7 @@ when a discuss-phase decision silently dropped.
|
|
|
1282
1481
|
no CONTEXT.md exists for this phase, or its `<decisions>` block is empty.
|
|
1283
1482
|
|
|
1284
1483
|
```bash
|
|
1285
|
-
GATE_CFG=$(gsd_run query config-get workflow.context_coverage_gate 2>/dev/null || echo "true")
|
|
1484
|
+
GATE_CFG=$(gsd_run query config-get workflow.context_coverage_gate --raw 2>/dev/null || echo "true")
|
|
1286
1485
|
if [ "$GATE_CFG" != "false" ]; then
|
|
1287
1486
|
# #2770: CONTEXT_PATH from step-1 init doesn't survive into this Bash block;
|
|
1288
1487
|
# recompute it. Only run when a CONTEXT.md exists (handler fails closed on an
|
|
@@ -1381,8 +1580,12 @@ PHASE_REQ_IDS=$(gsd_run query init.plan-phase "$PHASE" --pick phase_req_ids 2>/d
|
|
|
1381
1580
|
PHASE_REQ_IDS="${PHASE_REQ_IDS:-TBD}"
|
|
1382
1581
|
```
|
|
1383
1582
|
|
|
1384
|
-
Read the `activeHooks` array from `PLAN_POST_HOOKS_JSON` in-context. If
|
|
1385
|
-
`
|
|
1583
|
+
Read the `activeHooks` array from `PLAN_POST_HOOKS_JSON` in-context. If
|
|
1584
|
+
`activeHooks` is empty or absent, skip this step silently — do NOT key the skip
|
|
1585
|
+
on any one capability's gate being absent (#3606: that skip silently dropped
|
|
1586
|
+
every other registered hook at this point).
|
|
1587
|
+
|
|
1588
|
+
**Step and contribution dispatch:** dispatch every `kind == "step"` hook and inject every `kind == "contribution"` fragment per @gsd-core/references/loop-hook-dispatch.md (skip each kind silently when none), before gate evaluation below.
|
|
1386
1589
|
|
|
1387
1590
|
⚠ **Validate `check` before shell use** (third-party manifest input) — `loop-hook-dispatch.md` § `gate`.
|
|
1388
1591
|
|
|
@@ -1443,9 +1646,7 @@ fi
|
|
|
1443
1646
|
|
|
1444
1647
|
Display banner:
|
|
1445
1648
|
```
|
|
1446
|
-
|
|
1447
|
-
GSD ► AUTO-ADVANCING TO EXECUTE
|
|
1448
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1649
|
+
### GSD ► AUTO-ADVANCING TO EXECUTE
|
|
1449
1650
|
|
|
1450
1651
|
Plans ready. Launching execute-phase...
|
|
1451
1652
|
```
|
|
@@ -1460,9 +1661,7 @@ The `--no-transition` flag tells execute-phase to return status after verificati
|
|
|
1460
1661
|
**Handle execute-phase return:**
|
|
1461
1662
|
- **PHASE COMPLETE** → Display final summary:
|
|
1462
1663
|
```
|
|
1463
|
-
|
|
1464
|
-
GSD ► PHASE ${PHASE} COMPLETE ✓
|
|
1465
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1664
|
+
### GSD ► PHASE ${PHASE} COMPLETE ✓
|
|
1466
1665
|
|
|
1467
1666
|
Auto-advance pipeline finished.
|
|
1468
1667
|
|
|
@@ -1486,9 +1685,7 @@ Output this markdown directly (not as a code block):
|
|
|
1486
1685
|
|
|
1487
1686
|
`${GAPS_EXEC_FLAG}` projects the just-completed planning mode onto the follow-up execute command (#3297): it expands to `--gaps-only` for a `--gaps` planning run (so the handoff points at execute-phase's gap-closure scope — only the newly created `gap_closure: true` plans — not the whole phase) and to empty for a standard or `--reviews` run (whole-phase scope, unchanged). Substitute it verbatim; when empty, collapse the extra space.
|
|
1488
1687
|
|
|
1489
|
-
|
|
1490
|
-
GSD ► PHASE {X} PLANNED ✓
|
|
1491
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1688
|
+
### GSD ► PHASE {X} PLANNED ✓
|
|
1492
1689
|
|
|
1493
1690
|
**Phase {X}: {Name}** — {N} plan(s) in {M} wave(s)
|
|
1494
1691
|
|
|
@@ -1500,7 +1697,7 @@ Output this markdown directly (not as a code block):
|
|
|
1500
1697
|
Research: {Completed | Used existing | Skipped}
|
|
1501
1698
|
Verification: {Passed | Passed with override | Skipped}
|
|
1502
1699
|
|
|
1503
|
-
|
|
1700
|
+
---
|
|
1504
1701
|
|
|
1505
1702
|
## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
|
|
1506
1703
|
|
|
@@ -1510,7 +1707,7 @@ Verification: {Passed | Passed with override | Skipped}
|
|
|
1510
1707
|
|
|
1511
1708
|
/gsd:execute-phase {X} ${GAPS_EXEC_FLAG} ${GSD_WS}
|
|
1512
1709
|
|
|
1513
|
-
|
|
1710
|
+
---
|
|
1514
1711
|
|
|
1515
1712
|
**Also available:**
|
|
1516
1713
|
- cat .planning/phases/{phase-dir}/*-PLAN.md — review plans
|
|
@@ -1518,7 +1715,7 @@ Verification: {Passed | Passed with override | Skipped}
|
|
|
1518
1715
|
- /gsd:review --phase {X} --all — peer review plans with external AIs
|
|
1519
1716
|
- /gsd:plan-phase {X} --reviews — replan incorporating review feedback
|
|
1520
1717
|
|
|
1521
|
-
|
|
1718
|
+
---
|
|
1522
1719
|
</offer_next>
|
|
1523
1720
|
|
|
1524
1721
|
<windows_troubleshooting>
|