@opengsd/get-shit-done-redux 1.0.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/LICENSE +21 -0
- package/README.ja-JP.md +870 -0
- package/README.ko-KR.md +861 -0
- package/README.md +300 -0
- package/README.pt-BR.md +492 -0
- package/README.zh-CN.md +842 -0
- package/agents/gsd-advisor-researcher.md +127 -0
- package/agents/gsd-ai-researcher.md +133 -0
- package/agents/gsd-assumptions-analyzer.md +105 -0
- package/agents/gsd-code-fixer.md +668 -0
- package/agents/gsd-code-reviewer.md +387 -0
- package/agents/gsd-codebase-mapper.md +853 -0
- package/agents/gsd-debug-session-manager.md +314 -0
- package/agents/gsd-debugger.md +1452 -0
- package/agents/gsd-doc-classifier.md +168 -0
- package/agents/gsd-doc-synthesizer.md +204 -0
- package/agents/gsd-doc-verifier.md +217 -0
- package/agents/gsd-doc-writer.md +615 -0
- package/agents/gsd-domain-researcher.md +153 -0
- package/agents/gsd-eval-auditor.md +191 -0
- package/agents/gsd-eval-planner.md +154 -0
- package/agents/gsd-executor.md +774 -0
- package/agents/gsd-framework-selector.md +160 -0
- package/agents/gsd-integration-checker.md +470 -0
- package/agents/gsd-intel-updater.md +342 -0
- package/agents/gsd-nyquist-auditor.md +203 -0
- package/agents/gsd-pattern-mapper.md +335 -0
- package/agents/gsd-phase-researcher.md +928 -0
- package/agents/gsd-plan-checker.md +978 -0
- package/agents/gsd-planner.md +1278 -0
- package/agents/gsd-project-researcher.md +677 -0
- package/agents/gsd-research-synthesizer.md +247 -0
- package/agents/gsd-roadmapper.md +688 -0
- package/agents/gsd-security-auditor.md +155 -0
- package/agents/gsd-ui-auditor.md +495 -0
- package/agents/gsd-ui-checker.md +309 -0
- package/agents/gsd-ui-researcher.md +380 -0
- package/agents/gsd-user-profiler.md +171 -0
- package/agents/gsd-verifier.md +917 -0
- package/bin/gsd-sdk.js +37 -0
- package/bin/install.js +11468 -0
- package/bin/lib/ui-safety-gate.cjs +107 -0
- package/commands/gsd/add-tests.md +42 -0
- package/commands/gsd/ai-integration-phase.md +37 -0
- package/commands/gsd/audit-fix.md +34 -0
- package/commands/gsd/audit-milestone.md +37 -0
- package/commands/gsd/audit-uat.md +24 -0
- package/commands/gsd/autonomous.md +46 -0
- package/commands/gsd/capture.md +62 -0
- package/commands/gsd/cleanup.md +24 -0
- package/commands/gsd/code-review.md +59 -0
- package/commands/gsd/complete-milestone.md +143 -0
- package/commands/gsd/config.md +58 -0
- package/commands/gsd/debug.md +52 -0
- package/commands/gsd/discuss-phase.md +76 -0
- package/commands/gsd/docs-update.md +49 -0
- package/commands/gsd/eval-review.md +33 -0
- package/commands/gsd/execute-phase.md +64 -0
- package/commands/gsd/explore.md +27 -0
- package/commands/gsd/extract-learnings.md +23 -0
- package/commands/gsd/fast.md +31 -0
- package/commands/gsd/forensics.md +57 -0
- package/commands/gsd/graphify.md +199 -0
- package/commands/gsd/health.md +31 -0
- package/commands/gsd/help.md +28 -0
- package/commands/gsd/import.md +41 -0
- package/commands/gsd/inbox.md +39 -0
- package/commands/gsd/ingest-docs.md +42 -0
- package/commands/gsd/manager.md +45 -0
- package/commands/gsd/map-codebase.md +83 -0
- package/commands/gsd/milestone-summary.md +51 -0
- package/commands/gsd/mvp-phase.md +45 -0
- package/commands/gsd/new-milestone.md +45 -0
- package/commands/gsd/new-project.md +47 -0
- package/commands/gsd/ns-context.md +23 -0
- package/commands/gsd/ns-ideate.md +24 -0
- package/commands/gsd/ns-manage.md +29 -0
- package/commands/gsd/ns-project.md +22 -0
- package/commands/gsd/ns-review.md +26 -0
- package/commands/gsd/ns-workflow.md +28 -0
- package/commands/gsd/pause-work.md +43 -0
- package/commands/gsd/phase.md +56 -0
- package/commands/gsd/plan-phase.md +62 -0
- package/commands/gsd/plan-review-convergence.md +59 -0
- package/commands/gsd/pr-branch.md +26 -0
- package/commands/gsd/profile-user.md +46 -0
- package/commands/gsd/progress.md +46 -0
- package/commands/gsd/quick.md +174 -0
- package/commands/gsd/resume-work.md +30 -0
- package/commands/gsd/review-backlog.md +63 -0
- package/commands/gsd/review.md +41 -0
- package/commands/gsd/secure-phase.md +36 -0
- package/commands/gsd/settings.md +29 -0
- package/commands/gsd/ship.md +24 -0
- package/commands/gsd/sketch.md +60 -0
- package/commands/gsd/spec-phase.md +63 -0
- package/commands/gsd/spike.md +57 -0
- package/commands/gsd/stats.md +19 -0
- package/commands/gsd/surface.md +155 -0
- package/commands/gsd/thread.md +24 -0
- package/commands/gsd/ui-phase.md +35 -0
- package/commands/gsd/ui-review.md +33 -0
- package/commands/gsd/ultraplan-phase.md +34 -0
- package/commands/gsd/undo.md +35 -0
- package/commands/gsd/update.md +48 -0
- package/commands/gsd/validate-phase.md +36 -0
- package/commands/gsd/verify-work.md +39 -0
- package/commands/gsd/workspace.md +52 -0
- package/commands/gsd/workstreams.md +70 -0
- package/get-shit-done/bin/check-latest-version.cjs +104 -0
- package/get-shit-done/bin/gsd-tools.cjs +1630 -0
- package/get-shit-done/bin/lib/active-workstream-store.cjs +85 -0
- package/get-shit-done/bin/lib/adr-parser.cjs +394 -0
- package/get-shit-done/bin/lib/artifacts.cjs +53 -0
- package/get-shit-done/bin/lib/audit.cjs +755 -0
- package/get-shit-done/bin/lib/cjs-command-router-adapter.cjs +39 -0
- package/get-shit-done/bin/lib/cjs-sdk-bridge.cjs +136 -0
- package/get-shit-done/bin/lib/clusters.cjs +135 -0
- package/get-shit-done/bin/lib/code-review-flags.cjs +74 -0
- package/get-shit-done/bin/lib/command-aliases.generated.cjs +824 -0
- package/get-shit-done/bin/lib/command-routing-hub.cjs +239 -0
- package/get-shit-done/bin/lib/commands.cjs +1035 -0
- package/get-shit-done/bin/lib/config-schema.cjs +31 -0
- package/get-shit-done/bin/lib/config.cjs +704 -0
- package/get-shit-done/bin/lib/configuration.generated.cjs +253 -0
- package/get-shit-done/bin/lib/context-utilization.cjs +47 -0
- package/get-shit-done/bin/lib/core.cjs +1922 -0
- package/get-shit-done/bin/lib/decisions.cjs +19 -0
- package/get-shit-done/bin/lib/decisions.generated.cjs +121 -0
- package/get-shit-done/bin/lib/docs.cjs +270 -0
- package/get-shit-done/bin/lib/drift.cjs +388 -0
- package/get-shit-done/bin/lib/fallow-runner.cjs +109 -0
- package/get-shit-done/bin/lib/frontmatter.cjs +389 -0
- package/get-shit-done/bin/lib/gap-checker.cjs +205 -0
- package/get-shit-done/bin/lib/graphify.cjs +592 -0
- package/get-shit-done/bin/lib/gsd2-import.cjs +514 -0
- package/get-shit-done/bin/lib/init-command-router.cjs +174 -0
- package/get-shit-done/bin/lib/init.cjs +2096 -0
- package/get-shit-done/bin/lib/install-profiles.cjs +603 -0
- package/get-shit-done/bin/lib/installer-migration-authoring.cjs +117 -0
- package/get-shit-done/bin/lib/installer-migration-report.cjs +354 -0
- package/get-shit-done/bin/lib/installer-migrations/000-first-time-baseline.cjs +220 -0
- package/get-shit-done/bin/lib/installer-migrations/001-legacy-orphan-files.cjs +41 -0
- package/get-shit-done/bin/lib/installer-migrations/002-codex-legacy-hooks-json.cjs +80 -0
- package/get-shit-done/bin/lib/installer-migrations.cjs +776 -0
- package/get-shit-done/bin/lib/intel.cjs +643 -0
- package/get-shit-done/bin/lib/learnings.cjs +379 -0
- package/get-shit-done/bin/lib/milestone.cjs +314 -0
- package/get-shit-done/bin/lib/model-catalog.cjs +136 -0
- package/get-shit-done/bin/lib/model-profiles.cjs +25 -0
- package/get-shit-done/bin/lib/phase-command-router.cjs +226 -0
- package/get-shit-done/bin/lib/phase.cjs +1490 -0
- package/get-shit-done/bin/lib/phases-command-router.cjs +97 -0
- package/get-shit-done/bin/lib/plan-scan.cjs +26 -0
- package/get-shit-done/bin/lib/plan-scan.generated.cjs +97 -0
- package/get-shit-done/bin/lib/planning-workspace.cjs +415 -0
- package/get-shit-done/bin/lib/profile-output.cjs +1130 -0
- package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
- package/get-shit-done/bin/lib/project-root.generated.cjs +117 -0
- package/get-shit-done/bin/lib/prompt-budget.cjs +399 -0
- package/get-shit-done/bin/lib/review-reviewer-selection.cjs +125 -0
- package/get-shit-done/bin/lib/roadmap-command-router.cjs +99 -0
- package/get-shit-done/bin/lib/roadmap.cjs +642 -0
- package/get-shit-done/bin/lib/runtime-artifact-layout.cjs +301 -0
- package/get-shit-done/bin/lib/runtime-homes.cjs +185 -0
- package/get-shit-done/bin/lib/runtime-slash.cjs +109 -0
- package/get-shit-done/bin/lib/schema-detect.cjs +21 -0
- package/get-shit-done/bin/lib/schema-detect.generated.cjs +170 -0
- package/get-shit-done/bin/lib/secrets.cjs +20 -0
- package/get-shit-done/bin/lib/secrets.generated.cjs +37 -0
- package/get-shit-done/bin/lib/security.cjs +504 -0
- package/get-shit-done/bin/lib/shell-command-projection.cjs +552 -0
- package/get-shit-done/bin/lib/state-command-router.cjs +346 -0
- package/get-shit-done/bin/lib/state-document.cjs +12 -0
- package/get-shit-done/bin/lib/state-document.generated.cjs +127 -0
- package/get-shit-done/bin/lib/state.cjs +1940 -0
- package/get-shit-done/bin/lib/surface.cjs +430 -0
- package/get-shit-done/bin/lib/template.cjs +228 -0
- package/get-shit-done/bin/lib/uat.cjs +289 -0
- package/get-shit-done/bin/lib/validate-command-router.cjs +129 -0
- package/get-shit-done/bin/lib/verify-command-router.cjs +122 -0
- package/get-shit-done/bin/lib/verify.cjs +1458 -0
- package/get-shit-done/bin/lib/workstream-inventory-builder.generated.cjs +79 -0
- package/get-shit-done/bin/lib/workstream-inventory.cjs +132 -0
- package/get-shit-done/bin/lib/workstream-name-policy.cjs +19 -0
- package/get-shit-done/bin/lib/workstream-name-policy.generated.cjs +61 -0
- package/get-shit-done/bin/lib/workstream.cjs +374 -0
- package/get-shit-done/bin/lib/worktree-safety.cjs +985 -0
- package/get-shit-done/bin/verify-reapply-patches.cjs +336 -0
- package/get-shit-done/contexts/dev.md +21 -0
- package/get-shit-done/contexts/research.md +22 -0
- package/get-shit-done/contexts/review.md +23 -0
- package/get-shit-done/references/agent-contracts.md +79 -0
- package/get-shit-done/references/ai-evals.md +156 -0
- package/get-shit-done/references/ai-frameworks.md +186 -0
- package/get-shit-done/references/artifact-types.md +131 -0
- package/get-shit-done/references/autonomous-smart-discuss.md +277 -0
- package/get-shit-done/references/checkpoints.md +814 -0
- package/get-shit-done/references/common-bug-patterns.md +114 -0
- package/get-shit-done/references/context-budget.md +85 -0
- package/get-shit-done/references/continuation-format.md +253 -0
- package/get-shit-done/references/debugger-philosophy.md +76 -0
- package/get-shit-done/references/decimal-phase-calculation.md +64 -0
- package/get-shit-done/references/doc-conflict-engine.md +91 -0
- package/get-shit-done/references/domain-probes.md +125 -0
- package/get-shit-done/references/execute-mvp-tdd.md +81 -0
- package/get-shit-done/references/executor-examples.md +110 -0
- package/get-shit-done/references/few-shot-examples/plan-checker.md +73 -0
- package/get-shit-done/references/few-shot-examples/verifier.md +109 -0
- package/get-shit-done/references/gate-prompts.md +100 -0
- package/get-shit-done/references/gates.md +70 -0
- package/get-shit-done/references/git-integration.md +298 -0
- package/get-shit-done/references/git-planning-commit.md +40 -0
- package/get-shit-done/references/ios-scaffold.md +123 -0
- package/get-shit-done/references/mandatory-initial-read.md +2 -0
- package/get-shit-done/references/model-profile-resolution.md +38 -0
- package/get-shit-done/references/model-profiles.md +245 -0
- package/get-shit-done/references/mvp-concepts.md +49 -0
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planner-antipatterns.md +89 -0
- package/get-shit-done/references/planner-chunked.md +49 -0
- package/get-shit-done/references/planner-gap-closure.md +62 -0
- package/get-shit-done/references/planner-graphify-auto-update.md +67 -0
- package/get-shit-done/references/planner-human-verify-mode.md +57 -0
- package/get-shit-done/references/planner-mvp-mode.md +53 -0
- package/get-shit-done/references/planner-reviews.md +39 -0
- package/get-shit-done/references/planner-revision.md +87 -0
- package/get-shit-done/references/planner-source-audit.md +73 -0
- package/get-shit-done/references/planning-config.md +471 -0
- package/get-shit-done/references/project-skills-discovery.md +19 -0
- package/get-shit-done/references/questioning.md +162 -0
- package/get-shit-done/references/revision-loop.md +97 -0
- package/get-shit-done/references/scout-codebase.md +51 -0
- package/get-shit-done/references/skeleton-template.md +48 -0
- package/get-shit-done/references/sketch-interactivity.md +41 -0
- package/get-shit-done/references/sketch-theme-system.md +94 -0
- package/get-shit-done/references/sketch-tooling.md +45 -0
- package/get-shit-done/references/sketch-variant-patterns.md +81 -0
- package/get-shit-done/references/spidr-splitting.md +69 -0
- package/get-shit-done/references/tdd.md +330 -0
- package/get-shit-done/references/thinking-models-debug.md +44 -0
- package/get-shit-done/references/thinking-models-execution.md +50 -0
- package/get-shit-done/references/thinking-models-planning.md +62 -0
- package/get-shit-done/references/thinking-models-research.md +50 -0
- package/get-shit-done/references/thinking-models-verification.md +55 -0
- package/get-shit-done/references/thinking-partner.md +96 -0
- package/get-shit-done/references/ui-brand.md +160 -0
- package/get-shit-done/references/universal-anti-patterns.md +63 -0
- package/get-shit-done/references/user-profiling.md +681 -0
- package/get-shit-done/references/user-story-template.md +58 -0
- package/get-shit-done/references/verification-overrides.md +227 -0
- package/get-shit-done/references/verification-patterns.md +612 -0
- package/get-shit-done/references/verify-mvp-mode.md +85 -0
- package/get-shit-done/references/workstream-flag.md +111 -0
- package/get-shit-done/references/worktree-path-safety.md +89 -0
- package/get-shit-done/templates/AI-SPEC.md +246 -0
- package/get-shit-done/templates/DEBUG.md +169 -0
- package/get-shit-done/templates/README.md +77 -0
- package/get-shit-done/templates/SECURITY.md +61 -0
- package/get-shit-done/templates/UAT.md +265 -0
- package/get-shit-done/templates/UI-SPEC.md +100 -0
- package/get-shit-done/templates/VALIDATION.md +76 -0
- package/get-shit-done/templates/claude-md.md +145 -0
- package/get-shit-done/templates/codebase/architecture.md +255 -0
- package/get-shit-done/templates/codebase/concerns.md +310 -0
- package/get-shit-done/templates/codebase/conventions.md +307 -0
- package/get-shit-done/templates/codebase/integrations.md +280 -0
- package/get-shit-done/templates/codebase/stack.md +186 -0
- package/get-shit-done/templates/codebase/structure.md +285 -0
- package/get-shit-done/templates/codebase/testing.md +480 -0
- package/get-shit-done/templates/config.json +62 -0
- package/get-shit-done/templates/context.md +352 -0
- package/get-shit-done/templates/continue-here.md +78 -0
- package/get-shit-done/templates/copilot-instructions.md +7 -0
- package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/get-shit-done/templates/dev-preferences.md +21 -0
- package/get-shit-done/templates/discovery.md +146 -0
- package/get-shit-done/templates/discussion-log.md +63 -0
- package/get-shit-done/templates/milestone-archive.md +123 -0
- package/get-shit-done/templates/milestone.md +115 -0
- package/get-shit-done/templates/phase-prompt.md +610 -0
- package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/get-shit-done/templates/project.md +186 -0
- package/get-shit-done/templates/requirements.md +231 -0
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/get-shit-done/templates/research-project/STACK.md +120 -0
- package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/get-shit-done/templates/research.md +592 -0
- package/get-shit-done/templates/retrospective.md +54 -0
- package/get-shit-done/templates/roadmap.md +202 -0
- package/get-shit-done/templates/spec.md +307 -0
- package/get-shit-done/templates/state.md +184 -0
- package/get-shit-done/templates/summary-complex.md +59 -0
- package/get-shit-done/templates/summary-minimal.md +41 -0
- package/get-shit-done/templates/summary-standard.md +48 -0
- package/get-shit-done/templates/summary.md +248 -0
- package/get-shit-done/templates/user-profile.md +146 -0
- package/get-shit-done/templates/user-setup.md +311 -0
- package/get-shit-done/templates/verification-report.md +322 -0
- package/get-shit-done/workflows/add-backlog.md +101 -0
- package/get-shit-done/workflows/add-phase.md +123 -0
- package/get-shit-done/workflows/add-tests.md +365 -0
- package/get-shit-done/workflows/add-todo.md +171 -0
- package/get-shit-done/workflows/ai-integration-phase.md +305 -0
- package/get-shit-done/workflows/analyze-dependencies.md +96 -0
- package/get-shit-done/workflows/audit-fix.md +188 -0
- package/get-shit-done/workflows/audit-milestone.md +368 -0
- package/get-shit-done/workflows/audit-uat.md +120 -0
- package/get-shit-done/workflows/autonomous.md +805 -0
- package/get-shit-done/workflows/check-todos.md +190 -0
- package/get-shit-done/workflows/cleanup.md +165 -0
- package/get-shit-done/workflows/code-review-fix.md +512 -0
- package/get-shit-done/workflows/code-review.md +666 -0
- package/get-shit-done/workflows/complete-milestone.md +865 -0
- package/get-shit-done/workflows/debug.md +242 -0
- package/get-shit-done/workflows/diagnose-issues.md +251 -0
- package/get-shit-done/workflows/discovery-phase.md +291 -0
- package/get-shit-done/workflows/discuss-phase/modes/advisor.md +175 -0
- package/get-shit-done/workflows/discuss-phase/modes/all.md +28 -0
- package/get-shit-done/workflows/discuss-phase/modes/analyze.md +44 -0
- package/get-shit-done/workflows/discuss-phase/modes/auto.md +56 -0
- package/get-shit-done/workflows/discuss-phase/modes/batch.md +52 -0
- package/get-shit-done/workflows/discuss-phase/modes/chain.md +97 -0
- package/get-shit-done/workflows/discuss-phase/modes/default.md +141 -0
- package/get-shit-done/workflows/discuss-phase/modes/power.md +44 -0
- package/get-shit-done/workflows/discuss-phase/modes/text.md +55 -0
- package/get-shit-done/workflows/discuss-phase/templates/checkpoint.json +18 -0
- package/get-shit-done/workflows/discuss-phase/templates/context.md +136 -0
- package/get-shit-done/workflows/discuss-phase/templates/discussion-log.md +50 -0
- package/get-shit-done/workflows/discuss-phase-assumptions.md +685 -0
- package/get-shit-done/workflows/discuss-phase-power.md +291 -0
- package/get-shit-done/workflows/discuss-phase.md +499 -0
- package/get-shit-done/workflows/do.md +122 -0
- package/get-shit-done/workflows/docs-update.md +1172 -0
- package/get-shit-done/workflows/edit-phase.md +305 -0
- package/get-shit-done/workflows/eval-review.md +166 -0
- package/get-shit-done/workflows/execute-phase/steps/codebase-drift-gate.md +81 -0
- package/get-shit-done/workflows/execute-phase/steps/per-plan-worktree-gate.md +94 -0
- package/get-shit-done/workflows/execute-phase/steps/post-merge-gate.md +116 -0
- package/get-shit-done/workflows/execute-phase.md +1717 -0
- package/get-shit-done/workflows/execute-plan.md +536 -0
- package/get-shit-done/workflows/explore.md +154 -0
- package/get-shit-done/workflows/extract-learnings.md +253 -0
- package/get-shit-done/workflows/fast.md +124 -0
- package/get-shit-done/workflows/forensics.md +289 -0
- package/get-shit-done/workflows/graduation.md +206 -0
- package/get-shit-done/workflows/health.md +234 -0
- package/get-shit-done/workflows/help/modes/brief.md +22 -0
- package/get-shit-done/workflows/help/modes/default.md +50 -0
- package/get-shit-done/workflows/help/modes/full.md +784 -0
- package/get-shit-done/workflows/help/modes/topic.md +74 -0
- package/get-shit-done/workflows/help.md +24 -0
- package/get-shit-done/workflows/import.md +264 -0
- package/get-shit-done/workflows/inbox.md +387 -0
- package/get-shit-done/workflows/ingest-docs.md +339 -0
- package/get-shit-done/workflows/insert-phase.md +162 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/get-shit-done/workflows/list-workspaces.md +67 -0
- package/get-shit-done/workflows/manager.md +403 -0
- package/get-shit-done/workflows/map-codebase.md +454 -0
- package/get-shit-done/workflows/milestone-summary.md +234 -0
- package/get-shit-done/workflows/mvp-phase.md +232 -0
- package/get-shit-done/workflows/new-milestone.md +645 -0
- package/get-shit-done/workflows/new-project.md +1487 -0
- package/get-shit-done/workflows/new-workspace.md +250 -0
- package/get-shit-done/workflows/next.md +231 -0
- package/get-shit-done/workflows/node-repair.md +92 -0
- package/get-shit-done/workflows/note.md +158 -0
- package/get-shit-done/workflows/pause-work.md +254 -0
- package/get-shit-done/workflows/plan-milestone-gaps.md +291 -0
- package/get-shit-done/workflows/plan-phase.md +1800 -0
- package/get-shit-done/workflows/plan-review-convergence.md +340 -0
- package/get-shit-done/workflows/plant-seed.md +240 -0
- package/get-shit-done/workflows/pr-branch.md +157 -0
- package/get-shit-done/workflows/profile-user.md +463 -0
- package/get-shit-done/workflows/progress.md +660 -0
- package/get-shit-done/workflows/quick.md +1049 -0
- package/get-shit-done/workflows/reapply-patches.md +426 -0
- package/get-shit-done/workflows/remove-phase.md +166 -0
- package/get-shit-done/workflows/remove-workspace.md +118 -0
- package/get-shit-done/workflows/resume-project.md +342 -0
- package/get-shit-done/workflows/review.md +633 -0
- package/get-shit-done/workflows/scan.md +115 -0
- package/get-shit-done/workflows/secure-phase.md +190 -0
- package/get-shit-done/workflows/session-report.md +146 -0
- package/get-shit-done/workflows/settings-advanced.md +590 -0
- package/get-shit-done/workflows/settings-integrations.md +292 -0
- package/get-shit-done/workflows/settings.md +545 -0
- package/get-shit-done/workflows/ship.md +366 -0
- package/get-shit-done/workflows/sketch-wrap-up.md +296 -0
- package/get-shit-done/workflows/sketch.md +371 -0
- package/get-shit-done/workflows/spec-phase.md +262 -0
- package/get-shit-done/workflows/spike-wrap-up.md +317 -0
- package/get-shit-done/workflows/spike.md +463 -0
- package/get-shit-done/workflows/stats.md +90 -0
- package/get-shit-done/workflows/sync-skills.md +182 -0
- package/get-shit-done/workflows/thread.md +232 -0
- package/get-shit-done/workflows/transition.md +704 -0
- package/get-shit-done/workflows/ui-phase.md +338 -0
- package/get-shit-done/workflows/ui-review.md +203 -0
- package/get-shit-done/workflows/ultraplan-phase.md +209 -0
- package/get-shit-done/workflows/undo.md +314 -0
- package/get-shit-done/workflows/update.md +664 -0
- package/get-shit-done/workflows/validate-phase.md +189 -0
- package/get-shit-done/workflows/verify-phase.md +554 -0
- package/get-shit-done/workflows/verify-work.md +791 -0
- package/hooks/dist/gsd-check-update-worker.js +117 -0
- package/hooks/dist/gsd-check-update.js +64 -0
- package/hooks/dist/gsd-context-monitor.js +192 -0
- package/hooks/dist/gsd-graphify-update.sh +158 -0
- package/hooks/dist/gsd-phase-boundary.sh +47 -0
- package/hooks/dist/gsd-prompt-guard.js +97 -0
- package/hooks/dist/gsd-read-guard.js +101 -0
- package/hooks/dist/gsd-read-injection-scanner.js +152 -0
- package/hooks/dist/gsd-session-state.sh +59 -0
- package/hooks/dist/gsd-statusline.js +537 -0
- package/hooks/dist/gsd-update-banner.js +134 -0
- package/hooks/dist/gsd-validate-commit.sh +57 -0
- package/hooks/dist/gsd-workflow-guard.js +94 -0
- package/hooks/dist/lib/git-cmd.js +150 -0
- package/hooks/dist/lib/gsd-graphify-rebuild.sh +65 -0
- package/hooks/gsd-check-update-worker.js +117 -0
- package/hooks/gsd-check-update.js +64 -0
- package/hooks/gsd-context-monitor.js +192 -0
- package/hooks/gsd-graphify-update.sh +158 -0
- package/hooks/gsd-phase-boundary.sh +47 -0
- package/hooks/gsd-prompt-guard.js +97 -0
- package/hooks/gsd-read-guard.js +101 -0
- package/hooks/gsd-read-injection-scanner.js +152 -0
- package/hooks/gsd-session-state.sh +59 -0
- package/hooks/gsd-statusline.js +537 -0
- package/hooks/gsd-update-banner.js +134 -0
- package/hooks/gsd-validate-commit.sh +57 -0
- package/hooks/gsd-workflow-guard.js +94 -0
- package/hooks/lib/git-cmd.js +150 -0
- package/hooks/lib/gsd-graphify-rebuild.sh +65 -0
- package/package.json +98 -0
- package/scripts/audit-workflow-script-paths.cjs +73 -0
- package/scripts/base64-scan.sh +262 -0
- package/scripts/build-hooks.js +227 -0
- package/scripts/changeset/cli.cjs +408 -0
- package/scripts/changeset/github-release-notes.cjs +198 -0
- package/scripts/changeset/lint.cjs +110 -0
- package/scripts/changeset/new.cjs +137 -0
- package/scripts/changeset/parse.cjs +114 -0
- package/scripts/changeset/render.cjs +34 -0
- package/scripts/changeset/serialize.cjs +130 -0
- package/scripts/command-contract-helpers.cjs +64 -0
- package/scripts/diff-touches-shipped-paths.cjs +147 -0
- package/scripts/fix-slash-commands.cjs +147 -0
- package/scripts/gen-inventory-manifest.cjs +109 -0
- package/scripts/lint-command-contract.cjs +108 -0
- package/scripts/lint-descriptions.cjs +83 -0
- package/scripts/lint-docs-required.cjs +222 -0
- package/scripts/lint-no-source-grep-extras.cjs +81 -0
- package/scripts/lint-no-source-grep.cjs +174 -0
- package/scripts/lint-pr-check-project-dir.cjs +98 -0
- package/scripts/lint-shared-module-handsync.cjs +331 -0
- package/scripts/lint-shell-command-projection-drift.cjs +57 -0
- package/scripts/lint-skill-deps.cjs +180 -0
- package/scripts/lint-test-file-count.allowlist.json +35 -0
- package/scripts/lint-test-file-count.cjs +190 -0
- package/scripts/pr-template-policy.cjs +268 -0
- package/scripts/prompt-injection-scan.sh +203 -0
- package/scripts/release-tarball-smoke.cjs +677 -0
- package/scripts/run-tests.cjs +178 -0
- package/scripts/secret-scan.sh +229 -0
- package/scripts/shared-module-handsync-allowlist.json +145 -0
- package/scripts/strip-prose-atrefs.cjs +106 -0
- package/scripts/sync-rulesets.sh +34 -0
- package/scripts/verify-tarball-sdk-dist.sh +69 -0
- package/sdk/dist/cli-transport.d.ts +19 -0
- package/sdk/dist/cli-transport.d.ts.map +1 -0
- package/sdk/dist/cli-transport.js +104 -0
- package/sdk/dist/cli-transport.js.map +1 -0
- package/sdk/dist/cli.d.ts +46 -0
- package/sdk/dist/cli.d.ts.map +1 -0
- package/sdk/dist/cli.js +511 -0
- package/sdk/dist/cli.js.map +1 -0
- package/sdk/dist/config.d.ts +108 -0
- package/sdk/dist/config.d.ts.map +1 -0
- package/sdk/dist/config.js +116 -0
- package/sdk/dist/config.js.map +1 -0
- package/sdk/dist/configuration/index.d.ts +85 -0
- package/sdk/dist/configuration/index.d.ts.map +1 -0
- package/sdk/dist/configuration/index.js +257 -0
- package/sdk/dist/configuration/index.js.map +1 -0
- package/sdk/dist/context-engine.d.ts +49 -0
- package/sdk/dist/context-engine.d.ts.map +1 -0
- package/sdk/dist/context-engine.js +142 -0
- package/sdk/dist/context-engine.js.map +1 -0
- package/sdk/dist/context-truncation.d.ts +33 -0
- package/sdk/dist/context-truncation.d.ts.map +1 -0
- package/sdk/dist/context-truncation.js +197 -0
- package/sdk/dist/context-truncation.js.map +1 -0
- package/sdk/dist/errors.d.ts +46 -0
- package/sdk/dist/errors.d.ts.map +1 -0
- package/sdk/dist/errors.js +64 -0
- package/sdk/dist/errors.js.map +1 -0
- package/sdk/dist/event-stream.d.ts +53 -0
- package/sdk/dist/event-stream.d.ts.map +1 -0
- package/sdk/dist/event-stream.js +321 -0
- package/sdk/dist/event-stream.js.map +1 -0
- package/sdk/dist/golden/capture.d.ts +15 -0
- package/sdk/dist/golden/capture.d.ts.map +1 -0
- package/sdk/dist/golden/capture.js +67 -0
- package/sdk/dist/golden/capture.js.map +1 -0
- package/sdk/dist/golden/golden-integration-covered.d.ts +6 -0
- package/sdk/dist/golden/golden-integration-covered.d.ts.map +1 -0
- package/sdk/dist/golden/golden-integration-covered.js +30 -0
- package/sdk/dist/golden/golden-integration-covered.js.map +1 -0
- package/sdk/dist/golden/golden-mutation-covered.d.ts +7 -0
- package/sdk/dist/golden/golden-mutation-covered.d.ts.map +1 -0
- package/sdk/dist/golden/golden-mutation-covered.js +17 -0
- package/sdk/dist/golden/golden-mutation-covered.js.map +1 -0
- package/sdk/dist/golden/golden-policy.d.ts +10 -0
- package/sdk/dist/golden/golden-policy.d.ts.map +1 -0
- package/sdk/dist/golden/golden-policy.js +98 -0
- package/sdk/dist/golden/golden-policy.js.map +1 -0
- package/sdk/dist/golden/init-golden-normalize.d.ts +8 -0
- package/sdk/dist/golden/init-golden-normalize.d.ts.map +1 -0
- package/sdk/dist/golden/init-golden-normalize.js +14 -0
- package/sdk/dist/golden/init-golden-normalize.js.map +1 -0
- package/sdk/dist/golden/read-only-golden-rows.d.ts +20 -0
- package/sdk/dist/golden/read-only-golden-rows.d.ts.map +1 -0
- package/sdk/dist/golden/read-only-golden-rows.js +67 -0
- package/sdk/dist/golden/read-only-golden-rows.js.map +1 -0
- package/sdk/dist/golden/registry-canonical-commands.d.ts +6 -0
- package/sdk/dist/golden/registry-canonical-commands.d.ts.map +1 -0
- package/sdk/dist/golden/registry-canonical-commands.js +30 -0
- package/sdk/dist/golden/registry-canonical-commands.js.map +1 -0
- package/sdk/dist/gsd-tools-error.d.ts +23 -0
- package/sdk/dist/gsd-tools-error.d.ts.map +1 -0
- package/sdk/dist/gsd-tools-error.js +29 -0
- package/sdk/dist/gsd-tools-error.js.map +1 -0
- package/sdk/dist/gsd-tools.d.ts +97 -0
- package/sdk/dist/gsd-tools.d.ts.map +1 -0
- package/sdk/dist/gsd-tools.js +168 -0
- package/sdk/dist/gsd-tools.js.map +1 -0
- package/sdk/dist/gsd-transport-policy.d.ts +10 -0
- package/sdk/dist/gsd-transport-policy.d.ts.map +1 -0
- package/sdk/dist/gsd-transport-policy.js +32 -0
- package/sdk/dist/gsd-transport-policy.js.map +1 -0
- package/sdk/dist/gsd-transport.d.ts +39 -0
- package/sdk/dist/gsd-transport.d.ts.map +1 -0
- package/sdk/dist/gsd-transport.js +78 -0
- package/sdk/dist/gsd-transport.js.map +1 -0
- package/sdk/dist/index.d.ts +127 -0
- package/sdk/dist/index.d.ts.map +1 -0
- package/sdk/dist/index.js +300 -0
- package/sdk/dist/index.js.map +1 -0
- package/sdk/dist/init-runner.d.ts +90 -0
- package/sdk/dist/init-runner.d.ts.map +1 -0
- package/sdk/dist/init-runner.js +613 -0
- package/sdk/dist/init-runner.js.map +1 -0
- package/sdk/dist/logger.d.ts +50 -0
- package/sdk/dist/logger.d.ts.map +1 -0
- package/sdk/dist/logger.js +70 -0
- package/sdk/dist/logger.js.map +1 -0
- package/sdk/dist/model-catalog.d.ts +31 -0
- package/sdk/dist/model-catalog.d.ts.map +1 -0
- package/sdk/dist/model-catalog.js +31 -0
- package/sdk/dist/model-catalog.js.map +1 -0
- package/sdk/dist/phase-prompt.d.ts +72 -0
- package/sdk/dist/phase-prompt.d.ts.map +1 -0
- package/sdk/dist/phase-prompt.js +213 -0
- package/sdk/dist/phase-prompt.js.map +1 -0
- package/sdk/dist/phase-runner.d.ts +145 -0
- package/sdk/dist/phase-runner.d.ts.map +1 -0
- package/sdk/dist/phase-runner.js +1206 -0
- package/sdk/dist/phase-runner.js.map +1 -0
- package/sdk/dist/plan-parser.d.ts +55 -0
- package/sdk/dist/plan-parser.d.ts.map +1 -0
- package/sdk/dist/plan-parser.js +389 -0
- package/sdk/dist/plan-parser.js.map +1 -0
- package/sdk/dist/planning-journal.d.ts +64 -0
- package/sdk/dist/planning-journal.d.ts.map +1 -0
- package/sdk/dist/planning-journal.js +88 -0
- package/sdk/dist/planning-journal.js.map +1 -0
- package/sdk/dist/planning-runtime.d.ts +67 -0
- package/sdk/dist/planning-runtime.d.ts.map +1 -0
- package/sdk/dist/planning-runtime.js +58 -0
- package/sdk/dist/planning-runtime.js.map +1 -0
- package/sdk/dist/project-root/index.d.ts +46 -0
- package/sdk/dist/project-root/index.d.ts.map +1 -0
- package/sdk/dist/project-root/index.js +138 -0
- package/sdk/dist/project-root/index.js.map +1 -0
- package/sdk/dist/prompt-builder.d.ts +44 -0
- package/sdk/dist/prompt-builder.d.ts.map +1 -0
- package/sdk/dist/prompt-builder.js +180 -0
- package/sdk/dist/prompt-builder.js.map +1 -0
- package/sdk/dist/prompt-sanitizer.d.ts +35 -0
- package/sdk/dist/prompt-sanitizer.d.ts.map +1 -0
- package/sdk/dist/prompt-sanitizer.js +101 -0
- package/sdk/dist/prompt-sanitizer.js.map +1 -0
- package/sdk/dist/query/active-workstream-store.d.ts +7 -0
- package/sdk/dist/query/active-workstream-store.d.ts.map +1 -0
- package/sdk/dist/query/active-workstream-store.js +56 -0
- package/sdk/dist/query/active-workstream-store.js.map +1 -0
- package/sdk/dist/query/agent-failure-classifier.d.ts +38 -0
- package/sdk/dist/query/agent-failure-classifier.d.ts.map +1 -0
- package/sdk/dist/query/agent-failure-classifier.js +83 -0
- package/sdk/dist/query/agent-failure-classifier.js.map +1 -0
- package/sdk/dist/query/audit-open.d.ts +46 -0
- package/sdk/dist/query/audit-open.d.ts.map +1 -0
- package/sdk/dist/query/audit-open.js +662 -0
- package/sdk/dist/query/audit-open.js.map +1 -0
- package/sdk/dist/query/check-auto-mode.d.ts +13 -0
- package/sdk/dist/query/check-auto-mode.d.ts.map +1 -0
- package/sdk/dist/query/check-auto-mode.js +40 -0
- package/sdk/dist/query/check-auto-mode.js.map +1 -0
- package/sdk/dist/query/check-completion.d.ts +10 -0
- package/sdk/dist/query/check-completion.d.ts.map +1 -0
- package/sdk/dist/query/check-completion.js +157 -0
- package/sdk/dist/query/check-completion.js.map +1 -0
- package/sdk/dist/query/check-decision-coverage.d.ts +33 -0
- package/sdk/dist/query/check-decision-coverage.d.ts.map +1 -0
- package/sdk/dist/query/check-decision-coverage.js +472 -0
- package/sdk/dist/query/check-decision-coverage.js.map +1 -0
- package/sdk/dist/query/check-gates.d.ts +10 -0
- package/sdk/dist/query/check-gates.d.ts.map +1 -0
- package/sdk/dist/query/check-gates.js +89 -0
- package/sdk/dist/query/check-gates.js.map +1 -0
- package/sdk/dist/query/check-ship-ready.d.ts +17 -0
- package/sdk/dist/query/check-ship-ready.d.ts.map +1 -0
- package/sdk/dist/query/check-ship-ready.js +121 -0
- package/sdk/dist/query/check-ship-ready.js.map +1 -0
- package/sdk/dist/query/check-verification-status.d.ts +10 -0
- package/sdk/dist/query/check-verification-status.d.ts.map +1 -0
- package/sdk/dist/query/check-verification-status.js +142 -0
- package/sdk/dist/query/check-verification-status.js.map +1 -0
- package/sdk/dist/query/command-aliases.generated.d.ts +31 -0
- package/sdk/dist/query/command-aliases.generated.d.ts.map +1 -0
- package/sdk/dist/query/command-aliases.generated.js +133 -0
- package/sdk/dist/query/command-aliases.generated.js.map +1 -0
- package/sdk/dist/query/command-catalog.d.ts +9 -0
- package/sdk/dist/query/command-catalog.d.ts.map +1 -0
- package/sdk/dist/query/command-catalog.js +17 -0
- package/sdk/dist/query/command-catalog.js.map +1 -0
- package/sdk/dist/query/command-definition.d.ts +19 -0
- package/sdk/dist/query/command-definition.d.ts.map +1 -0
- package/sdk/dist/query/command-definition.js +44 -0
- package/sdk/dist/query/command-definition.js.map +1 -0
- package/sdk/dist/query/command-family-handlers.d.ts +3 -0
- package/sdk/dist/query/command-family-handlers.d.ts.map +1 -0
- package/sdk/dist/query/command-family-handlers.js +101 -0
- package/sdk/dist/query/command-family-handlers.js.map +1 -0
- package/sdk/dist/query/command-manifest.d.ts +2 -0
- package/sdk/dist/query/command-manifest.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.init.d.ts +6 -0
- package/sdk/dist/query/command-manifest.init.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.init.js +23 -0
- package/sdk/dist/query/command-manifest.init.js.map +1 -0
- package/sdk/dist/query/command-manifest.js +17 -0
- package/sdk/dist/query/command-manifest.js.map +1 -0
- package/sdk/dist/query/command-manifest.non-family.d.ts +9 -0
- package/sdk/dist/query/command-manifest.non-family.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.non-family.js +60 -0
- package/sdk/dist/query/command-manifest.non-family.js.map +1 -0
- package/sdk/dist/query/command-manifest.phase.d.ts +6 -0
- package/sdk/dist/query/command-manifest.phase.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.phase.js +16 -0
- package/sdk/dist/query/command-manifest.phase.js.map +1 -0
- package/sdk/dist/query/command-manifest.phases.d.ts +7 -0
- package/sdk/dist/query/command-manifest.phases.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.phases.js +10 -0
- package/sdk/dist/query/command-manifest.phases.js.map +1 -0
- package/sdk/dist/query/command-manifest.roadmap.d.ts +6 -0
- package/sdk/dist/query/command-manifest.roadmap.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.roadmap.js +10 -0
- package/sdk/dist/query/command-manifest.roadmap.js.map +1 -0
- package/sdk/dist/query/command-manifest.state.d.ts +9 -0
- package/sdk/dist/query/command-manifest.state.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.state.js +30 -0
- package/sdk/dist/query/command-manifest.state.js.map +1 -0
- package/sdk/dist/query/command-manifest.types.d.ts +12 -0
- package/sdk/dist/query/command-manifest.types.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.types.js +2 -0
- package/sdk/dist/query/command-manifest.types.js.map +1 -0
- package/sdk/dist/query/command-manifest.validate.d.ts +6 -0
- package/sdk/dist/query/command-manifest.validate.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.validate.js +10 -0
- package/sdk/dist/query/command-manifest.validate.js.map +1 -0
- package/sdk/dist/query/command-manifest.verify.d.ts +6 -0
- package/sdk/dist/query/command-manifest.verify.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.verify.js +16 -0
- package/sdk/dist/query/command-manifest.verify.js.map +1 -0
- package/sdk/dist/query/command-static-catalog-domain.d.ts +3 -0
- package/sdk/dist/query/command-static-catalog-domain.d.ts.map +1 -0
- package/sdk/dist/query/command-static-catalog-domain.js +110 -0
- package/sdk/dist/query/command-static-catalog-domain.js.map +1 -0
- package/sdk/dist/query/command-static-catalog-foundation.d.ts +7 -0
- package/sdk/dist/query/command-static-catalog-foundation.d.ts.map +1 -0
- package/sdk/dist/query/command-static-catalog-foundation.js +106 -0
- package/sdk/dist/query/command-static-catalog-foundation.js.map +1 -0
- package/sdk/dist/query/command-topology.d.ts +32 -0
- package/sdk/dist/query/command-topology.d.ts.map +1 -0
- package/sdk/dist/query/command-topology.js +66 -0
- package/sdk/dist/query/command-topology.js.map +1 -0
- package/sdk/dist/query/commands-list.d.ts +14 -0
- package/sdk/dist/query/commands-list.d.ts.map +1 -0
- package/sdk/dist/query/commands-list.js +18 -0
- package/sdk/dist/query/commands-list.js.map +1 -0
- package/sdk/dist/query/commit.d.ts +179 -0
- package/sdk/dist/query/commit.d.ts.map +1 -0
- package/sdk/dist/query/commit.js +632 -0
- package/sdk/dist/query/commit.js.map +1 -0
- package/sdk/dist/query/config-gates.d.ts +12 -0
- package/sdk/dist/query/config-gates.d.ts.map +1 -0
- package/sdk/dist/query/config-gates.js +66 -0
- package/sdk/dist/query/config-gates.js.map +1 -0
- package/sdk/dist/query/config-mutation.d.ts +86 -0
- package/sdk/dist/query/config-mutation.d.ts.map +1 -0
- package/sdk/dist/query/config-mutation.js +602 -0
- package/sdk/dist/query/config-mutation.js.map +1 -0
- package/sdk/dist/query/config-query.d.ts +57 -0
- package/sdk/dist/query/config-query.d.ts.map +1 -0
- package/sdk/dist/query/config-query.js +277 -0
- package/sdk/dist/query/config-query.js.map +1 -0
- package/sdk/dist/query/config-schema.d.ts +19 -0
- package/sdk/dist/query/config-schema.d.ts.map +1 -0
- package/sdk/dist/query/config-schema.js +26 -0
- package/sdk/dist/query/config-schema.js.map +1 -0
- package/sdk/dist/query/decisions.d.ts +58 -0
- package/sdk/dist/query/decisions.d.ts.map +1 -0
- package/sdk/dist/query/decisions.js +165 -0
- package/sdk/dist/query/decisions.js.map +1 -0
- package/sdk/dist/query/detect-custom-files.d.ts +11 -0
- package/sdk/dist/query/detect-custom-files.d.ts.map +1 -0
- package/sdk/dist/query/detect-custom-files.js +89 -0
- package/sdk/dist/query/detect-custom-files.js.map +1 -0
- package/sdk/dist/query/detect-phase-type.d.ts +9 -0
- package/sdk/dist/query/detect-phase-type.d.ts.map +1 -0
- package/sdk/dist/query/detect-phase-type.js +124 -0
- package/sdk/dist/query/detect-phase-type.js.map +1 -0
- package/sdk/dist/query/docs-init.d.ts +26 -0
- package/sdk/dist/query/docs-init.d.ts.map +1 -0
- package/sdk/dist/query/docs-init.js +231 -0
- package/sdk/dist/query/docs-init.js.map +1 -0
- package/sdk/dist/query/fallow-audit.d.ts +44 -0
- package/sdk/dist/query/fallow-audit.d.ts.map +1 -0
- package/sdk/dist/query/fallow-audit.js +44 -0
- package/sdk/dist/query/fallow-audit.js.map +1 -0
- package/sdk/dist/query/frontmatter-mutation.d.ts +77 -0
- package/sdk/dist/query/frontmatter-mutation.d.ts.map +1 -0
- package/sdk/dist/query/frontmatter-mutation.js +299 -0
- package/sdk/dist/query/frontmatter-mutation.js.map +1 -0
- package/sdk/dist/query/frontmatter.d.ts +93 -0
- package/sdk/dist/query/frontmatter.d.ts.map +1 -0
- package/sdk/dist/query/frontmatter.js +364 -0
- package/sdk/dist/query/frontmatter.js.map +1 -0
- package/sdk/dist/query/helpers.d.ts +194 -0
- package/sdk/dist/query/helpers.d.ts.map +1 -0
- package/sdk/dist/query/helpers.js +540 -0
- package/sdk/dist/query/helpers.js.map +1 -0
- package/sdk/dist/query/index.d.ts +8 -0
- package/sdk/dist/query/index.d.ts.map +1 -0
- package/sdk/dist/query/index.js +6 -0
- package/sdk/dist/query/index.js.map +1 -0
- package/sdk/dist/query/init-complex.d.ts +47 -0
- package/sdk/dist/query/init-complex.d.ts.map +1 -0
- package/sdk/dist/query/init-complex.js +735 -0
- package/sdk/dist/query/init-complex.js.map +1 -0
- package/sdk/dist/query/init.d.ts +106 -0
- package/sdk/dist/query/init.d.ts.map +1 -0
- package/sdk/dist/query/init.js +1228 -0
- package/sdk/dist/query/init.js.map +1 -0
- package/sdk/dist/query/intel.d.ts +43 -0
- package/sdk/dist/query/intel.d.ts.map +1 -0
- package/sdk/dist/query/intel.js +416 -0
- package/sdk/dist/query/intel.js.map +1 -0
- package/sdk/dist/query/mutation-event-decorator.d.ts +5 -0
- package/sdk/dist/query/mutation-event-decorator.d.ts.map +1 -0
- package/sdk/dist/query/mutation-event-decorator.js +28 -0
- package/sdk/dist/query/mutation-event-decorator.js.map +1 -0
- package/sdk/dist/query/mutation-event-mapper.d.ts +4 -0
- package/sdk/dist/query/mutation-event-mapper.d.ts.map +1 -0
- package/sdk/dist/query/mutation-event-mapper.js +70 -0
- package/sdk/dist/query/mutation-event-mapper.js.map +1 -0
- package/sdk/dist/query/mvp.d.ts +113 -0
- package/sdk/dist/query/mvp.d.ts.map +1 -0
- package/sdk/dist/query/mvp.js +225 -0
- package/sdk/dist/query/mvp.js.map +1 -0
- package/sdk/dist/query/phase-filesystem-adapter.d.ts +4 -0
- package/sdk/dist/query/phase-filesystem-adapter.d.ts.map +1 -0
- package/sdk/dist/query/phase-filesystem-adapter.js +33 -0
- package/sdk/dist/query/phase-filesystem-adapter.js.map +1 -0
- package/sdk/dist/query/phase-lifecycle-policy.d.ts +34 -0
- package/sdk/dist/query/phase-lifecycle-policy.d.ts.map +1 -0
- package/sdk/dist/query/phase-lifecycle-policy.js +138 -0
- package/sdk/dist/query/phase-lifecycle-policy.js.map +1 -0
- package/sdk/dist/query/phase-lifecycle.d.ts +116 -0
- package/sdk/dist/query/phase-lifecycle.d.ts.map +1 -0
- package/sdk/dist/query/phase-lifecycle.js +1823 -0
- package/sdk/dist/query/phase-lifecycle.js.map +1 -0
- package/sdk/dist/query/phase-list-queries.d.ts +20 -0
- package/sdk/dist/query/phase-list-queries.d.ts.map +1 -0
- package/sdk/dist/query/phase-list-queries.js +129 -0
- package/sdk/dist/query/phase-list-queries.js.map +1 -0
- package/sdk/dist/query/phase-ready.d.ts +9 -0
- package/sdk/dist/query/phase-ready.d.ts.map +1 -0
- package/sdk/dist/query/phase-ready.js +132 -0
- package/sdk/dist/query/phase-ready.js.map +1 -0
- package/sdk/dist/query/phase-roadmap-mutation.d.ts +25 -0
- package/sdk/dist/query/phase-roadmap-mutation.d.ts.map +1 -0
- package/sdk/dist/query/phase-roadmap-mutation.js +76 -0
- package/sdk/dist/query/phase-roadmap-mutation.js.map +1 -0
- package/sdk/dist/query/phase-uat-passed.d.ts +46 -0
- package/sdk/dist/query/phase-uat-passed.d.ts.map +1 -0
- package/sdk/dist/query/phase-uat-passed.js +238 -0
- package/sdk/dist/query/phase-uat-passed.js.map +1 -0
- package/sdk/dist/query/phase.d.ts +104 -0
- package/sdk/dist/query/phase.d.ts.map +1 -0
- package/sdk/dist/query/phase.js +617 -0
- package/sdk/dist/query/phase.js.map +1 -0
- package/sdk/dist/query/pipeline.d.ts +53 -0
- package/sdk/dist/query/pipeline.d.ts.map +1 -0
- package/sdk/dist/query/pipeline.js +198 -0
- package/sdk/dist/query/pipeline.js.map +1 -0
- package/sdk/dist/query/plan-scan.d.ts +14 -0
- package/sdk/dist/query/plan-scan.d.ts.map +1 -0
- package/sdk/dist/query/plan-scan.js +70 -0
- package/sdk/dist/query/plan-scan.js.map +1 -0
- package/sdk/dist/query/plan-task-structure.d.ts +9 -0
- package/sdk/dist/query/plan-task-structure.d.ts.map +1 -0
- package/sdk/dist/query/plan-task-structure.js +59 -0
- package/sdk/dist/query/plan-task-structure.js.map +1 -0
- package/sdk/dist/query/profile-extract-messages.d.ts +40 -0
- package/sdk/dist/query/profile-extract-messages.d.ts.map +1 -0
- package/sdk/dist/query/profile-extract-messages.js +195 -0
- package/sdk/dist/query/profile-extract-messages.js.map +1 -0
- package/sdk/dist/query/profile-output.d.ts +11 -0
- package/sdk/dist/query/profile-output.d.ts.map +1 -0
- package/sdk/dist/query/profile-output.js +873 -0
- package/sdk/dist/query/profile-output.js.map +1 -0
- package/sdk/dist/query/profile-questionnaire-data.d.ts +21 -0
- package/sdk/dist/query/profile-questionnaire-data.d.ts.map +1 -0
- package/sdk/dist/query/profile-questionnaire-data.js +171 -0
- package/sdk/dist/query/profile-questionnaire-data.js.map +1 -0
- package/sdk/dist/query/profile-sample.d.ts +22 -0
- package/sdk/dist/query/profile-sample.d.ts.map +1 -0
- package/sdk/dist/query/profile-sample.js +136 -0
- package/sdk/dist/query/profile-sample.js.map +1 -0
- package/sdk/dist/query/profile-scan-sessions.d.ts +49 -0
- package/sdk/dist/query/profile-scan-sessions.d.ts.map +1 -0
- package/sdk/dist/query/profile-scan-sessions.js +137 -0
- package/sdk/dist/query/profile-scan-sessions.js.map +1 -0
- package/sdk/dist/query/profile.d.ts +61 -0
- package/sdk/dist/query/profile.d.ts.map +1 -0
- package/sdk/dist/query/profile.js +307 -0
- package/sdk/dist/query/profile.js.map +1 -0
- package/sdk/dist/query/progress.d.ts +77 -0
- package/sdk/dist/query/progress.d.ts.map +1 -0
- package/sdk/dist/query/progress.js +481 -0
- package/sdk/dist/query/progress.js.map +1 -0
- package/sdk/dist/query/prompt-budget.d.ts +14 -0
- package/sdk/dist/query/prompt-budget.d.ts.map +1 -0
- package/sdk/dist/query/prompt-budget.js +417 -0
- package/sdk/dist/query/prompt-budget.js.map +1 -0
- package/sdk/dist/query/query-cli-adapter.d.ts +8 -0
- package/sdk/dist/query/query-cli-adapter.d.ts.map +1 -0
- package/sdk/dist/query/query-cli-adapter.js +32 -0
- package/sdk/dist/query/query-cli-adapter.js.map +1 -0
- package/sdk/dist/query/query-cli-output.d.ts +9 -0
- package/sdk/dist/query/query-cli-output.d.ts.map +1 -0
- package/sdk/dist/query/query-cli-output.js +28 -0
- package/sdk/dist/query/query-cli-output.js.map +1 -0
- package/sdk/dist/query/query-command-diagnosis.d.ts +6 -0
- package/sdk/dist/query/query-command-diagnosis.d.ts.map +1 -0
- package/sdk/dist/query/query-command-diagnosis.js +6 -0
- package/sdk/dist/query/query-command-diagnosis.js.map +1 -0
- package/sdk/dist/query/query-command-resolution-strategy.d.ts +29 -0
- package/sdk/dist/query/query-command-resolution-strategy.d.ts.map +1 -0
- package/sdk/dist/query/query-command-resolution-strategy.js +103 -0
- package/sdk/dist/query/query-command-resolution-strategy.js.map +1 -0
- package/sdk/dist/query/query-command-semantics.d.ts +7 -0
- package/sdk/dist/query/query-command-semantics.d.ts.map +1 -0
- package/sdk/dist/query/query-command-semantics.js +7 -0
- package/sdk/dist/query/query-command-semantics.js.map +1 -0
- package/sdk/dist/query/query-dispatch-contract.d.ts +21 -0
- package/sdk/dist/query/query-dispatch-contract.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-contract.js +2 -0
- package/sdk/dist/query/query-dispatch-contract.js.map +1 -0
- package/sdk/dist/query/query-dispatch-error-mapper.d.ts +6 -0
- package/sdk/dist/query/query-dispatch-error-mapper.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-error-mapper.js +6 -0
- package/sdk/dist/query/query-dispatch-error-mapper.js.map +1 -0
- package/sdk/dist/query/query-dispatch-formatting.d.ts +6 -0
- package/sdk/dist/query/query-dispatch-formatting.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-formatting.js +6 -0
- package/sdk/dist/query/query-dispatch-formatting.js.map +1 -0
- package/sdk/dist/query/query-dispatch-observability.d.ts +2 -0
- package/sdk/dist/query/query-dispatch-observability.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-observability.js +7 -0
- package/sdk/dist/query/query-dispatch-observability.js.map +1 -0
- package/sdk/dist/query/query-dispatch.d.ts +48 -0
- package/sdk/dist/query/query-dispatch.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch.js +175 -0
- package/sdk/dist/query/query-dispatch.js.map +1 -0
- package/sdk/dist/query/query-error-details-schema.d.ts +19 -0
- package/sdk/dist/query/query-error-details-schema.d.ts.map +1 -0
- package/sdk/dist/query/query-error-details-schema.js +10 -0
- package/sdk/dist/query/query-error-details-schema.js.map +1 -0
- package/sdk/dist/query/query-error-taxonomy.d.ts +38 -0
- package/sdk/dist/query/query-error-taxonomy.d.ts.map +1 -0
- package/sdk/dist/query/query-error-taxonomy.js +74 -0
- package/sdk/dist/query/query-error-taxonomy.js.map +1 -0
- package/sdk/dist/query/query-fallback-bridge-adapter.d.ts +14 -0
- package/sdk/dist/query/query-fallback-bridge-adapter.d.ts.map +1 -0
- package/sdk/dist/query/query-fallback-bridge-adapter.js +33 -0
- package/sdk/dist/query/query-fallback-bridge-adapter.js.map +1 -0
- package/sdk/dist/query/query-fallback-executor.d.ts +11 -0
- package/sdk/dist/query/query-fallback-executor.d.ts.map +1 -0
- package/sdk/dist/query/query-fallback-executor.js +31 -0
- package/sdk/dist/query/query-fallback-executor.js.map +1 -0
- package/sdk/dist/query/query-fallback-output-classifier.d.ts +6 -0
- package/sdk/dist/query/query-fallback-output-classifier.d.ts.map +1 -0
- package/sdk/dist/query/query-fallback-output-classifier.js +27 -0
- package/sdk/dist/query/query-fallback-output-classifier.js.map +1 -0
- package/sdk/dist/query/query-fallback-policy.d.ts +6 -0
- package/sdk/dist/query/query-fallback-policy.d.ts.map +1 -0
- package/sdk/dist/query/query-fallback-policy.js +7 -0
- package/sdk/dist/query/query-fallback-policy.js.map +1 -0
- package/sdk/dist/query/query-native-dispatch-adapter.d.ts +7 -0
- package/sdk/dist/query/query-native-dispatch-adapter.d.ts.map +1 -0
- package/sdk/dist/query/query-native-dispatch-adapter.js +6 -0
- package/sdk/dist/query/query-native-dispatch-adapter.js.map +1 -0
- package/sdk/dist/query/query-policy-capability.d.ts +10 -0
- package/sdk/dist/query/query-policy-capability.d.ts.map +1 -0
- package/sdk/dist/query/query-policy-capability.js +17 -0
- package/sdk/dist/query/query-policy-capability.js.map +1 -0
- package/sdk/dist/query/query-runtime-context.d.ts +19 -0
- package/sdk/dist/query/query-runtime-context.d.ts.map +1 -0
- package/sdk/dist/query/query-runtime-context.js +31 -0
- package/sdk/dist/query/query-runtime-context.js.map +1 -0
- package/sdk/dist/query/query-unknown-command-hints.d.ts +2 -0
- package/sdk/dist/query/query-unknown-command-hints.d.ts.map +1 -0
- package/sdk/dist/query/query-unknown-command-hints.js +6 -0
- package/sdk/dist/query/query-unknown-command-hints.js.map +1 -0
- package/sdk/dist/query/registry-assembly-descriptor.d.ts +12 -0
- package/sdk/dist/query/registry-assembly-descriptor.d.ts.map +1 -0
- package/sdk/dist/query/registry-assembly-descriptor.js +61 -0
- package/sdk/dist/query/registry-assembly-descriptor.js.map +1 -0
- package/sdk/dist/query/registry-assembly-invariants.d.ts +30 -0
- package/sdk/dist/query/registry-assembly-invariants.d.ts.map +1 -0
- package/sdk/dist/query/registry-assembly-invariants.js +77 -0
- package/sdk/dist/query/registry-assembly-invariants.js.map +1 -0
- package/sdk/dist/query/registry-assembly.d.ts +10 -0
- package/sdk/dist/query/registry-assembly.d.ts.map +1 -0
- package/sdk/dist/query/registry-assembly.js +53 -0
- package/sdk/dist/query/registry-assembly.js.map +1 -0
- package/sdk/dist/query/registry.d.ts +90 -0
- package/sdk/dist/query/registry.d.ts.map +1 -0
- package/sdk/dist/query/registry.js +129 -0
- package/sdk/dist/query/registry.js.map +1 -0
- package/sdk/dist/query/requirements-extract-from-plans.d.ts +9 -0
- package/sdk/dist/query/requirements-extract-from-plans.d.ts.map +1 -0
- package/sdk/dist/query/requirements-extract-from-plans.js +76 -0
- package/sdk/dist/query/requirements-extract-from-plans.js.map +1 -0
- package/sdk/dist/query/roadmap-update-plan-progress.d.ts +11 -0
- package/sdk/dist/query/roadmap-update-plan-progress.d.ts.map +1 -0
- package/sdk/dist/query/roadmap-update-plan-progress.js +124 -0
- package/sdk/dist/query/roadmap-update-plan-progress.js.map +1 -0
- package/sdk/dist/query/roadmap.d.ts +160 -0
- package/sdk/dist/query/roadmap.d.ts.map +1 -0
- package/sdk/dist/query/roadmap.js +982 -0
- package/sdk/dist/query/roadmap.js.map +1 -0
- package/sdk/dist/query/route-next-action.d.ts +9 -0
- package/sdk/dist/query/route-next-action.d.ts.map +1 -0
- package/sdk/dist/query/route-next-action.js +318 -0
- package/sdk/dist/query/route-next-action.js.map +1 -0
- package/sdk/dist/query/schema-detect.d.ts +21 -0
- package/sdk/dist/query/schema-detect.d.ts.map +1 -0
- package/sdk/dist/query/schema-detect.js +146 -0
- package/sdk/dist/query/schema-detect.js.map +1 -0
- package/sdk/dist/query/secrets.d.ts +27 -0
- package/sdk/dist/query/secrets.d.ts.map +1 -0
- package/sdk/dist/query/secrets.js +42 -0
- package/sdk/dist/query/secrets.js.map +1 -0
- package/sdk/dist/query/skill-manifest.d.ts +50 -0
- package/sdk/dist/query/skill-manifest.d.ts.map +1 -0
- package/sdk/dist/query/skill-manifest.js +171 -0
- package/sdk/dist/query/skill-manifest.js.map +1 -0
- package/sdk/dist/query/skills.d.ts +27 -0
- package/sdk/dist/query/skills.d.ts.map +1 -0
- package/sdk/dist/query/skills.js +137 -0
- package/sdk/dist/query/skills.js.map +1 -0
- package/sdk/dist/query/state-document.d.ts +14 -0
- package/sdk/dist/query/state-document.d.ts.map +1 -0
- package/sdk/dist/query/state-document.js +110 -0
- package/sdk/dist/query/state-document.js.map +1 -0
- package/sdk/dist/query/state-mutation.d.ts +224 -0
- package/sdk/dist/query/state-mutation.d.ts.map +1 -0
- package/sdk/dist/query/state-mutation.js +1635 -0
- package/sdk/dist/query/state-mutation.js.map +1 -0
- package/sdk/dist/query/state-project-load.d.ts +23 -0
- package/sdk/dist/query/state-project-load.d.ts.map +1 -0
- package/sdk/dist/query/state-project-load.js +75 -0
- package/sdk/dist/query/state-project-load.js.map +1 -0
- package/sdk/dist/query/state.d.ts +78 -0
- package/sdk/dist/query/state.d.ts.map +1 -0
- package/sdk/dist/query/state.js +443 -0
- package/sdk/dist/query/state.js.map +1 -0
- package/sdk/dist/query/summary.d.ts +18 -0
- package/sdk/dist/query/summary.d.ts.map +1 -0
- package/sdk/dist/query/summary.js +249 -0
- package/sdk/dist/query/summary.js.map +1 -0
- package/sdk/dist/query/template.d.ts +46 -0
- package/sdk/dist/query/template.d.ts.map +1 -0
- package/sdk/dist/query/template.js +210 -0
- package/sdk/dist/query/template.js.map +1 -0
- package/sdk/dist/query/uat.d.ts +42 -0
- package/sdk/dist/query/uat.d.ts.map +1 -0
- package/sdk/dist/query/uat.js +339 -0
- package/sdk/dist/query/uat.js.map +1 -0
- package/sdk/dist/query/utils.d.ts +59 -0
- package/sdk/dist/query/utils.d.ts.map +1 -0
- package/sdk/dist/query/utils.js +74 -0
- package/sdk/dist/query/utils.js.map +1 -0
- package/sdk/dist/query/validate.d.ts +67 -0
- package/sdk/dist/query/validate.d.ts.map +1 -0
- package/sdk/dist/query/validate.js +1001 -0
- package/sdk/dist/query/validate.js.map +1 -0
- package/sdk/dist/query/verify.d.ts +98 -0
- package/sdk/dist/query/verify.d.ts.map +1 -0
- package/sdk/dist/query/verify.js +593 -0
- package/sdk/dist/query/verify.js.map +1 -0
- package/sdk/dist/query/websearch.d.ts +24 -0
- package/sdk/dist/query/websearch.d.ts.map +1 -0
- package/sdk/dist/query/websearch.js +68 -0
- package/sdk/dist/query/websearch.js.map +1 -0
- package/sdk/dist/query/workspace.d.ts +62 -0
- package/sdk/dist/query/workspace.d.ts.map +1 -0
- package/sdk/dist/query/workspace.js +104 -0
- package/sdk/dist/query/workspace.js.map +1 -0
- package/sdk/dist/query/workstream-inventory.d.ts +24 -0
- package/sdk/dist/query/workstream-inventory.d.ts.map +1 -0
- package/sdk/dist/query/workstream-inventory.js +120 -0
- package/sdk/dist/query/workstream-inventory.js.map +1 -0
- package/sdk/dist/query/workstream.d.ts +35 -0
- package/sdk/dist/query/workstream.d.ts.map +1 -0
- package/sdk/dist/query/workstream.js +298 -0
- package/sdk/dist/query/workstream.js.map +1 -0
- package/sdk/dist/query/worktree.d.ts +9 -0
- package/sdk/dist/query/worktree.d.ts.map +1 -0
- package/sdk/dist/query/worktree.js +79 -0
- package/sdk/dist/query/worktree.js.map +1 -0
- package/sdk/dist/query-command-executor.d.ts +22 -0
- package/sdk/dist/query-command-executor.d.ts.map +1 -0
- package/sdk/dist/query-command-executor.js +22 -0
- package/sdk/dist/query-command-executor.js.map +1 -0
- package/sdk/dist/query-execution-policy.d.ts +24 -0
- package/sdk/dist/query-execution-policy.d.ts.map +1 -0
- package/sdk/dist/query-execution-policy.js +27 -0
- package/sdk/dist/query-execution-policy.js.map +1 -0
- package/sdk/dist/query-failure-classification.d.ts +9 -0
- package/sdk/dist/query-failure-classification.d.ts.map +1 -0
- package/sdk/dist/query-failure-classification.js +32 -0
- package/sdk/dist/query-failure-classification.js.map +1 -0
- package/sdk/dist/query-gsd-tools-path.d.ts +2 -0
- package/sdk/dist/query-gsd-tools-path.d.ts.map +1 -0
- package/sdk/dist/query-gsd-tools-path.js +2 -0
- package/sdk/dist/query-gsd-tools-path.js.map +1 -0
- package/sdk/dist/query-gsd-tools-runtime.d.ts +20 -0
- package/sdk/dist/query-gsd-tools-runtime.d.ts.map +1 -0
- package/sdk/dist/query-gsd-tools-runtime.js +47 -0
- package/sdk/dist/query-gsd-tools-runtime.js.map +1 -0
- package/sdk/dist/query-hotpath-methods.d.ts +19 -0
- package/sdk/dist/query-hotpath-methods.d.ts.map +1 -0
- package/sdk/dist/query-hotpath-methods.js +34 -0
- package/sdk/dist/query-hotpath-methods.js.map +1 -0
- package/sdk/dist/query-native-direct-adapter.d.ts +20 -0
- package/sdk/dist/query-native-direct-adapter.d.ts.map +1 -0
- package/sdk/dist/query-native-direct-adapter.js +52 -0
- package/sdk/dist/query-native-direct-adapter.js.map +1 -0
- package/sdk/dist/query-native-hotpath-adapter.d.ts +15 -0
- package/sdk/dist/query-native-hotpath-adapter.d.ts.map +1 -0
- package/sdk/dist/query-native-hotpath-adapter.js +32 -0
- package/sdk/dist/query-native-hotpath-adapter.js.map +1 -0
- package/sdk/dist/query-raw-output-projection.d.ts +6 -0
- package/sdk/dist/query-raw-output-projection.d.ts.map +1 -0
- package/sdk/dist/query-raw-output-projection.js +86 -0
- package/sdk/dist/query-raw-output-projection.js.map +1 -0
- package/sdk/dist/query-runtime-bridge.d.ts +61 -0
- package/sdk/dist/query-runtime-bridge.d.ts.map +1 -0
- package/sdk/dist/query-runtime-bridge.js +144 -0
- package/sdk/dist/query-runtime-bridge.js.map +1 -0
- package/sdk/dist/query-subprocess-adapter.d.ts +18 -0
- package/sdk/dist/query-subprocess-adapter.d.ts.map +1 -0
- package/sdk/dist/query-subprocess-adapter.js +92 -0
- package/sdk/dist/query-subprocess-adapter.js.map +1 -0
- package/sdk/dist/query-tools-error-factory.d.ts +16 -0
- package/sdk/dist/query-tools-error-factory.d.ts.map +1 -0
- package/sdk/dist/query-tools-error-factory.js +33 -0
- package/sdk/dist/query-tools-error-factory.js.map +1 -0
- package/sdk/dist/research-gate.d.ts +24 -0
- package/sdk/dist/research-gate.d.ts.map +1 -0
- package/sdk/dist/research-gate.js +70 -0
- package/sdk/dist/research-gate.js.map +1 -0
- package/sdk/dist/runtime-bridge-sync/index.d.ts +96 -0
- package/sdk/dist/runtime-bridge-sync/index.d.ts.map +1 -0
- package/sdk/dist/runtime-bridge-sync/index.js +109 -0
- package/sdk/dist/runtime-bridge-sync/index.js.map +1 -0
- package/sdk/dist/runtime-bridge-sync/worker.d.ts +2 -0
- package/sdk/dist/runtime-bridge-sync/worker.d.ts.map +1 -0
- package/sdk/dist/runtime-bridge-sync/worker.js +180 -0
- package/sdk/dist/runtime-bridge-sync/worker.js.map +1 -0
- package/sdk/dist/runtime-gate.d.ts +14 -0
- package/sdk/dist/runtime-gate.d.ts.map +1 -0
- package/sdk/dist/runtime-gate.js +48 -0
- package/sdk/dist/runtime-gate.js.map +1 -0
- package/sdk/dist/sdk-package-compatibility.d.ts +38 -0
- package/sdk/dist/sdk-package-compatibility.d.ts.map +1 -0
- package/sdk/dist/sdk-package-compatibility.js +90 -0
- package/sdk/dist/sdk-package-compatibility.js.map +1 -0
- package/sdk/dist/session-runner.d.ts +40 -0
- package/sdk/dist/session-runner.d.ts.map +1 -0
- package/sdk/dist/session-runner.js +274 -0
- package/sdk/dist/session-runner.js.map +1 -0
- package/sdk/dist/tool-scoping.d.ts +31 -0
- package/sdk/dist/tool-scoping.d.ts.map +1 -0
- package/sdk/dist/tool-scoping.js +54 -0
- package/sdk/dist/tool-scoping.js.map +1 -0
- package/sdk/dist/types.d.ts +794 -0
- package/sdk/dist/types.d.ts.map +1 -0
- package/sdk/dist/types.js +77 -0
- package/sdk/dist/types.js.map +1 -0
- package/sdk/dist/workstream-inventory/builder.d.ts +88 -0
- package/sdk/dist/workstream-inventory/builder.d.ts.map +1 -0
- package/sdk/dist/workstream-inventory/builder.js +84 -0
- package/sdk/dist/workstream-inventory/builder.js.map +1 -0
- package/sdk/dist/workstream-name-policy.d.ts +37 -0
- package/sdk/dist/workstream-name-policy.d.ts.map +1 -0
- package/sdk/dist/workstream-name-policy.js +53 -0
- package/sdk/dist/workstream-name-policy.js.map +1 -0
- package/sdk/dist/workstream-utils.d.ts +23 -0
- package/sdk/dist/workstream-utils.d.ts.map +1 -0
- package/sdk/dist/workstream-utils.js +34 -0
- package/sdk/dist/workstream-utils.js.map +1 -0
- package/sdk/dist/ws-transport.d.ts +32 -0
- package/sdk/dist/ws-transport.d.ts.map +1 -0
- package/sdk/dist/ws-transport.js +84 -0
- package/sdk/dist/ws-transport.js.map +1 -0
- package/sdk/package-lock.json +2530 -0
- package/sdk/package.json +77 -0
- package/sdk/prompts/templates/project.md +186 -0
- package/sdk/prompts/templates/requirements.md +231 -0
- package/sdk/prompts/templates/research-project/ARCHITECTURE.md +204 -0
- package/sdk/prompts/templates/research-project/FEATURES.md +147 -0
- package/sdk/prompts/templates/research-project/PITFALLS.md +200 -0
- package/sdk/prompts/templates/research-project/STACK.md +120 -0
- package/sdk/prompts/templates/research-project/SUMMARY.md +170 -0
- package/sdk/prompts/templates/roadmap.md +202 -0
- package/sdk/prompts/templates/state.md +175 -0
- package/sdk/shared/config-defaults.manifest.json +75 -0
- package/sdk/shared/config-schema.manifest.json +151 -0
- package/sdk/shared/model-catalog.json +122 -0
- package/sdk/src/assembled-prompts.test.ts +349 -0
- package/sdk/src/bug-3589-planning-paths-validation.test.ts +89 -0
- package/sdk/src/bug-3591-gsdtools-runtime-workstream.test.ts +179 -0
- package/sdk/src/cli-transport.test.ts +388 -0
- package/sdk/src/cli-transport.ts +130 -0
- package/sdk/src/cli.test.ts +426 -0
- package/sdk/src/cli.ts +589 -0
- package/sdk/src/config.test.ts +277 -0
- package/sdk/src/config.ts +202 -0
- package/sdk/src/configuration/index.test.ts +318 -0
- package/sdk/src/configuration/index.ts +325 -0
- package/sdk/src/context-engine.test.ts +295 -0
- package/sdk/src/context-engine.ts +170 -0
- package/sdk/src/context-truncation.test.ts +163 -0
- package/sdk/src/context-truncation.ts +233 -0
- package/sdk/src/e2e.integration.test.ts +181 -0
- package/sdk/src/errors.ts +72 -0
- package/sdk/src/event-stream.test.ts +661 -0
- package/sdk/src/event-stream.ts +441 -0
- package/sdk/src/golden/capture.ts +95 -0
- package/sdk/src/golden/fixtures/generate-slug.golden.json +1 -0
- package/sdk/src/golden/fixtures/profile-sample-sessions/demo-project/sample.jsonl +3 -0
- package/sdk/src/golden/fixtures/summary-extract-sample.md +26 -0
- package/sdk/src/golden/fixtures/uat-render-checkpoint-sample.md +15 -0
- package/sdk/src/golden/golden-integration-covered.ts +30 -0
- package/sdk/src/golden/golden-mutation-covered.ts +17 -0
- package/sdk/src/golden/golden-policy.test.ts +8 -0
- package/sdk/src/golden/golden-policy.ts +120 -0
- package/sdk/src/golden/golden.integration.test.ts +1031 -0
- package/sdk/src/golden/init-golden-normalize.ts +15 -0
- package/sdk/src/golden/read-only-golden-rows.ts +77 -0
- package/sdk/src/golden/read-only-parity.integration.test.ts +133 -0
- package/sdk/src/golden/registry-canonical-commands.ts +31 -0
- package/sdk/src/gsd-tools-error.test.ts +21 -0
- package/sdk/src/gsd-tools-error.ts +65 -0
- package/sdk/src/gsd-tools.test.ts +472 -0
- package/sdk/src/gsd-tools.ts +237 -0
- package/sdk/src/gsd-transport-policy.test.ts +34 -0
- package/sdk/src/gsd-transport-policy.ts +48 -0
- package/sdk/src/gsd-transport.test.ts +299 -0
- package/sdk/src/gsd-transport.ts +118 -0
- package/sdk/src/index.ts +366 -0
- package/sdk/src/init-e2e.integration.test.ts +138 -0
- package/sdk/src/init-runner.test.ts +740 -0
- package/sdk/src/init-runner.ts +734 -0
- package/sdk/src/lifecycle-e2e.integration.test.ts +258 -0
- package/sdk/src/logger.test.ts +149 -0
- package/sdk/src/logger.ts +113 -0
- package/sdk/src/milestone-runner.test.ts +421 -0
- package/sdk/src/model-catalog.ts +70 -0
- package/sdk/src/phase-prompt.ts +259 -0
- package/sdk/src/phase-runner.integration.test.ts +377 -0
- package/sdk/src/phase-runner.test.ts +3660 -0
- package/sdk/src/phase-runner.ts +1442 -0
- package/sdk/src/plan-parser.test.ts +579 -0
- package/sdk/src/plan-parser.ts +431 -0
- package/sdk/src/planning-journal.test.ts +70 -0
- package/sdk/src/planning-journal.ts +153 -0
- package/sdk/src/planning-runtime.test.ts +29 -0
- package/sdk/src/planning-runtime.ts +100 -0
- package/sdk/src/project-root/index.test.ts +186 -0
- package/sdk/src/project-root/index.ts +144 -0
- package/sdk/src/prompt-builder.test.ts +318 -0
- package/sdk/src/prompt-builder.ts +218 -0
- package/sdk/src/prompt-sanitizer.test.ts +260 -0
- package/sdk/src/prompt-sanitizer.ts +116 -0
- package/sdk/src/query/QUERY-HANDLERS.md +349 -0
- package/sdk/src/query/active-workstream-store.ts +50 -0
- package/sdk/src/query/agent-failure-classifier.test.ts +157 -0
- package/sdk/src/query/agent-failure-classifier.ts +105 -0
- package/sdk/src/query/audit-open.ts +722 -0
- package/sdk/src/query/check-auto-mode.test.ts +77 -0
- package/sdk/src/query/check-auto-mode.ts +49 -0
- package/sdk/src/query/check-completion.test.ts +113 -0
- package/sdk/src/query/check-completion.ts +182 -0
- package/sdk/src/query/check-decision-coverage.test.ts +519 -0
- package/sdk/src/query/check-decision-coverage.ts +554 -0
- package/sdk/src/query/check-gates.test.ts +103 -0
- package/sdk/src/query/check-gates.ts +112 -0
- package/sdk/src/query/check-ship-ready.test.ts +303 -0
- package/sdk/src/query/check-ship-ready.ts +136 -0
- package/sdk/src/query/check-verification-status.test.ts +143 -0
- package/sdk/src/query/check-verification-status.ts +160 -0
- package/sdk/src/query/command-aliases.generated.ts +154 -0
- package/sdk/src/query/command-catalog.ts +31 -0
- package/sdk/src/query/command-definition.test.ts +47 -0
- package/sdk/src/query/command-definition.ts +70 -0
- package/sdk/src/query/command-family-handlers.ts +123 -0
- package/sdk/src/query/command-manifest.init.ts +24 -0
- package/sdk/src/query/command-manifest.non-family.ts +86 -0
- package/sdk/src/query/command-manifest.phase.ts +17 -0
- package/sdk/src/query/command-manifest.phases.ts +11 -0
- package/sdk/src/query/command-manifest.roadmap.ts +11 -0
- package/sdk/src/query/command-manifest.state.ts +31 -0
- package/sdk/src/query/command-manifest.ts +17 -0
- package/sdk/src/query/command-manifest.types.ts +13 -0
- package/sdk/src/query/command-manifest.validate.ts +11 -0
- package/sdk/src/query/command-manifest.verify.ts +17 -0
- package/sdk/src/query/command-resolution.test.ts +70 -0
- package/sdk/src/query/command-seam-coverage.test.ts +118 -0
- package/sdk/src/query/command-static-catalog-domain.ts +111 -0
- package/sdk/src/query/command-static-catalog-foundation.ts +111 -0
- package/sdk/src/query/command-topology.test.ts +28 -0
- package/sdk/src/query/command-topology.ts +114 -0
- package/sdk/src/query/commands-list.test.ts +36 -0
- package/sdk/src/query/commands-list.ts +19 -0
- package/sdk/src/query/commit.test.ts +485 -0
- package/sdk/src/query/commit.ts +717 -0
- package/sdk/src/query/config-gates.test.ts +89 -0
- package/sdk/src/query/config-gates.ts +69 -0
- package/sdk/src/query/config-mutation.test.ts +598 -0
- package/sdk/src/query/config-mutation.ts +705 -0
- package/sdk/src/query/config-query.test.ts +472 -0
- package/sdk/src/query/config-query.ts +314 -0
- package/sdk/src/query/config-schema.ts +35 -0
- package/sdk/src/query/decisions.test.ts +221 -0
- package/sdk/src/query/decisions.ts +196 -0
- package/sdk/src/query/decomposed-handlers.test.ts +431 -0
- package/sdk/src/query/detect-custom-files.test.ts +115 -0
- package/sdk/src/query/detect-custom-files.ts +96 -0
- package/sdk/src/query/detect-phase-type.test.ts +105 -0
- package/sdk/src/query/detect-phase-type.ts +141 -0
- package/sdk/src/query/docs-init.ts +258 -0
- package/sdk/src/query/fallow-audit.ts +88 -0
- package/sdk/src/query/frontmatter-array.test.ts +14 -0
- package/sdk/src/query/frontmatter-mutation.test.ts +259 -0
- package/sdk/src/query/frontmatter-mutation.ts +328 -0
- package/sdk/src/query/frontmatter.test.ts +326 -0
- package/sdk/src/query/frontmatter.ts +395 -0
- package/sdk/src/query/helpers.test.ts +615 -0
- package/sdk/src/query/helpers.ts +566 -0
- package/sdk/src/query/index-thin-seam.test.ts +16 -0
- package/sdk/src/query/index.ts +9 -0
- package/sdk/src/query/init-complex.test.ts +788 -0
- package/sdk/src/query/init-complex.ts +815 -0
- package/sdk/src/query/init-workstream-milestone-op.test.ts +321 -0
- package/sdk/src/query/init.test.ts +791 -0
- package/sdk/src/query/init.ts +1335 -0
- package/sdk/src/query/intel.test.ts +90 -0
- package/sdk/src/query/intel.ts +404 -0
- package/sdk/src/query/mutation-event-decorator.test.ts +45 -0
- package/sdk/src/query/mutation-event-decorator.ts +37 -0
- package/sdk/src/query/mutation-event-mapper.test.ts +33 -0
- package/sdk/src/query/mutation-event-mapper.ts +102 -0
- package/sdk/src/query/mvp.test.ts +335 -0
- package/sdk/src/query/mvp.ts +292 -0
- package/sdk/src/query/normalize-query-command.test.ts +102 -0
- package/sdk/src/query/phase-filesystem-adapter.ts +35 -0
- package/sdk/src/query/phase-lifecycle-policy.ts +171 -0
- package/sdk/src/query/phase-lifecycle.test.ts +1971 -0
- package/sdk/src/query/phase-lifecycle.ts +2210 -0
- package/sdk/src/query/phase-list-queries.test.ts +88 -0
- package/sdk/src/query/phase-list-queries.ts +152 -0
- package/sdk/src/query/phase-ready.test.ts +65 -0
- package/sdk/src/query/phase-ready.ts +159 -0
- package/sdk/src/query/phase-roadmap-mutation.ts +82 -0
- package/sdk/src/query/phase-uat-passed.test.ts +593 -0
- package/sdk/src/query/phase-uat-passed.ts +297 -0
- package/sdk/src/query/phase.test.ts +693 -0
- package/sdk/src/query/phase.ts +741 -0
- package/sdk/src/query/pipeline.test.ts +169 -0
- package/sdk/src/query/pipeline.ts +243 -0
- package/sdk/src/query/plan-scan.test.ts +35 -0
- package/sdk/src/query/plan-scan.ts +82 -0
- package/sdk/src/query/plan-task-structure.test.ts +65 -0
- package/sdk/src/query/plan-task-structure.ts +63 -0
- package/sdk/src/query/policy-convergence.test.ts +28 -0
- package/sdk/src/query/profile-extract-messages.ts +247 -0
- package/sdk/src/query/profile-output.ts +929 -0
- package/sdk/src/query/profile-questionnaire-data.ts +181 -0
- package/sdk/src/query/profile-sample.ts +184 -0
- package/sdk/src/query/profile-scan-sessions.ts +174 -0
- package/sdk/src/query/profile.test.ts +136 -0
- package/sdk/src/query/profile.ts +337 -0
- package/sdk/src/query/progress.test.ts +156 -0
- package/sdk/src/query/progress.ts +566 -0
- package/sdk/src/query/prompt-budget.ts +556 -0
- package/sdk/src/query/query-cli-adapter.test.ts +79 -0
- package/sdk/src/query/query-cli-adapter.ts +39 -0
- package/sdk/src/query/query-cli-output.test.ts +33 -0
- package/sdk/src/query/query-cli-output.ts +35 -0
- package/sdk/src/query/query-command-diagnosis.test.ts +22 -0
- package/sdk/src/query/query-command-diagnosis.ts +5 -0
- package/sdk/src/query/query-command-resolution-strategy.test.ts +34 -0
- package/sdk/src/query/query-command-resolution-strategy.ts +121 -0
- package/sdk/src/query/query-command-semantics.test.ts +22 -0
- package/sdk/src/query/query-command-semantics.ts +22 -0
- package/sdk/src/query/query-dispatch-contract.ts +30 -0
- package/sdk/src/query/query-dispatch-error-mapper.ts +5 -0
- package/sdk/src/query/query-dispatch-formatting.ts +5 -0
- package/sdk/src/query/query-dispatch-observability.ts +6 -0
- package/sdk/src/query/query-dispatch.test.ts +699 -0
- package/sdk/src/query/query-dispatch.ts +243 -0
- package/sdk/src/query/query-error-details-schema.ts +29 -0
- package/sdk/src/query/query-error-taxonomy.test.ts +39 -0
- package/sdk/src/query/query-error-taxonomy.ts +117 -0
- package/sdk/src/query/query-fallback-bridge-adapter.test.ts +32 -0
- package/sdk/src/query/query-fallback-bridge-adapter.ts +54 -0
- package/sdk/src/query/query-fallback-executor.test.ts +82 -0
- package/sdk/src/query/query-fallback-executor.ts +44 -0
- package/sdk/src/query/query-fallback-output-classifier.test.ts +36 -0
- package/sdk/src/query/query-fallback-output-classifier.ts +31 -0
- package/sdk/src/query/query-fallback-policy.test.ts +13 -0
- package/sdk/src/query/query-fallback-policy.ts +11 -0
- package/sdk/src/query/query-native-dispatch-adapter.ts +16 -0
- package/sdk/src/query/query-policy-capability.test.ts +10 -0
- package/sdk/src/query/query-policy-capability.ts +26 -0
- package/sdk/src/query/query-policy-snapshot.test.ts +9 -0
- package/sdk/src/query/query-registry-capability.test.ts +14 -0
- package/sdk/src/query/query-runtime-context.ts +44 -0
- package/sdk/src/query/query-unknown-command-hints.test.ts +9 -0
- package/sdk/src/query/query-unknown-command-hints.ts +5 -0
- package/sdk/src/query/registry-assembly-descriptor.ts +87 -0
- package/sdk/src/query/registry-assembly-invariants.ts +127 -0
- package/sdk/src/query/registry-assembly.test.ts +138 -0
- package/sdk/src/query/registry-assembly.ts +78 -0
- package/sdk/src/query/registry.test.ts +208 -0
- package/sdk/src/query/registry.ts +142 -0
- package/sdk/src/query/requirements-extract-from-plans.test.ts +58 -0
- package/sdk/src/query/requirements-extract-from-plans.ts +86 -0
- package/sdk/src/query/roadmap-update-plan-progress.test.ts +233 -0
- package/sdk/src/query/roadmap-update-plan-progress.ts +159 -0
- package/sdk/src/query/roadmap.test.ts +1250 -0
- package/sdk/src/query/roadmap.ts +1131 -0
- package/sdk/src/query/route-next-action.test.ts +61 -0
- package/sdk/src/query/route-next-action.ts +345 -0
- package/sdk/src/query/schema-detect.ts +189 -0
- package/sdk/src/query/secrets.test.ts +66 -0
- package/sdk/src/query/secrets.ts +43 -0
- package/sdk/src/query/skill-manifest.test.ts +62 -0
- package/sdk/src/query/skill-manifest.ts +216 -0
- package/sdk/src/query/skills.test.ts +234 -0
- package/sdk/src/query/skills.ts +143 -0
- package/sdk/src/query/state-document.test.ts +197 -0
- package/sdk/src/query/state-document.ts +129 -0
- package/sdk/src/query/state-mutation.test.ts +1210 -0
- package/sdk/src/query/state-mutation.ts +1814 -0
- package/sdk/src/query/state-project-load.ts +80 -0
- package/sdk/src/query/state.test.ts +616 -0
- package/sdk/src/query/state.ts +476 -0
- package/sdk/src/query/sub-repos-root.integration.test.ts +79 -0
- package/sdk/src/query/summary.test.ts +95 -0
- package/sdk/src/query/summary.ts +296 -0
- package/sdk/src/query/template.test.ts +180 -0
- package/sdk/src/query/template.ts +242 -0
- package/sdk/src/query/uat.test.ts +77 -0
- package/sdk/src/query/uat.ts +365 -0
- package/sdk/src/query/utils.test.ts +82 -0
- package/sdk/src/query/utils.ts +106 -0
- package/sdk/src/query/validate.test.ts +924 -0
- package/sdk/src/query/validate.ts +1054 -0
- package/sdk/src/query/verify.test.ts +414 -0
- package/sdk/src/query/verify.ts +656 -0
- package/sdk/src/query/websearch.test.ts +31 -0
- package/sdk/src/query/websearch.ts +82 -0
- package/sdk/src/query/workspace.test.ts +120 -0
- package/sdk/src/query/workspace.ts +145 -0
- package/sdk/src/query/workstream-inventory.ts +143 -0
- package/sdk/src/query/workstream.test.ts +153 -0
- package/sdk/src/query/workstream.ts +324 -0
- package/sdk/src/query/worktree.ts +84 -0
- package/sdk/src/query-command-executor.ts +31 -0
- package/sdk/src/query-execution-policy.test.ts +52 -0
- package/sdk/src/query-execution-policy.ts +46 -0
- package/sdk/src/query-failure-classification.test.ts +23 -0
- package/sdk/src/query-failure-classification.ts +42 -0
- package/sdk/src/query-gsd-tools-path.ts +1 -0
- package/sdk/src/query-gsd-tools-runtime.ts +89 -0
- package/sdk/src/query-hotpath-methods.ts +48 -0
- package/sdk/src/query-native-direct-adapter.test.ts +35 -0
- package/sdk/src/query-native-direct-adapter.ts +70 -0
- package/sdk/src/query-native-hotpath-adapter.test.ts +43 -0
- package/sdk/src/query-native-hotpath-adapter.ts +45 -0
- package/sdk/src/query-raw-output-projection.test.ts +39 -0
- package/sdk/src/query-raw-output-projection.ts +93 -0
- package/sdk/src/query-runtime-bridge.test.ts +150 -0
- package/sdk/src/query-runtime-bridge.ts +215 -0
- package/sdk/src/query-runtime-seam-coverage.test.ts +20 -0
- package/sdk/src/query-subprocess-adapter.test.ts +84 -0
- package/sdk/src/query-subprocess-adapter.ts +146 -0
- package/sdk/src/query-tools-error-factory.test.ts +35 -0
- package/sdk/src/query-tools-error-factory.ts +76 -0
- package/sdk/src/research-gate.test.ts +190 -0
- package/sdk/src/research-gate.ts +94 -0
- package/sdk/src/runtime-bridge-options.test.ts +33 -0
- package/sdk/src/runtime-bridge-sync/index.test.ts +164 -0
- package/sdk/src/runtime-bridge-sync/index.ts +154 -0
- package/sdk/src/runtime-bridge-sync/projectdir-regression.test.ts +150 -0
- package/sdk/src/runtime-bridge-sync/worker.ts +224 -0
- package/sdk/src/runtime-gate.test.ts +84 -0
- package/sdk/src/runtime-gate.ts +52 -0
- package/sdk/src/sdk-package-compatibility.test.ts +97 -0
- package/sdk/src/sdk-package-compatibility.ts +141 -0
- package/sdk/src/session-runner.test.ts +164 -0
- package/sdk/src/session-runner.ts +327 -0
- package/sdk/src/tool-scoping.test.ts +160 -0
- package/sdk/src/tool-scoping.ts +61 -0
- package/sdk/src/types.ts +927 -0
- package/sdk/src/workflow-agent-skills-consistency.test.ts +98 -0
- package/sdk/src/workstream-inventory/builder.test.ts +241 -0
- package/sdk/src/workstream-inventory/builder.ts +170 -0
- package/sdk/src/workstream-name-policy.ts +57 -0
- package/sdk/src/workstream-utils.ts +36 -0
- package/sdk/src/ws-flag.test.ts +285 -0
- package/sdk/src/ws-transport.test.ts +161 -0
- package/sdk/src/ws-transport.ts +93 -0
- package/sdk/tsconfig.json +20 -0
|
@@ -0,0 +1,1800 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Create executable phase prompts (PLAN.md files) for a roadmap phase with integrated research and verification. Default flow: Research (if needed) -> Plan -> Verify -> Done. Orchestrates gsd-phase-researcher, gsd-planner, and gsd-plan-checker agents with a revision loop (max 3 iterations).
|
|
3
|
+
</purpose>
|
|
4
|
+
|
|
5
|
+
<required_reading>
|
|
6
|
+
Read all files referenced by the invoking prompt's execution_context before starting.
|
|
7
|
+
|
|
8
|
+
@~/.claude/get-shit-done/references/ui-brand.md
|
|
9
|
+
@~/.claude/get-shit-done/references/revision-loop.md
|
|
10
|
+
@~/.claude/get-shit-done/references/gate-prompts.md
|
|
11
|
+
@~/.claude/get-shit-done/references/agent-contracts.md
|
|
12
|
+
@~/.claude/get-shit-done/references/gates.md
|
|
13
|
+
</required_reading>
|
|
14
|
+
|
|
15
|
+
<available_agent_types>
|
|
16
|
+
Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
|
|
17
|
+
- gsd-phase-researcher — Researches technical approaches for a phase
|
|
18
|
+
- gsd-pattern-mapper — Analyzes codebase for existing patterns, produces PATTERNS.md
|
|
19
|
+
- gsd-planner — Creates detailed plans from phase scope
|
|
20
|
+
- gsd-plan-checker — Reviews plan quality before execution
|
|
21
|
+
</available_agent_types>
|
|
22
|
+
|
|
23
|
+
<process>
|
|
24
|
+
|
|
25
|
+
## 0. Git Branch Invariant
|
|
26
|
+
|
|
27
|
+
**Do not create, rename, or switch git branches during plan-phase.** Branch identity is established at discuss-phase and is owned by the user's git workflow. A phase rename in ROADMAP.md is a plan-level change only — it does not mutate git branch names. If `phase_slug` in the init JSON differs from the current branch name, that is expected and correct; leave the branch unchanged.
|
|
28
|
+
|
|
29
|
+
## 1. Initialize
|
|
30
|
+
|
|
31
|
+
Load all context in one call (paths only to minimize orchestrator context):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# SDK resolution: prefer local gsd-tools.cjs, fall back to global gsd-sdk (#3668)
|
|
35
|
+
GSD_TOOLS="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}/get-shit-done/bin/gsd-tools.cjs"
|
|
36
|
+
if [ -f "$GSD_TOOLS" ]; then
|
|
37
|
+
GSD_SDK="node $GSD_TOOLS"
|
|
38
|
+
elif command -v gsd-sdk >/dev/null 2>&1; then
|
|
39
|
+
GSD_SDK="gsd-sdk"
|
|
40
|
+
else
|
|
41
|
+
echo "ERROR: gsd-sdk not found on PATH and $GSD_TOOLS does not exist." >&2
|
|
42
|
+
echo "Run: npx get-shit-done-cc@latest --claude --local" >&2
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
INIT=$($GSD_SDK query init.plan-phase "$PHASE")
|
|
46
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
47
|
+
AGENT_SKILLS_RESEARCHER=$($GSD_SDK query agent-skills gsd-phase-researcher)
|
|
48
|
+
AGENT_SKILLS_PLANNER=$($GSD_SDK query agent-skills gsd-planner)
|
|
49
|
+
AGENT_SKILLS_CHECKER=$($GSD_SDK query agent-skills gsd-plan-checker)
|
|
50
|
+
CONTEXT_WINDOW=$($GSD_SDK query config-get context_window 2>/dev/null || echo "200000")
|
|
51
|
+
TDD_MODE=$($GSD_SDK query config-get workflow.tdd_mode 2>/dev/null || echo "false")
|
|
52
|
+
MVP_MODE_CFG=$($GSD_SDK query config-get workflow.mvp_mode 2>/dev/null || echo "false")
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
When `TDD_MODE` is `true`, the planner agent is instructed to apply `type: tdd` to eligible tasks using heuristics from `references/tdd.md`. The planner's `<required_reading>` is extended to include `@~/.claude/get-shit-done/references/tdd.md` so gate enforcement rules are available during planning.
|
|
56
|
+
|
|
57
|
+
When `CONTEXT_WINDOW >= 500000`, the planner prompt includes the 3 most recent prior phase CONTEXT.md and SUMMARY.md files PLUS any phases explicitly listed in the current phase's `Depends on:` field in ROADMAP.md. Explicit dependencies always load regardless of recency (e.g., Phase 7 declaring `Depends on: Phase 2` always sees Phase 2's context). Bounded recency keeps the planner's context budget focused on recent work.
|
|
58
|
+
|
|
59
|
+
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`.
|
|
60
|
+
|
|
61
|
+
**If `response_language` is set:** Include `response_language: {value}` in all spawned subagent prompts so any user-facing output stays in the configured language.
|
|
62
|
+
|
|
63
|
+
**File paths (for <files_to_read> 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.
|
|
64
|
+
|
|
65
|
+
**If `planning_exists` is false:** Error — run `/gsd:new-project` first.
|
|
66
|
+
|
|
67
|
+
## 1.5. Closed-Phase Gate (#3569)
|
|
68
|
+
|
|
69
|
+
The init JSON includes `phase_status` — one of `Pending | Planned | In Progress | Executed | Complete | Needs Review`. `Complete` means the phase has all summaries AND a `VERIFICATION.md` with `status: passed`. Replanning a closed phase silently rewrites plan docs that no longer match the shipped code, so the workflow must hard-stop here unless the operator explicitly overrides.
|
|
70
|
+
|
|
71
|
+
Parse `phase_status` from the init JSON, then:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
FORCE_REPLAN=false
|
|
75
|
+
if [[ "$ARGUMENTS" =~ (^|[[:space:]])--force([[:space:]]|$) ]]; then
|
|
76
|
+
FORCE_REPLAN=true
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
if [ "${phase_status}" = "Complete" ]; then
|
|
80
|
+
if [[ "$ARGUMENTS" =~ (^|[[:space:]])--reviews([[:space:]]|$) ]]; then
|
|
81
|
+
# --reviews on a closed phase is never legitimate — concerns belong in a
|
|
82
|
+
# new phase or issue against the closed phase's commits.
|
|
83
|
+
cat <<EOF >&2
|
|
84
|
+
Phase ${phase_number} (${phase_name}) is already CLOSED (VERIFICATION status: passed).
|
|
85
|
+
/gsd:plan-phase --reviews cannot replan a closed phase. If the review surfaced
|
|
86
|
+
real concerns, open a follow-up phase or file an issue against the closed
|
|
87
|
+
phase's commits. There is no --force override for --reviews on a closed phase.
|
|
88
|
+
EOF
|
|
89
|
+
exit 1
|
|
90
|
+
fi
|
|
91
|
+
if [ "$FORCE_REPLAN" != "true" ]; then
|
|
92
|
+
cat <<EOF >&2
|
|
93
|
+
Phase ${phase_number} (${phase_name}) is already CLOSED (VERIFICATION status: passed).
|
|
94
|
+
Replanning a closed phase will overwrite plan docs that no longer match the
|
|
95
|
+
shipped code. If you intentionally want to replan over closed work, re-run
|
|
96
|
+
with: /gsd:plan-phase ${phase_number} --force
|
|
97
|
+
|
|
98
|
+
Otherwise, to view what shipped, see: ${verification_path}
|
|
99
|
+
EOF
|
|
100
|
+
exit 1
|
|
101
|
+
fi
|
|
102
|
+
# FORCE_REPLAN=true: continue, but emit a banner so the operator sees the
|
|
103
|
+
# decision in the transcript and in any committed plan docs.
|
|
104
|
+
echo "WARNING: Replanning CLOSED phase ${phase_number} under --force. Verify the closeout was wrong before committing new plan docs." >&2
|
|
105
|
+
fi
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
The gate fires only on `Complete`. `Executed` and `Needs Review` are not gated — those states mean planning was finished but verification did not pass, and replanning is a legitimate next step.
|
|
109
|
+
|
|
110
|
+
## 2. Parse and Normalize Arguments
|
|
111
|
+
|
|
112
|
+
Extract from $ARGUMENTS: phase number (integer or decimal like `2.1`), flags (`--research`, `--skip-research`, `--research-phase <N>`, `--gaps`, `--skip-verify`, `--skip-ui`, `--prd <filepath>`, `--ingest <path-or-glob>`, `--ingest-format <auto|nygard|madr|narrative>`, `--reviews`, `--text`, `--bounce`, `--skip-bounce`, `--chunked`, `--mvp`, `--force` (override closed-phase gate, see §1.5)).
|
|
113
|
+
|
|
114
|
+
**`--research-phase <N>` — research-only mode (#3042 + #3044).** When this flag is present, parse `<N>` as the phase number (overrides any positional phase argument), set `RESEARCH_ONLY=true`, and treat the rest of this workflow as a research-dispatch only — the planner spawn (step 8), plan-checker, verification, gaps, bounce, and post-planning-gaps blocks all skip on `RESEARCH_ONLY`. Use this for cross-phase research, doc review before committing to a planning approach, and correction-without-replanning loops. Replaces the deleted `/gsd-research-phase` command.
|
|
115
|
+
|
|
116
|
+
In research-only mode, two modifiers control behavior when `RESEARCH.md` already exists:
|
|
117
|
+
|
|
118
|
+
- **`--research`** — force-refresh re-research without prompting. Re-spawns the researcher unconditionally and overwrites the existing RESEARCH.md. (This is the existing `--research` flag's standard "force re-research" semantics, reused here.)
|
|
119
|
+
- **`--view`** — view-only: print existing `RESEARCH.md` to stdout, do **not** spawn the researcher. Sets `VIEW_ONLY=true`. Cheapest mode for the correction-without-replanning loop. If `RESEARCH.md` does not exist, error with a hint to drop `--view`.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
RESEARCH_ONLY=false
|
|
123
|
+
VIEW_ONLY=false
|
|
124
|
+
if [[ "$ARGUMENTS" =~ --research-phase[[:space:]]+([0-9]+(\.[0-9]+)?) ]]; then
|
|
125
|
+
RESEARCH_ONLY=true
|
|
126
|
+
PHASE="${BASH_REMATCH[1]}"
|
|
127
|
+
fi
|
|
128
|
+
if $RESEARCH_ONLY && [[ "$ARGUMENTS" =~ (^|[[:space:]])--view([[:space:]]|$) ]]; then
|
|
129
|
+
VIEW_ONLY=true
|
|
130
|
+
fi
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Set `TEXT_MODE=true` if `--text` is present in $ARGUMENTS OR `text_mode` from init JSON is `true`. When `TEXT_MODE` is active, replace every `AskUserQuestion` call with a plain-text numbered list and ask the user to type their choice number. This is required for Claude Code remote sessions (`/rc` mode) where TUI menus don't work through the Claude App.
|
|
134
|
+
|
|
135
|
+
**MVP_MODE resolution.** Resolve `MVP_MODE` once via the centralized `phase.mvp-mode` query verb. Precedence (first hit wins): CLI flag → ROADMAP.md `**Mode:** mvp` → `workflow.mvp_mode` config → false. The verb is the single source of truth — do not re-implement the chain.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
MVP_FLAG_ARG=""
|
|
139
|
+
if [[ "$ARGUMENTS" =~ (^|[[:space:]])--mvp([[:space:]]|$) ]]; then MVP_FLAG_ARG="--cli-flag"; fi
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Defer the `phase.mvp-mode` query until `PHASE` is finalized (after explicit argument parsing/fallback phase detection + validation).
|
|
143
|
+
The verb returns `true|false`. Full result also exposes `source` (`cli_flag` | `roadmap` | `config` | `none`) for diagnostics. The mode is **all-or-nothing per phase** (PRD decision Q1) — never selective per task.
|
|
144
|
+
|
|
145
|
+
**Walking Skeleton gate.** When `MVP_MODE=true` AND `phase_number == "01"` AND there are zero prior phase summaries (new project), the planner runs in **Walking Skeleton mode** (per PRD decision Q2 — new projects only). Detect with:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
WALKING_SKELETON=false
|
|
149
|
+
if [ "$MVP_MODE" = "true" ] && [ "$padded_phase" = "01" ]; then
|
|
150
|
+
PRIOR_SUMMARIES=$($GSD_SDK query phases.list --pick summaries_total 2>/dev/null || echo "0")
|
|
151
|
+
if [ "$PRIOR_SUMMARIES" = "0" ]; then WALKING_SKELETON=true; fi
|
|
152
|
+
fi
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
When `WALKING_SKELETON=true`:
|
|
156
|
+
- Planner is instructed to produce `SKELETON.md` in the phase directory alongside `PLAN.md`. The template lives at `@~/.claude/get-shit-done/references/skeleton-template.md`.
|
|
157
|
+
- The plan must scaffold project + routing + one real DB read/write + one real UI interaction + dev deployment — the thinnest possible end-to-end working slice.
|
|
158
|
+
|
|
159
|
+
**Interaction with `--prd <filepath>`.** `--mvp` and `--prd` compose. The PRD express path (Step 3.5) creates `CONTEXT.md` from the PRD file and continues to research; the Walking Skeleton gate fires independently from the conditions above. When both are active on Phase 1 of a new project, the planner receives `WALKING_SKELETON=true` and PRD-derived context simultaneously — the PRD informs *what the skeleton should prove*. No precedence is needed; the two signals are orthogonal. See [`references/mvp-concepts.md`](../references/mvp-concepts.md) for the broader interaction map.
|
|
160
|
+
|
|
161
|
+
Extract express-path args from $ARGUMENTS: `PRD_FILE` (`--prd <filepath>`), `INGEST_PATH` (`--ingest <path-or-glob>`), and optional `INGEST_FORMAT` (`--ingest-format <auto|nygard|madr|narrative>`, default `auto`).
|
|
162
|
+
|
|
163
|
+
`--prd` and `--ingest` are mutually exclusive. If both are present, error and exit:
|
|
164
|
+
`Invalid arguments: cannot combine \`--prd\` with \`--ingest\`.`
|
|
165
|
+
|
|
166
|
+
**If no phase number:** Detect next unplanned phase from roadmap.
|
|
167
|
+
|
|
168
|
+
**If `phase_found` is false:** Validate phase exists in ROADMAP.md. If valid, create the directory using `expected_phase_dir` from init (includes `project_code` prefix when set):
|
|
169
|
+
```bash
|
|
170
|
+
mkdir -p "${expected_phase_dir}"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Set `phase_dir="${expected_phase_dir}"` after creation.
|
|
174
|
+
|
|
175
|
+
**Existing artifacts from init:** `has_research`, `has_plans`, `plan_count`.
|
|
176
|
+
|
|
177
|
+
Set `CHUNKED_MODE` from flag or config:
|
|
178
|
+
```bash
|
|
179
|
+
CHUNKED_CFG=$($GSD_SDK query config-get workflow.plan_chunked 2>/dev/null || echo "false")
|
|
180
|
+
CHUNKED_MODE=false
|
|
181
|
+
if [[ "$ARGUMENTS" =~ --chunked ]] || [[ "$CHUNKED_CFG" == "true" ]]; then
|
|
182
|
+
CHUNKED_MODE=true
|
|
183
|
+
fi
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## 2.5. Validate `--reviews` Prerequisite
|
|
187
|
+
|
|
188
|
+
**Skip if:** No `--reviews` flag.
|
|
189
|
+
|
|
190
|
+
**If `--reviews` AND `--gaps`:** Error — cannot combine `--reviews` with `--gaps`. These are conflicting modes.
|
|
191
|
+
|
|
192
|
+
**If `--reviews` AND `has_reviews` is false (no REVIEWS.md in phase dir):**
|
|
193
|
+
|
|
194
|
+
Error:
|
|
195
|
+
```
|
|
196
|
+
No REVIEWS.md found for Phase {N}. Run reviews first:
|
|
197
|
+
|
|
198
|
+
/gsd:review --phase {N}
|
|
199
|
+
|
|
200
|
+
Then re-run /gsd:plan-phase {N} --reviews
|
|
201
|
+
```
|
|
202
|
+
Exit workflow.
|
|
203
|
+
|
|
204
|
+
## 3. Validate Phase
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
PHASE_INFO=$($GSD_SDK query roadmap.get-phase "${PHASE}")
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**If `found` is false:** Error with available phases. **If `found` is true:** Extract `phase_number`, `phase_name`, `goal` from JSON.
|
|
211
|
+
|
|
212
|
+
Now that `PHASE` is finalized, resolve MVP mode:
|
|
213
|
+
```bash
|
|
214
|
+
MVP_MODE=$($GSD_SDK query phase.mvp-mode "${PHASE}" $MVP_FLAG_ARG --pick active)
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## 3.5. Handle PRD Express Path
|
|
218
|
+
|
|
219
|
+
**Skip if:** No `--prd` flag in arguments.
|
|
220
|
+
|
|
221
|
+
**If `--prd <filepath>` provided:**
|
|
222
|
+
|
|
223
|
+
1. Read the PRD file:
|
|
224
|
+
```bash
|
|
225
|
+
PRD_CONTENT=$(cat "$PRD_FILE" 2>/dev/null)
|
|
226
|
+
if [ -z "$PRD_CONTENT" ]; then
|
|
227
|
+
echo "Error: PRD file not found: $PRD_FILE"
|
|
228
|
+
exit 1
|
|
229
|
+
fi
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
2. Display banner:
|
|
233
|
+
```
|
|
234
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
235
|
+
GSD ► PRD EXPRESS PATH
|
|
236
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
237
|
+
|
|
238
|
+
Using PRD: {PRD_FILE}
|
|
239
|
+
Generating CONTEXT.md from requirements...
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
3. Parse the PRD content and generate CONTEXT.md. The orchestrator should:
|
|
243
|
+
- Extract all requirements, user stories, acceptance criteria, and constraints from the PRD
|
|
244
|
+
- Map each to a locked decision (everything in the PRD is treated as a locked decision)
|
|
245
|
+
- Identify any areas the PRD doesn't cover and mark as "Claude's Discretion"
|
|
246
|
+
- **Extract canonical refs** from ROADMAP.md for this phase, plus any specs/ADRs referenced in the PRD — expand to full file paths (MANDATORY)
|
|
247
|
+
- Create CONTEXT.md in the phase directory
|
|
248
|
+
|
|
249
|
+
4. Write CONTEXT.md:
|
|
250
|
+
```markdown
|
|
251
|
+
# Phase [X]: [Name] - Context
|
|
252
|
+
|
|
253
|
+
**Gathered:** [date]
|
|
254
|
+
**Status:** Ready for planning
|
|
255
|
+
**Source:** PRD Express Path ({PRD_FILE})
|
|
256
|
+
|
|
257
|
+
<domain>
|
|
258
|
+
## Phase Boundary
|
|
259
|
+
|
|
260
|
+
[Extracted from PRD — what this phase delivers]
|
|
261
|
+
|
|
262
|
+
</domain>
|
|
263
|
+
|
|
264
|
+
<decisions>
|
|
265
|
+
## Implementation Decisions
|
|
266
|
+
|
|
267
|
+
{For each requirement/story/criterion in the PRD:}
|
|
268
|
+
### [Category derived from content]
|
|
269
|
+
- [Requirement as locked decision]
|
|
270
|
+
|
|
271
|
+
### Claude's Discretion
|
|
272
|
+
[Areas not covered by PRD — implementation details, technical choices]
|
|
273
|
+
|
|
274
|
+
</decisions>
|
|
275
|
+
|
|
276
|
+
<canonical_refs>
|
|
277
|
+
## Canonical References
|
|
278
|
+
|
|
279
|
+
**Downstream agents MUST read these before planning or implementing.**
|
|
280
|
+
|
|
281
|
+
[MANDATORY. Extract from ROADMAP.md and any docs referenced in the PRD.
|
|
282
|
+
Use full relative paths. Group by topic area.]
|
|
283
|
+
|
|
284
|
+
### [Topic area]
|
|
285
|
+
- `path/to/spec-or-adr.md` — [What it decides/defines]
|
|
286
|
+
|
|
287
|
+
[If no external specs: "No external specs — requirements fully captured in decisions above"]
|
|
288
|
+
|
|
289
|
+
</canonical_refs>
|
|
290
|
+
|
|
291
|
+
<specifics>
|
|
292
|
+
## Specific Ideas
|
|
293
|
+
|
|
294
|
+
[Any specific references, examples, or concrete requirements from PRD]
|
|
295
|
+
|
|
296
|
+
</specifics>
|
|
297
|
+
|
|
298
|
+
<deferred>
|
|
299
|
+
## Deferred Ideas
|
|
300
|
+
|
|
301
|
+
[Items in PRD explicitly marked as future/v2/out-of-scope]
|
|
302
|
+
[If none: "None — PRD covers phase scope"]
|
|
303
|
+
|
|
304
|
+
</deferred>
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
*Phase: XX-name*
|
|
309
|
+
*Context gathered: [date] via PRD Express Path*
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
5. Commit:
|
|
313
|
+
```bash
|
|
314
|
+
$GSD_SDK query commit "docs(${padded_phase}): generate context from PRD" --files "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
6. Set `context_content` to the generated CONTEXT.md content and continue to step 5 (Handle Research).
|
|
318
|
+
|
|
319
|
+
**Effect:** This completely bypasses step 4 (Load CONTEXT.md) since we just created it. The rest of the workflow (research, planning, verification) proceeds normally with the PRD-derived context.
|
|
320
|
+
|
|
321
|
+
## 3.6. Handle ADR Ingest Express Path
|
|
322
|
+
|
|
323
|
+
**Skip if:** No `--ingest` flag in arguments.
|
|
324
|
+
|
|
325
|
+
**If `--ingest <path-or-glob>` provided:**
|
|
326
|
+
|
|
327
|
+
1. Display banner: `GSD ► ADR Ingest Express Path` with `{INGEST_PATH}` and `{INGEST_FORMAT}`.
|
|
328
|
+
2. Parse each resolved ADR through `get-shit-done/bin/lib/adr-parser.cjs` (`--input`, `--format`) and collect normalized records.
|
|
329
|
+
3. Status gate: reject `superseded`/`rejected`/`deprecated`; warn on `proposed`; missing status defaults to `accepted`.
|
|
330
|
+
4. Empty-decisions fallback: if all parsed ADRs have zero `decisions[]`, emit `ADR ingest produced no locked decisions; fall back to discuss-phase for this phase.` and exit with `/gsd:discuss-phase {N}` guidance.
|
|
331
|
+
5. Generate CONTEXT.md using `<domain>`, `<decisions>`, `<canonical_refs>`, `<specifics>`, `<deferred>`, `<scope_fence>`, map `consequences_positive[]` to Success Criteria and `consequences_negative[]` to Risk Summary, and include `**Source:** ADR Ingest Express Path ({INGEST_PATH})`.
|
|
332
|
+
6. Commit with `gsd-sdk query commit "docs(${padded_phase}): generate context from ADR ingest" --files "${phase_dir}/${padded_phase}-CONTEXT.md"` and set `context_content`; continue to step 5.
|
|
333
|
+
|
|
334
|
+
**Effect:** This bypasses step 4 (Load CONTEXT.md) since CONTEXT.md was synthesized from ADR input.
|
|
335
|
+
|
|
336
|
+
## 4. Load CONTEXT.md
|
|
337
|
+
|
|
338
|
+
**Skip if:** PRD express path or ADR ingest express path was used (CONTEXT.md already created in step 3.5/3.6).
|
|
339
|
+
|
|
340
|
+
Check `context_path` from init JSON.
|
|
341
|
+
|
|
342
|
+
If `context_path` is not null, display: `Using phase context from: ${context_path}`
|
|
343
|
+
|
|
344
|
+
**If `context_path` is null (no CONTEXT.md exists):**
|
|
345
|
+
|
|
346
|
+
Read discuss mode for context gate label:
|
|
347
|
+
```bash
|
|
348
|
+
DISCUSS_MODE=$($GSD_SDK query config-get workflow.discuss_mode 2>/dev/null || echo "discuss")
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
If `TEXT_MODE` is true, present as a plain-text numbered list:
|
|
352
|
+
```
|
|
353
|
+
No CONTEXT.md found for Phase {X}. Plans will use research and requirements only — your design preferences won't be included.
|
|
354
|
+
|
|
355
|
+
1. Continue without context — Plan using research + requirements only
|
|
356
|
+
[If DISCUSS_MODE is "assumptions":]
|
|
357
|
+
2. Gather context (assumptions mode) — Analyze codebase and surface assumptions before planning
|
|
358
|
+
[If DISCUSS_MODE is "discuss" or unset:]
|
|
359
|
+
2. Run discuss-phase first — Capture design decisions before planning
|
|
360
|
+
|
|
361
|
+
Enter number:
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
Otherwise use AskUserQuestion:
|
|
365
|
+
- header: "No context"
|
|
366
|
+
- question: "No CONTEXT.md found for Phase {X}. Plans will use research and requirements only — your design preferences won't be included. Continue or capture context first?"
|
|
367
|
+
- options:
|
|
368
|
+
- "Continue without context" — Plan using research + requirements only
|
|
369
|
+
If `DISCUSS_MODE` is `"assumptions"`:
|
|
370
|
+
- "Gather context (assumptions mode)" — Analyze codebase and surface assumptions before planning
|
|
371
|
+
If `DISCUSS_MODE` is `"discuss"` (or unset):
|
|
372
|
+
- "Run discuss-phase first" — Capture design decisions before planning
|
|
373
|
+
|
|
374
|
+
If "Continue without context": Proceed to step 5.
|
|
375
|
+
If "Run discuss-phase first":
|
|
376
|
+
**IMPORTANT:** Do NOT invoke discuss-phase as a nested Skill/Task call — AskUserQuestion
|
|
377
|
+
does not work correctly in nested subcontexts (#1009). Instead, display the command
|
|
378
|
+
and exit so the user runs it as a top-level command:
|
|
379
|
+
```
|
|
380
|
+
Run this command first, then re-run /gsd:plan-phase {X} ${GSD_WS}:
|
|
381
|
+
|
|
382
|
+
/gsd:discuss-phase {X} ${GSD_WS}
|
|
383
|
+
```
|
|
384
|
+
**Exit the plan-phase workflow. Do not continue.**
|
|
385
|
+
|
|
386
|
+
## 4.5. Check AI-SPEC
|
|
387
|
+
|
|
388
|
+
**Skip if:** `ai_integration_phase_enabled` from config is false, or `--skip-ai-spec` flag provided.
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
AI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-AI-SPEC.md 2>/dev/null | head -1)
|
|
392
|
+
AI_PHASE_CFG=$($GSD_SDK query config-get workflow.ai_integration_phase 2>/dev/null || echo "true")
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**Skip if `AI_PHASE_CFG` is `false`.**
|
|
396
|
+
|
|
397
|
+
**If `AI_SPEC_FILE` is empty:** Check phase goal for AI keywords:
|
|
398
|
+
```bash
|
|
399
|
+
echo "${phase_goal}" | grep -qi "agent\|llm\|rag\|chatbot\|embedding\|langchain\|llamaindex\|crewai\|langgraph\|openai\|anthropic\|vector\|eval\|ai system"
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
**If AI keywords detected AND no AI-SPEC.md:**
|
|
403
|
+
```
|
|
404
|
+
◆ Note: This phase appears to involve AI system development.
|
|
405
|
+
Consider running /gsd:ai-integration-phase {N} before planning to:
|
|
406
|
+
- Select the right framework for your use case
|
|
407
|
+
- Research its docs and best practices
|
|
408
|
+
- Design an evaluation strategy
|
|
409
|
+
|
|
410
|
+
Continue planning without AI-SPEC? (non-blocking — /gsd:ai-integration-phase can be run after)
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
Use AskUserQuestion with options:
|
|
414
|
+
- "Continue — plan without AI-SPEC"
|
|
415
|
+
- "Stop — I'll run /gsd:ai-integration-phase {N} first"
|
|
416
|
+
|
|
417
|
+
If "Stop": Exit with `/gsd:ai-integration-phase {N}` reminder.
|
|
418
|
+
If "Continue": Proceed. (Non-blocking — planner will note AI-SPEC is absent.)
|
|
419
|
+
|
|
420
|
+
**If `AI_SPEC_FILE` is non-empty:** Extract framework for planner context:
|
|
421
|
+
```bash
|
|
422
|
+
FRAMEWORK_LINE=$(grep "Selected Framework:" "${AI_SPEC_FILE}" | head -1)
|
|
423
|
+
```
|
|
424
|
+
Pass `ai_spec_path` and `framework_line` to planner in step 7 so it can reference the AI design contract.
|
|
425
|
+
|
|
426
|
+
## 5. Handle Research
|
|
427
|
+
|
|
428
|
+
**Skip if:** `--gaps` flag or `--skip-research` flag or `--reviews` flag.
|
|
429
|
+
|
|
430
|
+
### 5.0. Research-Only Modifiers (`--view`, `--research`, prompt)
|
|
431
|
+
|
|
432
|
+
**Skip if:** `RESEARCH_ONLY` is `false`.
|
|
433
|
+
|
|
434
|
+
Three branches in research-only mode (`--research-phase <N>`):
|
|
435
|
+
|
|
436
|
+
1. **`--view`** (or user picks "View" in the prompt below): print `RESEARCH.md` to stdout, no spawn, exit. If `RESEARCH.md` is missing, error with: `--view requires an existing RESEARCH.md; drop --view to spawn the researcher.`
|
|
437
|
+
2. **`--research`** (force-refresh): re-spawn researcher unconditionally — fall through to "Spawn gsd-phase-researcher" below.
|
|
438
|
+
3. **Neither flag AND `has_research=true`:** emit `RESEARCH.md already exists for Phase ${PHASE}.` and prompt the user with three choices: `1. Update — re-spawn researcher and refresh RESEARCH.md`, `2. View — print existing RESEARCH.md and exit (no spawn)`, `3. Skip — exit without spawning or printing`. Map "Update" → fall through to spawn, "View" → set `VIEW_ONLY=true` and emit RESEARCH.md as in (1), "Skip" → exit cleanly. Mirrors the deleted `/gsd-research-phase` standalone's existing-artifact menu (#3042 parity).
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
if [[ "$VIEW_ONLY" == "true" ]]; then
|
|
442
|
+
[[ -f "$research_path" ]] || { echo "Error: --view requires an existing RESEARCH.md (Phase ${PHASE}). Drop --view to spawn the researcher."; exit 1; }
|
|
443
|
+
cat "$research_path"; exit 0
|
|
444
|
+
fi
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
### 5.1. Standard Research Decision
|
|
448
|
+
|
|
449
|
+
**Skip if** `RESEARCH_ONLY=true` (the research-only mode in 5.0 already determined the path: spawn or exit). Without this guard, an LLM following the workflow could fall through into "use existing, skip to step 6" → planner spawn, violating the research-only contract. **CR #3045 finding: this gate makes the early-exit unreachable from any non-research-only branch.**
|
|
450
|
+
|
|
451
|
+
**If `has_research` is true (from init) AND no `--research` flag:** Use existing, skip to step 6.
|
|
452
|
+
|
|
453
|
+
**If RESEARCH.md missing OR `--research` flag:**
|
|
454
|
+
|
|
455
|
+
**If no explicit flag (`--research` or `--skip-research`) and not `--auto`:**
|
|
456
|
+
Ask the user whether to research, with a contextual recommendation based on the phase:
|
|
457
|
+
|
|
458
|
+
If `TEXT_MODE` is true, present as a plain-text numbered list:
|
|
459
|
+
```
|
|
460
|
+
Research before planning Phase {X}: {phase_name}?
|
|
461
|
+
|
|
462
|
+
1. Research first (Recommended) — Investigate domain, patterns, and dependencies before planning. Best for new features, unfamiliar integrations, or architectural changes.
|
|
463
|
+
2. Skip research — Plan directly from context and requirements. Best for bug fixes, simple refactors, or well-understood tasks.
|
|
464
|
+
|
|
465
|
+
Enter number:
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
Otherwise use AskUserQuestion:
|
|
469
|
+
```
|
|
470
|
+
AskUserQuestion([
|
|
471
|
+
{
|
|
472
|
+
question: "Research before planning Phase {X}: {phase_name}?",
|
|
473
|
+
header: "Research",
|
|
474
|
+
multiSelect: false,
|
|
475
|
+
options: [
|
|
476
|
+
{ label: "Research first (Recommended)", description: "Investigate domain, patterns, and dependencies before planning. Best for new features, unfamiliar integrations, or architectural changes." },
|
|
477
|
+
{ label: "Skip research", description: "Plan directly from context and requirements. Best for bug fixes, simple refactors, or well-understood tasks." }
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
])
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
If user selects "Skip research": skip to step 6.
|
|
484
|
+
|
|
485
|
+
**If `--auto` and `research_enabled` is false:** Skip research silently (preserves automated behavior).
|
|
486
|
+
|
|
487
|
+
Display banner:
|
|
488
|
+
```
|
|
489
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
490
|
+
GSD ► RESEARCHING PHASE {X}
|
|
491
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
492
|
+
|
|
493
|
+
◆ Spawning researcher...
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### Spawn gsd-phase-researcher
|
|
497
|
+
|
|
498
|
+
```bash
|
|
499
|
+
PHASE_DESC=$($GSD_SDK query roadmap.get-phase "${PHASE}" --pick section)
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
Research prompt:
|
|
503
|
+
|
|
504
|
+
```markdown
|
|
505
|
+
<objective>
|
|
506
|
+
Research how to implement Phase {phase_number}: {phase_name}
|
|
507
|
+
Answer: "What do I need to know to PLAN this phase well?"
|
|
508
|
+
</objective>
|
|
509
|
+
|
|
510
|
+
<files_to_read>
|
|
511
|
+
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
|
|
512
|
+
- {requirements_path} (Project requirements)
|
|
513
|
+
- {state_path} (Project decisions and history)
|
|
514
|
+
</files_to_read>
|
|
515
|
+
|
|
516
|
+
${AGENT_SKILLS_RESEARCHER}
|
|
517
|
+
|
|
518
|
+
<additional_context>
|
|
519
|
+
**Phase description:** {phase_description}
|
|
520
|
+
**Phase requirement IDs (MUST address):** {phase_req_ids}
|
|
521
|
+
|
|
522
|
+
**Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines
|
|
523
|
+
**Project skills:** Check .claude/skills/ or .agents/skills/ directory (if either exists) — read SKILL.md files, research should account for project skill patterns
|
|
524
|
+
</additional_context>
|
|
525
|
+
|
|
526
|
+
<output>
|
|
527
|
+
Write to: {phase_dir}/{phase_num}-RESEARCH.md
|
|
528
|
+
</output>
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
```
|
|
532
|
+
Agent(
|
|
533
|
+
prompt=research_prompt,
|
|
534
|
+
subagent_type="gsd-phase-researcher",
|
|
535
|
+
model="{researcher_model}",
|
|
536
|
+
description="Research Phase {phase}"
|
|
537
|
+
)
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: 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.
|
|
541
|
+
|
|
542
|
+
### Handle Researcher Return
|
|
543
|
+
|
|
544
|
+
- **`## RESEARCH COMPLETE`:** Display confirmation, continue to step 6
|
|
545
|
+
- **`## RESEARCH BLOCKED`:** Display blocker, offer: 1) Provide context, 2) Skip research, 3) Abort
|
|
546
|
+
|
|
547
|
+
### Research-Only Early Exit (`--research-phase`)
|
|
548
|
+
|
|
549
|
+
**Skip if:** `RESEARCH_ONLY` is `false` (the default).
|
|
550
|
+
|
|
551
|
+
**If `RESEARCH_ONLY=true`:** the user invoked `/gsd:plan-phase --research-phase <N>` for research-only mode. Do **not** continue to Section 5.5+ (validation strategy, planner, plan-checker, verification, gaps, bounce, post-planning-gaps). Print the research-complete summary and exit cleanly:
|
|
552
|
+
|
|
553
|
+
```text
|
|
554
|
+
✓ Research-only mode complete (#3042)
|
|
555
|
+
|
|
556
|
+
Phase: ${PHASE}
|
|
557
|
+
RESEARCH.md: ${research_path}
|
|
558
|
+
|
|
559
|
+
Re-run /gsd:plan-phase ${PHASE} to plan the phase using this research,
|
|
560
|
+
or /gsd:plan-phase ${PHASE} --research to refresh research and plan.
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
This exits the workflow. The planner / plan-checker / verifier blocks below are skipped.
|
|
564
|
+
|
|
565
|
+
## 5.5. Create Validation Strategy
|
|
566
|
+
|
|
567
|
+
Skip if `nyquist_validation_enabled` is false OR `research_enabled` is false.
|
|
568
|
+
|
|
569
|
+
If `research_enabled` is false and `nyquist_validation_enabled` is true: warn "Nyquist validation enabled but research disabled — VALIDATION.md cannot be created without RESEARCH.md. Plans will lack validation requirements (Dimension 8)." Continue to step 6.
|
|
570
|
+
|
|
571
|
+
**But Nyquist is not applicable for this run** when all of the following are true:
|
|
572
|
+
- `research_enabled` is false
|
|
573
|
+
- `has_research` is false
|
|
574
|
+
- no `--research` flag was provided
|
|
575
|
+
|
|
576
|
+
In that case: **skip validation-strategy creation entirely**. Do **not** expect `RESEARCH.md` or `VALIDATION.md` for this run, and continue to Step 6.
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
grep -l "## Validation Architecture" "${PHASE_DIR}"/*-RESEARCH.md 2>/dev/null || true
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
**If found:**
|
|
583
|
+
1. Read template: `~/.claude/get-shit-done/templates/VALIDATION.md`
|
|
584
|
+
2. Write to `${PHASE_DIR}/${PADDED_PHASE}-VALIDATION.md` (use Write tool)
|
|
585
|
+
3. Fill frontmatter: `{N}` → phase number, `{phase-slug}` → slug, `{date}` → current date
|
|
586
|
+
4. Verify:
|
|
587
|
+
```bash
|
|
588
|
+
test -f "${PHASE_DIR}/${PADDED_PHASE}-VALIDATION.md" && echo "VALIDATION_CREATED=true" || echo "VALIDATION_CREATED=false"
|
|
589
|
+
```
|
|
590
|
+
5. If `VALIDATION_CREATED=false`: STOP — do not proceed to Step 6
|
|
591
|
+
6. If `commit_docs`: `commit "docs(phase-${PHASE}): add validation strategy"`
|
|
592
|
+
|
|
593
|
+
**If not found:** Warn and continue — plans may fail Dimension 8.
|
|
594
|
+
|
|
595
|
+
## 5.55. Security Threat Model Gate
|
|
596
|
+
|
|
597
|
+
> Skip if `workflow.security_enforcement` is explicitly `false`. Absent = enabled.
|
|
598
|
+
|
|
599
|
+
```bash
|
|
600
|
+
SECURITY_CFG=$($GSD_SDK query config-get workflow.security_enforcement --raw 2>/dev/null || echo "true")
|
|
601
|
+
SECURITY_ASVS=$($GSD_SDK query config-get workflow.security_asvs_level --raw 2>/dev/null || echo "1")
|
|
602
|
+
SECURITY_BLOCK=$($GSD_SDK query config-get workflow.security_block_on --raw 2>/dev/null || echo "high")
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
**If `SECURITY_CFG` is `false`:** Skip to step 5.6.
|
|
606
|
+
|
|
607
|
+
**If `SECURITY_CFG` is `true`:** Display banner:
|
|
608
|
+
|
|
609
|
+
```
|
|
610
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
611
|
+
GSD ► SECURITY THREAT MODEL REQUIRED (ASVS L{SECURITY_ASVS})
|
|
612
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
613
|
+
|
|
614
|
+
Each PLAN.md must include a <threat_model> block.
|
|
615
|
+
Block on: {SECURITY_BLOCK} severity threats.
|
|
616
|
+
Opt out: set security_enforcement: false in .planning/config.json
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
Continue to step 5.6. Security config is passed to the planner in step 8.
|
|
620
|
+
|
|
621
|
+
## 5.6. UI Design Contract Gate
|
|
622
|
+
|
|
623
|
+
> Skip if `workflow.ui_phase` is explicitly `false` AND `workflow.ui_safety_gate` is explicitly `false` in `.planning/config.json`. If keys are absent, treat as enabled.
|
|
624
|
+
|
|
625
|
+
```bash
|
|
626
|
+
UI_PHASE_CFG=$($GSD_SDK query config-get workflow.ui_phase 2>/dev/null || echo "true")
|
|
627
|
+
UI_GATE_CFG=$($GSD_SDK query config-get workflow.ui_safety_gate 2>/dev/null || echo "true")
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
**If both are `false`:** Skip to step 6.
|
|
631
|
+
|
|
632
|
+
Check if phase has frontend indicators:
|
|
633
|
+
|
|
634
|
+
```bash
|
|
635
|
+
PHASE_SECTION=$($GSD_SDK query roadmap.get-phase "${PHASE}" 2>/dev/null)
|
|
636
|
+
# Shell-free word-boundary gate (#3718): Node.js helper — no locale env-var dependency.
|
|
637
|
+
# Reads via stdin to avoid OS ARG_MAX limits on large phase text.
|
|
638
|
+
# Path anchored to repo root; falls back to CWD if git is unavailable
|
|
639
|
+
# Exit codes mirror grep: 0 = UI tokens found, 1 = not found.
|
|
640
|
+
GSD_REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
|
|
641
|
+
printf '%s' "$PHASE_SECTION" | node "${GSD_REPO_ROOT}/bin/lib/ui-safety-gate.cjs" > /dev/null 2>&1
|
|
642
|
+
HAS_UI=$?
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
**If `HAS_UI` is 0 (frontend indicators found):**
|
|
646
|
+
|
|
647
|
+
Check for existing UI-SPEC:
|
|
648
|
+
```bash
|
|
649
|
+
UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
**If UI-SPEC.md found:** Set `UI_SPEC_PATH=$UI_SPEC_FILE`. Display: `Using UI design contract: ${UI_SPEC_PATH}`
|
|
653
|
+
|
|
654
|
+
**If UI-SPEC.md missing AND `--skip-ui` flag is present in $ARGUMENTS:** Skip silently to step 6.
|
|
655
|
+
|
|
656
|
+
**If UI-SPEC.md missing AND `UI_GATE_CFG` is `true`:**
|
|
657
|
+
|
|
658
|
+
Read ephemeral chain flag (same field as `check.auto-mode` → `auto_chain_active`):
|
|
659
|
+
```bash
|
|
660
|
+
AUTO_CHAIN=$($GSD_SDK query check auto-mode --pick auto_chain_active 2>/dev/null || echo "false")
|
|
661
|
+
```
|
|
662
|
+
|
|
663
|
+
**If `AUTO_CHAIN` is `true` (running inside a `--chain` or `--auto` pipeline):**
|
|
664
|
+
|
|
665
|
+
Auto-generate UI-SPEC without prompting:
|
|
666
|
+
```
|
|
667
|
+
Skill(skill="gsd-ui-phase", args="${PHASE} --auto ${GSD_WS}")
|
|
668
|
+
```
|
|
669
|
+
After `gsd-ui-phase` returns, re-read:
|
|
670
|
+
```bash
|
|
671
|
+
UI_SPEC_FILE=$(ls "${PHASE_DIR}"/*-UI-SPEC.md 2>/dev/null | head -1)
|
|
672
|
+
UI_SPEC_PATH="${UI_SPEC_FILE}"
|
|
673
|
+
```
|
|
674
|
+
Continue to step 6.
|
|
675
|
+
|
|
676
|
+
**If `AUTO_CHAIN` is `false` (manual invocation):**
|
|
677
|
+
|
|
678
|
+
Output this markdown directly (not as a code block):
|
|
679
|
+
|
|
680
|
+
```
|
|
681
|
+
## ⚠ UI-SPEC.md missing for Phase {N}
|
|
682
|
+
▶ Recommended next step:
|
|
683
|
+
`/gsd:ui-phase {N} ${GSD_WS}` — generate UI design contract before planning
|
|
684
|
+
───────────────────────────────────────────────
|
|
685
|
+
Also available:
|
|
686
|
+
- `/gsd:plan-phase {N} --skip-ui ${GSD_WS}` — plan without UI-SPEC (not recommended for frontend phases)
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
**Exit the plan-phase workflow. Do not continue.**
|
|
690
|
+
|
|
691
|
+
**If `HAS_UI` is 1 (no frontend indicators):** Skip silently to step 5.7.
|
|
692
|
+
|
|
693
|
+
## 5.7. Schema Push Detection Gate
|
|
694
|
+
|
|
695
|
+
> Detects schema-relevant files in the phase scope and injects a mandatory `[BLOCKING]` schema push task into the plan. Prevents false-positive verification where build/types pass because TypeScript types come from config, not the live database.
|
|
696
|
+
|
|
697
|
+
Check if any files in the phase scope match schema patterns:
|
|
698
|
+
|
|
699
|
+
```bash
|
|
700
|
+
PHASE_SECTION=$($GSD_SDK query roadmap.get-phase "${PHASE}" --pick section 2>/dev/null)
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
Scan `PHASE_SECTION`, `CONTEXT.md` (if loaded), and `RESEARCH.md` (if exists) for file paths matching these ORM patterns:
|
|
704
|
+
|
|
705
|
+
| ORM | File Patterns |
|
|
706
|
+
|-----|--------------|
|
|
707
|
+
| Payload CMS | `src/collections/**/*.ts`, `src/globals/**/*.ts` |
|
|
708
|
+
| Prisma | `prisma/schema.prisma`, `prisma/schema/*.prisma` |
|
|
709
|
+
| Drizzle | `drizzle/schema.ts`, `src/db/schema.ts`, `drizzle/*.ts` |
|
|
710
|
+
| Supabase | `supabase/migrations/*.sql` |
|
|
711
|
+
| TypeORM | `src/entities/**/*.ts`, `src/migrations/**/*.ts` |
|
|
712
|
+
|
|
713
|
+
Also check if any existing PLAN.md files for this phase already reference these file patterns in `files_modified`.
|
|
714
|
+
|
|
715
|
+
**If schema-relevant files detected:**
|
|
716
|
+
|
|
717
|
+
Set `SCHEMA_PUSH_REQUIRED=true` and `SCHEMA_ORM={detected_orm}`.
|
|
718
|
+
|
|
719
|
+
Determine the push command for the detected ORM:
|
|
720
|
+
|
|
721
|
+
| ORM | Push Command | Non-TTY Workaround |
|
|
722
|
+
|-----|-------------|-------------------|
|
|
723
|
+
| Payload CMS | `npx payload migrate` | `CI=true PAYLOAD_MIGRATING=true npx payload migrate` |
|
|
724
|
+
| Prisma | `npx prisma db push` | `npx prisma db push --accept-data-loss` (if destructive) |
|
|
725
|
+
| Drizzle | `npx drizzle-kit push` | `npx drizzle-kit push` |
|
|
726
|
+
| Supabase | `supabase db push` | Set `SUPABASE_ACCESS_TOKEN` env var |
|
|
727
|
+
| TypeORM | `npx typeorm migration:run` | `npx typeorm migration:run -d src/data-source.ts` |
|
|
728
|
+
|
|
729
|
+
Inject the following into the planner prompt (step 8) as an additional constraint:
|
|
730
|
+
|
|
731
|
+
```markdown
|
|
732
|
+
<schema_push_requirement>
|
|
733
|
+
**[BLOCKING] Schema Push Required**
|
|
734
|
+
|
|
735
|
+
This phase modifies schema-relevant files ({detected_files}). The planner MUST include
|
|
736
|
+
a `[BLOCKING]` task that runs the database schema push command AFTER all schema file
|
|
737
|
+
modifications are complete but BEFORE verification.
|
|
738
|
+
|
|
739
|
+
- ORM detected: {SCHEMA_ORM}
|
|
740
|
+
- Push command: {push_command}
|
|
741
|
+
- Non-TTY workaround: {env_hint}
|
|
742
|
+
- If push requires interactive prompts that cannot be suppressed, flag the task for
|
|
743
|
+
manual intervention with `autonomous: false`
|
|
744
|
+
|
|
745
|
+
This task is mandatory — the phase CANNOT pass verification without it. Build and
|
|
746
|
+
type checks will pass without the push (types come from config, not the live database),
|
|
747
|
+
creating a false-positive verification state.
|
|
748
|
+
</schema_push_requirement>
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
Display: `Schema files detected ({SCHEMA_ORM}) — [BLOCKING] push task will be injected into plans`
|
|
752
|
+
|
|
753
|
+
**If no schema-relevant files detected:** Skip silently to step 6.
|
|
754
|
+
|
|
755
|
+
## 6. Check Existing Plans
|
|
756
|
+
|
|
757
|
+
```bash
|
|
758
|
+
ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null || true
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
**If exists AND `--reviews` flag:** Skip prompt — go straight to replanning (the purpose of `--reviews` is to replan with review feedback).
|
|
762
|
+
|
|
763
|
+
**If exists AND no `--reviews` flag:** Offer: 1) Add more plans, 2) View existing, 3) Replan from scratch.
|
|
764
|
+
|
|
765
|
+
## 7. Use Context Paths from INIT
|
|
766
|
+
|
|
767
|
+
Extract from INIT JSON:
|
|
768
|
+
|
|
769
|
+
```bash
|
|
770
|
+
_gsd_field() { node -e "const o=JSON.parse(process.argv[1]); const v=o[process.argv[2]]; process.stdout.write(v==null?'':String(v))" "$1" "$2"; }
|
|
771
|
+
STATE_PATH=$(_gsd_field "$INIT" state_path)
|
|
772
|
+
ROADMAP_PATH=$(_gsd_field "$INIT" roadmap_path)
|
|
773
|
+
REQUIREMENTS_PATH=$(_gsd_field "$INIT" requirements_path)
|
|
774
|
+
RESEARCH_PATH=$(_gsd_field "$INIT" research_path)
|
|
775
|
+
VERIFICATION_PATH=$(_gsd_field "$INIT" verification_path)
|
|
776
|
+
UAT_PATH=$(_gsd_field "$INIT" uat_path)
|
|
777
|
+
CONTEXT_PATH=$(_gsd_field "$INIT" context_path)
|
|
778
|
+
REVIEWS_PATH=$(_gsd_field "$INIT" reviews_path)
|
|
779
|
+
PATTERNS_PATH=$(_gsd_field "$INIT" patterns_path)
|
|
780
|
+
|
|
781
|
+
# Detect spike/sketch findings skills (project-local)
|
|
782
|
+
SPIKE_FINDINGS_PATH=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1 || true)
|
|
783
|
+
SKETCH_FINDINGS_PATH=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1 || true)
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
## 7.5. Verify Nyquist Artifacts
|
|
787
|
+
|
|
788
|
+
Skip if `nyquist_validation_enabled` is false OR `research_enabled` is false.
|
|
789
|
+
|
|
790
|
+
Also skip if all of the following are true:
|
|
791
|
+
- `research_enabled` is false
|
|
792
|
+
- `has_research` is false
|
|
793
|
+
- no `--research` flag was provided
|
|
794
|
+
|
|
795
|
+
In that no-research path, Nyquist artifacts are **not required** for this run.
|
|
796
|
+
|
|
797
|
+
```bash
|
|
798
|
+
VALIDATION_EXISTS=$(ls "${PHASE_DIR}"/*-VALIDATION.md 2>/dev/null | head -1)
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
If missing and Nyquist is still enabled/applicable — ask user:
|
|
802
|
+
1. Re-run: `/gsd:plan-phase {PHASE} --research ${GSD_WS}`
|
|
803
|
+
2. Disable Nyquist with the exact command:
|
|
804
|
+
`gsd-sdk query config-set workflow.nyquist_validation false`
|
|
805
|
+
3. Continue anyway (plans fail Dimension 8)
|
|
806
|
+
|
|
807
|
+
Proceed to Step 7.8 (or Step 8 if pattern mapper is disabled) only if user selects 2 or 3.
|
|
808
|
+
|
|
809
|
+
## 7.8. Spawn gsd-pattern-mapper Agent (Optional)
|
|
810
|
+
|
|
811
|
+
**Skip if** `workflow.pattern_mapper` is explicitly set to `false` in config.json (absent key = enabled). Also skip if no CONTEXT.md and no RESEARCH.md exist for this phase (nothing to extract file lists from).
|
|
812
|
+
|
|
813
|
+
Check config:
|
|
814
|
+
```bash
|
|
815
|
+
PATTERN_MAPPER_CFG=$($GSD_SDK query config-get workflow.pattern_mapper 2>/dev/null || echo "true")
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
**If `PATTERN_MAPPER_CFG` is `false`:** Skip to step 8.
|
|
819
|
+
|
|
820
|
+
**If PATTERNS.md already exists** (`PATTERNS_PATH` is non-empty from step 7): Skip to step 8 (use existing).
|
|
821
|
+
|
|
822
|
+
Display banner:
|
|
823
|
+
```
|
|
824
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
825
|
+
GSD ► PATTERN MAPPING PHASE {X}
|
|
826
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
827
|
+
|
|
828
|
+
◆ Spawning pattern mapper...
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
Pattern mapper prompt:
|
|
832
|
+
|
|
833
|
+
```markdown
|
|
834
|
+
<pattern_mapping_context>
|
|
835
|
+
**Phase:** {phase_number} - {phase_name}
|
|
836
|
+
**Phase directory:** {phase_dir}
|
|
837
|
+
**Padded phase:** {padded_phase}
|
|
838
|
+
|
|
839
|
+
<files_to_read>
|
|
840
|
+
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
|
|
841
|
+
- {research_path} (Technical Research)
|
|
842
|
+
</files_to_read>
|
|
843
|
+
|
|
844
|
+
**Output file:** {phase_dir}/{padded_phase}-PATTERNS.md
|
|
845
|
+
|
|
846
|
+
Extract the list of files to be created/modified from CONTEXT.md and RESEARCH.md. For each file, classify by role and data flow, find the closest existing analog in the codebase, extract concrete code excerpts, and produce PATTERNS.md.
|
|
847
|
+
</pattern_mapping_context>
|
|
848
|
+
```
|
|
849
|
+
|
|
850
|
+
Spawn with:
|
|
851
|
+
```
|
|
852
|
+
Agent(
|
|
853
|
+
prompt="{above}",
|
|
854
|
+
subagent_type="gsd-pattern-mapper",
|
|
855
|
+
model="{researcher_model}",
|
|
856
|
+
)
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: 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.
|
|
860
|
+
|
|
861
|
+
**Handle return:**
|
|
862
|
+
- **`## PATTERN MAPPING COMPLETE`:** Update `PATTERNS_PATH` to the created file path, continue to step 8.
|
|
863
|
+
- **Any error or empty return:** Log warning, continue to step 8 without patterns (non-blocking).
|
|
864
|
+
|
|
865
|
+
After pattern mapper completes, update the path variable:
|
|
866
|
+
```bash
|
|
867
|
+
PATTERNS_PATH="${PHASE_DIR}/${PADDED_PHASE}-PATTERNS.md"
|
|
868
|
+
```
|
|
869
|
+
|
|
870
|
+
## 8. Spawn gsd-planner Agent
|
|
871
|
+
|
|
872
|
+
Display banner:
|
|
873
|
+
```
|
|
874
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
875
|
+
GSD ► PLANNING PHASE {X}
|
|
876
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
877
|
+
|
|
878
|
+
◆ Spawning planner...
|
|
879
|
+
```
|
|
880
|
+
|
|
881
|
+
Planner prompt:
|
|
882
|
+
|
|
883
|
+
```markdown
|
|
884
|
+
<planning_context>
|
|
885
|
+
**Phase:** {phase_number}
|
|
886
|
+
**Mode:** {standard | gap_closure | reviews}
|
|
887
|
+
|
|
888
|
+
<files_to_read>
|
|
889
|
+
- {state_path} (Project State)
|
|
890
|
+
- {roadmap_path} (Roadmap)
|
|
891
|
+
- {requirements_path} (Requirements)
|
|
892
|
+
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
|
|
893
|
+
- {research_path} (Technical Research)
|
|
894
|
+
- {PATTERNS_PATH} (Pattern Map — analog files and code excerpts, if exists)
|
|
895
|
+
- {verification_path} (Verification Gaps - if --gaps)
|
|
896
|
+
- {uat_path} (UAT Gaps - if --gaps)
|
|
897
|
+
- {reviews_path} (Cross-AI Review Feedback - if --reviews)
|
|
898
|
+
- {UI_SPEC_PATH} (UI Design Contract — visual/interaction specs, if exists)
|
|
899
|
+
- {SPIKE_FINDINGS_PATH} (Spike Findings — validated patterns, constraints, landmines from experiments, if exists)
|
|
900
|
+
- {SKETCH_FINDINGS_PATH} (Sketch Findings — validated design decisions, CSS patterns, visual direction, if exists)
|
|
901
|
+
${CONTEXT_WINDOW >= 500000 ? `
|
|
902
|
+
**Cross-phase context (1M model enrichment):**
|
|
903
|
+
- CONTEXT.md files from the 3 most recent completed phases (locked decisions — maintain consistency)
|
|
904
|
+
- SUMMARY.md files from the 3 most recent completed phases (what was built — reuse patterns, avoid duplication)
|
|
905
|
+
- LEARNINGS.md files from the 3 most recent completed phases (structured decisions, patterns, lessons, surprises — skip silently if a phase has no LEARNINGS.md; prefix each block with \`[from Phase N LEARNINGS]\` for source attribution; if total size exceeds 15% of context budget, drop oldest first)
|
|
906
|
+
- CONTEXT.md, SUMMARY.md, and LEARNINGS.md from any phases listed in the current phase's "Depends on:" field in ROADMAP.md (regardless of recency — explicit dependencies always load, deduplicated against the 3 most recent)
|
|
907
|
+
- Skip all other prior phases to stay within context budget
|
|
908
|
+
` : ''}
|
|
909
|
+
</files_to_read>
|
|
910
|
+
|
|
911
|
+
${AGENT_SKILLS_PLANNER}
|
|
912
|
+
|
|
913
|
+
**Phase requirement IDs (every ID MUST appear in a plan's `requirements` field):** {phase_req_ids}
|
|
914
|
+
|
|
915
|
+
**Project instructions:** Read ./CLAUDE.md if exists — follow project-specific guidelines
|
|
916
|
+
**Project skills:** Check .claude/skills/ or .agents/skills/ directory (if either exists) — read SKILL.md files, plans should account for project skill rules
|
|
917
|
+
|
|
918
|
+
${TDD_MODE === 'true' ? `
|
|
919
|
+
<tdd_mode_active>
|
|
920
|
+
**TDD Mode is ENABLED.** Apply TDD heuristics from @~/.claude/get-shit-done/references/tdd.md to all eligible tasks:
|
|
921
|
+
- Business logic with defined I/O → type: tdd
|
|
922
|
+
- API endpoints with request/response contracts → type: tdd
|
|
923
|
+
- Data transformations, validation, algorithms → type: tdd
|
|
924
|
+
- UI, config, glue code, CRUD → standard plan (type: execute)
|
|
925
|
+
Each TDD plan gets one feature with RED/GREEN/REFACTOR gate sequence.
|
|
926
|
+
</tdd_mode_active>
|
|
927
|
+
` : ''}
|
|
928
|
+
|
|
929
|
+
**MVP_MODE:** ${MVP_MODE} (when true, follow vertical-slice rules from `@~/.claude/get-shit-done/references/planner-mvp-mode.md`; when false, ignore MVP guidance entirely.)
|
|
930
|
+
**WALKING_SKELETON:** ${WALKING_SKELETON} (when true, the first deliverable must be a Walking Skeleton — produce SKELETON.md alongside PLAN.md.)
|
|
931
|
+
|
|
932
|
+
${MVP_MODE === 'true' ? `
|
|
933
|
+
<mvp_mode_active>
|
|
934
|
+
**MVP Mode is ENABLED.** Follow vertical-slice planning rules from @~/.claude/get-shit-done/references/planner-mvp-mode.md. Each plan must deliver a complete vertical slice — thin end-to-end functionality rather than horizontal layers.
|
|
935
|
+
</mvp_mode_active>
|
|
936
|
+
` : ''}
|
|
937
|
+
</planning_context>
|
|
938
|
+
|
|
939
|
+
<downstream_consumer>
|
|
940
|
+
Output consumed by /gsd:execute-phase. Plans need:
|
|
941
|
+
- Frontmatter (wave, depends_on, files_modified, autonomous)
|
|
942
|
+
- Tasks in XML format with read_first and acceptance_criteria fields (MANDATORY on every task)
|
|
943
|
+
- Verification criteria
|
|
944
|
+
- must_haves for goal-backward verification
|
|
945
|
+
</downstream_consumer>
|
|
946
|
+
|
|
947
|
+
<deep_work_rules>
|
|
948
|
+
## Anti-Shallow Execution Rules (MANDATORY)
|
|
949
|
+
|
|
950
|
+
Every task MUST include these fields — they are NOT optional:
|
|
951
|
+
|
|
952
|
+
1. **`<read_first>`** — Files the executor MUST read before touching anything. Always include:
|
|
953
|
+
- The file being modified (so executor sees current state, not assumptions)
|
|
954
|
+
- Any "source of truth" file referenced in CONTEXT.md (reference implementations, existing patterns, config files, schemas)
|
|
955
|
+
- Any file whose patterns, signatures, types, or conventions must be replicated or respected
|
|
956
|
+
|
|
957
|
+
2. **`<acceptance_criteria>`** — Verifiable conditions that prove the task was done correctly. Rules:
|
|
958
|
+
- Every criterion must be checkable as a source assertion, behavior assertion, test command, or CLI output
|
|
959
|
+
- NEVER use subjective language ("looks correct", "properly configured", "consistent with")
|
|
960
|
+
- Include exact strings, patterns, values, command outputs, or observable behavior where that is the right proof
|
|
961
|
+
- Examples:
|
|
962
|
+
- Code: `auth.py contains def verify_token(` / `test_auth.py exits 0`
|
|
963
|
+
- Behavior: `POST /api/auth/login returns 200 + httpOnly JWT cookie for valid credentials`
|
|
964
|
+
- Config: `.env.example contains DATABASE_URL=` / `Dockerfile contains HEALTHCHECK`
|
|
965
|
+
- Docs: `README.md contains '## Installation'` / `API.md lists all endpoints`
|
|
966
|
+
- Infra: `deploy.yml has rollback step` / `docker-compose.yml has healthcheck for db`
|
|
967
|
+
|
|
968
|
+
3. **`<action>`** — Must include CONCRETE values, not references. Rules:
|
|
969
|
+
- NEVER say "align X with Y", "match X to Y", "update to be consistent" without specifying the exact target state
|
|
970
|
+
- Include concrete identifiers and reference values: config keys, function signatures, SQL table names, class names, import paths, env vars, endpoint paths, etc.
|
|
971
|
+
- If CONTEXT.md has a comparison table or expected values, copy only the target identifiers/values needed to remove ambiguity
|
|
972
|
+
- Do not include full file contents, fenced code blocks, or complete implementations in `<action>`
|
|
973
|
+
- The executor should understand the intended target state from `<action>` and use `<read_first>` files for current implementation details, patterns, and source-of-truth context
|
|
974
|
+
|
|
975
|
+
**Why this matters:** Executor agents work from the plan text. Vague instructions like "update the config to match production" produce shallow one-line changes. Concrete instructions like "add DATABASE_URL, set POOL_SIZE=20, add REDIS_URL, and read config/runtime.ts before editing" produce complete work without turning the planner into the executor.
|
|
976
|
+
</deep_work_rules>
|
|
977
|
+
|
|
978
|
+
<quality_gate>
|
|
979
|
+
- [ ] PLAN.md files created in phase directory
|
|
980
|
+
- [ ] Each plan has valid frontmatter
|
|
981
|
+
- [ ] Tasks are specific and actionable
|
|
982
|
+
- [ ] Every task has `<read_first>` with at least the file being modified
|
|
983
|
+
- [ ] Every task has `<acceptance_criteria>` with behavior, test-command, CLI, or source assertions
|
|
984
|
+
- [ ] Every `<action>` contains concrete identifiers without fenced code blocks or full implementations
|
|
985
|
+
- [ ] Dependencies correctly identified
|
|
986
|
+
- [ ] Waves assigned for parallel execution
|
|
987
|
+
- [ ] must_haves derived from phase goal
|
|
988
|
+
</quality_gate>
|
|
989
|
+
```
|
|
990
|
+
|
|
991
|
+
**If `CHUNKED_MODE` is `false` (default):** Spawn the planner as a single long-lived Agent:
|
|
992
|
+
|
|
993
|
+
```text
|
|
994
|
+
Agent(
|
|
995
|
+
prompt=filled_prompt,
|
|
996
|
+
subagent_type="gsd-planner",
|
|
997
|
+
model="{planner_model}",
|
|
998
|
+
description="Plan Phase {phase}"
|
|
999
|
+
)
|
|
1000
|
+
```
|
|
1001
|
+
|
|
1002
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: 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.
|
|
1003
|
+
|
|
1004
|
+
**If `CHUNKED_MODE` is `true`:** Skip the Agent() call above — proceed to step 8.5 instead.
|
|
1005
|
+
|
|
1006
|
+
## 8.5. Chunked Planning Mode
|
|
1007
|
+
|
|
1008
|
+
**Skip if `CHUNKED_MODE` is `false`.**
|
|
1009
|
+
|
|
1010
|
+
Chunked mode splits the single long-lived planner Agent run into a short outline Agent run followed by
|
|
1011
|
+
N short per-plan Agent runs. Each run is bounded to ~3–5 min; each plan is committed individually
|
|
1012
|
+
for crash resilience. If any run hangs and the terminal is force-killed, rerunning
|
|
1013
|
+
`/gsd:plan-phase {N} --chunked` resumes from the last successfully committed plan.
|
|
1014
|
+
|
|
1015
|
+
**Intended for new or in-progress chunked runs.** To recover plans already written by a prior
|
|
1016
|
+
*non-chunked* run, use step 6's "Add more plans" or proceed directly to `/gsd:execute-phase`
|
|
1017
|
+
— don't start a fresh chunked run over existing non-chunked plans.
|
|
1018
|
+
|
|
1019
|
+
### 8.5.1 Outline Phase (outline-only mode, ~2 min)
|
|
1020
|
+
|
|
1021
|
+
**Resume detection:** If `${PHASE_DIR}/${PADDED_PHASE}-PLAN-OUTLINE.md` already exists **and
|
|
1022
|
+
is valid** (contains the `## OUTLINE COMPLETE` marker), skip this sub-step — the outline
|
|
1023
|
+
already exists from a previous run. Proceed directly to 8.5.2.
|
|
1024
|
+
|
|
1025
|
+
```bash
|
|
1026
|
+
OUTLINE_FILE="${PHASE_DIR}/${PADDED_PHASE}-PLAN-OUTLINE.md"
|
|
1027
|
+
if [[ -f "$OUTLINE_FILE" ]] && grep -q "^## OUTLINE COMPLETE" "$OUTLINE_FILE"; then
|
|
1028
|
+
# reuse existing outline — skip to 8.5.2
|
|
1029
|
+
fi
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
Display:
|
|
1033
|
+
```text
|
|
1034
|
+
◆ Chunked mode: spawning outline planner...
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
Spawn the planner in **outline-only** mode — it must write only the outline manifest, not any
|
|
1038
|
+
PLAN.md files:
|
|
1039
|
+
|
|
1040
|
+
```javascript
|
|
1041
|
+
Agent(
|
|
1042
|
+
prompt="{same planning_context as step 8, plus:}
|
|
1043
|
+
|
|
1044
|
+
**Chunked mode: outline-only.**
|
|
1045
|
+
Do NOT write any PLAN.md files in this Task.
|
|
1046
|
+
Write only: {PHASE_DIR}/{PADDED_PHASE}-PLAN-OUTLINE.md
|
|
1047
|
+
|
|
1048
|
+
The outline must be a markdown table with columns:
|
|
1049
|
+
Plan ID | Objective | Wave | Depends On | Requirements
|
|
1050
|
+
|
|
1051
|
+
Return: ## OUTLINE COMPLETE with plan count.",
|
|
1052
|
+
subagent_type="gsd-planner",
|
|
1053
|
+
model="{planner_model}",
|
|
1054
|
+
description="Outline Phase {phase} (chunked)"
|
|
1055
|
+
)
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: 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.
|
|
1059
|
+
|
|
1060
|
+
Handle return:
|
|
1061
|
+
- **`## OUTLINE COMPLETE`:** Read `PLAN-OUTLINE.md`, extract plan list. Continue to 8.5.2.
|
|
1062
|
+
- **Any other return or empty:** Display error. Offer: 1) Retry outline, 2) Stop.
|
|
1063
|
+
|
|
1064
|
+
### 8.5.2 Per-Plan Tasks (single-plan mode, ~3-5 min each)
|
|
1065
|
+
|
|
1066
|
+
For each plan entry extracted from `PLAN-OUTLINE.md`:
|
|
1067
|
+
|
|
1068
|
+
1. **Resume check:** If `${PHASE_DIR}/{plan_id}-PLAN.md` already exists on disk **and has
|
|
1069
|
+
valid YAML frontmatter** (opening `---` delimiter present), skip this plan (do not
|
|
1070
|
+
overwrite completed work — resume safety).
|
|
1071
|
+
|
|
1072
|
+
```bash
|
|
1073
|
+
PLAN_FILE="${PHASE_DIR}/${plan_id}-PLAN.md"
|
|
1074
|
+
if [[ -f "$PLAN_FILE" ]] && head -1 "$PLAN_FILE" | grep -q '^---'; then
|
|
1075
|
+
continue # plan already written, skip
|
|
1076
|
+
fi
|
|
1077
|
+
```
|
|
1078
|
+
|
|
1079
|
+
2. Display:
|
|
1080
|
+
```text
|
|
1081
|
+
◆ Chunked mode: planning {plan_id} ({k}/{N})...
|
|
1082
|
+
```
|
|
1083
|
+
|
|
1084
|
+
3. Spawn the planner in **single-plan** mode — it must write exactly one PLAN.md file:
|
|
1085
|
+
```javascript
|
|
1086
|
+
Agent(
|
|
1087
|
+
prompt="{same planning_context as step 8, plus:}
|
|
1088
|
+
|
|
1089
|
+
**Chunked mode: single-plan.**
|
|
1090
|
+
Write exactly ONE plan file: {PHASE_DIR}/{plan_id}-PLAN.md
|
|
1091
|
+
Plan to write: {plan_id} — {objective}
|
|
1092
|
+
Wave: {wave} | Depends on: {depends_on}
|
|
1093
|
+
Phase requirement IDs to cover in this plan: {plan_requirements}
|
|
1094
|
+
|
|
1095
|
+
Return: ## PLAN COMPLETE with the plan ID.",
|
|
1096
|
+
subagent_type="gsd-planner",
|
|
1097
|
+
model="{planner_model}",
|
|
1098
|
+
description="Plan {plan_id} (chunked {k}/{N})"
|
|
1099
|
+
)
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: 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.
|
|
1103
|
+
|
|
1104
|
+
4. **Verify disk:** Check `${PHASE_DIR}/{plan_id}-PLAN.md` exists. If missing: offer 1) Retry, 2) Stop.
|
|
1105
|
+
|
|
1106
|
+
5. **Commit per-plan:**
|
|
1107
|
+
```bash
|
|
1108
|
+
$GSD_SDK query commit "docs(${PADDED_PHASE}): plan ${plan_id} (chunked)" --files "${PHASE_DIR}/${plan_id}-PLAN.md"
|
|
1109
|
+
```
|
|
1110
|
+
|
|
1111
|
+
After all N plans are written and committed, treat this as `## PLANNING COMPLETE` and continue
|
|
1112
|
+
to step 9.
|
|
1113
|
+
|
|
1114
|
+
## 9. Handle Planner Return
|
|
1115
|
+
|
|
1116
|
+
- **`## PLANNING COMPLETE`:** Display plan count. If `--skip-verify` or `plan_checker_enabled` is false (from init): skip to step 13. Otherwise: step 10.
|
|
1117
|
+
- **`## PHASE SPLIT RECOMMENDED`:** The planner determined the phase exceeds the context budget for full-fidelity implementation of all source items. Handle in step 9b.
|
|
1118
|
+
- **`## ⚠ Source Audit: Unplanned Items Found`:** The planner's multi-source coverage audit found items from REQUIREMENTS.md, RESEARCH.md, ROADMAP goal, or CONTEXT.md decisions that are not covered by any plan. Handle in step 9c.
|
|
1119
|
+
- **`## CHECKPOINT REACHED`:** Present to user, get response, spawn continuation (step 12)
|
|
1120
|
+
- **`## PLANNING INCONCLUSIVE`:** Show attempts, offer: Add context / Retry / Manual
|
|
1121
|
+
- **Empty / truncated / no recognized marker:** → Filesystem fallback (step 9a).
|
|
1122
|
+
|
|
1123
|
+
## 9a. Filesystem Fallback (Planner)
|
|
1124
|
+
|
|
1125
|
+
**Triggered when:** Agent() returns but the return contains no recognized marker (`## PLANNING COMPLETE`, `## PHASE SPLIT RECOMMENDED`, `## ⚠ Source Audit`, `## CHECKPOINT REACHED`, `## PLANNING INCONCLUSIVE`).
|
|
1126
|
+
|
|
1127
|
+
```bash
|
|
1128
|
+
DISK_PLANS=$(ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null | wc -l | tr -d ' ')
|
|
1129
|
+
```
|
|
1130
|
+
|
|
1131
|
+
**If `DISK_PLANS` > 0:** The planner wrote plans to disk but the Agent() return was empty or
|
|
1132
|
+
truncated (the Windows stdio hang pattern — the subagent finished but the return never
|
|
1133
|
+
arrived). Display:
|
|
1134
|
+
|
|
1135
|
+
```text
|
|
1136
|
+
◆ Planner wrote {DISK_PLANS} plan(s) to disk but did not emit a PLANNING COMPLETE marker.
|
|
1137
|
+
This is a known Windows stdio hang pattern — work is likely recoverable.
|
|
1138
|
+
|
|
1139
|
+
Plans found on disk:
|
|
1140
|
+
{ls output of *-PLAN.md}
|
|
1141
|
+
```
|
|
1142
|
+
|
|
1143
|
+
Offer 3 options:
|
|
1144
|
+
1. **Accept plans** — treat as `## PLANNING COMPLETE` and continue through step 9 `## PLANNING COMPLETE` handling (so `--skip-verify` / `plan_checker_enabled=false` are honored — may skip to step 13 rather than step 10)
|
|
1145
|
+
2. **Retry planner** — re-spawn the planner with the same prompt (return to step 8)
|
|
1146
|
+
3. **Stop** — exit; user can re-run `/gsd:plan-phase {N}` to resume
|
|
1147
|
+
|
|
1148
|
+
**If `DISK_PLANS` is 0 and no marker:** The planner produced no output. Treat as
|
|
1149
|
+
`## PLANNING INCONCLUSIVE` and handle accordingly.
|
|
1150
|
+
|
|
1151
|
+
## 9b. Handle Phase Split Recommendation
|
|
1152
|
+
|
|
1153
|
+
When the planner returns `## PHASE SPLIT RECOMMENDED`, it means the phase's source items exceed the context budget for full-fidelity implementation. The planner proposes groupings.
|
|
1154
|
+
|
|
1155
|
+
**Extract from planner return:**
|
|
1156
|
+
- Proposed sub-phases (e.g., "17a: processing core (D-01 to D-19)", "17b: billing + config UX (D-20 to D-27)")
|
|
1157
|
+
- Which source items (REQ-IDs, D-XX decisions, RESEARCH items) go in each sub-phase
|
|
1158
|
+
- Why the split is necessary (context cost estimate, file count)
|
|
1159
|
+
|
|
1160
|
+
**Present to user:**
|
|
1161
|
+
```
|
|
1162
|
+
## Phase {X} exceeds context budget for full-fidelity implementation
|
|
1163
|
+
|
|
1164
|
+
The planner found {N} source items that exceed the context budget when
|
|
1165
|
+
planned at full fidelity. Instead of reducing scope, we recommend splitting:
|
|
1166
|
+
|
|
1167
|
+
**Option 1: Split into sub-phases**
|
|
1168
|
+
- Phase {X}a: {name} — {items} ({N} source items, ~{P}% context)
|
|
1169
|
+
- Phase {X}b: {name} — {items} ({M} source items, ~{Q}% context)
|
|
1170
|
+
|
|
1171
|
+
**Option 2: Proceed anyway** (planner will attempt all, quality may degrade past 50% context)
|
|
1172
|
+
|
|
1173
|
+
**Option 3: Prioritize** — you choose which items to implement now,
|
|
1174
|
+
rest become a follow-up phase
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1177
|
+
Use AskUserQuestion with these 3 options.
|
|
1178
|
+
|
|
1179
|
+
**If "Split":** Use `/gsd:phase --insert` to create the sub-phases, then replan each.
|
|
1180
|
+
**If "Proceed":** Return to planner with instruction to attempt all items at full fidelity, accepting more plans/tasks.
|
|
1181
|
+
**If "Prioritize":** Use AskUserQuestion (multiSelect) to let user pick which items are "now" vs "later". Create CONTEXT.md for each sub-phase with the selected items.
|
|
1182
|
+
|
|
1183
|
+
## 9c. Handle Source Audit Gaps
|
|
1184
|
+
|
|
1185
|
+
When the planner returns `## ⚠ Source Audit: Unplanned Items Found`, it means items from REQUIREMENTS.md, RESEARCH.md, ROADMAP goal, or CONTEXT.md decisions have no corresponding plan.
|
|
1186
|
+
|
|
1187
|
+
**Extract from planner return:**
|
|
1188
|
+
- Each unplanned item with its source artifact and section
|
|
1189
|
+
- The planner's suggested options (A: add plan, B: split phase, C: defer with confirmation)
|
|
1190
|
+
|
|
1191
|
+
**Present each gap to user.** For each unplanned item:
|
|
1192
|
+
|
|
1193
|
+
```
|
|
1194
|
+
## ⚠ Unplanned: {item description}
|
|
1195
|
+
|
|
1196
|
+
Source: {RESEARCH.md / REQUIREMENTS.md / ROADMAP goal / CONTEXT.md}
|
|
1197
|
+
Details: {why the planner flagged this}
|
|
1198
|
+
|
|
1199
|
+
Options:
|
|
1200
|
+
1. Add a plan to cover this item (recommended)
|
|
1201
|
+
2. Split phase — move to a sub-phase with related items
|
|
1202
|
+
3. Defer — add to backlog (developer confirms this is intentional)
|
|
1203
|
+
```
|
|
1204
|
+
|
|
1205
|
+
Use AskUserQuestion for each gap (or batch if multiple gaps).
|
|
1206
|
+
|
|
1207
|
+
**If "Add plan":** Return to planner (step 8) with instruction to add plans covering the missing items, preserving existing plans.
|
|
1208
|
+
**If "Split":** Use `/gsd:phase --insert` for overflow items, then replan.
|
|
1209
|
+
**If "Defer":** Record in CONTEXT.md `## Deferred Ideas` with developer's confirmation. Proceed to step 10.
|
|
1210
|
+
|
|
1211
|
+
## 10. Spawn gsd-plan-checker Agent
|
|
1212
|
+
|
|
1213
|
+
Display banner:
|
|
1214
|
+
```
|
|
1215
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1216
|
+
GSD ► VERIFYING PLANS
|
|
1217
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1218
|
+
|
|
1219
|
+
◆ Spawning plan checker...
|
|
1220
|
+
```
|
|
1221
|
+
|
|
1222
|
+
Checker prompt:
|
|
1223
|
+
|
|
1224
|
+
```markdown
|
|
1225
|
+
<verification_context>
|
|
1226
|
+
**Phase:** {phase_number}
|
|
1227
|
+
**Phase Goal:** {goal from ROADMAP}
|
|
1228
|
+
|
|
1229
|
+
<files_to_read>
|
|
1230
|
+
- {PHASE_DIR}/*-PLAN.md (Plans to verify)
|
|
1231
|
+
- {roadmap_path} (Roadmap)
|
|
1232
|
+
- {requirements_path} (Requirements)
|
|
1233
|
+
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
|
|
1234
|
+
- {research_path} (Technical Research — includes Validation Architecture)
|
|
1235
|
+
</files_to_read>
|
|
1236
|
+
|
|
1237
|
+
${AGENT_SKILLS_CHECKER}
|
|
1238
|
+
|
|
1239
|
+
**Phase requirement IDs (MUST ALL be covered):** {phase_req_ids}
|
|
1240
|
+
|
|
1241
|
+
**Project instructions:** Read ./CLAUDE.md if exists — verify plans honor project guidelines
|
|
1242
|
+
**Project skills:** Check .claude/skills/ or .agents/skills/ directory (if either exists) — verify plans account for project skill rules
|
|
1243
|
+
</verification_context>
|
|
1244
|
+
|
|
1245
|
+
<expected_output>
|
|
1246
|
+
- ## VERIFICATION PASSED — all checks pass
|
|
1247
|
+
- ## ISSUES FOUND — structured issue list
|
|
1248
|
+
</expected_output>
|
|
1249
|
+
```
|
|
1250
|
+
|
|
1251
|
+
```
|
|
1252
|
+
Agent(
|
|
1253
|
+
prompt=checker_prompt,
|
|
1254
|
+
subagent_type="gsd-plan-checker",
|
|
1255
|
+
model="{checker_model}",
|
|
1256
|
+
description="Verify Phase {phase} plans"
|
|
1257
|
+
)
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: 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.
|
|
1261
|
+
|
|
1262
|
+
## 11. Handle Checker Return
|
|
1263
|
+
|
|
1264
|
+
- **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 13.
|
|
1265
|
+
- **`## ISSUES FOUND`:** Display issues, check iteration count, proceed to step 12.
|
|
1266
|
+
- **Empty / truncated / no recognized marker:** → Filesystem fallback (step 11a).
|
|
1267
|
+
|
|
1268
|
+
**Thinking partner for architectural tradeoffs (conditional):**
|
|
1269
|
+
If `features.thinking_partner` is enabled, scan the checker's issues for architectural tradeoff keywords
|
|
1270
|
+
("architecture", "approach", "strategy", "pattern", "vs", "alternative"). If found:
|
|
1271
|
+
|
|
1272
|
+
```
|
|
1273
|
+
The plan-checker flagged an architectural decision point:
|
|
1274
|
+
{issue description}
|
|
1275
|
+
|
|
1276
|
+
Brief analysis:
|
|
1277
|
+
- Option A: {approach_from_plan} — {pros/cons}
|
|
1278
|
+
- Option B: {alternative_approach} — {pros/cons}
|
|
1279
|
+
- Recommendation: {choice} aligned with {phase_goal}
|
|
1280
|
+
|
|
1281
|
+
Apply this to the revision? [Yes] / [No, I'll decide]
|
|
1282
|
+
```
|
|
1283
|
+
|
|
1284
|
+
If yes: include the recommendation in the revision prompt. If no: proceed to revision loop as normal.
|
|
1285
|
+
If thinking_partner disabled: skip this block entirely.
|
|
1286
|
+
|
|
1287
|
+
## 11a. Filesystem Fallback (Checker)
|
|
1288
|
+
|
|
1289
|
+
**Triggered when:** Checker Agent() returns but the return contains neither `## VERIFICATION PASSED` nor `## ISSUES FOUND`.
|
|
1290
|
+
|
|
1291
|
+
```bash
|
|
1292
|
+
DISK_PLANS=$(ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null | wc -l | tr -d ' ')
|
|
1293
|
+
```
|
|
1294
|
+
|
|
1295
|
+
**If `DISK_PLANS` > 0:** Plans exist on disk; the checker return was empty or truncated (the
|
|
1296
|
+
Windows stdio hang pattern — the subagent finished but the return never arrived). Display:
|
|
1297
|
+
|
|
1298
|
+
```text
|
|
1299
|
+
◆ Checker return was empty or truncated. {DISK_PLANS} plan(s) exist on disk.
|
|
1300
|
+
This is a known Windows stdio hang pattern — checker may have completed without returning.
|
|
1301
|
+
```
|
|
1302
|
+
|
|
1303
|
+
Offer 3 options:
|
|
1304
|
+
1. **Accept verification** — treat as `## VERIFICATION PASSED` and continue to step 13
|
|
1305
|
+
2. **Retry checker** — re-spawn the checker with the same prompt (return to step 10)
|
|
1306
|
+
3. **Stop** — exit; user can re-run `/gsd:plan-phase {N}` to resume
|
|
1307
|
+
|
|
1308
|
+
**If `DISK_PLANS` is 0:** No plans on disk — something is seriously wrong. Display error and stop.
|
|
1309
|
+
|
|
1310
|
+
## 12. Revision Loop (Max 3 Iterations)
|
|
1311
|
+
|
|
1312
|
+
Track `iteration_count` (starts at 1 after initial plan + check).
|
|
1313
|
+
Track `prev_issue_count` (initialized to `Infinity` before the loop begins).
|
|
1314
|
+
Track `stall_reentry_count` (starts at 0; incremented each time "Adjust approach" re-enters step 8).
|
|
1315
|
+
|
|
1316
|
+
**If iteration_count < 3:**
|
|
1317
|
+
|
|
1318
|
+
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.
|
|
1319
|
+
|
|
1320
|
+
Display: `Revision iteration {N}/3 -- {blocker_count} blockers, {warning_count} warnings`
|
|
1321
|
+
|
|
1322
|
+
**Stall detection:** If `issue_count >= prev_issue_count`:
|
|
1323
|
+
Display: `Revision loop stalled — issue count not decreasing ({issue_count} issues remain after {N} iterations)`
|
|
1324
|
+
|
|
1325
|
+
**If `stall_reentry_count < 2`:**
|
|
1326
|
+
Ask user:
|
|
1327
|
+
Question: "Issues remain after {N} revision attempts with no progress. Proceed with current output?"
|
|
1328
|
+
Options: "Proceed anyway" | "Adjust approach"
|
|
1329
|
+
If "Proceed anyway": accept current plans and continue to step 13.
|
|
1330
|
+
If "Adjust approach": increment `stall_reentry_count`, open freeform discussion, then re-enter step 8 (full replanning). Note: re-entry resets `iteration_count` and `prev_issue_count` but `stall_reentry_count` persists across re-entries and is capped at 2.
|
|
1331
|
+
|
|
1332
|
+
**If `stall_reentry_count >= 2`:**
|
|
1333
|
+
Display: `Stall persists after 2 re-planning attempts. The following issues could not be resolved automatically:`
|
|
1334
|
+
List the remaining issues from the checker.
|
|
1335
|
+
Suggest: "Consider resolving these issues manually or running `/gsd:debug` to investigate root causes."
|
|
1336
|
+
Options: "Proceed anyway" | "Abandon"
|
|
1337
|
+
If "Proceed anyway": accept current plans and continue to step 13.
|
|
1338
|
+
If "Abandon": stop workflow.
|
|
1339
|
+
|
|
1340
|
+
Set `prev_issue_count = issue_count`.
|
|
1341
|
+
|
|
1342
|
+
Revision prompt:
|
|
1343
|
+
|
|
1344
|
+
```markdown
|
|
1345
|
+
<revision_context>
|
|
1346
|
+
**Phase:** {phase_number}
|
|
1347
|
+
**Mode:** revision
|
|
1348
|
+
|
|
1349
|
+
<files_to_read>
|
|
1350
|
+
- {PHASE_DIR}/*-PLAN.md (Existing plans)
|
|
1351
|
+
- {context_path} (USER DECISIONS from /gsd:discuss-phase)
|
|
1352
|
+
</files_to_read>
|
|
1353
|
+
|
|
1354
|
+
${AGENT_SKILLS_PLANNER}
|
|
1355
|
+
|
|
1356
|
+
**Checker issues:** {structured_issues_from_checker}
|
|
1357
|
+
</revision_context>
|
|
1358
|
+
|
|
1359
|
+
<instructions>
|
|
1360
|
+
Make targeted updates to address checker issues.
|
|
1361
|
+
Do NOT replan from scratch unless issues are fundamental.
|
|
1362
|
+
Return what changed.
|
|
1363
|
+
</instructions>
|
|
1364
|
+
```
|
|
1365
|
+
|
|
1366
|
+
```
|
|
1367
|
+
Agent(
|
|
1368
|
+
prompt=revision_prompt,
|
|
1369
|
+
subagent_type="gsd-planner",
|
|
1370
|
+
model="{planner_model}",
|
|
1371
|
+
description="Revise Phase {phase} plans"
|
|
1372
|
+
)
|
|
1373
|
+
```
|
|
1374
|
+
|
|
1375
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: 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.
|
|
1376
|
+
|
|
1377
|
+
After planner returns -> spawn checker again (step 10), increment iteration_count.
|
|
1378
|
+
|
|
1379
|
+
**If iteration_count >= 3:**
|
|
1380
|
+
|
|
1381
|
+
Display: `Max iterations reached. {N} issues remain:` + issue list
|
|
1382
|
+
|
|
1383
|
+
Offer: 1) Force proceed, 2) Provide guidance and retry, 3) Abandon
|
|
1384
|
+
|
|
1385
|
+
## 12.5. Plan Bounce (Optional External Refinement)
|
|
1386
|
+
|
|
1387
|
+
**Skip if:** `--skip-bounce` flag, `--gaps` flag, or bounce is not activated.
|
|
1388
|
+
|
|
1389
|
+
**Activation:** Bounce runs when `--bounce` flag is present OR `workflow.plan_bounce` config is `true`. The `--skip-bounce` flag always wins (disables bounce even if config enables it). The `--gaps` flag also disables bounce (gap-closure mode should not modify plans externally).
|
|
1390
|
+
|
|
1391
|
+
**Prerequisites:** `workflow.plan_bounce_script` must be set to a valid script path. If bounce is activated but no script is configured, display warning and skip:
|
|
1392
|
+
```
|
|
1393
|
+
⚠ Plan bounce activated but no script configured.
|
|
1394
|
+
Set workflow.plan_bounce_script to the path of your refinement script.
|
|
1395
|
+
Skipping bounce step.
|
|
1396
|
+
```
|
|
1397
|
+
|
|
1398
|
+
**Read pass count:**
|
|
1399
|
+
```bash
|
|
1400
|
+
BOUNCE_PASSES=$($GSD_SDK query config-get workflow.plan_bounce_passes 2>/dev/null || echo "2")
|
|
1401
|
+
BOUNCE_SCRIPT=$($GSD_SDK query config-get workflow.plan_bounce_script 2>/dev/null | jq -r '.' 2>/dev/null || true)
|
|
1402
|
+
```
|
|
1403
|
+
|
|
1404
|
+
Display banner:
|
|
1405
|
+
```
|
|
1406
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1407
|
+
GSD ► BOUNCING PLANS (External Refinement)
|
|
1408
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1409
|
+
|
|
1410
|
+
Script: ${BOUNCE_SCRIPT}
|
|
1411
|
+
Max passes: ${BOUNCE_PASSES}
|
|
1412
|
+
```
|
|
1413
|
+
|
|
1414
|
+
**For each PLAN.md file in the phase directory:**
|
|
1415
|
+
|
|
1416
|
+
1. **Backup:** Copy `*-PLAN.md` to `*-PLAN.pre-bounce.md`
|
|
1417
|
+
```bash
|
|
1418
|
+
cp "${PLAN_FILE}" "${PLAN_FILE%.md}.pre-bounce.md"
|
|
1419
|
+
```
|
|
1420
|
+
|
|
1421
|
+
2. **Invoke bounce script:**
|
|
1422
|
+
```bash
|
|
1423
|
+
"${BOUNCE_SCRIPT}" "${PLAN_FILE}" "${BOUNCE_PASSES}"
|
|
1424
|
+
```
|
|
1425
|
+
|
|
1426
|
+
3. **Validate bounced plan — YAML frontmatter integrity:**
|
|
1427
|
+
After the script returns, check that the bounced file still has valid YAML frontmatter (opening and closing `---` delimiters with parseable content between them). If the bounced plan breaks YAML frontmatter validation, restore the original from the pre-bounce.md backup and continue to the next plan:
|
|
1428
|
+
```
|
|
1429
|
+
⚠ Bounced plan ${PLAN_FILE} has broken YAML frontmatter — restoring original from pre-bounce backup.
|
|
1430
|
+
```
|
|
1431
|
+
|
|
1432
|
+
4. **Handle script failure:** If the bounce script exits non-zero, restore the original plan from the pre-bounce.md backup and continue to the next plan:
|
|
1433
|
+
```
|
|
1434
|
+
⚠ Bounce script failed for ${PLAN_FILE} (exit code ${EXIT_CODE}) — restoring original from pre-bounce backup.
|
|
1435
|
+
```
|
|
1436
|
+
|
|
1437
|
+
**After all plans are bounced:**
|
|
1438
|
+
|
|
1439
|
+
5. **Re-run plan checker on bounced plans:** Spawn gsd-plan-checker (same as step 10) on all modified plans. If a bounced plan fails the checker, restore original from its pre-bounce.md backup:
|
|
1440
|
+
```
|
|
1441
|
+
⚠ Bounced plan ${PLAN_FILE} failed checker validation — restoring original from pre-bounce backup.
|
|
1442
|
+
```
|
|
1443
|
+
|
|
1444
|
+
6. **Commit surviving bounced plans:** If at least one plan survived both the frontmatter validation and the checker re-run, commit the changes:
|
|
1445
|
+
```bash
|
|
1446
|
+
$GSD_SDK query commit "refactor(${padded_phase}): bounce plans through external refinement" --files "${PHASE_DIR}/*-PLAN.md"
|
|
1447
|
+
```
|
|
1448
|
+
|
|
1449
|
+
Display summary:
|
|
1450
|
+
```
|
|
1451
|
+
Plan bounce complete: {survived}/{total} plans refined
|
|
1452
|
+
```
|
|
1453
|
+
|
|
1454
|
+
**Clean up:** Remove all `*-PLAN.pre-bounce.md` backup files after the bounce step completes (whether plans survived or were restored).
|
|
1455
|
+
|
|
1456
|
+
## 13. Requirements Coverage Gate
|
|
1457
|
+
|
|
1458
|
+
After plans pass the checker (or checker is skipped), verify that all phase requirements are covered by at least one plan.
|
|
1459
|
+
|
|
1460
|
+
**Skip if:** `phase_req_ids` is null or TBD (no requirements mapped to this phase).
|
|
1461
|
+
|
|
1462
|
+
**Step 1: Extract requirement IDs claimed by plans**
|
|
1463
|
+
```bash
|
|
1464
|
+
# Collect all requirement IDs from plan frontmatter
|
|
1465
|
+
PLAN_REQS=$(grep -h "requirements_addressed\|requirements:" ${PHASE_DIR}/*-PLAN.md 2>/dev/null | tr -d '[]' | tr ',' '\n' | sed 's/^[[:space:]]*//' | sort -u)
|
|
1466
|
+
```
|
|
1467
|
+
|
|
1468
|
+
**Step 2: Compare against phase requirements from ROADMAP**
|
|
1469
|
+
|
|
1470
|
+
For each REQ-ID in `phase_req_ids`:
|
|
1471
|
+
- If REQ-ID appears in `PLAN_REQS` → covered ✓
|
|
1472
|
+
- If REQ-ID does NOT appear in any plan → uncovered ✗
|
|
1473
|
+
|
|
1474
|
+
**Step 3: Check CONTEXT.md features against plan objectives**
|
|
1475
|
+
|
|
1476
|
+
Read CONTEXT.md `<decisions>` section. Extract feature/capability names. Check each against plan `<objective>` blocks. Features not mentioned in any plan objective → potentially dropped.
|
|
1477
|
+
|
|
1478
|
+
**Step 4: Report**
|
|
1479
|
+
|
|
1480
|
+
If all requirements covered and no dropped features:
|
|
1481
|
+
```
|
|
1482
|
+
✓ Requirements coverage: {N}/{N} REQ-IDs covered by plans
|
|
1483
|
+
```
|
|
1484
|
+
→ Proceed to step 14.
|
|
1485
|
+
|
|
1486
|
+
If gaps found:
|
|
1487
|
+
```
|
|
1488
|
+
## ⚠ Requirements Coverage Gap
|
|
1489
|
+
|
|
1490
|
+
{M} of {N} phase requirements are not assigned to any plan:
|
|
1491
|
+
|
|
1492
|
+
| REQ-ID | Description | Plans |
|
|
1493
|
+
|--------|-------------|-------|
|
|
1494
|
+
| {id} | {from REQUIREMENTS.md} | None |
|
|
1495
|
+
|
|
1496
|
+
{K} CONTEXT.md features not found in plan objectives:
|
|
1497
|
+
- {feature_name} — described in CONTEXT.md but no plan covers it
|
|
1498
|
+
|
|
1499
|
+
Options:
|
|
1500
|
+
1. Re-plan to include missing requirements (recommended)
|
|
1501
|
+
2. Move uncovered requirements to next phase
|
|
1502
|
+
3. Proceed anyway — accept coverage gaps
|
|
1503
|
+
```
|
|
1504
|
+
|
|
1505
|
+
If `TEXT_MODE` is true, present as a plain-text numbered list (options already shown in the block above). Otherwise use AskUserQuestion to present the options.
|
|
1506
|
+
|
|
1507
|
+
## 13a. Decision Coverage Gate
|
|
1508
|
+
|
|
1509
|
+
After the requirements coverage gate passes, verify that every trackable
|
|
1510
|
+
decision captured by discuss-phase in CONTEXT.md `<decisions>` is referenced
|
|
1511
|
+
by at least one plan. This is the **translation gate** from issue #2492 —
|
|
1512
|
+
its job is to refuse to mark a phase planned when a discuss-phase decision
|
|
1513
|
+
silently dropped on the way into the plans.
|
|
1514
|
+
|
|
1515
|
+
**Skip if** `workflow.context_coverage_gate` is explicitly set to `false`
|
|
1516
|
+
(absent key = enabled). Also skip if no CONTEXT.md exists for this phase
|
|
1517
|
+
(nothing to translate) or if its `<decisions>` block is empty.
|
|
1518
|
+
|
|
1519
|
+
```bash
|
|
1520
|
+
GATE_CFG=$($GSD_SDK query config-get workflow.context_coverage_gate 2>/dev/null || echo "true")
|
|
1521
|
+
if [ "$GATE_CFG" != "false" ]; then
|
|
1522
|
+
GATE_RESULT=$($GSD_SDK query check.decision-coverage-plan "${PHASE_DIR}" "${CONTEXT_PATH}")
|
|
1523
|
+
# BLOCKING: refuse to mark phase planned when a trackable decision is uncovered.
|
|
1524
|
+
# `passed: true` covers both real-pass and skipped cases (gate disabled / no CONTEXT.md /
|
|
1525
|
+
# no trackable decisions). Verify-phase counterpart deliberately omits this exit-1 — that
|
|
1526
|
+
# gate is non-blocking by design (review finding F15).
|
|
1527
|
+
echo "$GATE_RESULT" | jq -e '.data.passed == true' >/dev/null || {
|
|
1528
|
+
echo "$GATE_RESULT" | jq -r '.data.message'
|
|
1529
|
+
exit 1
|
|
1530
|
+
}
|
|
1531
|
+
fi
|
|
1532
|
+
```
|
|
1533
|
+
|
|
1534
|
+
The handler returns JSON:
|
|
1535
|
+
```json
|
|
1536
|
+
{
|
|
1537
|
+
"passed": true,
|
|
1538
|
+
"skipped": false,
|
|
1539
|
+
"total": 2,
|
|
1540
|
+
"covered": 2,
|
|
1541
|
+
"uncovered": [ { "id": "D-01", "text": "...", "category": "..." } ],
|
|
1542
|
+
"message": "..."
|
|
1543
|
+
}
|
|
1544
|
+
```
|
|
1545
|
+
|
|
1546
|
+
**If `passed` is true (or `skipped` is true):** Display
|
|
1547
|
+
`✓ Decision coverage: {M}/{N} CONTEXT.md decisions covered by plans` (or
|
|
1548
|
+
`(skipped — gate disabled)` / `(skipped — no decisions)`) and proceed to
|
|
1549
|
+
step 13b.
|
|
1550
|
+
|
|
1551
|
+
**If `passed` is false:** Display the handler's `message` block. It already
|
|
1552
|
+
names each uncovered decision (`D-NN | category | text`) and tells the user
|
|
1553
|
+
what to do — cite the id in a relevant plan's `must_haves` / `truths`, or
|
|
1554
|
+
move the decision under `### Claude's Discretion` / tag it `[informational]`
|
|
1555
|
+
if it should not be tracked. Then offer:
|
|
1556
|
+
|
|
1557
|
+
```text
|
|
1558
|
+
Options:
|
|
1559
|
+
1. Re-plan to cover missing decisions (recommended)
|
|
1560
|
+
2. Edit CONTEXT.md to mark dropped decisions as [informational] / Discretion
|
|
1561
|
+
3. Proceed anyway — accept the coverage gap
|
|
1562
|
+
```
|
|
1563
|
+
|
|
1564
|
+
If `TEXT_MODE` is true, present as a plain-text numbered list. Otherwise use
|
|
1565
|
+
AskUserQuestion. Selecting "Proceed anyway" continues to step 13b but
|
|
1566
|
+
records the override in STATE.md so verify-phase can re-surface it.
|
|
1567
|
+
|
|
1568
|
+
**Why this gate blocks:** failing here is cheap. The plans are the contract
|
|
1569
|
+
between discuss-phase and execute-phase; if a decision isn't visible in any
|
|
1570
|
+
plan, no executor will implement it. Catching that now beats discovering it
|
|
1571
|
+
after thousands of dollars of execution.
|
|
1572
|
+
|
|
1573
|
+
## 13b. Record Planning Completion in STATE.md
|
|
1574
|
+
|
|
1575
|
+
After plans pass all gates, record that planning is complete so STATE.md reflects the new phase status:
|
|
1576
|
+
|
|
1577
|
+
```bash
|
|
1578
|
+
$GSD_SDK query state.planned-phase --phase "${PHASE_NUMBER}" --name "${PHASE_NAME}" --plans "${PLAN_COUNT}"
|
|
1579
|
+
```
|
|
1580
|
+
|
|
1581
|
+
This updates STATUS to "Ready to execute", sets the correct plan count, and timestamps Last Activity.
|
|
1582
|
+
|
|
1583
|
+
## 13c. Annotate ROADMAP with Wave Dependencies and Cross-cutting Constraints
|
|
1584
|
+
|
|
1585
|
+
After plans are finalized, annotate the ROADMAP.md plan list for this phase with:
|
|
1586
|
+
- **Wave dependency notes** — a bold header before each wave group ("Wave 2 *(blocked on Wave 1 completion)*")
|
|
1587
|
+
- **Cross-cutting constraints** — a "Cross-cutting constraints:" subsection listing `must_haves.truths` entries that appear in 2 or more plans
|
|
1588
|
+
|
|
1589
|
+
This step is derived entirely from existing PLAN frontmatter — no extra LLM pass is required.
|
|
1590
|
+
|
|
1591
|
+
```bash
|
|
1592
|
+
$GSD_SDK query roadmap.annotate-dependencies "${PHASE_NUMBER}"
|
|
1593
|
+
```
|
|
1594
|
+
|
|
1595
|
+
This operation is idempotent: if wave headers or cross-cutting constraints already exist in the ROADMAP phase section, the command returns without modifying the file. Skip this step if `plan_count` is 0.
|
|
1596
|
+
|
|
1597
|
+
## 13d. Commit Plans if commit_docs is true
|
|
1598
|
+
|
|
1599
|
+
If `commit_docs` is true (from the init JSON parsed in step 1), commit the generated plan artifacts (including any ROADMAP.md annotations from step 13c):
|
|
1600
|
+
|
|
1601
|
+
```bash
|
|
1602
|
+
$GSD_SDK query commit "docs(${PADDED_PHASE}): create phase plan" --files "${PHASE_DIR}"/*-PLAN.md .planning/STATE.md .planning/ROADMAP.md
|
|
1603
|
+
```
|
|
1604
|
+
|
|
1605
|
+
This commits all PLAN.md files for the phase plus the updated STATE.md and ROADMAP.md to version-control the planning artifacts. Skip this step if `commit_docs` is false.
|
|
1606
|
+
|
|
1607
|
+
## 13e. Post-Planning Gap Analysis
|
|
1608
|
+
|
|
1609
|
+
After all plans are generated, committed, and the Requirements Coverage Gate (§13)
|
|
1610
|
+
has run, emit a single unified gap report covering both REQUIREMENTS.md and the
|
|
1611
|
+
CONTEXT.md `<decisions>` section. This is a **proactive, post-hoc report** — it
|
|
1612
|
+
does not block phase advancement and does not re-plan. It exists so that any
|
|
1613
|
+
requirement or decision that slipped through the per-plan checks is surfaced in
|
|
1614
|
+
one place before execution begins.
|
|
1615
|
+
|
|
1616
|
+
**Skip if:** `workflow.post_planning_gaps` is `false`. Default is `true`.
|
|
1617
|
+
|
|
1618
|
+
```bash
|
|
1619
|
+
POST_PLANNING_GAPS=$($GSD_SDK query config-get workflow.post_planning_gaps --default true 2>/dev/null || echo true)
|
|
1620
|
+
if [ "$POST_PLANNING_GAPS" = "true" ]; then
|
|
1621
|
+
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" gap-analysis --phase-dir "${PHASE_DIR}"
|
|
1622
|
+
fi
|
|
1623
|
+
```
|
|
1624
|
+
|
|
1625
|
+
(`gsd-tools.cjs gap-analysis` reads `.planning/REQUIREMENTS.md`, `${PHASE_DIR}/CONTEXT.md`,
|
|
1626
|
+
and `${PHASE_DIR}/*-PLAN.md`, then prints a markdown table with one row per
|
|
1627
|
+
REQ-ID and D-ID. Word-boundary matching prevents `REQ-1` from being mistaken for
|
|
1628
|
+
`REQ-10`.)
|
|
1629
|
+
|
|
1630
|
+
**Output format (deterministic; sorted REQUIREMENTS.md → CONTEXT.md, then natural
|
|
1631
|
+
sort within source):**
|
|
1632
|
+
|
|
1633
|
+
```
|
|
1634
|
+
## Post-Planning Gap Analysis
|
|
1635
|
+
|
|
1636
|
+
| Source | Item | Status |
|
|
1637
|
+
|--------|------|--------|
|
|
1638
|
+
| REQUIREMENTS.md | REQ-01 | ✓ Covered |
|
|
1639
|
+
| REQUIREMENTS.md | REQ-02 | ✗ Not covered |
|
|
1640
|
+
| CONTEXT.md | D-01 | ✓ Covered |
|
|
1641
|
+
| CONTEXT.md | D-02 | ✗ Not covered |
|
|
1642
|
+
|
|
1643
|
+
⚠ N items not covered by any plan
|
|
1644
|
+
```
|
|
1645
|
+
|
|
1646
|
+
**Skip-gracefully behavior:**
|
|
1647
|
+
- REQUIREMENTS.md missing → CONTEXT-only report.
|
|
1648
|
+
- CONTEXT.md missing → REQUIREMENTS-only report.
|
|
1649
|
+
- Both missing or `<decisions>` block missing → "No requirements or decisions to check" line, no error.
|
|
1650
|
+
|
|
1651
|
+
This step is non-blocking. If items are reported as not covered, the user may
|
|
1652
|
+
re-run `/gsd:plan-phase --gaps` to add plans, or proceed to execute-phase as-is.
|
|
1653
|
+
|
|
1654
|
+
## 14. Present Final Status
|
|
1655
|
+
|
|
1656
|
+
Route to `<offer_next>` OR `auto_advance` depending on flags/config.
|
|
1657
|
+
|
|
1658
|
+
## 15. Auto-Advance Check
|
|
1659
|
+
|
|
1660
|
+
Check for auto-advance trigger using values already loaded in step 1:
|
|
1661
|
+
|
|
1662
|
+
1. Parse `--auto` and `--chain` flags from $ARGUMENTS
|
|
1663
|
+
2. Use `auto_chain_active` and `auto_advance` from the INIT JSON parsed in step 1 — **do not issue additional `config-get` calls for these values** (they are already present in the init output). Issuing redundant `config-get` calls for values already in INIT can cause infinite read loops on some runtimes.
|
|
1664
|
+
3. **Sync chain flag with intent** — if user invoked manually (no `--auto` and no `--chain`), clear the ephemeral chain flag from any previous interrupted `--auto` chain. This does NOT touch `workflow.auto_advance` (the user's persistent settings preference):
|
|
1665
|
+
```bash
|
|
1666
|
+
if [[ ! "$ARGUMENTS" =~ --auto ]] && [[ ! "$ARGUMENTS" =~ --chain ]]; then
|
|
1667
|
+
$GSD_SDK query config-set workflow._auto_chain_active false || true
|
|
1668
|
+
fi
|
|
1669
|
+
```
|
|
1670
|
+
|
|
1671
|
+
Set local variables from INIT (parsed once in step 1):
|
|
1672
|
+
- `AUTO_CHAIN` = `auto_chain_active` from INIT JSON (boolean, default false)
|
|
1673
|
+
- `AUTO_CFG` = `auto_advance` from INIT JSON (boolean, default false)
|
|
1674
|
+
|
|
1675
|
+
**If `--auto` or `--chain` flag present AND `AUTO_CHAIN` is not true:** Persist chain flag to config (handles direct invocation without prior discuss-phase):
|
|
1676
|
+
```bash
|
|
1677
|
+
if ([[ "$ARGUMENTS" =~ --auto ]] || [[ "$ARGUMENTS" =~ --chain ]]) && [[ "$AUTO_CHAIN" != "true" ]]; then
|
|
1678
|
+
$GSD_SDK query config-set workflow._auto_chain_active true
|
|
1679
|
+
fi
|
|
1680
|
+
```
|
|
1681
|
+
|
|
1682
|
+
**If `--auto` or `--chain` flag present OR `AUTO_CHAIN` is true OR `AUTO_CFG` is true:**
|
|
1683
|
+
|
|
1684
|
+
Display banner:
|
|
1685
|
+
```
|
|
1686
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1687
|
+
GSD ► AUTO-ADVANCING TO EXECUTE
|
|
1688
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1689
|
+
|
|
1690
|
+
Plans ready. Launching execute-phase...
|
|
1691
|
+
```
|
|
1692
|
+
|
|
1693
|
+
Launch execute-phase using the Skill tool to avoid nested Task sessions (which cause runtime freezes due to deep agent nesting):
|
|
1694
|
+
```
|
|
1695
|
+
Skill(skill="gsd-execute-phase", args="${PHASE} --auto --no-transition ${GSD_WS}")
|
|
1696
|
+
```
|
|
1697
|
+
|
|
1698
|
+
The `--no-transition` flag tells execute-phase to return status after verification instead of chaining further. This keeps the auto-advance chain flat — each phase runs at the same nesting level rather than spawning deeper Task agents.
|
|
1699
|
+
|
|
1700
|
+
**Handle execute-phase return:**
|
|
1701
|
+
- **PHASE COMPLETE** → Display final summary:
|
|
1702
|
+
```
|
|
1703
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1704
|
+
GSD ► PHASE ${PHASE} COMPLETE ✓
|
|
1705
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1706
|
+
|
|
1707
|
+
Auto-advance pipeline finished.
|
|
1708
|
+
|
|
1709
|
+
Next: /gsd:discuss-phase ${NEXT_PHASE} --auto ${GSD_WS}
|
|
1710
|
+
```
|
|
1711
|
+
- **GAPS FOUND / VERIFICATION FAILED** → Display result, stop chain:
|
|
1712
|
+
```
|
|
1713
|
+
Auto-advance stopped: Execution needs review.
|
|
1714
|
+
|
|
1715
|
+
Review the output above and continue manually:
|
|
1716
|
+
/gsd:execute-phase ${PHASE} ${GSD_WS}
|
|
1717
|
+
```
|
|
1718
|
+
|
|
1719
|
+
**If neither `--auto` nor config enabled:**
|
|
1720
|
+
Route to `<offer_next>` (existing behavior).
|
|
1721
|
+
|
|
1722
|
+
</process>
|
|
1723
|
+
|
|
1724
|
+
<offer_next>
|
|
1725
|
+
Output this markdown directly (not as a code block):
|
|
1726
|
+
|
|
1727
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1728
|
+
GSD ► PHASE {X} PLANNED ✓
|
|
1729
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1730
|
+
|
|
1731
|
+
**Phase {X}: {Name}** — {N} plan(s) in {M} wave(s)
|
|
1732
|
+
|
|
1733
|
+
| Wave | Plans | What it builds |
|
|
1734
|
+
|------|-------|----------------|
|
|
1735
|
+
| 1 | 01, 02 | [objectives] |
|
|
1736
|
+
| 2 | 03 | [objective] |
|
|
1737
|
+
|
|
1738
|
+
Research: {Completed | Used existing | Skipped}
|
|
1739
|
+
Verification: {Passed | Passed with override | Skipped}
|
|
1740
|
+
|
|
1741
|
+
───────────────────────────────────────────────────────────────
|
|
1742
|
+
|
|
1743
|
+
## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
|
|
1744
|
+
|
|
1745
|
+
**Execute Phase {X}** — run all {N} plans
|
|
1746
|
+
|
|
1747
|
+
/clear then:
|
|
1748
|
+
|
|
1749
|
+
/gsd:execute-phase {X} ${GSD_WS}
|
|
1750
|
+
|
|
1751
|
+
───────────────────────────────────────────────────────────────
|
|
1752
|
+
|
|
1753
|
+
**Also available:**
|
|
1754
|
+
- cat .planning/phases/{phase-dir}/*-PLAN.md — review plans
|
|
1755
|
+
- /gsd:plan-phase {X} --research — re-research first
|
|
1756
|
+
- /gsd:review --phase {X} --all — peer review plans with external AIs
|
|
1757
|
+
- /gsd:plan-phase {X} --reviews — replan incorporating review feedback
|
|
1758
|
+
|
|
1759
|
+
───────────────────────────────────────────────────────────────
|
|
1760
|
+
</offer_next>
|
|
1761
|
+
|
|
1762
|
+
<windows_troubleshooting>
|
|
1763
|
+
**Windows users:** If plan-phase freezes during agent spawning (common on Windows due to
|
|
1764
|
+
stdio deadlocks with MCP servers — see Claude Code issue anthropics/claude-code#28126):
|
|
1765
|
+
|
|
1766
|
+
1. **Force-kill:** Close the terminal (Ctrl+C may not work)
|
|
1767
|
+
2. **Clean up orphaned processes:**
|
|
1768
|
+
```powershell
|
|
1769
|
+
# Kill orphaned node processes from stale MCP servers
|
|
1770
|
+
Get-Process node -ErrorAction SilentlyContinue | Where-Object {$_.StartTime -lt (Get-Date).AddHours(-1)} | Stop-Process -Force
|
|
1771
|
+
```
|
|
1772
|
+
3. **Clean up stale task directories:**
|
|
1773
|
+
```powershell
|
|
1774
|
+
# Remove stale subagent task dirs (Claude Code never cleans these on crash)
|
|
1775
|
+
Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\tasks\*" -ErrorAction SilentlyContinue
|
|
1776
|
+
```
|
|
1777
|
+
4. **Reduce MCP server count:** Temporarily disable non-essential MCP servers in settings.json
|
|
1778
|
+
5. **Retry:** Restart Claude Code and run `/gsd:plan-phase` again
|
|
1779
|
+
|
|
1780
|
+
If freezes persist, try `--skip-research` to reduce the agent chain from 3 to 2 agents:
|
|
1781
|
+
```
|
|
1782
|
+
/gsd:plan-phase N --skip-research
|
|
1783
|
+
```
|
|
1784
|
+
</windows_troubleshooting>
|
|
1785
|
+
|
|
1786
|
+
<success_criteria>
|
|
1787
|
+
- [ ] .planning/ directory validated
|
|
1788
|
+
- [ ] Phase validated against roadmap
|
|
1789
|
+
- [ ] Phase directory created if needed
|
|
1790
|
+
- [ ] CONTEXT.md loaded early (step 4) and passed to ALL agents
|
|
1791
|
+
- [ ] Research completed (unless --skip-research or --gaps or exists)
|
|
1792
|
+
- [ ] gsd-phase-researcher spawned with CONTEXT.md
|
|
1793
|
+
- [ ] Existing plans checked
|
|
1794
|
+
- [ ] gsd-planner spawned with CONTEXT.md + RESEARCH.md
|
|
1795
|
+
- [ ] Plans created (PLANNING COMPLETE or CHECKPOINT handled)
|
|
1796
|
+
- [ ] gsd-plan-checker spawned with CONTEXT.md
|
|
1797
|
+
- [ ] Verification passed OR user override OR max iterations with user decision
|
|
1798
|
+
- [ ] User sees status between agent spawns
|
|
1799
|
+
- [ ] User knows next steps
|
|
1800
|
+
</success_criteria>
|