@opengsd/gsd-core 1.11.0 → 1.13.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-code-fixer.md +1 -1
- package/agents/gsd-debug-session-manager.md +1 -1
- package/agents/gsd-debugger.md +1 -1
- package/agents/gsd-dom-verifier.md +169 -0
- package/agents/gsd-eval-auditor.md +1 -1
- package/agents/gsd-executor.md +78 -42
- package/agents/gsd-framework-selector.md +1 -3
- package/agents/gsd-intel-updater.md +1 -1
- package/agents/gsd-mempalace-curator.md +0 -1
- package/agents/gsd-pattern-mapper.md +11 -0
- package/agents/gsd-phase-researcher.md +3 -1
- package/agents/gsd-plan-checker.md +91 -112
- package/agents/gsd-planner.md +20 -4
- package/agents/gsd-project-researcher.md +1 -1
- package/agents/gsd-research-synthesizer.md +2 -2
- package/agents/gsd-roadmapper.md +15 -11
- package/agents/gsd-ui-checker.md +82 -7
- package/agents/gsd-ui-researcher.md +70 -3
- package/agents/gsd-verifier.md +24 -2
- package/bin/install.js +847 -200
- package/commands/gsd/discuss-phase.md +1 -1
- package/commands/gsd/execute-phase.md +1 -1
- package/commands/gsd/import.md +1 -1
- package/commands/gsd/ns-workflow.md +2 -1
- package/commands/gsd/phase.md +1 -1
- package/commands/gsd/quick-batch.md +105 -0
- package/commands/gsd/quick.md +8 -4
- package/commands/gsd/surface.md +18 -8
- package/gsd-core/bin/gsd-tools.cjs +761 -100
- package/gsd-core/bin/lib/active-workstream-store.cjs +8 -0
- package/gsd-core/bin/lib/adr-parser.cjs +13 -7
- package/gsd-core/bin/lib/agent-install-check.cjs +162 -0
- package/gsd-core/bin/lib/api-coverage.cjs +30 -9
- package/gsd-core/bin/lib/artifacts.cjs +2 -0
- package/gsd-core/bin/lib/assumption-delta.cjs +30 -11
- package/gsd-core/bin/lib/audit.cjs +163 -41
- package/gsd-core/bin/lib/broken-windows.cjs +306 -28
- package/gsd-core/bin/lib/capability-activation.cjs +27 -0
- package/gsd-core/bin/lib/capability-lock.cjs +10 -4
- package/gsd-core/bin/lib/capability-registry.cjs +785 -144
- package/gsd-core/bin/lib/capability-state.cjs +25 -4
- package/gsd-core/bin/lib/capability-validator.cjs +321 -18
- package/gsd-core/bin/lib/capability-writer.cjs +14 -4
- package/gsd-core/bin/lib/check-command-router.cjs +229 -6
- package/gsd-core/bin/lib/claude-orchestration.cjs +10 -25
- package/gsd-core/bin/lib/cli-exit.cjs +496 -10
- package/gsd-core/bin/lib/clusters.cjs +1 -0
- package/gsd-core/bin/lib/code-review-depth.cjs +288 -0
- package/gsd-core/bin/lib/codex-agent-toml.cjs +410 -4
- package/gsd-core/bin/lib/command-aliases.cjs +16 -0
- package/gsd-core/bin/lib/command-arg-projection.cjs +144 -14
- package/gsd-core/bin/lib/command-routing-hub.cjs +31 -2
- package/gsd-core/bin/lib/commands.cjs +877 -54
- package/gsd-core/bin/lib/complexity-trigger.cjs +26 -6
- package/gsd-core/bin/lib/config-loader.cjs +121 -29
- package/gsd-core/bin/lib/config.cjs +92 -2
- package/gsd-core/bin/lib/configuration.cjs +129 -37
- package/gsd-core/bin/lib/core-utils.cjs +118 -14
- package/gsd-core/bin/lib/decisions.cjs +213 -1
- package/gsd-core/bin/lib/edge-probe.cjs +23 -2
- package/gsd-core/bin/lib/estimate-cli.cjs +55 -11
- package/gsd-core/bin/lib/exit-code-registry.cjs +98 -0
- package/gsd-core/bin/lib/file-overlap-partitioner.cjs +74 -0
- package/gsd-core/bin/lib/frontmatter.cjs +975 -326
- package/gsd-core/bin/lib/gap-checker.cjs +41 -8
- package/gsd-core/bin/lib/git-base-branch.cjs +182 -39
- package/gsd-core/bin/lib/health-diagnostic-rules/consistency.cjs +7 -3
- 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 +60 -14
- package/gsd-core/bin/lib/health-diagnostic-rules/state-consistency.cjs +75 -22
- package/gsd-core/bin/lib/health-diagnostic-rules/worktree-health.cjs +22 -8
- package/gsd-core/bin/lib/health-diagnostic.cjs +23 -3
- package/gsd-core/bin/lib/host-integration.cjs +96 -11
- package/gsd-core/bin/lib/init-command-router.cjs +132 -21
- package/gsd-core/bin/lib/init.cjs +252 -56
- package/gsd-core/bin/lib/install-engine.cjs +252 -15
- package/gsd-core/bin/lib/install-model-override-resolver.cjs +78 -1
- package/gsd-core/bin/lib/install-profiles.cjs +100 -18
- package/gsd-core/bin/lib/installer-migration-report.cjs +4 -0
- package/gsd-core/bin/lib/installer-migrations/010-antigravity-retire-confighome-artifacts.cjs +169 -0
- package/gsd-core/bin/lib/installer-migrations.cjs +10 -7
- package/gsd-core/bin/lib/intel.cjs +101 -26
- package/gsd-core/bin/lib/io.cjs +195 -15
- package/gsd-core/bin/lib/learnings.cjs +85 -14
- package/gsd-core/bin/lib/legacy-cleanup.cjs +8 -2
- package/gsd-core/bin/lib/loop-resolver.cjs +14 -8
- package/gsd-core/bin/lib/markdown-table.cjs +175 -4
- package/gsd-core/bin/lib/milestone.cjs +112 -7
- package/gsd-core/bin/lib/model-catalog.cjs +177 -19
- package/gsd-core/bin/lib/model-resolver.cjs +10 -28
- package/gsd-core/bin/lib/onboard-projection.cjs +5 -1
- package/gsd-core/bin/lib/phase-command-router.cjs +13 -6
- package/gsd-core/bin/lib/phase-estimation.cjs +17 -8
- package/gsd-core/bin/lib/phase-id.cjs +321 -13
- package/gsd-core/bin/lib/phase-lifecycle.cjs +24 -16
- package/gsd-core/bin/lib/phase-locator.cjs +138 -17
- package/gsd-core/bin/lib/phase.cjs +1175 -115
- package/gsd-core/bin/lib/plan-document.cjs +273 -0
- package/gsd-core/bin/lib/plan-scan.cjs +13 -2
- package/gsd-core/bin/lib/planning-command-router.cjs +61 -0
- package/gsd-core/bin/lib/planning-inspect.cjs +1168 -0
- package/gsd-core/bin/lib/planning-snapshot.cjs +165 -34
- package/gsd-core/bin/lib/planning-workspace.cjs +159 -28
- package/gsd-core/bin/lib/probe-core.cjs +4 -1
- package/gsd-core/bin/lib/profile-pipeline-command-router.cjs +50 -7
- package/gsd-core/bin/lib/profile-pipeline.cjs +6 -3
- 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/real-home-guard.cjs +419 -0
- package/gsd-core/bin/lib/refactor-trigger-command-router.cjs +71 -45
- package/gsd-core/bin/lib/review-lane-descriptor.cjs +62 -14
- package/gsd-core/bin/lib/review-lane-invocation.cjs +73 -1
- package/gsd-core/bin/lib/review-lane-runner.cjs +136 -10
- package/gsd-core/bin/lib/roadmap-command-router.cjs +45 -31
- package/gsd-core/bin/lib/roadmap-parser.cjs +577 -41
- package/gsd-core/bin/lib/roadmap.cjs +248 -64
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +329 -41
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +16 -17
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +320 -109
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +487 -83
- package/gsd-core/bin/lib/runtime-identity.cjs +234 -0
- package/gsd-core/bin/lib/runtime-slash.cjs +72 -2
- package/gsd-core/bin/lib/shell-command-projection.cjs +75 -8
- package/gsd-core/bin/lib/smart-entry.cjs +19 -31
- package/gsd-core/bin/lib/spec-section.cjs +12 -7
- package/gsd-core/bin/lib/state-command-router.cjs +47 -18
- package/gsd-core/bin/lib/state-contract.cjs +359 -0
- package/gsd-core/bin/lib/state-document.cjs +216 -5
- package/gsd-core/bin/lib/state-md-schema.cjs +231 -0
- package/gsd-core/bin/lib/state-transition.cjs +850 -145
- package/gsd-core/bin/lib/state.cjs +1629 -287
- package/gsd-core/bin/lib/surface.cjs +33 -10
- package/gsd-core/bin/lib/task-command-router.cjs +111 -1
- package/gsd-core/bin/lib/task-content-resolution.cjs +368 -0
- package/gsd-core/bin/lib/tdd-red-evidence.cjs +133 -0
- package/gsd-core/bin/lib/teams-status.cjs +4 -1
- package/gsd-core/bin/lib/uat-predicate.cjs +58 -20
- package/gsd-core/bin/lib/uat.cjs +2542 -387
- package/gsd-core/bin/lib/ui-consideration-probe.cjs +9 -1
- package/gsd-core/bin/lib/ui-safety-gate.cjs +37 -7
- package/gsd-core/bin/lib/unusable-input.cjs +13 -0
- package/gsd-core/bin/lib/update-context.cjs +6 -2
- package/gsd-core/bin/lib/validate-command-router.cjs +2 -2
- package/gsd-core/bin/lib/validate.cjs +230 -12
- package/gsd-core/bin/lib/vendor/README.md +43 -5
- package/gsd-core/bin/lib/vendor/js-yaml.cjs +3014 -0
- package/gsd-core/bin/lib/verification-command-router.cjs +2 -1
- package/gsd-core/bin/lib/verification.cjs +287 -13
- package/gsd-core/bin/lib/verify-command-grounding.cjs +846 -0
- package/gsd-core/bin/lib/verify-command-router.cjs +1 -0
- package/gsd-core/bin/lib/verify.cjs +441 -56
- package/gsd-core/bin/lib/workstream-inventory.cjs +20 -2
- package/gsd-core/bin/lib/workstream-name-policy.cjs +25 -4
- package/gsd-core/bin/lib/worktree-base-ref.cjs +66 -12
- package/gsd-core/bin/lib/worktree-safety.cjs +185 -21
- package/gsd-core/bin/shared/config-defaults.manifest.json +7 -1
- package/gsd-core/bin/shared/config-schema.manifest.json +13 -0
- package/gsd-core/bin/shared/exit-codes.json +8 -0
- package/gsd-core/bin/shared/exit-codes.sh +20 -0
- package/gsd-core/bin/shared/model-catalog.json +8 -1
- package/gsd-core/bin/verify-reapply-patches.cjs +70 -3
- package/gsd-core/references/agent-contracts.md +6 -5
- package/gsd-core/references/api-coverage.md +24 -2
- package/gsd-core/references/autonomous-smart-discuss.md +3 -3
- package/gsd-core/references/checkpoints.md +37 -19
- package/gsd-core/references/decimal-phase-calculation.md +5 -5
- package/gsd-core/references/edge-probe.md +17 -5
- package/gsd-core/references/execute-mvp-tdd.md +18 -18
- package/gsd-core/references/execute-phase-between-wave-reset.md +9 -12
- package/gsd-core/references/execute-phase-response-language.md +6 -0
- package/gsd-core/references/execute-phase-wave-guard.md +11 -9
- package/gsd-core/references/executor-examples.md +42 -0
- package/gsd-core/references/failing-direction.md +78 -0
- package/gsd-core/references/few-shot-examples/plan-checker.md +15 -15
- package/gsd-core/references/gate-prompts.md +1 -1
- package/gsd-core/references/git-integration.md +5 -5
- package/gsd-core/references/git-planning-commit.md +3 -3
- package/gsd-core/references/gsd-run-resolver.md +1 -1
- package/gsd-core/references/loop-hook-dispatch.md +22 -0
- package/gsd-core/references/model-profiles.md +1 -1
- package/gsd-core/references/mvp-concepts.md +2 -2
- package/gsd-core/references/nyquist-compliance.md +74 -0
- package/gsd-core/references/offer-next.md +3 -5
- package/gsd-core/references/phase-argument-parsing.md +3 -3
- 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-failing-direction.md +53 -0
- package/gsd-core/references/planner-human-verify-mode.md +15 -1
- 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 +76 -3
- package/gsd-core/references/planner-verify-command-grounding.md +17 -0
- package/gsd-core/references/planning-config.md +39 -9
- package/gsd-core/references/response-language-directive.md +9 -0
- package/gsd-core/references/reviewer-instances.md +31 -0
- package/gsd-core/references/revision-loop.md +118 -11
- package/gsd-core/references/runtime-aware-dispatch.md +1 -1
- package/gsd-core/references/tdd.md +15 -12
- package/gsd-core/references/ui-brand.md +65 -21
- package/gsd-core/references/ui-consideration-probe.md +1 -1
- package/gsd-core/references/universal-anti-patterns.md +2 -2
- package/gsd-core/references/verifier-evidence-gate.md +160 -0
- package/gsd-core/references/verify-command-path-resolvability.md +42 -0
- package/gsd-core/references/verify-mvp-mode.md +1 -1
- package/gsd-core/references/workstream-flag.md +11 -11
- package/gsd-core/templates/README.md +1 -1
- package/gsd-core/templates/SECURITY.md +3 -3
- package/gsd-core/templates/UI-SPEC.md +25 -3
- package/gsd-core/templates/VALIDATION.md +3 -3
- package/gsd-core/templates/phase-prompt.md +7 -0
- package/gsd-core/templates/state.md +7 -0
- package/gsd-core/templates/verification-report.md +5 -0
- package/gsd-core/workflows/_runtime-launcher.snippet.sh +1 -1
- package/gsd-core/workflows/add-backlog.md +3 -1
- package/gsd-core/workflows/add-phase.md +5 -3
- package/gsd-core/workflows/add-tests.md +4 -9
- package/gsd-core/workflows/add-todo.md +2 -2
- package/gsd-core/workflows/ai-integration-phase.md +5 -10
- package/gsd-core/workflows/analyze-dependencies.md +2 -0
- package/gsd-core/workflows/audit-fix.md +14 -3
- package/gsd-core/workflows/audit-milestone.md +11 -9
- package/gsd-core/workflows/audit-uat.md +19 -2
- package/gsd-core/workflows/autonomous/steps/converge-fail-fast.md +2 -2
- package/gsd-core/workflows/autonomous.md +12 -26
- package/gsd-core/workflows/check-todos.md +2 -2
- package/gsd-core/workflows/cleanup.md +3 -3
- package/gsd-core/workflows/code-review/steps/structural-pre-pass.md +16 -14
- package/gsd-core/workflows/code-review-fix.md +3 -1
- package/gsd-core/workflows/code-review.md +192 -69
- package/gsd-core/workflows/complete-milestone.md +28 -14
- package/gsd-core/workflows/debug.md +6 -4
- package/gsd-core/workflows/diagnose-issues.md +17 -7
- package/gsd-core/workflows/discuss-phase/modes/advisor.md +3 -1
- 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 +5 -7
- 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 +3 -1
- 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/steps/auto-advance-dispatch.md +1 -3
- package/gsd-core/workflows/discuss-phase-assumptions.md +3 -3
- package/gsd-core/workflows/discuss-phase-power.md +2 -0
- package/gsd-core/workflows/discuss-phase.md +2 -2
- package/gsd-core/workflows/do.md +46 -19
- package/gsd-core/workflows/docs-update.md +6 -5
- package/gsd-core/workflows/edit-phase.md +3 -1
- package/gsd-core/workflows/eval-review.md +5 -10
- package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +3 -1
- package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +129 -11
- package/gsd-core/workflows/execute-phase/steps/gap-closure-artifacts.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/partial-wave.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/per-plan-executor-routing.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +29 -5
- package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +2 -2
- package/gsd-core/workflows/execute-phase/steps/protected-branch.md +21 -0
- package/gsd-core/workflows/execute-phase/steps/regression-gate-run.md +4 -2
- package/gsd-core/workflows/execute-phase/steps/tdd-applicability-resolution.md +25 -0
- package/gsd-core/workflows/execute-phase/steps/wave-post-gate-hooks.md +39 -0
- package/gsd-core/workflows/execute-phase/steps/worktree-recovery-policy.md +2 -0
- package/gsd-core/workflows/execute-phase.md +68 -66
- package/gsd-core/workflows/execute-plan.md +25 -20
- package/gsd-core/workflows/explore.md +3 -1
- package/gsd-core/workflows/extract-learnings.md +3 -1
- package/gsd-core/workflows/fast.md +8 -2
- package/gsd-core/workflows/forensics.md +3 -1
- package/gsd-core/workflows/graduation.md +6 -6
- package/gsd-core/workflows/health.md +4 -7
- 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.md +12 -0
- package/gsd-core/workflows/help/modes/topic.md +2 -0
- package/gsd-core/workflows/help.md +2 -0
- package/gsd-core/workflows/import.md +17 -14
- package/gsd-core/workflows/inbox.md +5 -6
- package/gsd-core/workflows/ingest-docs.md +45 -12
- package/gsd-core/workflows/insert-phase.md +7 -5
- package/gsd-core/workflows/list-phase-assumptions.md +2 -0
- package/gsd-core/workflows/list-seeds.md +7 -3
- package/gsd-core/workflows/list-workspaces.md +3 -1
- package/gsd-core/workflows/manager.md +15 -26
- package/gsd-core/workflows/map-codebase.md +3 -1
- package/gsd-core/workflows/milestone-summary.md +3 -1
- package/gsd-core/workflows/mvp-phase.md +3 -3
- package/gsd-core/workflows/new-milestone.md +10 -22
- package/gsd-core/workflows/new-project/steps/auto-mode-config.md +1 -1
- package/gsd-core/workflows/new-project.md +17 -29
- package/gsd-core/workflows/new-workspace.md +2 -2
- package/gsd-core/workflows/next.md +4 -2
- 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 +20 -5
- package/gsd-core/workflows/plan-phase/steps/adr-ingest-express-path.md +1 -1
- package/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +100 -18
- package/gsd-core/workflows/plan-phase/steps/prd-express-path.md +4 -4
- package/gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md +12 -3
- package/gsd-core/workflows/plan-phase.md +251 -54
- package/gsd-core/workflows/plan-review-convergence.md +148 -19
- package/gsd-core/workflows/plant-seed.md +3 -3
- package/gsd-core/workflows/pr-branch.md +195 -51
- package/gsd-core/workflows/profile-user.md +17 -15
- package/gsd-core/workflows/progress/steps/forensic-audit.md +1 -1
- package/gsd-core/workflows/progress.md +52 -15
- package/gsd-core/workflows/quick/steps/discussion-phase.md +1 -3
- package/gsd-core/workflows/quick/steps/plan-checker-loop.md +38 -5
- package/gsd-core/workflows/quick/steps/quick-verification.md +2 -4
- package/gsd-core/workflows/quick/steps/research-phase.md +5 -7
- package/gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.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 +33 -32
- package/gsd-core/workflows/reapply-patches.md +2 -0
- package/gsd-core/workflows/remove-phase.md +6 -4
- package/gsd-core/workflows/remove-workspace.md +3 -3
- package/gsd-core/workflows/resume-project.md +14 -14
- package/gsd-core/workflows/review.md +404 -21
- package/gsd-core/workflows/scan.md +3 -1
- package/gsd-core/workflows/section-manifest.json +12 -0
- package/gsd-core/workflows/secure-phase.md +3 -3
- package/gsd-core/workflows/session-report.md +2 -0
- package/gsd-core/workflows/settings-advanced.md +9 -9
- package/gsd-core/workflows/settings-integrations.md +66 -32
- package/gsd-core/workflows/settings.md +4 -6
- package/gsd-core/workflows/ship.md +22 -16
- package/gsd-core/workflows/sketch-wrap-up.md +13 -17
- package/gsd-core/workflows/sketch.md +13 -19
- package/gsd-core/workflows/smart-entry.md +4 -6
- package/gsd-core/workflows/spec-phase.md +31 -4
- package/gsd-core/workflows/spike-wrap-up.md +9 -11
- package/gsd-core/workflows/spike.md +21 -32
- package/gsd-core/workflows/stats.md +4 -2
- package/gsd-core/workflows/sync-skills.md +13 -5
- package/gsd-core/workflows/thread.md +13 -7
- package/gsd-core/workflows/transition.md +7 -5
- package/gsd-core/workflows/ui-phase.md +36 -21
- package/gsd-core/workflows/ui-review.md +7 -11
- package/gsd-core/workflows/ultraplan-phase.md +7 -13
- package/gsd-core/workflows/undo.md +9 -17
- package/gsd-core/workflows/update.md +47 -48
- package/gsd-core/workflows/validate-phase.md +3 -3
- package/gsd-core/workflows/verify-work/steps/automated-ui-verification.md +25 -1
- package/gsd-core/workflows/verify-work/steps/mvp-uat-framing.md +1 -1
- package/gsd-core/workflows/verify-work.md +106 -21
- package/hooks/dist/gsd-agent-isolation-guard.js +77 -38
- package/hooks/dist/gsd-check-update-worker.js +19 -2
- package/hooks/dist/gsd-config-reload.js +18 -12
- package/hooks/dist/gsd-context-monitor.js +302 -22
- package/hooks/dist/gsd-cursor-post-tool.js +3 -1
- package/hooks/dist/gsd-cursor-pre-tool.js +3 -1
- package/hooks/dist/gsd-cursor-session-start.js +2 -1
- package/hooks/dist/gsd-cursor-stop.js +2 -1
- package/hooks/dist/gsd-cursor-subagent-start.js +28 -23
- package/hooks/dist/gsd-cursor-subagent-stop.js +3 -1
- package/hooks/dist/gsd-ensure-canonical-path.js +2 -1
- package/hooks/dist/gsd-graphify-update.sh +22 -18
- package/hooks/dist/gsd-node-runner.sh +77 -0
- package/hooks/dist/gsd-phase-boundary.sh +1 -0
- package/hooks/dist/gsd-prompt-guard.js +46 -12
- package/hooks/dist/gsd-read-guard.js +18 -7
- package/hooks/dist/gsd-read-injection-scanner.js +22 -13
- package/hooks/dist/gsd-secret-read-guard.js +1079 -0
- package/hooks/dist/gsd-session-state.sh +1 -0
- package/hooks/dist/gsd-statusline.js +222 -29
- package/hooks/dist/gsd-validate-commit.sh +523 -12
- package/hooks/dist/gsd-windsurf-pre-command.js +16 -11
- package/hooks/dist/gsd-windsurf-pre-write.js +22 -13
- package/hooks/dist/gsd-workflow-guard.js +36 -17
- package/hooks/dist/gsd-worktree-path-guard.js +36 -21
- package/hooks/dist/gsd-write-guard.js +35 -25
- package/hooks/dist/lib/cli-exit.js +560 -0
- package/hooks/dist/lib/exit-code-registry.js +98 -0
- package/hooks/dist/lib/git-cmd.js +210 -1
- package/hooks/dist/lib/git-probe.js +84 -0
- package/hooks/dist/lib/hook-exit.js +81 -0
- package/hooks/dist/lib/injection-patterns.js +36 -6
- package/hooks/dist/managed-hooks-registry.cjs +4 -0
- package/hooks/gsd-agent-isolation-guard.js +77 -38
- package/hooks/gsd-check-update-worker.js +19 -2
- package/hooks/gsd-config-reload.js +18 -12
- package/hooks/gsd-context-monitor.js +302 -22
- package/hooks/gsd-cursor-post-tool.js +3 -1
- package/hooks/gsd-cursor-pre-tool.js +3 -1
- package/hooks/gsd-cursor-session-start.js +2 -1
- package/hooks/gsd-cursor-stop.js +2 -1
- package/hooks/gsd-cursor-subagent-start.js +28 -23
- package/hooks/gsd-cursor-subagent-stop.js +3 -1
- package/hooks/gsd-ensure-canonical-path.js +2 -1
- package/hooks/gsd-graphify-update.sh +22 -18
- package/hooks/gsd-node-runner.sh +77 -0
- package/hooks/gsd-phase-boundary.sh +1 -0
- package/hooks/gsd-prompt-guard.js +46 -12
- package/hooks/gsd-read-guard.js +18 -7
- package/hooks/gsd-read-injection-scanner.js +22 -13
- package/hooks/gsd-secret-read-guard.js +1079 -0
- package/hooks/gsd-session-state.sh +1 -0
- package/hooks/gsd-statusline.js +222 -29
- package/hooks/gsd-validate-commit.sh +523 -12
- package/hooks/gsd-windsurf-pre-command.js +16 -11
- package/hooks/gsd-windsurf-pre-write.js +22 -13
- package/hooks/gsd-workflow-guard.js +36 -17
- package/hooks/gsd-worktree-path-guard.js +36 -21
- package/hooks/gsd-write-guard.js +35 -25
- package/hooks/hooks.json +6 -0
- package/hooks/lib/cli-exit.js +560 -0
- package/hooks/lib/exit-code-registry.js +98 -0
- package/hooks/lib/git-cmd.js +210 -1
- package/hooks/lib/git-probe.js +84 -0
- package/hooks/lib/hook-exit.js +81 -0
- package/hooks/lib/injection-patterns.js +36 -6
- package/hooks/managed-hooks-registry.cjs +4 -0
- package/package.json +14 -9
- package/scripts/base64-scan.sh +74 -12
- package/scripts/build-hooks.js +12 -0
- package/scripts/check-glossary-refs.cjs +77 -15
- package/scripts/check-mutation-score-ratchet.cjs +156 -0
- package/scripts/ci-check-job-near-cap.cjs +49 -0
- package/scripts/ci-pr-mergeability.cjs +262 -0
- package/scripts/ci-test-scope.cjs +52 -12
- package/scripts/ci-timeout-report.cjs +230 -0
- package/scripts/docs-guard-registry.cjs +406 -0
- package/scripts/gen-capability-registry.cjs +8 -6
- package/scripts/gen-exit-code-docs.cjs +318 -0
- package/scripts/gen-exit-code-registry.cjs +891 -0
- package/scripts/gen-features.cjs +836 -0
- package/scripts/gen-hooks-cli-exit.cjs +239 -0
- package/scripts/gen-install-tree-fixtures.cjs +2 -2
- package/scripts/gen-loop-host-contract.cjs +189 -4
- package/scripts/gen-scripts-cli-exit.cjs +185 -0
- package/scripts/gen-state-md-docs.cjs +727 -0
- package/scripts/{test-failure-reasons.cjs → gsd-test-gate-reasons.cjs} +6 -0
- package/scripts/lib/ci-job-timing.cjs +72 -0
- package/scripts/lib/cli-exit.cjs +546 -44
- package/scripts/lib/drift-scan.cjs +32 -2
- package/scripts/lib/exit-code-registry.cjs +98 -0
- package/scripts/lib/ndjson-reporter.cjs +119 -0
- package/scripts/lib/shellcheck-fetch.cjs +247 -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-docs-guard-registration.cjs +495 -0
- package/scripts/lint-docs-guard-registration.exempt-baseline.cjs +198 -0
- package/scripts/lint-eslint-glob-coverage.allowlist.json +4 -0
- package/scripts/{lint-fix-has-regression-test.cjs → lint-fix-has-regression-tests.cjs} +12 -6
- package/scripts/lint-health-diagnostic-rule-table.cjs +65 -8
- package/scripts/lint-mutation-test-derivation-drift.cjs +86 -0
- package/scripts/lint-phase-enumeration-drift.cjs +45 -14
- package/scripts/lint-phase-id-drift.cjs +133 -8
- package/scripts/lint-planning-prompt-drift.cjs +38 -1
- package/scripts/lint-portable-grep.cjs +176 -0
- package/scripts/lint-removed-but-needed.cjs +184 -16
- package/scripts/lint-response-language-coverage.cjs +524 -0
- package/scripts/lint-seam-enforcement.cjs +182 -0
- package/scripts/lint-slug-derivation-drift.cjs +921 -0
- package/scripts/lint-source-test-name-collision.cjs +241 -0
- package/scripts/lint-state-write-path-drift.cjs +337 -432
- package/scripts/lint-test-file-count.allowlist.json +124 -4
- package/scripts/lint-test-file-count.cjs +25 -3
- package/scripts/lint-unreachable-guard-drift.cjs +51 -64
- package/scripts/lint-vendored-deps.cjs +208 -35
- package/scripts/lint-workflow-shellcheck-baseline.json +1027 -0
- package/scripts/lint-workflow-shellcheck.cjs +614 -0
- package/scripts/mutation-matrix.cjs +599 -50
- package/scripts/npm-audit-baseline.cjs +376 -0
- package/scripts/prompt-injection-scan.sh +83 -14
- package/scripts/require-issue-link-policy.cjs +16 -1
- package/scripts/secret-scan.sh +75 -13
- package/scripts/select-docs-guards.cjs +56 -0
- package/scripts/sync-runtime-launcher.cjs +22 -3
- package/skills/gsd-discuss-phase/SKILL.md +1 -1
- package/skills/gsd-execute-phase/SKILL.md +1 -1
- package/skills/gsd-import/SKILL.md +1 -1
- package/skills/gsd-ns-workflow/SKILL.md +1 -0
- package/skills/gsd-phase/SKILL.md +1 -1
- package/skills/gsd-quick/SKILL.md +8 -4
- package/skills/gsd-quick-batch/SKILL.md +105 -0
- package/skills/gsd-surface/SKILL.md +18 -8
- package/vscode/package.json +1 -1
- package/bin/lib/ui-safety-gate.cjs +0 -109
- package/scripts/lint-emitted-drift-ack.cjs +0 -344
- package/scripts/state-write-path-drift-baseline.json +0 -19
|
@@ -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
|
|
@@ -14,7 +16,7 @@ A plan that survives review from 2-3 independent AI systems is more robust.
|
|
|
14
16
|
Check which AI CLIs are available on the system:
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
|
-
_GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$
|
|
19
|
+
_GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; _gsd_at() { for _p; do if [ -f "$_p" ]; then GSD_TOOLS="$_p"; return 0; fi; done; return 1; }; if _gsd_at "${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}" "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" "${_GSD_RUNTIME_ROOT}/.codex/gsd-core/bin/${_GSD_SHIM_NAME}"; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif unset -f gsd_run; _G="$(command -v gsd_run)"; then GSD_TOOLS="$_G"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif _gsd_at "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/gsd-core/bin/${_GSD_SHIM_NAME}" "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; then gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd_run is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi; GSD_IDENTITY_STATUS=unverified; case "$(gsd_run runtime-identity --raw 2>/dev/null || true)" in '{"packageName":"@opengsd/gsd-core"'*'}') GSD_IDENTITY_STATUS=ok;; esac; export GSD_IDENTITY_STATUS; [ "$GSD_IDENTITY_STATUS" = ok ] || echo "WARNING: \"$GSD_TOOLS\" did not prove it is @opengsd/gsd-core - it is either a different package or an @opengsd/gsd-core older than the runtime-identity verb. See docs/how-to/diagnose-a-foreign-gsd-tools.md" >&2; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${GSD_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${GSD_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
|
|
18
20
|
# Check each CLI
|
|
19
21
|
command -v gemini >/dev/null 2>&1 && echo "gemini:available" || echo "gemini:missing"
|
|
20
22
|
command -v claude >/dev/null 2>&1 && echo "claude:available" || echo "claude:missing"
|
|
@@ -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
|
|
@@ -316,7 +392,11 @@ reintroduce the flag (even spelled out in prose — a regression test bans the l
|
|
|
316
392
|
If `section_manifest` is `null` or `"reviewer-instances-note-2"` is in its `included` list: read and execute `gsd-core/workflows/review/steps/reviewer-instances-note-2.md`. Otherwise skip — do not read the file.
|
|
317
393
|
<!-- /gsd:section -->
|
|
318
394
|
|
|
319
|
-
Lanes run **sequentially
|
|
395
|
+
Lanes run **sequentially by default** — concurrent invocation trips provider rate limits, and a lane
|
|
396
|
+
lost to one is a cross-AI review that quietly went blind in one eye. A project whose providers can
|
|
397
|
+
accept the concurrency opts in with `review.parallel_lanes: true` (#3034): the selected lanes are
|
|
398
|
+
dispatched together and **all** joined before aggregation. The default is unchanged, and convergence
|
|
399
|
+
cycles stay sequential either way — only the lanes *within* one pass overlap.
|
|
320
400
|
|
|
321
401
|
```bash
|
|
322
402
|
# #2962: zsh aborts the block on an unmatched for-list glob (nomatch); bash passes it through. nullglob both.
|
|
@@ -327,6 +407,13 @@ REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
|
327
407
|
# SELECTED_REVIEWERS is the comma-separated result of reviewer selection (ADR-0011 precedence:
|
|
328
408
|
# explicit flags > --all > review.default_reviewers > all detected). Unchanged by this phase.
|
|
329
409
|
|
|
410
|
+
# #3034: opt-in concurrent lane dispatch. STRICT equality on "true" is deliberate — "1", "yes" and
|
|
411
|
+
# "TRUE" must NOT opt in, so a mistyped config gets the conservative behaviour rather than firing
|
|
412
|
+
# concurrent requests at a rate-limited provider. Note the `|| echo "false"` fallback is the
|
|
413
|
+
# OPPOSITE polarity from the commit_docs guard, which fails OPEN: there, failing open preserves the
|
|
414
|
+
# user's intent; here it would fire exactly the requests the default exists to prevent.
|
|
415
|
+
PARALLEL_LANES=$(gsd_run query config-get review.parallel_lanes --raw 2>/dev/null || echo "false")
|
|
416
|
+
|
|
330
417
|
# Shared budget-trim helper. Was defined inside the Ollama leg; it is lane-agnostic, so it is
|
|
331
418
|
# hoisted here now that any lane may declare a promptBudgetKey. Returns non-zero when the budget
|
|
332
419
|
# is too small for the minimum review set (prompt-budget exit 2 / 11).
|
|
@@ -360,7 +447,20 @@ gsd_run query review-lane plan \
|
|
|
360
447
|
--selected "$SELECTED_REVIEWERS" --run-dir "$RUN_DIR" --repo-root "$REPO_ROOT" --json \
|
|
361
448
|
> "$RUN_DIR/gsd-review-lanes.json"
|
|
362
449
|
|
|
363
|
-
|
|
450
|
+
# One lane, start to finish. Hoisted into a function so the sequential and concurrent paths share
|
|
451
|
+
# ONE body: two dispatch bodies kept in sync by hand is the generative-fix divergence ADR-2782 spent
|
|
452
|
+
# a phase deleting, and it is what let #2494/#2605 be filed twice as the same defect.
|
|
453
|
+
#
|
|
454
|
+
# The result goes to a SLUG-SCOPED file, never a shared append. Concurrent O_APPEND is atomic only
|
|
455
|
+
# below PIPE_BUF (4096 on Linux, 512 on some platforms), so a lane result above that bound could
|
|
456
|
+
# interleave — and write_reviews parses this JSONL to render the models:/model_sources: frontmatter,
|
|
457
|
+
# so a torn line is a broken REVIEWS.md, not a cosmetic log defect.
|
|
458
|
+
run_review_lane() {
|
|
459
|
+
# `local` is hygiene, not a live fix: each `&`-dispatched call already forks its own subshell, so
|
|
460
|
+
# concurrent lanes cannot share these today. Scoped anyway so the isolation is a property of this
|
|
461
|
+
# function rather than of the dispatch mechanism happening to fork.
|
|
462
|
+
local SLUG LANE_BUDGET PROMPT_ARG TRIMMED
|
|
463
|
+
SLUG="$1"
|
|
364
464
|
# Per-lane prompt budget. The lane declares its own `promptBudgetKey`; `plan` resolved it,
|
|
365
465
|
# applying #2797's sentinel rule (-1 = unset → fall back to the global budget; 0 legitimately
|
|
366
466
|
# means "do not trim this lane"). Trimming itself stays in prompt-budget, which owns it.
|
|
@@ -378,7 +478,9 @@ for SLUG in $(echo "$SELECTED_REVIEWERS" | tr ',' ' '); do
|
|
|
378
478
|
# response used to (#2605), so leave the skip visible in the review output, not only on stderr.
|
|
379
479
|
echo "$SLUG review skipped: prompt budget (${LANE_BUDGET} tokens) too small for the minimum review set." \
|
|
380
480
|
> "$RUN_DIR/gsd-review-$SLUG.md"
|
|
381
|
-
continue
|
|
481
|
+
# Was `continue` when this was a loop body. Inside a function that keyword is not the loop
|
|
482
|
+
# control it looks like — `return 0` is what skips this lane and leaves it with no result line.
|
|
483
|
+
return 0
|
|
382
484
|
fi
|
|
383
485
|
fi
|
|
384
486
|
|
|
@@ -387,7 +489,59 @@ for SLUG in $(echo "$SELECTED_REVIEWERS" | tr ',' ' '); do
|
|
|
387
489
|
# normal, failing to run one somebody asked for is an error.
|
|
388
490
|
gsd_run query review-lane invoke --slug "$SLUG" \
|
|
389
491
|
--run-dir "$RUN_DIR" --repo-root "$REPO_ROOT" $PROMPT_ARG $EXPLICIT_FLAG --json \
|
|
390
|
-
|
|
492
|
+
> "$RUN_DIR/gsd-review-lane-result-$SLUG.json"
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
# Split ONCE, de-duplicated, and reuse for both loops below. Two reasons, and the second is
|
|
496
|
+
# load-bearing: a slug repeated in SELECTED_REVIEWERS would put TWO concurrent background jobs on
|
|
497
|
+
# `> "$RUN_DIR/gsd-review-lane-result-$SLUG.json"` — the same file, both truncating. The shared-append
|
|
498
|
+
# form this replaced could not corrupt itself that way, so de-duping is what keeps the concurrent
|
|
499
|
+
# path no worse than the sequential one. Selection de-dupes today (the roster is a Set;
|
|
500
|
+
# review.default_reviewers normalizes lowercase-unique), but reachability analysis is not a contract
|
|
501
|
+
# and the next caller should not have to redo it.
|
|
502
|
+
#
|
|
503
|
+
# A plain string accumulator, not an array: zsh and bash disagree on array indexing and this block
|
|
504
|
+
# runs under both (see the nullglob/NULL_GLOB pairing above).
|
|
505
|
+
DISPATCH_SLUGS=""
|
|
506
|
+
for SLUG in $(echo "$SELECTED_REVIEWERS" | tr ',' ' '); do
|
|
507
|
+
case " $DISPATCH_SLUGS " in
|
|
508
|
+
*" $SLUG "*) continue ;;
|
|
509
|
+
esac
|
|
510
|
+
DISPATCH_SLUGS="$DISPATCH_SLUGS $SLUG"
|
|
511
|
+
done
|
|
512
|
+
|
|
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
|
|
521
|
+
if [ "$PARALLEL_LANES" = "true" ]; then
|
|
522
|
+
run_review_lane "$SLUG" &
|
|
523
|
+
else
|
|
524
|
+
run_review_lane "$SLUG"
|
|
525
|
+
fi
|
|
526
|
+
done
|
|
527
|
+
|
|
528
|
+
# Join every dispatched lane. A bare `wait` with no background jobs returns 0, so the sequential
|
|
529
|
+
# path needs no guard around it. NOTHING below this line may run before every lane has finished —
|
|
530
|
+
# write_reviews renders REVIEWS.md and the consensus summary from the aggregate below, and a review
|
|
531
|
+
# assembled from a partial set looks complete while silently missing a reviewer.
|
|
532
|
+
wait
|
|
533
|
+
|
|
534
|
+
# Aggregate in SELECTED_REVIEWERS order, NOT completion order, so the JSONL a concurrent run
|
|
535
|
+
# produces is byte-identical to the one a sequential run produces. This is post-join and therefore
|
|
536
|
+
# single-threaded, so `>>` here is safe. A lane that was budget-skipped, or that never started,
|
|
537
|
+
# leaves no result file and correctly contributes no line.
|
|
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
|
|
541
|
+
LANE_RESULT="$RUN_DIR/gsd-review-lane-result-$SLUG.json"
|
|
542
|
+
if [ -f "$LANE_RESULT" ]; then
|
|
543
|
+
cat "$LANE_RESULT" >> "$RUN_DIR/gsd-review-lane-results.jsonl"
|
|
544
|
+
fi
|
|
391
545
|
done
|
|
392
546
|
```
|
|
393
547
|
|
|
@@ -404,9 +558,7 @@ blocked, not silently redirected** (ADR-2782 D5).
|
|
|
404
558
|
|
|
405
559
|
Display progress:
|
|
406
560
|
```
|
|
407
|
-
|
|
408
|
-
GSD ► CROSS-AI REVIEW — Phase {N}
|
|
409
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
561
|
+
### GSD ► CROSS-AI REVIEW — Phase {N}
|
|
410
562
|
|
|
411
563
|
◆ Reviewing with {CLI}... done ✓
|
|
412
564
|
◆ Reviewing with {CLI}... done ✓
|
|
@@ -414,8 +566,148 @@ Display progress:
|
|
|
414
566
|
</step>
|
|
415
567
|
|
|
416
568
|
<step name="write_reviews">
|
|
569
|
+
**#3352 (ADR-3473 §8.5): no artifact from failed inputs.** Before rendering anything, gate on
|
|
570
|
+
whether any lane actually produced a result — "every lane failed" is exactly "the aggregate
|
|
571
|
+
JSONL has zero lines" (§`invoke_reviewers`'s aggregation loop already builds this file as a
|
|
572
|
+
byproduct; a lane that never started or was budget-skipped contributes no line either way).
|
|
573
|
+
|
|
574
|
+
```bash
|
|
575
|
+
RUN_DIR="{run_dir}"
|
|
576
|
+
JSONL="$RUN_DIR/gsd-review-lane-results.jsonl"
|
|
577
|
+
LANE_LINES=0
|
|
578
|
+
[ -f "$JSONL" ] && LANE_LINES=$(wc -l < "$JSONL" | tr -d ' ')
|
|
579
|
+
|
|
580
|
+
TOTAL_LANE_FAILURE="false"
|
|
581
|
+
ALL_LANES_SKIPPED="false"
|
|
582
|
+
if [ "${LANE_LINES:-0}" -eq 0 ]; then
|
|
583
|
+
# Zero lines means every dispatched lane left no result JSON — either every one
|
|
584
|
+
# was budget-skipped (N5: a skip is not a failure) or every one actually failed
|
|
585
|
+
# to run. Re-derive the dispatched-slug set the same way invoke_reviewers did
|
|
586
|
+
# (SELECTED_REVIEWERS is a shell block boundary — recompute, do not assume the
|
|
587
|
+
# earlier step's local DISPATCH_SLUGS variable survived into this block).
|
|
588
|
+
DISPATCH_SLUGS=""
|
|
589
|
+
for SLUG in $(echo "$SELECTED_REVIEWERS" | tr ',' ' '); do
|
|
590
|
+
case " $DISPATCH_SLUGS " in
|
|
591
|
+
*" $SLUG "*) continue ;;
|
|
592
|
+
esac
|
|
593
|
+
DISPATCH_SLUGS="$DISPATCH_SLUGS $SLUG"
|
|
594
|
+
done
|
|
595
|
+
# Distinguish by whether every dispatched slug's stub markdown says "skipped":
|
|
596
|
+
# a skip stub always does (see run_review_lane's budget branch, which writes
|
|
597
|
+
# this exact text before returning without ever invoking the lane); a real
|
|
598
|
+
# failure stub does not. If a slug has no stub at all, it is not a skip.
|
|
599
|
+
DISPATCHED_COUNT=0
|
|
600
|
+
SKIPPED_COUNT=0
|
|
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
|
|
605
|
+
DISPATCHED_COUNT=$((DISPATCHED_COUNT + 1))
|
|
606
|
+
STUB="$RUN_DIR/gsd-review-$SLUG.md"
|
|
607
|
+
if [ -f "$STUB" ] && grep -q "review skipped: prompt budget" "$STUB" 2>/dev/null; then
|
|
608
|
+
SKIPPED_COUNT=$((SKIPPED_COUNT + 1))
|
|
609
|
+
fi
|
|
610
|
+
done
|
|
611
|
+
if [ "$DISPATCHED_COUNT" -gt 0 ] && [ "$SKIPPED_COUNT" -eq "$DISPATCHED_COUNT" ]; then
|
|
612
|
+
ALL_LANES_SKIPPED="true"
|
|
613
|
+
else
|
|
614
|
+
TOTAL_LANE_FAILURE="true"
|
|
615
|
+
fi
|
|
616
|
+
fi
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
- **If `ALL_LANES_SKIPPED=true`:** do NOT write `REVIEWS.md` and do NOT run the commit below —
|
|
620
|
+
there is nothing to review. Report to the user that every selected lane was budget-skipped
|
|
621
|
+
(not a failure) and stop; do not proceed to `present_results`' summary claiming a review ran.
|
|
622
|
+
- **If `TOTAL_LANE_FAILURE=true`:** do NOT write `REVIEWS.md` and do NOT run the commit below.
|
|
623
|
+
Report the total lane failure to the user (name the lanes that were dispatched and point at
|
|
624
|
+
their `.err`/stub files preserved under `.review-diagnostics/` by `present_results`) and stop.
|
|
625
|
+
- **Otherwise** (at least one lane produced a result — R1, unchanged): proceed exactly as below.
|
|
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
|
+
|
|
417
703
|
Combine all review responses into `{phase_dir}/{padded_phase}-REVIEWS.md`:
|
|
418
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
|
+
|
|
419
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.
|
|
420
712
|
|
|
421
713
|
**Reviewer instances (#1517, optional):** when instances ran, frontmatter records their
|
|
@@ -458,10 +750,19 @@ trimmed_reviewers: # only present if at least one reviewer was trimmed
|
|
|
458
750
|
plan_truncation_pct: 22
|
|
459
751
|
hard_failed: false
|
|
460
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"]
|
|
461
757
|
---
|
|
462
758
|
|
|
463
759
|
# Cross-AI Plan Review — Phase {N}
|
|
464
760
|
|
|
761
|
+
<!-- gsd:plan-revision-conflicts:begin -->
|
|
762
|
+
## Plan-Revision Conflicts
|
|
763
|
+
{preserved_plan_revision_conflict_entries}
|
|
764
|
+
<!-- gsd:plan-revision-conflicts:end -->
|
|
765
|
+
|
|
465
766
|
<!-- Sections are RENDERED from each lane's declared `reviewsSection`, in descriptor order.
|
|
466
767
|
There is deliberately no hardcoded per-reviewer heading list here any more: a hand-maintained
|
|
467
768
|
list is exactly the drift #2781 was filed about, and it silently disagreed with the roster.
|
|
@@ -497,19 +798,33 @@ trimmed_reviewers: # only present if at least one reviewer was trimmed
|
|
|
497
798
|
{where reviewers disagreed — worth investigating}
|
|
498
799
|
```
|
|
499
800
|
|
|
500
|
-
Commit
|
|
801
|
+
Commit (only reached when `TOTAL_LANE_FAILURE` and `ALL_LANES_SKIPPED` are both `false` — the
|
|
802
|
+
gate above):
|
|
501
803
|
```bash
|
|
502
804
|
gsd_run query commit "docs: cross-AI review for phase {N}" --files {phase_dir}/{padded_phase}-REVIEWS.md
|
|
503
805
|
```
|
|
504
806
|
</step>
|
|
505
807
|
|
|
506
808
|
<step name="present_results">
|
|
507
|
-
|
|
809
|
+
**If `write_reviews` set `TOTAL_LANE_FAILURE=true` or `ALL_LANES_SKIPPED=true`, skip the success
|
|
810
|
+
summary below entirely** — no `REVIEWS.md` was written or committed, so there is nothing to
|
|
811
|
+
present as complete. Report instead:
|
|
812
|
+
|
|
813
|
+
```
|
|
814
|
+
### GSD ► REVIEW FAILED
|
|
815
|
+
|
|
816
|
+
Phase {N}: every selected reviewer lane {failed to produce a result|was budget-skipped} — no
|
|
817
|
+
REVIEWS.md was written.
|
|
508
818
|
|
|
819
|
+
{If the preserve+cleanup block below reports success: "Diagnostics preserved:
|
|
820
|
+
{phase_dir}/.review-diagnostics/". If it reports failure: relay its own warning verbatim —
|
|
821
|
+
it names the intact run directory holding the un-preserved evidence instead.}
|
|
509
822
|
```
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
823
|
+
|
|
824
|
+
Otherwise (at least one lane succeeded), display summary:
|
|
825
|
+
|
|
826
|
+
```
|
|
827
|
+
### GSD ► REVIEW COMPLETE
|
|
513
828
|
|
|
514
829
|
Phase {N} reviewed by {count} AI systems.
|
|
515
830
|
|
|
@@ -522,10 +837,78 @@ To incorporate feedback into planning:
|
|
|
522
837
|
/gsd:plan-phase {N} --reviews
|
|
523
838
|
```
|
|
524
839
|
|
|
525
|
-
|
|
840
|
+
**#3352 (ADR-3473 §8.5, R3): preserve per-lane evidence before destroying it.** Regardless of
|
|
841
|
+
which branch above ran, the run's temp directory is the only record that a lane failed at all —
|
|
842
|
+
copy it beside the phase's artifacts BEFORE cleanup. A lane that produced no output at all (L4)
|
|
843
|
+
leaves nothing to preserve; that is a smaller diagnostics folder, not a fabricated one, and is
|
|
844
|
+
NOT a preservation failure. This copy is deliberately NOT part of the commit above (N6) — that
|
|
845
|
+
step names only `{padded_phase}-REVIEWS.md` explicitly, never a directory glob, so
|
|
846
|
+
`.review-diagnostics/` is never swept into it.
|
|
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
|
+
|
|
861
|
+
Preservation and cleanup MUST run in the same fenced block below (a shell variable cannot
|
|
862
|
+
survive across separate fences — each is its own process). `mkdir -p` and every `cp` are
|
|
863
|
+
exit-status checked; `rm -rf "$RUN_DIR"` runs ONLY if nothing was preserved (nothing to
|
|
864
|
+
preserve is not a failure) or everything that needed preserving was copied successfully. If
|
|
865
|
+
preservation fails partway, `$RUN_DIR` is left intact and a message names it as the location of
|
|
866
|
+
the un-preserved evidence — a leftover temp directory is far cheaper than destroyed evidence:
|
|
526
867
|
|
|
527
868
|
```bash
|
|
528
|
-
|
|
869
|
+
shopt -s nullglob 2>/dev/null; setopt NULL_GLOB 2>/dev/null
|
|
870
|
+
|
|
871
|
+
RUN_DIR="{run_dir}"
|
|
872
|
+
DIAG_DIR="{phase_dir}/.review-diagnostics"
|
|
873
|
+
|
|
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
|
|
888
|
+
_DIAG_ERR=()
|
|
889
|
+
for f in "$RUN_DIR"/gsd-review-*.err; do
|
|
890
|
+
[ -s "$f" ] && _DIAG_ERR+=("$f")
|
|
891
|
+
done
|
|
892
|
+
|
|
893
|
+
_PRESERVE_OK=true
|
|
894
|
+
if [ ${#_DIAG_MD[@]} -gt 0 ] || [ ${#_DIAG_ERR[@]} -gt 0 ]; then
|
|
895
|
+
if mkdir -p "$DIAG_DIR"; then
|
|
896
|
+
if [ ${#_DIAG_MD[@]} -gt 0 ] && ! cp "${_DIAG_MD[@]}" "$DIAG_DIR/"; then
|
|
897
|
+
_PRESERVE_OK=false
|
|
898
|
+
fi
|
|
899
|
+
if [ ${#_DIAG_ERR[@]} -gt 0 ] && ! cp "${_DIAG_ERR[@]}" "$DIAG_DIR/"; then
|
|
900
|
+
_PRESERVE_OK=false
|
|
901
|
+
fi
|
|
902
|
+
else
|
|
903
|
+
_PRESERVE_OK=false
|
|
904
|
+
fi
|
|
905
|
+
fi
|
|
906
|
+
|
|
907
|
+
if [ "$_PRESERVE_OK" = "true" ]; then
|
|
908
|
+
rm -rf "$RUN_DIR"
|
|
909
|
+
else
|
|
910
|
+
echo "WARNING: evidence preservation to $DIAG_DIR failed — leaving the un-preserved run directory intact at: $RUN_DIR" >&2
|
|
911
|
+
fi
|
|
529
912
|
```
|
|
530
913
|
</step>
|
|
531
914
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@~/.claude/gsd-core/references/response-language-directive.md
|
|
2
|
+
|
|
1
3
|
<purpose>
|
|
2
4
|
Lightweight codebase assessment. Spawns a single gsd-codebase-mapper agent for one focus area,
|
|
3
5
|
producing targeted documents in `.planning/codebase/`.
|
|
@@ -39,7 +41,7 @@ Exit.
|
|
|
39
41
|
## Step 2: Check for existing documents
|
|
40
42
|
|
|
41
43
|
```bash
|
|
42
|
-
_GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$
|
|
44
|
+
_GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; _gsd_at() { for _p; do if [ -f "$_p" ]; then GSD_TOOLS="$_p"; return 0; fi; done; return 1; }; if _gsd_at "${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}" "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" "${_GSD_RUNTIME_ROOT}/.codex/gsd-core/bin/${_GSD_SHIM_NAME}"; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif unset -f gsd_run; _G="$(command -v gsd_run)"; then GSD_TOOLS="$_G"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif _gsd_at "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/gsd-core/bin/${_GSD_SHIM_NAME}" "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; then gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd_run is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi; GSD_IDENTITY_STATUS=unverified; case "$(gsd_run runtime-identity --raw 2>/dev/null || true)" in '{"packageName":"@opengsd/gsd-core"'*'}') GSD_IDENTITY_STATUS=ok;; esac; export GSD_IDENTITY_STATUS; [ "$GSD_IDENTITY_STATUS" = ok ] || echo "WARNING: \"$GSD_TOOLS\" did not prove it is @opengsd/gsd-core - it is either a different package or an @opengsd/gsd-core older than the runtime-identity verb. See docs/how-to/diagnose-a-foreign-gsd-tools.md" >&2; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${GSD_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${GSD_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
|
|
43
45
|
INIT=$(gsd_run query init.map-codebase 2>/dev/null || echo "{}")
|
|
44
46
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
45
47
|
```
|
|
@@ -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",
|