gsd-pi 2.64.0-dev.f8aad9b → 2.65.0-dev.16e10d7
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/dist/headless.js +3 -1
- package/dist/mcp-server.js +6 -2
- package/dist/resources/extensions/bg-shell/bg-shell-lifecycle.js +22 -7
- package/dist/resources/extensions/bg-shell/process-manager.js +6 -1
- package/dist/resources/extensions/browser-tools/capture.js +20 -1
- package/dist/resources/extensions/browser-tools/tests/capture-sharp-optional.test.cjs +93 -0
- package/dist/resources/extensions/gsd/auto/run-unit.js +13 -2
- package/dist/resources/extensions/gsd/auto-dispatch.js +94 -8
- package/dist/resources/extensions/gsd/auto-model-selection.js +7 -5
- package/dist/resources/extensions/gsd/auto-post-unit.js +115 -7
- package/dist/resources/extensions/gsd/auto-prompts.js +24 -0
- package/dist/resources/extensions/gsd/auto-recovery.js +12 -8
- package/dist/resources/extensions/gsd/auto-start.js +35 -1
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +10 -0
- package/dist/resources/extensions/gsd/auto-verification.js +138 -1
- package/dist/resources/extensions/gsd/auto-worktree.js +29 -7
- package/dist/resources/extensions/gsd/auto.js +2 -2
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +17 -4
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +34 -13
- package/dist/resources/extensions/gsd/bootstrap/notify-interceptor.js +28 -0
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +6 -4
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +5 -1
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +12 -1
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +16 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +20 -0
- package/dist/resources/extensions/gsd/commands/catalog.js +7 -1
- package/dist/resources/extensions/gsd/commands/context.js +8 -1
- package/dist/resources/extensions/gsd/commands/handlers/core.js +21 -0
- package/dist/resources/extensions/gsd/commands/handlers/notifications-handler.js +104 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +5 -0
- package/dist/resources/extensions/gsd/commands-extensions.js +1 -1
- package/dist/resources/extensions/gsd/config-overlay.js +312 -0
- package/dist/resources/extensions/gsd/detection.js +1 -1
- package/dist/resources/extensions/gsd/dispatch-guard.js +2 -1
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +1 -0
- package/dist/resources/extensions/gsd/doctor.js +2 -1
- package/dist/resources/extensions/gsd/gitignore.js +1 -0
- package/dist/resources/extensions/gsd/gsd-db.js +11 -2
- package/dist/resources/extensions/gsd/guided-flow.js +220 -29
- package/dist/resources/extensions/gsd/md-importer.js +14 -7
- package/dist/resources/extensions/gsd/notification-overlay.js +256 -0
- package/dist/resources/extensions/gsd/notification-store.js +273 -0
- package/dist/resources/extensions/gsd/notification-widget.js +56 -0
- package/dist/resources/extensions/gsd/parallel-orchestrator.js +17 -11
- package/dist/resources/extensions/gsd/post-execution-checks.js +407 -0
- package/dist/resources/extensions/gsd/pre-execution-checks.js +471 -0
- package/dist/resources/extensions/gsd/preferences-types.js +7 -0
- package/dist/resources/extensions/gsd/preferences-validation.js +78 -1
- package/dist/resources/extensions/gsd/preferences.js +13 -2
- package/dist/resources/extensions/gsd/preparation.js +1092 -0
- package/dist/resources/extensions/gsd/prompt-validation.js +67 -0
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +3 -3
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/discuss-prepared.md +424 -0
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +4 -1
- package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +5 -4
- package/dist/resources/extensions/gsd/prompts/parallel-research-slices.md +23 -0
- package/dist/resources/extensions/gsd/prompts/rethink.md +2 -1
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +56 -23
- package/dist/resources/extensions/gsd/quick.js +19 -15
- package/dist/resources/extensions/gsd/reactive-graph.js +12 -0
- package/dist/resources/extensions/gsd/roadmap-slices.js +24 -5
- package/dist/resources/extensions/gsd/safety/content-validator.js +3 -3
- package/dist/resources/extensions/gsd/session-lock.js +23 -1
- package/dist/resources/extensions/gsd/state.js +100 -12
- package/dist/resources/extensions/gsd/templates/context-enhanced.md +138 -0
- package/dist/resources/extensions/gsd/tools/complete-slice.js +12 -3
- package/dist/resources/extensions/gsd/tools/complete-task.js +16 -4
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +7 -5
- package/dist/resources/extensions/gsd/tools/reassess-roadmap.js +5 -2
- package/dist/resources/extensions/gsd/tools/reopen-milestone.js +119 -0
- package/dist/resources/extensions/gsd/tools/reopen-slice.js +30 -0
- package/dist/resources/extensions/gsd/tools/reopen-task.js +18 -0
- package/dist/resources/extensions/gsd/triage-resolution.js +25 -9
- package/dist/resources/extensions/gsd/verification-evidence.js +18 -0
- package/dist/resources/extensions/gsd/workflow-logger.js +8 -0
- package/dist/resources/extensions/gsd/workflow-projections.js +4 -7
- package/dist/resources/extensions/gsd/workflow-reconcile.js +2 -4
- package/dist/resources/extensions/gsd/workflow-templates.js +11 -2
- package/dist/resources/extensions/gsd/worktree-manager.js +5 -2
- package/dist/resources/extensions/gsd/worktree.js +9 -0
- package/dist/resources/extensions/shared/interview-ui.js +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +18 -17
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +1 -1
- package/dist/web/standalone/.next/routes-manifest.json +6 -0
- package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +3 -0
- package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -0
- package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -0
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +18 -17
- package/dist/web/standalone/.next/server/functions-config-manifest.json +1 -0
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/Z3TgDP0c7kG9j8CVQVGcl/_buildManifest.js +1 -0
- package/dist/web/standalone/.next/static/chunks/6502.8874bcae249c02e1.js +9 -0
- package/dist/web/standalone/.next/static/chunks/app/_global-error/page-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/boot/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/input/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/resize/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/stream/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/browse-directories/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/captures/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/cleanup/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/dev-mode/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/doctor/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/experimental/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/export-data/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/files/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/forensics/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/git/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/history/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/hooks/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/inspect/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/knowledge/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/live-state/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/notifications/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/onboarding/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/preferences/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/projects/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/recovery/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/remote-questions/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/session/browser/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/session/command/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/session/events/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/session/manage/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/settings-data/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/shutdown/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/skill-health/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/steer/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/switch-root/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/input/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/resize/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/sessions/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/stream/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/upload/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/undo/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/update/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/visualizer/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-a1c1e452c6b32d04.js → webpack-9fed74684e1c5bb1.js} +1 -1
- package/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +26 -9
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/src/agent-loop.test.ts +100 -4
- package/packages/pi-agent-core/src/agent-loop.ts +43 -12
- package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.js +38 -0
- package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +11 -0
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.js +24 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +4 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js +30 -19
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js +51 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +9 -9
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/provider-manager.d.ts +2 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/provider-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/provider-manager.js +10 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/provider-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +28 -5
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js +15 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +18 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +6 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +40 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session-tool-refresh.test.ts +64 -0
- package/packages/pi-coding-agent/src/core/agent-session.ts +10 -0
- package/packages/pi-coding-agent/src/core/resource-loader-cache-reset.test.ts +42 -0
- package/packages/pi-coding-agent/src/core/resource-loader.ts +5 -1
- package/packages/pi-coding-agent/src/core/retry-handler.test.ts +80 -0
- package/packages/pi-coding-agent/src/core/retry-handler.ts +37 -25
- package/packages/pi-coding-agent/src/core/sdk.ts +9 -9
- package/packages/pi-coding-agent/src/modes/interactive/components/provider-manager.ts +10 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +29 -4
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +27 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.ts +16 -1
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +38 -0
- package/packages/pi-tui/dist/__tests__/overlay-layout.test.d.ts +2 -0
- package/packages/pi-tui/dist/__tests__/overlay-layout.test.d.ts.map +1 -0
- package/packages/pi-tui/dist/__tests__/overlay-layout.test.js +66 -0
- package/packages/pi-tui/dist/__tests__/overlay-layout.test.js.map +1 -0
- package/packages/pi-tui/dist/components/image.d.ts +2 -0
- package/packages/pi-tui/dist/components/image.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/image.js +4 -0
- package/packages/pi-tui/dist/components/image.js.map +1 -1
- package/packages/pi-tui/dist/components/image.test.d.ts +6 -0
- package/packages/pi-tui/dist/components/image.test.d.ts.map +1 -0
- package/packages/pi-tui/dist/components/image.test.js +32 -0
- package/packages/pi-tui/dist/components/image.test.js.map +1 -0
- package/packages/pi-tui/dist/components/loader.d.ts +4 -2
- package/packages/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/loader.js +27 -9
- package/packages/pi-tui/dist/components/loader.js.map +1 -1
- package/packages/pi-tui/dist/components/text.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/text.js +2 -0
- package/packages/pi-tui/dist/components/text.js.map +1 -1
- package/packages/pi-tui/dist/overlay-layout.d.ts.map +1 -1
- package/packages/pi-tui/dist/overlay-layout.js +12 -1
- package/packages/pi-tui/dist/overlay-layout.js.map +1 -1
- package/packages/pi-tui/dist/tui.d.ts +4 -0
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +35 -0
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/src/__tests__/overlay-layout.test.ts +82 -0
- package/packages/pi-tui/src/components/image.test.ts +36 -0
- package/packages/pi-tui/src/components/image.ts +5 -0
- package/packages/pi-tui/src/components/loader.ts +27 -10
- package/packages/pi-tui/src/components/text.ts +1 -0
- package/packages/pi-tui/src/overlay-layout.ts +13 -1
- package/packages/pi-tui/src/tui.ts +34 -0
- package/pkg/package.json +1 -1
- package/src/resources/extensions/bg-shell/bg-shell-lifecycle.ts +19 -7
- package/src/resources/extensions/bg-shell/process-manager.ts +8 -2
- package/src/resources/extensions/browser-tools/capture.ts +19 -1
- package/src/resources/extensions/browser-tools/tests/capture-sharp-optional.test.cjs +93 -0
- package/src/resources/extensions/gsd/auto/run-unit.ts +12 -2
- package/src/resources/extensions/gsd/auto-dispatch.ts +105 -8
- package/src/resources/extensions/gsd/auto-model-selection.ts +7 -5
- package/src/resources/extensions/gsd/auto-post-unit.ts +138 -6
- package/src/resources/extensions/gsd/auto-prompts.ts +31 -0
- package/src/resources/extensions/gsd/auto-recovery.ts +10 -8
- package/src/resources/extensions/gsd/auto-start.ts +38 -0
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +10 -0
- package/src/resources/extensions/gsd/auto-verification.ts +190 -2
- package/src/resources/extensions/gsd/auto-worktree.ts +28 -7
- package/src/resources/extensions/gsd/auto.ts +2 -1
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +16 -4
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +35 -13
- package/src/resources/extensions/gsd/bootstrap/notify-interceptor.ts +34 -0
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +5 -4
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +4 -1
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +12 -1
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +20 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +28 -0
- package/src/resources/extensions/gsd/commands/catalog.ts +7 -1
- package/src/resources/extensions/gsd/commands/context.ts +7 -1
- package/src/resources/extensions/gsd/commands/handlers/core.ts +24 -0
- package/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts +140 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +5 -0
- package/src/resources/extensions/gsd/commands-extensions.ts +1 -1
- package/src/resources/extensions/gsd/config-overlay.ts +331 -0
- package/src/resources/extensions/gsd/detection.ts +1 -1
- package/src/resources/extensions/gsd/dispatch-guard.ts +2 -1
- package/src/resources/extensions/gsd/docs/preferences-reference.md +1 -0
- package/src/resources/extensions/gsd/doctor.ts +2 -1
- package/src/resources/extensions/gsd/gitignore.ts +1 -0
- package/src/resources/extensions/gsd/gsd-db.ts +13 -2
- package/src/resources/extensions/gsd/guided-flow.ts +254 -30
- package/src/resources/extensions/gsd/md-importer.ts +13 -6
- package/src/resources/extensions/gsd/notification-overlay.ts +295 -0
- package/src/resources/extensions/gsd/notification-store.ts +293 -0
- package/src/resources/extensions/gsd/notification-widget.ts +68 -0
- package/src/resources/extensions/gsd/parallel-orchestrator.ts +19 -11
- package/src/resources/extensions/gsd/post-execution-checks.ts +539 -0
- package/src/resources/extensions/gsd/pre-execution-checks.ts +581 -0
- package/src/resources/extensions/gsd/preferences-types.ts +53 -0
- package/src/resources/extensions/gsd/preferences-validation.ts +78 -1
- package/src/resources/extensions/gsd/preferences.ts +13 -2
- package/src/resources/extensions/gsd/preparation.ts +1419 -0
- package/src/resources/extensions/gsd/prompt-validation.ts +88 -0
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +3 -3
- package/src/resources/extensions/gsd/prompts/complete-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/discuss-prepared.md +424 -0
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +4 -1
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +5 -4
- package/src/resources/extensions/gsd/prompts/parallel-research-slices.md +23 -0
- package/src/resources/extensions/gsd/prompts/rethink.md +2 -1
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +56 -23
- package/src/resources/extensions/gsd/quick.ts +20 -15
- package/src/resources/extensions/gsd/reactive-graph.ts +18 -0
- package/src/resources/extensions/gsd/roadmap-slices.ts +21 -5
- package/src/resources/extensions/gsd/safety/content-validator.ts +3 -3
- package/src/resources/extensions/gsd/session-lock.ts +17 -1
- package/src/resources/extensions/gsd/state.ts +101 -11
- package/src/resources/extensions/gsd/templates/context-enhanced.md +138 -0
- package/src/resources/extensions/gsd/tests/adversarial-review-fixes.test.ts +223 -0
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +33 -2
- package/src/resources/extensions/gsd/tests/auto-remediate-slice-status.test.ts +56 -0
- package/src/resources/extensions/gsd/tests/clear-stale-autostart.test.ts +41 -0
- package/src/resources/extensions/gsd/tests/complete-slice-string-coercion.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/complete-slice-verification-gate.test.ts +72 -0
- package/src/resources/extensions/gsd/tests/complete-task-normalize-lists.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/defer-milestone-stamp.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +4 -3
- package/src/resources/extensions/gsd/tests/discuss-incremental-persistence.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/discuss-slice-structured-questions.test.ts +46 -0
- package/src/resources/extensions/gsd/tests/discuss-tool-scope-leak.test.ts +76 -0
- package/src/resources/extensions/gsd/tests/dispatch-guard-closed-status.test.ts +33 -0
- package/src/resources/extensions/gsd/tests/dispatcher-stuck-planning.test.ts +37 -0
- package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +526 -0
- package/src/resources/extensions/gsd/tests/error-success-mask.test.ts +37 -0
- package/src/resources/extensions/gsd/tests/find-missing-summaries-closed.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/frontmatter-parse-noise.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/gitignore-bg-shell.test.ts +38 -0
- package/src/resources/extensions/gsd/tests/guided-flow-state-rebuild.test.ts +103 -0
- package/src/resources/extensions/gsd/tests/import-done-milestones.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/integration/auto-recovery.test.ts +5 -3
- package/src/resources/extensions/gsd/tests/integration/state-machine-edge-cases.test.ts +4 -2
- package/src/resources/extensions/gsd/tests/integration/state-machine-live-validation.test.ts +28 -30
- package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +53 -0
- package/src/resources/extensions/gsd/tests/integration-prepared-discussion.test.ts +525 -0
- package/src/resources/extensions/gsd/tests/isolation-none-branch-guard.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/needs-remediation-revalidation.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/note-captures-executed.test.ts +46 -0
- package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +73 -0
- package/src/resources/extensions/gsd/tests/notification-store.test.ts +282 -0
- package/src/resources/extensions/gsd/tests/parallel-research-dispatch.test.ts +77 -0
- package/src/resources/extensions/gsd/tests/phantom-ghost-detection.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/phantom-milestone-default-queued.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/post-exec-retry-bypass.test.ts +312 -0
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +813 -0
- package/src/resources/extensions/gsd/tests/pre-exec-backtick-strip.test.ts +68 -0
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +1197 -0
- package/src/resources/extensions/gsd/tests/pre-execution-fail-closed.test.ts +266 -0
- package/src/resources/extensions/gsd/tests/pre-execution-pause-wiring.test.ts +457 -0
- package/src/resources/extensions/gsd/tests/preparation.test.ts +1211 -0
- package/src/resources/extensions/gsd/tests/project-root-cwd-crash.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/projection-no-plan-overwrite.test.ts +83 -0
- package/src/resources/extensions/gsd/tests/prompt-builder.test.ts +669 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +7 -4
- package/src/resources/extensions/gsd/tests/prompt-step-ordering.test.ts +85 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/query-tools-db-open.test.ts +47 -0
- package/src/resources/extensions/gsd/tests/queued-discuss-fast-path.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/reactive-graph.test.ts +45 -0
- package/src/resources/extensions/gsd/tests/restore-tools-after-discuss.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/rogue-file-detection.test.ts +4 -5
- package/src/resources/extensions/gsd/tests/run-uat-replay-cap.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/show-config-command.test.ts +56 -0
- package/src/resources/extensions/gsd/tests/skip-slice-state-rebuild.test.ts +31 -0
- package/src/resources/extensions/gsd/tests/skipped-validation-completion.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/slice-sequence-insert.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/smart-entry-complete.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/stale-lockfile-recovery.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/stale-queued-milestone.test.ts +147 -0
- package/src/resources/extensions/gsd/tests/stale-worktree-cwd.test.ts +13 -0
- package/src/resources/extensions/gsd/tests/stash-pop-gsd-conflict.test.ts +21 -0
- package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +21 -0
- package/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts +6 -7
- package/src/resources/extensions/gsd/tests/status-db-open.test.ts +47 -0
- package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/symlink-extension-discovery.test.ts +125 -0
- package/src/resources/extensions/gsd/tests/sync-worktree-skip-current.test.ts +65 -0
- package/src/resources/extensions/gsd/tests/tool-invocation-error-loop-break.test.ts +29 -1
- package/src/resources/extensions/gsd/tests/triage-resolution.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/unstructured-continue-context-injection.test.ts +163 -0
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +3 -4
- package/src/resources/extensions/gsd/tests/verification-operational-gate.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/verify-artifact-tightened.test.ts +89 -0
- package/src/resources/extensions/gsd/tests/worker-model-override.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/worktree-expected-warnings.test.ts +38 -0
- package/src/resources/extensions/gsd/tests/worktree-integration.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/worktree-main-branch.test.ts +20 -0
- package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +16 -17
- package/src/resources/extensions/gsd/tests/worktree-sync-tasks.test.ts +13 -9
- package/src/resources/extensions/gsd/tests/worktree.test.ts +26 -9
- package/src/resources/extensions/gsd/tests/zero-slice-roadmap-guided.test.ts +19 -0
- package/src/resources/extensions/gsd/tools/complete-slice.ts +13 -3
- package/src/resources/extensions/gsd/tools/complete-task.ts +16 -4
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +11 -9
- package/src/resources/extensions/gsd/tools/reassess-roadmap.ts +5 -2
- package/src/resources/extensions/gsd/tools/reopen-milestone.ts +152 -0
- package/src/resources/extensions/gsd/tools/reopen-slice.ts +27 -0
- package/src/resources/extensions/gsd/tools/reopen-task.ts +17 -0
- package/src/resources/extensions/gsd/triage-resolution.ts +29 -10
- package/src/resources/extensions/gsd/types.ts +4 -0
- package/src/resources/extensions/gsd/verification-evidence.ts +68 -0
- package/src/resources/extensions/gsd/workflow-logger.ts +13 -0
- package/src/resources/extensions/gsd/workflow-projections.ts +4 -6
- package/src/resources/extensions/gsd/workflow-reconcile.ts +2 -3
- package/src/resources/extensions/gsd/workflow-templates.ts +11 -2
- package/src/resources/extensions/gsd/worktree-manager.ts +4 -2
- package/src/resources/extensions/gsd/worktree.ts +10 -0
- package/src/resources/extensions/shared/interview-ui.ts +1 -1
- package/src/resources/extensions/shared/tests/interview-notes-loop.test.ts +8 -10
- package/dist/web/standalone/.next/static/F1mOwzgCW9R8N3Pt1Et87/_buildManifest.js +0 -1
- package/dist/web/standalone/.next/static/chunks/6502.7593d7797a4b3999.js +0 -9
- package/dist/web/standalone/.next/static/chunks/app/_global-error/page-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/boot/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/input/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/resize/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/stream/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/browse-directories/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/captures/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/cleanup/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/dev-mode/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/doctor/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/experimental/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/export-data/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/files/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/forensics/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/git/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/history/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/hooks/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/inspect/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/knowledge/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/live-state/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/onboarding/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/preferences/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/projects/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/recovery/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/remote-questions/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/session/browser/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/session/command/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/session/events/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/session/manage/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/settings-data/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/shutdown/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/skill-health/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/steer/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/switch-root/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/input/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/resize/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/sessions/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/stream/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/upload/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/undo/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/update/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/visualizer/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-c4cc189e7b117ea2.js +0 -1
- /package/dist/web/standalone/.next/static/{F1mOwzgCW9R8N3Pt1Et87 → Z3TgDP0c7kG9j8CVQVGcl}/_ssgManifest.js +0 -0
|
@@ -1,48 +1,81 @@
|
|
|
1
|
-
|
|
1
|
+
# Milestone Validation — Parallel Review
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
You are the validation orchestrator for **{{milestoneId}} — {{milestoneTitle}}**.
|
|
4
4
|
|
|
5
5
|
## Working Directory
|
|
6
6
|
|
|
7
7
|
Your working directory is `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` to any other directory.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Mission
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Dispatch 3 independent parallel reviewers, then synthesize their findings into the final VALIDATION verdict.
|
|
12
12
|
|
|
13
13
|
This is remediation round {{remediationRound}}. If this is round 0, this is the first validation pass. If > 0, prior validation found issues and remediation slices were added and executed — verify those remediation slices resolved the issues.
|
|
14
14
|
|
|
15
|
+
## Context
|
|
16
|
+
|
|
15
17
|
All relevant context has been preloaded below — the roadmap, all slice summaries, UAT results, requirements, decisions, and project context are inlined. Start working immediately without re-reading these files.
|
|
16
18
|
|
|
17
19
|
{{inlinedContext}}
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
## Execution Protocol
|
|
22
|
+
|
|
23
|
+
### Step 1 — Dispatch Parallel Reviewers
|
|
24
|
+
|
|
25
|
+
Call `subagent` with `tasks: [...]` containing ALL THREE reviewers simultaneously:
|
|
26
|
+
|
|
27
|
+
**Reviewer A — Requirements Coverage**
|
|
28
|
+
Prompt: "Review milestone {{milestoneId}} requirements coverage. Working directory: {{workingDirectory}}. Read `.gsd/{{milestoneId}}/REQUIREMENTS.md` (or equivalent requirements file). For each requirement, check the slice SUMMARY files in `.gsd/{{milestoneId}}/` to determine if it is: COVERED (clearly demonstrated), PARTIAL (mentioned but not fully demonstrated), or MISSING (no evidence). Output a markdown table with columns: Requirement | Status | Evidence. End with a one-line verdict: PASS if all covered, NEEDS-ATTENTION if partials exist, FAIL if any missing."
|
|
29
|
+
|
|
30
|
+
**Reviewer B — Cross-Slice Integration**
|
|
31
|
+
Prompt: "Review milestone {{milestoneId}} cross-slice integration. Working directory: {{workingDirectory}}. Read `{{roadmapPath}}` and find the boundary map (produces/consumes contracts). For each boundary, check that the producing slice's SUMMARY confirms it produced the artifact, and the consuming slice's SUMMARY confirms it consumed it. Output a markdown table: Boundary | Producer Summary | Consumer Summary | Status. End with a one-line verdict: PASS if all boundaries honored, NEEDS-ATTENTION if any gaps."
|
|
32
|
+
|
|
33
|
+
**Reviewer C — UAT & Acceptance Criteria**
|
|
34
|
+
Prompt: "Review milestone {{milestoneId}} UAT and acceptance criteria. Working directory: {{workingDirectory}}. Read `.gsd/{{milestoneId}}/CONTEXT.md` for acceptance criteria. Check for UAT-RESULT files in each slice directory. Verify each acceptance criterion maps to either a passing UAT result or clear SUMMARY evidence. Output a checklist: [ ] Criterion | Evidence. End with a one-line verdict: PASS if all criteria met, NEEDS-ATTENTION if gaps exist."
|
|
35
|
+
|
|
36
|
+
### Step 2 — Synthesize Findings
|
|
20
37
|
|
|
21
|
-
|
|
38
|
+
After all reviewers complete, aggregate their verdicts:
|
|
39
|
+
- If ALL reviewers say PASS → overall verdict: `pass`
|
|
40
|
+
- If any reviewer says NEEDS-ATTENTION → overall verdict: `needs-attention`
|
|
41
|
+
- If any reviewer says FAIL → overall verdict: `needs-remediation`
|
|
22
42
|
|
|
23
|
-
|
|
24
|
-
2. For each **slice** in the roadmap, verify its demo/deliverable claim against its summary. Flag any slice whose summary does not substantiate its claimed output.
|
|
25
|
-
3. Check **cross-slice integration points** — do boundary map entries (produces/consumes) align with what was actually built?
|
|
26
|
-
4. Check **requirement coverage** — are all active requirements addressed by at least one slice?
|
|
27
|
-
5. If **Verification Classes** are provided in the inlined context above, check each non-empty class:
|
|
28
|
-
- For each verification class (Contract, Integration, Operational, UAT), determine whether slice summaries, UAT results, or observable behavior provide evidence that this verification tier was addressed.
|
|
29
|
-
- Document the compliance status of each class in a dedicated verification classes section.
|
|
30
|
-
- If `Operational` verification is non-empty and no evidence of operational verification exists, flag this explicitly — it means planned operational checks (migrations, deployments, runtime verification) were not proven.
|
|
31
|
-
- A milestone with unaddressed verification classes may still pass if the gaps are minor, but the gaps MUST be documented in the Deferred Work Inventory.
|
|
32
|
-
6. Determine a verdict:
|
|
33
|
-
- `pass` — all criteria met, all slices delivered, no gaps
|
|
34
|
-
- `needs-attention` — minor gaps that do not block completion (document them)
|
|
35
|
-
- `needs-remediation` — material gaps found; remediation slices must be added to the roadmap
|
|
43
|
+
### Step 3 — Write VALIDATION File
|
|
36
44
|
|
|
37
|
-
|
|
45
|
+
Write to `{{validationPath}}`:
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
```markdown
|
|
48
|
+
---
|
|
49
|
+
verdict: <pass|needs-attention|needs-remediation>
|
|
50
|
+
remediation_round: {{remediationRound}}
|
|
51
|
+
reviewers: 3
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
# Milestone Validation: {{milestoneId}}
|
|
55
|
+
|
|
56
|
+
## Reviewer A — Requirements Coverage
|
|
57
|
+
<paste Reviewer A output>
|
|
58
|
+
|
|
59
|
+
## Reviewer B — Cross-Slice Integration
|
|
60
|
+
<paste Reviewer B output>
|
|
61
|
+
|
|
62
|
+
## Reviewer C — UAT & Acceptance Criteria
|
|
63
|
+
<paste Reviewer C output>
|
|
64
|
+
|
|
65
|
+
## Synthesis
|
|
66
|
+
<2-3 sentences summarizing overall findings and verdict rationale>
|
|
67
|
+
|
|
68
|
+
## Remediation Plan
|
|
69
|
+
<if verdict is not pass: specific actions required>
|
|
70
|
+
```
|
|
40
71
|
|
|
41
72
|
**DB access safety:** Do NOT query `.gsd/gsd.db` directly via `sqlite3` or `node -e require('better-sqlite3')` — the engine owns the WAL connection. Use `gsd_milestone_status` to read milestone and slice state. All data you need is already inlined in the context above or accessible via the `gsd_*` tools. Direct DB access corrupts the WAL and bypasses tool-level validation.
|
|
42
73
|
|
|
43
74
|
If verdict is `needs-remediation`:
|
|
44
|
-
-
|
|
45
|
-
- These
|
|
75
|
+
- Add new slices to `{{roadmapPath}}` with unchecked `[ ]` status
|
|
76
|
+
- These slices will be planned and executed before validation re-runs
|
|
77
|
+
|
|
78
|
+
**You MUST write `{{validationPath}}` before finishing.**
|
|
46
79
|
|
|
47
80
|
**File system safety:** When scanning milestone directories for evidence, use `ls` or `find` to list directory contents first — never pass a directory path (e.g. `tasks/`, `slices/`) directly to the `read` tool. The `read` tool only accepts file paths, not directories.
|
|
48
81
|
|
|
@@ -192,28 +192,33 @@ export async function handleQuick(
|
|
|
192
192
|
const taskDirRel = `.gsd/quick/${taskNum}-${slug}`;
|
|
193
193
|
const date = new Date().toISOString().split("T")[0];
|
|
194
194
|
|
|
195
|
-
// Create git branch for the quick task
|
|
195
|
+
// Create git branch for the quick task (unless isolation:none — #3337)
|
|
196
196
|
const gitPrefs = loadEffectiveGSDPreferences()?.preferences?.git ?? {};
|
|
197
197
|
const git = new GitServiceImpl(basePath, gitPrefs);
|
|
198
198
|
const branchName = `gsd/quick/${taskNum}-${slug}`;
|
|
199
199
|
let originalBranch = git.getCurrentBranch();
|
|
200
200
|
|
|
201
|
+
const { getIsolationMode } = await import("./preferences.js");
|
|
202
|
+
const usesBranch = getIsolationMode() !== "none";
|
|
203
|
+
|
|
201
204
|
let branchCreated = false;
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
205
|
+
if (usesBranch) {
|
|
206
|
+
try {
|
|
207
|
+
const current = originalBranch;
|
|
208
|
+
if (current !== branchName) {
|
|
209
|
+
// Auto-commit any dirty state before switching
|
|
210
|
+
try {
|
|
211
|
+
git.autoCommit("quick-task", `Q${taskNum}`, []);
|
|
212
|
+
} catch { /* nothing to commit — fine */ }
|
|
213
|
+
|
|
214
|
+
runGit(basePath, ["checkout", "-b", branchName]);
|
|
215
|
+
branchCreated = true;
|
|
216
|
+
}
|
|
217
|
+
} catch (err) {
|
|
218
|
+
// Branch creation failed — continue on current branch
|
|
219
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
220
|
+
ctx.ui.notify(`Could not create branch ${branchName}: ${message}. Working on current branch.`, "warning");
|
|
212
221
|
}
|
|
213
|
-
} catch (err) {
|
|
214
|
-
// Branch creation failed — continue on current branch
|
|
215
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
216
|
-
ctx.ui.notify(`Could not create branch ${branchName}: ${message}. Working on current branch.`, "warning");
|
|
217
222
|
}
|
|
218
223
|
|
|
219
224
|
const actualBranch = branchCreated ? branchName : git.getCurrentBranch();
|
|
@@ -131,6 +131,24 @@ export function isGraphAmbiguous(graph: DerivedTaskNode[]): boolean {
|
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Returns tasks that are missing IO annotations (no inputFiles and no outputFiles).
|
|
136
|
+
* These tasks prevent parallel dispatch by making the graph ambiguous.
|
|
137
|
+
* Used to surface actionable diagnostics when parallel execution falls back to sequential.
|
|
138
|
+
*/
|
|
139
|
+
export function getMissingAnnotationTasks(
|
|
140
|
+
graph: DerivedTaskNode[],
|
|
141
|
+
): Array<{ id: string; title: string }> {
|
|
142
|
+
return graph
|
|
143
|
+
.filter(
|
|
144
|
+
(node) =>
|
|
145
|
+
!node.done &&
|
|
146
|
+
node.inputFiles.length === 0 &&
|
|
147
|
+
node.outputFiles.length === 0,
|
|
148
|
+
)
|
|
149
|
+
.map((node) => ({ id: node.id, title: node.title }));
|
|
150
|
+
}
|
|
151
|
+
|
|
134
152
|
/**
|
|
135
153
|
* Detect deadlock: no tasks are ready and none are in-flight, yet incomplete
|
|
136
154
|
* tasks remain. This indicates a circular dependency or impossible state.
|
|
@@ -66,6 +66,17 @@ function parseTableSlices(section: string): RoadmapSliceEntry[] {
|
|
|
66
66
|
const lines = section.split("\n");
|
|
67
67
|
const slices: RoadmapSliceEntry[] = [];
|
|
68
68
|
|
|
69
|
+
// Detect dependency column index from the header row (#3383, #3336).
|
|
70
|
+
// Only parse deps from this column (or cells with explicit "depends"/"deps" keywords).
|
|
71
|
+
let depColumnIndex = -1;
|
|
72
|
+
for (const line of lines) {
|
|
73
|
+
if (!line.includes("|")) continue;
|
|
74
|
+
if (/S\d+/.test(line)) break; // reached data rows
|
|
75
|
+
const headerCells = line.split("|").map(c => c.trim()).filter(Boolean);
|
|
76
|
+
depColumnIndex = headerCells.findIndex(c => /^(depends|deps|depend)/i.test(c));
|
|
77
|
+
if (depColumnIndex >= 0) break;
|
|
78
|
+
}
|
|
79
|
+
|
|
69
80
|
for (const line of lines) {
|
|
70
81
|
// Skip non-table lines, separator lines (|---|---|), and header rows
|
|
71
82
|
if (!line.includes("|")) continue;
|
|
@@ -95,12 +106,17 @@ function parseTableSlices(section: string): RoadmapSliceEntry[] {
|
|
|
95
106
|
if (/\bmedium\b/.test(cellLower) || /\bmed\b/.test(cellLower)) { risk = "medium"; break; }
|
|
96
107
|
}
|
|
97
108
|
|
|
98
|
-
// Extract dependencies from
|
|
109
|
+
// Extract dependencies only from the dependency column or cells with
|
|
110
|
+
// explicit "depends"/"deps" keywords — never from title cells (#3383).
|
|
99
111
|
let depends: string[] = [];
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
112
|
+
if (depColumnIndex >= 0 && cells[depColumnIndex]) {
|
|
113
|
+
const depCell = cells[depColumnIndex]!;
|
|
114
|
+
const depIds = (depCell.match(/S\d+/g) ?? []).filter(d => d !== id);
|
|
115
|
+
depends = expandDependencies(depIds);
|
|
116
|
+
} else {
|
|
117
|
+
for (const cell of cells) {
|
|
118
|
+
if (/depends|deps/i.test(cell)) {
|
|
119
|
+
const depIds = (cell.match(/S\d+/g) ?? []).filter(d => d !== id);
|
|
104
120
|
depends = expandDependencies(depIds);
|
|
105
121
|
break;
|
|
106
122
|
}
|
|
@@ -54,12 +54,12 @@ const VALIDATORS: Record<string, ContentValidatorFn> = {
|
|
|
54
54
|
function validatePlanSlice(content: string): ContentViolation[] {
|
|
55
55
|
const violations: ContentViolation[] = [];
|
|
56
56
|
|
|
57
|
-
// Must have at least
|
|
57
|
+
// Must have at least 1 task entry — single-task slices are valid (#3649)
|
|
58
58
|
const taskCount = (content.match(/- \[[ x]\] \*\*T\d+/g) || []).length;
|
|
59
|
-
if (taskCount <
|
|
59
|
+
if (taskCount < 1) {
|
|
60
60
|
violations.push({
|
|
61
61
|
severity: "warning",
|
|
62
|
-
reason: `Slice plan has
|
|
62
|
+
reason: `Slice plan has ${taskCount} task(s) — expected at least 1`,
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -288,6 +288,20 @@ export function acquireSessionLock(basePath: string): SessionLockResult {
|
|
|
288
288
|
const gsdDir = gsdRoot(basePath);
|
|
289
289
|
const lockTarget = effectiveLockTarget(gsdDir);
|
|
290
290
|
|
|
291
|
+
// #3218: Pre-flight stale lock cleanup — if the .lock/ directory exists but
|
|
292
|
+
// no auto.lock metadata is present (or the PID is dead), remove the lock
|
|
293
|
+
// directory before attempting acquisition. This prevents the 30-min stale
|
|
294
|
+
// window from blocking /gsd after crashes, SIGKILL, or laptop sleep.
|
|
295
|
+
const lockDir = lockTarget + ".lock";
|
|
296
|
+
if (existsSync(lockDir)) {
|
|
297
|
+
const existingData = readExistingLockData(lp);
|
|
298
|
+
const isOrphan = !existingData || (existingData.pid && !isPidAlive(existingData.pid));
|
|
299
|
+
if (isOrphan) {
|
|
300
|
+
try { rmSync(lockDir, { recursive: true, force: true }); } catch { /* best-effort */ }
|
|
301
|
+
try { if (existsSync(lp)) unlinkSync(lp); } catch { /* best-effort */ }
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
291
305
|
try {
|
|
292
306
|
// Try to acquire an exclusive OS-level lock on the lock target.
|
|
293
307
|
// We lock a directory since proper-lockfile works best on directories,
|
|
@@ -344,9 +358,11 @@ export function acquireSessionLock(basePath: string): SessionLockResult {
|
|
|
344
358
|
}
|
|
345
359
|
}
|
|
346
360
|
|
|
361
|
+
// #3218: Provide actionable workaround when lock recovery fails
|
|
362
|
+
const lockDirPath = lockTarget + ".lock";
|
|
347
363
|
const reason = existingPid
|
|
348
364
|
? `Another auto-mode session (PID ${existingPid}) appears to be running.\nStop it with \`kill ${existingPid}\` before starting a new session.`
|
|
349
|
-
: `Another auto-mode session is
|
|
365
|
+
: `Another auto-mode session lock is stuck on this project.\nRun: rm -rf "${lockDirPath}" && rm -f "${lp}"`;
|
|
350
366
|
|
|
351
367
|
return { acquired: false, reason, existingPid };
|
|
352
368
|
}
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
getSlice,
|
|
56
56
|
insertMilestone,
|
|
57
57
|
insertSlice,
|
|
58
|
+
insertTask,
|
|
58
59
|
updateTaskStatus,
|
|
59
60
|
getPendingSliceGateCount,
|
|
60
61
|
type MilestoneRow,
|
|
@@ -78,10 +79,20 @@ import {
|
|
|
78
79
|
* as ghosts, causing auto-mode to skip them entirely.
|
|
79
80
|
*/
|
|
80
81
|
export function isGhostMilestone(basePath: string, mid: string): boolean {
|
|
81
|
-
// If the milestone has a DB row, it's a known milestone — not a ghost.
|
|
82
|
+
// If the milestone has a DB row, it's usually a known milestone — not a ghost.
|
|
83
|
+
// Exception: a "queued" row with no disk artifacts is a phantom from
|
|
84
|
+
// gsd_milestone_generate_id that was never planned (#3645).
|
|
82
85
|
if (isDbAvailable()) {
|
|
83
86
|
const dbRow = getMilestone(mid);
|
|
84
|
-
if (dbRow)
|
|
87
|
+
if (dbRow) {
|
|
88
|
+
if (dbRow.status === 'queued') {
|
|
89
|
+
const hasContent = resolveMilestoneFile(basePath, mid, "CONTEXT")
|
|
90
|
+
|| resolveMilestoneFile(basePath, mid, "ROADMAP")
|
|
91
|
+
|| resolveMilestoneFile(basePath, mid, "SUMMARY");
|
|
92
|
+
return !hasContent;
|
|
93
|
+
}
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
85
96
|
}
|
|
86
97
|
|
|
87
98
|
// If a worktree exists for this milestone, it was legitimately created.
|
|
@@ -446,6 +457,10 @@ export async function deriveStateFromDb(basePath: string): Promise<GSDState> {
|
|
|
446
457
|
let activeMilestoneSlices: SliceRow[] = [];
|
|
447
458
|
let activeMilestoneFound = false;
|
|
448
459
|
let activeMilestoneHasDraft = false;
|
|
460
|
+
// Queued shells (DB row, no slices, no content files) are deferred during
|
|
461
|
+
// the main loop so they don't eclipse real active milestones (#3470).
|
|
462
|
+
// If no real active milestone is found, the first deferred shell is promoted.
|
|
463
|
+
let firstDeferredQueuedShell: { id: string; title: string; deps: string[] } | null = null;
|
|
449
464
|
|
|
450
465
|
for (const m of milestones) {
|
|
451
466
|
if (parkedMilestoneIds.has(m.id)) {
|
|
@@ -453,9 +468,10 @@ export async function deriveStateFromDb(basePath: string): Promise<GSDState> {
|
|
|
453
468
|
continue;
|
|
454
469
|
}
|
|
455
470
|
|
|
456
|
-
// Ghost milestone check: no slices in DB AND no substantive files on disk
|
|
471
|
+
// Ghost milestone check: no slices in DB AND no substantive files on disk.
|
|
472
|
+
// Skip queued milestones — they are handled by the deferred-shell logic below (#3470).
|
|
457
473
|
const slices = getMilestoneSlices(m.id);
|
|
458
|
-
if (slices.length === 0 && !isStatusDone(m.status)) {
|
|
474
|
+
if (slices.length === 0 && !isStatusDone(m.status) && m.status !== 'queued') {
|
|
459
475
|
// Check disk for ghost detection
|
|
460
476
|
if (isGhostMilestone(basePath, m.id)) continue;
|
|
461
477
|
}
|
|
@@ -500,6 +516,23 @@ export async function deriveStateFromDb(basePath: string): Promise<GSDState> {
|
|
|
500
516
|
continue;
|
|
501
517
|
}
|
|
502
518
|
|
|
519
|
+
// Defer queued shell milestones with no substantive content (#3470).
|
|
520
|
+
// A queued milestone with no slices and no context/draft file is a
|
|
521
|
+
// placeholder that should not block later real active milestones.
|
|
522
|
+
// If no real active milestone is found after the loop, the first
|
|
523
|
+
// deferred shell is promoted to active (#2921).
|
|
524
|
+
if (m.status === 'queued' && slices.length === 0) {
|
|
525
|
+
const contextFile = resolveMilestoneFile(basePath, m.id, "CONTEXT");
|
|
526
|
+
const draftFile = resolveMilestoneFile(basePath, m.id, "CONTEXT-DRAFT");
|
|
527
|
+
if (!contextFile && !draftFile) {
|
|
528
|
+
if (!firstDeferredQueuedShell) {
|
|
529
|
+
firstDeferredQueuedShell = { id: m.id, title, deps };
|
|
530
|
+
}
|
|
531
|
+
registry.push({ id: m.id, title, status: 'pending', ...(deps.length > 0 ? { dependsOn: deps } : {}) });
|
|
532
|
+
continue;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
503
536
|
// Handle all-slices-done case (validating/completing)
|
|
504
537
|
if (allSlicesDone) {
|
|
505
538
|
const validationFile = resolveMilestoneFile(basePath, m.id, "VALIDATION");
|
|
@@ -532,6 +565,16 @@ export async function deriveStateFromDb(basePath: string): Promise<GSDState> {
|
|
|
532
565
|
}
|
|
533
566
|
}
|
|
534
567
|
|
|
568
|
+
// Promote deferred queued shell if no real active milestone was found (#3470/#2921).
|
|
569
|
+
if (!activeMilestoneFound && firstDeferredQueuedShell) {
|
|
570
|
+
const shell = firstDeferredQueuedShell;
|
|
571
|
+
activeMilestone = { id: shell.id, title: shell.title };
|
|
572
|
+
activeMilestoneSlices = [];
|
|
573
|
+
activeMilestoneFound = true;
|
|
574
|
+
const entry = registry.find(e => e.id === shell.id);
|
|
575
|
+
if (entry) entry.status = 'active';
|
|
576
|
+
}
|
|
577
|
+
|
|
535
578
|
const milestoneProgress = {
|
|
536
579
|
done: registry.filter(e => e.status === 'complete').length,
|
|
537
580
|
total: registry.length,
|
|
@@ -636,12 +679,15 @@ export async function deriveStateFromDb(basePath: string): Promise<GSDState> {
|
|
|
636
679
|
const validationFile = resolveMilestoneFile(basePath, activeMilestone.id, "VALIDATION");
|
|
637
680
|
const validationContent = validationFile ? await loadFile(validationFile) : null;
|
|
638
681
|
const validationTerminal = validationContent ? isValidationTerminal(validationContent) : false;
|
|
682
|
+
const verdict = validationContent ? extractVerdict(validationContent) : undefined;
|
|
639
683
|
const sliceProgress = {
|
|
640
684
|
done: activeMilestoneSlices.length,
|
|
641
685
|
total: activeMilestoneSlices.length,
|
|
642
686
|
};
|
|
643
687
|
|
|
644
|
-
|
|
688
|
+
// Force re-validation when verdict is needs-remediation — remediation slices
|
|
689
|
+
// may have completed since the stale validation was written (#3596).
|
|
690
|
+
if (!validationTerminal || verdict === 'needs-remediation') {
|
|
645
691
|
return {
|
|
646
692
|
activeMilestone, activeSlice: null, activeTask: null,
|
|
647
693
|
phase: 'validating-milestone',
|
|
@@ -738,6 +784,44 @@ export async function deriveStateFromDb(basePath: string): Promise<GSDState> {
|
|
|
738
784
|
// ── Get tasks from DB ────────────────────────────────────────────────
|
|
739
785
|
let tasks = getSliceTasks(activeMilestone.id, activeSlice.id);
|
|
740
786
|
|
|
787
|
+
// ── Reconcile missing tasks: plan file has tasks but DB is empty (#3600) ──
|
|
788
|
+
// When the planning agent writes S##-PLAN.md with task entries but never
|
|
789
|
+
// calls the gsd_plan_slice persistence tool, the DB has zero task rows
|
|
790
|
+
// even though the plan file contains valid tasks. Without this reconciliation,
|
|
791
|
+
// deriveState returns phase='planning' forever — the dispatcher re-dispatches
|
|
792
|
+
// plan-slice in an infinite loop.
|
|
793
|
+
if (tasks.length === 0 && planFile) {
|
|
794
|
+
try {
|
|
795
|
+
const planContent = await loadFile(planFile);
|
|
796
|
+
if (planContent) {
|
|
797
|
+
const diskPlan = parsePlan(planContent);
|
|
798
|
+
if (diskPlan.tasks.length > 0) {
|
|
799
|
+
for (let i = 0; i < diskPlan.tasks.length; i++) {
|
|
800
|
+
const t = diskPlan.tasks[i];
|
|
801
|
+
try {
|
|
802
|
+
insertTask({
|
|
803
|
+
id: t.id,
|
|
804
|
+
sliceId: activeSlice.id,
|
|
805
|
+
milestoneId: activeMilestone.id,
|
|
806
|
+
title: t.title,
|
|
807
|
+
status: t.done ? 'complete' : 'pending',
|
|
808
|
+
sequence: i + 1,
|
|
809
|
+
});
|
|
810
|
+
} catch (insertErr) {
|
|
811
|
+
// Task may already exist from a partial previous import — skip
|
|
812
|
+
logWarning("reconcile", `failed to insert task ${t.id} from plan file: ${insertErr instanceof Error ? insertErr.message : String(insertErr)}`);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
tasks = getSliceTasks(activeMilestone.id, activeSlice.id);
|
|
816
|
+
logWarning("reconcile", `imported ${tasks.length} tasks from plan file for ${activeMilestone.id}/${activeSlice.id} — DB was empty (#3600)`, { mid: activeMilestone.id, sid: activeSlice.id });
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
} catch (err) {
|
|
820
|
+
// Non-fatal — fall through to the existing "empty plan" logic
|
|
821
|
+
logError("reconcile", `plan-file task import failed for ${activeMilestone.id}/${activeSlice.id}: ${err instanceof Error ? err.message : String(err)}`);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
|
|
741
825
|
// ── Reconcile stale task status (#2514) ──────────────────────────────
|
|
742
826
|
// When a session disconnects after the agent writes SUMMARY + VERIFY
|
|
743
827
|
// artifacts but before postUnitPostVerification updates the DB, tasks
|
|
@@ -1099,22 +1183,25 @@ export async function _deriveStateImpl(basePath: string): Promise<GSDState> {
|
|
|
1099
1183
|
const validationFile = resolveMilestoneFile(basePath, mid, "VALIDATION");
|
|
1100
1184
|
const validationContent = validationFile ? await cachedLoadFile(validationFile) : null;
|
|
1101
1185
|
const validationTerminal = validationContent ? isValidationTerminal(validationContent) : false;
|
|
1186
|
+
const verdict = validationContent ? extractVerdict(validationContent) : undefined;
|
|
1187
|
+
// needs-remediation is terminal but requires re-validation (#3596)
|
|
1188
|
+
const needsRevalidation = !validationTerminal || verdict === 'needs-remediation';
|
|
1102
1189
|
|
|
1103
1190
|
if (summaryFile) {
|
|
1104
1191
|
// Summary exists → milestone is complete regardless of validation state.
|
|
1105
1192
|
// The summary is the terminal artifact (#864).
|
|
1106
1193
|
registry.push({ id: mid, title, status: 'complete' });
|
|
1107
|
-
} else if (
|
|
1108
|
-
// No summary and
|
|
1194
|
+
} else if (needsRevalidation && !activeMilestoneFound) {
|
|
1195
|
+
// No summary and needs (re-)validation → validating-milestone
|
|
1109
1196
|
activeMilestone = { id: mid, title };
|
|
1110
1197
|
activeRoadmap = roadmap;
|
|
1111
1198
|
activeMilestoneFound = true;
|
|
1112
1199
|
registry.push({ id: mid, title, status: 'active' });
|
|
1113
|
-
} else if (
|
|
1114
|
-
//
|
|
1200
|
+
} else if (needsRevalidation && activeMilestoneFound) {
|
|
1201
|
+
// Needs (re-)validation, but another milestone is already active
|
|
1115
1202
|
registry.push({ id: mid, title, status: 'pending' });
|
|
1116
1203
|
} else if (!activeMilestoneFound) {
|
|
1117
|
-
// Terminal validation but no summary → completing-milestone
|
|
1204
|
+
// Terminal validation (pass/needs-attention) but no summary → completing-milestone
|
|
1118
1205
|
activeMilestone = { id: mid, title };
|
|
1119
1206
|
activeRoadmap = roadmap;
|
|
1120
1207
|
activeMilestoneFound = true;
|
|
@@ -1299,12 +1386,15 @@ export async function _deriveStateImpl(basePath: string): Promise<GSDState> {
|
|
|
1299
1386
|
const validationFile = resolveMilestoneFile(basePath, activeMilestone.id, "VALIDATION");
|
|
1300
1387
|
const validationContent = validationFile ? await cachedLoadFile(validationFile) : null;
|
|
1301
1388
|
const validationTerminal = validationContent ? isValidationTerminal(validationContent) : false;
|
|
1389
|
+
const verdict = validationContent ? extractVerdict(validationContent) : undefined;
|
|
1302
1390
|
const sliceProgress = {
|
|
1303
1391
|
done: activeRoadmap.slices.length,
|
|
1304
1392
|
total: activeRoadmap.slices.length,
|
|
1305
1393
|
};
|
|
1306
1394
|
|
|
1307
|
-
|
|
1395
|
+
// Force re-validation when verdict is needs-remediation — remediation slices
|
|
1396
|
+
// may have completed since the stale validation was written (#3596).
|
|
1397
|
+
if (!validationTerminal || verdict === 'needs-remediation') {
|
|
1308
1398
|
return {
|
|
1309
1399
|
activeMilestone,
|
|
1310
1400
|
activeSlice: null,
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# {{milestoneId}}: {{milestoneTitle}}
|
|
2
|
+
|
|
3
|
+
**Gathered:** {{date}}
|
|
4
|
+
**Status:** Ready for planning
|
|
5
|
+
|
|
6
|
+
## Project Description
|
|
7
|
+
|
|
8
|
+
{{description}}
|
|
9
|
+
|
|
10
|
+
## Why This Milestone
|
|
11
|
+
|
|
12
|
+
{{whatProblemThisSolves_AND_whyNow}}
|
|
13
|
+
|
|
14
|
+
## Codebase Brief
|
|
15
|
+
|
|
16
|
+
### Technology Stack
|
|
17
|
+
|
|
18
|
+
{{techStack}}
|
|
19
|
+
|
|
20
|
+
### Key Modules
|
|
21
|
+
|
|
22
|
+
{{keyModules}}
|
|
23
|
+
|
|
24
|
+
### Patterns in Use
|
|
25
|
+
|
|
26
|
+
{{patternsInUse}}
|
|
27
|
+
|
|
28
|
+
## User-Visible Outcome
|
|
29
|
+
|
|
30
|
+
### When this milestone is complete, the user can:
|
|
31
|
+
|
|
32
|
+
- {{literalUserActionInRealEnvironment}}
|
|
33
|
+
- {{literalUserActionInRealEnvironment}}
|
|
34
|
+
|
|
35
|
+
### Entry point / environment
|
|
36
|
+
|
|
37
|
+
- Entry point: {{CLI command / URL / bot / extension / service / workflow}}
|
|
38
|
+
- Environment: {{local dev / browser / mobile / launchd / CI / production-like}}
|
|
39
|
+
- Live dependencies involved: {{telegram / database / webhook / rpc subprocess / none}}
|
|
40
|
+
|
|
41
|
+
## Completion Class
|
|
42
|
+
|
|
43
|
+
- Contract complete means: {{what can be proven by tests / fixtures / artifacts}}
|
|
44
|
+
- Integration complete means: {{what must work across real subsystems}}
|
|
45
|
+
- Operational complete means: {{what must work under real lifecycle conditions, or none}}
|
|
46
|
+
|
|
47
|
+
## Architectural Decisions
|
|
48
|
+
|
|
49
|
+
### {{decisionTitle}}
|
|
50
|
+
|
|
51
|
+
**Decision:** {{decisionStatement}}
|
|
52
|
+
|
|
53
|
+
**Rationale:** {{rationale}}
|
|
54
|
+
|
|
55
|
+
**Evidence:** {{evidence}}
|
|
56
|
+
|
|
57
|
+
**Alternatives Considered:**
|
|
58
|
+
- {{alternative1}} — {{whyNotChosen1}}
|
|
59
|
+
- {{alternative2}} — {{whyNotChosen2}}
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
> Add additional decisions as separate `### Decision Title` blocks following the same structure above.
|
|
64
|
+
|
|
65
|
+
## Interface Contracts
|
|
66
|
+
|
|
67
|
+
{{interfaceContracts}}
|
|
68
|
+
|
|
69
|
+
> Document API boundaries, function signatures, data shapes, or protocol agreements that must be honored. Leave blank or remove if not applicable to this milestone.
|
|
70
|
+
|
|
71
|
+
## Error Handling Strategy
|
|
72
|
+
|
|
73
|
+
{{errorHandlingStrategy}}
|
|
74
|
+
|
|
75
|
+
> Describe the approach for handling failures, edge cases, and error propagation. Include retry policies, fallback behaviors, and user-facing error messages where relevant.
|
|
76
|
+
|
|
77
|
+
## Final Integrated Acceptance
|
|
78
|
+
|
|
79
|
+
To call this milestone complete, we must prove:
|
|
80
|
+
|
|
81
|
+
- {{one real end-to-end scenario}}
|
|
82
|
+
- {{one real end-to-end scenario}}
|
|
83
|
+
- {{what cannot be simulated if this milestone is to be considered truly done}}
|
|
84
|
+
|
|
85
|
+
## Testing Requirements
|
|
86
|
+
|
|
87
|
+
{{testingRequirements}}
|
|
88
|
+
|
|
89
|
+
> Specify test types (unit, integration, e2e), coverage expectations, and any specific test scenarios that must pass.
|
|
90
|
+
|
|
91
|
+
## Acceptance Criteria
|
|
92
|
+
|
|
93
|
+
{{acceptanceCriteria}}
|
|
94
|
+
|
|
95
|
+
> Per-slice acceptance criteria gathered during discussion. Each slice should have clear, testable criteria.
|
|
96
|
+
|
|
97
|
+
## Risks and Unknowns
|
|
98
|
+
|
|
99
|
+
- {{riskOrUnknown}} — {{whyItMatters}}
|
|
100
|
+
|
|
101
|
+
## Existing Codebase / Prior Art
|
|
102
|
+
|
|
103
|
+
- `{{fileOrModule}}` — {{howItRelates}}
|
|
104
|
+
- `{{fileOrModule}}` — {{howItRelates}}
|
|
105
|
+
|
|
106
|
+
> See `.gsd/DECISIONS.md` for all architectural and pattern decisions — it is an append-only register; read it during planning, append to it during execution.
|
|
107
|
+
|
|
108
|
+
## Relevant Requirements
|
|
109
|
+
|
|
110
|
+
- {{requirementId}} — {{howThisMilestoneAdvancesIt}}
|
|
111
|
+
|
|
112
|
+
## Scope
|
|
113
|
+
|
|
114
|
+
### In Scope
|
|
115
|
+
|
|
116
|
+
- {{inScopeItem}}
|
|
117
|
+
|
|
118
|
+
### Out of Scope / Non-Goals
|
|
119
|
+
|
|
120
|
+
- {{outOfScopeItem}}
|
|
121
|
+
|
|
122
|
+
## Technical Constraints
|
|
123
|
+
|
|
124
|
+
- {{constraint}}
|
|
125
|
+
|
|
126
|
+
## Integration Points
|
|
127
|
+
|
|
128
|
+
- {{systemOrService}} — {{howThisMilestoneInteractsWithIt}}
|
|
129
|
+
|
|
130
|
+
## Ecosystem Notes
|
|
131
|
+
|
|
132
|
+
{{ecosystemNotes}}
|
|
133
|
+
|
|
134
|
+
> Research findings, best practices, known issues, and relevant external documentation discovered during preparation.
|
|
135
|
+
|
|
136
|
+
## Open Questions
|
|
137
|
+
|
|
138
|
+
- {{question}} — {{currentThinking}}
|