@opengsd/gsd-core 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/agents/gsd-debug-session-manager.md +11 -0
- package/agents/gsd-doc-synthesizer.md +2 -4
- package/agents/gsd-executor.md +5 -5
- package/agents/gsd-mempalace-curator.md +5 -2
- package/agents/gsd-phase-researcher.md +20 -1
- package/agents/gsd-plan-checker.md +37 -0
- package/agents/gsd-planner.md +44 -46
- package/agents/gsd-user-profiler.md +3 -0
- package/agents/gsd-verifier.md +12 -3
- package/bin/install.js +841 -971
- package/bin/lib/ui-safety-gate.cjs +2 -0
- package/commands/gsd/code-review.md +1 -1
- package/commands/gsd/execute-phase.md +1 -1
- package/commands/gsd/map-codebase.md +1 -1
- package/commands/gsd/mempalace-capture.md +1 -1
- package/commands/gsd/mempalace-recall.md +1 -1
- package/commands/gsd/new-milestone.md +1 -1
- package/commands/gsd/quick.md +1 -1
- package/commands/gsd/review-backlog.md +2 -1
- package/commands/gsd/verify-work.md +1 -1
- package/gsd-core/bin/gsd-tools.cjs +469 -88
- package/gsd-core/bin/lib/active-workstream-store.cjs +138 -22
- package/gsd-core/bin/lib/agent-install-check.cjs +230 -32
- package/gsd-core/bin/lib/api-coverage.cjs +3 -5
- package/gsd-core/bin/lib/artifacts.cjs +3 -0
- package/gsd-core/bin/lib/assumption-delta.cjs +2 -4
- package/gsd-core/bin/lib/audit-command-router.cjs +9 -2
- package/gsd-core/bin/lib/audit.cjs +876 -240
- package/gsd-core/bin/lib/broken-windows.cjs +1 -1
- package/gsd-core/bin/lib/capability-consent.cjs +149 -15
- package/gsd-core/bin/lib/capability-lifecycle.cjs +45 -0
- package/gsd-core/bin/lib/capability-registry.cjs +575 -101
- package/gsd-core/bin/lib/capability-source.cjs +92 -0
- package/gsd-core/bin/lib/capability-trust.cjs +444 -25
- package/gsd-core/bin/lib/capability-validator.cjs +495 -22
- package/gsd-core/bin/lib/capability-writer.cjs +3 -2
- package/gsd-core/bin/lib/check-command-router.cjs +71 -37
- package/gsd-core/bin/lib/claude-orchestration.cjs +56 -3
- package/gsd-core/bin/lib/codex-agent-toml.cjs +329 -0
- package/gsd-core/bin/lib/command-aliases.cjs +22 -0
- package/gsd-core/bin/lib/command-roster.cjs +44 -1
- package/gsd-core/bin/lib/commands.cjs +651 -86
- package/gsd-core/bin/lib/commonjs-marker.cjs +12 -6
- package/gsd-core/bin/lib/complexity-trigger.cjs +1172 -0
- package/gsd-core/bin/lib/config-loader.cjs +75 -0
- package/gsd-core/bin/lib/config.cjs +10 -1
- package/gsd-core/bin/lib/core-utils.cjs +127 -29
- package/gsd-core/bin/lib/decisions.cjs +23 -0
- package/gsd-core/bin/lib/fallow-runner.cjs +20 -44
- package/gsd-core/bin/lib/frontmatter.cjs +155 -20
- package/gsd-core/bin/lib/gap-checker.cjs +68 -7
- package/gsd-core/bin/lib/git-base-branch.cjs +102 -0
- package/gsd-core/bin/lib/gsd2-import.cjs +10 -1
- package/gsd-core/bin/lib/health-diagnostic-rules/agent-install.cjs +101 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/config-validation.cjs +348 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/consistency.cjs +145 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/install-surface-shadowing.cjs +98 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/milestone-archive-hygiene.cjs +100 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/phase-structure.cjs +222 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/roadmap-disk-consistency.cjs +265 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/root-existence.cjs +161 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/state-consistency.cjs +303 -0
- package/gsd-core/bin/lib/health-diagnostic-rules/worktree-health.cjs +173 -0
- package/gsd-core/bin/lib/health-diagnostic-types.cjs +68 -0
- package/gsd-core/bin/lib/health-diagnostic.cjs +431 -0
- package/gsd-core/bin/lib/host-runtime-detection.cjs +134 -0
- package/gsd-core/bin/lib/init.cjs +321 -129
- package/gsd-core/bin/lib/install-effort-resolver.cjs +73 -30
- package/gsd-core/bin/lib/install-engine.cjs +745 -258
- package/gsd-core/bin/lib/install-fs-adapter.cjs +262 -0
- package/gsd-core/bin/lib/install-model-override-resolver.cjs +203 -0
- package/gsd-core/bin/lib/install-profiles.cjs +134 -57
- package/gsd-core/bin/lib/install-scope.cjs +270 -0
- package/gsd-core/bin/lib/install-shadow-report.cjs +385 -0
- package/gsd-core/bin/lib/installed-surface-resolver.cjs +381 -0
- package/gsd-core/bin/lib/installer-migrations.cjs +138 -31
- package/gsd-core/bin/lib/io.cjs +10 -0
- package/gsd-core/bin/lib/markdown-sectionizer.cjs +2 -1
- package/gsd-core/bin/lib/markdown-table.cjs +133 -20
- package/gsd-core/bin/lib/milestone-lock.cjs +248 -0
- package/gsd-core/bin/lib/milestone.cjs +754 -70
- package/gsd-core/bin/lib/model-catalog.cjs +59 -1
- package/gsd-core/bin/lib/model-resolver.cjs +183 -40
- package/gsd-core/bin/lib/normalize-test-command.cjs +1 -1
- package/gsd-core/bin/lib/pattern.cjs +122 -0
- package/gsd-core/bin/lib/phase-estimation.cjs +1 -1
- package/gsd-core/bin/lib/phase-id.cjs +444 -36
- package/gsd-core/bin/lib/phase-lifecycle.cjs +28 -3
- package/gsd-core/bin/lib/phase-locator.cjs +125 -18
- package/gsd-core/bin/lib/phase.cjs +646 -143
- package/gsd-core/bin/lib/plan-dependency-graph.cjs +72 -1
- package/gsd-core/bin/lib/plan-drift-guard.cjs +120 -0
- package/gsd-core/bin/lib/plan-scan.cjs +86 -2
- package/gsd-core/bin/lib/planning-scope.cjs +31 -0
- package/gsd-core/bin/lib/planning-snapshot.cjs +890 -0
- package/gsd-core/bin/lib/planning-workspace.cjs +56 -6
- package/gsd-core/bin/lib/probe-core.cjs +1 -1
- package/gsd-core/bin/lib/profile-output.cjs +1 -1
- package/gsd-core/bin/lib/refactor-trigger-command-router.cjs +740 -0
- package/gsd-core/bin/lib/retired-artifact-cleanup.cjs +11 -6
- package/gsd-core/bin/lib/review-lane-descriptor.cjs +13 -4
- package/gsd-core/bin/lib/review-lane-invocation.cjs +30 -0
- package/gsd-core/bin/lib/review-lane-runner.cjs +421 -66
- package/gsd-core/bin/lib/review-reviewer-selection.cjs +13 -18
- package/gsd-core/bin/lib/roadmap-command-router.cjs +34 -0
- package/gsd-core/bin/lib/roadmap-parser.cjs +943 -184
- package/gsd-core/bin/lib/roadmap-upgrade.cjs +37 -10
- package/gsd-core/bin/lib/roadmap.cjs +385 -94
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +608 -46
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +14 -2
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +426 -55
- package/gsd-core/bin/lib/runtime-config-adapter-registry.cjs +3 -2
- package/gsd-core/bin/lib/runtime-homes.cjs +69 -3
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +115 -3
- package/gsd-core/bin/lib/runtime-name-policy.cjs +3 -1
- package/gsd-core/bin/lib/runtime-slash.cjs +27 -9
- package/gsd-core/bin/lib/security.cjs +104 -5
- package/gsd-core/bin/lib/shell-command-projection.cjs +275 -3
- package/gsd-core/bin/lib/smart-entry.cjs +142 -22
- package/gsd-core/bin/lib/state-command-router.cjs +5 -1
- package/gsd-core/bin/lib/state-document.cjs +152 -8
- package/gsd-core/bin/lib/state-transition.cjs +371 -117
- package/gsd-core/bin/lib/state.cjs +1794 -357
- package/gsd-core/bin/lib/surface.cjs +23 -9
- package/gsd-core/bin/lib/text-lines.cjs +80 -0
- package/gsd-core/bin/lib/token-scanner.cjs +76 -0
- package/gsd-core/bin/lib/uat-predicate.cjs +9 -3
- package/gsd-core/bin/lib/uat.cjs +399 -56
- package/gsd-core/bin/lib/ui-frontend-evidence.cjs +157 -0
- package/gsd-core/bin/lib/ui-safety-gate.cjs +14 -5
- package/gsd-core/bin/lib/unusable-input.cjs +24 -0
- package/gsd-core/bin/lib/update-context.cjs +8 -2
- package/gsd-core/bin/lib/user-artifact-staging.cjs +705 -0
- package/gsd-core/bin/lib/validate.cjs +20 -6
- package/gsd-core/bin/lib/vendor/README.md +37 -0
- package/gsd-core/bin/lib/vendor/re2js.cjs +6480 -0
- package/gsd-core/bin/lib/vendor/re2js.d.cts +938 -0
- package/gsd-core/bin/lib/verification-command-router.cjs +2 -1
- package/gsd-core/bin/lib/verification.cjs +258 -8
- package/gsd-core/bin/lib/verify.cjs +368 -888
- package/gsd-core/bin/lib/workstream-inventory-builder.cjs +53 -32
- package/gsd-core/bin/lib/workstream-inventory.cjs +63 -10
- package/gsd-core/bin/lib/workstream.cjs +2 -2
- package/gsd-core/bin/lib/worktree-safety.cjs +176 -9
- package/gsd-core/bin/shared/config-defaults.manifest.json +1 -0
- package/gsd-core/bin/shared/config-schema.manifest.json +7 -1
- package/gsd-core/references/agent-contracts.md +43 -26
- package/gsd-core/references/checkpoints.md +2 -2
- package/gsd-core/references/context-budget.md +1 -1
- package/gsd-core/references/dispatch-isolation-gate.md +138 -0
- package/gsd-core/references/doc-conflict-engine.md +1 -1
- package/gsd-core/references/execute-mvp-tdd.md +3 -3
- package/gsd-core/references/execute-phase-between-wave-reset.md +6 -2
- package/gsd-core/references/execute-phase-context-guard.md +1 -1
- package/gsd-core/references/execute-phase-response-language.md +1 -1
- package/gsd-core/references/execute-phase-wave-guard.md +6 -2
- package/gsd-core/references/gate-prompts.md +1 -1
- package/gsd-core/references/git-planning-commit.md +2 -1
- package/gsd-core/references/loop-hook-dispatch.md +39 -2
- package/gsd-core/references/model-profiles.md +12 -4
- package/gsd-core/references/mvp-concepts.md +9 -9
- package/gsd-core/references/planner-guidance.md +3 -9
- package/gsd-core/references/planner-preconditions.md +1 -1
- package/gsd-core/references/planner-reviews.md +1 -1
- package/gsd-core/references/planning-config.md +8 -6
- package/gsd-core/references/revision-loop.md +1 -1
- package/gsd-core/references/specless-probe-fallback.md +1 -1
- package/gsd-core/references/universal-anti-patterns.md +3 -3
- package/gsd-core/references/verifier-phase-gates.md +192 -0
- package/gsd-core/references/verify-mvp-mode.md +1 -1
- package/gsd-core/references/workstream-flag.md +22 -6
- package/gsd-core/templates/discussion-log.md +1 -1
- package/gsd-core/templates/phase-prompt.md +2 -4
- package/gsd-core/templates/state.md +4 -4
- package/gsd-core/templates/verification-report.md +9 -1
- package/gsd-core/workflows/ai-integration-phase.md +9 -11
- package/gsd-core/workflows/autonomous.md +1 -1
- package/gsd-core/workflows/cleanup.md +62 -3
- package/gsd-core/workflows/code-review/steps/structural-pre-pass.md +13 -3
- package/gsd-core/workflows/code-review-fix.md +37 -10
- package/gsd-core/workflows/code-review.md +38 -12
- package/gsd-core/workflows/complete-milestone.md +141 -18
- package/gsd-core/workflows/debug.md +7 -5
- package/gsd-core/workflows/diagnose-issues.md +35 -9
- package/gsd-core/workflows/discuss-phase/modes/chain.md +2 -1
- package/gsd-core/workflows/discuss-phase/modes/default.md +1 -1
- package/gsd-core/workflows/discuss-phase-assumptions.md +2 -1
- package/gsd-core/workflows/edit-phase.md +26 -1
- package/gsd-core/workflows/eval-review.md +3 -5
- package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +31 -6
- package/gsd-core/workflows/execute-phase/steps/per-plan-executor-routing.md +77 -0
- package/gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +2 -0
- package/gsd-core/workflows/execute-phase.md +38 -50
- package/gsd-core/workflows/execute-plan.md +36 -4
- package/gsd-core/workflows/explore.md +131 -4
- package/gsd-core/workflows/fast.md +10 -2
- package/gsd-core/workflows/health.md +73 -4
- package/gsd-core/workflows/import.md +4 -4
- package/gsd-core/workflows/ingest-docs.md +5 -5
- package/gsd-core/workflows/mvp-phase.md +6 -3
- package/gsd-core/workflows/new-milestone.md +14 -9
- package/gsd-core/workflows/new-project.md +14 -14
- package/gsd-core/workflows/next.md +12 -0
- package/gsd-core/workflows/plan-phase.md +41 -17
- package/gsd-core/workflows/plan-review-convergence.md +50 -2
- package/gsd-core/workflows/progress.md +34 -6
- package/gsd-core/workflows/quick/steps/plan-checker-loop.md +4 -4
- package/gsd-core/workflows/quick/steps/quick-verification.md +27 -6
- package/gsd-core/workflows/quick/steps/research-phase.md +2 -2
- package/gsd-core/workflows/quick.md +35 -15
- package/gsd-core/workflows/review.md +26 -5
- package/gsd-core/workflows/secure-phase.md +1 -1
- package/gsd-core/workflows/session-report.md +2 -1
- package/gsd-core/workflows/settings.md +66 -2
- package/gsd-core/workflows/ship.md +104 -44
- package/gsd-core/workflows/spec-phase.md +30 -12
- package/gsd-core/workflows/sync-skills.md +63 -8
- package/gsd-core/workflows/transition.md +46 -11
- package/gsd-core/workflows/ui-phase.md +5 -5
- package/gsd-core/workflows/ui-review.md +2 -2
- package/gsd-core/workflows/update.md +1 -1
- package/gsd-core/workflows/validate-phase.md +1 -1
- package/gsd-core/workflows/verify-work.md +9 -7
- package/hooks/dist/gsd-agent-isolation-guard.js +103 -14
- package/hooks/dist/gsd-check-update-worker.js +56 -13
- package/hooks/dist/gsd-check-update.js +19 -1
- package/hooks/dist/gsd-cursor-pre-tool.js +0 -3
- package/hooks/dist/gsd-cursor-subagent-start.js +77 -2
- package/hooks/dist/gsd-cursor-subagent-stop.js +3 -2
- package/hooks/dist/gsd-prompt-guard.js +21 -20
- package/hooks/dist/gsd-read-injection-scanner.js +38 -24
- package/hooks/dist/gsd-statusline.js +18 -0
- package/hooks/dist/gsd-update-banner.js +22 -1
- package/hooks/dist/gsd-workflow-guard.js +134 -36
- package/hooks/dist/lib/git-cmd.js +92 -59
- package/hooks/dist/lib/injection-patterns.js +45 -0
- package/hooks/dist/lib/isolation-deny-reason.js +39 -0
- package/hooks/dist/lib/isolation-sentinel.js +9 -0
- package/hooks/gsd-agent-isolation-guard.js +103 -14
- package/hooks/gsd-check-update-worker.js +56 -13
- package/hooks/gsd-check-update.js +19 -1
- package/hooks/gsd-cursor-pre-tool.js +0 -3
- package/hooks/gsd-cursor-subagent-start.js +77 -2
- package/hooks/gsd-cursor-subagent-stop.js +3 -2
- package/hooks/gsd-prompt-guard.js +21 -20
- package/hooks/gsd-read-injection-scanner.js +38 -24
- package/hooks/gsd-statusline.js +18 -0
- package/hooks/gsd-update-banner.js +22 -1
- package/hooks/gsd-workflow-guard.js +134 -36
- package/hooks/lib/git-cmd.js +92 -59
- package/hooks/lib/injection-patterns.js +45 -0
- package/hooks/lib/isolation-deny-reason.js +39 -0
- package/hooks/lib/isolation-sentinel.js +9 -0
- package/package.json +21 -9
- package/pi/gsd.cjs +19 -5
- package/scripts/baselines/planning-prompt-drift-baseline.json +4 -0
- package/scripts/baselines/planning-snapshot-bypass-baseline.json +12 -0
- package/scripts/baselines/unreachable-guard-drift-baseline.json +4 -0
- package/scripts/changeset/lint.cjs +60 -5
- package/scripts/check-alias-drift.cjs +7 -43
- package/scripts/check-contract-drift.cjs +297 -0
- package/scripts/ci-test-scope.cjs +19 -2
- package/scripts/command-contract-helpers.cjs +903 -1
- package/scripts/gen-adr-index.cjs +728 -38
- package/scripts/gen-capability-registry.cjs +3 -15
- package/scripts/gen-context-index.cjs +2 -11
- package/scripts/gen-health-docs.cjs +390 -0
- package/scripts/gen-inventory-manifest.cjs +50 -4
- package/scripts/gen-loop-host-contract.cjs +4 -24
- package/scripts/gen-registry.cjs +3 -14
- package/scripts/lib/alias-drift-families.cjs +46 -0
- package/scripts/lib/drift-scan.cjs +278 -0
- package/scripts/lint-allow-test-rule-refs.allowlist.json +1 -26
- package/scripts/lint-allow-test-rule-refs.effective-ceiling.json +4 -0
- package/scripts/lint-allow-test-rule-refs.unverified-ceiling.json +3 -0
- package/scripts/lint-canary-version-leak.cjs +73 -0
- package/scripts/lint-command-contract.cjs +96 -13
- package/scripts/lint-completion-predicate-drift.cjs +933 -0
- package/scripts/lint-completion-ratio-drift.cjs +214 -0
- package/scripts/lint-default-flip-documentation.cjs +193 -0
- package/scripts/lint-eslint-glob-coverage.allowlist.json +34 -0
- package/scripts/lint-eslint-glob-coverage.cjs +340 -0
- package/scripts/lint-frontmatter-scalar-broad-grep.cjs +237 -0
- package/scripts/lint-health-diagnostic-rule-table.cjs +404 -0
- package/scripts/lint-hooks-runtime-build-seam.cjs +262 -0
- package/scripts/lint-milestone-window-drift.cjs +468 -0
- package/scripts/lint-phase-enumeration-drift.cjs +479 -0
- package/scripts/lint-plan-count-drift.cjs +318 -0
- package/scripts/lint-planning-artifact-writer-drift.cjs +398 -0
- package/scripts/lint-planning-prompt-drift.cjs +434 -0
- package/scripts/lint-planning-snapshot-bypass-drift.cjs +544 -0
- package/scripts/lint-regression-test-names.cjs +15 -13
- package/scripts/lint-removed-but-needed.cjs +320 -0
- package/scripts/lint-state-field-drift.cjs +805 -0
- package/scripts/lint-state-write-path-drift.cjs +1045 -0
- package/scripts/lint-test-file-count.allowlist.json +21 -10
- package/scripts/lint-unreachable-guard-drift.cjs +843 -0
- package/scripts/lint-vendored-deps.cjs +124 -0
- package/scripts/pr-changed-files.cjs +63 -0
- package/scripts/pr-template-policy.cjs +14 -4
- package/scripts/prompt-injection-scan.sh +25 -0
- package/scripts/require-issue-link-policy.cjs +192 -0
- package/scripts/state-write-path-drift-baseline.json +19 -0
- package/scripts/sync-runtime-launcher.cjs +2 -4
- package/skills/gsd-autonomous/SKILL.md +0 -1
- package/skills/gsd-code-review/SKILL.md +1 -1
- package/skills/gsd-execute-phase/SKILL.md +1 -2
- package/skills/gsd-map-codebase/SKILL.md +1 -1
- package/skills/gsd-mempalace-capture/SKILL.md +1 -1
- package/skills/gsd-mempalace-recall/SKILL.md +1 -1
- package/skills/gsd-new-milestone/SKILL.md +1 -1
- package/skills/gsd-next/SKILL.md +0 -1
- package/skills/gsd-plan-phase/SKILL.md +0 -1
- package/skills/gsd-progress/SKILL.md +0 -1
- package/skills/gsd-quick/SKILL.md +1 -1
- package/skills/gsd-review-backlog/SKILL.md +2 -1
- package/skills/gsd-stats/SKILL.md +0 -1
- package/skills/gsd-verify-work/SKILL.md +1 -1
- package/vscode/package.json +1 -1
- package/gsd-core/workflows/discovery-phase.md +0 -298
- package/gsd-core/workflows/plan-milestone-gaps.md +0 -281
- package/gsd-core/workflows/verify-phase.md +0 -574
- package/scripts/affected-tests-lib.cjs +0 -554
- package/scripts/lint-allow-test-rule-refs.cjs +0 -162
- package/scripts/run-affected-tests.cjs +0 -7
- package/scripts/run-tests.cjs +0 -1051
|
@@ -8,38 +8,55 @@ This doc describes what IS, not what should be. Casing inconsistencies are docum
|
|
|
8
8
|
|
|
9
9
|
## Agent Registry
|
|
10
10
|
|
|
11
|
-
| Agent | Role | Completion Markers |
|
|
12
|
-
|
|
13
|
-
| gsd-
|
|
14
|
-
| gsd-
|
|
15
|
-
| gsd-
|
|
16
|
-
| gsd-
|
|
17
|
-
| gsd-
|
|
18
|
-
| gsd-
|
|
19
|
-
| gsd-
|
|
20
|
-
| gsd-
|
|
21
|
-
| gsd-
|
|
22
|
-
| gsd-
|
|
23
|
-
| gsd-ui-
|
|
24
|
-
| gsd-
|
|
25
|
-
| gsd-
|
|
26
|
-
| gsd-
|
|
27
|
-
| gsd-
|
|
28
|
-
| gsd-
|
|
29
|
-
| gsd-
|
|
30
|
-
| gsd-
|
|
31
|
-
| gsd-
|
|
32
|
-
| gsd-
|
|
33
|
-
| gsd-
|
|
34
|
-
| gsd-
|
|
11
|
+
| Agent | Role | Completion Markers | Consumed by | Kind |
|
|
12
|
+
|-------|------|--------------------|--------------|------|
|
|
13
|
+
| gsd-ai-researcher | AI framework research | No marker (writes the AI-SPEC.md framework section via Edit) | `gsd-core/workflows/ai-integration-phase.md` reads the AI-SPEC.md section after the agent returns | artifact+query |
|
|
14
|
+
| gsd-planner | Plan creation | `## PLANNING COMPLETE`, `## OUTLINE COMPLETE`, `## PHASE SPLIT RECOMMENDED`, `## ⚠ Source Audit`, `## CHECKPOINT REACHED`, `## PLANNING INCONCLUSIVE` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md`, `gsd-core/workflows/plan-review-convergence.md`, `gsd-core/workflows/quick.md` | sentinel-match |
|
|
15
|
+
| gsd-executor | Plan execution | `## PLAN COMPLETE`, `## CHECKPOINT REACHED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md`, `agents/gsd-debug-session-manager.md`, `agents/gsd-debugger.md` | sentinel-match |
|
|
16
|
+
| gsd-phase-researcher | Phase-scoped research | `## RESEARCH COMPLETE`, `## RESEARCH BLOCKED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/research-phase.md`, `agents/gsd-project-researcher.md` | sentinel-match |
|
|
17
|
+
| gsd-project-researcher | Project-wide research | `## RESEARCH COMPLETE`, `## RESEARCH BLOCKED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/research-phase.md`, `agents/gsd-phase-researcher.md` | sentinel-match |
|
|
18
|
+
| gsd-plan-checker | Plan validation | `## VERIFICATION PASSED`, `## ISSUES FOUND` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/ui-phase.md`, `gsd-core/workflows/verify-work.md`, `agents/gsd-ui-checker.md` | sentinel-match |
|
|
19
|
+
| gsd-research-synthesizer | Multi-research synthesis | `## SYNTHESIS COMPLETE`, `## SYNTHESIS BLOCKED` (unconsumed: blocked-research return — spawners detect failure via the #222 SUMMARY.md-on-disk check, no dispatch branch keys on the marker) | `gsd-core/workflows/new-milestone.md`, `gsd-core/workflows/new-project.md` | sentinel-match |
|
|
20
|
+
| gsd-debugger | Debug investigation | `## DEBUG COMPLETE`, `## ROOT CAUSE FOUND`, `## CHECKPOINT REACHED`, `## INVESTIGATION INCONCLUSIVE`, `## TDD CHECKPOINT`, `## FIX REJECTED BY GUARDRAIL` | `agents/gsd-debug-session-manager.md`, `gsd-core/workflows/diagnose-issues.md`, `gsd-core/workflows/plan-phase.md`, `agents/gsd-executor.md` | sentinel-match |
|
|
21
|
+
| gsd-debug-session-manager | Debug checkpoint loop | `## DEBUG SESSION COMPLETE`, `## CONTINUE_REQUIRED` | `gsd-core/workflows/debug.md` | sentinel-match |
|
|
22
|
+
| gsd-roadmapper | Roadmap creation/revision | `## ROADMAP CREATED`, `## ROADMAP REVISED`, `## ROADMAP BLOCKED`, `## ROADMAP DRAFT` (unconsumed: draft-presentation format the shipped execution flow never invokes — Step 8 returns `## ROADMAP CREATED`; retained for interactive draft review) | `gsd-core/workflows/new-milestone.md`, `gsd-core/workflows/new-project.md` | sentinel-match |
|
|
23
|
+
| gsd-ui-auditor | UI review | `## UI REVIEW COMPLETE` | `gsd-core/workflows/ui-review.md` | sentinel-match |
|
|
24
|
+
| gsd-ui-checker | UI validation | `## ISSUES FOUND`, `## UI-SPEC VERIFIED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/ui-phase.md`, `gsd-core/workflows/verify-work.md`, `agents/gsd-plan-checker.md` | sentinel-match |
|
|
25
|
+
| gsd-ui-researcher | UI spec creation | `## UI-SPEC COMPLETE`, `## UI-SPEC BLOCKED` | `gsd-core/workflows/ui-phase.md` | sentinel-match |
|
|
26
|
+
| gsd-verifier | Post-execution verification | `## Verification Complete` (unconsumed: Marker Rule 2 recorded decision — intentional title-case marker; completion is detected via the artifact route, nothing matches the marker) | `*-VERIFICATION.md` artifact + `gsd_run query verification.status` in `gsd-core/workflows/verify-work.md` | artifact+query |
|
|
27
|
+
| gsd-integration-checker | Cross-phase integration check | `## Integration Check Complete` (unconsumed: Marker Rule 2 recorded decision — intentional title-case marker; the auditor reads the inline report, nothing matches the marker) | `gsd-core/workflows/audit-milestone.md` reads the agent's inline return text directly (agent has no Write tool -- it cannot write an artifact) | structured-return |
|
|
28
|
+
| gsd-nyquist-auditor | Sampling audit | `## PARTIAL`, `## ESCALATE`, `## GAPS FILLED` (non-standard) | `gsd-core/workflows/validate-phase.md`, `gsd-core/workflows/secure-phase.md`, `agents/gsd-security-auditor.md` | sentinel-match |
|
|
29
|
+
| gsd-security-auditor | Security audit | `## OPEN_THREATS`, `## ESCALATE`, `## SECURED` (non-standard) | `gsd-core/workflows/secure-phase.md`, `gsd-core/workflows/validate-phase.md`, `agents/gsd-nyquist-auditor.md` | sentinel-match |
|
|
30
|
+
| gsd-codebase-mapper | Codebase analysis | No marker (writes docs directly) | `.planning/codebase/*.md` artifacts, checked via `ls`/`wc -l` in `gsd-core/workflows/map-codebase.md` | artifact+query |
|
|
31
|
+
| gsd-code-fixer | Applies code-review fixes | No marker (fix commits + REVIEW.md updates) | `gsd-core/workflows/code-review-fix.md` reads REVIEW.md resolution state + git log | artifact+query |
|
|
32
|
+
| gsd-code-reviewer | Source-code review | No marker (writes REVIEW.md) | `gsd-core/workflows/code-review.md` reads REVIEW.md | artifact+query |
|
|
33
|
+
| gsd-assumptions-analyzer | Assumption extraction | No marker (returns `## Assumptions` sections) | `gsd-core/workflows/discuss-phase-assumptions.md` reads the inline `## Assumptions` sections from the agent's return | structured-return |
|
|
34
|
+
| gsd-doc-classifier | Planning-doc classification | No marker (writes `.planning/intel/classifications/*.json`) | `gsd-core/workflows/ingest-docs.md` reads the classification JSON | artifact+query |
|
|
35
|
+
| gsd-doc-verifier | Doc validation | No marker (writes JSON to `.planning/tmp/`) | `.planning/tmp/verify-{doc_filename}.json` artifact, read by `gsd-core/workflows/docs-update.md` | artifact+query |
|
|
36
|
+
| gsd-doc-writer | Doc generation | No marker (writes docs directly) | generated doc files, consumed by `gsd-core/workflows/docs-update.md` and `gsd-core/workflows/docs-update/steps/dispatch-monorepo-packages.md` | artifact+query |
|
|
37
|
+
| gsd-domain-researcher | Domain research | No marker (writes the AI-SPEC.md domain section via Edit) | `gsd-core/workflows/ai-integration-phase.md` reads the AI-SPEC.md section after the agent returns | artifact+query |
|
|
38
|
+
| gsd-eval-auditor | Evaluation coverage audit | No marker (writes the REVIEW.md audit section) | `gsd-core/workflows/eval-review.md` reads REVIEW.md | artifact+query |
|
|
39
|
+
| gsd-eval-planner | Evaluation strategy design | No marker (writes the AI-SPEC.md evaluation section via Edit) | `gsd-core/workflows/ai-integration-phase.md` reads the AI-SPEC.md section after the agent returns | artifact+query |
|
|
40
|
+
| gsd-framework-selector | Framework decision matrix | No marker (returns the interactive decision matrix inline) | `gsd-core/workflows/ai-integration-phase.md` reads the returned matrix | structured-return |
|
|
41
|
+
| gsd-advisor-researcher | Advisory research | No marker (utility agent) | `gsd-core/workflows/discuss-phase/modes/advisor.md` reads the inline comparison table from the agent's return | structured-return |
|
|
42
|
+
| gsd-user-profiler | User profiling | No marker (returns JSON in analysis tags) | `gsd-core/workflows/profile-user.md` extracts the inline `<analysis>` JSON block from the agent's return | structured-return |
|
|
43
|
+
| gsd-intel-updater | Codebase intelligence analysis | No marker (`.planning/intel/*.json` artifacts) | `.planning/intel/*.json` artifacts, read via `gsd_run intel query` / `intel validate` (no `*.md` workflow currently spawns this agent -- see `docs/adr/22-plan-drift-guard.md`, "never auto-spawned") | artifact+query |
|
|
44
|
+
| gsd-mempalace-curator | Ship-time MemPalace curation | No marker (writes the session diary + cross-links) | `gsd-core/workflows/ship.md` reads the diary artifacts | artifact+query |
|
|
45
|
+
| gsd-pattern-mapper | Codebase pattern mapping | `## PATTERN MAPPING COMPLETE` | `gsd-core/workflows/plan-phase.md` (also spawned by `gsd-core/workflows/settings.md`) | sentinel-match |
|
|
46
|
+
| gsd-doc-synthesizer | Doc synthesis for `/gsd:ingest-docs` | No marker (SYNTHESIS.md and INGEST-CONFLICTS.md artifacts) | `.planning/intel/SYNTHESIS.md` and `.planning/INGEST-CONFLICTS.md` artifacts, read by `gsd-core/workflows/ingest-docs.md` | artifact+query |
|
|
35
47
|
|
|
36
48
|
## Marker Rules
|
|
37
49
|
|
|
38
50
|
1. **ALL-CAPS markers** (e.g., `## PLANNING COMPLETE`) are the standard convention
|
|
39
|
-
2. **Title-case markers
|
|
51
|
+
2. **Title-case markers in gsd-verifier and gsd-integration-checker are intentional as-is, not bugs — a recorded decision.** Their rows are `artifact+query`/`structured-return` (completion is detected through the row's `Kind` route), and the markers are carried as `(unconsumed: Marker Rule 2 recorded decision …)` annotations: an auditable exemption, never deleted and never silently passed. `## Synthesis Complete` in gsd-doc-synthesizer was NOT covered by this rule; #3565 deleted it deliberately because it case-collides with gsd-research-synthesizer's `## SYNTHESIS COMPLETE` and nothing matched it
|
|
40
52
|
3. **Non-standard markers** (e.g., `## PARTIAL`, `## ESCALATE`) in audit agents indicate partial results requiring orchestrator judgment
|
|
41
|
-
4.
|
|
53
|
+
4. **`Kind` describes how a caller actually detects an agent's completion, and is exactly one of:**
|
|
54
|
+
- `sentinel-match` -- a workflow, command, or another agent detects completion by an exact-case string match against a declared marker
|
|
55
|
+
- `artifact+query` -- the agent writes a file (report, JSON, generated doc) and the caller reads or queries that artifact instead of matching any marker text
|
|
56
|
+
- `structured-return` -- the agent has no way to write files (no `Write` tool) or simply doesn't; it returns parseable sections, a table, or JSON inline, and the caller reads that return text directly
|
|
42
57
|
5. Markers must appear as H2 headings (`## `) at the start of a line in the agent's final output
|
|
58
|
+
6. The `Consumed by` / `Kind` columns are machine-enforced by `check:contract-drift` (`scripts/check-contract-drift.cjs`), which cross-checks this table against what each `agents/*.md` file actually emits in-fence and what every `gsd-core/workflows/**`, `commands/**`, and `agents/**` file actually consumes. Update this table whenever an agent's return contract changes -- a stale row is a violation the check will report, not something to leave for later.
|
|
59
|
+
7. A marker entry annotated `(unconsumed: <reason>)` is emitted deliberately but matched by no workflow, command, or agent — e.g. `## ROADMAP DRAFT`, a presentation format a human approves interactively. The check still verifies the marker is declared **and** emitted, and still counts it for case-collision purposes; only the consumer requirement is waived. Use it for display formats, never to silence a real orphan.
|
|
43
60
|
|
|
44
61
|
## Key Handoff Contracts
|
|
45
62
|
|
|
@@ -9,14 +9,14 @@ Plans execute autonomously. Checkpoints formalize interaction points where human
|
|
|
9
9
|
3. **User only does what requires human judgment** - Visual checks, UX evaluation, "does this feel right?"
|
|
10
10
|
4. **Secrets come from user, automation comes from Claude** - Ask for API keys, then Claude uses them via CLI
|
|
11
11
|
5. **Auto-mode bypasses verification/decision checkpoints** — When `workflow._auto_chain_active` or `workflow.auto_advance` is true in config: human-verify auto-approves, decision auto-selects first option, human-action still stops (auth gates cannot be automated)
|
|
12
|
-
6. **`gate="blocking-human"` is never auto-approved** — a checkpoint carrying this gate stops for a human in *every* mode, including auto-mode, regardless of its type. Rule 5 does not apply to it.
|
|
12
|
+
6. **`gate="blocking-human"` is never auto-approved** — a checkpoint carrying this gate stops for a human in *every* mode, including auto-mode, regardless of its type. Rule 5 does not apply to it. The executor's precondition-unmet checkpoint (a task's `<precondition>` evaluated false — unmet `user_setup` step, missing env var, absent prior-phase artifact) reports this gate (#3210).
|
|
13
13
|
|
|
14
14
|
**The `gate` attribute:**
|
|
15
15
|
|
|
16
16
|
| Value | Auto-mode behavior | Use for |
|
|
17
17
|
|-------|--------------------|---------|
|
|
18
18
|
| `gate="blocking"` | Bypassed per rule 5 (human-verify auto-approves, decision auto-selects) | The default. Post-hoc verification and implementation choices that are safe to take the recommended path on when unattended. |
|
|
19
|
-
| `gate="blocking-human"` | **Never bypassed.** Stops for a human in auto-mode too. | Irreversible or trust-establishing steps a human must actually see: package-legitimacy verification before install,
|
|
19
|
+
| `gate="blocking-human"` | **Never bypassed.** Stops for a human in auto-mode too. | Irreversible or trust-establishing steps a human must actually see: package-legitimacy verification before install, any decision whose default answer would be wrong to assume, and unmet `<precondition>` facts the executor cannot establish on its own (#3210). |
|
|
20
20
|
|
|
21
21
|
Reach for `gate="blocking-human"` whenever auto-approving the checkpoint would defeat its purpose. If the checkpoint exists because a human must *decide* something, `blocking` is the wrong gate — auto-mode will decide it for them.
|
|
22
22
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Standard rules for keeping orchestrator context lean. Reference this in workflows that spawn subagents or read significant content.
|
|
4
4
|
|
|
5
|
-
See also: `references/universal-anti-patterns.md` for the complete set of universal rules.
|
|
5
|
+
See also: `gsd-core/references/universal-anti-patterns.md` for the complete set of universal rules.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Dispatch isolation gate (ADR-1239 / #2584)
|
|
2
|
+
|
|
3
|
+
The single source of truth for **how a dispatch site decides whether it may run an agent
|
|
4
|
+
isolated**. Every workflow that spawns an executor-like subagent reads this file and follows
|
|
5
|
+
it, rather than restating the rule inline (#2652).
|
|
6
|
+
|
|
7
|
+
`ISOLATION` — not `RUNTIME` — is the decision variable. **Never branch a dispatch site on a
|
|
8
|
+
runtime id.** Isolation is a negotiated capability declared per host; a runtime-name test
|
|
9
|
+
silently diverges the moment a new host declares support, which is exactly how #2652 happened:
|
|
10
|
+
`quick.md` and `diagnose-issues.md` kept a `RUNTIME != "claude"` gate after #2584 migrated the
|
|
11
|
+
phase scheduler, so Codex — which declares `orchestrator-worktree` — was refused isolation it
|
|
12
|
+
had in fact negotiated.
|
|
13
|
+
|
|
14
|
+
## Resolve ISOLATION
|
|
15
|
+
|
|
16
|
+
Run this in the dispatch site's config-gate step, right after `RUNTIME` / `USE_WORKTREES` are
|
|
17
|
+
read. It requires `gsd_run` to be defined (the standard shim preamble).
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Isolation is a NEGOTIATED CAPABILITY, not a runtime id (#2584). Fail-closed to none.
|
|
21
|
+
# #3045: this call PERSISTS the resolution to the run-scoped sentinel the isolation
|
|
22
|
+
# guard hooks read, as an unconditional side effect of resolving it.
|
|
23
|
+
# Keep the resolver's own failure DISTINGUISHABLE from a genuine `none`. Both
|
|
24
|
+
# fail closed — that policy is right — but only one of them may claim the host
|
|
25
|
+
# declared no primitive. A shim-resolution failure, a non-zero exit or empty
|
|
26
|
+
# stdout is NOT a capability verdict, and reporting it as one tells a Claude
|
|
27
|
+
# Code user their runtime "declares no executor-isolation primitive", which is
|
|
28
|
+
# false (#2652 review).
|
|
29
|
+
_ISOLATION_RAW=$(gsd_run query dispatch-isolation --raw 2>/dev/null)
|
|
30
|
+
_ISOLATION_RC=$?
|
|
31
|
+
if [ $_ISOLATION_RC -ne 0 ] || [ -z "$_ISOLATION_RAW" ]; then
|
|
32
|
+
ISOLATION=none
|
|
33
|
+
ISOLATION_RESOLVED=false # fail closed, but we did NOT learn a verdict
|
|
34
|
+
else
|
|
35
|
+
ISOLATION="$_ISOLATION_RAW"
|
|
36
|
+
ISOLATION_RESOLVED=true
|
|
37
|
+
fi
|
|
38
|
+
case "$ISOLATION" in
|
|
39
|
+
harness-worktree|orchestrator-worktree|none) ;;
|
|
40
|
+
*) ISOLATION=none; ISOLATION_RESOLVED=false ;; # out of vocabulary is not a verdict either
|
|
41
|
+
esac
|
|
42
|
+
|
|
43
|
+
# Project-level opt-out wins on every host; a host with no primitive fails closed.
|
|
44
|
+
[ "$USE_WORKTREES" = "false" ] && ISOLATION=none
|
|
45
|
+
if [ "$ISOLATION" = "none" ] && [ "$USE_WORKTREES" != "false" ]; then
|
|
46
|
+
if [ "$ISOLATION_RESOLVED" = "true" ]; then
|
|
47
|
+
echo "FATAL: runtime '$RUNTIME' declares no executor-isolation primitive (dispatch.isolation=none) — agents would run unisolated against the main checkout. Set workflow.use_worktrees=false." >&2
|
|
48
|
+
else
|
|
49
|
+
echo "FATAL: could not resolve this runtime's executor-isolation capability — 'gsd_run query dispatch-isolation' failed or returned nothing, so GSD cannot tell whether isolation is available. Refusing to dispatch rather than guess (a guard that cannot verify must not answer 'safe'). Re-run once the gsd-tools shim resolves, or set workflow.use_worktrees=false to run sequentially on purpose." >&2
|
|
50
|
+
fi
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
# Re-record: the opt-out above is decided in shell, where the resolver cannot see
|
|
55
|
+
# it, so the sentinel still asserts the naturally-resolved mode. See "Re-record
|
|
56
|
+
# after every degrade" below — this is the first of the mandatory calls.
|
|
57
|
+
gsd_run query dispatch-isolation --raw --force-isolation "$ISOLATION" >/dev/null 2>&1 || true
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
| `ISOLATION` | Meaning | What a dispatch site does |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `harness-worktree` | The host's own harness creates and binds a worktree per agent. | Pass the host's declared `harnessFlag` on the dispatch. GSD runs no git. |
|
|
63
|
+
| `orchestrator-worktree` | No harness primitive, but a headless exec accepting a working directory. | GSD creates the worktree and process-spawns the agent into it. GSD performs every git operation. |
|
|
64
|
+
| `none` | No isolation primitive. | Run inline, sequentially. |
|
|
65
|
+
|
|
66
|
+
Fail-closed is the invariant: an undeclared, unknown, or unresolvable declaration degrades to
|
|
67
|
+
`none`, never to an unsafe parallel path.
|
|
68
|
+
|
|
69
|
+
## Resolve the harness flag (harness-worktree only)
|
|
70
|
+
|
|
71
|
+
The flag is descriptor data — never hardcode `isolation="worktree"`, which is Claude Code's
|
|
72
|
+
literal and wrong on any other harness-worktree host (Cursor declares the same capability).
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
HARNESS_FLAG=""
|
|
76
|
+
if [ "$ISOLATION" = "harness-worktree" ]; then
|
|
77
|
+
HARNESS_FLAG=$(gsd_run query dispatch-isolation --json 2>/dev/null \
|
|
78
|
+
| node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{const j=JSON.parse(s);process.stdout.write(j&&j.harnessFlag?j.harnessFlag:"")}catch{process.stdout.write("")}})')
|
|
79
|
+
[ -n "$HARNESS_FLAG" ] || { echo "FATAL: runtime declares dispatch.isolation=harness-worktree but no harnessIsolationFlag — refusing to dispatch an agent that would believe it is isolated." >&2; exit 1; }
|
|
80
|
+
fi
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Substitute `$HARNESS_FLAG` for the `{harnessFlag}` placeholder in the dispatch call. On Claude
|
|
84
|
+
Code it resolves to literally `isolation="worktree"`.
|
|
85
|
+
|
|
86
|
+
## Single-agent dispatch sites
|
|
87
|
+
|
|
88
|
+
`quick.md` and `diagnose-issues.md` spawn through the host's own subagent tool, which can only
|
|
89
|
+
express the `harness-worktree` model. On an `orchestrator-worktree` host they must degrade to
|
|
90
|
+
sequential rather than pass a harness flag the host will ignore — dispatching unisolated while
|
|
91
|
+
reporting isolation is the one outcome worse than running sequentially:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
if [ "$ISOLATION" = "orchestrator-worktree" ]; then
|
|
95
|
+
echo "⚠ Runtime '$RUNTIME' declares dispatch.isolation=orchestrator-worktree, which requires GSD-driven process spawning. This dispatch site uses the host subagent tool, so it is running sequentially on the main working tree instead. Parallel wave execution (/gsd:execute-phase) is unaffected." >&2
|
|
96
|
+
ISOLATION=none
|
|
97
|
+
USE_WORKTREES=false
|
|
98
|
+
gsd_run query dispatch-isolation --raw --force-isolation none >/dev/null 2>&1 || true
|
|
99
|
+
fi
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Re-record after every degrade
|
|
103
|
+
|
|
104
|
+
**Any block that changes `$ISOLATION` after the resolve above MUST re-record it before
|
|
105
|
+
dispatch.** This is not optional bookkeeping — it is what keeps the dispatch legal.
|
|
106
|
+
|
|
107
|
+
`query dispatch-isolation` writes the mode it resolved into a run-scoped sentinel
|
|
108
|
+
(`.gsd/dispatch-isolation-sentinel.json`) as an unconditional side effect, and the shipped
|
|
109
|
+
`PreToolUse` isolation guards read that sentinel at the instant of the dispatch call
|
|
110
|
+
(`hooks/gsd-agent-isolation-guard.js`, `hooks/gsd-cursor-subagent-start.js`, shared reader
|
|
111
|
+
`hooks/lib/isolation-sentinel.js`, #3045). Every degrade in this file is decided **in shell**,
|
|
112
|
+
where the resolver cannot see it. Degrade without re-recording and the sentinel still asserts
|
|
113
|
+
`harness-worktree` while the dispatch correctly omits the harness flag — the guard reads that
|
|
114
|
+
as a dropped isolation flag and **denies the dispatch with exit 2**. The task does not run
|
|
115
|
+
unisolated; it does not run at all.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
gsd_run query dispatch-isolation --raw --force-isolation "$ISOLATION" >/dev/null 2>&1 || true
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
`--force-isolation` pushes the final, shell-computed value through the same single write path
|
|
122
|
+
(`none` also clears the stored `harnessFlag`, since none applies to sequential dispatch). It is
|
|
123
|
+
idempotent and last-write-wins, so a site that degrades more than once simply calls it again —
|
|
124
|
+
record immediately before dispatch so the sentinel is always fresh. Best-effort by design: a
|
|
125
|
+
write failure must never fail the dispatch, since the guards' sentinel-absent fallback is safe,
|
|
126
|
+
just less precise.
|
|
127
|
+
|
|
128
|
+
Wave sites re-record per plan rather than per phase — see
|
|
129
|
+
`gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md`.
|
|
130
|
+
|
|
131
|
+
Wave fan-out sites (`execute-phase`) implement both models — see
|
|
132
|
+
`gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md`.
|
|
133
|
+
|
|
134
|
+
## Base divergence
|
|
135
|
+
|
|
136
|
+
Any site that ends up with `ISOLATION != none` must also run the `worktree.base-check`
|
|
137
|
+
auto-degrade before dispatch (#683, #1369, #1941), or the agent's `worktree_branch_check` guard
|
|
138
|
+
halts on a stale fork base. `quick.md` and `execute-phase` do this today.
|
|
@@ -56,7 +56,7 @@ Exit WITHOUT writing any destination files. The gate must hold regardless of WAR
|
|
|
56
56
|
|
|
57
57
|
**If only WARNINGS and/or INFO (no blockers):**
|
|
58
58
|
|
|
59
|
-
Render the full report, then prompt for approval via the `approve-revise-abort` or `yes-no` pattern from `references/gate-prompts.md`. Respect text mode (see the workflow's own text-mode handling). If the user aborts, exit cleanly with a cancellation message.
|
|
59
|
+
Render the full report, then prompt for approval via the `approve-revise-abort` or `yes-no` pattern from `gsd-core/references/gate-prompts.md`. Respect text mode (see the workflow's own text-mode handling). If the user aborts, exit cleanly with a cancellation message.
|
|
60
60
|
|
|
61
61
|
**If the report is empty (no entries in any bucket):**
|
|
62
62
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## When this gate fires
|
|
6
6
|
|
|
7
|
-
- `MVP_MODE` is `true` (resolved from CLI flag → ROADMAP `**Mode:**` field → config; see `references/planner-mvp-mode.md`).
|
|
7
|
+
- `MVP_MODE` is `true` (resolved from CLI flag → ROADMAP `**Mode:**` field → config; see `gsd-core/references/planner-mvp-mode.md`).
|
|
8
8
|
- `TDD_MODE` is `true` (resolved from `--tdd` flag → `workflow.tdd_mode` config).
|
|
9
9
|
- The current task being executed has `tdd="true"` in its `<task>` frontmatter (set by the planner per Phase 1).
|
|
10
10
|
- The task's `<behavior>` block lists at least one expected behavior.
|
|
@@ -71,11 +71,11 @@ The `--force-mvp-gate` flag is documented but not introduced by this plan — it
|
|
|
71
71
|
|
|
72
72
|
## What this gate does NOT do
|
|
73
73
|
|
|
74
|
-
- It does not enforce REFACTOR commits. REFACTOR remains optional (per `references/tdd.md`).
|
|
74
|
+
- It does not enforce REFACTOR commits. REFACTOR remains optional (per `gsd-core/references/tdd.md`).
|
|
75
75
|
- It does not check test quality (the test could be trivially passing). That's the planner's job.
|
|
76
76
|
- It does not run tests. The executor only inspects git log + file system. Running tests is the implementation step's job.
|
|
77
77
|
- It does not gate config-only or doc-only tasks (see "behavior-adding task" definition).
|
|
78
78
|
|
|
79
79
|
## Compatibility with existing TDD discipline
|
|
80
80
|
|
|
81
|
-
This gate is additive to `references/tdd.md`. Tasks not under MVP+TDD continue to use the existing advisory TDD discipline (RED/GREEN/REFACTOR commits with end-of-phase review checkpoint). Only the runtime gate and the blocking escalation are new.
|
|
81
|
+
This gate is additive to `gsd-core/references/tdd.md`. Tasks not under MVP+TDD continue to use the existing advisory TDD discipline (RED/GREEN/REFACTOR commits with end-of-phase review checkpoint). Only the runtime gate and the blocking escalation are new.
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
7c. **Between-wave manifest reset and worktree base refresh (waves 2+ only — #1369):**
|
|
9
9
|
|
|
10
|
-
**REQUIRED before each wave transition when `USE_WORKTREES != "false"` and
|
|
10
|
+
**REQUIRED before each wave transition when `USE_WORKTREES != "false"` and
|
|
11
|
+
`ISOLATION = "harness-worktree"`** (#2652 — keyed on the negotiated isolation model, not the
|
|
12
|
+
runtime name).
|
|
11
13
|
|
|
12
14
|
Wave N's `WAVE_WORKTREE_MANIFEST` was consumed by `worktree.cleanup-wave` in step 5.5. It must be
|
|
13
15
|
unset so wave N+1's step 3 creates a fresh manifest for the new wave's worktrees. Without this,
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
# advanced. Re-assert worktree.baseRef:"head" (idempotent — no-op if already set) so the
|
|
27
29
|
# Claude Code harness re-reads the live HEAD on the next Agent(isolation="worktree") call
|
|
28
30
|
# rather than using a cached session-start commit as the fork base.
|
|
29
|
-
if [ "$
|
|
31
|
+
if [ "$ISOLATION" = "harness-worktree" ] && [ "$USE_WORKTREES" != "false" ]; then
|
|
30
32
|
gsd_run query worktree.set-baseref 2>/dev/null || true
|
|
31
33
|
|
|
32
34
|
# Safety re-check: evaluate degradation AFTER the wave N commits. If HEAD has diverged
|
|
@@ -37,7 +39,9 @@
|
|
|
37
39
|
_DEGRADE_MSG=$(gsd_run query worktree.base-check --pick message 2>/dev/null || true)
|
|
38
40
|
[ -n "$_DEGRADE_MSG" ] && printf '%s\n' "$_DEGRADE_MSG" >&2
|
|
39
41
|
printf 'Degrading to sequential mode for remaining waves: HEAD advanced past worktree fork base after wave %s merge (#1369).\n' "${N}" >&2
|
|
42
|
+
# Both must move together (#2652): dispatch keys on ISOLATION.
|
|
40
43
|
USE_WORKTREES=false
|
|
44
|
+
ISOLATION=none
|
|
41
45
|
fi
|
|
42
46
|
fi
|
|
43
47
|
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
0. **Context exhaustion guard — `context_guard` (BEFORE spawning, #1452):**
|
|
2
2
|
|
|
3
3
|
Before spawning any agents for this wave, self-assess context pressure using the
|
|
4
|
-
degradation signals in `references/context-budget.md`. Signs of POOR tier (70%+):
|
|
4
|
+
degradation signals in `gsd-core/references/context-budget.md`. Signs of POOR tier (70%+):
|
|
5
5
|
increasing vagueness, skipped steps, silent partial completion.
|
|
6
6
|
|
|
7
7
|
Read `workflow.context_guard_mode` from `.planning/config.json` (default `warn`).
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
|
|
5
5
|
The literal report templates embedded in this workflow (`## Execution Plan`, `## Phase {X}: {Name} Execution Complete`, `## ⚠ Phase {X}: {Name} — Gaps Found`, etc.) are a structural source, not literal output to copy verbatim — render their prose translated into `{response_language}` while keeping headings' structural markers, table columns, IDs, commands, and file paths unchanged.
|
|
6
6
|
|
|
7
|
-
This directive was extracted from `workflows/execute-phase.md` to keep that file under the frozen pre-phase-6 byte ceiling (ADR-857 Phase 6 capstone, `tests/
|
|
7
|
+
This directive was extracted from `workflows/execute-phase.md` to keep that file under the frozen pre-phase-6 byte ceiling (ADR-857 Phase 6 capstone, `tests/claude-orchestration.test.cjs`). The `@-reference` is eager, so the runtime still loads this content alongside the workflow — the extraction is purely a file-size discipline, not a lazy-load optimization.
|
|
@@ -7,16 +7,20 @@
|
|
|
7
7
|
immediately with a base-mismatch fatal.
|
|
8
8
|
|
|
9
9
|
**Run this check at the start of every wave when `USE_WORKTREES != "false"` and
|
|
10
|
-
`
|
|
10
|
+
`ISOLATION = "harness-worktree"`** (#2652 — the harness caches the fork base, so this is a
|
|
11
|
+
property of the isolation model, not of the runtime name; Cursor declares it too),
|
|
12
|
+
including Wave 1 (where it mirrors the initialize-step check):
|
|
11
13
|
|
|
12
14
|
```bash
|
|
13
|
-
if [ "$
|
|
15
|
+
if [ "$ISOLATION" = "harness-worktree" ] && [ "${USE_WORKTREES:-true}" != "false" ]; then
|
|
14
16
|
_WAVE_DEGRADE=$(gsd_run query worktree.base-check --pick shouldDegrade 2>/dev/null || true)
|
|
15
17
|
if [ "$_WAVE_DEGRADE" = "true" ]; then
|
|
16
18
|
_WAVE_DEGRADE_MSG=$(gsd_run query worktree.base-check --pick message 2>/dev/null || true)
|
|
17
19
|
[ -n "$_WAVE_DEGRADE_MSG" ] && printf '%s\n' "$_WAVE_DEGRADE_MSG" >&2
|
|
18
20
|
echo "⚠ [#1369] Worktree fork base diverged from orchestrator HEAD (wave merges advanced HEAD past origin/HEAD). Auto-degrading to sequential mode for this wave to avoid base-mismatch halts." >&2
|
|
21
|
+
# Both must move together (#2652): dispatch keys on ISOLATION.
|
|
19
22
|
USE_WORKTREES=false
|
|
23
|
+
ISOLATION=none
|
|
20
24
|
fi
|
|
21
25
|
fi
|
|
22
26
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Reusable prompt patterns for structured gate checks in workflows and agents.
|
|
4
4
|
|
|
5
|
-
**For checkpoint box format details, see `references/ui-brand.md`** -- checkpoint boxes use double-line border drawing with 62-character inner width.
|
|
5
|
+
**For checkpoint box format details, see `gsd-core/references/ui-brand.md`** -- checkpoint boxes use double-line border drawing with 62-character inner width.
|
|
6
6
|
|
|
7
7
|
## Rules
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ Always use this for `.planning/` files — it handles `commit_docs` and gitignor
|
|
|
12
12
|
gsd-tools query commit "docs({scope}): {description}" --files .planning/STATE.md .planning/ROADMAP.md
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
The CLI will return `skipped` (with reason) if `commit_docs` is `false
|
|
15
|
+
The CLI will return `skipped` (with reason) if `commit_docs` is `false`, `.planning/` is gitignored, or a per-phase `phase_commit_docs.<phase-id>` override resolves `false` for the phase being committed. No manual conditional checks needed.
|
|
16
16
|
|
|
17
17
|
## Amend previous commit
|
|
18
18
|
|
|
@@ -37,4 +37,5 @@ gsd-tools query commit "" --files .planning/codebase/*.md --amend
|
|
|
37
37
|
|
|
38
38
|
- `commit_docs: false` in config
|
|
39
39
|
- `.planning/` is gitignored
|
|
40
|
+
- `phase_commit_docs.<phase-id>` resolves `false` for the phase being committed — overrides the project-wide `commit_docs` for that phase only (reason `skipped_commit_docs_phase_false`)
|
|
40
41
|
- No changes to commit (check with `git status --porcelain .planning/`)
|
|
@@ -31,7 +31,7 @@ Inject `fragment.inline` verbatim into the context for the role named in `into`
|
|
|
31
31
|
|
|
32
32
|
### `step`
|
|
33
33
|
|
|
34
|
-
Dispatch the referenced unit
|
|
34
|
+
Dispatch the referenced unit. Exactly one of `ref.skill`, `ref.agent`, or `ref.command` is set.
|
|
35
35
|
|
|
36
36
|
- `ref.skill` present → dispatch via the Skill tool with skill id `gsd-<ref.skill>`.
|
|
37
37
|
- `ref.agent` present → dispatch via the Agent tool with `subagent_type` = `ref.agent`.
|
|
@@ -42,10 +42,47 @@ Dispatch the referenced unit:
|
|
|
42
42
|
◆ Spawning <agent>... (runs in a subagent — no output until it returns; expected, not a freeze)
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
- `ref.command` present → **validate it IN-CONTEXT first, before any shell use.** It comes
|
|
46
|
+
from a capability manifest, which may be third-party. Check the value you read from
|
|
47
|
+
`activeHooks` against `^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$` yourself — **never** by pasting
|
|
48
|
+
it into a shell command to be tested there, because a value carrying a quote, `;`,
|
|
49
|
+
`` ` ``, `$(`, or a newline would terminate the assignment and run as its own statement
|
|
50
|
+
before any shell-side check could execute. A value that fails is a malformed manifest:
|
|
51
|
+
record a warning, skip that hook, continue to the next entry. Only a value that has passed
|
|
52
|
+
is run, with the phase number appended:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
gsd_run ${ref.command} --phase "${PHASE_NUMBER}" --raw
|
|
56
|
+
```
|
|
57
|
+
|
|
45
58
|
Wait for the result before continuing to the next hook or the next step.
|
|
46
59
|
|
|
60
|
+
A `step` is **advisory by construction**: it never blocks or redirects the host workflow —
|
|
61
|
+
that is what a `gate` is for. Each dispatch is best-effort; on error record a warning and
|
|
62
|
+
continue, honoring `onError`.
|
|
63
|
+
|
|
64
|
+
**A point whose workflow hand-rolls one `kind` does not implement this contract.** Several
|
|
65
|
+
host workflows historically matched a single hook (e.g. `execute:post` matched only
|
|
66
|
+
`ref.skill == "code-review"`), so any other step registered there was declared and silently
|
|
67
|
+
never run. When a workflow defers to this file, it dispatches **every** active `step` entry,
|
|
68
|
+
not one shape of one.
|
|
69
|
+
|
|
47
70
|
### `gate`
|
|
48
71
|
|
|
72
|
+
**Validate `check` before any shell use.** `check.query` and `check.predicate` come from a
|
|
73
|
+
capability manifest, which may be third-party — and `gates[].check` is **not** one of the
|
|
74
|
+
executable surfaces the install consent prompt discloses (`hooks`, command modules,
|
|
75
|
+
`mcpServers`, reviewer lanes), so a capability can be consented to as declarative-only and
|
|
76
|
+
still reach a shell through a gate. Check the query value you read from `activeHooks` against
|
|
77
|
+
`^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$` yourself, IN-CONTEXT — **never** by pasting it into a
|
|
78
|
+
shell command to be tested there, because a value carrying a quote, `;`, a `` ` ``, `$(`, or a
|
|
79
|
+
newline would terminate the assignment and run as its own statement before any shell-side
|
|
80
|
+
check could execute. A value that fails is a malformed manifest: record a warning, route it
|
|
81
|
+
per the gate's `onError`, and do not run it. Pass `check.predicate` as a **single argv
|
|
82
|
+
element** for the same reason — never re-quote it into a shell string, where an apostrophe
|
|
83
|
+
would close the literal. This is the identical requirement `step` → `ref.command` carries
|
|
84
|
+
above; it was stated there and omitted here, which is the gap #3559 closed.
|
|
85
|
+
|
|
49
86
|
Evaluate `check` (one of `query`, `predicate`, or `agentVerdict`). Then honor `blocking`:
|
|
50
87
|
|
|
51
88
|
- `blocking: true` → if the check returns `block: true`, surface `check.message` to the user
|
|
@@ -53,7 +90,7 @@ Evaluate `check` (one of `query`, `predicate`, or `agentVerdict`). Then honor `b
|
|
|
53
90
|
- `blocking: false` → advisory only; surface the message but continue regardless of outcome.
|
|
54
91
|
|
|
55
92
|
Honor `onError` if the check itself errors: `skip` means treat as non-blocking and continue;
|
|
56
|
-
`
|
|
93
|
+
`halt` means surface the error and stop.
|
|
57
94
|
|
|
58
95
|
## Empty / absent `activeHooks`
|
|
59
96
|
|
|
@@ -219,10 +219,18 @@ is (highest → lowest):
|
|
|
219
219
|
6. Pass model parameter to Task call
|
|
220
220
|
```
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
from
|
|
225
|
-
`
|
|
222
|
+
`model` and `effort` resolve through different mechanisms at different
|
|
223
|
+
times — they do not share the ladder above. `model` resolves at runtime,
|
|
224
|
+
per spawn, from `.planning/config.json`; a config change takes effect on
|
|
225
|
+
the next spawn. `effort` (claude runtime) has its own cascade
|
|
226
|
+
(`agent_overrides` → `routing_tier_defaults` → `default`; see
|
|
227
|
+
`docs/CONFIGURATION.md` § "Where effort actually reaches") and is baked at
|
|
228
|
+
install time into the `effort:` frontmatter key of
|
|
229
|
+
`~/.claude/agents/gsd-*.md` — Claude Code's Agent tool has no per-spawn
|
|
230
|
+
effort parameter, so per-agent frontmatter is the only channel. An effort
|
|
231
|
+
config change has no effect until `node gsd-tools.cjs effort sync --apply`
|
|
232
|
+
re-syncs the agent files. Codex agents instead pin
|
|
233
|
+
`model_reasoning_effort` in `~/.codex/agents/*.toml` at install time.
|
|
226
234
|
|
|
227
235
|
## Per-Agent Overrides
|
|
228
236
|
|
|
@@ -8,12 +8,12 @@ Canonical domain terms for the concepts named below live in [CONTEXT.md](../../C
|
|
|
8
8
|
|
|
9
9
|
| File | Purpose | Loaded by |
|
|
10
10
|
|---|---|---|
|
|
11
|
-
| `references/planner-mvp-mode.md` | **Rules.** Vertical-slice planning rules, slice ordering, Walking Skeleton constraints. | `gsd-planner` agent when `MVP_MODE=true` |
|
|
12
|
-
| `references/skeleton-template.md` | **Template.** Shape of `SKELETON.md` for new-project Phase 1 under `--mvp`. | `gsd-planner` agent when the Walking Skeleton gate fires |
|
|
13
|
-
| `references/user-story-template.md` | **Template.** Format and slot definitions for `As a / I want to / So that`. | `gsd-mvp-phase` workflow during interactive prompting; `gsd-planner` when emitting the `## Phase Goal` header |
|
|
14
|
-
| `references/spidr-splitting.md` | **Splitting discipline.** Five-axis decomposition (Spike, Paths, Interfaces, Data, Rules) for stories too large for one phase. | `gsd-mvp-phase` workflow when the user story exceeds size threshold |
|
|
15
|
-
| `references/execute-mvp-tdd.md` | **Gate.** MVP+TDD runtime gate semantics: when it fires, what it checks, halt-and-report protocol, end-of-phase blocking escalation, Behavior-Adding Task definition. | `gsd-executor` agent when `MVP_MODE=true && TDD_MODE=true` |
|
|
16
|
-
| `references/verify-mvp-mode.md` | **UAT framing.** Three-section UAT structure (user-flow → technical → coverage), anti-patterns, `User Flow Coverage` section in VERIFICATION.md. | `gsd-verifier` agent when the phase under verification has `mode: mvp` |
|
|
11
|
+
| `gsd-core/references/planner-mvp-mode.md` | **Rules.** Vertical-slice planning rules, slice ordering, Walking Skeleton constraints. | `gsd-planner` agent when `MVP_MODE=true` |
|
|
12
|
+
| `gsd-core/references/skeleton-template.md` | **Template.** Shape of `SKELETON.md` for new-project Phase 1 under `--mvp`. | `gsd-planner` agent when the Walking Skeleton gate fires |
|
|
13
|
+
| `gsd-core/references/user-story-template.md` | **Template.** Format and slot definitions for `As a / I want to / So that`. | `gsd-mvp-phase` workflow during interactive prompting; `gsd-planner` when emitting the `## Phase Goal` header |
|
|
14
|
+
| `gsd-core/references/spidr-splitting.md` | **Splitting discipline.** Five-axis decomposition (Spike, Paths, Interfaces, Data, Rules) for stories too large for one phase. | `gsd-mvp-phase` workflow when the user story exceeds size threshold |
|
|
15
|
+
| `gsd-core/references/execute-mvp-tdd.md` | **Gate.** MVP+TDD runtime gate semantics: when it fires, what it checks, halt-and-report protocol, end-of-phase blocking escalation, Behavior-Adding Task definition. | `gsd-executor` agent when `MVP_MODE=true && TDD_MODE=true` |
|
|
16
|
+
| `gsd-core/references/verify-mvp-mode.md` | **UAT framing.** Three-section UAT structure (user-flow → technical → coverage), anti-patterns, `User Flow Coverage` section in VERIFICATION.md. | `gsd-verifier` agent when the phase under verification has `mode: mvp` |
|
|
17
17
|
|
|
18
18
|
## Concept-to-file map
|
|
19
19
|
|
|
@@ -22,10 +22,10 @@ If you're looking for the canonical statement of a concept, this is where to fin
|
|
|
22
22
|
- **MVP Mode resolution chain** — `workflows/plan-phase.md` Step 1 (CLI flag → roadmap → config → false). Mirrored in `execute-phase.md` and `verify-work.md`.
|
|
23
23
|
- **`**Mode:** mvp` parser** — `gsd-core/bin/lib/roadmap.cjs` (`searchPhaseInContent` + `cmdRoadmapAnalyze`). Workflows compare against the parser output, never re-parse.
|
|
24
24
|
- **User Story regex** — `/^As a .+, I want to .+, so that .+\.$/` — applied at runtime by `gsd-verifier` (the user-story-format guard) and `gsd-mvp-phase` (interactive validation).
|
|
25
|
-
- **Behavior-Adding Task predicate** — `references/execute-mvp-tdd.md` (the canonical three-check definition). Applied at runtime by `gsd-executor`.
|
|
25
|
+
- **Behavior-Adding Task predicate** — `gsd-core/references/execute-mvp-tdd.md` (the canonical three-check definition). Applied at runtime by `gsd-executor`.
|
|
26
26
|
- **Walking Skeleton gate condition** — `workflows/plan-phase.md` (Phase 1 + new project + `--mvp` + no prior summaries → emit `SKELETON.md`).
|
|
27
|
-
- **MVP+TDD Gate** (RED→GREEN enforcement) — `references/execute-mvp-tdd.md`.
|
|
28
|
-
- **MVP-mode UAT framing** (user-flow first, technical deferred) — `references/verify-mvp-mode.md`.
|
|
27
|
+
- **MVP+TDD Gate** (RED→GREEN enforcement) — `gsd-core/references/execute-mvp-tdd.md`.
|
|
28
|
+
- **MVP-mode UAT framing** (user-flow first, technical deferred) — `gsd-core/references/verify-mvp-mode.md`.
|
|
29
29
|
- **Per-phase mode authoring** — `workflows/mvp-phase.md` (writes `**Mode:** mvp` to ROADMAP.md after collecting the user story).
|
|
30
30
|
- **Project-wide mode prompt at init** — `workflows/new-project.md` (Vertical MVP vs Horizontal Layers question).
|
|
31
31
|
|
|
@@ -162,24 +162,18 @@ Derive plans from actual work. Granularity determines compression tolerance, not
|
|
|
162
162
|
Run `/clear` first for a fresh context window, then execute: `/gsd:execute-phase {phase}`
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
## Gap Closure
|
|
165
|
+
## Gap Closure Return (artifact-based — #3440)
|
|
166
166
|
|
|
167
|
-
|
|
168
|
-
## GAP CLOSURE PLANS CREATED
|
|
167
|
+
Gap-closure completion has **no completion marker**: nothing consumes one. The return contract is the artifacts themselves — `verify-work.md` spawns you in `--gaps` mode, and your output is complete when the fix plans are on disk carrying `gap_closure: true` in their frontmatter; the spawning workflow detects the files (never a return string), and `/gsd:execute-phase {phase} --gaps-only` consumes them. (The former `GAP CLOSURE PLANS CREATED` completion marker was retired as vestigial — it had no dispatch branch anywhere.)
|
|
169
168
|
|
|
170
169
|
**Phase:** {phase-name}
|
|
171
170
|
**Closing:** {N} gaps from {VERIFICATION|UAT}.md
|
|
172
171
|
|
|
173
|
-
### Plans
|
|
174
|
-
|
|
175
172
|
| Plan | Gaps Addressed | Files |
|
|
176
173
|
|------|----------------|-------|
|
|
177
174
|
| {phase}-04 | [gap truths] | [files] |
|
|
178
175
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
Execute: `/gsd:execute-phase {phase} --gaps-only`
|
|
182
|
-
```
|
|
176
|
+
**Next step for the orchestrator:** `/gsd:execute-phase {phase} --gaps-only`
|
|
183
177
|
|
|
184
178
|
## Checkpoint Reached / Revision Complete
|
|
185
179
|
|
|
@@ -121,7 +121,7 @@ The executor agent reads `<precondition>` before any other task work:
|
|
|
121
121
|
|---|---|
|
|
122
122
|
| **Absent** | No visible change — execute the task exactly as today. Back-compat for every existing plan. |
|
|
123
123
|
| **Met** | No visible change — proceed with the task. The precondition is logged in the SUMMARY only if it was non-trivial to verify. |
|
|
124
|
-
| **Unmet** | STOP — return a `checkpoint:human-verify` (use `checkpoint_return_format`) with `**Blocked by:** Precondition not met: <precondition text>`. Do NOT partial-commit the task. Unmet preconditions are NEVER auto-approved — a missing prerequisite is not a verification step a human can rubber-stamp, it is a fact the executor cannot establish on its own. |
|
|
124
|
+
| **Unmet** | STOP — return a `checkpoint:human-verify` reporting `**Gate:** blocking-human` (use `checkpoint_return_format`) with `**Blocked by:** Precondition not met: <precondition text>`. Do NOT partial-commit the task. Unmet preconditions are NEVER auto-approved — a missing prerequisite is not a verification step a human can rubber-stamp, it is a fact the executor cannot establish on its own. |
|
|
125
125
|
|
|
126
126
|
## Plan-structure validation
|
|
127
127
|
|
|
@@ -7,7 +7,7 @@ Triggered when orchestrator sets Mode to `reviews`. Replanning from scratch with
|
|
|
7
7
|
**Execution contract:** REVIEWS.md is audit trail and feedback input, not a second execution contract. /gsd:execute-phase primarily consumes PLAN.md plus the normal phase context. Every current actionable review finding must therefore be incorporated into the relevant PLAN.md or explicitly deferred/rejected in that PLAN.md.
|
|
8
8
|
|
|
9
9
|
### Step 1: Load REVIEWS.md
|
|
10
|
-
Read the reviews file from `<
|
|
10
|
+
Read the reviews file from `<required_reading>`. Parse:
|
|
11
11
|
- Per-reviewer feedback (strengths, concerns, suggestions)
|
|
12
12
|
- Consensus Summary (agreed concerns = highest priority to address)
|
|
13
13
|
- Divergent Views (investigate, make a judgment call)
|