@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
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# verify-work.md — deferred elaboration
|
|
2
|
+
|
|
3
|
+
Read in full when `workflow.compact_content` is `false` (the default) — see
|
|
4
|
+
`gsd-core/references/compact-content-gate.md` for the check and resolution rule this
|
|
5
|
+
spine defers to. Each `§` below is the full text the spine condenses at the point it
|
|
6
|
+
names.
|
|
7
|
+
|
|
8
|
+
## § 1 — reconcile_gaps
|
|
9
|
+
|
|
10
|
+
**Reconcile diagnosed gaps against completed gap-closure plans (#1921):**
|
|
11
|
+
|
|
12
|
+
When verify-work resumes after `/gsd:execute-phase --gaps-only`, the UAT `## Gaps` entries still read `status: failed` even though their fix plans have executed. Without reconciliation verify-work re-diagnoses them as fresh blockers and spawns new gap plans — losing the verification state. This step closes the loop.
|
|
13
|
+
|
|
14
|
+
Read the UAT `## Gaps` section and the phase dir `*-PLAN.md` frontmatter. For each gap with `status: failed`:
|
|
15
|
+
1. Find a `*-PLAN.md` whose frontmatter `gap_ids` includes the gap's `gap_id` (`G-{phase}-{N}`).
|
|
16
|
+
2. If such a plan exists AND has a matching `*-SUMMARY.md` in the phase dir (the plan was executed by `--gaps-only`), the gap is **resolved** — update its YAML in place:
|
|
17
|
+
```yaml
|
|
18
|
+
- gap_id: G-{phase}-{N}
|
|
19
|
+
status: resolved # was: failed
|
|
20
|
+
resolved_by: {plan basename}
|
|
21
|
+
resolved_at: {today}
|
|
22
|
+
```
|
|
23
|
+
3. If no plan references the `gap_id`, or the plan has no SUMMARY, leave the gap `status: failed` (still open).
|
|
24
|
+
|
|
25
|
+
Read plan frontmatter directly in-context — do not pipe it through a shell parser. After reconciliation, announce:
|
|
26
|
+
```
|
|
27
|
+
Reconciled gap-closure state: {resolved_count} gap(s) resolved by executed plans, {open_count} still open.
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Resolved gaps are NOT re-diagnosed and do NOT spawn new gap plans. If the user later reports the same behavior as still broken, treat it as a new issue (a regression) with a fresh `gap_id`.
|
|
31
|
+
|
|
32
|
+
## § 2 — resume_from_file
|
|
33
|
+
|
|
34
|
+
**Resume testing from UAT file:**
|
|
35
|
+
|
|
36
|
+
**First run `reconcile_gaps`** (above) so gaps already fixed by `/gsd:execute-phase --gaps-only` are marked `resolved` before testing resumes (#1921).
|
|
37
|
+
|
|
38
|
+
Read the full UAT file.
|
|
39
|
+
|
|
40
|
+
(The find-pending / zero-pending guard clause is stated verbatim in the spine — a pre-existing
|
|
41
|
+
drift guard, `tests/verify-work-auto-transition.test.cjs` bug #1716, requires the two sentences
|
|
42
|
+
adjacent with nothing between them.)
|
|
43
|
+
|
|
44
|
+
Announce:
|
|
45
|
+
```
|
|
46
|
+
Resuming: Phase {phase} UAT
|
|
47
|
+
Progress: {passed + issues + skipped}/{total}
|
|
48
|
+
Issues found so far: {issues count}
|
|
49
|
+
|
|
50
|
+
Continuing from Test {N}...
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Update Current Test section with the pending test.
|
|
54
|
+
Then continue to `present_test` with it.
|
|
55
|
+
|
|
56
|
+
## § 3 — diagnose_issues, plan_gap_closure, verify_gap_plans, revision_loop (the gap-closure sub-flow)
|
|
57
|
+
|
|
58
|
+
This whole sub-flow only runs when UAT testing found issues (`complete_session` routes here); a
|
|
59
|
+
session with zero issues never reaches it.
|
|
60
|
+
|
|
61
|
+
### diagnose_issues
|
|
62
|
+
|
|
63
|
+
**Diagnose root causes before planning fixes:**
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
{N} issues found. Diagnosing root causes...
|
|
69
|
+
|
|
70
|
+
Spawning parallel debug agents to investigate each issue.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- Load diagnose-issues workflow
|
|
74
|
+
- Follow @~/.claude/gsd-core/workflows/diagnose-issues.md
|
|
75
|
+
- Spawn parallel debug agents for each issue
|
|
76
|
+
- Collect root causes
|
|
77
|
+
- Update UAT.md with root causes
|
|
78
|
+
- Proceed to `plan_gap_closure`
|
|
79
|
+
|
|
80
|
+
Diagnosis runs automatically - no user prompt. Parallel agents investigate simultaneously, so overhead is minimal and fixes are more accurate.
|
|
81
|
+
|
|
82
|
+
### plan_gap_closure
|
|
83
|
+
|
|
84
|
+
**Auto-plan fixes from diagnosed gaps:**
|
|
85
|
+
|
|
86
|
+
Display:
|
|
87
|
+
```
|
|
88
|
+
### GSD ► PLANNING FIXES
|
|
89
|
+
|
|
90
|
+
◆ Spawning planner for gap closure... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Spawn gsd-planner in --gaps mode:
|
|
94
|
+
|
|
95
|
+
<!-- #2517 model-omit-on-inherit -->
|
|
96
|
+
|
|
97
|
+
> **Model omission (#2517).** Omit the `model` parameter entirely when the value it would carry (`planner_model`, `checker_model`) is `"inherit"` or empty. An empty value 404s on runtimes without native tier aliases — the default on non-Claude runtimes. Omitting it inherits the orchestrator's model. See @gsd-core/references/model-profile-resolution.md.
|
|
98
|
+
|
|
99
|
+
````
|
|
100
|
+
Agent(
|
|
101
|
+
prompt="""
|
|
102
|
+
<planning_context>
|
|
103
|
+
|
|
104
|
+
**Phase:** {phase_number}
|
|
105
|
+
**Mode:** gap_closure
|
|
106
|
+
|
|
107
|
+
<required_reading>
|
|
108
|
+
- {phase_dir}/{phase_num}-UAT.md (UAT with diagnoses)
|
|
109
|
+
- {state_path} (Project State)
|
|
110
|
+
- {roadmap_path} (Roadmap)
|
|
111
|
+
</required_reading>
|
|
112
|
+
|
|
113
|
+
${AGENT_SKILLS_PLANNER}
|
|
114
|
+
|
|
115
|
+
</planning_context>
|
|
116
|
+
|
|
117
|
+
<downstream_consumer>
|
|
118
|
+
Output consumed by /gsd:execute-phase
|
|
119
|
+
Plans must be executable prompts.
|
|
120
|
+
|
|
121
|
+
<!-- #2508 runtime-aware-dispatch -->
|
|
122
|
+
|
|
123
|
+
> **Runtime-aware dispatch (#2508 Phase 4).** GSD workflows dispatch specialized subagents by role. Before dispatching on a built-in-only runtime (kimi-code — three built-ins only), resolve the role to a built-in via `gsd_run query resolve-dispatch-type --requested <role> --raw`. On named-dispatch runtimes (Claude/OpenCode/…) the role is returned unchanged; on kimi-code it maps to `coder`/`explore`/`plan` by role-suffix. The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3) regardless. See @gsd-core/references/runtime-aware-dispatch.md.
|
|
124
|
+
|
|
125
|
+
**Gap linkage (#1921):** each created `*-PLAN.md` MUST list the UAT gap ids it addresses in its frontmatter:
|
|
126
|
+
```yaml
|
|
127
|
+
---
|
|
128
|
+
gap_closure: true
|
|
129
|
+
gap_ids: [G-{phase}-{N}, ...] # the ## Gaps gap_id values this plan fixes
|
|
130
|
+
---
|
|
131
|
+
```
|
|
132
|
+
This lets `/gsd:verify-work` reconcile resolved gaps on resume (a gap whose plan has a matching `*-SUMMARY.md` is marked `status: resolved`, not re-diagnosed as a fresh blocker).
|
|
133
|
+
</downstream_consumer>
|
|
134
|
+
""",
|
|
135
|
+
subagent_type="gsd-planner",
|
|
136
|
+
model="{planner_model}",
|
|
137
|
+
description="Plan gap fixes for Phase {phase}"
|
|
138
|
+
)
|
|
139
|
+
````
|
|
140
|
+
|
|
141
|
+
(The "stop working, wait for the subagent" orchestrator rule is stated in the spine, not repeated here.)
|
|
142
|
+
|
|
143
|
+
On return:
|
|
144
|
+
- **PLANNING COMPLETE:** Proceed to `verify_gap_plans`
|
|
145
|
+
- **PLANNING INCONCLUSIVE:** Report and offer manual intervention
|
|
146
|
+
|
|
147
|
+
### verify_gap_plans
|
|
148
|
+
|
|
149
|
+
**Verify fix plans with checker:**
|
|
150
|
+
|
|
151
|
+
Display:
|
|
152
|
+
```
|
|
153
|
+
### GSD ► VERIFYING FIX PLANS
|
|
154
|
+
|
|
155
|
+
◆ Spawning plan checker... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Initialize: `iteration_count = 1`
|
|
159
|
+
|
|
160
|
+
Spawn gsd-plan-checker:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
Agent(
|
|
164
|
+
prompt="""
|
|
165
|
+
<verification_context>
|
|
166
|
+
|
|
167
|
+
**Phase:** {phase_number}
|
|
168
|
+
**Phase Goal:** Close diagnosed gaps from UAT
|
|
169
|
+
|
|
170
|
+
<required_reading>
|
|
171
|
+
- {phase_dir}/*-PLAN.md (Plans to verify)
|
|
172
|
+
</required_reading>
|
|
173
|
+
|
|
174
|
+
${AGENT_SKILLS_CHECKER}
|
|
175
|
+
|
|
176
|
+
</verification_context>
|
|
177
|
+
|
|
178
|
+
<expected_output>
|
|
179
|
+
Return one of:
|
|
180
|
+
- ## VERIFICATION PASSED — all checks pass
|
|
181
|
+
- ## ISSUES FOUND — structured issue list
|
|
182
|
+
</expected_output>
|
|
183
|
+
""",
|
|
184
|
+
subagent_type="gsd-plan-checker",
|
|
185
|
+
model="{checker_model}",
|
|
186
|
+
description="Verify Phase {phase} fix plans"
|
|
187
|
+
)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
(The "stop working, wait for the subagent" orchestrator rule, and the on-return handling for
|
|
191
|
+
VERIFICATION PASSED / ISSUES FOUND, are stated in the spine — the ISSUES FOUND handler's exact
|
|
192
|
+
wording is pinned by `tests/plan-checker-coupling.test.cjs`.)
|
|
193
|
+
|
|
194
|
+
### revision_loop
|
|
195
|
+
|
|
196
|
+
The full conflict-handling contract (non-binding `fix_hint`, the BEFORE-editing constraint
|
|
197
|
+
re-check, `## REVISION_CONFLICT` routing, the same-property/THIRD-conflict stall bound, and the
|
|
198
|
+
max-iteration escalation) is stated verbatim in the spine — a pre-existing drift guard
|
|
199
|
+
(`tests/revision-remediation-binding.test.cjs`, #3771) pins it there across every revision
|
|
200
|
+
orchestrator in the repo. This section adds only the surrounding `Agent()` scaffolding:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
Agent(
|
|
204
|
+
prompt="""
|
|
205
|
+
<revision_context>
|
|
206
|
+
|
|
207
|
+
**Phase:** {phase_number}
|
|
208
|
+
**Mode:** revision
|
|
209
|
+
|
|
210
|
+
<required_reading>
|
|
211
|
+
- {phase_dir}/*-PLAN.md (Existing plans)
|
|
212
|
+
</required_reading>
|
|
213
|
+
|
|
214
|
+
${AGENT_SKILLS_PLANNER}
|
|
215
|
+
|
|
216
|
+
**Checker issues:**
|
|
217
|
+
{structured_issues_from_checker}
|
|
218
|
+
|
|
219
|
+
</revision_context>
|
|
220
|
+
|
|
221
|
+
<instructions>
|
|
222
|
+
Read existing PLAN.md files. Make targeted updates to address checker issues. (See the spine for
|
|
223
|
+
the binding/non-binding contract and REVISION_CONFLICT handling stated above this point.)
|
|
224
|
+
</instructions>
|
|
225
|
+
""",
|
|
226
|
+
subagent_type="gsd-planner",
|
|
227
|
+
model="{planner_model}",
|
|
228
|
+
description="Revise Phase {phase} plans"
|
|
229
|
+
)
|
|
230
|
+
```
|
|
@@ -33,6 +33,8 @@ No Pass/Fail buttons. No severity questions. Just: "Here's what should happen. D
|
|
|
33
33
|
|
|
34
34
|
<process>
|
|
35
35
|
|
|
36
|
+
**Compact Content Gate.** Read and follow `gsd-core/references/compact-content-gate.md` now — it states the `workflow.compact_content` check and the resolution rule this spine defers to. When it directs a Read, read `gsd-core/workflows/verify-work/detail/elaboration.md` in full before continuing past this point; its content elaborates on the resume/reconcile steps and the full gap-closure sub-flow below.
|
|
37
|
+
|
|
36
38
|
<step name="initialize" priority="first">
|
|
37
39
|
If $ARGUMENTS contains a phase number, load context:
|
|
38
40
|
|
|
@@ -50,7 +52,7 @@ AGENT_SKILLS_CHECKER=$(gsd_run query agent-skills gsd-plan-checker)
|
|
|
50
52
|
|
|
51
53
|
Parse JSON for: `planner_model`, `checker_model`, `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `has_verification`, `uat_path`, `state_path`, `roadmap_path`, `response_language`.
|
|
52
54
|
|
|
53
|
-
**If `response_language` is set:** All user-facing questions, prompts, and explanations
|
|
55
|
+
**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.
|
|
54
56
|
|
|
55
57
|
```bash
|
|
56
58
|
# MVP mode detection via the centralized phase.mvp-mode resolver.
|
|
@@ -172,6 +174,27 @@ ls "$phase_dir"/*-SUMMARY.md 2>/dev/null || true
|
|
|
172
174
|
```
|
|
173
175
|
|
|
174
176
|
Read each SUMMARY.md to extract testable deliverables.
|
|
177
|
+
|
|
178
|
+
**Commit-claim reconciliation (#3968).** A SUMMARY's `commits:` frontmatter is a MEASURED
|
|
179
|
+
number (the executor derives it from its on-disk plan commit ledger and records the base as
|
|
180
|
+
`plan_head_before:`), and this is where that claim is checked against reality with the SAME
|
|
181
|
+
instrument — the executor's own narration is never the last word. For each `*-SUMMARY.md`:
|
|
182
|
+
```bash
|
|
183
|
+
BASE=$(grep -oE '^plan_head_before: [0-9a-f]{7,40}' "$SUMMARY_FILE" | awk '{print $2}')
|
|
184
|
+
CLAIMED=$(grep -oE '^commits: [0-9]+' "$SUMMARY_FILE" | grep -oE '[0-9]+' || echo absent)
|
|
185
|
+
ACTUAL=$(git rev-list --count "${BASE}"..HEAD)
|
|
186
|
+
```
|
|
187
|
+
- A `commits: absent` or `plan_head_before: absent` SUMMARY (pre-#3968 legacy) is reported as
|
|
188
|
+
a WARNING with the measured git state, not a mismatch.
|
|
189
|
+
- `ACTUAL == CLAIMED` is consistent. `ACTUAL == CLAIMED + 1` is ALSO consistent: the
|
|
190
|
+
SUMMARY/metadata commit itself lands after the executor measured, so exactly one
|
|
191
|
+
post-measurement commit is expected.
|
|
192
|
+
- Anything else is a **BLOCKER** — the phase must not read as done: real project evidence
|
|
193
|
+
(#3968) showed 14 plans declaring `commits: 1` with zero git activity, their code sitting
|
|
194
|
+
uncommitted and one `git reset --hard` from loss. Record it as `commit_claim_mismatch`
|
|
195
|
+
with both numbers and the SUMMARY path; a mismatch means either the executor narrated
|
|
196
|
+
instead of measuring or commits were lost after the fact — both require reconciliation
|
|
197
|
+
before the phase can pass.
|
|
175
198
|
</step>
|
|
176
199
|
|
|
177
200
|
<step name="extract_tests">
|
|
@@ -468,50 +491,20 @@ If no more tests → Go to `complete_session`
|
|
|
468
491
|
</step>
|
|
469
492
|
|
|
470
493
|
<step name="reconcile_gaps">
|
|
471
|
-
**Reconcile diagnosed gaps against completed gap-closure plans (#1921):**
|
|
472
|
-
|
|
473
|
-
When verify-work resumes after `/gsd:execute-phase --gaps-only`, the UAT `## Gaps` entries still read `status: failed` even though their fix plans have executed. Without reconciliation verify-work re-diagnoses them as fresh blockers and spawns new gap plans — losing the verification state. This step closes the loop.
|
|
474
|
-
|
|
475
|
-
Read the UAT `## Gaps` section and the phase dir `*-PLAN.md` frontmatter. For each gap with `status: failed`:
|
|
476
|
-
1. Find a `*-PLAN.md` whose frontmatter `gap_ids` includes the gap's `gap_id` (`G-{phase}-{N}`).
|
|
477
|
-
2. If such a plan exists AND has a matching `*-SUMMARY.md` in the phase dir (the plan was executed by `--gaps-only`), the gap is **resolved** — update its YAML in place:
|
|
478
|
-
```yaml
|
|
479
|
-
- gap_id: G-{phase}-{N}
|
|
480
|
-
status: resolved # was: failed
|
|
481
|
-
resolved_by: {plan basename}
|
|
482
|
-
resolved_at: {today}
|
|
483
|
-
```
|
|
484
|
-
3. If no plan references the `gap_id`, or the plan has no SUMMARY, leave the gap `status: failed` (still open).
|
|
494
|
+
**Reconcile diagnosed gaps against completed gap-closure plans (#1921):** when verify-work resumes after `/gsd:execute-phase --gaps-only`, UAT `## Gaps` entries still read `status: failed` even though their fix plans already executed — without reconciliation they'd be re-diagnosed as fresh blockers. For each `status: failed` gap with a `*-PLAN.md` whose `gap_ids` names it AND a matching `*-SUMMARY.md`, mark it `resolved` (with `resolved_by`/`resolved_at`) in place; otherwise leave it `failed`. Resolved gaps are never re-diagnosed or re-planned; a later regression gets a fresh `gap_id`, not a reopened old one.
|
|
485
495
|
|
|
486
|
-
|
|
487
|
-
```
|
|
488
|
-
Reconciled gap-closure state: {resolved_count} gap(s) resolved by executed plans, {open_count} still open.
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
Resolved gaps are NOT re-diagnosed and do NOT spawn new gap plans. If the user later reports the same behavior as still broken, treat it as a new issue (a regression) with a fresh `gap_id`.
|
|
496
|
+
Exact YAML shape and the announcement line: `gsd-core/workflows/verify-work/detail/elaboration.md` § 1.
|
|
492
497
|
</step>
|
|
493
498
|
|
|
494
499
|
<step name="resume_from_file">
|
|
495
|
-
**Resume testing from UAT file:**
|
|
496
|
-
|
|
497
|
-
**First run `reconcile_gaps`** (above) so gaps already fixed by `/gsd:execute-phase --gaps-only` are marked `resolved` before testing resumes (#1921).
|
|
498
|
-
|
|
499
|
-
Read the full UAT file.
|
|
500
|
+
**Resume testing from UAT file:** first run `reconcile_gaps` (above), then read the full UAT file.
|
|
500
501
|
|
|
501
502
|
Find first test with `result: [pending]`.
|
|
502
503
|
If no `[pending]` test found → go to `complete_session`.
|
|
503
504
|
|
|
504
|
-
|
|
505
|
-
```
|
|
506
|
-
Resuming: Phase {phase} UAT
|
|
507
|
-
Progress: {passed + issues + skipped}/{total}
|
|
508
|
-
Issues found so far: {issues count}
|
|
505
|
+
Otherwise announce progress and continue from that test at `present_test`.
|
|
509
506
|
|
|
510
|
-
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
Update Current Test section with the pending test.
|
|
514
|
-
Proceed to `present_test`.
|
|
507
|
+
Exact resume-announcement wording: `gsd-core/workflows/verify-work/detail/elaboration.md` § 2.
|
|
515
508
|
</step>
|
|
516
509
|
|
|
517
510
|
<step name="complete_session">
|
|
@@ -705,138 +698,29 @@ SECURITY: File paths in output are constructed from validated path components on
|
|
|
705
698
|
</step>
|
|
706
699
|
|
|
707
700
|
<step name="diagnose_issues">
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
```
|
|
711
|
-
---
|
|
712
|
-
|
|
713
|
-
{N} issues found. Diagnosing root causes...
|
|
714
|
-
|
|
715
|
-
Spawning parallel debug agents to investigate each issue.
|
|
716
|
-
```
|
|
717
|
-
|
|
718
|
-
- Load diagnose-issues workflow
|
|
719
|
-
- Follow @~/.claude/gsd-core/workflows/diagnose-issues.md
|
|
720
|
-
- Spawn parallel debug agents for each issue
|
|
721
|
-
- Collect root causes
|
|
722
|
-
- Update UAT.md with root causes
|
|
723
|
-
- Proceed to `plan_gap_closure`
|
|
724
|
-
|
|
725
|
-
Diagnosis runs automatically - no user prompt. Parallel agents investigate simultaneously, so overhead is minimal and fixes are more accurate.
|
|
701
|
+
When UAT testing found issues, this sub-flow (diagnose_issues -> plan_gap_closure -> verify_gap_plans -> revision_loop) runs before present_ready; a session with zero issues never reaches it. Spawn parallel debug agents (one per issue, via diagnose-issues.md) to find root causes with no user prompt, then update UAT.md and proceed to plan_gap_closure.
|
|
726
702
|
</step>
|
|
727
703
|
|
|
728
704
|
<step name="plan_gap_closure">
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
Display:
|
|
732
|
-
```
|
|
733
|
-
### GSD ► PLANNING FIXES
|
|
734
|
-
|
|
735
|
-
◆ Spawning planner for gap closure... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
Spawn gsd-planner in --gaps mode:
|
|
739
|
-
|
|
740
|
-
<!-- #2517 model-omit-on-inherit -->
|
|
741
|
-
|
|
742
|
-
> **Model omission (#2517).** Omit the `model` parameter entirely when the value it would carry (`planner_model`, `checker_model`) is `"inherit"` or empty. An empty value 404s on runtimes without native tier aliases — the default on non-Claude runtimes. Omitting it inherits the orchestrator's model. See @gsd-core/references/model-profile-resolution.md.
|
|
743
|
-
|
|
744
|
-
````
|
|
745
|
-
Agent(
|
|
746
|
-
prompt="""
|
|
747
|
-
<planning_context>
|
|
748
|
-
|
|
749
|
-
**Phase:** {phase_number}
|
|
750
|
-
**Mode:** gap_closure
|
|
751
|
-
|
|
752
|
-
<required_reading>
|
|
753
|
-
- {phase_dir}/{phase_num}-UAT.md (UAT with diagnoses)
|
|
754
|
-
- {state_path} (Project State)
|
|
755
|
-
- {roadmap_path} (Roadmap)
|
|
756
|
-
</required_reading>
|
|
757
|
-
|
|
758
|
-
${AGENT_SKILLS_PLANNER}
|
|
759
|
-
|
|
760
|
-
</planning_context>
|
|
761
|
-
|
|
762
|
-
<downstream_consumer>
|
|
763
|
-
Output consumed by /gsd:execute-phase
|
|
764
|
-
Plans must be executable prompts.
|
|
765
|
-
|
|
766
|
-
<!-- #2508 runtime-aware-dispatch -->
|
|
767
|
-
|
|
768
|
-
> **Runtime-aware dispatch (#2508 Phase 4).** GSD workflows dispatch specialized subagents by role. Before dispatching on a built-in-only runtime (kimi-code — three built-ins only), resolve the role to a built-in via `gsd_run query resolve-dispatch-type --requested <role> --raw`. On named-dispatch runtimes (Claude/OpenCode/…) the role is returned unchanged; on kimi-code it maps to `coder`/`explore`/`plan` by role-suffix. The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3) regardless. See @gsd-core/references/runtime-aware-dispatch.md.
|
|
769
|
-
|
|
770
|
-
**Gap linkage (#1921):** each created `*-PLAN.md` MUST list the UAT gap ids it addresses in its frontmatter:
|
|
771
|
-
```yaml
|
|
772
|
-
---
|
|
773
|
-
gap_closure: true
|
|
774
|
-
gap_ids: [G-{phase}-{N}, ...] # the ## Gaps gap_id values this plan fixes
|
|
775
|
-
---
|
|
776
|
-
```
|
|
777
|
-
This lets `/gsd:verify-work` reconcile resolved gaps on resume (a gap whose plan has a matching `*-SUMMARY.md` is marked `status: resolved`, not re-diagnosed as a fresh blocker).
|
|
778
|
-
</downstream_consumer>
|
|
779
|
-
""",
|
|
780
|
-
subagent_type="gsd-planner",
|
|
781
|
-
model="{planner_model}",
|
|
782
|
-
description="Plan gap fixes for Phase {phase}"
|
|
783
|
-
)
|
|
784
|
-
````
|
|
705
|
+
Spawn gsd-planner in --gaps mode against the UAT (with diagnoses), `{state_path}` (Project State), and `{roadmap_path}` (Roadmap). Each created PLAN.md MUST carry `gap_closure: true` and `gap_ids: [...]` in its frontmatter (#1921) so a later verify-work resume can reconcile it.
|
|
785
706
|
|
|
707
|
+
<!-- gsd:protected -->
|
|
786
708
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
787
709
|
|
|
788
|
-
|
|
789
|
-
- **PLANNING COMPLETE:** Proceed to `verify_gap_plans`
|
|
790
|
-
- **PLANNING INCONCLUSIVE:** Report and offer manual intervention
|
|
710
|
+
PLANNING COMPLETE proceeds to verify_gap_plans; PLANNING INCONCLUSIVE reports and offers manual intervention.
|
|
791
711
|
</step>
|
|
792
712
|
|
|
793
713
|
<step name="verify_gap_plans">
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
Display:
|
|
797
|
-
```
|
|
798
|
-
### GSD ► VERIFYING FIX PLANS
|
|
799
|
-
|
|
800
|
-
◆ Spawning plan checker... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
801
|
-
```
|
|
802
|
-
|
|
803
|
-
Initialize: `iteration_count = 1`
|
|
804
|
-
|
|
805
|
-
Spawn gsd-plan-checker:
|
|
806
|
-
|
|
807
|
-
```
|
|
808
|
-
Agent(
|
|
809
|
-
prompt="""
|
|
810
|
-
<verification_context>
|
|
811
|
-
|
|
812
|
-
**Phase:** {phase_number}
|
|
813
|
-
**Phase Goal:** Close diagnosed gaps from UAT
|
|
814
|
-
|
|
815
|
-
<required_reading>
|
|
816
|
-
- {phase_dir}/*-PLAN.md (Plans to verify)
|
|
817
|
-
</required_reading>
|
|
818
|
-
|
|
819
|
-
${AGENT_SKILLS_CHECKER}
|
|
820
|
-
|
|
821
|
-
</verification_context>
|
|
822
|
-
|
|
823
|
-
<expected_output>
|
|
824
|
-
Return one of:
|
|
825
|
-
- ## VERIFICATION PASSED — all checks pass
|
|
826
|
-
- ## ISSUES FOUND — structured issue list
|
|
827
|
-
</expected_output>
|
|
828
|
-
""",
|
|
829
|
-
subagent_type="gsd-plan-checker",
|
|
830
|
-
model="{checker_model}",
|
|
831
|
-
description="Verify Phase {phase} fix plans"
|
|
832
|
-
)
|
|
833
|
-
```
|
|
714
|
+
Spawn gsd-plan-checker against the fix plans (iteration_count starts at 1), model="{checker_model}" (omit on inherit/empty, #2517).
|
|
834
715
|
|
|
716
|
+
<!-- gsd:protected -->
|
|
835
717
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
836
718
|
|
|
837
719
|
On return:
|
|
838
720
|
- **VERIFICATION PASSED:** Proceed to `present_ready`
|
|
839
|
-
- **ISSUES FOUND:**
|
|
721
|
+
- **ISSUES FOUND:** Count BLOCKER + WARNING entries in the YAML issues block; an entry whose severity is missing or unrecognized counts as a BLOCKER (fail closed). If zero — every entry is explicitly INFO — display `ℹ advisory — {dimension}: {description}` per entry and proceed to `present_ready`; INFO is advisory and never enters the loop (#3724). Otherwise proceed to `revision_loop`
|
|
722
|
+
|
|
723
|
+
Exact Agent() prompt fields: `gsd-core/workflows/verify-work/detail/elaboration.md` § 2.
|
|
840
724
|
</step>
|
|
841
725
|
|
|
842
726
|
<step name="revision_loop">
|
|
@@ -848,39 +732,38 @@ Display: `Sending back to planner for revision... (iteration {N}/3)`
|
|
|
848
732
|
|
|
849
733
|
Spawn gsd-planner with revision context:
|
|
850
734
|
|
|
851
|
-
|
|
852
|
-
Agent(
|
|
853
|
-
prompt="""
|
|
854
|
-
<revision_context>
|
|
855
|
-
|
|
856
|
-
**Phase:** {phase_number}
|
|
857
|
-
**Mode:** revision
|
|
858
|
-
|
|
859
|
-
<required_reading>
|
|
860
|
-
- {phase_dir}/*-PLAN.md (Existing plans)
|
|
861
|
-
</required_reading>
|
|
862
|
-
|
|
863
|
-
${AGENT_SKILLS_PLANNER}
|
|
864
|
-
|
|
865
|
-
**Checker issues:**
|
|
866
|
-
{structured_issues_from_checker}
|
|
735
|
+
Read existing PLAN.md files. Make targeted updates to address checker issues.
|
|
867
736
|
|
|
868
|
-
|
|
737
|
+
`required_property` + evidence + severity BIND. `fix_hint` is ONE non-binding example route: a
|
|
738
|
+
smaller or different mechanism reaching the same property addresses the issue in full — say which
|
|
739
|
+
you used. Re-check locked decisions, capability guidance (CLAUDE.md, project skills) and the
|
|
740
|
+
constraints these plans already encode BEFORE editing; if a hint would contradict one, or the
|
|
741
|
+
property is unreachable without breaking one, return `## REVISION_CONFLICT` with the conflict and
|
|
742
|
+
the alternatives rather than applying or working around it. Full contract:
|
|
743
|
+
`gsd-core/references/planner-revision.md`, which you load in revision mode.
|
|
869
744
|
|
|
870
|
-
<instructions>
|
|
871
|
-
Read existing PLAN.md files. Make targeted updates to address checker issues.
|
|
872
745
|
Do NOT replan from scratch unless issues are fundamental.
|
|
873
|
-
</instructions>
|
|
874
|
-
""",
|
|
875
|
-
subagent_type="gsd-planner",
|
|
876
|
-
model="{planner_model}",
|
|
877
|
-
description="Revise Phase {phase} plans"
|
|
878
|
-
)
|
|
879
|
-
```
|
|
880
746
|
|
|
747
|
+
<!-- gsd:protected -->
|
|
881
748
|
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
882
749
|
|
|
883
|
-
|
|
750
|
+
**If the planner returns `## REVISION_CONFLICT`:** do NOT increment `iteration_count` and do NOT
|
|
751
|
+
re-spawn the checker — a conflict is not resolvable by re-running the same loop, so it must not
|
|
752
|
+
consume retry budget. Present the conflict table and its alternatives to the user and ask which
|
|
753
|
+
to take: adopt a named alternative / override the named constraint and apply the hint / amend the
|
|
754
|
+
constraint itself. Every option resolves the conflict; accepting the plans with the blocker still
|
|
755
|
+
open is NOT offered here — that choice belongs to the max-iteration escalation below. Re-spawn
|
|
756
|
+
the planner with the chosen resolution and then **re-evaluate its return from the top of this
|
|
757
|
+
handler** — never fall through to the checker spawn below, because a second conflict is still a
|
|
758
|
+
conflict, not a revised plan, and only a NON-conflict return may reach the checker or increment
|
|
759
|
+
`iteration_count`.
|
|
760
|
+
|
|
761
|
+
**Bounded:** a conflict naming the SAME `required_property` twice in a row (no successful revision in between) is a stall, and so is
|
|
762
|
+
the THIRD conflict return of this loop whatever property it names — alternating property names
|
|
763
|
+
would otherwise never trip the repeat rule. Stop re-spawning and route it to the same
|
|
764
|
+
max-iteration escalation below.
|
|
765
|
+
|
|
766
|
+
**On any other return** → spawn checker again (verify_gap_plans logic)
|
|
884
767
|
Increment iteration_count
|
|
885
768
|
|
|
886
769
|
**If iteration_count >= 3:**
|
|
@@ -892,9 +775,12 @@ Offer options:
|
|
|
892
775
|
2. Provide guidance (user gives direction, retry)
|
|
893
776
|
3. Abandon (exit, user runs /gsd:plan-phase manually)
|
|
894
777
|
|
|
895
|
-
|
|
778
|
+
Then wait for the user to pick one.
|
|
779
|
+
|
|
780
|
+
Exact Agent() prompt fields (revision_context, required_reading): `gsd-core/workflows/verify-work/detail/elaboration.md` § 3.
|
|
896
781
|
</step>
|
|
897
782
|
|
|
783
|
+
|
|
898
784
|
<step name="present_ready">
|
|
899
785
|
**Present completion and next steps:**
|
|
900
786
|
|