gsd-pi 2.81.0 → 2.82.0-dev.2841a1e44
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/README.md +63 -32
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/GSD-WORKFLOW.md +3 -1
- package/dist/resources/extensions/browser-tools/tools/screenshot.js +1 -0
- package/dist/resources/extensions/browser-tools/tools/zoom.js +1 -0
- package/dist/resources/extensions/cmux/index.js +5 -0
- package/dist/resources/extensions/gsd/auto/loop.js +111 -8
- package/dist/resources/extensions/gsd/auto/orchestrator.js +113 -6
- package/dist/resources/extensions/gsd/auto/phases.js +199 -97
- package/dist/resources/extensions/gsd/auto/run-unit.js +66 -3
- package/dist/resources/extensions/gsd/auto/session.js +9 -0
- package/dist/resources/extensions/gsd/auto/verification-retry-policy.js +43 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +182 -178
- package/dist/resources/extensions/gsd/auto-dispatch.js +14 -11
- package/dist/resources/extensions/gsd/auto-post-unit.js +176 -125
- package/dist/resources/extensions/gsd/auto-prompts.js +13 -5
- package/dist/resources/extensions/gsd/auto-recovery.js +6 -181
- package/dist/resources/extensions/gsd/auto-runtime-state.js +5 -0
- package/dist/resources/extensions/gsd/auto-start.js +20 -23
- package/dist/resources/extensions/gsd/auto-unit-closeout.js +33 -5
- package/dist/resources/extensions/gsd/auto-verification.js +38 -26
- package/dist/resources/extensions/gsd/auto-worktree.js +8 -0
- package/dist/resources/extensions/gsd/auto.js +371 -106
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +13 -6
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +13 -2
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +4 -8
- package/dist/resources/extensions/gsd/bootstrap/subagent-input.js +16 -7
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +55 -12
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +3 -1
- package/dist/resources/extensions/gsd/clean-root-preflight.js +170 -8
- package/dist/resources/extensions/gsd/commands/catalog.js +4 -1
- package/dist/resources/extensions/gsd/commands/handlers/core.js +22 -1
- package/dist/resources/extensions/gsd/commands/handlers/notifications-handler.js +4 -10
- package/dist/resources/extensions/gsd/commands/handlers/parallel.js +9 -0
- package/dist/resources/extensions/gsd/commands-bootstrap.js +5 -0
- package/dist/resources/extensions/gsd/commands-handlers.js +15 -2
- package/dist/resources/extensions/gsd/context-store.js +112 -0
- package/dist/resources/extensions/gsd/db-writer.js +150 -84
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +1 -1
- package/dist/resources/extensions/gsd/doctor-git-checks.js +41 -6
- package/dist/resources/extensions/gsd/git-service.js +2 -1
- package/dist/resources/extensions/gsd/gsd-db.js +7 -23
- package/dist/resources/extensions/gsd/health-widget-core.js +1 -1
- package/dist/resources/extensions/gsd/health-widget.js +4 -10
- package/dist/resources/extensions/gsd/knowledge-backfill.js +144 -0
- package/dist/resources/extensions/gsd/knowledge-capture.js +136 -0
- package/dist/resources/extensions/gsd/knowledge-parser.js +154 -0
- package/dist/resources/extensions/gsd/knowledge-projection.js +210 -0
- package/dist/resources/extensions/gsd/markdown-renderer.js +6 -96
- package/dist/resources/extensions/gsd/md-importer.js +1 -1
- package/dist/resources/extensions/gsd/memory-backfill.js +73 -17
- package/dist/resources/extensions/gsd/memory-consolidation-scanner.js +222 -0
- package/dist/resources/extensions/gsd/migrate/command.js +5 -0
- package/dist/resources/extensions/gsd/migrate/preview.js +9 -0
- package/dist/resources/extensions/gsd/migrate/transformer.js +51 -4
- package/dist/resources/extensions/gsd/migrate/writer.js +11 -1
- package/dist/resources/extensions/gsd/native-git-bridge.js +14 -14
- package/dist/resources/extensions/gsd/notification-overlay.js +35 -40
- package/dist/resources/extensions/gsd/parallel-merge.js +53 -30
- package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +25 -33
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +14 -12
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +20 -2
- package/dist/resources/extensions/gsd/prompts/discuss.md +20 -2
- package/dist/resources/extensions/gsd/prompts/system.md +2 -2
- package/dist/resources/extensions/gsd/provider-switch-observer.js +146 -0
- package/dist/resources/extensions/gsd/recovery-classification.js +15 -1
- package/dist/resources/extensions/gsd/session-lock.js +40 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/completion.js +131 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/merge-state.js +247 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/project-md.js +50 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/roadmap.js +87 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/sketch-flag.js +50 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/stale-render.js +124 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/stale-worker.js +32 -0
- package/dist/resources/extensions/gsd/state-reconciliation/errors.js +41 -0
- package/dist/resources/extensions/gsd/state-reconciliation/index.js +99 -0
- package/dist/resources/extensions/gsd/state-reconciliation/registry.js +24 -0
- package/dist/resources/extensions/gsd/state-reconciliation/spawn-gate.js +43 -0
- package/dist/resources/extensions/gsd/state-reconciliation/types.js +3 -0
- package/dist/resources/extensions/gsd/state-reconciliation.js +5 -26
- package/dist/resources/extensions/gsd/templates/knowledge.md +2 -2
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +119 -0
- package/dist/resources/extensions/gsd/tui/render-kit.js +74 -0
- package/dist/resources/extensions/gsd/unit-context-manifest.js +25 -2
- package/dist/resources/extensions/gsd/verification-verdict.js +26 -0
- package/dist/resources/extensions/gsd/watch/header-renderer.js +92 -69
- package/dist/resources/extensions/gsd/watch/splash-palette.js +10 -0
- package/dist/resources/extensions/gsd/workflow-mcp.js +2 -2
- package/dist/resources/extensions/gsd/worktree-lifecycle.js +743 -318
- package/dist/resources/extensions/gsd/worktree-telemetry.js +3 -1
- package/dist/resources/extensions/subagent/index.js +448 -78
- package/dist/resources/extensions/subagent/launch.js +77 -0
- package/dist/resources/extensions/subagent/run-store.js +148 -0
- package/dist/resources/extensions/visual-brief/artifact-policy.js +29 -0
- package/dist/resources/extensions/visual-brief/extension-manifest.json +8 -0
- package/dist/resources/extensions/visual-brief/index.js +5 -0
- package/dist/resources/extensions/visual-brief/page-contract.js +122 -0
- package/dist/resources/extensions/visual-brief/prompts.js +111 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +11 -11
- package/dist/web/standalone/.next/build-manifest.json +4 -4
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +3 -3
- package/dist/web/standalone/.next/required-server-files.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- 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 +1 -1
- 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 +2 -2
- 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 +4 -4
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- 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.js +1 -1
- 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.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.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.js +2 -2
- 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.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.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.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.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.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/experimental/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.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.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.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.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.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.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.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.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.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/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.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.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.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.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.js +2 -2
- 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.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.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.js +2 -2
- 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.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.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.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.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.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.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.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.js +2 -2
- 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.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.js +2 -2
- 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.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.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.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.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 +5 -5
- 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 +5 -5
- 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 +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/page.js +2 -2
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +11 -11
- package/dist/web/standalone/.next/server/chunks/63.js +3 -3
- package/dist/web/standalone/.next/server/chunks/6897.js +1 -1
- 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/middleware.js +2 -2
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/2973.33f26573894b6153.js +2 -0
- package/dist/web/standalone/.next/static/chunks/{8359.e059d86b255fce1c.js → 8359.7eb3bb8f8ecf4c01.js} +2 -2
- package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-752f1e2ebdaa3e45.js +1 -0
- package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-de742b64187e13fe.js → webpack-6a95bc41e0f7ec89.js} +1 -1
- package/dist/web/standalone/.next/static/css/0262768ec1b89d34.css +1 -0
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/server.js +1 -1
- package/dist/welcome-screen.d.ts +0 -7
- package/dist/welcome-screen.js +60 -69
- package/package.json +5 -4
- package/packages/contracts/dist/rpc.test.js +7 -0
- package/packages/contracts/dist/rpc.test.js.map +1 -1
- package/packages/contracts/dist/workflow.d.ts +21 -0
- package/packages/contracts/dist/workflow.d.ts.map +1 -1
- package/packages/contracts/dist/workflow.js +24 -0
- package/packages/contracts/dist/workflow.js.map +1 -1
- package/packages/contracts/src/rpc.test.ts +8 -0
- package/packages/contracts/src/workflow.ts +24 -0
- package/packages/daemon/package.json +2 -2
- package/packages/mcp-server/README.md +14 -3
- package/packages/mcp-server/dist/workflow-tools.d.ts +0 -3
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +80 -0
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +2 -2
- package/packages/mcp-server/src/workflow-tools-parity.test.ts +244 -0
- package/packages/mcp-server/src/workflow-tools.test.ts +22 -0
- package/packages/mcp-server/src/workflow-tools.ts +168 -0
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-ai/dist/index.d.ts +2 -2
- package/packages/pi-ai/dist/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/index.js +1 -1
- package/packages/pi-ai/dist/index.js.map +1 -1
- package/packages/pi-ai/dist/providers/transform-messages.d.ts +11 -0
- package/packages/pi-ai/dist/providers/transform-messages.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/transform-messages.js +20 -0
- package/packages/pi-ai/dist/providers/transform-messages.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/src/index.ts +7 -2
- package/packages/pi-ai/src/providers/transform-messages.ts +24 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +4 -4
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/assistant-message-design.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/assistant-message-design.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/assistant-message-design.test.js +47 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/assistant-message-design.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js +76 -9
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/user-message-design.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/user-message-design.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/user-message-design.test.js +40 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/user-message-design.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.d.ts +0 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.js +30 -29
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.js +10 -3
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.js.map +1 -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 +13 -13
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts +1 -3
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +58 -3
- package/packages/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/diff.d.ts +2 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/diff.js +12 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/diff.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +14 -41
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +0 -1
- 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 +86 -82
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/transcript-design.d.ts +35 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/transcript-design.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/transcript-design.js +152 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/transcript-design.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tui-style-kit.d.ts +16 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tui-style-kit.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tui-style-kit.js +73 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tui-style-kit.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts +1 -1
- 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 +12 -8
- package/packages/pi-coding-agent/dist/modes/interactive/components/user-message.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-highlight.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-highlight.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-highlight.test.js +17 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-highlight.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +105 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +27 -26
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.js +9 -6
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/tests/system-prompt-file-safety.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-file-safety.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-file-safety.test.js +17 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-file-safety.test.js.map +1 -0
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/system-prompt.ts +4 -4
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/assistant-message-design.test.ts +56 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-execution.test.ts +113 -9
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/user-message-design.test.ts +48 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/adaptive-layout.test.ts +10 -3
- package/packages/pi-coding-agent/src/modes/interactive/components/adaptive-layout.ts +43 -42
- package/packages/pi-coding-agent/src/modes/interactive/components/assistant-message.ts +14 -14
- package/packages/pi-coding-agent/src/modes/interactive/components/bash-execution.ts +64 -3
- package/packages/pi-coding-agent/src/modes/interactive/components/diff.ts +13 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +15 -42
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +84 -104
- package/packages/pi-coding-agent/src/modes/interactive/components/transcript-design.ts +196 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tui-style-kit.ts +94 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/user-message.ts +14 -9
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-highlight.test.ts +23 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +106 -1
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +27 -26
- package/packages/pi-coding-agent/src/modes/interactive/tui-mode.test.ts +9 -6
- package/packages/pi-coding-agent/src/tests/system-prompt-file-safety.test.ts +22 -0
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/dist/__tests__/overlay-layout.test.js +14 -1
- package/packages/pi-tui/dist/__tests__/overlay-layout.test.js.map +1 -1
- package/packages/pi-tui/dist/overlay-layout.d.ts.map +1 -1
- package/packages/pi-tui/dist/overlay-layout.js +9 -6
- package/packages/pi-tui/dist/overlay-layout.js.map +1 -1
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +5 -0
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/package.json +1 -1
- package/packages/pi-tui/src/__tests__/overlay-layout.test.ts +20 -1
- package/packages/pi-tui/src/overlay-layout.ts +10 -7
- package/packages/pi-tui/src/tui.ts +6 -0
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/packages/rpc-client/package.json +1 -1
- package/packages/rpc-client/tsconfig.tsbuildinfo +1 -1
- package/pkg/dist/modes/interactive/theme/theme-highlight.test.d.ts +2 -0
- package/pkg/dist/modes/interactive/theme/theme-highlight.test.d.ts.map +1 -0
- package/pkg/dist/modes/interactive/theme/theme-highlight.test.js +17 -0
- package/pkg/dist/modes/interactive/theme/theme-highlight.test.js.map +1 -0
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +105 -1
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.js +27 -26
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/GSD-WORKFLOW.md +3 -1
- package/src/resources/extensions/browser-tools/tools/screenshot.ts +1 -0
- package/src/resources/extensions/browser-tools/tools/zoom.ts +1 -0
- package/src/resources/extensions/cmux/index.ts +6 -0
- package/src/resources/extensions/gsd/auto/contracts.ts +46 -11
- package/src/resources/extensions/gsd/auto/loop-deps.ts +9 -5
- package/src/resources/extensions/gsd/auto/loop.ts +113 -9
- package/src/resources/extensions/gsd/auto/orchestrator.ts +118 -6
- package/src/resources/extensions/gsd/auto/phases.ts +158 -19
- package/src/resources/extensions/gsd/auto/run-unit.ts +69 -4
- package/src/resources/extensions/gsd/auto/session.ts +10 -0
- package/src/resources/extensions/gsd/auto/verification-retry-policy.ts +82 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +230 -183
- package/src/resources/extensions/gsd/auto-dispatch.ts +15 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +201 -138
- package/src/resources/extensions/gsd/auto-prompts.ts +13 -5
- package/src/resources/extensions/gsd/auto-recovery.ts +7 -209
- package/src/resources/extensions/gsd/auto-runtime-state.ts +5 -0
- package/src/resources/extensions/gsd/auto-start.ts +22 -22
- package/src/resources/extensions/gsd/auto-unit-closeout.ts +51 -0
- package/src/resources/extensions/gsd/auto-verification.ts +46 -38
- package/src/resources/extensions/gsd/auto-worktree.ts +8 -0
- package/src/resources/extensions/gsd/auto.ts +411 -106
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +21 -6
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +12 -2
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +5 -8
- package/src/resources/extensions/gsd/bootstrap/subagent-input.ts +16 -6
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +58 -15
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +3 -2
- package/src/resources/extensions/gsd/clean-root-preflight.ts +174 -8
- package/src/resources/extensions/gsd/commands/catalog.ts +4 -1
- package/src/resources/extensions/gsd/commands/handlers/core.ts +25 -1
- package/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts +4 -10
- package/src/resources/extensions/gsd/commands/handlers/parallel.ts +12 -0
- package/src/resources/extensions/gsd/commands-bootstrap.ts +10 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +19 -2
- package/src/resources/extensions/gsd/context-store.ts +120 -1
- package/src/resources/extensions/gsd/db-writer.ts +167 -84
- package/src/resources/extensions/gsd/docs/preferences-reference.md +1 -1
- package/src/resources/extensions/gsd/doctor-git-checks.ts +44 -6
- package/src/resources/extensions/gsd/doctor-types.ts +2 -0
- package/src/resources/extensions/gsd/git-service.ts +2 -0
- package/src/resources/extensions/gsd/gsd-db.ts +7 -23
- package/src/resources/extensions/gsd/health-widget-core.ts +1 -1
- package/src/resources/extensions/gsd/health-widget.ts +6 -10
- package/src/resources/extensions/gsd/journal.ts +2 -0
- package/src/resources/extensions/gsd/knowledge-backfill.ts +164 -0
- package/src/resources/extensions/gsd/knowledge-capture.ts +160 -0
- package/src/resources/extensions/gsd/knowledge-parser.ts +174 -0
- package/src/resources/extensions/gsd/knowledge-projection.ts +241 -0
- package/src/resources/extensions/gsd/markdown-renderer.ts +10 -96
- package/src/resources/extensions/gsd/md-importer.ts +1 -1
- package/src/resources/extensions/gsd/memory-backfill.ts +89 -17
- package/src/resources/extensions/gsd/memory-consolidation-scanner.ts +277 -0
- package/src/resources/extensions/gsd/migrate/command.ts +5 -0
- package/src/resources/extensions/gsd/migrate/preview.ts +10 -0
- package/src/resources/extensions/gsd/migrate/transformer.ts +58 -4
- package/src/resources/extensions/gsd/migrate/writer.ts +14 -1
- package/src/resources/extensions/gsd/native-git-bridge.ts +14 -13
- package/src/resources/extensions/gsd/notification-overlay.ts +50 -46
- package/src/resources/extensions/gsd/parallel-merge.ts +61 -34
- package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +33 -35
- package/src/resources/extensions/gsd/prompts/complete-slice.md +14 -12
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +20 -2
- package/src/resources/extensions/gsd/prompts/discuss.md +20 -2
- package/src/resources/extensions/gsd/prompts/system.md +2 -2
- package/src/resources/extensions/gsd/provider-switch-observer.ts +185 -0
- package/src/resources/extensions/gsd/recovery-classification.ts +18 -1
- package/src/resources/extensions/gsd/session-lock.ts +41 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/completion.ts +172 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/merge-state.ts +337 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/project-md.ts +69 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/roadmap.ts +109 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/sketch-flag.ts +68 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/stale-render.ts +185 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/stale-worker.ts +46 -0
- package/src/resources/extensions/gsd/state-reconciliation/errors.ts +67 -0
- package/src/resources/extensions/gsd/state-reconciliation/index.ts +142 -0
- package/src/resources/extensions/gsd/state-reconciliation/registry.ts +27 -0
- package/src/resources/extensions/gsd/state-reconciliation/spawn-gate.ts +60 -0
- package/src/resources/extensions/gsd/state-reconciliation/types.ts +83 -0
- package/src/resources/extensions/gsd/state-reconciliation.ts +21 -53
- package/src/resources/extensions/gsd/templates/knowledge.md +2 -2
- package/src/resources/extensions/gsd/tests/artifact-retry-cap.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +99 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +729 -176
- package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +408 -4
- package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +292 -4
- package/src/resources/extensions/gsd/tests/auto-runtime-state.test.ts +20 -5
- package/src/resources/extensions/gsd/tests/auto-start-orphan-bootstrap.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/auto-unit-closeout.test.ts +68 -0
- package/src/resources/extensions/gsd/tests/brief-command.test.ts +89 -0
- package/src/resources/extensions/gsd/tests/browser-tools-compatibility-declarations.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/clean-root-preflight.test.ts +107 -2
- package/src/resources/extensions/gsd/tests/closeout-git-deferral.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/context-store-decisions-from-memories.test.ts +312 -0
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +28 -1
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +13 -8
- package/src/resources/extensions/gsd/tests/decisions-projection-from-memories.test.ts +453 -0
- package/src/resources/extensions/gsd/tests/decisions-stop-table-writes.test.ts +348 -0
- package/src/resources/extensions/gsd/tests/deep-project-auto-loop.test.ts +20 -2
- package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/evidence-cross-ref.test.ts +38 -0
- package/src/resources/extensions/gsd/tests/freeform-decisions.test.ts +8 -4
- package/src/resources/extensions/gsd/tests/gsd-tools.test.ts +11 -7
- package/src/resources/extensions/gsd/tests/header-renderer.test.ts +40 -0
- package/src/resources/extensions/gsd/tests/headless-milestone-parity.test.ts +10 -0
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +14 -4
- package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +26 -0
- package/src/resources/extensions/gsd/tests/integration/integration-lifecycle.test.ts +13 -5
- package/src/resources/extensions/gsd/tests/integration/integration-proof.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/integration/migrate-command.test.ts +48 -3
- package/src/resources/extensions/gsd/tests/integration/parallel-merge.test.ts +116 -24
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +0 -1
- package/src/resources/extensions/gsd/tests/knowledge-backfill-projection.test.ts +323 -0
- package/src/resources/extensions/gsd/tests/knowledge-capture.test.ts +242 -0
- package/src/resources/extensions/gsd/tests/knowledge.test.ts +47 -2
- package/src/resources/extensions/gsd/tests/load-knowledge-block-rules-only.test.ts +209 -0
- package/src/resources/extensions/gsd/tests/markdown-renderer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-consolidation-scanner.test.ts +316 -0
- package/src/resources/extensions/gsd/tests/merge-conflict-stops-loop.test.ts +46 -11
- package/src/resources/extensions/gsd/tests/migrate-transformer.test.ts +5 -1
- package/src/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +6 -1
- package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +78 -41
- package/src/resources/extensions/gsd/tests/notifications-handler.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/originalbase-path-comparison.test.ts +12 -217
- package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +38 -6
- package/src/resources/extensions/gsd/tests/plan-milestone-sketch-render.test.ts +157 -0
- package/src/resources/extensions/gsd/tests/post-exec-retry-bypass.test.ts +81 -3
- package/src/resources/extensions/gsd/tests/progressive-planning.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +32 -1
- package/src/resources/extensions/gsd/tests/provider-switch-observer.test.ts +252 -0
- package/src/resources/extensions/gsd/tests/resume-dispatch-worktree.test.ts +7 -3
- package/src/resources/extensions/gsd/tests/runtime-invariant-modules.test.ts +6 -3
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +16 -4
- package/src/resources/extensions/gsd/tests/session-switch-abort-misclassification.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +71 -58
- package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +952 -0
- package/src/resources/extensions/gsd/tests/token-tool-gating.test.ts +4 -0
- package/src/resources/extensions/gsd/tests/tui-header-lifecycle.test.ts +121 -1
- package/src/resources/extensions/gsd/tests/tui-render-kit.test.ts +66 -0
- package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +21 -0
- package/src/resources/extensions/gsd/tests/verification-retry-policy.test.ts +83 -0
- package/src/resources/extensions/gsd/tests/verification-verdict.test.ts +78 -0
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +6 -0
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +158 -58
- package/src/resources/extensions/gsd/tests/worktree-lifecycle.test.ts +597 -118
- package/src/resources/extensions/gsd/tests/worktree-telemetry.test.ts +59 -2
- package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +34 -0
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +135 -0
- package/src/resources/extensions/gsd/tui/render-kit.ts +109 -0
- package/src/resources/extensions/gsd/unit-context-manifest.ts +35 -2
- package/src/resources/extensions/gsd/verification-verdict.ts +47 -0
- package/src/resources/extensions/gsd/watch/header-renderer.ts +121 -79
- package/src/resources/extensions/gsd/watch/splash-palette.ts +11 -0
- package/src/resources/extensions/gsd/workflow-logger.ts +4 -0
- package/src/resources/extensions/gsd/workflow-mcp.ts +2 -2
- package/src/resources/extensions/gsd/worktree-lifecycle.ts +1171 -526
- package/src/resources/extensions/gsd/worktree-telemetry.ts +7 -2
- package/src/resources/extensions/subagent/index.ts +567 -103
- package/src/resources/extensions/subagent/launch.ts +131 -0
- package/src/resources/extensions/subagent/run-store.ts +218 -0
- package/src/resources/extensions/subagent/tests/launch.test.ts +115 -0
- package/src/resources/extensions/subagent/tests/run-store.test.ts +111 -0
- package/src/resources/extensions/visual-brief/artifact-policy.ts +41 -0
- package/src/resources/extensions/visual-brief/extension-manifest.json +8 -0
- package/src/resources/extensions/visual-brief/index.ts +8 -0
- package/src/resources/extensions/visual-brief/page-contract.ts +134 -0
- package/src/resources/extensions/visual-brief/prompts.ts +147 -0
- package/src/resources/extensions/visual-brief/tests/visual-brief.test.ts +172 -0
- package/dist/web/standalone/.next/static/chunks/2556.0527fea66e123b7f.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/page-200592a7f3baf579.js +0 -1
- package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
- package/dist/web/standalone/.next/static/css/54ec2745c1da488b.css +0 -1
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +0 -1544
- /package/dist/web/standalone/.next/static/{drLMkgfHQ8lzS229_HWYR → Qgr2B_MRhPxC0z8fwv4vT}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{drLMkgfHQ8lzS229_HWYR → Qgr2B_MRhPxC0z8fwv4vT}/_ssgManifest.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
1
|
+
// Project/App: GSD-2
|
|
2
|
+
// File Purpose: Handles /gsd notifications commands and opens the notification history overlay.
|
|
3
3
|
import { readNotifications, clearNotifications, getUnreadCount, suppressPersistence, unsuppressPersistence, } from "../../notification-store.js";
|
|
4
|
-
import { GSDNotificationOverlay } from "../../notification-overlay.js";
|
|
4
|
+
import { GSDNotificationOverlay, notificationOverlayOptions } from "../../notification-overlay.js";
|
|
5
5
|
const MAX_INLINE_ENTRIES = 40;
|
|
6
6
|
function severityIcon(severity) {
|
|
7
7
|
switch (severity) {
|
|
@@ -79,13 +79,7 @@ export async function handleNotificationsCommand(args, ctx, pi) {
|
|
|
79
79
|
try {
|
|
80
80
|
const result = await ctx.ui.custom((tui, theme, _kb, done) => new GSDNotificationOverlay(tui, theme, () => done(true)), {
|
|
81
81
|
overlay: true,
|
|
82
|
-
overlayOptions:
|
|
83
|
-
width: "80%",
|
|
84
|
-
minWidth: 60,
|
|
85
|
-
maxHeight: "88%",
|
|
86
|
-
anchor: "center",
|
|
87
|
-
backdrop: true,
|
|
88
|
-
},
|
|
82
|
+
overlayOptions: notificationOverlayOptions(),
|
|
89
83
|
});
|
|
90
84
|
if (result !== undefined) {
|
|
91
85
|
return true;
|
|
@@ -2,6 +2,7 @@ import { getOrchestratorState, getWorkerStatuses, isParallelActive, pauseWorker,
|
|
|
2
2
|
import { formatEligibilityReport } from "../../parallel-eligibility.js";
|
|
3
3
|
import { formatMergeResults, mergeAllCompleted, mergeCompletedMilestone } from "../../parallel-merge.js";
|
|
4
4
|
import { loadEffectiveGSDPreferences, resolveParallelConfig } from "../../preferences.js";
|
|
5
|
+
import { reconcileBeforeSpawn } from "../../state-reconciliation.js";
|
|
5
6
|
import { projectRoot } from "../context.js";
|
|
6
7
|
function emitParallelMessage(pi, content) {
|
|
7
8
|
pi.sendMessage({ customType: "gsd-parallel", content, display: true });
|
|
@@ -26,6 +27,14 @@ export async function handleParallelCommand(trimmed, _ctx, pi) {
|
|
|
26
27
|
emitParallelMessage(pi, `${report}\n\nNo milestones are eligible for parallel execution.`);
|
|
27
28
|
return true;
|
|
28
29
|
}
|
|
30
|
+
// ADR-017 #5707: reconcile before spawning so workers don't independently
|
|
31
|
+
// race on the same drift. Failures abort the spawn with an actionable
|
|
32
|
+
// user-visible message.
|
|
33
|
+
const gate = await reconcileBeforeSpawn(root);
|
|
34
|
+
if (!gate.ok) {
|
|
35
|
+
emitParallelMessage(pi, `${report}\n\nParallel orchestration aborted before spawn — ${gate.reason}`);
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
29
38
|
const result = await startParallel(root, candidates.eligible.map((candidate) => candidate.milestoneId), loaded?.preferences);
|
|
30
39
|
const lines = ["Parallel orchestration started.", `Workers: ${result.started.join(", ")}`];
|
|
31
40
|
if (result.errors.length > 0) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { importExtensionModule } from "@gsd/pi-coding-agent";
|
|
2
|
+
import { VISUAL_BRIEF_MODES } from "../visual-brief/prompts.js";
|
|
2
3
|
const TOP_LEVEL_SUBCOMMANDS = [
|
|
3
4
|
{ cmd: "help", desc: "Categorized command reference with descriptions" },
|
|
4
5
|
{ cmd: "next", desc: "Explicit step mode (same as /gsd)" },
|
|
@@ -7,6 +8,7 @@ const TOP_LEVEL_SUBCOMMANDS = [
|
|
|
7
8
|
{ cmd: "pause", desc: "Pause auto-mode (preserves state, /gsd auto to resume)" },
|
|
8
9
|
{ cmd: "status", desc: "Progress dashboard" },
|
|
9
10
|
{ cmd: "visualize", desc: "Open workflow visualizer" },
|
|
11
|
+
{ cmd: "brief", desc: "Generate a visual HTML brief" },
|
|
10
12
|
{ cmd: "queue", desc: "Queue and reorder future milestones" },
|
|
11
13
|
{ cmd: "quick", desc: "Execute a quick task without full planning overhead" },
|
|
12
14
|
{ cmd: "discuss", desc: "Discuss architecture and decisions" },
|
|
@@ -75,6 +77,9 @@ function getGsdArgumentCompletions(prefix) {
|
|
|
75
77
|
{ cmd: "--dry-run", desc: "Preview next step without executing" },
|
|
76
78
|
], "next");
|
|
77
79
|
}
|
|
80
|
+
if (parts[0] === "brief" && parts.length <= 2) {
|
|
81
|
+
return filterStartsWith(partial, VISUAL_BRIEF_MODES.map((mode) => ({ cmd: mode.mode, desc: mode.description })), "brief");
|
|
82
|
+
}
|
|
78
83
|
if ((parts[0] === "new-project" || parts[0] === "new-milestone") && parts.length <= 2) {
|
|
79
84
|
return filterStartsWith(partial, [
|
|
80
85
|
{ cmd: "--deep", desc: "Enable deep planning mode (staged project-level discovery)" },
|
|
@@ -303,8 +303,21 @@ export async function handleKnowledge(args, ctx) {
|
|
|
303
303
|
const scope = state.activeMilestone?.id
|
|
304
304
|
? `${state.activeMilestone.id}${state.activeSlice ? `/${state.activeSlice.id}` : ""}`
|
|
305
305
|
: "global";
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
// ADR-013 Stage 2c: Patterns and Lessons land in the memories table; the
|
|
307
|
+
// next session-start projection render emits them back into KNOWLEDGE.md.
|
|
308
|
+
// Rules stay file-canonical per ADR-013 line 39 — Rules are not migrated.
|
|
309
|
+
if (type === "rule") {
|
|
310
|
+
await appendKnowledge(basePath, type, entryText, scope);
|
|
311
|
+
ctx.ui.notify(`Added rule to KNOWLEDGE.md: "${entryText}"`, "success");
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
const { captureKnowledgeEntry } = await import("./knowledge-capture.js");
|
|
315
|
+
const { id, written } = captureKnowledgeEntry(basePath, type, entryText, scope);
|
|
316
|
+
if (!written) {
|
|
317
|
+
ctx.ui.notify(`Could not persist ${type} — see logs for details.`, "error");
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
ctx.ui.notify(`Captured ${type} ${id} to memories; KNOWLEDGE.md will render it on next session start.`, "success");
|
|
308
321
|
}
|
|
309
322
|
export async function handleRunHook(args, ctx, pi) {
|
|
310
323
|
const parts = args.trim().split(/\s+/);
|
|
@@ -47,6 +47,118 @@ export function queryDecisions(opts) {
|
|
|
47
47
|
return [];
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Internal: shared core for the two memory-sourced decision queries. Reads
|
|
52
|
+
* memory rows tagged with `sourceDecisionId` and reconstructs `Decision[]`
|
|
53
|
+
* from their `structured_fields` JSON.
|
|
54
|
+
*
|
|
55
|
+
* @param includeSuperseded — when false, drops rows whose
|
|
56
|
+
* `structured_fields.superseded_by` is non-null. The supersedes-chain is
|
|
57
|
+
* captured by the backfill (`memory-backfill.ts`) and kept in sync by
|
|
58
|
+
* the backfill's drift auto-heal pass.
|
|
59
|
+
*/
|
|
60
|
+
function readDecisionsFromMemories(opts, includeSuperseded) {
|
|
61
|
+
if (!isDbAvailable())
|
|
62
|
+
return [];
|
|
63
|
+
const adapter = _getAdapter();
|
|
64
|
+
if (!adapter)
|
|
65
|
+
return [];
|
|
66
|
+
try {
|
|
67
|
+
const clauses = [
|
|
68
|
+
"category = 'architecture'",
|
|
69
|
+
"structured_fields LIKE '%\"sourceDecisionId\":\"%'",
|
|
70
|
+
];
|
|
71
|
+
const params = {};
|
|
72
|
+
if (opts?.milestoneId) {
|
|
73
|
+
// when_context is a free-text JSON value; substring match preserves the
|
|
74
|
+
// semantics of `when_context LIKE '%milestoneId%'` on the legacy table.
|
|
75
|
+
clauses.push("json_extract(structured_fields, '$.when_context') LIKE :milestone_pattern");
|
|
76
|
+
params[':milestone_pattern'] = `%${opts.milestoneId}%`;
|
|
77
|
+
}
|
|
78
|
+
if (opts?.scope) {
|
|
79
|
+
// Stage 1 used `json_extract` in main (post-merge); preserve that
|
|
80
|
+
// style here. Exact equality on the JSON value avoids the prefix
|
|
81
|
+
// collision risk LIKE patterns had (scope=M001 vs scope=M001-S01).
|
|
82
|
+
clauses.push("json_extract(structured_fields, '$.scope') = :scope");
|
|
83
|
+
params[':scope'] = opts.scope;
|
|
84
|
+
}
|
|
85
|
+
const sql = `SELECT seq, structured_fields FROM memories WHERE ${clauses.join(' AND ')} ORDER BY seq`;
|
|
86
|
+
const rows = adapter.prepare(sql).all(params);
|
|
87
|
+
const decisions = [];
|
|
88
|
+
for (const row of rows) {
|
|
89
|
+
const seq = row['seq'];
|
|
90
|
+
const sfRaw = row['structured_fields'];
|
|
91
|
+
if (!sfRaw)
|
|
92
|
+
continue;
|
|
93
|
+
let sf;
|
|
94
|
+
try {
|
|
95
|
+
sf = JSON.parse(sfRaw);
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
const sourceId = sf['sourceDecisionId'];
|
|
101
|
+
if (typeof sourceId !== 'string' || sourceId.length === 0)
|
|
102
|
+
continue;
|
|
103
|
+
// Decision-level superseded status lives in structured_fields.superseded_by
|
|
104
|
+
// (written by mirrorDecisionToMemory / memory-backfill.ts). The top-level
|
|
105
|
+
// memories.superseded_by column is intentionally never set for decision mirrors,
|
|
106
|
+
// so active-only filtering must be done here in the JS loop.
|
|
107
|
+
const supersededBy = typeof sf['superseded_by'] === 'string' ? sf['superseded_by'] : null;
|
|
108
|
+
if (!includeSuperseded && supersededBy)
|
|
109
|
+
continue;
|
|
110
|
+
decisions.push({
|
|
111
|
+
seq,
|
|
112
|
+
id: sourceId,
|
|
113
|
+
when_context: typeof sf['when_context'] === 'string' ? sf['when_context'] : '',
|
|
114
|
+
scope: typeof sf['scope'] === 'string' ? sf['scope'] : '',
|
|
115
|
+
decision: typeof sf['decision'] === 'string' ? sf['decision'] : '',
|
|
116
|
+
choice: typeof sf['choice'] === 'string' ? sf['choice'] : '',
|
|
117
|
+
rationale: typeof sf['rationale'] === 'string' ? sf['rationale'] : '',
|
|
118
|
+
revisable: typeof sf['revisable'] === 'string' ? sf['revisable'] : '',
|
|
119
|
+
made_by: (typeof sf['made_by'] === 'string' ? sf['made_by'] : 'agent'),
|
|
120
|
+
superseded_by: supersededBy,
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
return decisions;
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return [];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* ADR-013 Phase 6 cutover (Stage 1): read **active** decisions from the
|
|
131
|
+
* `memories` table instead of the legacy `decisions` table. Returns the
|
|
132
|
+
* same `Decision[]` shape as `queryDecisions` so downstream formatters
|
|
133
|
+
* work unchanged.
|
|
134
|
+
*
|
|
135
|
+
* Filter semantics match `queryDecisions` exactly:
|
|
136
|
+
* - active only (skips rows where `structured_fields.superseded_by` is set)
|
|
137
|
+
* - `milestoneId`: substring match on `structured_fields.when_context`
|
|
138
|
+
* - `scope`: exact match on `structured_fields.scope`
|
|
139
|
+
*
|
|
140
|
+
* Used by the prompt-inline path (`inlineDecisionsFromDb` in
|
|
141
|
+
* `auto-prompts.ts`). For the projection regen (which renders superseded
|
|
142
|
+
* rows too), see `getAllDecisionsFromMemories`.
|
|
143
|
+
*/
|
|
144
|
+
export function queryDecisionsFromMemories(opts) {
|
|
145
|
+
return readDecisionsFromMemories(opts, /* includeSuperseded */ false);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* ADR-013 Phase 6 cutover (Stage 2a): read **all** decisions (active +
|
|
149
|
+
* superseded) from the `memories` table. Used by the DECISIONS.md
|
|
150
|
+
* projection regen in `saveDecisionToDb`, which must render the full
|
|
151
|
+
* supersedes-chain for the canonical register format.
|
|
152
|
+
*
|
|
153
|
+
* Equivalent to `SELECT * FROM decisions ORDER BY seq` over the legacy
|
|
154
|
+
* table — but sourced from memories so the legacy table can be retired
|
|
155
|
+
* in Stage 3. Includes `superseded_by` reconstructed from
|
|
156
|
+
* `structured_fields.superseded_by` (populated by the backfill's drift
|
|
157
|
+
* auto-heal pass).
|
|
158
|
+
*/
|
|
159
|
+
export function getAllDecisionsFromMemories() {
|
|
160
|
+
return readDecisionsFromMemories(undefined, /* includeSuperseded */ true);
|
|
161
|
+
}
|
|
50
162
|
/**
|
|
51
163
|
* Query active (non-superseded) requirements with optional filters.
|
|
52
164
|
* - milestoneId: combined with sliceId for precise filtering (e.g. %M005/S01%)
|
|
@@ -210,16 +210,62 @@ export async function nextDecisionId() {
|
|
|
210
210
|
return 'D001';
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
/**
|
|
214
|
-
|
|
213
|
+
/**
|
|
214
|
+
* ADR-013 Stage 3: compute the next `D###` identifier across both the legacy
|
|
215
|
+
* `decisions` table AND the `memories.structured_fields.sourceDecisionId`
|
|
216
|
+
* surface. Returns the max numeric suffix from either side + 1, three-digit
|
|
217
|
+
* padded.
|
|
218
|
+
*
|
|
219
|
+
* Used by `saveDecisionToDb` once writes to the `decisions` table stop —
|
|
220
|
+
* new decisions live only in memories, but historical IDs sit in both
|
|
221
|
+
* places during the cutover bake. The cross-surface max keeps IDs
|
|
222
|
+
* monotonic and avoids collisions on the next save.
|
|
223
|
+
*/
|
|
224
|
+
function nextDecisionIdAcrossSurfaces(adapter) {
|
|
215
225
|
if (!adapter)
|
|
216
226
|
return 'D001';
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
227
|
+
let maxNum = 0;
|
|
228
|
+
// Legacy table — best-effort.
|
|
229
|
+
try {
|
|
230
|
+
const row = adapter
|
|
231
|
+
.prepare('SELECT MAX(CAST(SUBSTR(id, 2) AS INTEGER)) as max_num FROM decisions')
|
|
232
|
+
.get();
|
|
233
|
+
const candidate = row ? row['max_num'] : null;
|
|
234
|
+
if (typeof candidate === 'number' && Number.isFinite(candidate)) {
|
|
235
|
+
maxNum = Math.max(maxNum, candidate);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
// fall through to memory-only
|
|
240
|
+
}
|
|
241
|
+
// Memory surface: scan structuredFields.sourceDecisionId for D### values.
|
|
242
|
+
// SQLite LIKE on the JSON-stringified field is sufficient — rows tagged
|
|
243
|
+
// with sourceDecisionId are bounded by the decisions count.
|
|
244
|
+
try {
|
|
245
|
+
const rows = adapter
|
|
246
|
+
.prepare("SELECT structured_fields FROM memories WHERE structured_fields LIKE '%\"sourceDecisionId\":\"D%'")
|
|
247
|
+
.all();
|
|
248
|
+
for (const row of rows) {
|
|
249
|
+
if (!row.structured_fields)
|
|
250
|
+
continue;
|
|
251
|
+
let sf;
|
|
252
|
+
try {
|
|
253
|
+
sf = JSON.parse(row.structured_fields);
|
|
254
|
+
}
|
|
255
|
+
catch {
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
const sourceId = sf['sourceDecisionId'];
|
|
259
|
+
if (typeof sourceId !== 'string' || !sourceId.startsWith('D'))
|
|
260
|
+
continue;
|
|
261
|
+
const num = parseInt(sourceId.slice(1), 10);
|
|
262
|
+
if (Number.isFinite(num) && num > maxNum)
|
|
263
|
+
maxNum = num;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
catch {
|
|
267
|
+
// best-effort
|
|
268
|
+
}
|
|
223
269
|
const next = maxNum + 1;
|
|
224
270
|
return `D${String(next).padStart(3, '0')}`;
|
|
225
271
|
}
|
|
@@ -376,38 +422,55 @@ export async function saveDecisionToDb(fields, basePath) {
|
|
|
376
422
|
try {
|
|
377
423
|
const db = await import('./gsd-db.js');
|
|
378
424
|
const adapter = db._getAdapter();
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
425
|
+
const normalized = {
|
|
426
|
+
...fields,
|
|
427
|
+
when_context: fields.when_context ?? '',
|
|
428
|
+
revisable: fields.revisable ?? 'Yes',
|
|
429
|
+
made_by: fields.made_by ?? 'agent',
|
|
430
|
+
source: fields.source ?? 'discussion',
|
|
431
|
+
};
|
|
432
|
+
// ADR-013 Stage 3 (destructive): writes to the `decisions` table stop
|
|
433
|
+
// here. New decisions live only in the `memories` table; the projection
|
|
434
|
+
// regen below sources from memories (Stage 2a). The decisions table
|
|
435
|
+
// remains for backwards-compat reads (queryDecisions, md-importer,
|
|
436
|
+
// commands-inspect, workflow-manifest) until #5756 drops it.
|
|
437
|
+
//
|
|
438
|
+
// Reversal: a code revert of this change restores the upsertDecision
|
|
439
|
+
// call. Memory rows written between merge and revert stay durable; the
|
|
440
|
+
// legacy table simply doesn't grow during the cutover window.
|
|
441
|
+
const id = nextDecisionIdAcrossSurfaces(adapter);
|
|
442
|
+
// The mirror-to-memories write is what persists the new decision. Must
|
|
443
|
+
// run before the projection regen — the regen sources from memories
|
|
444
|
+
// (Stage 2a) and would otherwise miss the just-saved decision. Pass
|
|
445
|
+
// the normalized field set so defaults (revisable, made_by, source)
|
|
446
|
+
// are recorded on the memory row.
|
|
447
|
+
await mirrorDecisionToMemory(id, normalized);
|
|
448
|
+
// Fetch all decisions (including superseded for the full register).
|
|
449
|
+
// ADR-013 Stage 2a: source from the `memories` table. The Phase 5
|
|
450
|
+
// dual-write keeps memories in sync with each decision save; the backfill
|
|
451
|
+
// (memory-backfill.ts) absorbs the historical chain and drift-heals
|
|
452
|
+
// superseded_by on every session start.
|
|
453
|
+
const { getAllDecisionsFromMemories } = await import('./context-store.js');
|
|
454
|
+
let allDecisions = getAllDecisionsFromMemories();
|
|
455
|
+
if (!allDecisions.some(d => d.id === id)) {
|
|
456
|
+
logWarning('projection', 'just-saved decision missing from memories after mirror; injecting fallback for projection', {
|
|
457
|
+
fn: 'saveDecisionToDb',
|
|
458
|
+
decisionId: id,
|
|
392
459
|
});
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
revisable: row['revisable'],
|
|
408
|
-
made_by: row['made_by'] ?? 'agent',
|
|
409
|
-
superseded_by: row['superseded_by'] ?? null,
|
|
410
|
-
}));
|
|
460
|
+
const nextSeq = allDecisions.reduce((max, d) => Math.max(max, d.seq ?? 0), 0) + 1;
|
|
461
|
+
const fallback = {
|
|
462
|
+
seq: nextSeq,
|
|
463
|
+
id,
|
|
464
|
+
when_context: normalized.when_context,
|
|
465
|
+
scope: normalized.scope,
|
|
466
|
+
decision: normalized.decision,
|
|
467
|
+
choice: normalized.choice,
|
|
468
|
+
rationale: normalized.rationale,
|
|
469
|
+
revisable: normalized.revisable,
|
|
470
|
+
made_by: normalized.made_by,
|
|
471
|
+
superseded_by: null,
|
|
472
|
+
};
|
|
473
|
+
allDecisions = [...allDecisions, fallback];
|
|
411
474
|
}
|
|
412
475
|
const filePath = resolveGsdRootFile(basePath, 'DECISIONS');
|
|
413
476
|
// Check if existing DECISIONS.md has freeform (non-table) content.
|
|
@@ -460,51 +523,6 @@ export async function saveDecisionToDb(fields, basePath) {
|
|
|
460
523
|
invalidateStateCache();
|
|
461
524
|
clearPathCache();
|
|
462
525
|
clearParseCache();
|
|
463
|
-
// ADR-013 dual-write: keep the memory store in sync with every decision
|
|
464
|
-
// persisted via the legacy gsd_save_decision path. Without this, prompts
|
|
465
|
-
// that still call gsd_save_decision (discuss.md, plan-milestone.md,
|
|
466
|
-
// plan-slice.md, et al.) would create decisions rows invisible to
|
|
467
|
-
// memory_query and loadMemoryBlock.
|
|
468
|
-
// Best-effort — never throw, never roll back the decision on failure.
|
|
469
|
-
try {
|
|
470
|
-
const { createMemory } = await import('./memory-store.js');
|
|
471
|
-
const decisionText = (fields.decision ?? '').trim();
|
|
472
|
-
const choiceText = (fields.choice ?? '').trim();
|
|
473
|
-
const rationaleText = (fields.rationale ?? '').trim();
|
|
474
|
-
const contentParts = [];
|
|
475
|
-
if (decisionText)
|
|
476
|
-
contentParts.push(decisionText);
|
|
477
|
-
if (choiceText)
|
|
478
|
-
contentParts.push(`Chose: ${choiceText}.`);
|
|
479
|
-
if (rationaleText)
|
|
480
|
-
contentParts.push(`Rationale: ${rationaleText}.`);
|
|
481
|
-
const content = contentParts.join(' ').slice(0, 600);
|
|
482
|
-
if (content) {
|
|
483
|
-
createMemory({
|
|
484
|
-
category: 'architecture',
|
|
485
|
-
content,
|
|
486
|
-
scope: fields.scope || 'project',
|
|
487
|
-
confidence: 0.85,
|
|
488
|
-
structuredFields: {
|
|
489
|
-
sourceDecisionId: id,
|
|
490
|
-
when_context: fields.when_context ?? '',
|
|
491
|
-
scope: fields.scope,
|
|
492
|
-
decision: fields.decision,
|
|
493
|
-
choice: fields.choice,
|
|
494
|
-
rationale: fields.rationale,
|
|
495
|
-
made_by: fields.made_by ?? 'agent',
|
|
496
|
-
revisable: fields.revisable ?? '',
|
|
497
|
-
},
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
catch (mirrorErr) {
|
|
502
|
-
logError('manifest', 'memory-store mirror write failed (non-fatal)', {
|
|
503
|
-
fn: 'saveDecisionToDb',
|
|
504
|
-
decisionId: id,
|
|
505
|
-
error: String(mirrorErr.message),
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
526
|
return { id };
|
|
509
527
|
}
|
|
510
528
|
catch (err) {
|
|
@@ -515,6 +533,54 @@ export async function saveDecisionToDb(fields, basePath) {
|
|
|
515
533
|
release();
|
|
516
534
|
}
|
|
517
535
|
}
|
|
536
|
+
/**
|
|
537
|
+
* ADR-013 dual-write — mirror a freshly-saved decision into the `memories`
|
|
538
|
+
* table so the memory store remains the single source of truth for the
|
|
539
|
+
* DECISIONS.md projection (Stage 2a) and for prompt-inline reads (Stage 1).
|
|
540
|
+
*
|
|
541
|
+
* Best-effort mirror: logs failures without throwing to avoid blocking saves.
|
|
542
|
+
* Caller invokes this AFTER the decisions-table write completes and
|
|
543
|
+
* BEFORE the projection regen — the regen sources from memories and would
|
|
544
|
+
* otherwise miss the just-saved decision.
|
|
545
|
+
*/
|
|
546
|
+
async function mirrorDecisionToMemory(id, normalizedFields) {
|
|
547
|
+
try {
|
|
548
|
+
const { createMemory } = await import('./memory-store.js');
|
|
549
|
+
const { synthesizeDecisionMemoryContent } = await import('./memory-backfill.js');
|
|
550
|
+
const content = synthesizeDecisionMemoryContent(normalizedFields);
|
|
551
|
+
if (!content)
|
|
552
|
+
return false;
|
|
553
|
+
createMemory({
|
|
554
|
+
category: 'architecture',
|
|
555
|
+
content,
|
|
556
|
+
scope: normalizedFields.scope || 'project',
|
|
557
|
+
confidence: 0.85,
|
|
558
|
+
structuredFields: {
|
|
559
|
+
sourceDecisionId: id,
|
|
560
|
+
when_context: normalizedFields.when_context,
|
|
561
|
+
scope: normalizedFields.scope,
|
|
562
|
+
decision: normalizedFields.decision,
|
|
563
|
+
choice: normalizedFields.choice,
|
|
564
|
+
rationale: normalizedFields.rationale,
|
|
565
|
+
made_by: normalizedFields.made_by,
|
|
566
|
+
revisable: normalizedFields.revisable,
|
|
567
|
+
// New decisions are always written as active; md-importer can later
|
|
568
|
+
// set superseded_by on the source decision row, and the backfill's
|
|
569
|
+
// drift auto-heal pass propagates that update to this memory.
|
|
570
|
+
superseded_by: null,
|
|
571
|
+
},
|
|
572
|
+
});
|
|
573
|
+
return true;
|
|
574
|
+
}
|
|
575
|
+
catch (mirrorErr) {
|
|
576
|
+
logError('manifest', 'memory-store mirror write failed', {
|
|
577
|
+
fn: 'saveDecisionToDb',
|
|
578
|
+
decisionId: id,
|
|
579
|
+
error: String(mirrorErr.message),
|
|
580
|
+
});
|
|
581
|
+
return false;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
518
584
|
/**
|
|
519
585
|
* Extract a milestone/slice reference from a deferral decision.
|
|
520
586
|
*
|
|
@@ -100,7 +100,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea
|
|
|
100
100
|
|
|
101
101
|
- `skill_rules`: situational rules with a human-readable `when` trigger and one or more of `use`, `prefer`, or `avoid`.
|
|
102
102
|
|
|
103
|
-
- `custom_instructions`: extra durable instructions related to skill use. For operational project knowledge
|
|
103
|
+
- `custom_instructions`: extra durable instructions related to skill use. For operational project knowledge, use `.gsd/KNOWLEDGE.md` instead. Rules are file-canonical; patterns and lessons are persisted to the `memories` table and projected back into `KNOWLEDGE.md` on the next session start.
|
|
104
104
|
|
|
105
105
|
- `language`: preferred response language for all GSD interactions. Accepts any language name or code — `"Chinese"`, `"zh"`, `"German"`, `"de"`, `"日本語"`, etc. When set, GSD injects "Always respond in \<language\>" into every agent's system prompt, including after `/clear`. Quickest way to set it: `/gsd language <name>`. To clear: `/gsd language off`.
|
|
106
106
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// GSD-2 doctor git health checks
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
1
3
|
import { existsSync, readdirSync, realpathSync, rmSync, statSync } from "node:fs";
|
|
2
4
|
import { join, sep } from "node:path";
|
|
3
5
|
import { loadFile } from "./files.js";
|
|
@@ -48,6 +50,23 @@ function isSameOrNestedPath(candidate, container) {
|
|
|
48
50
|
return normalizedCandidate === normalizedContainer ||
|
|
49
51
|
normalizedCandidate.startsWith(`${normalizedContainer}/`);
|
|
50
52
|
}
|
|
53
|
+
function getSnapshotDiffCheckFailure(basePath) {
|
|
54
|
+
const failures = [];
|
|
55
|
+
for (const args of [["--cached"], []]) {
|
|
56
|
+
const result = spawnSync("git", ["diff", "--check", ...args], {
|
|
57
|
+
cwd: basePath,
|
|
58
|
+
encoding: "utf-8",
|
|
59
|
+
});
|
|
60
|
+
if (result.status === 0)
|
|
61
|
+
continue;
|
|
62
|
+
const output = [result.stdout, result.stderr, result.error?.message]
|
|
63
|
+
.filter(Boolean)
|
|
64
|
+
.join("\n")
|
|
65
|
+
.trim();
|
|
66
|
+
failures.push(output || `git diff --check ${args.join(" ")} failed`);
|
|
67
|
+
}
|
|
68
|
+
return failures.length > 0 ? failures.join("\n") : null;
|
|
69
|
+
}
|
|
51
70
|
async function isCompletedMilestoneTerminal(basePath, milestoneId) {
|
|
52
71
|
const summaryPath = resolveMilestoneFile(basePath, milestoneId, "SUMMARY");
|
|
53
72
|
if (!summaryPath)
|
|
@@ -401,16 +420,32 @@ export async function checkGitHealth(basePath, issues, fixesApplied, shouldFix,
|
|
|
401
420
|
message: `Uncommitted changes detected with no commit in ${mins} minute${mins === 1 ? "" : "s"} (threshold: ${thresholdMinutes}m). Snapshotting tracked files.`,
|
|
402
421
|
fixable: true,
|
|
403
422
|
});
|
|
423
|
+
const diffCheckFailure = getSnapshotDiffCheckFailure(basePath);
|
|
424
|
+
if (diffCheckFailure) {
|
|
425
|
+
issues.push({
|
|
426
|
+
severity: "error",
|
|
427
|
+
code: "conflict_markers_in_tracked_files",
|
|
428
|
+
scope: "project",
|
|
429
|
+
unitId: "project",
|
|
430
|
+
message: `Cannot create gsd snapshot: tracked changes contain conflict markers or whitespace errors. Resolve conflicts manually before auto-mode can proceed.\n${diffCheckFailure}`,
|
|
431
|
+
fixable: false,
|
|
432
|
+
});
|
|
433
|
+
}
|
|
404
434
|
if (shouldFix("stale_uncommitted_changes")) {
|
|
405
435
|
try {
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
const result = nativeCommit(basePath, commitMsg);
|
|
409
|
-
if (result) {
|
|
410
|
-
fixesApplied.push(`created gsd snapshot after ${mins}m of uncommitted changes`);
|
|
436
|
+
if (diffCheckFailure) {
|
|
437
|
+
fixesApplied.push("gsd snapshot skipped - conflict markers detected in tracked files");
|
|
411
438
|
}
|
|
412
439
|
else {
|
|
413
|
-
|
|
440
|
+
nativeAddTracked(basePath);
|
|
441
|
+
const commitMsg = `gsd snapshot: uncommitted changes after ${mins}m inactivity`;
|
|
442
|
+
const result = nativeCommit(basePath, commitMsg);
|
|
443
|
+
if (result) {
|
|
444
|
+
fixesApplied.push(`created gsd snapshot after ${mins}m of uncommitted changes`);
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
fixesApplied.push("gsd snapshot skipped — nothing to commit after staging tracked files");
|
|
448
|
+
}
|
|
414
449
|
}
|
|
415
450
|
}
|
|
416
451
|
catch {
|
|
@@ -18,7 +18,7 @@ import { loadEffectiveGSDPreferences } from "./preferences.js";
|
|
|
18
18
|
import { logWarning } from "./workflow-logger.js";
|
|
19
19
|
import { detectWorktreeName, } from "./worktree.js";
|
|
20
20
|
import { SLICE_BRANCH_RE, QUICK_BRANCH_RE, WORKFLOW_BRANCH_RE } from "./branch-patterns.js";
|
|
21
|
-
import { nativeGetCurrentBranch, nativeDetectMainBranch, nativeBranchExists, nativeHasChanges, nativeAddAllWithExclusions, nativeHasStagedChanges, nativeCommit, nativeRmCached, nativeUpdateRef, nativeAddPaths, nativeResetSoft, nativeCommitSubject, _resetHasChangesCache, } from "./native-git-bridge.js";
|
|
21
|
+
import { nativeGetCurrentBranch, nativeDetectMainBranch, nativeBranchExists, nativeHasChanges, nativeAddAllWithExclusions, nativeHasStagedChanges, nativeCommit, nativeRmCached, nativeUpdateRef, nativeAddPaths, nativeResetSoft, nativeCommitSubject, nativeIsIgnored, _resetHasChangesCache, } from "./native-git-bridge.js";
|
|
22
22
|
import { GSDError, GSD_MERGE_CONFLICT, GSD_GIT_ERROR } from "./errors.js";
|
|
23
23
|
import { getErrorMessage } from "./error-utils.js";
|
|
24
24
|
import { isInfrastructureError } from "./auto/infra-errors.js";
|
|
@@ -570,6 +570,7 @@ export class GitServiceImpl {
|
|
|
570
570
|
const normalized = keyFiles
|
|
571
571
|
.map(file => normalizeRepoRelativePath(this.basePath, file))
|
|
572
572
|
.filter((file) => file !== null)
|
|
573
|
+
.filter(file => !nativeIsIgnored(this.basePath, file))
|
|
573
574
|
.filter(file => !isExcludedScopedPath(file, allExclusions));
|
|
574
575
|
// Drop entries that don't exist on disk. The LLM occasionally lists files
|
|
575
576
|
// it intended to write but didn't (or names them with wrong casing/path).
|
|
@@ -977,32 +977,16 @@ export function setSliceSketchFlag(milestoneId, sliceId, isSketch) {
|
|
|
977
977
|
currentDb.prepare(`UPDATE slices SET is_sketch = :is_sketch WHERE milestone_id = :mid AND id = :sid`).run({ ":is_sketch": isSketch ? 1 : 0, ":mid": milestoneId, ":sid": sliceId });
|
|
978
978
|
}
|
|
979
979
|
/**
|
|
980
|
-
* ADR-
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
984
|
-
* to keep path logic in one place — do not hand-roll the path inside the callback.
|
|
985
|
-
*
|
|
986
|
-
* Recovers from two scenarios:
|
|
987
|
-
* 1. Crash between `gsd_plan_slice` write and the sketch flag flip.
|
|
988
|
-
* 2. Flag-OFF downgrade path: when `progressive_planning` is off, the dispatch
|
|
989
|
-
* rule routes sketch slices to plan-slice, which writes PLAN.md but leaves
|
|
990
|
-
* `is_sketch=1` — the next state derivation auto-heals it to 0 here.
|
|
991
|
-
*
|
|
992
|
-
* Not aggressive in practice: PLAN.md is only written via the DB-backed
|
|
993
|
-
* `gsd_plan_slice` tool (which also inserts tasks), so a "stale PLAN.md with
|
|
994
|
-
* is_sketch=1" is extremely unlikely to indicate anything other than the two
|
|
995
|
-
* recovery scenarios above.
|
|
980
|
+
* ADR-017 raw primitive: returns slice IDs in a milestone whose is_sketch flag
|
|
981
|
+
* is still 1. The stale-sketch-flag drift handler at
|
|
982
|
+
* `state-reconciliation/drift/sketch-flag.ts` composes this with PLAN.md
|
|
983
|
+
* existence checks to detect drift, then writes via `setSliceSketchFlag`.
|
|
996
984
|
*/
|
|
997
|
-
export function
|
|
985
|
+
export function getSketchedSliceIds(milestoneId) {
|
|
998
986
|
if (!currentDb)
|
|
999
|
-
return;
|
|
987
|
+
return [];
|
|
1000
988
|
const rows = currentDb.prepare(`SELECT id FROM slices WHERE milestone_id = :mid AND is_sketch = 1`).all({ ":mid": milestoneId });
|
|
1001
|
-
|
|
1002
|
-
if (hasPlanFile(row.id)) {
|
|
1003
|
-
setSliceSketchFlag(milestoneId, row.id, false);
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
989
|
+
return rows.map((r) => r.id);
|
|
1006
990
|
}
|
|
1007
991
|
export function upsertSlicePlanning(milestoneId, sliceId, planning) {
|
|
1008
992
|
if (!currentDb)
|
|
@@ -51,7 +51,7 @@ export function buildHealthLines(data, width) {
|
|
|
51
51
|
return [" GSD No project loaded — run /gsd to start"];
|
|
52
52
|
}
|
|
53
53
|
if (data.projectState === "initialized") {
|
|
54
|
-
return [" GSD Project
|
|
54
|
+
return [" GSD Project Initialized"];
|
|
55
55
|
}
|
|
56
56
|
const leftParts = [];
|
|
57
57
|
const totalIssues = data.environmentErrorCount + data.environmentWarningCount + (data.providerIssue ? 1 : 0);
|