@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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@~/.claude/gsd-core/references/response-language-directive.md
|
|
2
|
+
|
|
1
3
|
<purpose>
|
|
2
4
|
Cross-AI peer review — invoke external AI CLIs to independently review phase plans.
|
|
3
5
|
Each CLI gets the same prompt (PROJECT.md context, phase plans, requirements) and
|
|
@@ -208,7 +210,8 @@ Provide structured feedback on plan quality, completeness, and risks.
|
|
|
208
210
|
{research if present}
|
|
209
211
|
|
|
210
212
|
### Plans to Review
|
|
211
|
-
|
|
213
|
+
For each `*-PLAN.md` in the phase directory, in glob order, include its full content preceded by a `####` header carrying the plan's **repo-relative path** (e.g. `#### .planning/phases/<phase>/<NN>-PLAN.md`). The path header is the citable anchor for findings about the plan itself — cite it as `<repo-relative plan path>:<line>` (name the heading in prose beside the citation if it helps the reader); reserve `path:line` for repo files the plan references.
|
|
214
|
+
{per-plan: `#### <repo-relative plan path>` + full plan contents}
|
|
212
215
|
|
|
213
216
|
## Review Instructions
|
|
214
217
|
|
|
@@ -220,6 +223,13 @@ Provide structured feedback on plan quality, completeness, and risks.
|
|
|
220
223
|
|
|
221
224
|
Findings citing `file:line` evidence are weighted far more heavily than impressionistic ones; a review that only restates the plan's own claims has low value.
|
|
222
225
|
|
|
226
|
+
**Plan coverage is mandatory (#3301).** The exact list of plan ids and the total plan count for
|
|
227
|
+
this review are given in the "## Plan Coverage Manifest" section below. Give **every** listed id
|
|
228
|
+
its own `##`-level section headed with that id **verbatim** (e.g. `## 12.6-01`) before writing any
|
|
229
|
+
cross-plan comparison, an overall risk assessment, or a consensus-style summary. A review that
|
|
230
|
+
stops before every id has its own section is an incomplete review, not a summary — if you must
|
|
231
|
+
stop early, say so explicitly and name which ids you did not reach.
|
|
232
|
+
|
|
223
233
|
Analyze each plan and provide:
|
|
224
234
|
|
|
225
235
|
1. **Summary** — One-paragraph assessment
|
|
@@ -254,14 +264,57 @@ RUN_DIR="{run_dir}" # from gather_context
|
|
|
254
264
|
cp "$INSTRUCTIONS_BLOCK_FILE" "${RUN_DIR}/gsd-review-instructions.md"
|
|
255
265
|
cp "$ROADMAP_SECTION_FILE" "${RUN_DIR}/gsd-review-roadmap.md"
|
|
256
266
|
|
|
257
|
-
# Plan files: copy each PLAN.md to a predictable
|
|
258
|
-
|
|
267
|
+
# Plan files: copy each PLAN.md to a predictable path named after its source
|
|
268
|
+
# plan id (#3959: a bare padded index discards provenance — the budget tool's
|
|
269
|
+
# per-plan `### <file>` header then renders a run-dir artifact name no reviewer
|
|
270
|
+
# or consensus step can resolve. The plan id keeps the gsd-review-plan-*.md glob
|
|
271
|
+
# prepare_trimmed_prompt_for_reviewer consumes.)
|
|
272
|
+
for PLAN_FILE in "${PHASE_DIR}"/*-PLAN.md; do
|
|
273
|
+
PLAN_BASENAME=$(basename "$PLAN_FILE")
|
|
274
|
+
PLAN_ID="${PLAN_BASENAME%-PLAN.md}"
|
|
275
|
+
cp "$PLAN_FILE" "${RUN_DIR}/gsd-review-plan-${PLAN_ID}.md"
|
|
276
|
+
done
|
|
277
|
+
|
|
278
|
+
# #3301: plan coverage manifest — tell reviewers exactly which plan ids exist and
|
|
279
|
+
# how many there are, so a review that silently covers 6 of 7 plans is no longer
|
|
280
|
+
# indistinguishable from one that covers all 7. The id is the plan file's own
|
|
281
|
+
# basename with the `-PLAN.md` suffix stripped (e.g. `12.6-01-PLAN.md` ->
|
|
282
|
+
# `12.6-01`) — NOT the `plan:` frontmatter key, which holds only the bare
|
|
283
|
+
# in-phase sequence number ("01") and can never reconstruct the phase-qualified
|
|
284
|
+
# id reviewers need to cite. The filename is guaranteed present for every copied
|
|
285
|
+
# plan, so no plan is ever dropped from the manifest for lacking a key.
|
|
286
|
+
# Count and bullets are both derived directly from the glob loop below, never
|
|
287
|
+
# from re-splitting an accumulated string: bash word-splits an unquoted `$VAR`
|
|
288
|
+
# on IFS by default, but zsh does not (no `setopt SH_WORD_SPLIT` here), so a
|
|
289
|
+
# prior `PLAN_IDS="$PLAN_IDS $id"` + `for x in $PLAN_IDS` round-trip silently
|
|
290
|
+
# collapsed every id onto one iteration under zsh whenever there were 2+ plans
|
|
291
|
+
# (gsd-core#4099). Direct glob iteration (`for f in "${PHASE_DIR}"/*-PLAN.md`,
|
|
292
|
+
# same pattern as the copy loop above) is identical under both shells, so this
|
|
293
|
+
# never needs word-splitting at all.
|
|
294
|
+
PLAN_COUNT=0
|
|
295
|
+
PLAN_ID_BULLETS=""
|
|
259
296
|
for PLAN_FILE in "${PHASE_DIR}"/*-PLAN.md; do
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
297
|
+
PLAN_BASENAME=$(basename "$PLAN_FILE")
|
|
298
|
+
PLAN_ID="${PLAN_BASENAME%-PLAN.md}"
|
|
299
|
+
PLAN_COUNT=$((PLAN_COUNT + 1))
|
|
300
|
+
PLAN_ID_BULLETS="${PLAN_ID_BULLETS}- ${PLAN_ID}
|
|
301
|
+
"
|
|
263
302
|
done
|
|
264
303
|
|
|
304
|
+
# Named to avoid BOTH existing RUN_DIR globs: `gsd-review-*.md` (reviewer
|
|
305
|
+
# reports, invoke_reviewers) and `gsd-review-plan-*.md` (the plan copies just
|
|
306
|
+
# above) — a manifest matching either would be picked up as a report or as a
|
|
307
|
+
# plan to review.
|
|
308
|
+
{
|
|
309
|
+
echo ""
|
|
310
|
+
echo "## Plan Coverage Manifest"
|
|
311
|
+
echo ""
|
|
312
|
+
echo "Total plans in this review: ${PLAN_COUNT}"
|
|
313
|
+
echo ""
|
|
314
|
+
echo "Plan ids (give each one its own \`##\`-level section, headed verbatim):"
|
|
315
|
+
printf '%s' "$PLAN_ID_BULLETS"
|
|
316
|
+
} > "${RUN_DIR}/.plans-manifest.md"
|
|
317
|
+
|
|
265
318
|
# Optional section files (only if content was included in the combined prompt)
|
|
266
319
|
if [ -f ".planning/PROJECT.md" ]; then
|
|
267
320
|
cp .planning/PROJECT.md "${RUN_DIR}/gsd-review-project.md"
|
|
@@ -277,6 +330,15 @@ fi
|
|
|
277
330
|
if [ -f ".planning/REQUIREMENTS.md" ]; then
|
|
278
331
|
cp .planning/REQUIREMENTS.md "${RUN_DIR}/gsd-review-requirements.md"
|
|
279
332
|
fi
|
|
333
|
+
|
|
334
|
+
# #3301: append the manifest to BOTH files reviewers actually read — the
|
|
335
|
+
# per-lane budget-trimmed instructions file (descriptor lanes get
|
|
336
|
+
# `--instructions-file`) and the full combined prompt (combined-prompt lanes
|
|
337
|
+
# read the whole file). The `instructions` fragment is in prompt-budget's
|
|
338
|
+
# `minimumFor` floor set and is never trimmed, so this survives per-lane
|
|
339
|
+
# budget trimming intact.
|
|
340
|
+
cat "${RUN_DIR}/.plans-manifest.md" >> "${RUN_DIR}/gsd-review-instructions.md"
|
|
341
|
+
cat "${RUN_DIR}/.plans-manifest.md" >> "${RUN_DIR}/gsd-review-prompt.md"
|
|
280
342
|
```
|
|
281
343
|
|
|
282
344
|
Note: `INSTRUCTIONS_BLOCK_FILE`, `ROADMAP_SECTION_FILE`, and `PHASE_DIR` come from prompt assembly; `RUN_DIR` is the run-scoped dir from `gather_context` (#2358) re-assigned from `{run_dir}` above. Copy the temp files written during prompt assembly to these section paths (or write each section here if the prompt was built inline).
|
|
@@ -292,6 +354,20 @@ declared in the manifest — timeout floor, probe, prompt/output channel, empty-
|
|
|
292
354
|
behaviour that data genuinely cannot express is a named first-party `handler` (ADR-2782 D6), never
|
|
293
355
|
a bespoke block here.
|
|
294
356
|
|
|
357
|
+
**Effort and model resolution (#4255).** A lane's reasoning effort and model each resolve through
|
|
358
|
+
their own declared key, and the resolution order is inspectable rather than implicit:
|
|
359
|
+
|
|
360
|
+
| piece | order, highest first |
|
|
361
|
+
|---|---|
|
|
362
|
+
| model | pinned reviewer-instance `--model` → the lane's `modelConfigKey` (`review.models.<slug>`) → the CLI's own default |
|
|
363
|
+
| effort | the lane's `effortConfigKey` (`review.effort.<slug>`) → the lane's declared `defaultEffort` → **nothing emitted**, so the CLI's own configuration applies |
|
|
364
|
+
|
|
365
|
+
Both come from the LANE. Effort in particular is never read from an agent's execution settings:
|
|
366
|
+
until #4255 it was resolved by querying `gsd-plan-checker`, so every prompt-fed lane ran at that
|
|
367
|
+
verifier's `low` and, because the rendered argument is a CLI config override, it silently beat the
|
|
368
|
+
effort the operator had configured for the reviewer CLI itself. A lane that declares no effort
|
|
369
|
+
emits no argument at all — a value borrowed from an unrelated agent is worse than no value.
|
|
370
|
+
|
|
295
371
|
**Timeout guidance (#2194):** prompt-fed source-grounded reviews are slow — measured ~570 s for
|
|
296
372
|
Codex at `xhigh` effort and ~525 s for headless Claude on a large plan set. Each lane declares its
|
|
297
373
|
own `timeoutFloorMs` and the runner enforces it internally, but the **Bash tool call wrapping the
|
|
@@ -434,7 +510,14 @@ for SLUG in $(echo "$SELECTED_REVIEWERS" | tr ',' ' '); do
|
|
|
434
510
|
DISPATCH_SLUGS="$DISPATCH_SLUGS $SLUG"
|
|
435
511
|
done
|
|
436
512
|
|
|
437
|
-
|
|
513
|
+
# Rewrapped through unquoted command substitution, not consumed as a bare
|
|
514
|
+
# `$DISPATCH_SLUGS`: bash word-splits an unquoted scalar on IFS by default,
|
|
515
|
+
# but zsh does not, so a bare re-split collapsed every slug onto one
|
|
516
|
+
# iteration under zsh whenever 2+ reviewers were selected (gsd-core#4109).
|
|
517
|
+
# Unquoted `$(...)` re-splits identically under both shells regardless of
|
|
518
|
+
# `SH_WORD_SPLIT` — same reason the accumulator-building loop above already
|
|
519
|
+
# works under both.
|
|
520
|
+
for SLUG in $(printf '%s' "$DISPATCH_SLUGS"); do
|
|
438
521
|
if [ "$PARALLEL_LANES" = "true" ]; then
|
|
439
522
|
run_review_lane "$SLUG" &
|
|
440
523
|
else
|
|
@@ -452,7 +535,9 @@ wait
|
|
|
452
535
|
# produces is byte-identical to the one a sequential run produces. This is post-join and therefore
|
|
453
536
|
# single-threaded, so `>>` here is safe. A lane that was budget-skipped, or that never started,
|
|
454
537
|
# leaves no result file and correctly contributes no line.
|
|
455
|
-
|
|
538
|
+
# Rewrapped through unquoted command substitution (gsd-core#4109) — see the
|
|
539
|
+
# dispatch loop above for why a bare `$DISPATCH_SLUGS` collapses under zsh.
|
|
540
|
+
for SLUG in $(printf '%s' "$DISPATCH_SLUGS"); do
|
|
456
541
|
LANE_RESULT="$RUN_DIR/gsd-review-lane-result-$SLUG.json"
|
|
457
542
|
if [ -f "$LANE_RESULT" ]; then
|
|
458
543
|
cat "$LANE_RESULT" >> "$RUN_DIR/gsd-review-lane-results.jsonl"
|
|
@@ -513,7 +598,10 @@ if [ "${LANE_LINES:-0}" -eq 0 ]; then
|
|
|
513
598
|
# failure stub does not. If a slug has no stub at all, it is not a skip.
|
|
514
599
|
DISPATCHED_COUNT=0
|
|
515
600
|
SKIPPED_COUNT=0
|
|
516
|
-
|
|
601
|
+
# Rewrapped through unquoted command substitution (gsd-core#4109): a bare
|
|
602
|
+
# `$DISPATCH_SLUGS` word-splits under bash but not zsh, collapsing every
|
|
603
|
+
# slug onto one iteration there whenever 2+ reviewers were selected.
|
|
604
|
+
for SLUG in $(printf '%s' "$DISPATCH_SLUGS"); do
|
|
517
605
|
DISPATCHED_COUNT=$((DISPATCHED_COUNT + 1))
|
|
518
606
|
STUB="$RUN_DIR/gsd-review-$SLUG.md"
|
|
519
607
|
if [ -f "$STUB" ] && grep -q "review skipped: prompt budget" "$STUB" 2>/dev/null; then
|
|
@@ -536,8 +624,90 @@ fi
|
|
|
536
624
|
their `.err`/stub files preserved under `.review-diagnostics/` by `present_results`) and stop.
|
|
537
625
|
- **Otherwise** (at least one lane produced a result — R1, unchanged): proceed exactly as below.
|
|
538
626
|
|
|
627
|
+
**#3301: plan coverage check.** For each dispatched lane that produced a *real* review (not a
|
|
628
|
+
stub, not budget-skipped, not empty), check whether its output mentions every plan id from
|
|
629
|
+
`.plans-manifest.md` — the same manifest `build_prompt` gave the reviewer, so the expected-id list
|
|
630
|
+
here can never diverge from what the reviewer was actually told. This is diagnostic only: it never
|
|
631
|
+
blocks the workflow, never fails a lane, and never changes the `TOTAL_LANE_FAILURE`/
|
|
632
|
+
`ALL_LANES_SKIPPED` gate above.
|
|
633
|
+
|
|
634
|
+
CodeRabbit is excluded — it is a diff-only lane that never receives the source-grounding prompt
|
|
635
|
+
(and therefore never receives the manifest or the per-id section instruction either), the same fact
|
|
636
|
+
that already excludes it from grounded-review weighting in the Consensus Summary below.
|
|
637
|
+
|
|
638
|
+
The match is intentionally lenient about *where* an id appears (a `##`-headed section is asked for,
|
|
639
|
+
but plain prose mentioning the id still counts as coverage — grading only the letter of the
|
|
640
|
+
formatting instruction would produce false INCOMPLETE verdicts against a reviewer that cited real
|
|
641
|
+
evidence correctly). It is strict about *what* counts as a match: the id is regex-escaped (a
|
|
642
|
+
decimal phase like `12.6` must not let `12X6-01` satisfy `12.6-01` through an unescaped `.`), and a
|
|
643
|
+
`-`/word character immediately before or after the candidate match does not count as a boundary (so
|
|
644
|
+
a threat id like `T-04-07` elsewhere in the review must not register as covering plan `04-07`).
|
|
645
|
+
|
|
646
|
+
```bash
|
|
647
|
+
RUN_DIR="{run_dir}"
|
|
648
|
+
MANIFEST="$RUN_DIR/.plans-manifest.md"
|
|
649
|
+
|
|
650
|
+
# Recompute — a shell variable does not survive across separate fenced blocks
|
|
651
|
+
# (each is its own process), so DISPATCH_SLUGS from the gate-check block above
|
|
652
|
+
# cannot be assumed to still be set here. Same recomputation as that block and
|
|
653
|
+
# as invoke_reviewers.
|
|
654
|
+
DISPATCH_SLUGS=""
|
|
655
|
+
for SLUG in $(echo "$SELECTED_REVIEWERS" | tr ',' ' '); do
|
|
656
|
+
case " $DISPATCH_SLUGS " in
|
|
657
|
+
*" $SLUG "*) continue ;;
|
|
658
|
+
esac
|
|
659
|
+
DISPATCH_SLUGS="$DISPATCH_SLUGS $SLUG"
|
|
660
|
+
done
|
|
661
|
+
|
|
662
|
+
# Rewrapped through unquoted command substitution (gsd-core#4109): a bare
|
|
663
|
+
# `$DISPATCH_SLUGS` word-splits under bash but not zsh, collapsing every
|
|
664
|
+
# slug onto one iteration there whenever 2+ reviewers were selected.
|
|
665
|
+
for SLUG in $(printf '%s' "$DISPATCH_SLUGS"); do
|
|
666
|
+
[ "$SLUG" = "coderabbit" ] && continue
|
|
667
|
+
REVIEW_FILE="$RUN_DIR/gsd-review-$SLUG.md"
|
|
668
|
+
[ -f "$REVIEW_FILE" ] || continue
|
|
669
|
+
[ -s "$REVIEW_FILE" ] || continue
|
|
670
|
+
grep -q "review skipped: prompt budget" "$REVIEW_FILE" 2>/dev/null && continue
|
|
671
|
+
grep -q "failed or returned empty output" "$REVIEW_FILE" 2>/dev/null && continue
|
|
672
|
+
|
|
673
|
+
node -e '
|
|
674
|
+
const fs = require("fs");
|
|
675
|
+
const { escapeRegex } = require("./gsd-core/bin/lib/pattern.cjs");
|
|
676
|
+
const manifest = fs.readFileSync(process.argv[1], "utf8");
|
|
677
|
+
const review = fs.readFileSync(process.argv[2], "utf8");
|
|
678
|
+
const ids = manifest.split("\n")
|
|
679
|
+
.filter((l) => l.startsWith("- "))
|
|
680
|
+
.map((l) => l.slice(2).trim())
|
|
681
|
+
.filter(Boolean);
|
|
682
|
+
const missing = ids.filter((id) => {
|
|
683
|
+
const re = new RegExp("(?<![\\w-])" + escapeRegex(id) + "(?![\\w-])");
|
|
684
|
+
return !re.test(review);
|
|
685
|
+
});
|
|
686
|
+
process.stdout.write(JSON.stringify({ complete: missing.length === 0, missing_ids: missing, total: ids.length }));
|
|
687
|
+
' "$MANIFEST" "$REVIEW_FILE" > "$RUN_DIR/.plan-coverage-$SLUG.json"
|
|
688
|
+
done
|
|
689
|
+
```
|
|
690
|
+
|
|
691
|
+
Each `${RUN_DIR}/.plan-coverage-<slug>.json` carries `{complete, missing_ids, total}` for one
|
|
692
|
+
graded lane. Collect these into a `plan_coverage` frontmatter block — **only** when at least one
|
|
693
|
+
graded lane has `complete: false` (mirrors the existing `trimmed_reviewers` precedent: present
|
|
694
|
+
only when there is something to report):
|
|
695
|
+
|
|
696
|
+
```yaml
|
|
697
|
+
plan_coverage: # only present if at least one graded lane is incomplete
|
|
698
|
+
<slug>:
|
|
699
|
+
total: 7
|
|
700
|
+
missing: ["12.6-07"]
|
|
701
|
+
```
|
|
702
|
+
|
|
539
703
|
Combine all review responses into `{phase_dir}/{padded_phase}-REVIEWS.md`:
|
|
540
704
|
|
|
705
|
+
Capture only the existing conflict entry bytes after the exact `## Plan-Revision Conflicts`
|
|
706
|
+
heading and before the end of the first exact `<!-- gsd:plan-revision-conflicts:begin -->` /
|
|
707
|
+
`<!-- gsd:plan-revision-conflicts:end -->` pair immediately after the artifact title, if present,
|
|
708
|
+
as `{preserved_plan_revision_conflict_entries}`. Ignore identical headings or delimiters in reviewer
|
|
709
|
+
output: reviewers do not own blocking state. Restore the captured bytes at the explicit slot below.
|
|
710
|
+
|
|
541
711
|
After all reviewers complete, collect trim metadata files written during the run. For each reviewer that was trimmed (i.e. a `.metadata.json` file exists and `hardFailed` or `omitted` is non-empty, or `projectMdShrunk` is true, or `planTruncationPct > 0`), include a `trimmed_reviewers` block in the frontmatter. Omit the key entirely if no reviewer was trimmed.
|
|
542
712
|
|
|
543
713
|
**Reviewer instances (#1517, optional):** when instances ran, frontmatter records their
|
|
@@ -580,10 +750,19 @@ trimmed_reviewers: # only present if at least one reviewer was trimmed
|
|
|
580
750
|
plan_truncation_pct: 22
|
|
581
751
|
hard_failed: false
|
|
582
752
|
note_injected: true
|
|
753
|
+
plan_coverage: # only present if at least one graded lane is incomplete (#3301)
|
|
754
|
+
ollama:
|
|
755
|
+
total: 7
|
|
756
|
+
missing: ["12.6-07"]
|
|
583
757
|
---
|
|
584
758
|
|
|
585
759
|
# Cross-AI Plan Review — Phase {N}
|
|
586
760
|
|
|
761
|
+
<!-- gsd:plan-revision-conflicts:begin -->
|
|
762
|
+
## Plan-Revision Conflicts
|
|
763
|
+
{preserved_plan_revision_conflict_entries}
|
|
764
|
+
<!-- gsd:plan-revision-conflicts:end -->
|
|
765
|
+
|
|
587
766
|
<!-- Sections are RENDERED from each lane's declared `reviewsSection`, in descriptor order.
|
|
588
767
|
There is deliberately no hardcoded per-reviewer heading list here any more: a hand-maintained
|
|
589
768
|
list is exactly the drift #2781 was filed about, and it silently disagreed with the roster.
|
|
@@ -666,6 +845,19 @@ NOT a preservation failure. This copy is deliberately NOT part of the commit abo
|
|
|
666
845
|
step names only `{padded_phase}-REVIEWS.md` explicitly, never a directory glob, so
|
|
667
846
|
`.review-diagnostics/` is never swept into it.
|
|
668
847
|
|
|
848
|
+
**#4097: preserve lane OUTPUT, never the run's own input copies.** `RUN_DIR` holds not only
|
|
849
|
+
lane outputs — prompt assembly (the `gather_context`/section-copy step above) also writes the
|
|
850
|
+
run's assembled INPUTS there under the same `gsd-review-` prefix: the combined prompt, the
|
|
851
|
+
instructions/roadmap sections, a copy of every plan under review, the project/context/research/
|
|
852
|
+
requirements sections, and the per-lane trimmed prompts. Those are byte-identical duplicates of
|
|
853
|
+
files already committed under `.planning/`; sweeping them into `.review-diagnostics/` buries
|
|
854
|
+
the actual evidence under plan duplicates and grows the phase directory on every run. The
|
|
855
|
+
exclusion list below is CLOSED and owned here: this workflow itself writes every input
|
|
856
|
+
basename at prompt-assembly time, so a future input file CANNOT silently join the evidence
|
|
857
|
+
set — adding one means adding its stem to this list consciously. Lane slugs never begin with
|
|
858
|
+
any excluded stem (`prompt`, `instructions`, `plan-`, `project`, `roadmap`, `context`,
|
|
859
|
+
`research`, `requirements`), so a lane report can never be excluded by accident.
|
|
860
|
+
|
|
669
861
|
Preservation and cleanup MUST run in the same fenced block below (a shell variable cannot
|
|
670
862
|
survive across separate fences — each is its own process). `mkdir -p` and every `cp` are
|
|
671
863
|
exit-status checked; `rm -rf "$RUN_DIR"` runs ONLY if nothing was preserved (nothing to
|
|
@@ -679,7 +871,20 @@ shopt -s nullglob 2>/dev/null; setopt NULL_GLOB 2>/dev/null
|
|
|
679
871
|
RUN_DIR="{run_dir}"
|
|
680
872
|
DIAG_DIR="{phase_dir}/.review-diagnostics"
|
|
681
873
|
|
|
682
|
-
|
|
874
|
+
# #4097: `gsd-review-*.md` matches BOTH lane outputs (reports, diagnostic stubs) and the
|
|
875
|
+
# run's own assembled input copies (see the #4097 note above). Filter by basename against
|
|
876
|
+
# the closed input set this workflow itself writes — direct glob iteration with a `case`
|
|
877
|
+
# filter, no string accumulator, identical under bash and zsh (#4099/#4109), and the
|
|
878
|
+
# `nullglob` set at the top of this fence keeps an empty RUN_DIR an empty array (#2962).
|
|
879
|
+
# `gsd-review-prompt*` deliberately covers BOTH the combined prompt (`gsd-review-prompt.md`)
|
|
880
|
+
# and the per-lane trimmed prompts (`gsd-review-prompt-<slug>.md`).
|
|
881
|
+
_DIAG_MD=()
|
|
882
|
+
for f in "$RUN_DIR"/gsd-review-*.md; do
|
|
883
|
+
case "$(basename "$f")" in
|
|
884
|
+
gsd-review-prompt*|gsd-review-instructions*|gsd-review-plan-*|gsd-review-project*|gsd-review-roadmap*|gsd-review-context*|gsd-review-research*|gsd-review-requirements*) ;;
|
|
885
|
+
*) _DIAG_MD+=("$f") ;;
|
|
886
|
+
esac
|
|
887
|
+
done
|
|
683
888
|
_DIAG_ERR=()
|
|
684
889
|
for f in "$RUN_DIR"/gsd-review-*.err; do
|
|
685
890
|
[ -s "$f" ] && _DIAG_ERR+=("$f")
|
|
@@ -150,6 +150,18 @@
|
|
|
150
150
|
"read": "gsd-core/workflows/progress/steps/forensic-audit.md"
|
|
151
151
|
}
|
|
152
152
|
],
|
|
153
|
+
"quick-batch": [
|
|
154
|
+
{
|
|
155
|
+
"id": "research-phase",
|
|
156
|
+
"when": "flag:--research",
|
|
157
|
+
"read": "gsd-core/workflows/quick-batch/steps/research-phase.md"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "verification-wave",
|
|
161
|
+
"when": "flag:--validate",
|
|
162
|
+
"read": "gsd-core/workflows/quick-batch/steps/verification-wave.md"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
153
165
|
"quick": [
|
|
154
166
|
{
|
|
155
167
|
"id": "discussion-phase",
|
|
@@ -23,7 +23,7 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
|
23
23
|
AGENT_SKILLS_AUDITOR=$(gsd_run query agent-skills gsd-security-auditor)
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
**If `response_language` is set:** All user-facing questions, prompts, and explanations
|
|
26
|
+
**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.
|
|
27
27
|
|
|
28
28
|
Parse: `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`.
|
|
29
29
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@~/.claude/gsd-core/references/response-language-directive.md
|
|
2
|
+
|
|
1
3
|
<purpose>
|
|
2
4
|
Generate a post-session summary document capturing work performed, outcomes achieved, and estimated resource usage. Writes SESSION_REPORT.md to .planning/reports/ for human review and stakeholder sharing.
|
|
3
5
|
</purpose>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
Apply response_language to all user-facing prose — narration between tool calls, status updates, progress notes, and findings included; preserve code, paths, and identifiers.
|
|
2
|
+
|
|
1
3
|
<purpose>
|
|
2
4
|
Interactive configuration of GSD power-user knobs — plan bounce, node repair, subagent timeouts,
|
|
3
5
|
inline plan threshold, cross-AI execution, base branch, branch templates, response language,
|
|
@@ -60,7 +60,7 @@ if [[ -z "${GSD_CONFIG_PATH:-}" ]]; then
|
|
|
60
60
|
fi
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
**If `response_language` is set:** All user-facing questions, prompts, and explanations
|
|
63
|
+
**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.
|
|
64
64
|
|
|
65
65
|
Store `$GSD_CONFIG_PATH`. Every subsequent read/write uses it.
|
|
66
66
|
</step>
|
|
@@ -163,12 +163,13 @@ namespace — any other slug fails with `Unknown config key`.
|
|
|
163
163
|
Settable keys (the shipped registry's model-bearing lanes):
|
|
164
164
|
|
|
165
165
|
`review.models.agy` (Antigravity), `review.models.claude`, `review.models.codex`,
|
|
166
|
-
`review.models.
|
|
167
|
-
`review.models.
|
|
166
|
+
`review.models.cursor`, `review.models.gemini`, `review.models.kimi-code`,
|
|
167
|
+
`review.models.llama_cpp`, `review.models.lm_studio`, `review.models.ollama`,
|
|
168
|
+
`review.models.opencode`.
|
|
168
169
|
|
|
169
|
-
Reviewer lanes `
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
Reviewer lanes `qwen` and `coderabbit` declare no `modelConfigKey` — there is
|
|
171
|
+
nothing to configure for them here (whether they should have a per-lane model
|
|
172
|
+
key is a separate question, out of scope for this workflow).
|
|
172
173
|
If the user asks for one of those, say exactly that and skip.
|
|
173
174
|
|
|
174
175
|
```text
|
|
@@ -208,8 +209,8 @@ If it is not one of the settable keys, print:
|
|
|
208
209
|
|
|
209
210
|
```text
|
|
210
211
|
Rejected: review.models.<slug> is not settable — only the reviewer lanes whose
|
|
211
|
-
keys are enumerated above can be configured here. (
|
|
212
|
-
|
|
212
|
+
keys are enumerated above can be configured here. (qwen and coderabbit have no
|
|
213
|
+
per-lane model key.)
|
|
213
214
|
```
|
|
214
215
|
|
|
215
216
|
and re-prompt.
|
|
@@ -28,7 +28,7 @@ if [[ -z "${GSD_CONFIG_PATH:-}" ]]; then
|
|
|
28
28
|
fi
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
**If `response_language` is set:** All user-facing questions, prompts, and explanations
|
|
31
|
+
**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.
|
|
32
32
|
|
|
33
33
|
Creates `config.json` (at the resolved path) with defaults if missing. `INIT` still holds `state.load` output for any step that needs STATE fields.
|
|
34
34
|
Store `$GSD_CONFIG_PATH` — all subsequent reads and writes use this path, not a hardcoded `.planning/config.json`, so active-workstream installs target the correct file (#2282).
|
|
@@ -60,6 +60,7 @@ Parse current values (default to `true` if not present):
|
|
|
60
60
|
- `model_profile` — which model each agent uses (default: `balanced`)
|
|
61
61
|
- `git.branching_strategy` — branching approach (default: `"none"`)
|
|
62
62
|
- `workflow.use_worktrees` — whether parallel executor agents run in worktree isolation (honored when the runtime declares a `dispatch.isolation` primitive — `harness-worktree` or `orchestrator-worktree`; runtimes declaring `none` default it to `false` and fail closed on an explicit `true` — #1521, #2486, #2584)
|
|
63
|
+
- `workflow.compact_content` — load token-minimized instruction variants where they exist, trading rarely-needed elaboration for a smaller always-loaded instruction window (default: false if absent; #4139)
|
|
63
64
|
- `model_policy.provider` — provider slug for model policy (default: `null`; known values: anthropic, openai, google, qwen; set via /gsd:config --advanced)
|
|
64
65
|
- `model_policy.budget` — budget level for model policy (default: `null`; known values: high, medium, low; set via /gsd:config --advanced)
|
|
65
66
|
- `model_policy.high` — model ID for high-cost tier (default: `null`; set via /gsd:config --advanced)
|
|
@@ -131,7 +132,7 @@ Intel, Graphify, Graph auto-update _(conditional — only when graphify=on)_
|
|
|
131
132
|
Model Profile, Auto-Advance, Branching
|
|
132
133
|
|
|
133
134
|
### Misc
|
|
134
|
-
Context Warnings, Research Qs
|
|
135
|
+
Context Warnings, Compact Content, Research Qs
|
|
135
136
|
|
|
136
137
|
**Conditional visibility — code_review_depth:** This question is shown only when the user's chosen `code_review` value (after they answer that question, or the pre-selected value if unchanged) is on. If `code_review` is off, omit the `code_review_depth` question from the AskUserQuestion block and preserve the existing `workflow.code_review_depth` value in config (do not overwrite). Implementation: ask the Model + Planning + Execution-up-to-Code-Review questions first; if `code_review=on`, include `code_review_depth` in the same batch; otherwise skip it. Conceptually this is a one-branch split on the `code_review` answer.
|
|
137
138
|
|
|
@@ -382,6 +383,15 @@ AskUserQuestion([
|
|
|
382
383
|
{ label: "No", description: "Disable warnings. Allows Claude to reach auto-compact naturally. Good for long unattended runs." }
|
|
383
384
|
]
|
|
384
385
|
},
|
|
386
|
+
{
|
|
387
|
+
question: "Use token-minimized instruction content where available? (smaller context footprint)",
|
|
388
|
+
header: "Compact Content",
|
|
389
|
+
multiSelect: false,
|
|
390
|
+
options: [
|
|
391
|
+
{ label: "No (Recommended)", description: "Full instruction detail loaded every time." },
|
|
392
|
+
{ label: "Yes", description: "Terser instructions where a compact variant exists; canonical detail loads only when actually needed." }
|
|
393
|
+
]
|
|
394
|
+
},
|
|
385
395
|
{
|
|
386
396
|
question: "Research best practices before asking questions? (web search during new-project and discuss-phase)",
|
|
387
397
|
header: "Research Qs",
|
|
@@ -475,7 +485,8 @@ Merge new settings into existing config.json:
|
|
|
475
485
|
"research_before_questions": true/false,
|
|
476
486
|
"discuss_mode": "discuss" | "assumptions",
|
|
477
487
|
"skip_discuss": true/false,
|
|
478
|
-
"use_worktrees": true/false
|
|
488
|
+
"use_worktrees": true/false, // never written as true when the runtime's dispatch.isolation is none; omitted entirely when the user chose "Leave unchanged" (#2486)
|
|
489
|
+
"compact_content": true/false
|
|
479
490
|
},
|
|
480
491
|
"plan_review": {
|
|
481
492
|
"source_grounding": true/false
|
|
@@ -532,7 +543,7 @@ Merge new settings into existing config.json:
|
|
|
532
543
|
|
|
533
544
|
`code_review_depth` is written only if the `code_review` question was answered `on`; otherwise leave the existing value in place.
|
|
534
545
|
|
|
535
|
-
- **Non-capability keys** (`model_profile`, `commit_docs`, `workflow.plan_check`, `workflow.verifier`, `workflow.auto_advance`, `workflow.text_mode`, `workflow.research_before_questions`, `workflow.discuss_mode`, `workflow.skip_discuss`, `workflow.use_worktrees`, `plan_review.source_grounding`, `graphify.auto_update`, `git.*`, `hooks.*`, `model_policy.*`): write via `gsd_run query config-set <key.path> <value>` as before.
|
|
546
|
+
- **Non-capability keys** (`model_profile`, `commit_docs`, `workflow.plan_check`, `workflow.verifier`, `workflow.auto_advance`, `workflow.text_mode`, `workflow.compact_content`, `workflow.research_before_questions`, `workflow.discuss_mode`, `workflow.skip_discuss`, `workflow.use_worktrees`, `plan_review.source_grounding`, `graphify.auto_update`, `git.*`, `hooks.*`, `model_policy.*`): write via `gsd_run query config-set <key.path> <value>` as before.
|
|
536
547
|
|
|
537
548
|
`model_profile` is written on Q1 "Adaptive (Recommended)" (→ adaptive) or Q1 "Inherit" (→ inherit) immediately; for Q1 "Standard tier…", `model_profile` is written from Q2's answer. If Q1 = "Standard tier…" but Q2 is cancelled, leave the existing `model_profile` value unchanged — do not write any new value.
|
|
538
549
|
|
|
@@ -586,7 +597,8 @@ Write `~/.gsd/defaults.json` with:
|
|
|
586
597
|
"code_review": <current>,
|
|
587
598
|
"code_review_depth": <current>,
|
|
588
599
|
"ui_review": <current>,
|
|
589
|
-
"skip_discuss": <current
|
|
600
|
+
"skip_discuss": <current>,
|
|
601
|
+
"compact_content": <current>
|
|
590
602
|
},
|
|
591
603
|
"plan_review": {
|
|
592
604
|
"source_grounding": <current>
|
|
@@ -632,6 +644,7 @@ Display:
|
|
|
632
644
|
| Git Tagging | {On/Off} |
|
|
633
645
|
| Skip Discuss | {On/Off} |
|
|
634
646
|
| Context Warnings | {On/Off} |
|
|
647
|
+
| Compact Content | {On/Off} |
|
|
635
648
|
| Saved as Defaults | {Yes/No} |
|
|
636
649
|
|
|
637
650
|
These settings apply to future /gsd:plan-phase and /gsd:execute-phase runs.
|
|
@@ -650,7 +663,7 @@ Quick commands:
|
|
|
650
663
|
|
|
651
664
|
<success_criteria>
|
|
652
665
|
- [ ] Current config read
|
|
653
|
-
- [ ] User presented with
|
|
666
|
+
- [ ] User presented with 25 settings (profile + workflow toggles + features + git branching + git tagging + ctx warnings + compact content), grouped into six sections: Planning, Execution, Docs & Output, Features, Model & Pipeline, Misc. `code_review_depth` is conditional on `code_review=on`. Model profile uses a two-question split (Q1: Adaptive / Standard tier / Inherit; Q2: Quality / Balanced / Budget — only when Standard tier chosen) to stay within the 4-option AskUserQuestion cap while exposing all 5 valid profiles (#3784). Drift Guard (`plan_review.source_grounding`) is in the Planning section.
|
|
654
667
|
- [ ] Config updated with model_profile, workflow, and git sections
|
|
655
668
|
- [ ] User offered to save as global defaults (~/.gsd/defaults.json)
|
|
656
669
|
- [ ] Changes confirmed to user
|
|
@@ -30,7 +30,7 @@ INIT=$(gsd_run query init.phase-op "${PHASE_ARG}")
|
|
|
30
30
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
**If `response_language` is set:** All user-facing questions, prompts, and explanations
|
|
33
|
+
**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.
|
|
34
34
|
|
|
35
35
|
Parse from init JSON: `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `padded_phase`, `commit_docs`.
|
|
36
36
|
|
|
@@ -309,16 +309,16 @@ Example configured sections:
|
|
|
309
309
|
|
|
310
310
|
**8. TDD Audit section:**
|
|
311
311
|
|
|
312
|
-
Reconstruct the per-commit TDD gate trail before squash-merge discards it. Walk the PR branch's own commits (merges excluded) and read each commit's `
|
|
312
|
+
Reconstruct the per-commit TDD gate trail before squash-merge discards it. Walk the PR branch's own commits (merges excluded) and read each commit's `gate-status:` trailer with Git's native trailer machinery — never a raw `%B` grep, which would also match the string written in prose:
|
|
313
313
|
|
|
314
314
|
```bash
|
|
315
315
|
# Anchor on the merge-base so a stale local ${BASE_BRANCH} ref cannot over-count.
|
|
316
316
|
RANGE_BASE=$(git merge-base "${BASE_BRANCH}" HEAD)
|
|
317
317
|
git log "${RANGE_BASE}..HEAD" --no-merges --reverse \
|
|
318
|
-
--format='%H%x1f%s%x1f%(trailers:key=
|
|
318
|
+
--format='%H%x1f%s%x1f%(trailers:key=gate-status,valueonly,separator=%x2c)%x1e'
|
|
319
319
|
```
|
|
320
320
|
|
|
321
|
-
Records are separated by `\x1e`; the fields inside each are `\x1f`-separated — `<sha>`, `<subject>`, `<
|
|
321
|
+
Records are separated by `\x1e`; the fields inside each are `\x1f`-separated — `<sha>`, `<subject>`, `<gate-status value>`.
|
|
322
322
|
|
|
323
323
|
Pair commits by their conventional-commit type (the `type:` prefix of the subject):
|
|
324
324
|
|
|
@@ -326,16 +326,16 @@ Pair commits by their conventional-commit type (the `type:` prefix of the subjec
|
|
|
326
326
|
- A `refactor:`, `docs:`, or `chore:` commit that is not consumed as an Impl pairing is a standalone row with Impl commit `—`.
|
|
327
327
|
- A `feat:`/`fix:` commit with no preceding unpaired `test:` is a standalone row.
|
|
328
328
|
|
|
329
|
-
Surface each commit's `
|
|
329
|
+
Surface each commit's `gate-status:` value, normalized to exactly one of `skill`, `fallback`, `exempt`, or `missing` — never the raw trailer text. A commit whose trailer is absent, whose value is none of the first three, or which carries more than one `gate-status:` trailer (ambiguous) is counted as **missing** and still listed. This section is informational; it never blocks the ship.
|
|
330
330
|
|
|
331
|
-
**Self-suppress when every commit is missing (#2431):** the execute pipeline only writes `
|
|
331
|
+
**Self-suppress when every commit is missing (#2431):** the execute pipeline only writes `gate-status:` trailers when TDD mode is active. If every commit in the scan normalizes to `missing`, skip this section and the aggregate trailer (step 9) entirely — a 100%-missing table is pure noise. Only emit when at least one commit carries a real value (`skill`, `fallback`, or `exempt`).
|
|
332
332
|
|
|
333
|
-
Harden every table cell against injection, not just subjects: escape `|` as `\|` and strip `\r`/`\n` from both commit subjects and the rendered `
|
|
333
|
+
Harden every table cell against injection, not just subjects: escape `|` as `\|` and strip `\r`/`\n` from both commit subjects and the rendered `gate-status` value. Prefer NUL (`-z` / `%x00`) record separation, and reject any record whose fields contain the `\x1f`/`\x1e` delimiters, so an adversarial commit message cannot corrupt record or field boundaries.
|
|
334
334
|
|
|
335
335
|
```markdown
|
|
336
336
|
## TDD Audit
|
|
337
337
|
|
|
338
|
-
| Test commit | Impl commit |
|
|
338
|
+
| Test commit | Impl commit | gate-status |
|
|
339
339
|
|---|---|---|
|
|
340
340
|
| `a1b2c3d` test: failing parser test | `e4f5g6h` feat: implement parser | skill |
|
|
341
341
|
| `i7j8k9l` test: failing export test | `m0n1o2p` feat: implement export | fallback |
|
|
@@ -346,12 +346,12 @@ Aggregate: 2 skill, 1 fallback, 1 exempt — 0 missing.
|
|
|
346
346
|
|
|
347
347
|
This `## TDD Audit` section is the final body section — it renders after the configured `pr_body_sections`, immediately before the aggregate trailer — so the frozen core sections and the append-only configured sections both keep their existing order.
|
|
348
348
|
|
|
349
|
-
**9. Aggregate
|
|
349
|
+
**9. Aggregate gate-status trailer (final line)** (only when step 8 was emitted — i.e., at least one real `gate-status` value exists):
|
|
350
350
|
|
|
351
351
|
After every other section — including any configured `pr_body_sections` — emit the audit aggregate as a single Git trailer on the **final line** of the PR body, preceded by a blank line so it parses as a valid trailer:
|
|
352
352
|
|
|
353
353
|
```
|
|
354
|
-
|
|
354
|
+
gate-status: skill=2, fallback=1, exempt=1, missing=0
|
|
355
355
|
```
|
|
356
356
|
|
|
357
357
|
Use the exact key order `skill=`, `fallback=`, `exempt=`, `missing=` so downstream tooling parses it stably. Keeping it last means a GitHub squash-merge that defaults its commit message to the PR description carries the aggregate into `${BASE_BRANCH}`, preserving the audit footprint in `git log` after the PR branch is deleted. (Best-effort: it depends on the repo's squash-message default; the in-body `## TDD Audit` section is the source of truth regardless.)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@~/.claude/gsd-core/references/response-language-directive.md
|
|
2
|
+
|
|
1
3
|
<purpose>
|
|
2
4
|
Curate sketch design findings and package them into a persistent project skill for future
|
|
3
5
|
UI implementation. Reads from `.planning/sketches/`, writes skill to `./.claude/skills/sketch-findings-[project]/`
|
|
@@ -102,7 +102,7 @@ RESPONSE_LANGUAGE=$(gsd_run query config-get response_language --raw --default "
|
|
|
102
102
|
COMMIT_DOCS=$(gsd_run query config-get commit_docs --raw 2>/dev/null || echo "true")
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
**If `response_language` is set:** All user-facing questions, prompts, and explanations
|
|
105
|
+
**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.
|
|
106
106
|
</step>
|
|
107
107
|
|
|
108
108
|
<step name="mood_intake">
|
|
@@ -34,7 +34,7 @@ RESPONSE_LANGUAGE=$(gsd_run query config-get response_language --raw --default "
|
|
|
34
34
|
SNAPSHOT=$(gsd_run smart-entry --json 2>/dev/null)
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
**If `response_language` is set:** All user-facing questions, prompts, and explanations
|
|
37
|
+
**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.
|
|
38
38
|
|
|
39
39
|
Parse `SNAPSHOT` as JSON. It has the shape:
|
|
40
40
|
|