@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,160 @@
|
|
|
1
|
+
# Convergence Evidence Gate (#3304)
|
|
2
|
+
|
|
3
|
+
Bounds Step 7's anti-pattern scan so an approved gap-closure contract can
|
|
4
|
+
actually close. Applies **only** when `is_re_verification = true` (Step 0) —
|
|
5
|
+
a first pass has no prior contract to be out-of-contract from, so this gate
|
|
6
|
+
is a pure no-op there.
|
|
7
|
+
|
|
8
|
+
## The problem this closes
|
|
9
|
+
|
|
10
|
+
Steps 4-7c re-verify at full, unbounded scope on every re-verification pass —
|
|
11
|
+
that is documented, intended design, not the bug. The bug is narrower: Step
|
|
12
|
+
7's `Categorize:` line lets the verifier's own free-form judgment label
|
|
13
|
+
*anything* it believes "prevents goal" a 🛑 Blocker, and Step 9 Rule 1
|
|
14
|
+
promotes any 🛑 Blocker straight into `status: gaps_found` — with no
|
|
15
|
+
distinction between a blocker tied to what the gap-closure round was actually
|
|
16
|
+
supposed to fix and a blocker that is simply a new opinion formed on this
|
|
17
|
+
pass. Reported real-world instance: a re-verification cycle promoted four
|
|
18
|
+
"architectural and security observations" to blockers, none backed by a
|
|
19
|
+
failing test, none traceable to a requirement/decision/prior gap, reverting a
|
|
20
|
+
completed, all-green gap-closure round and recommending another `--gaps`
|
|
21
|
+
cycle — with no bound on how many times that could repeat.
|
|
22
|
+
|
|
23
|
+
Truths, artifacts, and key links (Steps 3-6) can **never** produce this
|
|
24
|
+
failure mode: Step 0 re-verification mode reuses the must-haves extracted in
|
|
25
|
+
Step 2 verbatim ("Skip to Step 3") rather than re-establishing them, so
|
|
26
|
+
whatever a truth/artifact/link *is* was fixed before this re-verification
|
|
27
|
+
round started. Only Step 7's blanket per-file scan is unbounded by that
|
|
28
|
+
must-haves contract — which is exactly the mechanism the issue's diagnosis
|
|
29
|
+
names. This gate therefore touches Step 7 only.
|
|
30
|
+
|
|
31
|
+
## Definitions
|
|
32
|
+
|
|
33
|
+
**Self-evidencing blocker (unaffected by this gate).** The debt-marker gate
|
|
34
|
+
(`TBD`/`FIXME`/`XXX` with no `issue #123`/`PR #123`/`#123`/`DEF-*` reference
|
|
35
|
+
on the same line) is the *only* Step 7 category with zero judgment
|
|
36
|
+
component — a regex match plus the absence of a follow-up reference, nothing
|
|
37
|
+
inferred. Its own textual presence in the file is the deterministic evidence.
|
|
38
|
+
It keeps blocking unconditionally, exactly as before. Do **not** extend this
|
|
39
|
+
carve-out to any other Step 7 category (stub classification, hollow props,
|
|
40
|
+
empty implementations, console-log-only): every one of those already
|
|
41
|
+
requires judgment per Step 7's own "Stub classification" paragraph ("a grep
|
|
42
|
+
match is a STUB only when the value flows to rendering... and no other code
|
|
43
|
+
path populates it with real data") — that judgment is exactly what this gate
|
|
44
|
+
exists to check.
|
|
45
|
+
|
|
46
|
+
**New-scope finding.** Any Step 7 🛑 Blocker other than a self-evidencing one
|
|
47
|
+
(above) is a new-scope finding **unless** either of the following holds, in
|
|
48
|
+
which case it is in-contract and blocks unconditionally, evidence or not:
|
|
49
|
+
|
|
50
|
+
1. **Carried-forward gap** — it matches an item in the previous
|
|
51
|
+
VERIFICATION.md's `gaps:` list, using the same 80%-token-overlap matching
|
|
52
|
+
algorithm Step 3b already uses for override matching (normalize to
|
|
53
|
+
lowercase, strip punctuation, collapse whitespace, tokenize, intersect).
|
|
54
|
+
2. **Regression** — the flagged file was modified since the previous
|
|
55
|
+
VERIFICATION.md's `verified:` timestamp. Check file-level, not
|
|
56
|
+
line-level — an LLM agent re-deriving precise line provenance mid-pass is
|
|
57
|
+
unreliable; file-level modification is a single, robust command:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git log --since="$PREV_VERIFIED_TS" --oneline -- "$file"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
A non-empty result means the file changed since the prior pass — the
|
|
64
|
+
gap-closure round could plausibly have introduced this finding, so it's
|
|
65
|
+
self-evidencing as a regression and blocks. **Fail closed**: if git
|
|
66
|
+
history is unavailable, ambiguous, or the timestamp can't be parsed,
|
|
67
|
+
treat the file as modified (blocks). The imprecision this trades away
|
|
68
|
+
(a big file with one unrelated hunk touched treats every pattern in it as
|
|
69
|
+
"new") only ever makes *more* things block, never fewer — consistent with
|
|
70
|
+
`<adversarial_stance>`.
|
|
71
|
+
|
|
72
|
+
A finding that is neither a carried-forward gap nor on a file modified since
|
|
73
|
+
the prior pass predates the gap-closure round entirely and was never flagged
|
|
74
|
+
as a gap then — this is the literal "some findings predated the gap
|
|
75
|
+
implementation and had previously been explicitly treated as non-blocking"
|
|
76
|
+
case from the issue.
|
|
77
|
+
|
|
78
|
+
**Deterministic evidence** — required for a new-scope finding to stay
|
|
79
|
+
blocking. One of:
|
|
80
|
+
|
|
81
|
+
- A **named test that FAILS when actually run** (red). Run exactly one test,
|
|
82
|
+
the same discipline Step 7b already uses for behavioral spot-checks —
|
|
83
|
+
never the full suite. Record the exact command and the failing output.
|
|
84
|
+
- **Another concrete, reproducible artifact** — a command + output that
|
|
85
|
+
demonstrates the defect (a crash, a probe failure, a reproducible bad
|
|
86
|
+
response). An assertion, opinion, or architectural preference with no test
|
|
87
|
+
and no reproducible command output is not evidence, however well-reasoned.
|
|
88
|
+
|
|
89
|
+
## The gate
|
|
90
|
+
|
|
91
|
+
- New-scope finding **with** deterministic evidence → 🛑 Blocker, unchanged.
|
|
92
|
+
This includes evidenced security findings — they are preserved and still
|
|
93
|
+
block.
|
|
94
|
+
- New-scope finding **without** deterministic evidence → downgrade out of
|
|
95
|
+
the blocker set. Record it in the `advisory:` frontmatter list (parallel to
|
|
96
|
+
the existing Step 9b `deferred:` list) with its reasoning intact. It does
|
|
97
|
+
**not** count toward Step 9 Rule 1's `gaps_found` trigger and does **not**
|
|
98
|
+
revert a completed must-have or, on its own, justify another
|
|
99
|
+
`/gsd:plan-phase --gaps` cycle.
|
|
100
|
+
|
|
101
|
+
This changes nothing else: a carried-forward gap or a regression still
|
|
102
|
+
blocks with or without a pre-existing requirement to point at, and every
|
|
103
|
+
non-Step-7 trigger (FAILED truth, MISSING/STUB artifact, NOT_WIRED link) is
|
|
104
|
+
untouched, since those can never be new-scope in the first place.
|
|
105
|
+
|
|
106
|
+
## What this deliberately does NOT implement
|
|
107
|
+
|
|
108
|
+
The issue as filed proposed a broader rule: a finding is advisory whenever
|
|
109
|
+
it is untraceable to a requirement/decision/prior-gap (conditions A and B),
|
|
110
|
+
regardless of evidence. The maintainer approved **condition C only** —
|
|
111
|
+
evidence, not contract-traceability, is the bar. A finding with no
|
|
112
|
+
pre-existing requirement to point at but with a real failing test still
|
|
113
|
+
blocks. Do not implement A/B: that would demote a genuine, reproducible
|
|
114
|
+
defect to advisory purely for being newly discovered, which is exactly the
|
|
115
|
+
deferral this project's no-defer rule forbids. This gate narrows *when a
|
|
116
|
+
blocker needs proof*, not *what counts as in scope*.
|
|
117
|
+
|
|
118
|
+
## Advisory frontmatter
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
advisory: # Only if new-scope findings lack deterministic evidence (Step 7)
|
|
122
|
+
- finding: "Short description of the new-scope concern"
|
|
123
|
+
category: architectural | security | other
|
|
124
|
+
reason: "Why this was raised; what would resolve it"
|
|
125
|
+
evidence_status: "none provided" # or cite what was attempted but inconclusive
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Report section
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
### Advisory (New Scope, Unevidenced)
|
|
132
|
+
|
|
133
|
+
New-scope findings from Step 7 with no deterministic evidence — reported,
|
|
134
|
+
not blocking, do not revert a completed must-have.
|
|
135
|
+
|
|
136
|
+
| # | Finding | Category | Why Advisory |
|
|
137
|
+
|---|---------|----------|--------------|
|
|
138
|
+
| 1 | {finding} | {category} | new-scope, no deterministic evidence |
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Include this section (even if empty, stating "None") whenever
|
|
142
|
+
`is_re_verification = true` ran — an omitted section reads as "not
|
|
143
|
+
checked," not "checked and clean."
|
|
144
|
+
|
|
145
|
+
## Worked example (from the issue's reported incident)
|
|
146
|
+
|
|
147
|
+
Prior pass: `gaps_found`, 4 items — all closed by approved gap-closure plans,
|
|
148
|
+
re-verification begins.
|
|
149
|
+
|
|
150
|
+
- Finding: "the retry loop's backoff strategy is architecturally fragile
|
|
151
|
+
under sustained load." Not in the prior `gaps:` list. The flagged file was
|
|
152
|
+
last modified 3 weeks before this verification pass (before the
|
|
153
|
+
gap-closure plans even started) — not a regression. No test run, no
|
|
154
|
+
reproducible command demonstrating a failure. → **advisory**, does not
|
|
155
|
+
block, does not revert the 4 closed gaps.
|
|
156
|
+
- Finding: `TBD: handle the timeout case` left in a file the gap-closure plan
|
|
157
|
+
edited this pass. → self-evidencing debt marker, unaffected by this gate,
|
|
158
|
+
blocks exactly as it always has.
|
|
159
|
+
- Finding: a previously-closed gap's file now fails the SAME named test that
|
|
160
|
+
originally proved it broken. → carried-forward gap, blocks.
|
|
@@ -1,7 +1,117 @@
|
|
|
1
1
|
# Worktree Path Safety
|
|
2
2
|
|
|
3
|
-
Guards for executor agents running inside Claude Code worktrees.
|
|
4
|
-
|
|
3
|
+
Guards for executor agents running inside Claude Code worktrees. The
|
|
4
|
+
supplied-root pin (step 0p) runs in EVERY mode; the remaining checks run before
|
|
5
|
+
any staging, Edit, or Write operation in worktree mode.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Supplied-root pin — step 0p (#4254, EVERY mode)
|
|
10
|
+
|
|
11
|
+
Sequential-mode dispatch (no `isolation="worktree"`) gives the executor no
|
|
12
|
+
spawn-time cwd guarantee, and the worktree-only guards below do not apply — so
|
|
13
|
+
a sequential executor whose process cwd resolved to a different checkout of
|
|
14
|
+
the same repo would self-derive that checkout as its root and commit there,
|
|
15
|
+
silently. Step 0p closes that hole by comparing the executor's actual root
|
|
16
|
+
against a root the ORCHESTRATOR already validated — never against anything the
|
|
17
|
+
executor derives itself.
|
|
18
|
+
|
|
19
|
+
**Runtime contract (executor):** if your prompt contains a `<project_root_pin>`
|
|
20
|
+
block, run its guard script verbatim before your first Edit/Write and again
|
|
21
|
+
before every commit, in the same cwd as that write or commit. On FATAL, halt
|
|
22
|
+
and report — recovery (moving commits between checkouts) is an
|
|
23
|
+
orchestrator/human decision, never agent self-repair. If your prompt contains
|
|
24
|
+
NO `<project_root_pin>` block (worktree/isolated dispatch, or a legacy
|
|
25
|
+
orchestrator), emit one warning line and continue with steps 0a/0b below — do
|
|
26
|
+
not fail closed on dispatches that never carried a pin. **Never bind
|
|
27
|
+
`{PINNED_ROOT}` yourself**: if this template reaches you unbound it is
|
|
28
|
+
reference prose, not your pin — only the orchestrator's build-time
|
|
29
|
+
substitution produces a valid guard.
|
|
30
|
+
|
|
31
|
+
**Composition contract (orchestrator — build time, NOT a sub-agent runtime
|
|
32
|
+
step):** copy the guard below into the dispatched prompt inside a
|
|
33
|
+
`<project_root_pin>` block, substituting `{PINNED_ROOT}` with the literal value
|
|
34
|
+
of `$ORCHESTRATOR_WT` captured at execute_waves entry, shell-single-quoted:
|
|
35
|
+
wrap the path in `'…'` and escape any embedded `'` as `'\''`. A path that
|
|
36
|
+
cannot be quoted this way must halt the phase (surface a blocker) rather than
|
|
37
|
+
ship a pin that could mis-parse. The comparison is git-vs-git on BOTH sides —
|
|
38
|
+
`git -C` resolves the pinned path to its repo's canonical toplevel in git's
|
|
39
|
+
own path representation, so symlink aliases, trailing slashes, `/var` vs
|
|
40
|
+
`/private/var` spellings, and Windows drive-letter forms — forward- or
|
|
41
|
+
backslash-separated, `RUNNER~1`-style short names included — compare equal by
|
|
42
|
+
construction (shell `pwd -P` normalization does NOT match git's emission on
|
|
43
|
+
Windows — do not re-introduce it).
|
|
44
|
+
|
|
45
|
+
Two portability rules baked into the guard below, learned from the #4254 CI
|
|
46
|
+
Windows legs: (1) a backslash comparator must be GENERATED at runtime
|
|
47
|
+
(`printf '\134'`), because a backslash written twice in the script text does
|
|
48
|
+
not survive the Windows command-line round-trip into bash — the doubled form
|
|
49
|
+
arrives halved, which silently rewrites any escape pattern that relies on it;
|
|
50
|
+
(2) every FATAL names its `Guard stage` and, where a git capture failed,
|
|
51
|
+
git's own stderr in a `Diagnostic` line, so a platform failure self-describes
|
|
52
|
+
instead of surfacing as a bare `Actual root: <none>`.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# gsd:guard=supplied-root-pin (#4254) — run before the first Edit/Write and before every commit.
|
|
56
|
+
PINNED_ROOT='{PINNED_ROOT}' # orchestrator build-time substitution — the only valid source of this value
|
|
57
|
+
PIN_STAGE=''
|
|
58
|
+
PIN_DIAG=''
|
|
59
|
+
gsd_pin_fail() {
|
|
60
|
+
echo "FATAL: executor root does not match the orchestrator-supplied PROJECT_ROOT pin (#4254)." >&2
|
|
61
|
+
echo " Pinned root: ${PINNED_ROOT:-<empty or unexpanded>}" >&2
|
|
62
|
+
echo " Actual root: ${ACTUAL_ROOT:-<none>}" >&2
|
|
63
|
+
echo " Guard stage: ${PIN_STAGE:-<unset>}" >&2
|
|
64
|
+
if [ -n "$PIN_DIAG" ]; then echo " Diagnostic: $PIN_DIAG" >&2; fi
|
|
65
|
+
echo " No writes or commits are permitted from this checkout. HALT and report; recovery is an" >&2
|
|
66
|
+
echo " orchestrator/human decision. Only the IMMEDIATE submodule of the pinned checkout is a" >&2
|
|
67
|
+
echo " legitimate other cwd — nested submodules must surface as a blocker, not self-route." >&2
|
|
68
|
+
exit 1
|
|
69
|
+
}
|
|
70
|
+
# Backslash comparator, generated at runtime: a backslash written twice in this
|
|
71
|
+
# script does not survive the Windows spawn path into bash (the command-line
|
|
72
|
+
# round-trip halves the doubled form), which rejected every C:\ pin at the form
|
|
73
|
+
# gate on the #4254 CI Windows legs. printf's octal escape is a lone backslash,
|
|
74
|
+
# which does survive; the quoted expansion below is literal in a case pattern.
|
|
75
|
+
BS=$(printf '\134')
|
|
76
|
+
# Fail closed if the comparator could not be generated: an empty BS would widen
|
|
77
|
+
# the drive-form arm below to drive-RELATIVE pins (C:foo) — the one fail-open
|
|
78
|
+
# seam in this construction, closed loudly rather than trusted to the shell.
|
|
79
|
+
if [ -z "$BS" ]; then
|
|
80
|
+
PIN_STAGE=form-gate
|
|
81
|
+
PIN_DIAG='backslash comparator generation failed (printf octal escape returned empty)'
|
|
82
|
+
gsd_pin_fail
|
|
83
|
+
fi
|
|
84
|
+
case "$PINNED_ROOT" in
|
|
85
|
+
''|'{PINNED_ROOT}') PIN_STAGE=pin-unbound; gsd_pin_fail ;; # empty or unexpanded pin — fail closed, never warn-and-proceed
|
|
86
|
+
/*) ;; # absolute POSIX form
|
|
87
|
+
[A-Za-z]:/*|[A-Za-z]:"$BS"*) ;; # Windows drive form, forward- or backslash-separated
|
|
88
|
+
*) PIN_STAGE=form-gate; gsd_pin_fail ;; # relative pin — never trustworthy across cwds
|
|
89
|
+
esac
|
|
90
|
+
ACTUAL_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
91
|
+
if [ -z "$ACTUAL_ROOT" ]; then
|
|
92
|
+
PIN_STAGE=actual-capture
|
|
93
|
+
PIN_DIAG="git rev-parse --show-toplevel from the cwd failed: $(git rev-parse --show-toplevel 2>&1 1>/dev/null)"
|
|
94
|
+
gsd_pin_fail
|
|
95
|
+
fi
|
|
96
|
+
PINNED_TL=$(git -C "$PINNED_ROOT" rev-parse --show-toplevel 2>/dev/null)
|
|
97
|
+
if [ -z "$PINNED_TL" ]; then
|
|
98
|
+
PIN_STAGE=pinned-capture
|
|
99
|
+
PIN_DIAG="git -C <pinned root> rev-parse --show-toplevel failed: $(git -C "$PINNED_ROOT" rev-parse --show-toplevel 2>&1 1>/dev/null)"
|
|
100
|
+
gsd_pin_fail
|
|
101
|
+
fi
|
|
102
|
+
if [ "$ACTUAL_ROOT" != "$PINNED_TL" ]; then
|
|
103
|
+
# Registered-submodule allowance: sub_repos plans legitimately commit inside an
|
|
104
|
+
# immediate submodule of the pinned checkout. The superproject working tree is
|
|
105
|
+
# git-emitted in the same representation as PINNED_TL, so the equality is
|
|
106
|
+
# representation-safe on every platform.
|
|
107
|
+
SUPER_TL=$(git rev-parse --show-superproject-working-tree 2>/dev/null)
|
|
108
|
+
if [ "$SUPER_TL" != "$PINNED_TL" ]; then
|
|
109
|
+
PIN_STAGE=root-mismatch
|
|
110
|
+
PIN_DIAG="actual=${ACTUAL_ROOT} pinned=${PINNED_TL} superproject=${SUPER_TL:-<none>}"
|
|
111
|
+
gsd_pin_fail
|
|
112
|
+
fi
|
|
113
|
+
fi
|
|
114
|
+
```
|
|
5
115
|
|
|
6
116
|
---
|
|
7
117
|
|
|
@@ -21,8 +21,14 @@ These files live directly at `.planning/` — not inside phase subdirectories.
|
|
|
21
21
|
| `LEARNINGS.md` | *(inline)* | `/gsd:extract-learnings`, `/gsd:execute-phase` (gated: `features.global_learnings`) | Phase retrospective learnings for future plans |
|
|
22
22
|
| `THREADS.md` | *(inline)* | `/gsd:thread` | Persistent discussion threads |
|
|
23
23
|
| `config.json` | `config.json` | `/gsd:new-project`, `/gsd:health --repair` | Project-specific GSD configuration |
|
|
24
|
-
| `CLAUDE.md` |
|
|
24
|
+
| `CLAUDE.md` | *(inline)* | `/gsd-profile` | Auto-assembled Claude Code context file |
|
|
25
25
|
| `RETROSPECTIVE.md` | *(inline)* | `/gsd:complete-milestone` | Living milestone retrospective updated at each milestone close |
|
|
26
|
+
| `WINDOWS.md` | *(none)* | broken-windows ledger (`src/broken-windows.cts`) | Tracked known-broken items pending resolution (#3224) |
|
|
27
|
+
| `STATE-ARCHIVE.md` | *(none)* | `state.cts`'s `cmdStatePrune` | Pruned historical STATE.md entries |
|
|
28
|
+
| `milestone.lock` | *(none)* | `src/milestone-lock.cts` | Persistent milestone (phase + session) claim, unlike the transient `STATE.md.lock`/`WAITING.json` (#3311) |
|
|
29
|
+
| `state.json` | *(none)* | `src/state-contract.cts` | Machine-readable state contract published at step boundaries (#3227) |
|
|
30
|
+
| `skill-manifest.json` | *(none)* | `init.cts`'s `cmdSkillManifest --write` | Project-scoped skill manifest (#3964) |
|
|
31
|
+
| `PATTERNS.md` | *(inline)* | `/gsd:extract-learnings` (graduation, `workflows/graduation.md`, `patterns` target) | Graduated cross-phase patterns -- distinct from the per-phase `NN-PATTERNS.md` below (#4282) |
|
|
26
32
|
|
|
27
33
|
### Version-stamped artifacts (pattern: `vX.Y-*.md`)
|
|
28
34
|
|
|
@@ -22,6 +22,10 @@ files_modified: [] # Files this plan modifies.
|
|
|
22
22
|
files_deleted: [] # OPTIONAL. Files this plan REMOVES. Declaring a path here is what
|
|
23
23
|
# lets worktree cleanup-wave merge the branch that deletes it; an
|
|
24
24
|
# undeclared deletion still blocks. Exact paths, not globs or dirs.
|
|
25
|
+
coupling_justified: [] # OPTIONAL. Deliberate, order-independent same-wave couplings: one
|
|
26
|
+
# "plan-id: reason" string per coupled peer, e.g.
|
|
27
|
+
# ["03-02: both append independent config keys"]. Exempts the pair
|
|
28
|
+
# from the plan-checker's Dimension 3b advisory (#3724).
|
|
25
29
|
autonomous: true # false if plan has checkpoints requiring user interaction
|
|
26
30
|
requirements: [] # REQUIRED — Requirement IDs from ROADMAP this plan addresses. MUST NOT be empty.
|
|
27
31
|
user_setup: [] # Human-required setup Claude cannot automate (see below)
|
|
@@ -172,9 +172,12 @@ Updated after each plan completion.
|
|
|
172
172
|
**Decisions:** Reference to PROJECT.md Key Decisions table, plus recent decisions summary for quick access. Full decision log lives in PROJECT.md.
|
|
173
173
|
|
|
174
174
|
**Pending Todos:** Ideas captured via /gsd-add-todo
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
-
|
|
175
|
+
- One bullet per pending todo, rendered by `init.todos`'s `pending_todos_markdown`
|
|
176
|
+
(each bullet capped at 240 characters: `- [date] [area] title — [todo file](path) — Needs ...`;
|
|
177
|
+
the todo-file link is repo-relative, so the cap does not depend on checkout path length)
|
|
178
|
+
- `None yet.` when there are no pending todos
|
|
179
|
+
- No collapse-by-count fallback — every pending todo gets its own line, always
|
|
180
|
+
(see #2618 design doc for why a "count if many" fallback was rejected)
|
|
178
181
|
|
|
179
182
|
**Blockers/Concerns:** From "Next Phase Readiness" sections
|
|
180
183
|
- Issues that affect future work
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Summary Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md` - phase completion documentation.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
phase: XX-name
|
|
12
|
+
plan: YY
|
|
13
|
+
subsystem: [primary category: auth, payments, ui, api, database, infra, testing, etc.]
|
|
14
|
+
tags: [searchable tech: jwt, stripe, react, postgres, prisma]
|
|
15
|
+
|
|
16
|
+
# Dependency graph
|
|
17
|
+
requires:
|
|
18
|
+
- phase: [prior phase this depends on]
|
|
19
|
+
provides: [what that phase built that this uses]
|
|
20
|
+
provides:
|
|
21
|
+
- [bullet list of what this phase built/delivered]
|
|
22
|
+
affects: [list of phase names or keywords that will need this context]
|
|
23
|
+
|
|
24
|
+
# Actuals (#2632) — pairs with the plan's `estimate` to calibrate future estimates.
|
|
25
|
+
# Same estimateTokens scale (chars/4 over the realized diff), never a harness token count.
|
|
26
|
+
actuals:
|
|
27
|
+
tokens: [chars/4 over files actually changed]
|
|
28
|
+
tasks: [tasks completed]
|
|
29
|
+
commits: [commits made]
|
|
30
|
+
|
|
31
|
+
# Tech tracking
|
|
32
|
+
tech-stack:
|
|
33
|
+
added: [libraries/tools added in this phase]
|
|
34
|
+
patterns: [architectural/code patterns established]
|
|
35
|
+
|
|
36
|
+
key-files:
|
|
37
|
+
created: [important files created]
|
|
38
|
+
modified: [important files modified]
|
|
39
|
+
|
|
40
|
+
key-decisions:
|
|
41
|
+
- "Decision 1"
|
|
42
|
+
- "Decision 2"
|
|
43
|
+
|
|
44
|
+
patterns-established:
|
|
45
|
+
- "Pattern 1: description"
|
|
46
|
+
- "Pattern 2: description"
|
|
47
|
+
|
|
48
|
+
requirements-completed: [] # REQUIRED — Copy ALL requirement IDs from this plan's `requirements` frontmatter field.
|
|
49
|
+
|
|
50
|
+
# Coverage metadata (#1602) — one entry per shipped deliverable. Drives DETERMINISTIC UAT routing in verify-work.
|
|
51
|
+
# OMIT this whole block for legacy/prose-only SUMMARYs — verify-work then falls back to the ## Accomplishments bullets
|
|
52
|
+
# (byte-identical behavior for un-migrated phases). See <coverage_guidance> below for the contract.
|
|
53
|
+
coverage:
|
|
54
|
+
- id: D1
|
|
55
|
+
description: "[deliverable in human-readable form — what would have been a prose ## Accomplishments bullet]"
|
|
56
|
+
requirement: "[REQ-ID from this plan's `requirements`, or omit if none]"
|
|
57
|
+
verification:
|
|
58
|
+
- kind: unit # unit | integration | e2e | automated_ui | manual_procedural | other
|
|
59
|
+
ref: "[tests/path.test.ts#test name | playwright:shot.png | command invocation]"
|
|
60
|
+
status: pass # pass | fail | unknown — from the latest run
|
|
61
|
+
human_judgment: false # REQUIRED boolean. false => may auto-pass IF every verification status is `pass`.
|
|
62
|
+
- id: D2
|
|
63
|
+
description: "[a deliverable that needs a human to sign off]"
|
|
64
|
+
verification: []
|
|
65
|
+
human_judgment: true
|
|
66
|
+
rationale: "[REQUIRED when human_judgment: true — why automation is insufficient]"
|
|
67
|
+
|
|
68
|
+
# Metrics
|
|
69
|
+
duration: Xmin
|
|
70
|
+
completed: YYYY-MM-DD
|
|
71
|
+
status: complete
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
# Phase [X]: [Name] Summary
|
|
75
|
+
|
|
76
|
+
**[Substantive one-liner describing outcome - NOT "phase complete" or "implementation finished"]**
|
|
77
|
+
|
|
78
|
+
## Performance
|
|
79
|
+
|
|
80
|
+
- **Duration:** [time] (e.g., 23 min, 1h 15m)
|
|
81
|
+
- **Started:** [ISO timestamp]
|
|
82
|
+
- **Completed:** [ISO timestamp]
|
|
83
|
+
- **Tasks:** [count completed]
|
|
84
|
+
- **Files modified:** [count]
|
|
85
|
+
|
|
86
|
+
## Accomplishments
|
|
87
|
+
- [Most important outcome]
|
|
88
|
+
- [Second key accomplishment]
|
|
89
|
+
- [Third if applicable]
|
|
90
|
+
|
|
91
|
+
## Task Commits
|
|
92
|
+
|
|
93
|
+
Each task was committed atomically:
|
|
94
|
+
|
|
95
|
+
1. **Task 1: [task name]** - `abc123f` (feat/fix/test/refactor)
|
|
96
|
+
2. **Task 2: [task name]** - `def456g` (feat/fix/test/refactor)
|
|
97
|
+
3. **Task 3: [task name]** - `hij789k` (feat/fix/test/refactor)
|
|
98
|
+
|
|
99
|
+
**Plan metadata:** `lmn012o` (docs: complete plan)
|
|
100
|
+
|
|
101
|
+
_Note: TDD tasks may have multiple commits (test → feat → refactor)_
|
|
102
|
+
|
|
103
|
+
## Files Created/Modified
|
|
104
|
+
- `path/to/file.ts` - What it does
|
|
105
|
+
- `path/to/another.ts` - What it does
|
|
106
|
+
|
|
107
|
+
## Decisions Made
|
|
108
|
+
[Key decisions with brief rationale, or "None - followed plan as specified"]
|
|
109
|
+
|
|
110
|
+
## Deviations from Plan
|
|
111
|
+
|
|
112
|
+
[If no deviations: "None - plan executed exactly as written"]
|
|
113
|
+
|
|
114
|
+
[If deviations occurred:]
|
|
115
|
+
|
|
116
|
+
### Auto-fixed Issues
|
|
117
|
+
|
|
118
|
+
**1. [Rule X - Category] Brief description**
|
|
119
|
+
- **Found during:** Task [N] ([task name])
|
|
120
|
+
- **Issue:** [What was wrong]
|
|
121
|
+
- **Fix:** [What was done]
|
|
122
|
+
- **Files modified:** [file paths]
|
|
123
|
+
- **Verification:** [How it was verified]
|
|
124
|
+
- **Committed in:** [hash] (part of task commit)
|
|
125
|
+
|
|
126
|
+
[... repeat for each auto-fix ...]
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
**Total deviations:** [N] auto-fixed ([breakdown by rule])
|
|
131
|
+
**Impact on plan:** [Brief assessment - e.g., "All auto-fixes necessary for correctness/security. No scope creep."]
|
|
132
|
+
|
|
133
|
+
## Issues Encountered
|
|
134
|
+
[Problems and how they were resolved, or "None"]
|
|
135
|
+
|
|
136
|
+
[Note: "Deviations from Plan" documents unplanned work that was handled automatically via deviation rules. "Issues Encountered" documents problems during planned work that required problem-solving.]
|
|
137
|
+
|
|
138
|
+
## User Setup Required
|
|
139
|
+
|
|
140
|
+
[If USER-SETUP.md was generated:]
|
|
141
|
+
**External services require manual configuration.** See [{phase}-USER-SETUP.md](./{phase}-USER-SETUP.md) for:
|
|
142
|
+
- Environment variables to add
|
|
143
|
+
- Dashboard configuration steps
|
|
144
|
+
- Verification commands
|
|
145
|
+
|
|
146
|
+
[If no USER-SETUP.md:]
|
|
147
|
+
None - no external service configuration required.
|
|
148
|
+
|
|
149
|
+
## Next Phase Readiness
|
|
150
|
+
[What's ready for next phase]
|
|
151
|
+
[Any blockers or concerns]
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
*Phase: XX-name*
|
|
155
|
+
*Completed: [date]*
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
<frontmatter_guidance>
|
|
159
|
+
**Purpose:** Enable automatic context assembly via dependency graph. Frontmatter makes summary metadata machine-readable so plan-phase can scan all summaries quickly and select relevant ones based on dependencies (`requires`/`provides`/`affects` create the explicit links; transitive closure follows from them).
|
|
160
|
+
|
|
161
|
+
**Subsystem/Tags:** Primary categorization + searchable technical keywords, for detecting related phases and tech-stack awareness. **Key-files:** important files for @context references in PLAN.md. **Patterns:** established conventions future phases should maintain.
|
|
162
|
+
|
|
163
|
+
**Population:** Frontmatter is populated during summary creation in execute-plan.md. See `<step name="create_summary">` for field-by-field guidance.
|
|
164
|
+
|
|
165
|
+
**Status (#2830):** `status: complete` is the default — the plan finished. Use `status: halted` instead when the plan reached a designed stop (a gate failure, a spike concluding without expanding into the full build, or any other intentional non-completion) and intentionally left tasks unfinished. `halted` is machine-read: any plan whose `depends_on` (directly or transitively) names a halted plan is reported as blocked, not offered to the executor, until the halt is resolved and re-summarized as `complete`.
|
|
166
|
+
</frontmatter_guidance>
|
|
167
|
+
|
|
168
|
+
<coverage_guidance>
|
|
169
|
+
**Purpose (#1602):** The `coverage:` block is a per-deliverable Requirements Traceability Matrix. It lets `verify-work`'s `extract_tests` step route deliverables DETERMINISTICALLY — auto-passing those proven by passing tests and reserving human UAT for genuine judgment — instead of re-deriving coverage from prose. Consumed via `gsd-tools uat classify-coverage --summary <SUMMARY>`.
|
|
170
|
+
|
|
171
|
+
**Field semantics:**
|
|
172
|
+
|
|
173
|
+
| Field | Purpose |
|
|
174
|
+
|---|---|
|
|
175
|
+
| `id` | Stable identifier (`D1`, `D2`…) for cross-referencing from UAT.md and audit reports. Must be unique within the SUMMARY. |
|
|
176
|
+
| `description` | The deliverable in human-readable form — what would have been a prose bullet. |
|
|
177
|
+
| `requirement` | Links back to a REQUIREMENTS.md REQ-ID (joins `requirements-completed`). Optional. |
|
|
178
|
+
| `verification[].kind` | Enum: `unit \| integration \| e2e \| automated_ui \| manual_procedural \| other`. |
|
|
179
|
+
| `verification[].ref` | Test path + descriptor (`file#test name`), Playwright screenshot ref, or command invocation. Required per entry. |
|
|
180
|
+
| `verification[].status` | `pass \| fail \| unknown` — populated from the latest test run. |
|
|
181
|
+
| `human_judgment` | Explicit boolean; REQUIRED. `true` always routes to a human. |
|
|
182
|
+
| `rationale` | REQUIRED when `human_judgment: true`. The audit trail for why automation is insufficient. |
|
|
183
|
+
|
|
184
|
+
**Deterministic contract (what the classifier does):**
|
|
185
|
+
- A deliverable auto-passes (no human prompt) **only** when `human_judgment: false` AND `verification` is non-empty AND every `verification[].status` is `pass`. This is the narrow, fully-proven case.
|
|
186
|
+
- **Everything else is presented to a human** — `human_judgment: true`, an empty `verification:`, any non-`pass`/`unknown` status, or any schema error. A false-negative is a redundant prompt (the status quo); a false-positive ships a bug UAT existed to catch.
|
|
187
|
+
- **Fail-safe default:** if you cannot determine coverage for a deliverable, you MUST set `human_judgment: true` with `rationale: "Coverage not determined at authoring time — verifier must classify"`. Never leave a deliverable's `human_judgment` empty, and never set it `false` just to skip the prompt — auto-pass additionally requires a passing `verification` entry, so the flag alone cannot skip the human.
|
|
188
|
+
- `coverage: []` means "no deliverables to classify" (the single-confirmation path). OMITTING the block entirely means "legacy" — `verify-work` falls back to prose `## Accomplishments` extraction unchanged.
|
|
189
|
+
</coverage_guidance>
|
|
190
|
+
|
|
191
|
+
<one_liner_rules>
|
|
192
|
+
The one-liner MUST be substantive:
|
|
193
|
+
|
|
194
|
+
**Good:** "JWT auth with refresh rotation using jose library" · "Prisma schema with User, Session, and Product models" · "Dashboard with real-time metrics via Server-Sent Events"
|
|
195
|
+
|
|
196
|
+
**Bad:** "Phase complete" · "Authentication implemented" · "Foundation finished" · "All tasks done"
|
|
197
|
+
|
|
198
|
+
The one-liner should tell someone what actually shipped.
|
|
199
|
+
</one_liner_rules>
|
|
200
|
+
|
|
201
|
+
<guidelines>
|
|
202
|
+
**Frontmatter:** MANDATORY - complete all fields. Enables automatic context assembly for future planning.
|
|
203
|
+
|
|
204
|
+
**One-liner:** Must be substantive. "JWT auth with refresh rotation using jose library" not "Authentication implemented".
|
|
205
|
+
|
|
206
|
+
**Decisions section:**
|
|
207
|
+
- Key decisions made during execution with rationale
|
|
208
|
+
- Extracted to STATE.md accumulated context
|
|
209
|
+
- Use "None - followed plan as specified" if no deviations
|
|
210
|
+
|
|
211
|
+
**After creation:** STATE.md updated with position, decisions, issues.
|
|
212
|
+
</guidelines>
|