gsd-pi 2.75.0-next.9c0ec0ba1 → 2.76.0-dev.b072ebb73
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 +145 -125
- package/dist/claude-cli-check.d.ts +10 -0
- package/dist/claude-cli-check.js +13 -3
- package/dist/onboarding.d.ts +20 -1
- package/dist/onboarding.js +60 -25
- package/dist/resources/agents/researcher.md +1 -1
- package/dist/resources/extensions/ask-user-questions.js +6 -3
- package/dist/resources/extensions/claude-code-cli/readiness.js +34 -2
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +44 -2
- package/dist/resources/extensions/gsd/auto/phases.js +48 -6
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +20 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +37 -8
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +8 -2
- package/dist/resources/extensions/gsd/auto-dispatch.js +87 -9
- package/dist/resources/extensions/gsd/auto-model-selection.js +27 -6
- package/dist/resources/extensions/gsd/auto-post-unit.js +7 -5
- package/dist/resources/extensions/gsd/auto-prompts.js +188 -44
- package/dist/resources/extensions/gsd/auto-recovery.js +48 -0
- package/dist/resources/extensions/gsd/auto-start.js +5 -3
- package/dist/resources/extensions/gsd/auto-verification.js +33 -0
- package/dist/resources/extensions/gsd/auto-worktree.js +71 -2
- package/dist/resources/extensions/gsd/auto.js +25 -3
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +8 -21
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +45 -23
- package/dist/resources/extensions/gsd/bootstrap/memory-tools.js +131 -0
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +29 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +12 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +22 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +84 -10
- package/dist/resources/extensions/gsd/commands/catalog.js +15 -7
- package/dist/resources/extensions/gsd/commands/handlers/core.js +58 -24
- package/dist/resources/extensions/gsd/commands/handlers/escalate.js +171 -0
- package/dist/resources/extensions/gsd/commands/handlers/onboarding.js +159 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +10 -0
- package/dist/resources/extensions/gsd/commands-config.js +5 -0
- package/dist/resources/extensions/gsd/commands-extract-learnings.js +200 -77
- package/dist/resources/extensions/gsd/commands-memory.js +462 -0
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +39 -11
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +74 -54
- package/dist/resources/extensions/gsd/db-writer.js +89 -16
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +2 -2
- package/dist/resources/extensions/gsd/doctor-environment.js +2 -1
- package/dist/resources/extensions/gsd/doctor-git-checks.js +50 -32
- package/dist/resources/extensions/gsd/doctor-proactive.js +4 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +51 -5
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +21 -1
- package/dist/resources/extensions/gsd/doctor.js +7 -1
- package/dist/resources/extensions/gsd/ecosystem/gsd-extension-api.js +1 -0
- package/dist/resources/extensions/gsd/error-classifier.js +5 -2
- package/dist/resources/extensions/gsd/escalation.js +321 -0
- package/dist/resources/extensions/gsd/graph.js +26 -0
- package/dist/resources/extensions/gsd/gsd-db.js +517 -32
- package/dist/resources/extensions/gsd/health-widget-core.js +42 -14
- package/dist/resources/extensions/gsd/health-widget.js +7 -4
- package/dist/resources/extensions/gsd/hook-emitter.js +108 -0
- package/dist/resources/extensions/gsd/init-wizard.js +86 -45
- package/dist/resources/extensions/gsd/markdown-renderer.js +5 -5
- package/dist/resources/extensions/gsd/memory-backfill.js +126 -0
- package/dist/resources/extensions/gsd/memory-embeddings.js +219 -0
- package/dist/resources/extensions/gsd/memory-extractor.js +78 -27
- package/dist/resources/extensions/gsd/memory-ingest.js +218 -0
- package/dist/resources/extensions/gsd/memory-relations.js +189 -0
- package/dist/resources/extensions/gsd/memory-source-store.js +113 -0
- package/dist/resources/extensions/gsd/memory-store.js +318 -6
- package/dist/resources/extensions/gsd/metrics.js +1 -0
- package/dist/resources/extensions/gsd/model-cost-table.js +1 -0
- package/dist/resources/extensions/gsd/model-router.js +12 -5
- package/dist/resources/extensions/gsd/native-git-bridge.js +121 -5
- package/dist/resources/extensions/gsd/notification-overlay.js +7 -22
- package/dist/resources/extensions/gsd/notification-widget.js +24 -39
- package/dist/resources/extensions/gsd/onboarding-state.js +133 -0
- package/dist/resources/extensions/gsd/post-execution-checks.js +27 -11
- package/dist/resources/extensions/gsd/pre-execution-checks.js +98 -8
- package/dist/resources/extensions/gsd/preferences-models.js +1 -0
- package/dist/resources/extensions/gsd/preferences-types.js +2 -1
- package/dist/resources/extensions/gsd/preferences-validation.js +42 -8
- package/dist/resources/extensions/gsd/prompts/add-tests.md +1 -0
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -2
- package/dist/resources/extensions/gsd/prompts/debug-diagnose.md +2 -0
- package/dist/resources/extensions/gsd/prompts/execute-task.md +16 -3
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +2 -0
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -0
- package/dist/resources/extensions/gsd/python-resolver.js +70 -0
- package/dist/resources/extensions/gsd/setup-catalog.js +75 -0
- package/dist/resources/extensions/gsd/state.js +90 -7
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +1 -1
- package/dist/resources/extensions/gsd/tools/complete-task.js +80 -0
- package/dist/resources/extensions/gsd/tools/memory-tools.js +331 -0
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +37 -12
- package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -2
- package/dist/resources/extensions/gsd/tools/skip-slice.js +78 -0
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +14 -0
- package/dist/resources/extensions/gsd/uok/flags.js +1 -1
- package/dist/resources/extensions/gsd/verification-gate.js +2 -1
- package/dist/resources/extensions/gsd/workflow-manifest.js +8 -0
- package/dist/resources/extensions/gsd/workflow-mcp.js +1 -0
- package/dist/resources/extensions/gsd/workflow-projections.js +17 -15
- package/dist/resources/extensions/gsd/workflow-templates/spike.md +6 -0
- package/dist/resources/extensions/gsd/worktree-resolver.js +42 -1
- package/dist/resources/extensions/remote-questions/manager.js +11 -1
- package/dist/resources/extensions/search-the-web/command-search-provider.js +4 -1
- package/dist/resources/extensions/search-the-web/native-search.js +13 -2
- package/dist/resources/skills/api-design/SKILL.md +190 -0
- package/dist/resources/skills/create-mcp-server/SKILL.md +121 -0
- package/dist/resources/skills/decompose-into-slices/SKILL.md +139 -0
- package/dist/resources/skills/dependency-upgrade/SKILL.md +158 -0
- package/dist/resources/skills/design-an-interface/SKILL.md +102 -0
- package/dist/resources/skills/forensics/SKILL.md +153 -0
- package/dist/resources/skills/grill-me/SKILL.md +93 -0
- package/dist/resources/skills/handoff/SKILL.md +121 -0
- package/dist/resources/skills/observability/SKILL.md +174 -0
- package/dist/resources/skills/security-review/SKILL.md +181 -0
- package/dist/resources/skills/spike-wrap-up/SKILL.md +138 -0
- package/dist/resources/skills/tdd/SKILL.md +112 -0
- package/dist/resources/skills/verify-before-complete/SKILL.md +97 -0
- package/dist/resources/skills/write-docs/SKILL.md +81 -0
- package/dist/resources/skills/write-milestone-brief/SKILL.md +135 -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 +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/required-server-files.json +1 -1
- 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_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 +2 -2
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- 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.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +3 -3
- 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 +3 -3
- 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_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/6897.js +2 -2
- package/dist/web/standalone/.next/server/chunks/7461.js +1 -0
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-manifest.json +5 -5
- 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 +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/{2826.02df9631042cc18e.js → 2826.e59e8578e2e28639.js} +2 -2
- package/dist/web/standalone/.next/static/chunks/{2008.71ee9230ad78df21.js → 3621.fc7480022c972438.js} +2 -2
- package/dist/web/standalone/.next/static/chunks/app/{page-f1e30ab6bb269149.js → page-5b113fd32bc2a1c3.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/{webpack-6c7cda3e318eedb6.js → webpack-5fc74f13a25fa1bb.js} +1 -1
- package/dist/web/standalone/.next/static/css/632cd626b1731d88.css +1 -0
- package/dist/web/standalone/server.js +1 -1
- package/dist/welcome-screen.js +48 -24
- package/package.json +1 -1
- package/packages/daemon/package.json +2 -2
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +12 -10
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/session-manager.d.ts.map +1 -1
- package/packages/mcp-server/dist/session-manager.js +8 -1
- package/packages/mcp-server/dist/session-manager.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts +2 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +306 -71
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +2 -2
- package/packages/mcp-server/src/mcp-server.test.ts +40 -4
- package/packages/mcp-server/src/server.ts +12 -10
- package/packages/mcp-server/src/session-manager.ts +10 -3
- package/packages/mcp-server/src/workflow-tools.test.ts +346 -1
- package/packages/mcp-server/src/workflow-tools.ts +359 -75
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +12 -0
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/dist/types.d.ts +30 -0
- package/packages/pi-agent-core/dist/types.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/types.js.map +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-agent-core/src/agent-loop.ts +14 -0
- package/packages/pi-agent-core/src/types.ts +34 -0
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-ai/dist/index.d.ts +1 -0
- package/packages/pi-ai/dist/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/index.js +1 -0
- package/packages/pi-ai/dist/index.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/index.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openai-codex.js +17 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.test.js +1 -0
- package/packages/pi-ai/dist/models.generated.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts +22 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.js +40 -7
- package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.js +106 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +42 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js +13 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +19 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +25 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +11 -0
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +23 -2
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/api-family.d.ts +27 -0
- package/packages/pi-ai/dist/providers/api-family.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.js +47 -0
- package/packages/pi-ai/dist/providers/api-family.js.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/api-family.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.test.js +101 -0
- package/packages/pi-ai/dist/providers/api-family.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js +12 -2
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js +164 -14
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.js +15 -3
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js +67 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js +16 -3
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js +67 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.js +289 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/openai-codex.js +12 -0
- package/packages/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +12 -0
- package/packages/pi-ai/src/index.ts +1 -0
- package/packages/pi-ai/src/models/generated/openai-codex.ts +17 -0
- package/packages/pi-ai/src/models.generated.test.ts +1 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.test.ts +164 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.ts +41 -8
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +47 -1
- package/packages/pi-ai/src/providers/anthropic-bearer-auth.test.ts +26 -0
- package/packages/pi-ai/src/providers/anthropic-shared.ts +30 -1
- package/packages/pi-ai/src/providers/anthropic.ts +25 -2
- package/packages/pi-ai/src/providers/api-family.test.ts +129 -0
- package/packages/pi-ai/src/providers/api-family.ts +57 -0
- package/packages/pi-ai/src/utils/oauth/github-copilot.test.ts +200 -23
- package/packages/pi-ai/src/utils/oauth/github-copilot.ts +12 -2
- package/packages/pi-ai/src/utils/oauth/google-antigravity.test.ts +84 -0
- package/packages/pi-ai/src/utils/oauth/google-antigravity.ts +15 -5
- package/packages/pi-ai/src/utils/oauth/google-gemini-cli.test.ts +84 -0
- package/packages/pi-ai/src/utils/oauth/google-gemini-cli.ts +16 -5
- package/packages/pi-ai/src/utils/oauth/oauth-providers.test.ts +363 -0
- package/packages/pi-ai/src/utils/oauth/openai-codex.ts +15 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/cli/args.d.ts +6 -0
- package/packages/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/cli/args.js +14 -4
- package/packages/pi-coding-agent/dist/cli/args.js.map +1 -1
- package/packages/pi-coding-agent/dist/cli/args.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/cli/args.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/cli/args.test.js +38 -0
- package/packages/pi-coding-agent/dist/cli/args.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +25 -2
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +7 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +25 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +38 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +4 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +4 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +34 -2
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +233 -0
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +200 -3
- 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/hooks-runner.d.ts +53 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.js +337 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.js +234 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/index.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/index.js +1 -0
- package/packages/pi-coding-agent/dist/core/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.js +40 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +32 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js +4 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts +10 -0
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +33 -5
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +55 -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.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/main.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/main.js +3 -0
- package/packages/pi-coding-agent/dist/main.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js +17 -7
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.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 +48 -34
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts +4 -0
- 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 +83 -33
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -1
- 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.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 +13 -9
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/cli/args.test.ts +44 -0
- package/packages/pi-coding-agent/src/cli/args.ts +21 -6
- package/packages/pi-coding-agent/src/core/agent-session.ts +27 -2
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +42 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +25 -0
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +4 -1
- package/packages/pi-coding-agent/src/core/extensions/index.ts +16 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +5 -0
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +353 -1
- package/packages/pi-coding-agent/src/core/extensions/types.ts +253 -2
- package/packages/pi-coding-agent/src/core/hooks-runner.test.ts +269 -0
- package/packages/pi-coding-agent/src/core/hooks-runner.ts +460 -0
- package/packages/pi-coding-agent/src/core/index.ts +10 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-header.test.ts +44 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +37 -1
- package/packages/pi-coding-agent/src/core/retry-handler.ts +4 -1
- package/packages/pi-coding-agent/src/core/sdk.ts +48 -5
- package/packages/pi-coding-agent/src/core/settings-manager.ts +57 -0
- package/packages/pi-coding-agent/src/index.ts +16 -0
- package/packages/pi-coding-agent/src/main.ts +4 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +19 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +53 -31
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +88 -36
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +13 -9
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/package.json +1 -1
- package/packages/rpc-client/package.json +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +1 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.js +1 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -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 +13 -9
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/agents/researcher.md +1 -1
- package/src/resources/extensions/ask-user-questions.ts +7 -4
- package/src/resources/extensions/claude-code-cli/readiness.ts +36 -2
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +59 -1
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +66 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +2 -10
- package/src/resources/extensions/gsd/auto/phases.ts +52 -6
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +20 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +46 -5
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +15 -2
- package/src/resources/extensions/gsd/auto-dispatch.ts +96 -4
- package/src/resources/extensions/gsd/auto-model-selection.ts +37 -6
- package/src/resources/extensions/gsd/auto-post-unit.ts +7 -5
- package/src/resources/extensions/gsd/auto-prompts.ts +225 -45
- package/src/resources/extensions/gsd/auto-recovery.ts +47 -0
- package/src/resources/extensions/gsd/auto-start.ts +8 -6
- package/src/resources/extensions/gsd/auto-verification.ts +33 -0
- package/src/resources/extensions/gsd/auto-worktree.ts +81 -1
- package/src/resources/extensions/gsd/auto.ts +27 -2
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +8 -21
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +46 -24
- package/src/resources/extensions/gsd/bootstrap/memory-tools.ts +163 -0
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +31 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +15 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +22 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +89 -10
- package/src/resources/extensions/gsd/commands/catalog.ts +15 -7
- package/src/resources/extensions/gsd/commands/handlers/core.ts +63 -27
- package/src/resources/extensions/gsd/commands/handlers/escalate.ts +216 -0
- package/src/resources/extensions/gsd/commands/handlers/onboarding.ts +196 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +10 -0
- package/src/resources/extensions/gsd/commands-config.ts +10 -0
- package/src/resources/extensions/gsd/commands-extract-learnings.ts +262 -78
- package/src/resources/extensions/gsd/commands-memory.ts +551 -0
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +48 -11
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +85 -60
- package/src/resources/extensions/gsd/db-writer.ts +91 -17
- package/src/resources/extensions/gsd/docs/preferences-reference.md +2 -2
- package/src/resources/extensions/gsd/doctor-environment.ts +2 -1
- package/src/resources/extensions/gsd/doctor-git-checks.ts +51 -30
- package/src/resources/extensions/gsd/doctor-proactive.ts +4 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +59 -6
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +22 -1
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +7 -1
- package/src/resources/extensions/gsd/ecosystem/gsd-extension-api.ts +2 -0
- package/src/resources/extensions/gsd/error-classifier.ts +5 -2
- package/src/resources/extensions/gsd/escalation.ts +367 -0
- package/src/resources/extensions/gsd/graph.ts +33 -0
- package/src/resources/extensions/gsd/gsd-db.ts +617 -32
- package/src/resources/extensions/gsd/health-widget-core.ts +43 -14
- package/src/resources/extensions/gsd/health-widget.ts +7 -3
- package/src/resources/extensions/gsd/hook-emitter.ts +188 -0
- package/src/resources/extensions/gsd/init-wizard.ts +87 -54
- package/src/resources/extensions/gsd/markdown-renderer.ts +5 -5
- package/src/resources/extensions/gsd/memory-backfill.ts +140 -0
- package/src/resources/extensions/gsd/memory-embeddings.ts +235 -0
- package/src/resources/extensions/gsd/memory-extractor.ts +100 -34
- package/src/resources/extensions/gsd/memory-ingest.ts +286 -0
- package/src/resources/extensions/gsd/memory-relations.ts +240 -0
- package/src/resources/extensions/gsd/memory-source-store.ts +138 -0
- package/src/resources/extensions/gsd/memory-store.ts +377 -7
- package/src/resources/extensions/gsd/metrics.ts +1 -0
- package/src/resources/extensions/gsd/model-cost-table.ts +1 -0
- package/src/resources/extensions/gsd/model-router.ts +21 -5
- package/src/resources/extensions/gsd/native-git-bridge.ts +118 -6
- package/src/resources/extensions/gsd/notification-overlay.ts +9 -19
- package/src/resources/extensions/gsd/notification-widget.ts +25 -43
- package/src/resources/extensions/gsd/onboarding-state.ts +146 -0
- package/src/resources/extensions/gsd/post-execution-checks.ts +37 -14
- package/src/resources/extensions/gsd/pre-execution-checks.ts +100 -12
- package/src/resources/extensions/gsd/preferences-models.ts +1 -0
- package/src/resources/extensions/gsd/preferences-types.ts +9 -1
- package/src/resources/extensions/gsd/preferences-validation.ts +33 -7
- package/src/resources/extensions/gsd/prompts/add-tests.md +1 -0
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
- package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -2
- package/src/resources/extensions/gsd/prompts/debug-diagnose.md +2 -0
- package/src/resources/extensions/gsd/prompts/execute-task.md +16 -3
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +2 -0
- package/src/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/src/resources/extensions/gsd/prompts/research-slice.md +1 -0
- package/src/resources/extensions/gsd/python-resolver.ts +76 -0
- package/src/resources/extensions/gsd/setup-catalog.ts +105 -0
- package/src/resources/extensions/gsd/state.ts +95 -6
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +1 -1
- package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +49 -0
- package/src/resources/extensions/gsd/tests/auto-migrating-recovery.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +95 -1
- package/src/resources/extensions/gsd/tests/auto-prompts-fallback.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +123 -1
- package/src/resources/extensions/gsd/tests/auto-wrapup-inflight-guard.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/bundled-skill-triggers.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/commands-extract-learnings.test.ts +335 -21
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +6 -8
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +8 -4
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +117 -3
- package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/ensure-db-open.test.ts +306 -1
- package/src/resources/extensions/gsd/tests/escalation.test.ts +818 -0
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +145 -8
- package/src/resources/extensions/gsd/tests/freeform-decisions.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +44 -1
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +8 -2
- package/src/resources/extensions/gsd/tests/init-prefs-routing.test.ts +190 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-git-symlink-cwd.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +117 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-proactive.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-runtime.test.ts +32 -1
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +72 -5
- package/src/resources/extensions/gsd/tests/integration/integration-proof.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +53 -0
- package/src/resources/extensions/gsd/tests/interactive-routing-bypass.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/load-memory-block.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-embeddings.test.ts +213 -0
- package/src/resources/extensions/gsd/tests/memory-ingest.test.ts +153 -0
- package/src/resources/extensions/gsd/tests/memory-maintenance.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/memory-relations.test.ts +175 -0
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/memory-tools.test.ts +295 -0
- package/src/resources/extensions/gsd/tests/milestone-status-tool.test.ts +3 -2
- package/src/resources/extensions/gsd/tests/model-cost-table.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/model-router.test.ts +51 -1
- package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +59 -0
- package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +56 -37
- package/src/resources/extensions/gsd/tests/notification-widget.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/onboarding-state.test.ts +105 -0
- package/src/resources/extensions/gsd/tests/plan-milestone-boundary-map-preservation.test.ts +114 -0
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +4 -5
- package/src/resources/extensions/gsd/tests/plan-slice.test.ts +17 -0
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +105 -1
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +317 -1
- package/src/resources/extensions/gsd/tests/progressive-planning.test.ts +539 -0
- package/src/resources/extensions/gsd/tests/projection-no-plan-overwrite.test.ts +11 -2
- package/src/resources/extensions/gsd/tests/projection-regression.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +159 -8
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/prompts-no-gitignored-test-refs.test.ts +56 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +41 -4
- package/src/resources/extensions/gsd/tests/python-resolver.test.ts +131 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +67 -0
- package/src/resources/extensions/gsd/tests/requirements.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +153 -0
- package/src/resources/extensions/gsd/tests/skip-slice-cascades-tasks.test.ts +125 -0
- package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +16 -4
- package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +3 -0
- package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/uok-flags.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +9 -3
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +97 -0
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +77 -2
- package/src/resources/extensions/gsd/tools/complete-task.ts +87 -0
- package/src/resources/extensions/gsd/tools/memory-tools.ts +410 -0
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +42 -8
- package/src/resources/extensions/gsd/tools/plan-slice.ts +6 -1
- package/src/resources/extensions/gsd/tools/skip-slice.ts +133 -0
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +14 -0
- package/src/resources/extensions/gsd/types.ts +62 -0
- package/src/resources/extensions/gsd/uok/contracts.ts +2 -1
- package/src/resources/extensions/gsd/uok/flags.ts +1 -1
- package/src/resources/extensions/gsd/verification-gate.ts +2 -1
- package/src/resources/extensions/gsd/workflow-logger.ts +4 -1
- package/src/resources/extensions/gsd/workflow-manifest.ts +8 -0
- package/src/resources/extensions/gsd/workflow-mcp.ts +1 -0
- package/src/resources/extensions/gsd/workflow-projections.ts +18 -16
- package/src/resources/extensions/gsd/workflow-templates/spike.md +6 -0
- package/src/resources/extensions/gsd/worktree-resolver.ts +47 -1
- package/src/resources/extensions/remote-questions/manager.ts +13 -1
- package/src/resources/extensions/remote-questions/tests/remote-answer-normalization.test.ts +92 -0
- package/src/resources/extensions/search-the-web/command-search-provider.ts +4 -1
- package/src/resources/extensions/search-the-web/native-search.ts +13 -3
- package/src/resources/skills/api-design/SKILL.md +190 -0
- package/src/resources/skills/create-mcp-server/SKILL.md +121 -0
- package/src/resources/skills/decompose-into-slices/SKILL.md +139 -0
- package/src/resources/skills/dependency-upgrade/SKILL.md +158 -0
- package/src/resources/skills/design-an-interface/SKILL.md +102 -0
- package/src/resources/skills/forensics/SKILL.md +153 -0
- package/src/resources/skills/grill-me/SKILL.md +93 -0
- package/src/resources/skills/handoff/SKILL.md +121 -0
- package/src/resources/skills/observability/SKILL.md +174 -0
- package/src/resources/skills/security-review/SKILL.md +181 -0
- package/src/resources/skills/spike-wrap-up/SKILL.md +138 -0
- package/src/resources/skills/tdd/SKILL.md +112 -0
- package/src/resources/skills/verify-before-complete/SKILL.md +97 -0
- package/src/resources/skills/write-docs/SKILL.md +81 -0
- package/src/resources/skills/write-milestone-brief/SKILL.md +135 -0
- package/dist/web/standalone/.next/static/css/3e9cdadb4d23b8a4.css +0 -1
- /package/dist/web/standalone/.next/static/{JncJywFxCugMuXGs56m-b → pBwmOoye64ZrRp-_rf0v1}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{JncJywFxCugMuXGs56m-b → pBwmOoye64ZrRp-_rf0v1}/_ssgManifest.js +0 -0
|
@@ -25,10 +25,18 @@ export interface PlanMilestoneSliceInput {
|
|
|
25
25
|
depends: string[];
|
|
26
26
|
demo: string;
|
|
27
27
|
goal: string;
|
|
28
|
+
/** Required when isSketch is false/absent; may be empty for sketch slices (ADR-011). */
|
|
28
29
|
successCriteria: string;
|
|
30
|
+
/** Required when isSketch is false/absent; may be empty for sketch slices (ADR-011). */
|
|
29
31
|
proofLevel: string;
|
|
32
|
+
/** Required when isSketch is false/absent; may be empty for sketch slices (ADR-011). */
|
|
30
33
|
integrationClosure: string;
|
|
34
|
+
/** Required when isSketch is false/absent; may be empty for sketch slices (ADR-011). */
|
|
31
35
|
observabilityImpact: string;
|
|
36
|
+
/** ADR-011: when true, this slice is a sketch awaiting refine-slice expansion. */
|
|
37
|
+
isSketch?: boolean;
|
|
38
|
+
/** ADR-011: 2–3 sentence scope boundary, required when isSketch is true. */
|
|
39
|
+
sketchScope?: string;
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
export interface PlanMilestoneParams {
|
|
@@ -125,6 +133,16 @@ function validateSlices(value: unknown): PlanMilestoneSliceInput[] {
|
|
|
125
133
|
const proofLevel = obj.proofLevel;
|
|
126
134
|
const integrationClosure = obj.integrationClosure;
|
|
127
135
|
const observabilityImpact = obj.observabilityImpact;
|
|
136
|
+
const isSketchRaw = obj.isSketch;
|
|
137
|
+
const sketchScopeRaw = obj.sketchScope;
|
|
138
|
+
// ADR-011: preserve the 3-valued semantics of isSketch (true / false / absent).
|
|
139
|
+
// Callers that omit isSketch must receive `undefined` here so `insertSlice`'s
|
|
140
|
+
// ON CONFLICT clause preserves any existing is_sketch on the row rather than
|
|
141
|
+
// silently overwriting a legitimate sketch to non-sketch.
|
|
142
|
+
const isSketch: boolean | undefined =
|
|
143
|
+
isSketchRaw === true ? true
|
|
144
|
+
: isSketchRaw === false ? false
|
|
145
|
+
: undefined;
|
|
128
146
|
|
|
129
147
|
if (!isNonEmptyString(sliceId)) throw new Error(`slices[${index}].sliceId must be a non-empty string`);
|
|
130
148
|
if (seen.has(sliceId)) throw new Error(`slices[${index}].sliceId must be unique`);
|
|
@@ -136,10 +154,18 @@ function validateSlices(value: unknown): PlanMilestoneSliceInput[] {
|
|
|
136
154
|
}
|
|
137
155
|
if (!isNonEmptyString(demo)) throw new Error(`slices[${index}].demo must be a non-empty string`);
|
|
138
156
|
if (!isNonEmptyString(goal)) throw new Error(`slices[${index}].goal must be a non-empty string`);
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (
|
|
142
|
-
|
|
157
|
+
|
|
158
|
+
// ADR-011: sketch slices may defer the heavyweight planning fields to refine-slice.
|
|
159
|
+
if (isSketch === true) {
|
|
160
|
+
if (!isNonEmptyString(sketchScopeRaw)) {
|
|
161
|
+
throw new Error(`slices[${index}].sketchScope must be a non-empty string when isSketch is true`);
|
|
162
|
+
}
|
|
163
|
+
} else {
|
|
164
|
+
if (!isNonEmptyString(successCriteria)) throw new Error(`slices[${index}].successCriteria must be a non-empty string`);
|
|
165
|
+
if (!isNonEmptyString(proofLevel)) throw new Error(`slices[${index}].proofLevel must be a non-empty string`);
|
|
166
|
+
if (!isNonEmptyString(integrationClosure)) throw new Error(`slices[${index}].integrationClosure must be a non-empty string`);
|
|
167
|
+
if (!isNonEmptyString(observabilityImpact)) throw new Error(`slices[${index}].observabilityImpact must be a non-empty string`);
|
|
168
|
+
}
|
|
143
169
|
|
|
144
170
|
return {
|
|
145
171
|
sliceId,
|
|
@@ -148,10 +174,14 @@ function validateSlices(value: unknown): PlanMilestoneSliceInput[] {
|
|
|
148
174
|
depends,
|
|
149
175
|
demo,
|
|
150
176
|
goal,
|
|
151
|
-
successCriteria,
|
|
152
|
-
proofLevel,
|
|
153
|
-
integrationClosure,
|
|
154
|
-
observabilityImpact,
|
|
177
|
+
successCriteria: isNonEmptyString(successCriteria) ? successCriteria : "",
|
|
178
|
+
proofLevel: isNonEmptyString(proofLevel) ? proofLevel : "",
|
|
179
|
+
integrationClosure: isNonEmptyString(integrationClosure) ? integrationClosure : "",
|
|
180
|
+
observabilityImpact: isNonEmptyString(observabilityImpact) ? observabilityImpact : "",
|
|
181
|
+
isSketch,
|
|
182
|
+
// Only carry the sketch scope through if the caller explicitly provided it
|
|
183
|
+
// — preserves ON CONFLICT semantics for re-plans that omit the field.
|
|
184
|
+
sketchScope: sketchScopeRaw === undefined ? undefined : (isNonEmptyString(sketchScopeRaw) ? sketchScopeRaw : ""),
|
|
155
185
|
};
|
|
156
186
|
});
|
|
157
187
|
}
|
|
@@ -274,6 +304,10 @@ export async function handlePlanMilestone(
|
|
|
274
304
|
depends: slice.depends,
|
|
275
305
|
demo: slice.demo,
|
|
276
306
|
sequence: i + 1, // Preserve agent-ordered sequence (#3356)
|
|
307
|
+
// ADR-011: pass undefined through so ON CONFLICT preserves existing values
|
|
308
|
+
// when the caller omitted the fields on a re-plan.
|
|
309
|
+
isSketch: slice.isSketch,
|
|
310
|
+
sketchScope: slice.sketchScope,
|
|
277
311
|
});
|
|
278
312
|
upsertSlicePlanning(params.milestoneId, slice.sliceId, {
|
|
279
313
|
goal: slice.goal,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clearParseCache } from "../files.js";
|
|
2
|
-
import { isClosedStatus } from "../status-guards.js";
|
|
2
|
+
import { isClosedStatus, isDeferredStatus } from "../status-guards.js";
|
|
3
3
|
import { isNonEmptyString, validateStringArray } from "../validation.js";
|
|
4
4
|
import {
|
|
5
5
|
transaction,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
upsertSlicePlanning,
|
|
10
10
|
upsertTaskPlanning,
|
|
11
11
|
insertGateRow,
|
|
12
|
+
updateSliceStatus,
|
|
12
13
|
} from "../gsd-db.js";
|
|
13
14
|
import type { GateId } from "../types.js";
|
|
14
15
|
import { invalidateStateCache } from "../state.js";
|
|
@@ -166,6 +167,10 @@ export async function handlePlanSlice(
|
|
|
166
167
|
return;
|
|
167
168
|
}
|
|
168
169
|
|
|
170
|
+
if (isDeferredStatus(parentSlice.status)) {
|
|
171
|
+
updateSliceStatus(params.milestoneId, params.sliceId, "pending");
|
|
172
|
+
}
|
|
173
|
+
|
|
169
174
|
upsertSlicePlanning(params.milestoneId, params.sliceId, {
|
|
170
175
|
goal: params.goal,
|
|
171
176
|
successCriteria: params.successCriteria,
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* skip-slice handler — the core operation behind gsd_skip_slice.
|
|
3
|
+
*
|
|
4
|
+
* Marks a slice as skipped and cascades the skip to every non-closed task in
|
|
5
|
+
* that slice. Without the task cascade the deep-check in
|
|
6
|
+
* executeCompleteMilestone reports pending tasks inside the skipped slice and
|
|
7
|
+
* blocks milestone completion (see #4375).
|
|
8
|
+
*
|
|
9
|
+
* This function performs DB writes only. The MCP wrapper in
|
|
10
|
+
* bootstrap/db-tools.ts handles state-cache invalidation and STATE.md rebuild.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
getSlice,
|
|
15
|
+
getSliceTasks,
|
|
16
|
+
isDbAvailable,
|
|
17
|
+
transaction,
|
|
18
|
+
updateSliceStatus,
|
|
19
|
+
updateTaskStatus,
|
|
20
|
+
} from "../gsd-db.js";
|
|
21
|
+
import { isClosedStatus } from "../status-guards.js";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Input parameters for {@link handleSkipSlice}.
|
|
25
|
+
*
|
|
26
|
+
* - `milestoneId` / `sliceId` identify the target slice.
|
|
27
|
+
* - `reason` is a free-form note surfaced in the MCP response; optional
|
|
28
|
+
* because the caller (e.g. rethink flow) may not have a structured reason.
|
|
29
|
+
*/
|
|
30
|
+
export interface SkipSliceParams {
|
|
31
|
+
milestoneId: string;
|
|
32
|
+
sliceId: string;
|
|
33
|
+
reason?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Stable machine-readable error codes for {@link SkipSliceResult.error}.
|
|
38
|
+
* Keep in sync with the wrapper in bootstrap/db-tools.ts.
|
|
39
|
+
*/
|
|
40
|
+
export type SkipSliceErrorCode = "slice_not_found" | "already_complete";
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Result of a {@link handleSkipSlice} call.
|
|
44
|
+
*
|
|
45
|
+
* - `tasksSkipped` — count of tasks whose status was cascaded to "skipped".
|
|
46
|
+
* Zero is a valid success (slice had no non-closed tasks).
|
|
47
|
+
* - `wasAlreadySkipped` — true when the slice was in "skipped" status on
|
|
48
|
+
* entry; callers can use this to distinguish first-skip from re-skip.
|
|
49
|
+
* - `error` / `errorCode` — set together for recoverable validation failures
|
|
50
|
+
* (unknown slice, slice already complete). Both absent on success. DB
|
|
51
|
+
* errors propagate as thrown exceptions and should be caught by the caller.
|
|
52
|
+
*/
|
|
53
|
+
export interface SkipSliceResult {
|
|
54
|
+
milestoneId: string;
|
|
55
|
+
sliceId: string;
|
|
56
|
+
tasksSkipped: number;
|
|
57
|
+
wasAlreadySkipped: boolean;
|
|
58
|
+
reason?: string;
|
|
59
|
+
error?: string;
|
|
60
|
+
errorCode?: SkipSliceErrorCode;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Mark a slice as "skipped" and cascade the skip to every non-closed task in
|
|
65
|
+
* that slice. Runs as a single transaction so slice status and task statuses
|
|
66
|
+
* are always consistent.
|
|
67
|
+
*
|
|
68
|
+
* Behaviour summary:
|
|
69
|
+
* - Unknown slice → returns {@link SkipSliceResult} with `error`.
|
|
70
|
+
* - Slice already complete/done → returns `error` (cannot un-complete).
|
|
71
|
+
* - Slice already skipped → still cascades leftover non-closed tasks
|
|
72
|
+
* (heals inconsistent historical state from projects that ran older
|
|
73
|
+
* versions before the #4375 cascade fix).
|
|
74
|
+
* - Tasks in closed status (complete/done/skipped) are never downgraded.
|
|
75
|
+
*/
|
|
76
|
+
export function handleSkipSlice(params: SkipSliceParams): SkipSliceResult {
|
|
77
|
+
const base: SkipSliceResult = {
|
|
78
|
+
milestoneId: params.milestoneId,
|
|
79
|
+
sliceId: params.sliceId,
|
|
80
|
+
tasksSkipped: 0,
|
|
81
|
+
wasAlreadySkipped: false,
|
|
82
|
+
reason: params.reason,
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Fail loudly on a closed DB so a `null` from getSlice() inside the
|
|
86
|
+
// transaction unambiguously means "slice not found", never "DB unavailable".
|
|
87
|
+
// The MCP wrapper in bootstrap/db-tools.ts runs ensureDbOpen() before calling
|
|
88
|
+
// this helper; this guard protects direct callers (tests, future code).
|
|
89
|
+
if (!isDbAvailable()) {
|
|
90
|
+
throw new Error("handleSkipSlice: GSD database is not available");
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ── Guards + DB writes inside a single transaction (prevents TOCTOU) ────
|
|
94
|
+
let guardError: string | null = null;
|
|
95
|
+
let guardCode: SkipSliceErrorCode | null = null;
|
|
96
|
+
let wasAlreadySkipped = false;
|
|
97
|
+
let tasksSkipped = 0;
|
|
98
|
+
|
|
99
|
+
transaction(() => {
|
|
100
|
+
const slice = getSlice(params.milestoneId, params.sliceId);
|
|
101
|
+
if (!slice) {
|
|
102
|
+
guardError = `Slice ${params.sliceId} not found in milestone ${params.milestoneId}`;
|
|
103
|
+
guardCode = "slice_not_found";
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (slice.status === "complete" || slice.status === "done") {
|
|
107
|
+
guardError = `Slice ${params.sliceId} is already complete — cannot skip.`;
|
|
108
|
+
guardCode = "already_complete";
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
wasAlreadySkipped = slice.status === "skipped";
|
|
113
|
+
if (!wasAlreadySkipped) {
|
|
114
|
+
updateSliceStatus(params.milestoneId, params.sliceId, "skipped");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Cascade: mark every non-closed task as skipped so milestone completion
|
|
118
|
+
// doesn't trip the deep-task guard (#4375). Closed tasks (complete/done/
|
|
119
|
+
// skipped) are left untouched — we never downgrade.
|
|
120
|
+
const tasks = getSliceTasks(params.milestoneId, params.sliceId);
|
|
121
|
+
for (const task of tasks) {
|
|
122
|
+
if (!isClosedStatus(task.status)) {
|
|
123
|
+
updateTaskStatus(params.milestoneId, params.sliceId, task.id, "skipped");
|
|
124
|
+
tasksSkipped++;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
if (guardError) {
|
|
130
|
+
return { ...base, error: guardError, errorCode: guardCode ?? undefined };
|
|
131
|
+
}
|
|
132
|
+
return { ...base, tasksSkipped, wasAlreadySkipped };
|
|
133
|
+
}
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
} from "../gsd-db.js";
|
|
11
11
|
import { GATE_REGISTRY } from "../gate-registry.js";
|
|
12
12
|
import { saveArtifactToDb } from "../db-writer.js";
|
|
13
|
+
import { resolveMilestoneFile, resolveSliceFile } from "../paths.js";
|
|
14
|
+
import { unlinkSync } from "node:fs";
|
|
13
15
|
import type { CompleteMilestoneParams } from "./complete-milestone.js";
|
|
14
16
|
import { handleCompleteMilestone } from "./complete-milestone.js";
|
|
15
17
|
import { handleCompleteTask } from "./complete-task.js";
|
|
@@ -103,6 +105,18 @@ export async function executeSummarySave(
|
|
|
103
105
|
},
|
|
104
106
|
basePath,
|
|
105
107
|
);
|
|
108
|
+
|
|
109
|
+
if (params.artifact_type === "CONTEXT" && !params.task_id) {
|
|
110
|
+
try {
|
|
111
|
+
const draftFile = params.slice_id
|
|
112
|
+
? resolveSliceFile(basePath, params.milestone_id, params.slice_id, "CONTEXT-DRAFT")
|
|
113
|
+
: resolveMilestoneFile(basePath, params.milestone_id, "CONTEXT-DRAFT");
|
|
114
|
+
if (draftFile) unlinkSync(draftFile);
|
|
115
|
+
} catch (e) {
|
|
116
|
+
logWarning("tool", `CONTEXT-DRAFT.md unlink failed: ${(e as Error).message}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
106
120
|
return {
|
|
107
121
|
content: [{ type: "text", text: `Saved ${params.artifact_type} artifact to ${relativePath}` }],
|
|
108
122
|
details: { operation: "save_summary", path: relativePath, artifact_type: params.artifact_type },
|
|
@@ -11,6 +11,7 @@ export type Phase =
|
|
|
11
11
|
| "discussing"
|
|
12
12
|
| "researching"
|
|
13
13
|
| "planning"
|
|
14
|
+
| "refining"
|
|
14
15
|
| "evaluating-gates"
|
|
15
16
|
| "executing"
|
|
16
17
|
| "verifying"
|
|
@@ -19,6 +20,7 @@ export type Phase =
|
|
|
19
20
|
| "validating-milestone"
|
|
20
21
|
| "completing-milestone"
|
|
21
22
|
| "replanning-slice"
|
|
23
|
+
| "escalating-task"
|
|
22
24
|
| "complete"
|
|
23
25
|
| "paused"
|
|
24
26
|
| "blocked";
|
|
@@ -350,6 +352,51 @@ export interface PhaseSkipPreferences {
|
|
|
350
352
|
reassess_after_slice?: boolean;
|
|
351
353
|
/** When true, auto-mode pauses before each slice for discussion (#789). */
|
|
352
354
|
require_slice_discussion?: boolean;
|
|
355
|
+
/** ADR-011 Phase 2: when true, executors may escalate task-level ambiguity via T##-ESCALATION.json. */
|
|
356
|
+
mid_execution_escalation?: boolean;
|
|
357
|
+
/** ADR-011 Phase 1: when true, plan S01 in full and S02+ as sketches refined just-in-time. */
|
|
358
|
+
progressive_planning?: boolean;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// ─── ADR-011 Phase 2 Escalation ──────────────────────────────────────────
|
|
362
|
+
|
|
363
|
+
export interface EscalationOption {
|
|
364
|
+
/** Short identifier, e.g. "A", "B". Used as the `choice` value in `/gsd escalate resolve <taskId> <id>`. */
|
|
365
|
+
id: string;
|
|
366
|
+
/** One-line label for the option. */
|
|
367
|
+
label: string;
|
|
368
|
+
/** 1-2 sentence description of the tradeoffs of this option. */
|
|
369
|
+
tradeoffs: string;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export interface EscalationArtifact {
|
|
373
|
+
/** Schema version for the artifact file — bumps if we change the shape. */
|
|
374
|
+
version: 1;
|
|
375
|
+
taskId: string;
|
|
376
|
+
sliceId: string;
|
|
377
|
+
milestoneId: string;
|
|
378
|
+
/** The question the executor needs the user to resolve. */
|
|
379
|
+
question: string;
|
|
380
|
+
/** 2-4 options the user can choose between. */
|
|
381
|
+
options: EscalationOption[];
|
|
382
|
+
/** Which option the executor recommends (references `options[].id`). */
|
|
383
|
+
recommendation: string;
|
|
384
|
+
/** Why the executor recommends that option (1-2 sentences). */
|
|
385
|
+
recommendationRationale: string;
|
|
386
|
+
/**
|
|
387
|
+
* When true, the executor proceeds with the recommendation as the answer
|
|
388
|
+
* and the loop continues. User's later choice becomes a carry-forward
|
|
389
|
+
* override for the NEXT task. When false, auto-mode pauses until the
|
|
390
|
+
* user resolves via `/gsd escalate resolve`.
|
|
391
|
+
*/
|
|
392
|
+
continueWithDefault: boolean;
|
|
393
|
+
createdAt: string;
|
|
394
|
+
/** Populated by `/gsd escalate resolve`. */
|
|
395
|
+
respondedAt?: string;
|
|
396
|
+
/** User's choice — either an option id, "accept" (use recommendation), or "reject-blocker". */
|
|
397
|
+
userChoice?: string;
|
|
398
|
+
/** Optional free-text rationale from the user. */
|
|
399
|
+
userRationale?: string;
|
|
353
400
|
}
|
|
354
401
|
|
|
355
402
|
export interface NotificationPreferences {
|
|
@@ -435,6 +482,7 @@ export interface Decision {
|
|
|
435
482
|
rationale: string; // why this choice
|
|
436
483
|
revisable: string; // whether/when revisable
|
|
437
484
|
made_by: DecisionMadeBy; // who made the decision: human, agent, or collaborative
|
|
485
|
+
source?: string; // ADR-011 P2: origin — "discussion" (default) | "planning" | "escalation"
|
|
438
486
|
superseded_by: string | null; // ID of superseding decision, or null
|
|
439
487
|
}
|
|
440
488
|
|
|
@@ -542,6 +590,20 @@ export interface CompleteTaskParams {
|
|
|
542
590
|
knownIssues?: string;
|
|
543
591
|
/** @optional — defaults to false when omitted */
|
|
544
592
|
blockerDiscovered?: boolean;
|
|
593
|
+
/**
|
|
594
|
+
* ADR-011 Phase 2 — optional escalation payload. When populated, the executor
|
|
595
|
+
* is asking the user to resolve an ambiguity. If `continueWithDefault: true`
|
|
596
|
+
* the task still completes (using the recommendation) but an artifact is
|
|
597
|
+
* written for later user review. If false, auto-mode pauses.
|
|
598
|
+
* @optional
|
|
599
|
+
*/
|
|
600
|
+
escalation?: {
|
|
601
|
+
question: string;
|
|
602
|
+
options: EscalationOption[];
|
|
603
|
+
recommendation: string;
|
|
604
|
+
recommendationRationale: string;
|
|
605
|
+
continueWithDefault: boolean;
|
|
606
|
+
};
|
|
545
607
|
/** @optional — defaults to [] when omitted by models with limited tool-calling */
|
|
546
608
|
verificationEvidence?: Array<{
|
|
547
609
|
command: string;
|
|
@@ -32,7 +32,7 @@ export function resolveUokFlags(prefs: GSDPreferences | undefined): UokFlags {
|
|
|
32
32
|
modelPolicy: uok?.model_policy?.enabled ?? true,
|
|
33
33
|
executionGraph: uok?.execution_graph?.enabled ?? true,
|
|
34
34
|
gitops: uok?.gitops?.enabled ?? true,
|
|
35
|
-
gitopsTurnAction: uok?.gitops?.turn_action ?? "
|
|
35
|
+
gitopsTurnAction: uok?.gitops?.turn_action ?? "commit",
|
|
36
36
|
gitopsTurnPush: uok?.gitops?.turn_push === true,
|
|
37
37
|
auditUnified: uok?.audit_unified?.enabled ?? true,
|
|
38
38
|
planV2: uok?.plan_v2?.enabled ?? true,
|
|
@@ -9,6 +9,7 @@ import { join, basename } from "node:path";
|
|
|
9
9
|
import type { AuditWarning, RuntimeError, VerificationCheck, VerificationResult } from "./types.js";
|
|
10
10
|
import { DEFAULT_COMMAND_TIMEOUT_MS } from "./constants.js";
|
|
11
11
|
import { rewriteCommandWithRtk } from "../shared/rtk.js";
|
|
12
|
+
import { normalizePythonCommand } from "./python-resolver.js";
|
|
12
13
|
|
|
13
14
|
/** Maximum bytes of stdout/stderr to retain per command (10 KB). */
|
|
14
15
|
const MAX_OUTPUT_BYTES = 10 * 1024;
|
|
@@ -258,7 +259,7 @@ export function runVerificationGate(options: RunVerificationGateOptions): Verifi
|
|
|
258
259
|
|
|
259
260
|
for (const command of commands) {
|
|
260
261
|
const start = Date.now();
|
|
261
|
-
const rewrittenCommand = rewriteCommandWithRtk(command);
|
|
262
|
+
const rewrittenCommand = normalizePythonCommand(rewriteCommandWithRtk(command));
|
|
262
263
|
// Pass the command string as an argument to the shell explicitly
|
|
263
264
|
// to avoid Node.js DEP0190 (spawnSync with shell: true and no args).
|
|
264
265
|
const shellBin = process.platform === "win32" ? "cmd" : "sh";
|
|
@@ -54,7 +54,10 @@ export type LogComponent =
|
|
|
54
54
|
| "registry" // Rule registry hook state
|
|
55
55
|
| "renderer" // Markdown renderer and projections
|
|
56
56
|
| "safety" // LLM safety harness
|
|
57
|
-
| "ecosystem"
|
|
57
|
+
| "ecosystem" // GSD ecosystem extension loader and dispatch
|
|
58
|
+
| "memory-embeddings" // Memory layer embedding generation
|
|
59
|
+
| "memory-ingest" // Memory layer ingestion pipeline
|
|
60
|
+
| "memory-backfill"; // ADR-013: decisions->memories backfill
|
|
58
61
|
|
|
59
62
|
export interface LogEntry {
|
|
60
63
|
ts: string;
|
|
@@ -117,6 +117,8 @@ export function snapshotState(): StateManifest {
|
|
|
117
117
|
observability_impact: (r["observability_impact"] as string) ?? "",
|
|
118
118
|
sequence: toNumeric(r["sequence"], 0) as number,
|
|
119
119
|
replan_triggered_at: (r["replan_triggered_at"] as string) ?? null,
|
|
120
|
+
is_sketch: toNumeric(r["is_sketch"], 0) as number,
|
|
121
|
+
sketch_scope: (r["sketch_scope"] as string) ?? "",
|
|
120
122
|
}));
|
|
121
123
|
|
|
122
124
|
const rawTasks = db.prepare("SELECT * FROM tasks ORDER BY milestone_id, slice_id, sequence, id").all() as Record<string, unknown>[];
|
|
@@ -146,6 +148,11 @@ export function snapshotState(): StateManifest {
|
|
|
146
148
|
observability_impact: (r["observability_impact"] as string) ?? "",
|
|
147
149
|
full_plan_md: (r["full_plan_md"] as string) ?? "",
|
|
148
150
|
sequence: toNumeric(r["sequence"], 0) as number,
|
|
151
|
+
blocker_source: (r["blocker_source"] as string) ?? "",
|
|
152
|
+
escalation_pending: toNumeric(r["escalation_pending"], 0) as number,
|
|
153
|
+
escalation_awaiting_review: toNumeric(r["escalation_awaiting_review"], 0) as number,
|
|
154
|
+
escalation_artifact_path: (r["escalation_artifact_path"] as string) ?? null,
|
|
155
|
+
escalation_override_applied_at: (r["escalation_override_applied_at"] as string) ?? null,
|
|
149
156
|
}));
|
|
150
157
|
|
|
151
158
|
const rawDecisions = db.prepare("SELECT * FROM decisions ORDER BY seq").all() as Record<string, unknown>[];
|
|
@@ -159,6 +166,7 @@ export function snapshotState(): StateManifest {
|
|
|
159
166
|
rationale: (r["rationale"] as string) ?? "",
|
|
160
167
|
revisable: (r["revisable"] as string) ?? "",
|
|
161
168
|
made_by: (r["made_by"] as string as Decision["made_by"]) ?? "agent",
|
|
169
|
+
source: (r["source"] as string) ?? "discussion",
|
|
162
170
|
superseded_by: (r["superseded_by"] as string) ?? null,
|
|
163
171
|
}));
|
|
164
172
|
|
|
@@ -19,6 +19,7 @@ import { logWarning } from "./workflow-logger.js";
|
|
|
19
19
|
import { isClosedStatus } from "./status-guards.js";
|
|
20
20
|
import { deriveState } from "./state.js";
|
|
21
21
|
import type { GSDState } from "./types.js";
|
|
22
|
+
import { renderRoadmapFromDb } from "./markdown-renderer.js";
|
|
22
23
|
|
|
23
24
|
// ─── Helpers ─────────────────────────────────────────────────────────────
|
|
24
25
|
|
|
@@ -375,11 +376,13 @@ export async function renderStateProjection(basePath: string): Promise<void> {
|
|
|
375
376
|
* All calls are wrapped in try/catch — projection failure is non-fatal per D-02.
|
|
376
377
|
*/
|
|
377
378
|
export async function renderAllProjections(basePath: string, milestoneId: string): Promise<void> {
|
|
378
|
-
//
|
|
379
|
+
// Delegate to the authoritative roadmap renderer — the reduced
|
|
380
|
+
// renderRoadmapProjection omits sections like ## Boundary Map and would
|
|
381
|
+
// clobber the output written by plan-milestone / reassess-roadmap.
|
|
379
382
|
try {
|
|
380
|
-
|
|
383
|
+
await renderRoadmapFromDb(basePath, milestoneId);
|
|
381
384
|
} catch (err) {
|
|
382
|
-
logWarning("projection", `
|
|
385
|
+
logWarning("projection", `renderRoadmapFromDb failed for ${milestoneId}: ${(err as Error).message}`);
|
|
383
386
|
}
|
|
384
387
|
|
|
385
388
|
// Query all slices for this milestone
|
|
@@ -416,15 +419,16 @@ export async function renderAllProjections(basePath: string, milestoneId: string
|
|
|
416
419
|
|
|
417
420
|
/**
|
|
418
421
|
* Check if a projection file exists on disk. If missing, regenerate it from DB.
|
|
419
|
-
* Returns true if the file was regenerated, false if it already existed
|
|
422
|
+
* Returns true if the file was regenerated, false if it already existed or
|
|
423
|
+
* regeneration failed.
|
|
420
424
|
* Satisfies PROJ-05 (corrupted/deleted projections regenerate on demand).
|
|
421
425
|
*/
|
|
422
|
-
export function regenerateIfMissing(
|
|
426
|
+
export async function regenerateIfMissing(
|
|
423
427
|
basePath: string,
|
|
424
428
|
milestoneId: string,
|
|
425
429
|
sliceId: string,
|
|
426
430
|
fileType: "PLAN" | "ROADMAP" | "SUMMARY" | "STATE",
|
|
427
|
-
): boolean {
|
|
431
|
+
): Promise<boolean> {
|
|
428
432
|
let filePath: string;
|
|
429
433
|
|
|
430
434
|
switch (fileType) {
|
|
@@ -466,23 +470,21 @@ export function regenerateIfMissing(
|
|
|
466
470
|
return false;
|
|
467
471
|
}
|
|
468
472
|
|
|
469
|
-
// Regenerate the missing file
|
|
473
|
+
// Regenerate the missing file. Each renderer may swallow its own errors
|
|
474
|
+
// (e.g. renderStateProjection), so confirm the file actually exists on
|
|
475
|
+
// disk before reporting success — true must mean "file is there now".
|
|
470
476
|
try {
|
|
471
477
|
switch (fileType) {
|
|
472
478
|
case "PLAN":
|
|
473
479
|
renderPlanProjection(basePath, milestoneId, sliceId);
|
|
474
|
-
|
|
480
|
+
return existsSync(filePath);
|
|
475
481
|
case "ROADMAP":
|
|
476
|
-
|
|
477
|
-
|
|
482
|
+
await renderRoadmapFromDb(basePath, milestoneId);
|
|
483
|
+
return existsSync(filePath);
|
|
478
484
|
case "STATE":
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
// on the next post-mutation hook cycle.
|
|
482
|
-
void renderStateProjection(basePath);
|
|
483
|
-
return false;
|
|
485
|
+
await renderStateProjection(basePath);
|
|
486
|
+
return existsSync(filePath);
|
|
484
487
|
}
|
|
485
|
-
return true;
|
|
486
488
|
} catch (err) {
|
|
487
489
|
logWarning("projection", `regenerateIfMissing ${fileType} failed: ${(err as Error).message}`);
|
|
488
490
|
return false;
|
|
@@ -66,5 +66,11 @@ Use for: technology evaluation, architecture decisions, "should we X?" questions
|
|
|
66
66
|
- Recommendation with rationale
|
|
67
67
|
- Next steps if the recommendation is accepted
|
|
68
68
|
4. **Present** the recommendation to the user for discussion
|
|
69
|
+
5. **Offer wrap-up:** If the findings are reusable on future work, offer to run
|
|
70
|
+
the `spike-wrap-up` skill to package them as a project-local skill at
|
|
71
|
+
`.claude/skills/<name>/SKILL.md`. That skill will auto-load on future
|
|
72
|
+
similar tasks via `skill-discovery.ts`. If the recommendation is
|
|
73
|
+
decision-only (no reusable guidance), suggest appending a one-liner to
|
|
74
|
+
`.gsd/DECISIONS.md` instead.
|
|
69
75
|
|
|
70
76
|
</process>
|
|
@@ -44,6 +44,7 @@ export interface WorktreeResolverDeps {
|
|
|
44
44
|
) => void;
|
|
45
45
|
createAutoWorktree: (basePath: string, milestoneId: string) => string;
|
|
46
46
|
enterAutoWorktree: (basePath: string, milestoneId: string) => string;
|
|
47
|
+
enterBranchModeForMilestone: (basePath: string, milestoneId: string) => void;
|
|
47
48
|
getAutoWorktreePath: (basePath: string, milestoneId: string) => string | null;
|
|
48
49
|
autoCommitCurrentBranch: (
|
|
49
50
|
basePath: string,
|
|
@@ -162,7 +163,9 @@ export class WorktreeResolver {
|
|
|
162
163
|
return;
|
|
163
164
|
}
|
|
164
165
|
|
|
165
|
-
|
|
166
|
+
const mode = this.deps.getIsolationMode();
|
|
167
|
+
|
|
168
|
+
if (mode === "none") {
|
|
166
169
|
debugLog("WorktreeResolver", {
|
|
167
170
|
action: "enterMilestone",
|
|
168
171
|
milestoneId,
|
|
@@ -183,9 +186,52 @@ export class WorktreeResolver {
|
|
|
183
186
|
debugLog("WorktreeResolver", {
|
|
184
187
|
action: "enterMilestone",
|
|
185
188
|
milestoneId,
|
|
189
|
+
mode,
|
|
186
190
|
basePath,
|
|
187
191
|
});
|
|
188
192
|
|
|
193
|
+
// ── Branch mode: create/checkout milestone branch, stay in project root ──
|
|
194
|
+
if (mode === "branch") {
|
|
195
|
+
try {
|
|
196
|
+
this.deps.enterBranchModeForMilestone(basePath, milestoneId);
|
|
197
|
+
// basePath does not change — no worktree, no chdir.
|
|
198
|
+
// Rebuild GitService so the new HEAD is reflected, then flush any
|
|
199
|
+
// path-keyed caches that may have been populated before the checkout.
|
|
200
|
+
this.rebuildGitService();
|
|
201
|
+
this.deps.invalidateAllCaches();
|
|
202
|
+
debugLog("WorktreeResolver", {
|
|
203
|
+
action: "enterMilestone",
|
|
204
|
+
milestoneId,
|
|
205
|
+
mode: "branch",
|
|
206
|
+
result: "success",
|
|
207
|
+
});
|
|
208
|
+
emitJournalEvent(basePath, {
|
|
209
|
+
ts: new Date().toISOString(),
|
|
210
|
+
flowId: randomUUID(),
|
|
211
|
+
seq: 0,
|
|
212
|
+
eventType: "worktree-skip",
|
|
213
|
+
data: { milestoneId, reason: "branch-mode-no-worktree" },
|
|
214
|
+
});
|
|
215
|
+
ctx.notify(`Switched to branch milestone/${milestoneId}.`, "info");
|
|
216
|
+
} catch (err) {
|
|
217
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
218
|
+
debugLog("WorktreeResolver", {
|
|
219
|
+
action: "enterMilestone",
|
|
220
|
+
milestoneId,
|
|
221
|
+
mode: "branch",
|
|
222
|
+
result: "error",
|
|
223
|
+
error: msg,
|
|
224
|
+
});
|
|
225
|
+
ctx.notify(
|
|
226
|
+
`Branch isolation setup for ${milestoneId} failed: ${msg}. Continuing on current branch.`,
|
|
227
|
+
"warning",
|
|
228
|
+
);
|
|
229
|
+
this.s.isolationDegraded = true;
|
|
230
|
+
}
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// ── Worktree mode ─────────────────────────────────────────────────────────
|
|
189
235
|
try {
|
|
190
236
|
const existingPath = this.deps.getAutoWorktreePath(basePath, milestoneId);
|
|
191
237
|
let wtPath: string;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import type { ChannelAdapter, RemotePrompt, RemoteQuestion, RemoteAnswer } from "./types.js";
|
|
7
|
+
import type { RoundResult } from "../shared/interview-ui.js";
|
|
7
8
|
import { resolveRemoteConfig, type ResolvedConfig } from "./config.js";
|
|
8
9
|
import { DiscordAdapter } from "./discord-adapter.js";
|
|
9
10
|
import { SlackAdapter } from "./slack-adapter.js";
|
|
@@ -135,12 +136,23 @@ export async function tryRemoteQuestions(
|
|
|
135
136
|
promptId: prompt.id,
|
|
136
137
|
threadUrl: dispatch.ref.threadUrl ?? null,
|
|
137
138
|
questions,
|
|
138
|
-
response: answer,
|
|
139
|
+
response: toRoundResultResponse(answer),
|
|
139
140
|
status: "answered",
|
|
140
141
|
},
|
|
141
142
|
};
|
|
142
143
|
}
|
|
143
144
|
|
|
145
|
+
/** Normalize a RemoteAnswer to the RoundResult shape consumed by the gsd write-gate hook. */
|
|
146
|
+
export function toRoundResultResponse(answer: RemoteAnswer): RoundResult {
|
|
147
|
+
const normalized: RoundResult["answers"] = {};
|
|
148
|
+
for (const [id, data] of Object.entries(answer.answers)) {
|
|
149
|
+
const list = data.answers ?? [];
|
|
150
|
+
const selected: string | string[] = list.length <= 1 ? (list[0] ?? "") : list;
|
|
151
|
+
normalized[id] = { selected, notes: data.user_note ?? "" };
|
|
152
|
+
}
|
|
153
|
+
return { endInterview: false, answers: normalized };
|
|
154
|
+
}
|
|
155
|
+
|
|
144
156
|
function createPrompt(questions: QuestionInput[], config: ResolvedConfig): RemotePrompt {
|
|
145
157
|
const createdAt = Date.now();
|
|
146
158
|
return {
|