@opengsd/gsd-core 1.12.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.opencode/plugins/gsd-core.js +12 -0
- package/agents/gsd-advisor-researcher.compact.md +85 -0
- package/agents/gsd-ai-researcher.compact.md +96 -0
- package/agents/gsd-assumptions-analyzer.compact.md +81 -0
- package/agents/gsd-code-fixer.compact.md +458 -0
- package/agents/gsd-code-fixer.md +5 -5
- package/agents/gsd-code-reviewer.compact.md +269 -0
- package/agents/gsd-code-reviewer.md +15 -3
- package/agents/gsd-codebase-mapper.compact.md +760 -0
- package/agents/gsd-debug-session-manager.compact.md +345 -0
- package/agents/gsd-doc-classifier.compact.md +192 -0
- package/agents/gsd-doc-synthesizer.compact.md +200 -0
- package/agents/gsd-doc-verifier.compact.md +143 -0
- package/agents/gsd-doc-writer.compact.md +440 -0
- package/agents/gsd-dom-verifier.compact.md +138 -0
- package/agents/gsd-domain-researcher.compact.md +141 -0
- package/agents/gsd-eval-auditor.compact.md +160 -0
- package/agents/gsd-eval-planner.compact.md +137 -0
- package/agents/gsd-executor.md +63 -35
- package/agents/gsd-framework-selector.compact.md +82 -0
- package/agents/gsd-integration-checker.compact.md +245 -0
- package/agents/gsd-intel-updater.compact.md +226 -0
- package/agents/gsd-mempalace-curator.compact.md +45 -0
- package/agents/gsd-nyquist-auditor.compact.md +179 -0
- package/agents/gsd-pattern-mapper.compact.md +275 -0
- package/agents/gsd-plan-checker.md +76 -57
- package/agents/gsd-planner.md +14 -0
- package/agents/gsd-project-researcher.compact.md +587 -0
- package/agents/gsd-research-synthesizer.compact.md +212 -0
- package/agents/gsd-roadmapper.compact.md +454 -0
- package/agents/gsd-roadmapper.md +13 -0
- package/agents/gsd-security-auditor.compact.md +162 -0
- package/agents/gsd-ui-auditor.compact.md +404 -0
- package/agents/gsd-ui-checker.compact.md +277 -0
- package/agents/gsd-ui-checker.md +19 -3
- package/agents/gsd-ui-researcher.compact.md +282 -0
- package/agents/gsd-ui-researcher.md +29 -0
- package/agents/gsd-user-profiler.compact.md +108 -0
- package/agents/gsd-verifier.md +23 -1
- package/bin/install.js +444 -134
- package/commands/gsd/cleanup.md +1 -0
- package/commands/gsd/code-review.md +2 -1
- package/commands/gsd/complete-milestone.md +1 -0
- package/commands/gsd/config.md +1 -0
- package/commands/gsd/debug.md +1 -0
- package/commands/gsd/execute-phase.md +1 -1
- package/commands/gsd/graphify.md +1 -0
- package/commands/gsd/health.md +1 -0
- package/commands/gsd/mempalace-capture.md +1 -0
- package/commands/gsd/mempalace-recall.md +1 -0
- package/commands/gsd/new-milestone.md +1 -0
- package/commands/gsd/new-project.md +1 -0
- package/commands/gsd/next.md +1 -0
- package/commands/gsd/ns-workflow.md +2 -1
- package/commands/gsd/pause-work.md +1 -0
- package/commands/gsd/phase.md +2 -1
- package/commands/gsd/pr-branch.md +1 -0
- package/commands/gsd/quick-batch.md +105 -0
- package/commands/gsd/resume-work.md +1 -0
- package/commands/gsd/review-backlog.md +1 -0
- package/commands/gsd/settings.md +2 -1
- package/commands/gsd/stats.md +1 -0
- package/commands/gsd/surface.md +18 -8
- package/commands/gsd/thread.md +1 -0
- package/commands/gsd/workspace.md +1 -0
- package/commands/gsd/workstreams.md +1 -0
- package/gsd-core/bin/check-latest-version.cjs +8 -3
- package/gsd-core/bin/gsd-tools.cjs +532 -174
- package/gsd-core/bin/lib/adr-parser.cjs +1 -1
- package/gsd-core/bin/lib/artifacts.cjs +2 -1
- package/gsd-core/bin/lib/audit.cjs +39 -22
- package/gsd-core/bin/lib/broken-windows.cjs +168 -49
- package/gsd-core/bin/lib/capability-activation.cjs +27 -0
- package/gsd-core/bin/lib/capability-lifecycle.cjs +10 -6
- package/gsd-core/bin/lib/capability-loader.cjs +135 -1
- package/gsd-core/bin/lib/capability-registry.cjs +528 -116
- package/gsd-core/bin/lib/capability-source.cjs +19 -2
- package/gsd-core/bin/lib/capability-state.cjs +7 -1
- package/gsd-core/bin/lib/capability-validator.cjs +134 -5
- package/gsd-core/bin/lib/capability-writer.cjs +14 -4
- package/gsd-core/bin/lib/check-command-router.cjs +198 -38
- package/gsd-core/bin/lib/claude-orchestration.cjs +10 -25
- package/gsd-core/bin/lib/clusters.cjs +1 -0
- package/gsd-core/bin/lib/code-review-depth.cjs +2 -2
- package/gsd-core/bin/lib/command-aliases.cjs +16 -0
- package/gsd-core/bin/lib/commands.cjs +981 -79
- package/gsd-core/bin/lib/config-loader.cjs +4 -0
- package/gsd-core/bin/lib/config.cjs +153 -38
- package/gsd-core/bin/lib/core-utils.cjs +34 -7
- package/gsd-core/bin/lib/coverage.cjs +1 -1
- package/gsd-core/bin/lib/decisions.cjs +343 -28
- package/gsd-core/bin/lib/edge-probe.cjs +14 -1
- package/gsd-core/bin/lib/external-descriptor-trust.cjs +29 -14
- package/gsd-core/bin/lib/file-overlap-partitioner.cjs +74 -0
- package/gsd-core/bin/lib/frontmatter.cjs +137 -23
- package/gsd-core/bin/lib/gap-checker.cjs +22 -13
- package/gsd-core/bin/lib/git-base-branch.cjs +10 -2
- package/gsd-core/bin/lib/gsd2-import.cjs +1 -2
- package/gsd-core/bin/lib/health-diagnostic-rules/phase-structure.cjs +8 -2
- package/gsd-core/bin/lib/health-diagnostic-rules/roadmap-disk-consistency.cjs +54 -11
- package/gsd-core/bin/lib/health-diagnostic-rules/state-consistency.cjs +87 -23
- package/gsd-core/bin/lib/health-diagnostic-rules/worktree-health.cjs +1 -1
- package/gsd-core/bin/lib/host-integration.cjs +57 -5
- package/gsd-core/bin/lib/init-command-router.cjs +14 -0
- package/gsd-core/bin/lib/init.cjs +539 -60
- package/gsd-core/bin/lib/install-engine.cjs +199 -14
- package/gsd-core/bin/lib/install-model-override-resolver.cjs +45 -0
- package/gsd-core/bin/lib/install-profiles.cjs +36 -14
- package/gsd-core/bin/lib/installer-migration-report.cjs +1 -0
- package/gsd-core/bin/lib/installer-migrations.cjs +33 -4
- package/gsd-core/bin/lib/io.cjs +35 -0
- package/gsd-core/bin/lib/loop-resolver.cjs +64 -39
- package/gsd-core/bin/lib/markdown-table.cjs +123 -0
- package/gsd-core/bin/lib/mcp-catalog.cjs +2 -2
- package/gsd-core/bin/lib/milestone.cjs +41 -10
- package/gsd-core/bin/lib/model-resolver.cjs +101 -10
- package/gsd-core/bin/lib/phase-command-router.cjs +20 -7
- package/gsd-core/bin/lib/phase-id.cjs +412 -31
- package/gsd-core/bin/lib/phase-lifecycle.cjs +61 -0
- package/gsd-core/bin/lib/phase.cjs +941 -98
- package/gsd-core/bin/lib/plan-document.cjs +10 -0
- package/gsd-core/bin/lib/planning-inspect.cjs +34 -18
- package/gsd-core/bin/lib/planning-snapshot.cjs +206 -30
- package/gsd-core/bin/lib/planning-workspace.cjs +153 -29
- package/gsd-core/bin/lib/pristine-baseline.cjs +182 -0
- package/gsd-core/bin/lib/prohibition-enforcement.cjs +91 -4
- package/gsd-core/bin/lib/quick-batch-command-router.cjs +285 -0
- package/gsd-core/bin/lib/quick-batch-dispatch.cjs +250 -0
- package/gsd-core/bin/lib/quick-batch.cjs +840 -0
- package/gsd-core/bin/lib/refactor-trigger-command-router.cjs +61 -2
- package/gsd-core/bin/lib/research-store.cjs +11 -12
- package/gsd-core/bin/lib/review-lane-descriptor.cjs +53 -5
- package/gsd-core/bin/lib/review-lane-invocation.cjs +96 -1
- package/gsd-core/bin/lib/review-lane-runner.cjs +136 -10
- package/gsd-core/bin/lib/reviewer-step-dispatch.cjs +337 -0
- package/gsd-core/bin/lib/roadmap-parser.cjs +555 -41
- package/gsd-core/bin/lib/roadmap.cjs +292 -69
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +260 -43
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +28 -20
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +294 -108
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +408 -47
- package/gsd-core/bin/lib/security.cjs +126 -7
- package/gsd-core/bin/lib/shell-command-projection.cjs +4 -0
- package/gsd-core/bin/lib/smart-entry.cjs +7 -9
- package/gsd-core/bin/lib/state-document.cjs +159 -32
- package/gsd-core/bin/lib/state-md-schema.cjs +44 -27
- package/gsd-core/bin/lib/state-transition.cjs +465 -62
- package/gsd-core/bin/lib/state.cjs +906 -151
- package/gsd-core/bin/lib/surface.cjs +83 -10
- package/gsd-core/bin/lib/task-command-router.cjs +12 -6
- package/gsd-core/bin/lib/tdd-red-evidence.cjs +133 -0
- package/gsd-core/bin/lib/uat.cjs +1420 -516
- package/gsd-core/bin/lib/update-context.cjs +36 -26
- package/gsd-core/bin/lib/validate.cjs +230 -12
- package/gsd-core/bin/lib/vendor/js-yaml.cjs +11 -3
- package/gsd-core/bin/lib/verification-command-router.cjs +2 -1
- package/gsd-core/bin/lib/verification.cjs +316 -23
- package/gsd-core/bin/lib/verify-command-grounding.cjs +1 -1
- package/gsd-core/bin/lib/verify-command-router.cjs +1 -0
- package/gsd-core/bin/lib/verify.cjs +531 -36
- package/gsd-core/bin/lib/workstream-inventory.cjs +21 -2
- package/gsd-core/bin/lib/worktree-safety.cjs +21 -7
- package/gsd-core/bin/shared/config-defaults.manifest.json +1 -0
- package/gsd-core/bin/shared/config-schema.manifest.json +13 -0
- package/gsd-core/bin/verify-reapply-patches.cjs +507 -81
- package/gsd-core/references/agent-contracts.md +3 -3
- package/gsd-core/references/compact-content-gate.md +66 -0
- package/gsd-core/references/edge-probe.md +17 -13
- package/gsd-core/references/execute-mvp-tdd.md +18 -16
- package/gsd-core/references/execute-phase-response-language.md +6 -0
- package/gsd-core/references/executor-examples.md +42 -0
- package/gsd-core/references/few-shot-examples/plan-checker.md +15 -15
- package/gsd-core/references/loop-hook-dispatch.md +18 -0
- package/gsd-core/references/model-profiles.md +12 -3
- package/gsd-core/references/mvp-concepts.md +2 -2
- package/gsd-core/references/plan-checker-examples.md +41 -0
- package/gsd-core/references/planner-antipatterns.md +25 -0
- package/gsd-core/references/planner-chunked.md +5 -1
- package/gsd-core/references/planner-coupling.md +42 -0
- package/gsd-core/references/planner-quick-batch.md +71 -0
- package/gsd-core/references/planner-reviews.md +47 -0
- package/gsd-core/references/planner-revision.md +75 -2
- package/gsd-core/references/planning-config.md +5 -1
- package/gsd-core/references/response-language-directive.md +9 -0
- package/gsd-core/references/revision-loop.md +118 -11
- package/gsd-core/references/tdd.md +17 -9
- package/gsd-core/references/thinking-models-planning.md +18 -2
- package/gsd-core/references/verification-patterns.md +17 -4
- package/gsd-core/references/verifier-evidence-gate.md +160 -0
- package/gsd-core/references/worktree-path-safety.md +112 -2
- package/gsd-core/templates/README.md +7 -1
- package/gsd-core/templates/phase-prompt.md +4 -0
- package/gsd-core/templates/state.md +6 -3
- package/gsd-core/templates/summary.compact.md +212 -0
- package/gsd-core/templates/user-setup.compact.md +199 -0
- package/gsd-core/templates/user-setup.md +0 -9
- package/gsd-core/templates/verification-report.md +5 -0
- package/gsd-core/workflows/add-backlog.md +2 -0
- package/gsd-core/workflows/add-phase.md +2 -0
- package/gsd-core/workflows/add-tests.md +1 -1
- package/gsd-core/workflows/add-todo.md +4 -3
- package/gsd-core/workflows/ai-integration-phase.md +1 -1
- package/gsd-core/workflows/analyze-dependencies.md +2 -0
- package/gsd-core/workflows/audit-fix.md +2 -0
- package/gsd-core/workflows/audit-milestone.md +2 -0
- package/gsd-core/workflows/audit-uat.md +2 -0
- package/gsd-core/workflows/autonomous.md +15 -10
- package/gsd-core/workflows/check-todos.md +5 -3
- package/gsd-core/workflows/cleanup.md +4 -2
- package/gsd-core/workflows/code-review/steps/structural-pre-pass.md +22 -13
- package/gsd-core/workflows/code-review-fix.md +5 -3
- package/gsd-core/workflows/code-review.md +211 -43
- package/gsd-core/workflows/complete-milestone/detail/elaboration.md +274 -0
- package/gsd-core/workflows/complete-milestone.md +40 -254
- package/gsd-core/workflows/debug.md +1 -1
- package/gsd-core/workflows/diagnose-issues.md +5 -1
- package/gsd-core/workflows/discuss-phase/modes/advisor.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/all.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/analyze.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/auto.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/batch.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/chain.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/default.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/power.md +2 -0
- package/gsd-core/workflows/discuss-phase/modes/text.md +2 -0
- package/gsd-core/workflows/discuss-phase/templates/context.md +2 -0
- package/gsd-core/workflows/discuss-phase/templates/discussion-log.md +2 -0
- package/gsd-core/workflows/discuss-phase-assumptions.md +1 -1
- package/gsd-core/workflows/discuss-phase-power.md +2 -0
- package/gsd-core/workflows/discuss-phase.md +1 -1
- package/gsd-core/workflows/do.md +43 -13
- package/gsd-core/workflows/docs-update/detail/elaboration.md +179 -0
- package/gsd-core/workflows/docs-update.md +15 -156
- package/gsd-core/workflows/edit-phase.md +2 -0
- package/gsd-core/workflows/eval-review.md +1 -1
- package/gsd-core/workflows/execute-phase/detail/elaboration.md +124 -0
- package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +20 -3
- package/gsd-core/workflows/execute-phase/steps/completion-reconciliation.md +56 -0
- package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +24 -3
- package/gsd-core/workflows/execute-phase/steps/executor-progress-policy.md +43 -0
- package/gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +8 -2
- package/gsd-core/workflows/execute-phase/steps/regression-gate-run.md +2 -0
- package/gsd-core/workflows/execute-phase/steps/sequential-root-pin.md +35 -0
- package/gsd-core/workflows/execute-phase/steps/tdd-applicability-resolution.md +25 -0
- package/gsd-core/workflows/execute-phase/steps/worktree-recovery-policy.md +2 -0
- package/gsd-core/workflows/execute-phase.md +78 -159
- package/gsd-core/workflows/execute-plan.md +28 -15
- package/gsd-core/workflows/explore.md +2 -0
- package/gsd-core/workflows/extract-learnings.md +2 -0
- package/gsd-core/workflows/fast.md +6 -0
- package/gsd-core/workflows/forensics.md +2 -0
- package/gsd-core/workflows/graduation.md +1 -1
- package/gsd-core/workflows/health.md +1 -1
- package/gsd-core/workflows/help/modes/brief.md +2 -0
- package/gsd-core/workflows/help/modes/default.md +2 -0
- package/gsd-core/workflows/help/modes/full.compact.md +398 -0
- package/gsd-core/workflows/help/modes/full.md +12 -0
- package/gsd-core/workflows/help/modes/topic.md +2 -0
- package/gsd-core/workflows/help.md +3 -1
- package/gsd-core/workflows/import.md +3 -3
- package/gsd-core/workflows/inbox.md +1 -1
- package/gsd-core/workflows/ingest-docs.md +1 -1
- package/gsd-core/workflows/insert-phase.md +2 -0
- package/gsd-core/workflows/list-phase-assumptions.md +2 -0
- package/gsd-core/workflows/list-seeds.md +2 -0
- package/gsd-core/workflows/list-workspaces.md +2 -0
- package/gsd-core/workflows/manager.md +3 -3
- package/gsd-core/workflows/map-codebase.md +52 -3
- package/gsd-core/workflows/milestone-summary.md +2 -0
- package/gsd-core/workflows/mvp-phase.md +1 -1
- package/gsd-core/workflows/new-milestone.md +55 -13
- package/gsd-core/workflows/new-project/detail/elaboration.md +216 -0
- package/gsd-core/workflows/new-project.md +37 -205
- package/gsd-core/workflows/new-workspace.md +1 -1
- package/gsd-core/workflows/next.md +2 -0
- package/gsd-core/workflows/node-repair.md +2 -0
- package/gsd-core/workflows/note.md +2 -0
- package/gsd-core/workflows/onboard.md +1 -1
- package/gsd-core/workflows/pause-work.md +19 -4
- package/gsd-core/workflows/plan-phase/detail/elaboration.md +209 -0
- package/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +100 -18
- package/gsd-core/workflows/plan-phase/steps/prd-express-path.md +2 -0
- package/gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md +9 -0
- package/gsd-core/workflows/plan-phase.md +144 -185
- package/gsd-core/workflows/plan-review-convergence.md +102 -10
- package/gsd-core/workflows/plant-seed.md +1 -1
- package/gsd-core/workflows/pr-branch.md +30 -10
- package/gsd-core/workflows/profile-user.md +1 -1
- package/gsd-core/workflows/progress/steps/forensic-audit.md +1 -1
- package/gsd-core/workflows/progress.md +25 -3
- package/gsd-core/workflows/quick/steps/plan-checker-loop.md +37 -2
- package/gsd-core/workflows/quick/steps/research-phase.md +3 -3
- package/gsd-core/workflows/quick-batch/steps/batch-init.md +55 -0
- package/gsd-core/workflows/quick-batch/steps/completion.md +65 -0
- package/gsd-core/workflows/quick-batch/steps/merge-wave.md +100 -0
- package/gsd-core/workflows/quick-batch/steps/plan-checker-loop.md +147 -0
- package/gsd-core/workflows/quick-batch/steps/planner-wave.md +158 -0
- package/gsd-core/workflows/quick-batch/steps/research-phase.md +95 -0
- package/gsd-core/workflows/quick-batch/steps/resume-mode.md +49 -0
- package/gsd-core/workflows/quick-batch/steps/verification-wave.md +73 -0
- package/gsd-core/workflows/quick-batch/steps/worktree-dispatch.md +169 -0
- package/gsd-core/workflows/quick-batch.md +203 -0
- package/gsd-core/workflows/quick.md +21 -4
- package/gsd-core/workflows/reapply-patches.md +79 -3
- package/gsd-core/workflows/remove-phase.md +2 -0
- package/gsd-core/workflows/remove-workspace.md +1 -1
- package/gsd-core/workflows/resume-project.md +6 -2
- package/gsd-core/workflows/review.md +215 -10
- package/gsd-core/workflows/scan.md +2 -0
- package/gsd-core/workflows/section-manifest.json +12 -0
- package/gsd-core/workflows/secure-phase.md +1 -1
- package/gsd-core/workflows/session-report.md +2 -0
- package/gsd-core/workflows/settings-advanced.md +2 -0
- package/gsd-core/workflows/settings-integrations.md +9 -8
- package/gsd-core/workflows/settings.md +19 -6
- package/gsd-core/workflows/ship.md +10 -10
- package/gsd-core/workflows/sketch-wrap-up.md +2 -0
- package/gsd-core/workflows/sketch.md +1 -1
- package/gsd-core/workflows/smart-entry.md +1 -1
- package/gsd-core/workflows/spec-phase.md +24 -19
- package/gsd-core/workflows/spike-wrap-up.md +2 -0
- package/gsd-core/workflows/spike.md +1 -1
- package/gsd-core/workflows/stats.md +2 -0
- package/gsd-core/workflows/sync-skills.md +12 -4
- package/gsd-core/workflows/thread.md +2 -0
- package/gsd-core/workflows/transition.md +2 -0
- package/gsd-core/workflows/ui-phase.md +26 -5
- package/gsd-core/workflows/ui-review.md +1 -1
- package/gsd-core/workflows/ultraplan-phase.md +2 -0
- package/gsd-core/workflows/undo.md +1 -1
- package/gsd-core/workflows/update.md +48 -43
- package/gsd-core/workflows/validate-phase.md +1 -1
- package/gsd-core/workflows/verify-work/detail/elaboration.md +230 -0
- package/gsd-core/workflows/verify-work.md +68 -182
- package/hooks/dist/gsd-agent-isolation-guard.js +42 -16
- package/hooks/dist/gsd-check-update-worker.js +19 -2
- package/hooks/dist/gsd-context-monitor.js +371 -27
- package/hooks/dist/gsd-cursor-subagent-start.js +34 -14
- package/hooks/dist/gsd-node-runner.sh +1 -0
- package/hooks/dist/gsd-prompt-guard.js +30 -5
- package/hooks/dist/gsd-read-guard.js +2 -0
- package/hooks/dist/gsd-read-injection-scanner.js +5 -5
- package/hooks/dist/gsd-secret-read-guard.js +1105 -0
- package/hooks/dist/gsd-statusline.js +18 -10
- package/hooks/dist/gsd-validate-commit.sh +474 -7
- package/hooks/dist/gsd-workflow-guard.js +2 -1
- package/hooks/dist/gsd-worktree-path-guard.js +25 -14
- package/hooks/dist/gsd-write-guard.js +46 -1
- package/hooks/dist/lib/dispatch-identity.js +187 -0
- package/hooks/dist/lib/filename-classification.js +64 -0
- package/hooks/dist/lib/git-cmd.js +210 -1
- package/hooks/dist/lib/injection-patterns.js +36 -6
- package/hooks/dist/lib/isolation-deny-reason.js +53 -1
- package/hooks/dist/lib/isolation-sentinel.js +58 -19
- package/hooks/dist/managed-hooks-registry.cjs +1 -0
- package/hooks/gsd-agent-isolation-guard.js +42 -16
- package/hooks/gsd-check-update-worker.js +19 -2
- package/hooks/gsd-context-monitor.js +371 -27
- package/hooks/gsd-cursor-subagent-start.js +34 -14
- package/hooks/gsd-node-runner.sh +1 -0
- package/hooks/gsd-prompt-guard.js +30 -5
- package/hooks/gsd-read-guard.js +2 -0
- package/hooks/gsd-read-injection-scanner.js +5 -5
- package/hooks/gsd-secret-read-guard.js +1105 -0
- package/hooks/gsd-statusline.js +18 -10
- package/hooks/gsd-validate-commit.sh +474 -7
- package/hooks/gsd-workflow-guard.js +2 -1
- package/hooks/gsd-worktree-path-guard.js +25 -14
- package/hooks/gsd-write-guard.js +46 -1
- package/hooks/hooks.json +6 -0
- package/hooks/lib/dispatch-identity.js +187 -0
- package/hooks/lib/filename-classification.js +64 -0
- package/hooks/lib/git-cmd.js +210 -1
- package/hooks/lib/injection-patterns.js +36 -6
- package/hooks/lib/isolation-deny-reason.js +53 -1
- package/hooks/lib/isolation-sentinel.js +58 -19
- package/hooks/managed-hooks-registry.cjs +1 -0
- package/package.json +13 -9
- package/scripts/benchmark-compact-content-variants.cjs +298 -0
- package/scripts/benchmark-compact-content.cjs +368 -0
- package/scripts/build-hooks.js +11 -4
- package/scripts/check-contract-drift.cjs +4 -1
- package/scripts/check-env.cjs +36 -8
- package/scripts/check-glossary-refs.cjs +25 -21
- package/scripts/ci-next-health.cjs +271 -0
- package/scripts/ci-prepare-test-scope.cjs +7 -7
- package/scripts/ci-test-scope.cjs +133 -20
- package/scripts/ci-timeout-report.cjs +1 -1
- package/scripts/diff-touches-shipped-paths.cjs +1 -1
- package/scripts/docs-guard-registry.cjs +17 -2
- package/scripts/gen-adr-index.cjs +8 -2
- package/scripts/gen-inventory-manifest.cjs +12 -0
- package/scripts/gen-loop-host-contract.cjs +67 -15
- package/scripts/gen-platform-conformance-tier.cjs +557 -0
- package/scripts/lib/drift-scan.cjs +1 -1
- package/scripts/lib/macos-conformance-tier.generated.cjs +210 -0
- package/scripts/lib/npm-version-check-diagnosis.cjs +59 -0
- package/scripts/lib/platform-conformance-tier.generated.cjs +276 -0
- package/scripts/lib/shellcheck-fetch.cjs +247 -0
- package/scripts/lib/suite-detection.cjs +32 -0
- package/scripts/lint-allow-test-rule-refs.allowlist.json +0 -6
- package/scripts/lint-allow-test-rule-refs.effective-ceiling.json +1 -1
- package/scripts/lint-allow-test-rule-refs.unverified-ceiling.json +1 -1
- package/scripts/lint-allowed-tools-parity.cjs +221 -0
- package/scripts/lint-docs-guard-registration.exempt-baseline.cjs +24 -2
- package/scripts/lint-phase-enumeration-drift.cjs +24 -6
- package/scripts/lint-phase-id-drift.cjs +465 -15
- package/scripts/lint-portable-grep.cjs +176 -0
- package/scripts/lint-response-language-coverage.cjs +530 -0
- package/scripts/lint-source-test-name-collision.cjs +1 -1
- package/scripts/lint-test-file-count.allowlist.json +4 -1
- package/scripts/lint-vendored-deps.cjs +128 -17
- package/scripts/lint-workflow-shellcheck-baseline.json +1112 -0
- package/scripts/lint-workflow-shellcheck.cjs +614 -0
- package/scripts/npm-audit-baseline.cjs +376 -0
- package/scripts/prompt-injection-scan.sh +22 -0
- package/scripts/require-issue-link-policy.cjs +16 -1
- package/scripts/workflow-size.cjs +139 -0
- package/skills/gsd-cleanup/SKILL.md +1 -0
- package/skills/gsd-code-review/SKILL.md +2 -1
- package/skills/gsd-complete-milestone/SKILL.md +1 -0
- package/skills/gsd-config/SKILL.md +1 -0
- package/skills/gsd-debug/SKILL.md +1 -0
- package/skills/gsd-execute-phase/SKILL.md +1 -1
- package/skills/gsd-graphify/SKILL.md +1 -0
- package/skills/gsd-health/SKILL.md +1 -0
- package/skills/gsd-mempalace-capture/SKILL.md +1 -0
- package/skills/gsd-mempalace-recall/SKILL.md +1 -0
- package/skills/gsd-new-milestone/SKILL.md +1 -0
- package/skills/gsd-new-project/SKILL.md +1 -0
- package/skills/gsd-next/SKILL.md +1 -0
- package/skills/gsd-ns-workflow/SKILL.md +1 -0
- package/skills/gsd-pause-work/SKILL.md +1 -0
- package/skills/gsd-phase/SKILL.md +2 -1
- package/skills/gsd-pr-branch/SKILL.md +1 -0
- package/skills/gsd-quick-batch/SKILL.md +105 -0
- package/skills/gsd-resume-work/SKILL.md +1 -0
- package/skills/gsd-review-backlog/SKILL.md +1 -0
- package/skills/gsd-settings/SKILL.md +2 -1
- package/skills/gsd-stats/SKILL.md +1 -0
- package/skills/gsd-surface/SKILL.md +18 -8
- package/skills/gsd-thread/SKILL.md +1 -0
- package/skills/gsd-workspace/SKILL.md +1 -0
- package/skills/gsd-workstreams/SKILL.md +1 -0
- package/vscode/package.json +1 -1
- package/gsd-core/templates/claude-md.md +0 -145
- package/gsd-core/templates/codebase/concerns.md +0 -310
- package/gsd-core/templates/codebase/conventions.md +0 -307
- package/gsd-core/templates/codebase/integrations.md +0 -280
- package/gsd-core/templates/codebase/structure.md +0 -285
- package/gsd-core/templates/codebase/testing.md +0 -480
- package/gsd-core/templates/debug-subagent-prompt.md +0 -91
- package/gsd-core/templates/discovery.md +0 -146
|
@@ -11,11 +11,11 @@ This doc describes what IS, not what should be. Casing inconsistencies are docum
|
|
|
11
11
|
| Agent | Role | Completion Markers | Consumed by | Kind |
|
|
12
12
|
|-------|------|--------------------|--------------|------|
|
|
13
13
|
| gsd-ai-researcher | AI framework research | No marker (writes the AI-SPEC.md framework section via Edit) | `gsd-core/workflows/ai-integration-phase.md` reads the AI-SPEC.md section after the agent returns | artifact+query |
|
|
14
|
-
| gsd-planner | Plan creation | `## PLANNING COMPLETE`, `## OUTLINE COMPLETE`, `## PHASE SPLIT RECOMMENDED`, `## ⚠ Source Audit`, `## CHECKPOINT REACHED`, `## PLANNING INCONCLUSIVE` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md`, `gsd-core/workflows/plan-review-convergence.md`, `gsd-core/workflows/quick.md` | sentinel-match |
|
|
14
|
+
| gsd-planner | Plan creation | `## PLANNING COMPLETE`, `## OUTLINE COMPLETE`, `## PHASE SPLIT RECOMMENDED`, `## ⚠ Source Audit`, `## CHECKPOINT REACHED`, `## PLANNING INCONCLUSIVE`, `## REVISION_CONFLICT` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md`, `gsd-core/workflows/plan-review-convergence.md`, `gsd-core/workflows/quick.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/verify-work.md` | sentinel-match |
|
|
15
15
|
| gsd-executor | Plan execution | `## PLAN COMPLETE`, `## CHECKPOINT REACHED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md`, `agents/gsd-debug-session-manager.md`, `agents/gsd-debugger.md` | sentinel-match |
|
|
16
16
|
| gsd-phase-researcher | Phase-scoped research | `## RESEARCH COMPLETE`, `## RESEARCH BLOCKED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/research-phase.md`, `agents/gsd-project-researcher.md` | sentinel-match |
|
|
17
17
|
| gsd-project-researcher | Project-wide research | `## RESEARCH COMPLETE`, `## RESEARCH BLOCKED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/research-phase.md`, `agents/gsd-phase-researcher.md` | sentinel-match |
|
|
18
|
-
| gsd-plan-checker | Plan validation | `## VERIFICATION PASSED`, `## ISSUES FOUND` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/ui-phase.md`, `gsd-core/workflows/verify-work.md`, `agents/gsd-ui-checker.md` | sentinel-match |
|
|
18
|
+
| gsd-plan-checker | Plan validation | `## VERIFICATION PASSED`, `## ISSUES FOUND` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/import.md`, `gsd-core/workflows/ui-phase.md`, `gsd-core/workflows/verify-work.md`, `agents/gsd-ui-checker.md` | sentinel-match |
|
|
19
19
|
| gsd-research-synthesizer | Multi-research synthesis | `## SYNTHESIS COMPLETE`, `## SYNTHESIS BLOCKED` (unconsumed: blocked-research return — spawners detect failure via the #222 SUMMARY.md-on-disk check, no dispatch branch keys on the marker) | `gsd-core/workflows/new-milestone.md`, `gsd-core/workflows/new-project.md` | sentinel-match |
|
|
20
20
|
| gsd-debugger | Debug investigation | `## DEBUG COMPLETE`, `## ROOT CAUSE FOUND`, `## CHECKPOINT REACHED`, `## INVESTIGATION INCONCLUSIVE`, `## TDD CHECKPOINT`, `## FIX REJECTED BY GUARDRAIL` | `agents/gsd-debug-session-manager.md`, `gsd-core/workflows/diagnose-issues.md`, `gsd-core/workflows/plan-phase.md`, `agents/gsd-executor.md` | sentinel-match |
|
|
21
21
|
| gsd-debug-session-manager | Debug checkpoint loop | `## DEBUG SESSION COMPLETE`, `## CONTINUE_REQUIRED` | `gsd-core/workflows/debug.md` | sentinel-match |
|
|
@@ -23,7 +23,7 @@ This doc describes what IS, not what should be. Casing inconsistencies are docum
|
|
|
23
23
|
| gsd-ui-auditor | UI review | `## UI REVIEW COMPLETE` | `gsd-core/workflows/ui-review.md` | sentinel-match |
|
|
24
24
|
| gsd-dom-verifier | Live-DOM UAT verification | No marker (writes `{phase}-DOM-VERIFY.md` directly; the frontmatter `outcome` / `reason` scalars carry the verdict, and `could_not_look` is never conflated with `nothing_to_report`) | `{phase}-DOM-VERIFY.md` artifact, written by the `live-dom-uat` capability's `execute:wave:post` step dispatched from `gsd-core/workflows/execute-phase.md` | artifact+query |
|
|
25
25
|
| gsd-ui-checker | UI validation | `## ISSUES FOUND`, `## UI-SPEC VERIFIED` | `gsd-core/workflows/plan-phase.md`, `gsd-core/workflows/quick/steps/plan-checker-loop.md`, `gsd-core/workflows/ui-phase.md`, `gsd-core/workflows/verify-work.md`, `agents/gsd-plan-checker.md` | sentinel-match |
|
|
26
|
-
| gsd-ui-researcher | UI spec creation | `## UI-SPEC COMPLETE`, `## UI-SPEC BLOCKED` | `gsd-core/workflows/ui-phase.md` | sentinel-match |
|
|
26
|
+
| gsd-ui-researcher | UI spec creation | `## UI-SPEC COMPLETE`, `## UI-SPEC BLOCKED`, `## REVISION_CONFLICT` | `gsd-core/workflows/ui-phase.md` | sentinel-match |
|
|
27
27
|
| gsd-verifier | Post-execution verification | `## Verification Complete` (unconsumed: Marker Rule 2 recorded decision — intentional title-case marker; completion is detected via the artifact route, nothing matches the marker) | `*-VERIFICATION.md` artifact + `gsd_run query verification.status` in `gsd-core/workflows/verify-work.md` | artifact+query |
|
|
28
28
|
| gsd-integration-checker | Cross-phase integration check | `## Integration Check Complete` (unconsumed: Marker Rule 2 recorded decision — intentional title-case marker; the auditor reads the inline report, nothing matches the marker) | `gsd-core/workflows/audit-milestone.md` reads the agent's inline return text directly (agent has no Write tool -- it cannot write an artifact) | structured-return |
|
|
29
29
|
| gsd-nyquist-auditor | Sampling audit | `## PARTIAL`, `## ESCALATE`, `## GAPS FILLED` (non-standard) | `gsd-core/workflows/validate-phase.md`, `gsd-core/workflows/secure-phase.md`, `agents/gsd-security-auditor.md` | sentinel-match |
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Compact Content Gate
|
|
2
|
+
|
|
3
|
+
Shared by every workflow spine split under ADR-4139, and by every lazily-read fragment or
|
|
4
|
+
planning-artifact template given a compact variant under Phase 6 (#4406). States the config check
|
|
5
|
+
and both resolution rules once — a spine or fragment references this file; it never restates
|
|
6
|
+
either check inline.
|
|
7
|
+
|
|
8
|
+
## The check
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
COMPACT_CONTENT=$(gsd_run query config-get workflow.compact_content --raw 2>/dev/null || echo "false")
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Stream 1 — spine + detail (top-level, eagerly `@`-included workflows)
|
|
15
|
+
|
|
16
|
+
- **`COMPACT_CONTENT` is `"false"` (default):** Read every part under this workflow's own `detail/` directory (a sibling of this spine, e.g. `gsd-core/workflows/<name>/detail/*.md`) now, in full, before continuing past this point. Their content elaborates on the spine you are reading — treat everything they say as part of this document from here on.
|
|
17
|
+
- **`COMPACT_CONTENT` is `"true"`:** Do not read the detail file. Continue directly with the spine's own content — per ADR-4139 Decision 3, it is complete enough to run this workflow correctly on its own.
|
|
18
|
+
|
|
19
|
+
**The fail-safe this holds (ADR-4139 Decision 4):** A `Read` that does not fire for any reason (tool error, a skipped step, a misread condition) leaves you running on the spine alone. That is the same, correct, terser state an opted-in project runs in on purpose — never a state with no instructions. The spine's own completeness is what makes this safe; this gate is only ever additive.
|
|
20
|
+
|
|
21
|
+
## Streams 1b and 4 — variant resolution (lazily-read fragments and planning-artifact templates)
|
|
22
|
+
|
|
23
|
+
For a `workflows/<name>/{modes,steps,templates}/*.md` fragment or a `gsd-core/templates/**`
|
|
24
|
+
planning-artifact template that has a registered `.compact.md` sibling (same directory, same stem,
|
|
25
|
+
`.compact.md` suffix):
|
|
26
|
+
|
|
27
|
+
- **`COMPACT_CONTENT` is `"false"` (default), or the file has no registered `.compact.md` sibling:** Read the canonical path exactly as named — unchanged from today.
|
|
28
|
+
- **`COMPACT_CONTENT` is `"true"` and a `.compact.md` sibling is registered:** Read the `.compact.md` sibling instead of the canonical path.
|
|
29
|
+
|
|
30
|
+
Both files are complete, independently — Read exactly one, never both, and never read the compact
|
|
31
|
+
sibling's content as an addendum to the canonical file.
|
|
32
|
+
|
|
33
|
+
**The fail-safe this holds:** unlike stream 1, a call site this rule actually applies to is already
|
|
34
|
+
reached only by a runtime `Read` — a missed `Read` already means zero overlay content, with or
|
|
35
|
+
without `workflow.compact_content`. Selecting between two independently-complete files at that
|
|
36
|
+
call site does not introduce a new way to end up with nothing; the worst case is identical to
|
|
37
|
+
today's. This is why stream 1b/4 can use variant-swap (two independent files) where stream 1 could
|
|
38
|
+
not: the degradation-direction argument that ruled out converting stream 1's `@`-includes (ADR-4139
|
|
39
|
+
Decision 4) does not apply at a genuine runtime-`Read` call site, because there is no
|
|
40
|
+
host-guaranteed baseline being traded away there.
|
|
41
|
+
|
|
42
|
+
**This rule is scoped per call site, not per file.** A `gsd-core/templates/**` file can have both
|
|
43
|
+
kinds of reference in the corpus at once — some places name it inside an eager `@`-include or an
|
|
44
|
+
orchestrator build-time embed (the same mechanism as stream 1, just reaching a template path
|
|
45
|
+
instead of a workflow path), others name it in prose instructing a runtime `Read`. Only the latter
|
|
46
|
+
gets rewritten to point at this rule; an eager reference to the canonical file is left exactly as
|
|
47
|
+
it is, for the same reason stream 1's `@`-includes were left alone — converting it would trade a
|
|
48
|
+
host-guaranteed load for a conditional one. Before wiring any call site, confirm by inspection
|
|
49
|
+
which kind it is; do not assume every mention of a `gsd-core/templates/**` path is a runtime `Read`
|
|
50
|
+
just because the directory's typical case is.
|
|
51
|
+
|
|
52
|
+
## Stream 2 — agent-skill payloads (the `gsd_run query agent-skills` CLI seam)
|
|
53
|
+
|
|
54
|
+
`agents/<name>.compact.md`, same directory, same stem, `.compact.md` suffix — registered and
|
|
55
|
+
checked the same way as streams 1b/4. The selection is different: this seam already runs through
|
|
56
|
+
a real function call (`cmdAgentSkills`, `src/init.cts`), so the resolution happens **in code**,
|
|
57
|
+
not by a `gsd_run query config-get` prose instruction. There is nothing to state here for a
|
|
58
|
+
workflow author to follow, because no workflow author calls this seam directly — it fires only
|
|
59
|
+
inside the `#2454` persona fallback for non-Claude, AGENTS-native runtimes that cannot dispatch a
|
|
60
|
+
named subagent.
|
|
61
|
+
|
|
62
|
+
Same two rules as streams 1b/4, enforced in code instead of prose: `workflow.compact_content` off,
|
|
63
|
+
or no registered `.compact.md` sibling for that agent, serves the canonical persona unchanged; on,
|
|
64
|
+
with a sibling registered, serves the compact one. The one addition code gives that prose could
|
|
65
|
+
not: a missing sibling is disclosed in the served payload itself (a leading `<!-- gsd: no compact
|
|
66
|
+
payload registered ... -->` comment) rather than silently serving canonical with no signal at all.
|
|
@@ -41,19 +41,23 @@ core finding that the spec layer is the measured weak point:
|
|
|
41
41
|
|
|
42
42
|
## Inputs
|
|
43
43
|
|
|
44
|
-
A list of requirements, each a `{ id, text, shapes? }` record where `text` is a
|
|
45
|
-
statement
|
|
46
|
-
|
|
47
|
-
`shapes` is absent, a heuristic
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
shapes
|
|
55
|
-
|
|
56
|
-
the
|
|
44
|
+
A list of requirements, each a `{ id, text, text_en?, shapes? }` record where `text` is a
|
|
45
|
+
testable statement, `text_en` is an optional English translation of `text`, and `shapes` is an
|
|
46
|
+
optional author-supplied override of the data/behavior shape. The five shapes are:
|
|
47
|
+
`numeric-range`, `collection`, `text`, `stateful`, `io`. When `shapes` is absent, a heuristic
|
|
48
|
+
classifier proposes them from the requirement prose — reading `text_en` in preference to
|
|
49
|
+
`text` when present (`text_en ?? text`) — (propose-then-confirm); the author may correct the
|
|
50
|
+
shape.
|
|
51
|
+
|
|
52
|
+
**The classifier reads English; `text` does not have to be.** The heuristic cues (`SHAPE_CUES`)
|
|
53
|
+
are English word-boundary patterns, so a requirement whose `text` is not English classifies to
|
|
54
|
+
zero shapes unless `text_en` supplies a faithful English translation. A project running with
|
|
55
|
+
`response_language` set should populate `text_en` for every requirement; `text` keeps its own
|
|
56
|
+
meaning — the requirement's own text, in whatever language the SPEC uses — and is never
|
|
57
|
+
translated or overwritten. `text_en` is engine input, not part of the SPEC. `id` is never
|
|
58
|
+
translated. Prose that matches no cue in either field surfaces as `unclassified` (#1110) — the
|
|
59
|
+
probe contributes nothing for that requirement. Where a requirement carries no cue even in
|
|
60
|
+
English, author `shapes` explicitly rather than leaning on the classifier.
|
|
57
61
|
|
|
58
62
|
## Taxonomy (8 categories)
|
|
59
63
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
# Execute-Phase —
|
|
1
|
+
# Execute-Phase — TDD Gate (Runtime Enforcement)
|
|
2
2
|
|
|
3
|
-
> Loaded by `execute-phase` workflow and `gsd-executor` agent
|
|
3
|
+
> Loaded by `execute-phase` workflow and `gsd-executor` agent when `TDD_MODE=true` for the phase (#4011 — the gate no longer requires MVP mode; MVP may imply TDD, but TDD never requires MVP). Defines the runtime gate that blocks behavior-adding tasks until a failing-test commit exists.
|
|
4
4
|
|
|
5
5
|
## When this gate fires
|
|
6
6
|
|
|
7
|
-
- `
|
|
8
|
-
- `TDD_MODE` is `true` (resolved from `--tdd` flag → `workflow.tdd_mode` config).
|
|
7
|
+
- `TDD_MODE` is `true` (resolved from `--tdd` flag → `workflow.tdd_mode` config). MVP mode is NOT required (#4011).
|
|
9
8
|
- The current task being executed has `tdd="true"` in its `<task>` frontmatter (set by the planner per Phase 1).
|
|
10
9
|
- The task's `<behavior>` block lists at least one expected behavior.
|
|
11
10
|
|
|
@@ -13,15 +12,18 @@ If any of these is false, the gate is inactive — execution proceeds normally.
|
|
|
13
12
|
|
|
14
13
|
## What the gate checks
|
|
15
14
|
|
|
16
|
-
For each task gated by
|
|
15
|
+
For each task gated by TDD, the executor MUST verify (before running the implementation step):
|
|
17
16
|
|
|
18
17
|
1. **A failing-test commit exists.** Search git log on the current branch for a commit matching `test({phase}-{plan})` whose subject mentions the same plan as the current task. The commit must touch a test file (`*.test.*`, `*.spec.*`, `tests/**`).
|
|
19
|
-
2. **The test was actually red.**
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
2. **The test was actually red — INTENTIONALLY (#3770).** A nonzero exit is not RED by itself: syntax errors, zero-test discovery, fixture crashes, parser errors, and unrelated assertions are INVALID_RED. The executor must persist the RED evidence record (command, exit code, failing test, expected result from `<behavior>`, actual result) and verify it:
|
|
19
|
+
```bash
|
|
20
|
+
gsd_run check tdd-red-evidence <record.json> --raw
|
|
21
|
+
```
|
|
22
|
+
- `RED_EVIDENCE_OK` (reason `target_test_failed`): the TARGET test named by the plan failed on a real assertion — the ONLY verdict that authorizes GREEN.
|
|
23
|
+
- `INVALID_RED` (reasons `unexpected_green`, `zero_tests_discovered`, `nonzero_exit_without_test_failure`, `fixture_or_load_failure`, `no_target_test_failure`, `invalid_record`, `unreadable_record`): the gate trips — halt, fix the RED phase (test identity, fixture, discovery), and re-verify before any implementation step. A `RED:` prefix or `(RED)` tag in the commit message is NOT sufficient evidence on its own.
|
|
22
24
|
3. **No implementation commit yet.** No `feat({phase}-{plan})` commit may exist for the same plan ID before the failing-test commit.
|
|
23
25
|
|
|
24
|
-
If any check fails, the gate trips.
|
|
26
|
+
If any check fails, the gate trips. For check 2, an INVALID_RED verdict (`check tdd-red-evidence`) trips the gate — the executor MUST halt and block the implementation step.
|
|
25
27
|
|
|
26
28
|
## What "behavior-adding task" means
|
|
27
29
|
|
|
@@ -40,9 +42,9 @@ The executor MUST:
|
|
|
40
42
|
2. Emit a structured halt report:
|
|
41
43
|
|
|
42
44
|
```
|
|
43
|
-
###
|
|
45
|
+
### TDD GATE TRIPPED — Plan {plan_id}, Task {task_id}
|
|
44
46
|
|
|
45
|
-
Reason: {missing_red_commit | red_commit_not_failing | feat_before_test}
|
|
47
|
+
Reason: {missing_red_commit | red_commit_not_failing | feat_before_test | invalid_red}
|
|
46
48
|
|
|
47
49
|
Behavior expected to be tested:
|
|
48
50
|
- {first behavior bullet}
|
|
@@ -56,24 +58,24 @@ The executor MUST:
|
|
|
56
58
|
3. Exit the current execution wave cleanly. Do NOT roll back any prior commits in the same wave.
|
|
57
59
|
4. Update `STATE.md` with `last_gate_trip: {plan_id}/{task_id}` so the user can resume after writing the test.
|
|
58
60
|
|
|
59
|
-
## Escalation: end-of-phase TDD review under
|
|
61
|
+
## Escalation: end-of-phase TDD review under TDD
|
|
60
62
|
|
|
61
63
|
The existing end-of-phase TDD review (in `workflows/execute-phase.md`'s `tdd_review_checkpoint` step) is normally **advisory** — it surfaces gate violations but does not block phase completion.
|
|
62
64
|
|
|
63
|
-
Under
|
|
65
|
+
Under TDD mode, escalate this to **blocking**:
|
|
64
66
|
- If any TDD plan is missing a RED or GREEN commit, the executor MUST refuse to mark the phase complete.
|
|
65
67
|
- The user is shown the same review table, but the verdict line reads:
|
|
66
|
-
> "Phase blocked: {N} TDD plan(s) violate the RED→GREEN gate sequence under
|
|
68
|
+
> "Phase blocked: {N} TDD plan(s) violate the RED→GREEN gate sequence under TDD. Resolve and re-run /gsd execute-phase, or override with `/gsd execute-phase {phase} --force-mvp-gate` to ship anyway."
|
|
67
69
|
|
|
68
70
|
The `--force-mvp-gate` flag is documented but not introduced by this plan — it is the escape hatch the spec mentions; if the user later builds it, the workflow already references the contract.
|
|
69
71
|
|
|
70
72
|
## What this gate does NOT do
|
|
71
73
|
|
|
72
74
|
- It does not enforce REFACTOR commits. REFACTOR remains optional (per `gsd-core/references/tdd.md`).
|
|
73
|
-
- It does not check test quality (the test could be trivially
|
|
75
|
+
- It does not check test quality (the test could be trivially weak). That's the planner's job. It DOES check that the RED failure was intentional — the target test failing an assertion (#3770).
|
|
74
76
|
- It does not run tests. The executor only inspects git log + file system. Running tests is the implementation step's job.
|
|
75
77
|
- It does not gate config-only or doc-only tasks (see "behavior-adding task" definition).
|
|
76
78
|
|
|
77
79
|
## Compatibility with existing TDD discipline
|
|
78
80
|
|
|
79
|
-
This gate is additive to `gsd-core/references/tdd.md`. Tasks not under
|
|
81
|
+
This gate is additive to `gsd-core/references/tdd.md`. Tasks not under TDD mode continue to use the existing advisory TDD discipline (RED/GREEN/REFACTOR commits with end-of-phase review checkpoint). Only the runtime gate and the blocking escalation are new.
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
**If `response_language` is set:** User-facing orchestrator output (questions, narration, report-template prose) in `{response_language}`; technical terms, code, file paths, and subagent prompts stay in English. Pass `response_language: {value}` into every spawned subagent prompt so any user-facing output they produce stays in the configured language.
|
|
4
4
|
|
|
5
|
+
**The `gsd-verifier` subagent has no workflow file of its own (#2529):** the `verify_phase_goal` step reaches it by dispatch, not by reading a workflow, so there is no file in which to place a directive — the dispatch prompt is the only place its coverage can live. That prompt MUST carry this line verbatim, immediately after `Create VERIFICATION.md.`:
|
|
6
|
+
|
|
7
|
+
`Use response_language {response_language} for all user-facing prose — narration between tool calls, status updates, progress notes, and findings included; preserve code and paths.`
|
|
8
|
+
|
|
9
|
+
It lives here rather than inline in `workflows/execute-phase.md` for the same reason the rest of this file does — that workflow is held under the frozen byte ceiling named below, and this `@-reference` is eager, so the orchestrator loads this instruction with the workflow either way.
|
|
10
|
+
|
|
5
11
|
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
12
|
|
|
7
13
|
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.
|
|
@@ -69,6 +69,48 @@
|
|
|
69
69
|
- MAYBE → Rule 4 (ask the user)
|
|
70
70
|
- NO → Out of scope (log to deferred-items.md)
|
|
71
71
|
|
|
72
|
+
### Writing `deferred-items.md`
|
|
73
|
+
|
|
74
|
+
The file has no template — write it by hand, as a Markdown list under a
|
|
75
|
+
`## Deferred Items` heading. What counts as one entry:
|
|
76
|
+
|
|
77
|
+
- One entry per top-level list item. `-`, `*` and `+` all count, and so does a
|
|
78
|
+
dot-terminated ordered marker (`1.`) when the list starts at `0.` or `1.`, or
|
|
79
|
+
continues a list already open at that level — a sentence that merely opens
|
|
80
|
+
with a number (`2026. was a bad year`) is prose, not an item, and so is a
|
|
81
|
+
list numbered from `2.` upward until its first `0.`/`1.` line. `1)` is not a
|
|
82
|
+
marker here, and neither is an ordinal past nine digits (`999999999.`
|
|
83
|
+
counts, `1234567890.` does not).
|
|
84
|
+
- Continuation lines indent beneath their entry. Fields go on those lines:
|
|
85
|
+
`status: resolved`, or the bolded `**Status:** resolved` convention. **The
|
|
86
|
+
BARE key is lower-case only** — write `Status: resolved` without the bold and
|
|
87
|
+
the field is not read, so the entry stays open with no warning. Bold it or
|
|
88
|
+
lower-case it. The bolded form matches the key case-insensitively, and the
|
|
89
|
+
VALUE is case-insensitive in both forms.
|
|
90
|
+
- A `* * *` or `- - -` separator closes the list rather than opening an entry,
|
|
91
|
+
and nothing inside a fenced code block is an entry or a field — at any indent,
|
|
92
|
+
including one deeper than CommonMark's three-space cap, which is what a fence
|
|
93
|
+
written under a nested bullet looks like. A fence that is never closed runs to
|
|
94
|
+
the end of its own entry and no further, so an unclosed delimiter cannot hide
|
|
95
|
+
the entries after it — a closed pair of delimiters is a fence, whatever sits
|
|
96
|
+
between them.
|
|
97
|
+
|
|
98
|
+
An entry is RESOLVED only if it carries an explicit `status: resolved`. Anything
|
|
99
|
+
else — including an entry with no `status:` at all — stays open and will surface
|
|
100
|
+
in `audit-open`, `audit-uat` and `complete-milestone`. That is deliberate: the
|
|
101
|
+
scanner never silently drops a possibly-open item. What it reads as something
|
|
102
|
+
other than an item is the short list above — a fenced line, a separator, and an
|
|
103
|
+
ordered list numbered from `2.` upward at a paragraph position — and nothing
|
|
104
|
+
else.
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
## Deferred Items
|
|
108
|
+
|
|
109
|
+
- Retry budget is hardcoded at 3
|
|
110
|
+
status: open
|
|
111
|
+
**What:** `fetchWithRetry` ignores the configured budget.
|
|
112
|
+
```
|
|
113
|
+
|
|
72
114
|
## Checkpoint Examples
|
|
73
115
|
|
|
74
116
|
### Good checkpoint placement
|
|
@@ -17,13 +17,13 @@ last_calibrated: 2026-03-24
|
|
|
17
17
|
> ```yaml
|
|
18
18
|
> issues:
|
|
19
19
|
> - dimension: task_completeness
|
|
20
|
-
> severity:
|
|
21
|
-
>
|
|
22
|
-
>
|
|
23
|
-
>
|
|
20
|
+
> severity: blocker
|
|
21
|
+
> required_property: "Every task action names its target files, and any functions it creates"
|
|
22
|
+
> description: "Task T1 action says 'implement the authentication feature' without naming target files, functions to create, or middleware to apply. Executor cannot determine what to build."
|
|
23
|
+
> fix_hint: "Specify: create authMiddleware in src/middleware/auth.js, apply to routes in src/routes/api.js lines 12-45, verify with integration test"
|
|
24
24
|
> ```
|
|
25
25
|
|
|
26
|
-
**Why this is good:** The checker cited the specific dimension (task_completeness), quoted the problematic text, explained why it is a blocker (executor cannot determine what to build), and gave a concrete
|
|
26
|
+
**Why this is good:** The checker stated the invariant that failed (`required_property`), cited the specific dimension (task_completeness), quoted the problematic text as evidence, explained why it is a blocker (executor cannot determine what to build), and gave a concrete example route with file paths and function names. The finding is actionable -- and because the binding payload is the property rather than the example, the planner may satisfy it a different way.
|
|
27
27
|
|
|
28
28
|
### Example 2: BLOCKER for same-wave file conflict between two plans
|
|
29
29
|
|
|
@@ -34,13 +34,13 @@ last_calibrated: 2026-03-24
|
|
|
34
34
|
> ```yaml
|
|
35
35
|
> issues:
|
|
36
36
|
> - dimension: dependency_correctness
|
|
37
|
-
> severity:
|
|
38
|
-
>
|
|
39
|
-
>
|
|
40
|
-
>
|
|
37
|
+
> severity: blocker
|
|
38
|
+
> required_property: "Same-wave plans never modify the same file without a declared dependency"
|
|
39
|
+
> description: "Plans 01 and 02 both modify gsd-core/workflows/execute-phase.md in wave 1 with no depends_on relationship. Concurrent execution will cause merge conflicts or lost changes."
|
|
40
|
+
> fix_hint: "Either move Plan 02 to wave 2 with depends_on: ['01'] or consolidate the file changes into a single plan"
|
|
41
41
|
> ```
|
|
42
42
|
|
|
43
|
-
**Why this is good:** The checker identified a real structural problem -- two plans modifying the same file in the same wave without a dependency relationship. It cited dependency_correctness, named both plans
|
|
43
|
+
**Why this is good:** The checker identified a real structural problem -- two plans modifying the same file in the same wave without a dependency relationship. It stated the property that must hold, cited dependency_correctness, named both plans and the conflicting file, and offered two example routes -- neither of which binds, since either makes the property true.
|
|
44
44
|
|
|
45
45
|
## Negative Examples
|
|
46
46
|
|
|
@@ -64,10 +64,10 @@ last_calibrated: 2026-03-24
|
|
|
64
64
|
> ```yaml
|
|
65
65
|
> issues:
|
|
66
66
|
> - dimension: scope_sanity
|
|
67
|
-
> severity:
|
|
68
|
-
>
|
|
69
|
-
>
|
|
70
|
-
>
|
|
67
|
+
> severity: info
|
|
68
|
+
> required_property: "Each plan stays within the per-plan context budget"
|
|
69
|
+
> description: "Plan has 3 tasks -- consider splitting into smaller plans for faster iteration"
|
|
70
|
+
> fix_hint: "Split tasks into separate plans"
|
|
71
71
|
> ```
|
|
72
72
|
|
|
73
|
-
**Why this is bad:** The checker flagged a non-issue. scope_sanity allows 2-3 tasks per plan -- 3 tasks is within limits. The checker applied a personal preference ("smaller is better") rather than the documented threshold. This wastes planner time on false positives and erodes trust in the checker's judgment. A correct check would produce no issue for this plan.
|
|
73
|
+
**Why this is bad:** The checker flagged a non-issue. The `required_property` it states is already satisfied, which is the tell: scope_sanity allows 2-3 tasks per plan -- 3 tasks is within limits. The checker applied a personal preference ("smaller is better") rather than the documented threshold. This wastes planner time on false positives and erodes trust in the checker's judgment. A correct check would produce no issue for this plan.
|
|
@@ -57,6 +57,24 @@ Dispatch the referenced unit. Exactly one of `ref.skill`, `ref.agent`, or `ref.c
|
|
|
57
57
|
|
|
58
58
|
Wait for the result before continuing to the next hook or the next step.
|
|
59
59
|
|
|
60
|
+
**`supportsReviewerLanes` (optional, boolean).** A `step` entry may carry
|
|
61
|
+
`supportsReviewerLanes: true` alongside `ref` (#4209). A workflow opts a step into external
|
|
62
|
+
reviewer-lane dispatch by calling `gsd_run review-lane dispatch-step --cap-id <capId> --point
|
|
63
|
+
<point> --explicit <slugs> ...` — `dispatch-step` resolves its OWN active hook for `<point>` (via
|
|
64
|
+
`resolveActiveHooksForPoint`, the same in-process resolver `loop render-hooks` itself calls) and
|
|
65
|
+
checks whether `<capId>`'s hook carries this field before proceeding; the workflow does not
|
|
66
|
+
resolve or gate on the trait itself, only passes the two flags naming which step it is. When the
|
|
67
|
+
trait reads exactly `true`, `dispatch-step` routes through `dispatchReviewerLanes`, the one
|
|
68
|
+
interpreter in `src/reviewer-step-dispatch.cts` that reuses the existing reviewer-lane selection,
|
|
69
|
+
planning, and invocation machinery, so any explicitly selected reviewer lane also reviews the
|
|
70
|
+
same scope. Absent or `false` is inert: `dispatch-step` itself is a no-op (a non-boolean value is
|
|
71
|
+
rejected by `capability-validator.cjs` at load time, so it never reaches `dispatch-step` at all).
|
|
72
|
+
This is the only place a step opts into reviewer-lane support: a capability beyond `code-review`
|
|
73
|
+
reuses it by declaring the same trait on its own step and calling `dispatch-step` with
|
|
74
|
+
`--cap-id`/`--point`, with zero bespoke TRAIT-RESOLUTION code of its own. The workflow still owns
|
|
75
|
+
matching its own CLI flags against the reviewer-lane roster and assembling the evidence block
|
|
76
|
+
handed to its consolidator — those are NOT part of what this trait makes reusable.
|
|
77
|
+
|
|
60
78
|
A `step` is **advisory by construction**: it never blocks or redirects the host workflow —
|
|
61
79
|
that is what a `gate` is for. Each dispatch is best-effort; on error record a warning and
|
|
62
80
|
continue, honoring `onError`.
|
|
@@ -58,6 +58,10 @@ Model profiles control which Claude model each GSD agent uses. This allows balan
|
|
|
58
58
|
3. **Profile table** — the per-agent column from the active `model_profile`
|
|
59
59
|
4. **Runtime default** — when nothing else applies
|
|
60
60
|
|
|
61
|
+
Steps 2–4 select the *tier*; a `model_profile_overrides.<runtime>.<tier>` entry then
|
|
62
|
+
maps that tier to a concrete model (#4192 — honored on the claude runtime as well, so
|
|
63
|
+
pinning composes with tiering instead of replacing it).
|
|
64
|
+
|
|
61
65
|
### Why two layers above the profile?
|
|
62
66
|
|
|
63
67
|
- **Profile** is a global tier strategy (everyone runs balanced).
|
|
@@ -215,8 +219,11 @@ is (highest → lowest):
|
|
|
215
219
|
(see §Dynamic Routing — escalation steps tier up per attempt counter)
|
|
216
220
|
4. If no dynamic_routing match, check models[phase_type] for a phase-type tier
|
|
217
221
|
(see §Per-Phase-Type Model Map for the agent → phase-type mapping)
|
|
218
|
-
5.
|
|
219
|
-
|
|
222
|
+
5. Check model_profile_overrides.<runtime>.<tier> for a per-tier model override
|
|
223
|
+
(honored on the claude runtime too — #4192; verbatim unless it maps to the
|
|
224
|
+
current tier alias)
|
|
225
|
+
6. If no phase-type slot, look up agent in profile table
|
|
226
|
+
7. Pass model parameter to Task call
|
|
220
227
|
```
|
|
221
228
|
|
|
222
229
|
`model` and `effort` resolve through different mechanisms at different
|
|
@@ -246,7 +253,9 @@ Override specific agents without changing the entire profile:
|
|
|
246
253
|
}
|
|
247
254
|
```
|
|
248
255
|
|
|
249
|
-
Overrides take precedence over the profile. Valid values: `opus`, `sonnet`, `haiku`, `inherit`, or any fully-qualified model ID (e.g., `"o3"`, `"openai/o3"`, `"google/gemini-2.5-pro"`).
|
|
256
|
+
Overrides take precedence over the profile. Valid values: `opus`, `sonnet`, `haiku`, `fable`, `inherit`, or any fully-qualified model ID (e.g., `"o3"`, `"openai/o3"`, `"google/gemini-2.5-pro"`). `fable` is a Claude Code Agent-tool alias, not a GSD profile tier — it has no column in the profile table above.
|
|
257
|
+
|
|
258
|
+
On the Claude runtime, fully-qualified Claude model IDs are honored as explicit generation pins (#4192): an ID that names the current tier default (e.g. `"claude-sonnet-5"`) resolves to its tier alias — the same model in the form the Agent tool always accepts — while any other ID (e.g. `"claude-opus-4-7"`) resolves verbatim, with a warn-once stderr note that setups accepting only tier aliases will not honor a full ID. To pin a generation for a whole tier rather than one agent, set `model_profile_overrides.claude.<tier>` (see docs/CONFIGURATION.md — Runtime-Aware Profiles).
|
|
250
259
|
|
|
251
260
|
## Switching Profiles
|
|
252
261
|
|
|
@@ -12,7 +12,7 @@ Canonical domain terms for the concepts named below live in [CONTEXT.md](../../C
|
|
|
12
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
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
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.**
|
|
15
|
+
| `gsd-core/references/execute-mvp-tdd.md` | **Gate.** 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 `TDD_MODE=true` (#4011) |
|
|
16
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
|
|
@@ -33,7 +33,7 @@ If you're looking for the canonical statement of a concept, this is where to fin
|
|
|
33
33
|
|
|
34
34
|
- **`--mvp` and `--prd <file>` together on Phase 1.** Both paths converge at the planner spawn. The PRD express path creates `CONTEXT.md` from the PRD file and continues to the research step; the Walking Skeleton gate fires independently when Phase 1 + new project + `--mvp`. The planner therefore receives both `WALKING_SKELETON=true` and PRD-derived context. This is intentional: the PRD informs what the skeleton should prove.
|
|
35
35
|
- **`MVP_MODE` is all-or-nothing per phase, not per task.** A phase is either MVP-mode or standard. Mixed-mode phases are not supported (PRD #2826 Q1).
|
|
36
|
-
- **`TDD_MODE` is independent of `MVP_MODE`.** TDD can be on without MVP, MVP can be on without TDD.
|
|
36
|
+
- **`TDD_MODE` is independent of `MVP_MODE`.** TDD can be on without MVP, MVP can be on without TDD. The TDD runtime gate activates on `TDD_MODE` alone (#4011); MVP mode remains free to imply TDD without being required by it.
|
|
37
37
|
- **The `gsd-roadmapper` agent makes the MVP/standard decision once at project init** based on `PROJECT_MODE`. Per-phase opt-in/out happens later via `/gsd:mvp-phase` or `/gsd-edit-phase`.
|
|
38
38
|
|
|
39
39
|
## Tests
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Plan-Checker Examples
|
|
2
|
+
|
|
3
|
+
> Progressive-disclosure reference for `agents/gsd-plan-checker.md`. The checker
|
|
4
|
+
> inlines this file from its `<examples>` block via `@`; the calibrated few-shot
|
|
5
|
+
> set lives separately in `gsd-core/references/few-shot-examples/plan-checker.md`.
|
|
6
|
+
|
|
7
|
+
## Scope Exceeded (most common miss)
|
|
8
|
+
|
|
9
|
+
**Plan 01 analysis:**
|
|
10
|
+
```
|
|
11
|
+
Tasks: 5
|
|
12
|
+
Files modified: 12
|
|
13
|
+
- prisma/schema.prisma
|
|
14
|
+
- src/app/api/auth/login/route.ts
|
|
15
|
+
- src/app/api/auth/logout/route.ts
|
|
16
|
+
- src/app/api/auth/refresh/route.ts
|
|
17
|
+
- src/middleware.ts
|
|
18
|
+
- src/lib/auth.ts
|
|
19
|
+
- src/lib/jwt.ts
|
|
20
|
+
- src/components/LoginForm.tsx
|
|
21
|
+
- src/components/LogoutButton.tsx
|
|
22
|
+
- src/app/login/page.tsx
|
|
23
|
+
- src/app/dashboard/page.tsx
|
|
24
|
+
- src/types/auth.ts
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
5 tasks exceeds 2-3 target, 12 files is high, auth is complex domain → quality degradation risk.
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
issue:
|
|
31
|
+
dimension: scope_sanity
|
|
32
|
+
severity: blocker
|
|
33
|
+
required_property: "Each plan stays within the per-plan context budget"
|
|
34
|
+
description: "Plan 01 has 5 tasks with 12 files - exceeds context budget"
|
|
35
|
+
plan: "01"
|
|
36
|
+
metrics:
|
|
37
|
+
tasks: 5
|
|
38
|
+
files: 12
|
|
39
|
+
estimated_context: "~80%"
|
|
40
|
+
fix_hint: "Split into: 01 (schema + API), 02 (middleware + lib), 03 (UI components)"
|
|
41
|
+
```
|
|
@@ -228,3 +228,28 @@ test -f src/i18n/en.json && test -f src/i18n/de.json || { echo "missing input fi
|
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
**When `|| echo "default"` is acceptable:** only when absence is semantically the default AND the result is NOT used in a comparison that should detect absence.
|
|
231
|
+
|
|
232
|
+
## External Review Before PR Open (#4107)
|
|
233
|
+
|
|
234
|
+
Apply this ordering only when opening the PR is known to trigger automatic external review and the plan also has internal review lanes.
|
|
235
|
+
|
|
236
|
+
**Bad:**
|
|
237
|
+
|
|
238
|
+
```text
|
|
239
|
+
Wave 1: Open PR; automatic external review starts
|
|
240
|
+
Wave 2: Run internal review
|
|
241
|
+
Wave 3: Apply accepted fixes
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
The external reviewer spends its first pass on a diff the plan already expects to change.
|
|
245
|
+
|
|
246
|
+
**Good:**
|
|
247
|
+
|
|
248
|
+
```text
|
|
249
|
+
Wave 1: Run internal review
|
|
250
|
+
Wave 2: Apply accepted fixes
|
|
251
|
+
Wave 3: If applicable, re-check the open-time property; then immediately open PR
|
|
252
|
+
Wave 4+: Run post-open CI, external review, and tracking work
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Nothing may intervene between an applicable re-check and the open. Post-open work may follow; "immediately" constrains only that gap. Opening-time properties do not justify an early PR.
|
|
@@ -23,7 +23,11 @@ Return:
|
|
|
23
23
|
| {padded_phase}-02 | [brief objective] | 1 | none | REQ-003 |
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
The orchestrator reads this table,
|
|
26
|
+
The orchestrator reads this table, groups rows by `Wave` (ascending, blank treated as `1`), then
|
|
27
|
+
spawns one single-plan Task per row — one Wave at a time, serially across Waves. Within a Wave,
|
|
28
|
+
Tasks are spawned one at a time by default, or together (`run_in_background=true` on each, issued
|
|
29
|
+
in one message) when `planning.chunked_parallel: true` and the host's negotiated dispatch capacity
|
|
30
|
+
supports it (#3777; see `gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md` §8.5.2).
|
|
27
31
|
|
|
28
32
|
### single-plan
|
|
29
33
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Planner Coupling — Same-Wave Shared Mutable State
|
|
2
|
+
|
|
3
|
+
> Progressive-disclosure reference for `agents/gsd-planner.md`. The planner agent
|
|
4
|
+
> reads this file when assigning waves (issue #3724). The slim pointer in
|
|
5
|
+
> `agents/gsd-planner.md` → `assign_waves` routes here; the canonical schema row
|
|
6
|
+
> for `coupling_justified` lives in `docs/reference/plan-md.md`. The verifying
|
|
7
|
+
> side is `agents/gsd-plan-checker.md` Dimension 3b (#1954).
|
|
8
|
+
|
|
9
|
+
## The rule
|
|
10
|
+
|
|
11
|
+
`files_modified`/`files_deleted` overlap is not the only coupling between
|
|
12
|
+
same-wave plans. If two plans in the same wave touch the same **mutable
|
|
13
|
+
resource** through their task actions — a config key, DB table/row, migration,
|
|
14
|
+
env var, singleton, cache — with at least one writer, or one plan produces a
|
|
15
|
+
prerequisite the other consumes, the pair is coupled through shared state even
|
|
16
|
+
though no file overlaps: under parallel execution the outcome depends on which
|
|
17
|
+
executor gets there first.
|
|
18
|
+
|
|
19
|
+
Resolve it one of three ways, in order of preference:
|
|
20
|
+
|
|
21
|
+
1. **Declare the edge** — add the producing plan to the consumer's
|
|
22
|
+
`depends_on`. Wave assignment then orders them automatically.
|
|
23
|
+
2. **Re-wave** — move one plan to a later wave when the dependency direction
|
|
24
|
+
is unclear but an ordering is still wanted.
|
|
25
|
+
3. **Justify the pair** — when the coupling is deliberate and genuinely
|
|
26
|
+
order-independent (both orders produce a correct result), record it in
|
|
27
|
+
either plan's frontmatter, one `"plan-id: reason"` entry per coupled peer:
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
coupling_justified: ["03-02: both plans append independent keys to config; order irrelevant"]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The plan-checker's Dimension 3b recognizes the declaration and does not
|
|
34
|
+
flag the pair, so a deliberately coupled plan set passes verification
|
|
35
|
+
without serializing waves it was designed to run in parallel.
|
|
36
|
+
|
|
37
|
+
## Why declare it up front
|
|
38
|
+
|
|
39
|
+
Dimension 3b flags same-wave plan pairs with an undeclared shared-mutable-state
|
|
40
|
+
dependency (advisory severity — it never blocks). Declaring the edge, re-waving,
|
|
41
|
+
or justifying the pair at plan time means the first checker pass comes back
|
|
42
|
+
clean instead of surfacing an advisory the planner then has to interpret.
|