gsd-pi 2.44.0-dev.d25d507 → 2.45.0-dev.1afbdaa
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/help-text.js +1 -1
- package/dist/loader.js +34 -0
- package/dist/resources/extensions/gsd/activity-log.js +7 -0
- package/dist/resources/extensions/gsd/auto/infra-errors.js +3 -0
- package/dist/resources/extensions/gsd/auto/phases.js +63 -77
- package/dist/resources/extensions/gsd/auto/run-unit.js +6 -3
- package/dist/resources/extensions/gsd/auto/session.js +0 -11
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +112 -0
- package/dist/resources/extensions/gsd/auto-post-unit.js +25 -96
- package/dist/resources/extensions/gsd/auto-prompts.js +24 -1
- package/dist/resources/extensions/gsd/auto-start.js +23 -5
- package/dist/resources/extensions/gsd/auto-timers.js +57 -3
- package/dist/resources/extensions/gsd/auto-worktree-sync.js +4 -0
- package/dist/resources/extensions/gsd/auto-worktree.js +14 -10
- package/dist/resources/extensions/gsd/auto.js +42 -60
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +170 -11
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +18 -0
- package/dist/resources/extensions/gsd/commands/catalog.js +7 -1
- package/dist/resources/extensions/gsd/commands/context.js +0 -4
- package/dist/resources/extensions/gsd/commands/handlers/core.js +2 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +10 -0
- package/dist/resources/extensions/gsd/commands/handlers/parallel.js +1 -1
- package/dist/resources/extensions/gsd/commands-mcp-status.js +187 -0
- package/dist/resources/extensions/gsd/crash-recovery.js +2 -4
- package/dist/resources/extensions/gsd/dashboard-overlay.js +0 -44
- package/dist/resources/extensions/gsd/db-writer.js +40 -22
- package/dist/resources/extensions/gsd/doctor-checks.js +167 -2
- package/dist/resources/extensions/gsd/doctor.js +13 -3
- package/dist/resources/extensions/gsd/git-service.js +8 -3
- package/dist/resources/extensions/gsd/gsd-db.js +28 -4
- package/dist/resources/extensions/gsd/guided-flow.js +1 -2
- package/dist/resources/extensions/gsd/markdown-renderer.js +1 -1
- package/dist/resources/extensions/gsd/parallel-merge.js +1 -1
- package/dist/resources/extensions/gsd/parallel-orchestrator.js +5 -18
- package/dist/resources/extensions/gsd/preferences-types.js +2 -2
- package/dist/resources/extensions/gsd/preferences.js +8 -4
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +21 -10
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +10 -23
- package/dist/resources/extensions/gsd/prompts/discuss.md +2 -2
- package/dist/resources/extensions/gsd/prompts/execute-task.md +5 -15
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-plan-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-research-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +5 -3
- package/dist/resources/extensions/gsd/prompts/queue.md +2 -2
- package/dist/resources/extensions/gsd/prompts/quick-task.md +2 -0
- package/dist/resources/extensions/gsd/prompts/reactive-execute.md +1 -1
- package/dist/resources/extensions/gsd/prompts/reassess-roadmap.md +6 -6
- package/dist/resources/extensions/gsd/prompts/replan-slice.md +3 -14
- package/dist/resources/extensions/gsd/prompts/research-slice.md +3 -3
- package/dist/resources/extensions/gsd/prompts/rethink.md +83 -0
- package/dist/resources/extensions/gsd/prompts/system.md +1 -1
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +7 -37
- package/dist/resources/extensions/gsd/provider-error-pause.js +7 -0
- package/dist/resources/extensions/gsd/repo-identity.js +45 -7
- package/dist/resources/extensions/gsd/rethink.js +115 -0
- package/dist/resources/extensions/gsd/session-lock.js +1 -3
- package/dist/resources/extensions/gsd/state.js +48 -3
- package/dist/resources/extensions/gsd/sync-lock.js +89 -0
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +61 -11
- package/dist/resources/extensions/gsd/tools/complete-slice.js +56 -11
- package/dist/resources/extensions/gsd/tools/complete-task.js +50 -2
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +37 -1
- package/dist/resources/extensions/gsd/tools/plan-slice.js +31 -1
- package/dist/resources/extensions/gsd/tools/plan-task.js +28 -1
- package/dist/resources/extensions/gsd/tools/reassess-roadmap.js +32 -2
- package/dist/resources/extensions/gsd/tools/reopen-slice.js +86 -0
- package/dist/resources/extensions/gsd/tools/reopen-task.js +90 -0
- package/dist/resources/extensions/gsd/tools/replan-slice.js +34 -2
- package/dist/resources/extensions/gsd/tools/validate-milestone.js +88 -0
- package/dist/resources/extensions/gsd/unit-ownership.js +85 -0
- package/dist/resources/extensions/gsd/workflow-events.js +102 -0
- package/dist/resources/extensions/gsd/workflow-logger.js +193 -0
- package/dist/resources/extensions/gsd/workflow-manifest.js +244 -0
- package/dist/resources/extensions/gsd/workflow-migration.js +280 -0
- package/dist/resources/extensions/gsd/workflow-projections.js +373 -0
- package/dist/resources/extensions/gsd/workflow-reconcile.js +411 -0
- package/dist/resources/extensions/gsd/worktree-manager.js +34 -3
- package/dist/resources/extensions/gsd/worktree-resolver.js +43 -0
- package/dist/resources/extensions/gsd/write-intercept.js +84 -0
- package/dist/resources/extensions/mcp-client/index.js +14 -0
- package/dist/resources/extensions/voice/index.js +11 -16
- package/dist/resources/extensions/voice/linux-ready.js +67 -0
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +14 -14
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- 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/page.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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 +2 -2
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/page.js +1 -1
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +14 -14
- 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/chunks/4024.11ca5c01938e5948.js +9 -0
- package/dist/web/standalone/.next/static/chunks/{3721.bf31263de6d5fa46.js → 485.243af25f0cdf50d6.js} +2 -2
- package/dist/web/standalone/.next/static/chunks/app/{page-b9367c5ae13b99c6.js → page-6654a8cca61a3d1c.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/webpack-0a4cd455ec4197d2.js +1 -0
- package/dist/web/standalone/.next/static/css/dd4ae3f58ac9b600.css +1 -0
- package/package.json +2 -1
- package/packages/native/dist/stream-process/index.js +2 -2
- package/packages/native/src/__tests__/stream-process.test.mjs +34 -0
- package/packages/native/src/stream-process/index.ts +2 -2
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +3 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +15 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js +2 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +2 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lifecycle-hooks.d.ts +4 -0
- package/packages/pi-coding-agent/dist/core/lifecycle-hooks.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lifecycle-hooks.js +10 -5
- package/packages/pi-coding-agent/dist/core/lifecycle-hooks.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lifecycle-hooks.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/lifecycle-hooks.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/lifecycle-hooks.test.js +185 -0
- package/packages/pi-coding-agent/dist/core/lifecycle-hooks.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/local-model-check.d.ts +15 -0
- package/packages/pi-coding-agent/dist/core/local-model-check.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/local-model-check.js +41 -0
- package/packages/pi-coding-agent/dist/core/local-model-check.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +239 -10
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts +13 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +40 -3
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/package-commands.test.js +206 -195
- package/packages/pi-coding-agent/dist/core/package-commands.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +3 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +6 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/main.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/main.js +17 -0
- package/packages/pi-coding-agent/dist/main.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/timestamp.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/timestamp.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/timestamp.test.js +32 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/timestamp.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts +3 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +8 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +12 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/timestamp.d.ts +15 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/timestamp.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/timestamp.js +40 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/timestamp.js.map +1 -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 +4 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts +5 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.js +13 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +17 -8
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- 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 +7 -3
- 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/auth-storage.ts +15 -1
- package/packages/pi-coding-agent/src/core/compaction-orchestrator.ts +2 -0
- package/packages/pi-coding-agent/src/core/extensions/types.ts +2 -1
- package/packages/pi-coding-agent/src/core/lifecycle-hooks.test.ts +227 -0
- package/packages/pi-coding-agent/src/core/lifecycle-hooks.ts +11 -5
- package/packages/pi-coding-agent/src/core/local-model-check.ts +45 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +297 -11
- package/packages/pi-coding-agent/src/core/model-registry.ts +51 -4
- package/packages/pi-coding-agent/src/core/package-commands.test.ts +227 -205
- package/packages/pi-coding-agent/src/core/settings-manager.ts +9 -0
- package/packages/pi-coding-agent/src/main.ts +19 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/timestamp.test.ts +38 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/assistant-message.ts +10 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +15 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/timestamp.ts +48 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +3 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/user-message.ts +18 -3
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +16 -7
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +8 -1
- package/pkg/package.json +1 -1
- package/src/resources/extensions/gsd/activity-log.ts +1 -0
- package/src/resources/extensions/gsd/auto/infra-errors.ts +3 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +0 -19
- package/src/resources/extensions/gsd/auto/phases.ts +69 -91
- package/src/resources/extensions/gsd/auto/run-unit.ts +6 -3
- package/src/resources/extensions/gsd/auto/session.ts +0 -18
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +131 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +0 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +25 -106
- package/src/resources/extensions/gsd/auto-prompts.ts +24 -1
- package/src/resources/extensions/gsd/auto-start.ts +26 -5
- package/src/resources/extensions/gsd/auto-timers.ts +64 -3
- package/src/resources/extensions/gsd/auto-worktree-sync.ts +5 -0
- package/src/resources/extensions/gsd/auto-worktree.ts +17 -11
- package/src/resources/extensions/gsd/auto.ts +44 -86
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +162 -11
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +22 -0
- package/src/resources/extensions/gsd/commands/catalog.ts +7 -1
- package/src/resources/extensions/gsd/commands/context.ts +0 -5
- package/src/resources/extensions/gsd/commands/handlers/core.ts +2 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +10 -0
- package/src/resources/extensions/gsd/commands/handlers/parallel.ts +1 -1
- package/src/resources/extensions/gsd/commands-mcp-status.ts +247 -0
- package/src/resources/extensions/gsd/crash-recovery.ts +1 -5
- package/src/resources/extensions/gsd/dashboard-overlay.ts +0 -50
- package/src/resources/extensions/gsd/db-writer.ts +41 -27
- package/src/resources/extensions/gsd/doctor-checks.ts +180 -2
- package/src/resources/extensions/gsd/doctor-types.ts +7 -1
- package/src/resources/extensions/gsd/doctor.ts +13 -4
- package/src/resources/extensions/gsd/git-service.ts +6 -2
- package/src/resources/extensions/gsd/gsd-db.ts +32 -4
- package/src/resources/extensions/gsd/guided-flow.ts +1 -2
- package/src/resources/extensions/gsd/journal.ts +6 -1
- package/src/resources/extensions/gsd/markdown-renderer.ts +1 -1
- package/src/resources/extensions/gsd/parallel-merge.ts +1 -1
- package/src/resources/extensions/gsd/parallel-orchestrator.ts +5 -21
- package/src/resources/extensions/gsd/preferences-types.ts +2 -2
- package/src/resources/extensions/gsd/preferences.ts +7 -3
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +21 -10
- package/src/resources/extensions/gsd/prompts/complete-slice.md +10 -23
- package/src/resources/extensions/gsd/prompts/discuss.md +2 -2
- package/src/resources/extensions/gsd/prompts/execute-task.md +5 -15
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-plan-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-research-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-slice.md +5 -3
- package/src/resources/extensions/gsd/prompts/queue.md +2 -2
- package/src/resources/extensions/gsd/prompts/quick-task.md +2 -0
- package/src/resources/extensions/gsd/prompts/reactive-execute.md +1 -1
- package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +6 -6
- package/src/resources/extensions/gsd/prompts/replan-slice.md +3 -14
- package/src/resources/extensions/gsd/prompts/research-slice.md +3 -3
- package/src/resources/extensions/gsd/prompts/rethink.md +83 -0
- package/src/resources/extensions/gsd/prompts/system.md +1 -1
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +7 -37
- package/src/resources/extensions/gsd/provider-error-pause.ts +9 -0
- package/src/resources/extensions/gsd/repo-identity.ts +46 -7
- package/src/resources/extensions/gsd/rethink.ts +154 -0
- package/src/resources/extensions/gsd/session-lock.ts +0 -4
- package/src/resources/extensions/gsd/state.ts +49 -1
- package/src/resources/extensions/gsd/sync-lock.ts +94 -0
- package/src/resources/extensions/gsd/tests/auto-lock-creation.test.ts +5 -13
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +6 -10
- package/src/resources/extensions/gsd/tests/auto-pr-bugs.test.ts +88 -0
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +96 -0
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +264 -228
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +317 -250
- package/src/resources/extensions/gsd/tests/completed-units-metrics-sync.test.ts +114 -0
- package/src/resources/extensions/gsd/tests/crash-recovery.test.ts +2 -8
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +0 -3
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +79 -0
- package/src/resources/extensions/gsd/tests/derive-state-db-disk-reconcile.test.ts +121 -0
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +60 -0
- package/src/resources/extensions/gsd/tests/est-annotation-timeout.test.ts +120 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/idle-recovery.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/infra-error.test.ts +20 -2
- package/src/resources/extensions/gsd/tests/inherited-repo-home-dir.test.ts +121 -0
- package/src/resources/extensions/gsd/tests/integration-proof.test.ts +15 -24
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +0 -3
- package/src/resources/extensions/gsd/tests/mcp-status.test.ts +103 -0
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/merge-conflict-stops-loop.test.ts +66 -0
- package/src/resources/extensions/gsd/tests/milestone-transition-state-rebuild.test.ts +8 -9
- package/src/resources/extensions/gsd/tests/none-mode-gates.test.ts +42 -3
- package/src/resources/extensions/gsd/tests/parallel-budget-atomicity.test.ts +0 -1
- package/src/resources/extensions/gsd/tests/parallel-crash-recovery.test.ts +0 -7
- package/src/resources/extensions/gsd/tests/parallel-merge.test.ts +7 -8
- package/src/resources/extensions/gsd/tests/parallel-orchestration.test.ts +20 -24
- package/src/resources/extensions/gsd/tests/parallel-worker-monitoring.test.ts +0 -2
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +9 -6
- package/src/resources/extensions/gsd/tests/post-mutation-hook.test.ts +171 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +7 -9
- package/src/resources/extensions/gsd/tests/projection-regression.test.ts +174 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +26 -21
- package/src/resources/extensions/gsd/tests/recovery-attempts-reset.test.ts +176 -0
- package/src/resources/extensions/gsd/tests/reopen-slice.test.ts +155 -0
- package/src/resources/extensions/gsd/tests/reopen-task.test.ts +165 -0
- package/src/resources/extensions/gsd/tests/session-lock-regression.test.ts +1 -4
- package/src/resources/extensions/gsd/tests/stop-auto-merge-back.test.ts +67 -0
- package/src/resources/extensions/gsd/tests/stop-auto-remote.test.ts +2 -3
- package/src/resources/extensions/gsd/tests/survivor-branch-complete.test.ts +108 -0
- package/src/resources/extensions/gsd/tests/sync-lock.test.ts +122 -0
- package/src/resources/extensions/gsd/tests/terminated-transient.test.ts +49 -0
- package/src/resources/extensions/gsd/tests/tool-naming.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/unit-ownership.test.ts +175 -0
- package/src/resources/extensions/gsd/tests/workflow-events.test.ts +205 -0
- package/src/resources/extensions/gsd/tests/workflow-logger.test.ts +275 -0
- package/src/resources/extensions/gsd/tests/workflow-manifest.test.ts +186 -0
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +171 -0
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +220 -0
- package/src/resources/extensions/gsd/tests/worktree-submodule-safety.test.ts +65 -0
- package/src/resources/extensions/gsd/tests/write-intercept.test.ts +76 -0
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +74 -11
- package/src/resources/extensions/gsd/tools/complete-slice.ts +68 -11
- package/src/resources/extensions/gsd/tools/complete-task.ts +63 -1
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +45 -0
- package/src/resources/extensions/gsd/tools/plan-slice.ts +40 -0
- package/src/resources/extensions/gsd/tools/plan-task.ts +37 -1
- package/src/resources/extensions/gsd/tools/reassess-roadmap.ts +39 -1
- package/src/resources/extensions/gsd/tools/reopen-slice.ts +125 -0
- package/src/resources/extensions/gsd/tools/reopen-task.ts +129 -0
- package/src/resources/extensions/gsd/tools/replan-slice.ts +41 -1
- package/src/resources/extensions/gsd/tools/validate-milestone.ts +127 -0
- package/src/resources/extensions/gsd/types.ts +8 -0
- package/src/resources/extensions/gsd/unit-ownership.ts +104 -0
- package/src/resources/extensions/gsd/workflow-events.ts +154 -0
- package/src/resources/extensions/gsd/workflow-logger.ts +243 -0
- package/src/resources/extensions/gsd/workflow-manifest.ts +334 -0
- package/src/resources/extensions/gsd/workflow-migration.ts +345 -0
- package/src/resources/extensions/gsd/workflow-projections.ts +425 -0
- package/src/resources/extensions/gsd/workflow-reconcile.ts +503 -0
- package/src/resources/extensions/gsd/worktree-manager.ts +41 -5
- package/src/resources/extensions/gsd/worktree-resolver.ts +44 -0
- package/src/resources/extensions/gsd/write-intercept.ts +90 -0
- package/src/resources/extensions/mcp-client/index.ts +20 -0
- package/src/resources/extensions/voice/index.ts +11 -21
- package/src/resources/extensions/voice/linux-ready.ts +87 -0
- package/src/resources/extensions/voice/tests/linux-ready.test.ts +124 -0
- package/dist/web/standalone/.next/static/chunks/4024.0de81b543b28b9fe.js +0 -9
- package/dist/web/standalone/.next/static/chunks/webpack-9014b5adb127a98a.js +0 -1
- package/dist/web/standalone/.next/static/css/8a727f372cf53002.css +0 -1
- /package/dist/web/standalone/.next/static/{tokoGmfkYfWf1_Yl_Gz7i → j-BskPs0nxxPeYY-bSrab}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{tokoGmfkYfWf1_Yl_Gz7i → j-BskPs0nxxPeYY-bSrab}/_ssgManifest.js +0 -0
|
@@ -8,7 +8,7 @@ import { deriveState, isMilestoneComplete } from "./state.js";
|
|
|
8
8
|
import { invalidateAllCaches } from "./cache.js";
|
|
9
9
|
import { loadEffectiveGSDPreferences } from "./preferences.js";
|
|
10
10
|
import { GLOBAL_STATE_CODES } from "./doctor-types.js";
|
|
11
|
-
import { checkGitHealth, checkRuntimeHealth, checkGlobalHealth } from "./doctor-checks.js";
|
|
11
|
+
import { checkGitHealth, checkRuntimeHealth, checkGlobalHealth, checkEngineHealth } from "./doctor-checks.js";
|
|
12
12
|
import { checkEnvironmentHealth } from "./doctor-environment.js";
|
|
13
13
|
import { runProviderChecks } from "./doctor-providers.js";
|
|
14
14
|
export { summarizeDoctorIssues, filterDoctorIssues, formatDoctorReport, formatDoctorIssuesForPrompt, formatDoctorReportJson } from "./doctor-format.js";
|
|
@@ -332,8 +332,8 @@ export async function runGSDDoctor(basePath, options) {
|
|
|
332
332
|
// Git health checks — timed
|
|
333
333
|
const t0git = Date.now();
|
|
334
334
|
const isolationMode = options?.isolationMode ??
|
|
335
|
-
(prefs?.preferences?.git?.isolation === "
|
|
336
|
-
prefs?.preferences?.git?.isolation === "branch" ? "branch" : "
|
|
335
|
+
(prefs?.preferences?.git?.isolation === "worktree" ? "worktree" :
|
|
336
|
+
prefs?.preferences?.git?.isolation === "branch" ? "branch" : "none");
|
|
337
337
|
await checkGitHealth(basePath, issues, fixesApplied, shouldFix, isolationMode);
|
|
338
338
|
const gitMs = Date.now() - t0git;
|
|
339
339
|
// Runtime health checks — timed
|
|
@@ -350,6 +350,8 @@ export async function runGSDDoctor(basePath, options) {
|
|
|
350
350
|
includeTests: options?.includeTests,
|
|
351
351
|
});
|
|
352
352
|
const envMs = Date.now() - t0env;
|
|
353
|
+
// Engine health checks — DB constraints and projection drift
|
|
354
|
+
await checkEngineHealth(basePath, issues, fixesApplied);
|
|
353
355
|
const milestonesPath = milestonesDir(basePath);
|
|
354
356
|
if (!existsSync(milestonesPath)) {
|
|
355
357
|
const report = { ok: issues.every(i => i.severity !== "error"), basePath, issues, fixesApplied, timing: { git: gitMs, runtime: runtimeMs, environment: envMs, gsdState: 0 } };
|
|
@@ -441,6 +443,7 @@ export async function runGSDDoctor(basePath, options) {
|
|
|
441
443
|
id: s.id,
|
|
442
444
|
title: s.title,
|
|
443
445
|
done: s.status === "complete",
|
|
446
|
+
pending: s.status === "pending",
|
|
444
447
|
risk: (s.risk || "medium"),
|
|
445
448
|
depends: s.depends,
|
|
446
449
|
demo: s.demo,
|
|
@@ -528,6 +531,10 @@ export async function runGSDDoctor(basePath, options) {
|
|
|
528
531
|
}
|
|
529
532
|
const slicePath = resolveSlicePath(basePath, milestoneId, slice.id);
|
|
530
533
|
if (!slicePath) {
|
|
534
|
+
// Pending slices haven't been planned yet — directories are created
|
|
535
|
+
// lazily by ensurePreconditions() at dispatch time. Skip them.
|
|
536
|
+
if (slice.pending)
|
|
537
|
+
continue;
|
|
531
538
|
const expectedPath = relSlicePath(basePath, milestoneId, slice.id);
|
|
532
539
|
issues.push({
|
|
533
540
|
severity: slice.done ? "warning" : "error",
|
|
@@ -549,6 +556,9 @@ export async function runGSDDoctor(basePath, options) {
|
|
|
549
556
|
}
|
|
550
557
|
const tasksDir = resolveTasksDir(basePath, milestoneId, slice.id);
|
|
551
558
|
if (!tasksDir) {
|
|
559
|
+
// Pending slices haven't been planned yet — tasks/ is created on demand.
|
|
560
|
+
if (slice.pending)
|
|
561
|
+
continue;
|
|
552
562
|
issues.push({
|
|
553
563
|
severity: slice.done ? "warning" : "error",
|
|
554
564
|
code: "missing_tasks_dir",
|
|
@@ -510,13 +510,18 @@ export class GitServiceImpl {
|
|
|
510
510
|
* Returns the PR URL on success, or null on failure.
|
|
511
511
|
* Non-fatal: callers should treat failure as best-effort.
|
|
512
512
|
*/
|
|
513
|
-
export function createDraftPR(basePath, milestoneId, title, body) {
|
|
513
|
+
export function createDraftPR(basePath, milestoneId, title, body, opts) {
|
|
514
514
|
try {
|
|
515
|
-
const
|
|
515
|
+
const args = [
|
|
516
516
|
"pr", "create", "--draft",
|
|
517
517
|
"--title", title,
|
|
518
518
|
"--body", body,
|
|
519
|
-
]
|
|
519
|
+
];
|
|
520
|
+
if (opts?.head)
|
|
521
|
+
args.push("--head", opts.head);
|
|
522
|
+
if (opts?.base)
|
|
523
|
+
args.push("--base", opts.base);
|
|
524
|
+
const result = execFileSync("gh", args, { cwd: basePath, encoding: "utf8", timeout: 30000, env: GIT_NO_PROMPT_ENV });
|
|
520
525
|
return result.trim();
|
|
521
526
|
}
|
|
522
527
|
catch {
|
|
@@ -56,7 +56,11 @@ function loadProvider() {
|
|
|
56
56
|
catch {
|
|
57
57
|
// unavailable
|
|
58
58
|
}
|
|
59
|
-
process.
|
|
59
|
+
const nodeMajor = parseInt(process.versions.node.split(".")[0], 10);
|
|
60
|
+
const versionHint = nodeMajor < 22
|
|
61
|
+
? ` GSD requires Node >= 22.0.0 (current: v${process.versions.node}). Upgrade Node to fix this.`
|
|
62
|
+
: "";
|
|
63
|
+
process.stderr.write(`gsd-db: No SQLite provider available (tried node:sqlite, better-sqlite3).${versionHint}\n`);
|
|
60
64
|
}
|
|
61
65
|
function normalizeRow(row) {
|
|
62
66
|
if (row == null)
|
|
@@ -105,7 +109,7 @@ function openRawDb(path) {
|
|
|
105
109
|
const Database = providerModule;
|
|
106
110
|
return new Database(path);
|
|
107
111
|
}
|
|
108
|
-
const SCHEMA_VERSION =
|
|
112
|
+
const SCHEMA_VERSION = 11;
|
|
109
113
|
function initSchema(db, fileBacked) {
|
|
110
114
|
if (fileBacked)
|
|
111
115
|
db.exec("PRAGMA journal_mode=WAL");
|
|
@@ -253,6 +257,7 @@ function initSchema(db, fileBacked) {
|
|
|
253
257
|
inputs TEXT NOT NULL DEFAULT '[]',
|
|
254
258
|
expected_output TEXT NOT NULL DEFAULT '[]',
|
|
255
259
|
observability_impact TEXT NOT NULL DEFAULT '',
|
|
260
|
+
full_plan_md TEXT NOT NULL DEFAULT '',
|
|
256
261
|
sequence INTEGER DEFAULT 0, -- DEAD CODE: no tool exposes sequence — always 0
|
|
257
262
|
PRIMARY KEY (milestone_id, slice_id, id),
|
|
258
263
|
FOREIGN KEY (milestone_id, slice_id) REFERENCES slices(milestone_id, id)
|
|
@@ -542,6 +547,20 @@ function migrateSchema(db) {
|
|
|
542
547
|
":applied_at": new Date().toISOString(),
|
|
543
548
|
});
|
|
544
549
|
}
|
|
550
|
+
if (currentVersion < 11) {
|
|
551
|
+
ensureColumn(db, "tasks", "full_plan_md", `ALTER TABLE tasks ADD COLUMN full_plan_md TEXT NOT NULL DEFAULT ''`);
|
|
552
|
+
// Add unique constraint to replan_history for idempotency:
|
|
553
|
+
// one replan record per blocker task per slice per milestone.
|
|
554
|
+
db.exec(`
|
|
555
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_replan_history_unique
|
|
556
|
+
ON replan_history(milestone_id, slice_id, task_id)
|
|
557
|
+
WHERE slice_id IS NOT NULL AND task_id IS NOT NULL
|
|
558
|
+
`);
|
|
559
|
+
db.prepare("INSERT INTO schema_version (version, applied_at) VALUES (:version, :applied_at)").run({
|
|
560
|
+
":version": 11,
|
|
561
|
+
":applied_at": new Date().toISOString(),
|
|
562
|
+
});
|
|
563
|
+
}
|
|
545
564
|
db.exec("COMMIT");
|
|
546
565
|
}
|
|
547
566
|
catch (err) {
|
|
@@ -997,7 +1016,8 @@ export function upsertTaskPlanning(milestoneId, sliceId, taskId, planning) {
|
|
|
997
1016
|
verify = COALESCE(:verify, verify),
|
|
998
1017
|
inputs = COALESCE(:inputs, inputs),
|
|
999
1018
|
expected_output = COALESCE(:expected_output, expected_output),
|
|
1000
|
-
observability_impact = COALESCE(:observability_impact, observability_impact)
|
|
1019
|
+
observability_impact = COALESCE(:observability_impact, observability_impact),
|
|
1020
|
+
full_plan_md = COALESCE(:full_plan_md, full_plan_md)
|
|
1001
1021
|
WHERE milestone_id = :milestone_id AND slice_id = :slice_id AND id = :id`).run({
|
|
1002
1022
|
":milestone_id": milestoneId,
|
|
1003
1023
|
":slice_id": sliceId,
|
|
@@ -1010,6 +1030,7 @@ export function upsertTaskPlanning(milestoneId, sliceId, taskId, planning) {
|
|
|
1010
1030
|
":inputs": planning.inputs ? JSON.stringify(planning.inputs) : null,
|
|
1011
1031
|
":expected_output": planning.expectedOutput ? JSON.stringify(planning.expectedOutput) : null,
|
|
1012
1032
|
":observability_impact": planning.observabilityImpact ?? null,
|
|
1033
|
+
":full_plan_md": planning.fullPlanMd ?? null,
|
|
1013
1034
|
});
|
|
1014
1035
|
}
|
|
1015
1036
|
function rowToSlice(row) {
|
|
@@ -1078,6 +1099,7 @@ function rowToTask(row) {
|
|
|
1078
1099
|
inputs: JSON.parse(row["inputs"] || "[]"),
|
|
1079
1100
|
expected_output: JSON.parse(row["expected_output"] || "[]"),
|
|
1080
1101
|
observability_impact: row["observability_impact"] ?? "",
|
|
1102
|
+
full_plan_md: row["full_plan_md"] ?? "",
|
|
1081
1103
|
sequence: row["sequence"] ?? 0,
|
|
1082
1104
|
};
|
|
1083
1105
|
}
|
|
@@ -1300,7 +1322,9 @@ export function reconcileWorktreeDb(mainDbPath, worktreeDbPath) {
|
|
|
1300
1322
|
export function insertReplanHistory(entry) {
|
|
1301
1323
|
if (!currentDb)
|
|
1302
1324
|
throw new GSDError(GSD_STALE_STATE, "gsd-db: No database open");
|
|
1303
|
-
|
|
1325
|
+
// INSERT OR REPLACE: idempotent on (milestone_id, slice_id, task_id) via schema v11 unique index.
|
|
1326
|
+
// Retrying the same replan silently updates summary instead of accumulating duplicate rows.
|
|
1327
|
+
currentDb.prepare(`INSERT OR REPLACE INTO replan_history (milestone_id, slice_id, task_id, summary, previous_artifact_path, replacement_artifact_path, created_at)
|
|
1304
1328
|
VALUES (:milestone_id, :slice_id, :task_id, :summary, :previous_artifact_path, :replacement_artifact_path, :created_at)`).run({
|
|
1305
1329
|
":milestone_id": entry.milestoneId,
|
|
1306
1330
|
":slice_id": entry.sliceId ?? null,
|
|
@@ -755,8 +755,7 @@ export async function showSmartEntry(ctx, pi, basePath, options) {
|
|
|
755
755
|
// when the user exits during init wizard or discuss phase before any
|
|
756
756
|
// real auto-mode work begins.
|
|
757
757
|
const isBootstrapCrash = crashLock.unitType === "starting"
|
|
758
|
-
&& crashLock.unitId === "bootstrap"
|
|
759
|
-
&& crashLock.completedUnits === 0;
|
|
758
|
+
&& crashLock.unitId === "bootstrap";
|
|
760
759
|
if (!isBootstrapCrash) {
|
|
761
760
|
const resume = await showNextAction(ctx, {
|
|
762
761
|
title: "GSD — Interrupted Session Detected",
|
|
@@ -298,7 +298,7 @@ export async function renderTaskPlanFromDb(basePath, milestoneId, sliceId, taskI
|
|
|
298
298
|
mkdirSync(tasksDir, { recursive: true });
|
|
299
299
|
const absPath = join(tasksDir, buildTaskFileName(taskId, "PLAN"));
|
|
300
300
|
const artifactPath = toArtifactPath(absPath, basePath);
|
|
301
|
-
const content = renderTaskPlanMarkdown(task);
|
|
301
|
+
const content = task.full_plan_md.trim() ? task.full_plan_md : renderTaskPlanMarkdown(task);
|
|
302
302
|
await writeAndStore(absPath, artifactPath, content, {
|
|
303
303
|
artifact_type: "PLAN",
|
|
304
304
|
milestone_id: milestoneId,
|
|
@@ -17,7 +17,7 @@ import { getErrorMessage } from "./error-utils.js";
|
|
|
17
17
|
* By-completion: merge in the order milestones finished.
|
|
18
18
|
*/
|
|
19
19
|
export function determineMergeOrder(workers, order = "sequential") {
|
|
20
|
-
const completed = workers.filter(w => w.state === "stopped"
|
|
20
|
+
const completed = workers.filter(w => w.state === "stopped");
|
|
21
21
|
if (order === "by-completion") {
|
|
22
22
|
return completed
|
|
23
23
|
.sort((a, b) => a.startedAt - b.startedAt) // earliest first
|
|
@@ -47,7 +47,6 @@ export function persistState(basePath) {
|
|
|
47
47
|
worktreePath: w.worktreePath,
|
|
48
48
|
startedAt: w.startedAt,
|
|
49
49
|
state: w.state,
|
|
50
|
-
completedUnits: w.completedUnits,
|
|
51
50
|
cost: w.cost,
|
|
52
51
|
})),
|
|
53
52
|
totalCost: state.totalCost,
|
|
@@ -158,7 +157,6 @@ function restoreRuntimeState(basePath) {
|
|
|
158
157
|
worktreePath: diskStatus?.worktreePath ?? w.worktreePath,
|
|
159
158
|
startedAt: w.startedAt,
|
|
160
159
|
state: diskStatus?.state ?? w.state,
|
|
161
|
-
completedUnits: diskStatus?.completedUnits ?? w.completedUnits,
|
|
162
160
|
cost: diskStatus?.cost ?? w.cost,
|
|
163
161
|
});
|
|
164
162
|
}
|
|
@@ -189,7 +187,6 @@ function restoreRuntimeState(basePath) {
|
|
|
189
187
|
worktreePath: status.worktreePath,
|
|
190
188
|
startedAt: status.startedAt,
|
|
191
189
|
state: status.state,
|
|
192
|
-
completedUnits: status.completedUnits,
|
|
193
190
|
cost: status.cost,
|
|
194
191
|
});
|
|
195
192
|
state.totalCost += status.cost;
|
|
@@ -296,7 +293,6 @@ export async function startParallel(basePath, milestoneIds, prefs) {
|
|
|
296
293
|
worktreePath: w.worktreePath,
|
|
297
294
|
startedAt: w.startedAt,
|
|
298
295
|
state: "running",
|
|
299
|
-
completedUnits: w.completedUnits,
|
|
300
296
|
cost: w.cost,
|
|
301
297
|
});
|
|
302
298
|
adopted.push(w.milestoneId);
|
|
@@ -341,7 +337,6 @@ export async function startParallel(basePath, milestoneIds, prefs) {
|
|
|
341
337
|
worktreePath: wtPath,
|
|
342
338
|
startedAt: now,
|
|
343
339
|
state: "running",
|
|
344
|
-
completedUnits: 0,
|
|
345
340
|
cost: 0,
|
|
346
341
|
};
|
|
347
342
|
state.workers.set(mid, worker);
|
|
@@ -486,7 +481,7 @@ export function spawnWorker(basePath, milestoneId) {
|
|
|
486
481
|
pid: worker.pid,
|
|
487
482
|
state: "running",
|
|
488
483
|
currentUnit: null,
|
|
489
|
-
completedUnits:
|
|
484
|
+
completedUnits: 0,
|
|
490
485
|
cost: worker.cost,
|
|
491
486
|
lastHeartbeat: Date.now(),
|
|
492
487
|
startedAt: worker.startedAt,
|
|
@@ -527,7 +522,7 @@ export function spawnWorker(basePath, milestoneId) {
|
|
|
527
522
|
pid: w.pid,
|
|
528
523
|
state: w.state,
|
|
529
524
|
currentUnit: null,
|
|
530
|
-
completedUnits:
|
|
525
|
+
completedUnits: 0,
|
|
531
526
|
cost: w.cost,
|
|
532
527
|
lastHeartbeat: Date.now(),
|
|
533
528
|
startedAt: w.startedAt,
|
|
@@ -602,13 +597,6 @@ function processWorkerLine(basePath, milestoneId, line) {
|
|
|
602
597
|
}
|
|
603
598
|
}
|
|
604
599
|
}
|
|
605
|
-
// Track completed units (each message_end from assistant = progress)
|
|
606
|
-
if (msg.role === "assistant") {
|
|
607
|
-
const worker = state.workers.get(milestoneId);
|
|
608
|
-
if (worker) {
|
|
609
|
-
worker.completedUnits++;
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
600
|
// Update session status file so dashboard sees live cost
|
|
613
601
|
const worker = state.workers.get(milestoneId);
|
|
614
602
|
if (worker) {
|
|
@@ -617,7 +605,7 @@ function processWorkerLine(basePath, milestoneId, line) {
|
|
|
617
605
|
pid: worker.pid,
|
|
618
606
|
state: worker.state,
|
|
619
607
|
currentUnit: null,
|
|
620
|
-
completedUnits:
|
|
608
|
+
completedUnits: 0,
|
|
621
609
|
cost: worker.cost,
|
|
622
610
|
lastHeartbeat: Date.now(),
|
|
623
611
|
startedAt: worker.startedAt,
|
|
@@ -635,7 +623,7 @@ function processWorkerLine(basePath, milestoneId, line) {
|
|
|
635
623
|
pid: worker.pid,
|
|
636
624
|
state: worker.state,
|
|
637
625
|
currentUnit: null,
|
|
638
|
-
completedUnits:
|
|
626
|
+
completedUnits: 0,
|
|
639
627
|
cost: worker.cost,
|
|
640
628
|
lastHeartbeat: Date.now(),
|
|
641
629
|
startedAt: worker.startedAt,
|
|
@@ -776,13 +764,12 @@ export function refreshWorkerStatuses(basePath, options = {}) {
|
|
|
776
764
|
if (!isPidAlive(worker.pid)) {
|
|
777
765
|
worker.cleanup?.();
|
|
778
766
|
worker.cleanup = undefined;
|
|
779
|
-
worker.state =
|
|
767
|
+
worker.state = "error";
|
|
780
768
|
worker.process = null;
|
|
781
769
|
}
|
|
782
770
|
continue;
|
|
783
771
|
}
|
|
784
772
|
worker.state = diskStatus.state;
|
|
785
|
-
worker.completedUnits = diskStatus.completedUnits;
|
|
786
773
|
worker.cost = diskStatus.cost;
|
|
787
774
|
worker.pid = diskStatus.pid;
|
|
788
775
|
}
|
|
@@ -13,7 +13,7 @@ export const MODE_DEFAULTS = {
|
|
|
13
13
|
push_branches: false,
|
|
14
14
|
pre_merge_check: false,
|
|
15
15
|
merge_strategy: "squash",
|
|
16
|
-
isolation: "
|
|
16
|
+
isolation: "none",
|
|
17
17
|
},
|
|
18
18
|
unique_milestone_ids: false,
|
|
19
19
|
},
|
|
@@ -23,7 +23,7 @@ export const MODE_DEFAULTS = {
|
|
|
23
23
|
push_branches: true,
|
|
24
24
|
pre_merge_check: true,
|
|
25
25
|
merge_strategy: "squash",
|
|
26
|
-
isolation: "
|
|
26
|
+
isolation: "none",
|
|
27
27
|
},
|
|
28
28
|
unique_milestone_ids: true,
|
|
29
29
|
},
|
|
@@ -393,15 +393,19 @@ export function resolvePreDispatchHooks() {
|
|
|
393
393
|
// ─── Isolation & Parallel ─────────────────────────────────────────────────────
|
|
394
394
|
/**
|
|
395
395
|
* Resolve the effective git isolation mode from preferences.
|
|
396
|
-
* Returns "
|
|
396
|
+
* Returns "none" (default), "worktree", or "branch".
|
|
397
|
+
*
|
|
398
|
+
* Default is "none" so GSD works out of the box without preferences.md.
|
|
399
|
+
* Worktree isolation requires explicit opt-in because it depends on git
|
|
400
|
+
* branch infrastructure that must be set up before use.
|
|
397
401
|
*/
|
|
398
402
|
export function getIsolationMode() {
|
|
399
403
|
const prefs = loadEffectiveGSDPreferences()?.preferences?.git;
|
|
400
|
-
if (prefs?.isolation === "
|
|
401
|
-
return "
|
|
404
|
+
if (prefs?.isolation === "worktree")
|
|
405
|
+
return "worktree";
|
|
402
406
|
if (prefs?.isolation === "branch")
|
|
403
407
|
return "branch";
|
|
404
|
-
return "
|
|
408
|
+
return "none"; // default — no isolation, work on current branch
|
|
405
409
|
}
|
|
406
410
|
export function resolveParallelConfig(prefs) {
|
|
407
411
|
return {
|
|
@@ -17,20 +17,31 @@ All relevant context has been preloaded below — the roadmap, all slice summari
|
|
|
17
17
|
Then:
|
|
18
18
|
1. Use the **Milestone Summary** output template from the inlined context above
|
|
19
19
|
2. {{skillActivation}}
|
|
20
|
-
3. **Verify code changes exist.** Run `git diff --stat HEAD $(git merge-base HEAD main) -- ':!.gsd/'` (or the equivalent for the integration branch). If no non-`.gsd/` files appear in the diff, the milestone produced only planning artifacts and no actual code.
|
|
21
|
-
4. Verify each **success criterion** from the milestone definition in `{{roadmapPath}}`. For each criterion, confirm it was met with specific evidence from slice summaries, test results, or observable behavior.
|
|
22
|
-
5. Verify the milestone's **definition of done** — all slices are `[x]`, all slice summaries exist, and any cross-slice integration points work correctly.
|
|
20
|
+
3. **Verify code changes exist.** Run `git diff --stat HEAD $(git merge-base HEAD main) -- ':!.gsd/'` (or the equivalent for the integration branch). If no non-`.gsd/` files appear in the diff, the milestone produced only planning artifacts and no actual code. Record this as a **verification failure**.
|
|
21
|
+
4. Verify each **success criterion** from the milestone definition in `{{roadmapPath}}`. For each criterion, confirm it was met with specific evidence from slice summaries, test results, or observable behavior. Record any criterion that was NOT met as a **verification failure**.
|
|
22
|
+
5. Verify the milestone's **definition of done** — all slices are `[x]`, all slice summaries exist, and any cross-slice integration points work correctly. Record any unmet items as a **verification failure**.
|
|
23
23
|
6. Validate **requirement status transitions**. For each requirement that changed status during this milestone, confirm the transition is supported by evidence. Requirements can move between Active, Validated, Deferred, Blocked, or Out of Scope — but only with proof.
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
|
|
25
|
+
### Verification Gate — STOP if verification failed
|
|
26
|
+
|
|
27
|
+
**If ANY verification failure was recorded in steps 3, 4, or 5, you MUST follow the failure path below. Do NOT proceed to step 7.**
|
|
28
|
+
|
|
29
|
+
**Failure path** (verification failed):
|
|
30
|
+
- Do NOT call `gsd_complete_milestone` — the milestone must not be marked as complete.
|
|
31
|
+
- Do NOT update `.gsd/PROJECT.md` to reflect completion.
|
|
32
|
+
- Do NOT update `.gsd/REQUIREMENTS.md` to mark requirements as validated.
|
|
33
|
+
- Write a clear summary of what failed and why to help the next attempt.
|
|
34
|
+
- Say: "Milestone {{milestoneId}} verification FAILED — not complete." and stop.
|
|
35
|
+
|
|
36
|
+
**Success path** (all verifications passed — continue with steps 7–11):
|
|
37
|
+
|
|
38
|
+
7. **Persist completion through `gsd_complete_milestone`.** Call it with: `milestoneId`, `title`, `oneLiner`, `narrative`, `successCriteriaResults`, `definitionOfDoneResults`, `requirementOutcomes`, `keyDecisions`, `keyFiles`, `lessonsLearned`, `followUps`, `deviations`, `verificationPassed: true`. The tool updates the milestone status in the DB, renders `{{milestoneSummaryPath}}`, and validates all slices are complete before proceeding.
|
|
39
|
+
8. For each requirement whose status changed in step 6, call `gsd_requirement_update` with the requirement ID and updated `status` and `validation` fields — the tool regenerates `.gsd/REQUIREMENTS.md` automatically.
|
|
26
40
|
9. Update `.gsd/PROJECT.md` to reflect milestone completion and current project state.
|
|
27
41
|
10. Review all slice summaries for cross-cutting lessons, patterns, or gotchas that emerged during this milestone. Append any non-obvious, reusable insights to `.gsd/KNOWLEDGE.md`.
|
|
28
42
|
11. Do not commit manually — the system auto-commits your changes after this unit completes.
|
|
43
|
+
- Say: "Milestone {{milestoneId}} complete."
|
|
29
44
|
|
|
30
|
-
**Important:** Do NOT skip the code change verification, success criteria, or definition of done verification (steps 3-5). The milestone summary must reflect actual verified outcomes, not assumed success.
|
|
45
|
+
**Important:** Do NOT skip the code change verification, success criteria, or definition of done verification (steps 3-5). The milestone summary must reflect actual verified outcomes, not assumed success. Verification failures BLOCK completion — there is no override. The milestone stays in its current state until issues are resolved and verification is re-run.
|
|
31
46
|
|
|
32
47
|
**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.
|
|
33
|
-
|
|
34
|
-
**You MUST write `{{milestoneSummaryPath}}` AND update PROJECT.md before finishing.**
|
|
35
|
-
|
|
36
|
-
When done, say: "Milestone {{milestoneId}} complete."
|
|
@@ -23,28 +23,15 @@ Then:
|
|
|
23
23
|
2. {{skillActivation}}
|
|
24
24
|
3. Run all slice-level verification checks defined in the slice plan. All must pass before marking the slice done. If any fail, fix them first.
|
|
25
25
|
4. If the slice plan includes observability/diagnostic surfaces, confirm they work. Skip this for simple slices that don't have observability sections.
|
|
26
|
-
5. If
|
|
27
|
-
6.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
**Patterns & decisions:** `keyDecisions` (array of decision strings), `patternsEstablished` (array), `observabilitySurfaces` (array)
|
|
38
|
-
|
|
39
|
-
**Dependencies:** `provides` (what this slice provides downstream), `affects` (downstream slice IDs affected), `requires` (array of `{slice, provides}` for upstream dependencies consumed), `drillDownPaths` (paths to task summaries)
|
|
40
|
-
|
|
41
|
-
**UAT content:** `uatContent` — the UAT markdown body. This must be a concrete UAT script with real test cases derived from the slice plan and task summaries. Include preconditions, numbered steps with expected outcomes, and edge cases. This must NOT be a placeholder or generic template — tailor every test case to what this slice actually built. The tool writes it to `{{sliceUatPath}}`.
|
|
42
|
-
|
|
43
|
-
7. Review task summaries for `key_decisions`. Append any significant decisions to `.gsd/DECISIONS.md` if missing.
|
|
44
|
-
8. Review task summaries for patterns, gotchas, or non-obvious lessons learned. If any would save future agents from repeating investigation or hitting the same issues, append them to `.gsd/KNOWLEDGE.md`. Only add entries that are genuinely useful — don't pad with obvious observations.
|
|
45
|
-
9. Do not run git commands — the system commits your changes and handles any merge after this unit succeeds.
|
|
46
|
-
10. Update `.gsd/PROJECT.md` if it exists — refresh current state if needed.
|
|
47
|
-
|
|
48
|
-
**You MUST call `gsd_slice_complete` before finishing.** The tool handles writing `{{sliceSummaryPath}}`, `{{sliceUatPath}}`, and updating `{{roadmapPath}}` atomically. You must still review decisions and knowledge manually (steps 7-8).
|
|
26
|
+
5. If this slice produced evidence that a requirement changed status (Active → Validated, Active → Deferred, etc.), call `gsd_save_decision` with scope="requirement", decision="{requirement-id}", choice="{new-status}", rationale="{evidence}". Do NOT write `.gsd/REQUIREMENTS.md` directly — the engine renders it from the database.
|
|
27
|
+
6. Write `{{sliceSummaryPath}}` (compress all task summaries).
|
|
28
|
+
7. Write `{{sliceUatPath}}` — a concrete UAT script with real test cases derived from the slice plan and task summaries. Include preconditions, numbered steps with expected outcomes, and edge cases. This must NOT be a placeholder or generic template — tailor every test case to what this slice actually built.
|
|
29
|
+
8. Review task summaries for `key_decisions`. Append any significant decisions to `.gsd/DECISIONS.md` if missing.
|
|
30
|
+
9. Review task summaries for patterns, gotchas, or non-obvious lessons learned. If any would save future agents from repeating investigation or hitting the same issues, append them to `.gsd/KNOWLEDGE.md`. Only add entries that are genuinely useful — don't pad with obvious observations.
|
|
31
|
+
10. Call `gsd_complete_slice` with milestone_id, slice_id, the slice summary, and the UAT result. Do NOT manually mark the roadmap checkbox — the tool writes to the DB and renders the ROADMAP.md projection automatically.
|
|
32
|
+
11. Do not run git commands — the system commits your changes and handles any merge after this unit succeeds.
|
|
33
|
+
12. Update `.gsd/PROJECT.md` if it exists — refresh current state if needed.
|
|
34
|
+
|
|
35
|
+
**You MUST do ALL THREE before finishing: (1) write `{{sliceSummaryPath}}`, (2) write `{{sliceUatPath}}`, (3) call `gsd_complete_slice`. The unit will not be marked complete if any of these are missing.**
|
|
49
36
|
|
|
50
37
|
When done, say: "Slice {{sliceId}} complete."
|
|
@@ -203,7 +203,7 @@ When writing context.md, preserve the user's exact terminology, emphasis, and sp
|
|
|
203
203
|
|
|
204
204
|
4. Write `{{contextPath}}` — use the **Context** output template below. Preserve key risks, unknowns, existing codebase constraints, integration points, and relevant requirements surfaced during discussion.
|
|
205
205
|
5. Call `gsd_plan_milestone` to create the roadmap. Decompose into demoable vertical slices with risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, requirement coverage, and a boundary map. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment. Use the **Roadmap** output template below to structure the tool call parameters.
|
|
206
|
-
6.
|
|
206
|
+
6. For each architectural or pattern decision made during discussion, call `gsd_decision_save` — the tool auto-assigns IDs and regenerates `.gsd/DECISIONS.md` automatically.
|
|
207
207
|
7. {{commitInstruction}}
|
|
208
208
|
|
|
209
209
|
After writing the files, say exactly: "Milestone {{milestoneId}} ready." — nothing else. Auto-mode will start automatically.
|
|
@@ -217,7 +217,7 @@ Once the user confirms the milestone split:
|
|
|
217
217
|
1. For each milestone, call `gsd_milestone_generate_id` to get its ID — never invent milestone IDs manually. Then `mkdir -p .gsd/milestones/<ID>/slices`.
|
|
218
218
|
2. Write `.gsd/PROJECT.md` — use the **Project** output template below.
|
|
219
219
|
3. Write `.gsd/REQUIREMENTS.md` — use the **Requirements** output template below. Capture Active, Deferred, Out of Scope, and any already Validated requirements. Later milestones may have provisional ownership where slice plans do not exist yet.
|
|
220
|
-
4.
|
|
220
|
+
4. For any architectural or pattern decisions made during discussion, call `gsd_decision_save` — the tool auto-assigns IDs and regenerates `.gsd/DECISIONS.md` automatically.
|
|
221
221
|
|
|
222
222
|
#### Phase 2: Primary milestone
|
|
223
223
|
|
|
@@ -63,23 +63,13 @@ Then:
|
|
|
63
63
|
11. **Blocker discovery:** If execution reveals that the remaining slice plan is fundamentally invalid — not just a bug or minor deviation, but a plan-invalidating finding like a wrong API, missing capability, or architectural mismatch — set `blocker_discovered: true` in the task summary frontmatter and describe the blocker clearly in the summary narrative. Do NOT set `blocker_discovered: true` for ordinary debugging, minor deviations, or issues that can be fixed within the current task or the remaining plan. This flag triggers an automatic replan of the slice.
|
|
64
64
|
12. If you made an architectural, pattern, library, or observability decision during this task that downstream work should know about, append it to `.gsd/DECISIONS.md` (read the template at `~/.gsd/agent/extensions/gsd/templates/decisions.md` if the file doesn't exist yet). Not every task produces decisions — only append when a meaningful choice was made.
|
|
65
65
|
13. If you discover a non-obvious rule, recurring gotcha, or useful pattern during execution, append it to `.gsd/KNOWLEDGE.md`. Only add entries that would save future agents from repeating your investigation. Don't add obvious things.
|
|
66
|
-
14.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
- `oneLiner`: One-line summary of what was accomplished (becomes the commit message)
|
|
71
|
-
- `narrative`: Detailed narrative of what happened during the task
|
|
72
|
-
- `verification`: What was verified and how — commands run, tests passed, behavior confirmed
|
|
73
|
-
- `deviations`: Deviations from the task plan, or "None."
|
|
74
|
-
- `knownIssues`: Known issues discovered but not fixed, or "None."
|
|
75
|
-
- `keyFiles`: Array of key files created or modified
|
|
76
|
-
- `keyDecisions`: Array of key decisions made during this task
|
|
77
|
-
- `blockerDiscovered`: Whether a plan-invalidating blocker was discovered (boolean)
|
|
78
|
-
- `verificationEvidence`: Array of `{ command, exitCode, verdict, durationMs }` objects from the verification gate
|
|
79
|
-
15. Do not run git commands — the system reads your task summary after completion and creates a meaningful commit from it (type inferred from title, message from your one-liner, key files from frontmatter). Write a clear, specific one-liner in the summary — it becomes the commit message.
|
|
66
|
+
14. Read the template at `~/.gsd/agent/extensions/gsd/templates/task-summary.md`
|
|
67
|
+
15. Write `{{taskSummaryPath}}`
|
|
68
|
+
16. Call `gsd_complete_task` with milestone_id, slice_id, task_id, and a summary of what was accomplished. This is your final required step — do NOT manually edit PLAN.md checkboxes. The tool marks the task complete, updates the DB, and renders PLAN.md automatically.
|
|
69
|
+
17. Do not run git commands — the system reads your task summary after completion and creates a meaningful commit from it (type inferred from title, message from your one-liner, key files from frontmatter). Write a clear, specific one-liner in the summary — it becomes the commit message.
|
|
80
70
|
|
|
81
71
|
All work stays in your working directory: `{{workingDirectory}}`.
|
|
82
72
|
|
|
83
|
-
**You MUST call `
|
|
73
|
+
**You MUST call `gsd_complete_task` AND write `{{taskSummaryPath}}` before finishing.**
|
|
84
74
|
|
|
85
75
|
When done, say: "Task {{taskId}} complete."
|
|
@@ -105,6 +105,6 @@ Once the user confirms depth:
|
|
|
105
105
|
|
|
106
106
|
1. Use the **Context** output template below
|
|
107
107
|
2. `mkdir -p` the milestone directory if needed
|
|
108
|
-
3.
|
|
108
|
+
3. Call `gsd_summary_save` with `milestone_id: {{milestoneId}}`, `artifact_type: "CONTEXT"`, and the full context markdown as `content` — the tool writes the file to disk and persists to DB. Preserve the user's exact terminology, emphasis, and framing in the content. Do not paraphrase nuance into generic summaries. The context file is downstream agents' only window into this conversation.
|
|
109
109
|
4. {{commitInstruction}}
|
|
110
110
|
5. Say exactly: `"{{milestoneId}} context written."` — nothing else.
|
|
@@ -48,7 +48,7 @@ Once the user is ready to wrap up:
|
|
|
48
48
|
|
|
49
49
|
1. Use the **Slice Context** output template below
|
|
50
50
|
2. `mkdir -p {{sliceDirPath}}`
|
|
51
|
-
3.
|
|
51
|
+
3. Call `gsd_summary_save` with `milestone_id: {{milestoneId}}`, `slice_id: {{sliceId}}`, `artifact_type: "CONTEXT"`, and the context as `content` — the tool writes the file to disk and persists to DB. Use the template structure, filling in:
|
|
52
52
|
- **Goal** — one sentence: what this slice delivers
|
|
53
53
|
- **Why this Slice** — why now, what it unblocks
|
|
54
54
|
- **Scope / In Scope** — what was confirmed in scope during the interview
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Plan slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements the roadmap says this slice owns or supports, and ensure the plan delivers them. Read the roadmap boundary map, any existing context/research files, and dependency summaries. Use the **Slice Plan** and **Task Plan** output templates below. Decompose into tasks with must-haves. Fill the `Proof Level` and `Integration Closure` sections truthfully so the plan says what class of proof this slice really delivers and what end-to-end wiring still remains.
|
|
1
|
+
Plan slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements the roadmap says this slice owns or supports, and ensure the plan delivers them. Read the roadmap boundary map, any existing context/research files, and dependency summaries. Use the **Slice Plan** and **Task Plan** output templates below. Decompose into tasks with must-haves. Fill the `Proof Level` and `Integration Closure` sections truthfully so the plan says what class of proof this slice really delivers and what end-to-end wiring still remains. Call `gsd_plan_slice` to persist the slice plan — the tool writes `{{sliceId}}-PLAN.md` and individual `T##-PLAN.md` files to disk and persists to DB. Do **not** write plan files manually — use the DB-backed tool so state stays consistent. If planning produces structural decisions, call `gsd_decision_save` for each — the tool auto-assigns IDs and regenerates `.gsd/DECISIONS.md` automatically. {{skillActivation}} Before finishing, self-audit the plan: every must-have maps to at least one task, every task has complete sections (steps, must-haves, verification, observability impact, inputs, and expected output), task ordering is consistent with no circular references, every pair of artifacts that must connect has an explicit wiring step, task scope targets 2–5 steps and 3–8 files (6–8 steps or 8–10 files — consider splitting; 10+ steps or 12+ files — must split), the plan honors locked decisions from context/research/decisions artifacts, the proof-level wording does not overclaim live integration if only fixture/contract proof is planned, every Active requirement this slice owns has at least one task with verification that proves it is met, and every task produces real user-facing progress — if the slice has a UI surface at least one task builds the real UI, if it has an API at least one task connects it to a real data source, and showing the completed result to a non-technical stakeholder would demonstrate real product progress rather than developer artifacts.
|
|
2
2
|
|
|
3
3
|
{{inlinedTemplates}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Research slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions, don't contradict them. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements this slice owns or supports and target research toward risks, unknowns, and constraints that could affect delivery of those requirements. {{skillActivation}} Explore the relevant code — use `rg`/`find` for targeted reads, or `scout` if the area is broad or unfamiliar. Check libraries with `resolve_library`/`get_library_docs` — skip this for libraries already used in the codebase. Use the **Research** output template below.
|
|
1
|
+
Research slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions, don't contradict them. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements this slice owns or supports and target research toward risks, unknowns, and constraints that could affect delivery of those requirements. {{skillActivation}} Explore the relevant code — use `rg`/`find` for targeted reads, or `scout` if the area is broad or unfamiliar. Check libraries with `resolve_library`/`get_library_docs` — skip this for libraries already used in the codebase. Use the **Research** output template below. Call `gsd_summary_save` with `milestone_id: {{milestoneId}}`, `slice_id: {{sliceId}}`, `artifact_type: "RESEARCH"`, and the research content — the tool writes the file to disk and persists to DB.
|
|
2
2
|
|
|
3
3
|
**You are the scout.** A planner agent reads your output in a fresh context to decompose this slice into tasks. Write for the planner — surface key files, where the work divides naturally, what to build first, and how to verify. If the research doc is vague, the planner re-explores code you already read. If it's precise, the planner decomposes immediately.
|
|
4
4
|
|
|
@@ -48,7 +48,7 @@ Then:
|
|
|
48
48
|
3. Create the roadmap: decompose into demoable vertical slices — as many as the work genuinely needs, no more. A simple feature might be 1 slice. Don't decompose for decomposition's sake.
|
|
49
49
|
4. Order by risk (high-risk first)
|
|
50
50
|
5. Call `gsd_plan_milestone` to persist the milestone planning fields and slice rows in the DB-backed planning path. Do **not** write `{{outputPath}}`, `ROADMAP.md`, or other planning artifacts manually — the planning tool owns roadmap rendering and persistence.
|
|
51
|
-
6. If planning produced structural decisions (e.g. slice ordering rationale, technology choices, scope exclusions),
|
|
51
|
+
6. If planning produced structural decisions (e.g. slice ordering rationale, technology choices, scope exclusions), call `gsd_decision_save` for each decision — the tool auto-assigns IDs and regenerates `.gsd/DECISIONS.md` automatically.
|
|
52
52
|
|
|
53
53
|
## Requirement Mapping Rules
|
|
54
54
|
|
|
@@ -63,7 +63,7 @@ Then:
|
|
|
63
63
|
- a matching task plan file with description, steps, must-haves, verification, inputs, and expected output
|
|
64
64
|
- **Inputs and Expected Output must list concrete backtick-wrapped file paths** (e.g. `` `src/types.ts` ``). These are machine-parsed to derive task dependencies — vague prose without paths breaks parallel execution. Every task must have at least one output file path.
|
|
65
65
|
- Observability Impact section **only if the task touches runtime boundaries, async flows, or error paths** — omit it otherwise
|
|
66
|
-
6. **Persist planning state through
|
|
66
|
+
6. **Persist planning state through `gsd_plan_slice`.** Call it with the full slice planning payload (goal, demo, must-haves, verification, tasks, and metadata). The tool inserts all tasks in the same transaction, writes to the DB, and renders `{{outputPath}}` and `{{slicePath}}/tasks/T##-PLAN.md` files automatically. Do **not** call `gsd_plan_task` separately — `gsd_plan_slice` handles task persistence. Do **not** rely on direct `PLAN.md` writes as the source of truth; the DB-backed tool is the canonical write path for slice and task planning state.
|
|
67
67
|
7. **Self-audit the plan.** Walk through each check — if any fail, fix the plan files before moving on:
|
|
68
68
|
- **Completion semantics:** If every task were completed exactly as written, the slice goal/demo should actually be true.
|
|
69
69
|
- **Requirement coverage:** Every must-have in the slice maps to at least one task. No must-have is orphaned. If `REQUIREMENTS.md` exists, every Active requirement this slice owns maps to at least one task.
|
|
@@ -72,9 +72,11 @@ Then:
|
|
|
72
72
|
- **Key links planned:** For every pair of artifacts that must connect, there is an explicit step that wires them.
|
|
73
73
|
- **Scope sanity:** Target 2–5 steps and 3–8 files per task. 10+ steps or 12+ files — must split. Each task must be completable in a single fresh context window.
|
|
74
74
|
- **Feature completeness:** Every task produces real, user-facing progress — not just internal scaffolding.
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
10. If planning produced structural decisions, append them to `.gsd/DECISIONS.md`
|
|
76
|
+
11. {{commitInstruction}}
|
|
77
77
|
|
|
78
78
|
The slice directory and tasks/ subdirectory already exist. Do NOT mkdir. All work stays in your working directory: `{{workingDirectory}}`.
|
|
79
79
|
|
|
80
|
+
**You MUST write the file `{{outputPath}}` before finishing.**
|
|
81
|
+
|
|
80
82
|
When done, say: "Slice {{sliceId}} planned."
|
|
@@ -8,7 +8,7 @@ Before asking "What do you want to add?", check the existing milestones context
|
|
|
8
8
|
|
|
9
9
|
1. Tell the user which milestones have draft contexts and briefly summarize what each draft contains (read the draft file).
|
|
10
10
|
2. Use `ask_user_questions` to ask per-draft milestone:
|
|
11
|
-
- **"Discuss now"** — Treat this draft as the primary topic. Read the draft content, use it as seed material, and conduct a focused discussion following the standard discussion flow (reflection → investigation → questioning → depth verification → requirements → roadmap). After the discussion, write the full
|
|
11
|
+
- **"Discuss now"** — Treat this draft as the primary topic. Read the draft content, use it as seed material, and conduct a focused discussion following the standard discussion flow (reflection → investigation → questioning → depth verification → requirements → roadmap). After the discussion, call `gsd_summary_save` with the milestone ID and `artifact_type: "CONTEXT"` to write the full context — then delete the `CONTEXT-DRAFT.md` file. The milestone is then ready for auto-planning.
|
|
12
12
|
- **"Leave for later"** — Keep the draft as-is. The user will discuss it in a future session. Auto-mode will continue to pause when it reaches this milestone.
|
|
13
13
|
3. Handle all draft discussions before proceeding to new queue work.
|
|
14
14
|
4. If no drafts exist in the context, skip this section entirely and proceed to "What do you want to add?"
|
|
@@ -108,7 +108,7 @@ The user confirms or corrects before you write. One depth verification per miles
|
|
|
108
108
|
Once the user is satisfied, in a single pass for **each** new milestone:
|
|
109
109
|
|
|
110
110
|
1. Call `gsd_milestone_generate_id` to get the milestone ID — never invent milestone IDs manually. Then `mkdir -p .gsd/milestones/<ID>/slices`.
|
|
111
|
-
2.
|
|
111
|
+
2. Call `gsd_summary_save` with `milestone_id: <ID>`, `artifact_type: "CONTEXT"`, and the full context markdown as `content` — the tool computes the file path and persists to both DB and disk. Capture intent, scope, risks, constraints, integration points, and relevant requirements in the content. Mark the status as "Queued — pending auto-mode execution." **If this milestone depends on other milestones, include YAML frontmatter with `depends_on` in the content:**
|
|
112
112
|
```yaml
|
|
113
113
|
---
|
|
114
114
|
depends_on: [M001, M002]
|
|
@@ -21,7 +21,9 @@ You are executing a GSD quick task — a lightweight, focused unit of work outsi
|
|
|
21
21
|
- Use conventional commit messages (feat:, fix:, refactor:, etc.)
|
|
22
22
|
- Stage only relevant files — never commit secrets or runtime files.
|
|
23
23
|
- Commit logical units separately if the task involves distinct changes.
|
|
24
|
+
- Quick tasks run outside the auto-mode lifecycle — there is no system auto-commit, so commit directly here.
|
|
24
25
|
7. Write a brief summary to `{{summaryPath}}`:
|
|
26
|
+
- Quick tasks operate outside the milestone/slice/task DB structure, so `gsd_summary_save` (which requires a `milestone_id`) cannot be used here. Write the file directly.
|
|
25
27
|
|
|
26
28
|
```markdown
|
|
27
29
|
# Quick Task: {{description}}
|