@opengsd/gsd-pi 1.2.0-dev.fbdca60b → 1.3.0-dev.65546769
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 +13 -7
- package/dist/cli.js +28 -1
- package/dist/headless-context.js +0 -1
- package/dist/headless-events.d.ts +16 -1
- package/dist/headless-events.js +19 -2
- package/dist/headless.js +8 -1
- package/dist/help-text.js +29 -0
- package/dist/hermes-integration-install.d.ts +17 -0
- package/dist/hermes-integration-install.js +199 -0
- package/dist/jiti-workspace-aliases.d.ts +11 -2
- package/dist/jiti-workspace-aliases.js +19 -3
- package/dist/onboarding.js +9 -4
- package/dist/provider-migrations.d.ts +23 -0
- package/dist/provider-migrations.js +41 -0
- package/dist/read-cli.d.ts +23 -0
- package/dist/read-cli.js +90 -0
- package/dist/resource-loader.d.ts +3 -3
- package/dist/resource-loader.js +4 -13
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/GSD-WORKFLOW.md +22 -22
- package/dist/resources/extensions/claude-code-cli/index.js +7 -1
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +73 -20
- package/dist/resources/extensions/google-cli/stream-adapter.js +16 -1
- package/dist/resources/extensions/gsd/auto/dispatch-history.js +6 -1
- package/dist/resources/extensions/gsd/auto/loop.js +67 -2
- package/dist/resources/extensions/gsd/auto/orchestrator.js +50 -10
- package/dist/resources/extensions/gsd/auto/pre-dispatch.js +8 -0
- package/dist/resources/extensions/gsd/auto/workflow-kernel.js +15 -1
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +81 -19
- package/dist/resources/extensions/gsd/auto-closeout-messaging.js +90 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +255 -431
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +15 -3
- package/dist/resources/extensions/gsd/auto-dispatch.js +47 -8
- package/dist/resources/extensions/gsd/auto-model-selection.js +14 -8
- package/dist/resources/extensions/gsd/auto-post-unit.js +39 -29
- package/dist/resources/extensions/gsd/auto-prompts.js +44 -30
- package/dist/resources/extensions/gsd/auto-recovery.js +118 -40
- package/dist/resources/extensions/gsd/auto-runtime-state.js +13 -0
- package/dist/resources/extensions/gsd/auto-start.js +58 -31
- package/dist/resources/extensions/gsd/auto-verification.js +5 -2
- package/dist/resources/extensions/gsd/auto-worktree.js +149 -91
- package/dist/resources/extensions/gsd/auto.js +97 -31
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +42 -54
- package/dist/resources/extensions/gsd/bootstrap/fallback-continuation.js +25 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +24 -2
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +108 -9
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +164 -44
- package/dist/resources/extensions/gsd/bootstrap/tool-search-shim.js +22 -3
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +113 -27
- package/dist/resources/extensions/gsd/closeout-consistency-gate.js +92 -4
- package/dist/resources/extensions/gsd/closeout-wizard.js +8 -3
- package/dist/resources/extensions/gsd/codebase-generator.js +5 -8
- package/dist/resources/extensions/gsd/commands/catalog.js +6 -0
- package/dist/resources/extensions/gsd/commands/dispatcher.js +3 -0
- package/dist/resources/extensions/gsd/commands/gsd-core-aliases-handler.js +39 -0
- package/dist/resources/extensions/gsd/commands/gsd-core-aliases.js +44 -0
- package/dist/resources/extensions/gsd/commands/handlers/core.js +52 -8
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +227 -3
- package/dist/resources/extensions/gsd/commands-cmux.js +3 -1
- package/dist/resources/extensions/gsd/commands-gsd-core.js +868 -0
- package/dist/resources/extensions/gsd/commands-handlers.js +67 -1
- package/dist/resources/extensions/gsd/commands-maintenance.js +79 -2
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +14 -1
- package/dist/resources/extensions/gsd/commands-verdict.js +17 -11
- package/dist/resources/extensions/gsd/compat/compat-marker.js +172 -0
- package/dist/resources/extensions/gsd/compat/index.js +3 -0
- package/dist/resources/extensions/gsd/compat/planning-compat.js +142 -0
- package/dist/resources/extensions/gsd/config-overlay.js +11 -8
- package/dist/resources/extensions/gsd/consent-question.js +12 -0
- package/dist/resources/extensions/gsd/consent-verdict.js +10 -0
- package/dist/resources/extensions/gsd/dashboard-overlay.js +39 -3
- package/dist/resources/extensions/gsd/db/engine.js +27 -0
- package/dist/resources/extensions/gsd/db/queries.js +54 -0
- package/dist/resources/extensions/gsd/db/unit-dispatches.js +22 -1
- package/dist/resources/extensions/gsd/db/writers/reconcile.js +19 -1
- package/dist/resources/extensions/gsd/db-workspace.js +13 -1
- package/dist/resources/extensions/gsd/discussion-handoff.js +9 -5
- package/dist/resources/extensions/gsd/doctor-git-checks.js +30 -4
- package/dist/resources/extensions/gsd/doctor-providers.js +1 -1
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +13 -24
- package/dist/resources/extensions/gsd/doctor.js +28 -7
- package/dist/resources/extensions/gsd/error-classifier.js +13 -1
- package/dist/resources/extensions/gsd/escalation.js +11 -4
- package/dist/resources/extensions/gsd/export-html.js +10 -3
- package/dist/resources/extensions/gsd/export.js +73 -0
- package/dist/resources/extensions/gsd/file-lock.js +1 -1
- package/dist/resources/extensions/gsd/flat-phase-migration.js +176 -0
- package/dist/resources/extensions/gsd/forensics.js +2 -1
- package/dist/resources/extensions/gsd/git-service.js +7 -4
- package/dist/resources/extensions/gsd/gitignore.js +6 -2
- package/dist/resources/extensions/gsd/guidance.js +7 -7
- package/dist/resources/extensions/gsd/guided-flow.js +11 -6
- package/dist/resources/extensions/gsd/layout-policy.js +75 -0
- package/dist/resources/extensions/gsd/markdown-renderer.js +391 -116
- package/dist/resources/extensions/gsd/mcp-filter.js +44 -10
- package/dist/resources/extensions/gsd/md-importer.js +153 -51
- package/dist/resources/extensions/gsd/metrics.js +19 -11
- package/dist/resources/extensions/gsd/migrate/layout-detect.js +32 -0
- package/dist/resources/extensions/gsd/migrate/planning-writer.js +203 -0
- package/dist/resources/extensions/gsd/migrate-external.js +51 -6
- package/dist/resources/extensions/gsd/migration-auto-check.js +5 -14
- package/dist/resources/extensions/gsd/milestone-actions.js +5 -3
- package/dist/resources/extensions/gsd/milestone-closeout.js +12 -2
- package/dist/resources/extensions/gsd/milestone-ids.js +50 -19
- package/dist/resources/extensions/gsd/milestone-planning-persistence.js +8 -0
- package/dist/resources/extensions/gsd/milestone-validation-verdict.js +7 -4
- package/dist/resources/extensions/gsd/model-router.js +79 -20
- package/dist/resources/extensions/gsd/notification-store.js +22 -29
- package/dist/resources/extensions/gsd/notifications.js +36 -7
- package/dist/resources/extensions/gsd/observability-validator.js +12 -4
- package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +133 -35
- package/dist/resources/extensions/gsd/parsers-legacy.js +40 -14
- package/dist/resources/extensions/gsd/paths.js +356 -44
- package/dist/resources/extensions/gsd/planning-depth.js +2 -1
- package/dist/resources/extensions/gsd/post-execution-checks.js +26 -3
- package/dist/resources/extensions/gsd/preferences-models.js +34 -14
- package/dist/resources/extensions/gsd/preferences.js +148 -13
- package/dist/resources/extensions/gsd/prompts/ai-integration-phase.md +28 -0
- package/dist/resources/extensions/gsd/prompts/audit-fix.md +39 -0
- package/dist/resources/extensions/gsd/prompts/audit-milestone.md +26 -0
- package/dist/resources/extensions/gsd/prompts/audit-uat.md +24 -0
- package/dist/resources/extensions/gsd/prompts/autonomous.md +31 -0
- package/dist/resources/extensions/gsd/prompts/code-review.md +37 -0
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +8 -2
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +24 -15
- package/dist/resources/extensions/gsd/prompts/discuss-phase.md +31 -0
- package/dist/resources/extensions/gsd/prompts/docs-update.md +13 -0
- package/dist/resources/extensions/gsd/prompts/execute-phase.md +33 -0
- package/dist/resources/extensions/gsd/prompts/execute-task.md +5 -1
- package/dist/resources/extensions/gsd/prompts/explore.md +58 -0
- package/dist/resources/extensions/gsd/prompts/graphify.md +27 -0
- package/dist/resources/extensions/gsd/prompts/health.md +37 -0
- package/dist/resources/extensions/gsd/prompts/import.md +30 -0
- package/dist/resources/extensions/gsd/prompts/inbox.md +27 -0
- package/dist/resources/extensions/gsd/prompts/ingest-docs.md +30 -0
- package/dist/resources/extensions/gsd/prompts/manager.md +21 -0
- package/dist/resources/extensions/gsd/prompts/map-codebase.md +42 -0
- package/dist/resources/extensions/gsd/prompts/milestone-summary.md +27 -0
- package/dist/resources/extensions/gsd/prompts/mvp-phase.md +23 -0
- package/dist/resources/extensions/gsd/prompts/pause-work.md +24 -0
- package/dist/resources/extensions/gsd/prompts/phase.md +22 -0
- package/dist/resources/extensions/gsd/prompts/plan-phase.md +34 -0
- package/dist/resources/extensions/gsd/prompts/plan-review-convergence.md +34 -0
- package/dist/resources/extensions/gsd/prompts/profile-user.md +28 -0
- package/dist/resources/extensions/gsd/prompts/progress.md +30 -0
- package/dist/resources/extensions/gsd/prompts/quick-task.md +1 -1
- package/dist/resources/extensions/gsd/prompts/reactive-execute.md +2 -2
- package/dist/resources/extensions/gsd/prompts/resume-work.md +20 -0
- package/dist/resources/extensions/gsd/prompts/review-backlog.md +21 -0
- package/dist/resources/extensions/gsd/prompts/review.md +27 -0
- package/dist/resources/extensions/gsd/prompts/run-uat.md +5 -1
- package/dist/resources/extensions/gsd/prompts/secure-phase.md +24 -0
- package/dist/resources/extensions/gsd/prompts/settings.md +24 -0
- package/dist/resources/extensions/gsd/prompts/sketch.md +59 -0
- package/dist/resources/extensions/gsd/prompts/spec-phase.md +29 -0
- package/dist/resources/extensions/gsd/prompts/spike.md +59 -0
- package/dist/resources/extensions/gsd/prompts/stats.md +43 -0
- package/dist/resources/extensions/gsd/prompts/surface.md +25 -0
- package/dist/resources/extensions/gsd/prompts/thread.md +24 -0
- package/dist/resources/extensions/gsd/prompts/triage-captures.md +1 -1
- package/dist/resources/extensions/gsd/prompts/ui-phase.md +29 -0
- package/dist/resources/extensions/gsd/prompts/ui-review.md +29 -0
- package/dist/resources/extensions/gsd/prompts/ultraplan-phase.md +24 -0
- package/dist/resources/extensions/gsd/prompts/validate-phase.md +26 -0
- package/dist/resources/extensions/gsd/prompts/verify-work.md +24 -0
- package/dist/resources/extensions/gsd/prompts/workspace.md +22 -0
- package/dist/resources/extensions/gsd/prompts/workstreams.md +24 -0
- package/dist/resources/extensions/gsd/provider-error-guidance.js +24 -0
- package/dist/resources/extensions/gsd/queue-order.js +3 -2
- package/dist/resources/extensions/gsd/recovery-classification.js +8 -0
- package/dist/resources/extensions/gsd/roadmap-slices.js +1 -1
- package/dist/resources/extensions/gsd/safety/content-validator.js +2 -1
- package/dist/resources/extensions/gsd/safety/evidence-cross-ref.js +43 -1
- package/dist/resources/extensions/gsd/service-tier.js +2 -1
- package/dist/resources/extensions/gsd/session-lock.js +11 -9
- package/dist/resources/extensions/gsd/skills/gsd-headless/SKILL.md +3 -0
- package/dist/resources/extensions/gsd/skills/gsd-headless/references/commands.md +51 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/artifact-db.js +51 -10
- package/dist/resources/extensions/gsd/state-reconciliation/drift/completion.js +24 -3
- package/dist/resources/extensions/gsd/state-reconciliation/drift/external-markdown-edit.js +82 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/external-planning-edit.js +142 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/project-md.js +19 -6
- package/dist/resources/extensions/gsd/state-reconciliation/drift/roadmap.js +2 -2
- package/dist/resources/extensions/gsd/state-reconciliation/drift/stale-render.js +95 -19
- package/dist/resources/extensions/gsd/state-reconciliation/index.js +36 -3
- package/dist/resources/extensions/gsd/state-reconciliation/registry.js +12 -0
- package/dist/resources/extensions/gsd/state.js +48 -17
- package/dist/resources/extensions/gsd/sync-lock.js +11 -18
- package/dist/resources/extensions/gsd/tool-surface-readiness.js +205 -16
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +4 -2
- package/dist/resources/extensions/gsd/tools/complete-slice.js +12 -2
- package/dist/resources/extensions/gsd/tools/complete-task.js +15 -1
- package/dist/resources/extensions/gsd/tools/exec-tool.js +2 -109
- package/dist/resources/extensions/gsd/tools/plan-slice.js +1 -3
- package/dist/resources/extensions/gsd/tools/plan-task.js +16 -1
- package/dist/resources/extensions/gsd/tools/reassess-roadmap.js +9 -3
- package/dist/resources/extensions/gsd/tools/validate-milestone.js +8 -3
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +44 -5
- package/dist/resources/extensions/gsd/triage-resolution.js +14 -7
- package/dist/resources/extensions/gsd/tui/render-kit.js +38 -13
- package/dist/resources/extensions/gsd/undo.js +8 -9
- package/dist/resources/extensions/gsd/unit-registry.js +27 -3
- package/dist/resources/extensions/gsd/unmerged-milestone-guard.js +58 -2
- package/dist/resources/extensions/gsd/validation-block-guard.js +45 -0
- package/dist/resources/extensions/gsd/visualizer-data.js +35 -0
- package/dist/resources/extensions/gsd/visualizer-views.js +21 -2
- package/dist/resources/extensions/gsd/workflow-logger.js +4 -0
- package/dist/resources/extensions/gsd/workflow-mcp.js +9 -1
- package/dist/resources/extensions/gsd/workflow-projections.js +25 -4
- package/dist/resources/extensions/gsd/worktree-command.js +6 -6
- package/dist/resources/extensions/gsd/worktree-health.js +6 -3
- package/dist/resources/extensions/gsd/worktree-manager.js +109 -16
- package/dist/resources/extensions/gsd/worktree-safety.js +20 -11
- package/dist/resources/extensions/gsd/worktree-shell-guard.js +113 -0
- package/dist/resources/extensions/mcp-client/manager.js +3 -3
- package/dist/resources/extensions/search-the-web/index.js +41 -9
- package/dist/resources/extensions/search-the-web/native-search.js +18 -4
- package/dist/resources/extensions/shared/gsd-browser-cli.js +40 -2
- package/dist/resources/extensions/subagent/index.js +20 -15
- package/dist/resources/extensions/subagent/worktree-cwd.js +31 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/update-check.js +15 -4
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +8 -8
- 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 +3 -3
- 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.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +8 -8
- package/dist/web/standalone/.next/server/chunks/1128.js +1 -1
- package/dist/web/standalone/.next/server/chunks/5124.js +1 -1
- package/dist/web/standalone/.next/server/chunks/8357.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/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/{4283.e4873b058df143a1.js → 4283.8e446784528ed9dc.js} +2 -2
- package/dist/web/standalone/.next/static/chunks/8785.481aa5869991b760.js +1 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-f0285ce91d4ec9ef.js → webpack-f46ea08200a0227e.js} +1 -1
- package/dist/web/standalone/node_modules/@gsd/native/package.json +1 -1
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web-mode.d.ts +3 -1
- package/dist/web-mode.js +7 -5
- package/integrations/hermes/README.md +48 -0
- package/integrations/hermes/docs/setup.md +272 -0
- package/integrations/hermes/docs/upstream-hermes-pr.md +40 -0
- package/integrations/hermes/open_gsd_hermes/__init__.py +105 -0
- package/integrations/hermes/open_gsd_hermes/binding.py +107 -0
- package/integrations/hermes/open_gsd_hermes/commands.py +186 -0
- package/integrations/hermes/open_gsd_hermes/config.py +59 -0
- package/integrations/hermes/open_gsd_hermes/credentials.py +51 -0
- package/integrations/hermes/open_gsd_hermes/cron.py +85 -0
- package/integrations/hermes/open_gsd_hermes/formatting.py +13 -0
- package/integrations/hermes/open_gsd_hermes/gsd_client.py +269 -0
- package/integrations/hermes/open_gsd_hermes/inject.py +31 -0
- package/integrations/hermes/open_gsd_hermes/memory.py +66 -0
- package/integrations/hermes/open_gsd_hermes/notifications.py +71 -0
- package/integrations/hermes/open_gsd_hermes/snapshot.py +42 -0
- package/integrations/hermes/open_gsd_hermes/supervisor.py +180 -0
- package/integrations/hermes/open_gsd_hermes/types.py +100 -0
- package/integrations/hermes/plugin.yaml +38 -0
- package/integrations/hermes/pyproject.toml +32 -0
- package/integrations/hermes/scripts/preflight.sh +92 -0
- package/integrations/hermes/tests/fixtures/minimal-project/.gsd/STATE.md +17 -0
- package/integrations/hermes/tests/golden/memory_prefetch.txt +5 -0
- package/integrations/hermes/tests/golden/snapshot.txt +8 -0
- package/integrations/hermes/tests/test_binding.py +103 -0
- package/integrations/hermes/tests/test_config.py +36 -0
- package/integrations/hermes/tests/test_cron.py +34 -0
- package/integrations/hermes/tests/test_gsd_client_cache.py +120 -0
- package/integrations/hermes/tests/test_memory.py +59 -0
- package/integrations/hermes/tests/test_read_cli_contract.py +50 -0
- package/integrations/hermes/tests/test_register.py +56 -0
- package/integrations/hermes/tests/test_snapshot.py +53 -0
- package/integrations/hermes/tests/test_supervisor_fsm.py +581 -0
- package/package.json +8 -7
- package/packages/cloud-mcp-gateway/dist/runtime-registry.d.ts +8 -0
- package/packages/cloud-mcp-gateway/dist/runtime-registry.d.ts.map +1 -1
- package/packages/cloud-mcp-gateway/dist/runtime-registry.js +19 -2
- package/packages/cloud-mcp-gateway/dist/runtime-registry.js.map +1 -1
- package/packages/cloud-mcp-gateway/dist/runtime-registry.test.js +71 -2
- package/packages/cloud-mcp-gateway/dist/runtime-registry.test.js.map +1 -1
- package/packages/cloud-mcp-gateway/package.json +2 -2
- package/packages/contracts/package.json +1 -1
- package/packages/daemon/package.json +4 -4
- package/packages/gsd-agent-core/dist/sdk.d.ts.map +1 -1
- package/packages/gsd-agent-core/dist/sdk.js +6 -2
- package/packages/gsd-agent-core/dist/sdk.js.map +1 -1
- package/packages/gsd-agent-core/package.json +5 -5
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.d.ts +5 -5
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.js +12 -24
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bash-execution.js +5 -5
- package/packages/gsd-agent-modes/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.d.ts +3 -3
- package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.js +20 -11
- package/packages/gsd-agent-modes/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-turn-connect.d.ts +4 -3
- package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-turn-connect.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-turn-connect.js +5 -54
- package/packages/gsd-agent-modes/dist/modes/interactive/components/chat-turn-connect.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.d.ts +2 -4
- package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.js +2 -4
- package/packages/gsd-agent-modes/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.d.ts +2 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.js +4 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.d.ts +9 -12
- package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.js +100 -166
- package/packages/gsd-agent-modes/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-progress-state.d.ts +2 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-progress-state.d.ts.map +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-progress-state.js +4 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-progress-state.js.map +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-status-widget.d.ts +23 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-status-widget.d.ts.map +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-status-widget.js +178 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/gsd-status-widget.js.map +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts +8 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js +21 -9
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -3
- package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.js +2 -3
- package/packages/gsd-agent-modes/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.d.ts +3 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js +37 -15
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.d.ts +69 -3
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js +223 -32
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.d.ts +3 -3
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.js +19 -19
- package/packages/gsd-agent-modes/dist/modes/interactive/components/user-message.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts +3 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js +26 -10
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.js +12 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/extension-ui-controller.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.js +5 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-autocomplete.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-autocomplete.js +3 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.js +3 -5
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-dialogs.js +2 -2
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-widgets.d.ts +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-widgets.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-widgets.js +25 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-extension-widgets.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-key-handlers.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-key-handlers.js +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-key-handlers.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-init.d.ts +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-init.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-init.js +20 -49
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-init.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.d.ts +4 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-state.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.d.ts +9 -2
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js +31 -6
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-ui-messaging.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-ui-messaging.js +0 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-ui-messaging.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.js +3 -0
- package/packages/gsd-agent-modes/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/packages/gsd-agent-modes/package.json +7 -7
- package/packages/mcp-server/README.md +10 -0
- package/packages/mcp-server/dist/cli-errors.d.ts +11 -0
- package/packages/mcp-server/dist/cli-errors.d.ts.map +1 -1
- package/packages/mcp-server/dist/cli-errors.js +12 -0
- package/packages/mcp-server/dist/cli-errors.js.map +1 -1
- package/packages/mcp-server/dist/cli-runner.d.ts.map +1 -1
- package/packages/mcp-server/dist/cli-runner.js +33 -0
- package/packages/mcp-server/dist/cli-runner.js.map +1 -1
- package/packages/mcp-server/dist/cli.d.ts +1 -0
- package/packages/mcp-server/dist/cli.d.ts.map +1 -1
- package/packages/mcp-server/dist/cli.js +1 -0
- package/packages/mcp-server/dist/cli.js.map +1 -1
- package/packages/mcp-server/dist/server.d.ts +29 -0
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +82 -3
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/package.json +21 -5
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +9 -0
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.d.ts +28 -2
- package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.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/runner.d.ts +5 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +3 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.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/package.json +8 -8
- package/packages/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/packages/pi-tui/dist/autocomplete.js +6 -1
- package/packages/pi-tui/dist/autocomplete.js.map +1 -1
- package/packages/pi-tui/dist/components/input.js +1 -1
- package/packages/pi-tui/dist/components/input.js.map +1 -1
- package/packages/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/loader.js +1 -0
- package/packages/pi-tui/dist/components/loader.js.map +1 -1
- package/packages/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/select-list.js +8 -2
- package/packages/pi-tui/dist/components/select-list.js.map +1 -1
- package/packages/pi-tui/package.json +2 -2
- package/packages/rpc-client/package.json +2 -2
- package/pkg/package.json +1 -1
- package/src/resources/GSD-WORKFLOW.md +22 -22
- package/src/resources/extensions/browser-tools/tests/gsd-browser-launch-config.test.mjs +80 -0
- package/src/resources/extensions/claude-code-cli/index.ts +8 -1
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +83 -20
- package/src/resources/extensions/claude-code-cli/tests/index.test.ts +47 -0
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +182 -10
- package/src/resources/extensions/google-cli/stream-adapter.ts +22 -1
- package/src/resources/extensions/gsd/auto/dispatch-history.ts +19 -1
- package/src/resources/extensions/gsd/auto/loop.ts +69 -2
- package/src/resources/extensions/gsd/auto/orchestrator.ts +63 -10
- package/src/resources/extensions/gsd/auto/pre-dispatch.ts +13 -1
- package/src/resources/extensions/gsd/auto/workflow-kernel.ts +25 -3
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +83 -20
- package/src/resources/extensions/gsd/auto-closeout-messaging.ts +90 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +310 -454
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +15 -2
- package/src/resources/extensions/gsd/auto-dispatch.ts +57 -12
- package/src/resources/extensions/gsd/auto-model-selection.ts +27 -5
- package/src/resources/extensions/gsd/auto-post-unit.ts +52 -31
- package/src/resources/extensions/gsd/auto-prompts.ts +45 -30
- package/src/resources/extensions/gsd/auto-recovery.ts +126 -37
- package/src/resources/extensions/gsd/auto-runtime-state.ts +13 -0
- package/src/resources/extensions/gsd/auto-start.ts +82 -36
- package/src/resources/extensions/gsd/auto-verification.ts +5 -7
- package/src/resources/extensions/gsd/auto-worktree.ts +83 -15
- package/src/resources/extensions/gsd/auto.ts +133 -32
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +45 -61
- package/src/resources/extensions/gsd/bootstrap/fallback-continuation.ts +31 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +23 -2
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +123 -9
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +185 -46
- package/src/resources/extensions/gsd/bootstrap/tool-search-shim.ts +21 -3
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +138 -29
- package/src/resources/extensions/gsd/closeout-consistency-gate.ts +107 -3
- package/src/resources/extensions/gsd/closeout-wizard.ts +11 -2
- package/src/resources/extensions/gsd/codebase-generator.ts +6 -9
- package/src/resources/extensions/gsd/commands/catalog.ts +6 -0
- package/src/resources/extensions/gsd/commands/dispatcher.ts +3 -0
- package/src/resources/extensions/gsd/commands/gsd-core-aliases-handler.ts +48 -0
- package/src/resources/extensions/gsd/commands/gsd-core-aliases.ts +63 -0
- package/src/resources/extensions/gsd/commands/handlers/core.ts +58 -8
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +230 -3
- package/src/resources/extensions/gsd/commands-cmux.ts +3 -0
- package/src/resources/extensions/gsd/commands-gsd-core.ts +1142 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +76 -1
- package/src/resources/extensions/gsd/commands-maintenance.ts +98 -2
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +13 -0
- package/src/resources/extensions/gsd/commands-verdict.ts +16 -15
- package/src/resources/extensions/gsd/compat/compat-marker.ts +210 -0
- package/src/resources/extensions/gsd/compat/index.ts +12 -0
- package/src/resources/extensions/gsd/compat/planning-compat.ts +168 -0
- package/src/resources/extensions/gsd/config-overlay.ts +24 -9
- package/src/resources/extensions/gsd/consent-question.ts +11 -1
- package/src/resources/extensions/gsd/consent-verdict.ts +30 -1
- package/src/resources/extensions/gsd/dashboard-overlay.ts +41 -4
- package/src/resources/extensions/gsd/db/engine.ts +26 -0
- package/src/resources/extensions/gsd/db/queries.ts +78 -0
- package/src/resources/extensions/gsd/db/unit-dispatches.ts +24 -0
- package/src/resources/extensions/gsd/db/writers/reconcile.ts +24 -1
- package/src/resources/extensions/gsd/db-workspace.ts +15 -0
- package/src/resources/extensions/gsd/discussion-handoff.ts +9 -5
- package/src/resources/extensions/gsd/doctor-git-checks.ts +28 -3
- package/src/resources/extensions/gsd/doctor-providers.ts +1 -1
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +12 -25
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +30 -7
- package/src/resources/extensions/gsd/error-classifier.ts +14 -1
- package/src/resources/extensions/gsd/escalation.ts +9 -4
- package/src/resources/extensions/gsd/export-html.ts +11 -4
- package/src/resources/extensions/gsd/export.ts +88 -1
- package/src/resources/extensions/gsd/file-lock.ts +1 -1
- package/src/resources/extensions/gsd/flat-phase-migration.ts +205 -0
- package/src/resources/extensions/gsd/forensics.ts +2 -1
- package/src/resources/extensions/gsd/git-constants.ts +1 -1
- package/src/resources/extensions/gsd/git-service.ts +7 -2
- package/src/resources/extensions/gsd/gitignore.ts +7 -3
- package/src/resources/extensions/gsd/guidance.ts +7 -7
- package/src/resources/extensions/gsd/guided-flow.ts +11 -6
- package/src/resources/extensions/gsd/layout-policy.ts +85 -0
- package/src/resources/extensions/gsd/markdown-renderer.ts +404 -104
- package/src/resources/extensions/gsd/mcp-filter.ts +59 -10
- package/src/resources/extensions/gsd/md-importer.ts +215 -65
- package/src/resources/extensions/gsd/metrics.ts +23 -10
- package/src/resources/extensions/gsd/migrate/layout-detect.ts +38 -0
- package/src/resources/extensions/gsd/migrate/planning-writer.ts +259 -0
- package/src/resources/extensions/gsd/migrate-external.ts +49 -6
- package/src/resources/extensions/gsd/migration-auto-check.ts +4 -13
- package/src/resources/extensions/gsd/milestone-actions.ts +5 -2
- package/src/resources/extensions/gsd/milestone-closeout.ts +13 -2
- package/src/resources/extensions/gsd/milestone-ids.ts +49 -19
- package/src/resources/extensions/gsd/milestone-planning-persistence.ts +8 -0
- package/src/resources/extensions/gsd/milestone-validation-verdict.ts +7 -9
- package/src/resources/extensions/gsd/model-router.ts +98 -18
- package/src/resources/extensions/gsd/notification-store.ts +17 -28
- package/src/resources/extensions/gsd/notifications.ts +37 -6
- package/src/resources/extensions/gsd/observability-validator.ts +12 -4
- package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +151 -31
- package/src/resources/extensions/gsd/parsers-legacy.ts +42 -15
- package/src/resources/extensions/gsd/paths.ts +348 -39
- package/src/resources/extensions/gsd/planning-depth.ts +2 -1
- package/src/resources/extensions/gsd/post-execution-checks.ts +43 -3
- package/src/resources/extensions/gsd/preferences-models.ts +47 -13
- package/src/resources/extensions/gsd/preferences.ts +188 -14
- package/src/resources/extensions/gsd/prompts/ai-integration-phase.md +28 -0
- package/src/resources/extensions/gsd/prompts/audit-fix.md +39 -0
- package/src/resources/extensions/gsd/prompts/audit-milestone.md +26 -0
- package/src/resources/extensions/gsd/prompts/audit-uat.md +24 -0
- package/src/resources/extensions/gsd/prompts/autonomous.md +31 -0
- package/src/resources/extensions/gsd/prompts/code-review.md +37 -0
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +8 -2
- package/src/resources/extensions/gsd/prompts/complete-slice.md +24 -15
- package/src/resources/extensions/gsd/prompts/discuss-phase.md +31 -0
- package/src/resources/extensions/gsd/prompts/docs-update.md +13 -0
- package/src/resources/extensions/gsd/prompts/execute-phase.md +33 -0
- package/src/resources/extensions/gsd/prompts/execute-task.md +5 -1
- package/src/resources/extensions/gsd/prompts/explore.md +58 -0
- package/src/resources/extensions/gsd/prompts/graphify.md +27 -0
- package/src/resources/extensions/gsd/prompts/health.md +37 -0
- package/src/resources/extensions/gsd/prompts/import.md +30 -0
- package/src/resources/extensions/gsd/prompts/inbox.md +27 -0
- package/src/resources/extensions/gsd/prompts/ingest-docs.md +30 -0
- package/src/resources/extensions/gsd/prompts/manager.md +21 -0
- package/src/resources/extensions/gsd/prompts/map-codebase.md +42 -0
- package/src/resources/extensions/gsd/prompts/milestone-summary.md +27 -0
- package/src/resources/extensions/gsd/prompts/mvp-phase.md +23 -0
- package/src/resources/extensions/gsd/prompts/pause-work.md +24 -0
- package/src/resources/extensions/gsd/prompts/phase.md +22 -0
- package/src/resources/extensions/gsd/prompts/plan-phase.md +34 -0
- package/src/resources/extensions/gsd/prompts/plan-review-convergence.md +34 -0
- package/src/resources/extensions/gsd/prompts/profile-user.md +28 -0
- package/src/resources/extensions/gsd/prompts/progress.md +30 -0
- package/src/resources/extensions/gsd/prompts/quick-task.md +1 -1
- package/src/resources/extensions/gsd/prompts/reactive-execute.md +2 -2
- package/src/resources/extensions/gsd/prompts/resume-work.md +20 -0
- package/src/resources/extensions/gsd/prompts/review-backlog.md +21 -0
- package/src/resources/extensions/gsd/prompts/review.md +27 -0
- package/src/resources/extensions/gsd/prompts/run-uat.md +5 -1
- package/src/resources/extensions/gsd/prompts/secure-phase.md +24 -0
- package/src/resources/extensions/gsd/prompts/settings.md +24 -0
- package/src/resources/extensions/gsd/prompts/sketch.md +59 -0
- package/src/resources/extensions/gsd/prompts/spec-phase.md +29 -0
- package/src/resources/extensions/gsd/prompts/spike.md +59 -0
- package/src/resources/extensions/gsd/prompts/stats.md +43 -0
- package/src/resources/extensions/gsd/prompts/surface.md +25 -0
- package/src/resources/extensions/gsd/prompts/thread.md +24 -0
- package/src/resources/extensions/gsd/prompts/triage-captures.md +1 -1
- package/src/resources/extensions/gsd/prompts/ui-phase.md +29 -0
- package/src/resources/extensions/gsd/prompts/ui-review.md +29 -0
- package/src/resources/extensions/gsd/prompts/ultraplan-phase.md +24 -0
- package/src/resources/extensions/gsd/prompts/validate-phase.md +26 -0
- package/src/resources/extensions/gsd/prompts/verify-work.md +24 -0
- package/src/resources/extensions/gsd/prompts/workspace.md +22 -0
- package/src/resources/extensions/gsd/prompts/workstreams.md +24 -0
- package/src/resources/extensions/gsd/provider-error-guidance.ts +32 -0
- package/src/resources/extensions/gsd/queue-order.ts +3 -2
- package/src/resources/extensions/gsd/recovery-classification.ts +7 -0
- package/src/resources/extensions/gsd/roadmap-slices.ts +1 -1
- package/src/resources/extensions/gsd/safety/content-validator.ts +2 -1
- package/src/resources/extensions/gsd/safety/evidence-cross-ref.ts +45 -1
- package/src/resources/extensions/gsd/service-tier.ts +2 -0
- package/src/resources/extensions/gsd/session-lock.ts +15 -13
- package/src/resources/extensions/gsd/skills/gsd-headless/SKILL.md +3 -0
- package/src/resources/extensions/gsd/skills/gsd-headless/references/commands.md +51 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/artifact-db.ts +58 -14
- package/src/resources/extensions/gsd/state-reconciliation/drift/completion.ts +22 -2
- package/src/resources/extensions/gsd/state-reconciliation/drift/external-markdown-edit.ts +105 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/external-planning-edit.ts +180 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/project-md.ts +19 -6
- package/src/resources/extensions/gsd/state-reconciliation/drift/roadmap.ts +2 -2
- package/src/resources/extensions/gsd/state-reconciliation/drift/stale-render.ts +98 -26
- package/src/resources/extensions/gsd/state-reconciliation/index.ts +36 -3
- package/src/resources/extensions/gsd/state-reconciliation/registry.ts +12 -0
- package/src/resources/extensions/gsd/state-reconciliation/types.ts +19 -0
- package/src/resources/extensions/gsd/state.ts +57 -15
- package/src/resources/extensions/gsd/sync-lock.ts +11 -20
- package/src/resources/extensions/gsd/tests/__fixtures__/flat-phase/.gsd/phases/01-foundation/01-01-PLAN.md +13 -0
- package/src/resources/extensions/gsd/tests/__fixtures__/flat-phase/.gsd/phases/01-foundation/01-ROADMAP.md +8 -0
- package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/m001-basic/.gsd/milestones/M001/M001-ROADMAP.md +13 -0
- package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/m001-basic/.gsd/milestones/M001/slices/S01/S01-PLAN.md +5 -0
- package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/planning-flat-phases/.planning/PROJECT.md +1 -0
- package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/planning-flat-phases/.planning/ROADMAP.md +5 -0
- package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/planning-flat-phases/.planning/STATE.md +10 -0
- package/src/resources/extensions/gsd/tests/__fixtures__/round-trip/planning-flat-phases/.planning/phases/01-foundation/01-01-PLAN.md +13 -0
- package/src/resources/extensions/gsd/tests/auto-artifact-paths.test.ts +322 -1
- package/src/resources/extensions/gsd/tests/auto-closeout-messaging.test.ts +71 -0
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +68 -116
- package/src/resources/extensions/gsd/tests/auto-direct-dispatch-parse.test.ts +33 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +104 -0
- package/src/resources/extensions/gsd/tests/auto-migrating-recovery.test.ts +32 -1
- package/src/resources/extensions/gsd/tests/auto-model-selection-tool-poisoning.test.ts +7 -2
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +10 -0
- package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +28 -22
- package/src/resources/extensions/gsd/tests/auto-paused-session-validation.test.ts +11 -2
- package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +19 -2
- package/src/resources/extensions/gsd/tests/auto-verification.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/auto-worktree-auto-resolve.test.ts +17 -0
- package/src/resources/extensions/gsd/tests/blocker-placeholder-logs.test.ts +218 -0
- package/src/resources/extensions/gsd/tests/codebase-generator.test.ts +15 -11
- package/src/resources/extensions/gsd/tests/commands-dispatcher-unmerged-milestone.test.ts +89 -0
- package/src/resources/extensions/gsd/tests/commands-dispatcher-validation-block.test.ts +37 -1
- package/src/resources/extensions/gsd/tests/commands-eval-review.test.ts +31 -30
- package/src/resources/extensions/gsd/tests/commands-gsd-core.test.ts +862 -0
- package/src/resources/extensions/gsd/tests/commands-verdict.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/compat-health-line.test.ts +102 -0
- package/src/resources/extensions/gsd/tests/compat-marker-invalidation.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/compat-marker.test.ts +105 -0
- package/src/resources/extensions/gsd/tests/complete-milestone-prompt-rendering.test.ts +6 -2
- package/src/resources/extensions/gsd/tests/complete-slice-reopen-handoff.test.ts +82 -0
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +7 -7
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +7 -7
- package/src/resources/extensions/gsd/tests/consent-question.test.ts +45 -0
- package/src/resources/extensions/gsd/tests/core-overlay-fallback.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/dashboard-overlay.test.ts +37 -0
- package/src/resources/extensions/gsd/tests/db-authority-regression.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/db-engine-logs.test.ts +207 -0
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +63 -1
- package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +49 -5
- package/src/resources/extensions/gsd/tests/discuss-cold-start-db-open.test.ts +10 -27
- package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +20 -1
- package/src/resources/extensions/gsd/tests/dispatch-db-degradation-logs.test.ts +98 -0
- package/src/resources/extensions/gsd/tests/dispatch-history.test.ts +102 -0
- package/src/resources/extensions/gsd/tests/dispatch-logs.test.ts +103 -0
- package/src/resources/extensions/gsd/tests/dispatch-missing-task-plans.test.ts +38 -49
- package/src/resources/extensions/gsd/tests/dispatch-reactive-logs.test.ts +98 -0
- package/src/resources/extensions/gsd/tests/dist-redirect.mjs +7 -0
- package/src/resources/extensions/gsd/tests/doctor-git-checks-autoresolve.test.ts +149 -0
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +6 -4
- package/src/resources/extensions/gsd/tests/ensure-preconditions-guard-4996.test.ts +17 -10
- package/src/resources/extensions/gsd/tests/evidence-cross-ref.test.ts +95 -0
- package/src/resources/extensions/gsd/tests/export-html-enhancements.test.ts +25 -0
- package/src/resources/extensions/gsd/tests/export-memory.test.ts +179 -0
- package/src/resources/extensions/gsd/tests/extension-bootstrap-isolation.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/external-markdown-edit.test.ts +137 -0
- package/src/resources/extensions/gsd/tests/external-planning-edit.test.ts +199 -0
- package/src/resources/extensions/gsd/tests/fallback-continuation.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/file-lock.test.ts +43 -0
- package/src/resources/extensions/gsd/tests/flat-phase-migration.test.ts +114 -0
- package/src/resources/extensions/gsd/tests/flat-phase-renderer.test.ts +83 -0
- package/src/resources/extensions/gsd/tests/flat-phase-round-trip.test.ts +72 -0
- package/src/resources/extensions/gsd/tests/flat-phase-validation-integration.test.ts +120 -0
- package/src/resources/extensions/gsd/tests/flat-phase-validation-path.test.ts +74 -0
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/gsd-command-home.test.ts +40 -7
- package/src/resources/extensions/gsd/tests/gsd-core-parity-routing.test.ts +183 -0
- package/src/resources/extensions/gsd/tests/guidance.test.ts +25 -0
- package/src/resources/extensions/gsd/tests/integration/auto-recovery.test.ts +19 -11
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +75 -0
- package/src/resources/extensions/gsd/tests/integration/commands-eval-review.integration.test.ts +6 -2
- package/src/resources/extensions/gsd/tests/integration/gitignore-tracked-gsd.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +4 -3
- package/src/resources/extensions/gsd/tests/integration/integration-proof.test.ts +11 -7
- package/src/resources/extensions/gsd/tests/interactive-routing-bypass.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/knowledge-cold-start.test.ts +372 -0
- package/src/resources/extensions/gsd/tests/layout-policy.test.ts +59 -0
- package/src/resources/extensions/gsd/tests/loop.test.ts +60 -0
- package/src/resources/extensions/gsd/tests/markdown-renderer-parse-cache.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/markdown-renderer.test.ts +214 -82
- package/src/resources/extensions/gsd/tests/mcp-filter.test.ts +74 -1
- package/src/resources/extensions/gsd/tests/metrics-ledger-cap.test.ts +239 -0
- package/src/resources/extensions/gsd/tests/milestone-closeout.test.ts +7 -2
- package/src/resources/extensions/gsd/tests/milestone-settlement.test.ts +6 -1
- package/src/resources/extensions/gsd/tests/model-router.test.ts +343 -7
- package/src/resources/extensions/gsd/tests/notification-store.test.ts +23 -0
- package/src/resources/extensions/gsd/tests/notifications.test.ts +33 -0
- package/src/resources/extensions/gsd/tests/oauth-api-model-routing.test.ts +13 -1
- package/src/resources/extensions/gsd/tests/observability-validator-boundary.test.ts +194 -0
- package/src/resources/extensions/gsd/tests/orchestrator-legacy-parity.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/orchestrator-logs.test.ts +339 -0
- package/src/resources/extensions/gsd/tests/orphaned-worktree-audit.test.ts +52 -1
- package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +91 -0
- package/src/resources/extensions/gsd/tests/plan-milestone-boundary-map-preservation.test.ts +7 -2
- package/src/resources/extensions/gsd/tests/plan-milestone-sketch-render.test.ts +7 -2
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +9 -6
- package/src/resources/extensions/gsd/tests/plan-slice.test.ts +58 -23
- package/src/resources/extensions/gsd/tests/plan-task.test.ts +4 -4
- package/src/resources/extensions/gsd/tests/planning-crossval.test.ts +19 -0
- package/src/resources/extensions/gsd/tests/planning-layout-detect.test.ts +84 -0
- package/src/resources/extensions/gsd/tests/planning-marker.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/planning-projection-hook.test.ts +123 -0
- package/src/resources/extensions/gsd/tests/planning-round-trip-property.test.ts +164 -0
- package/src/resources/extensions/gsd/tests/planning-writer.test.ts +82 -0
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +48 -1
- package/src/resources/extensions/gsd/tests/preferences.test.ts +47 -1
- package/src/resources/extensions/gsd/tests/prefs-missing-models-crash.test.ts +35 -4
- package/src/resources/extensions/gsd/tests/progress-strip-test-helpers.ts +79 -0
- package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +2 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/provider-error-guidance.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/ready-phrase-no-files-4573.test.ts +22 -13
- package/src/resources/extensions/gsd/tests/reassess-handler.test.ts +9 -8
- package/src/resources/extensions/gsd/tests/reconcile-logs.test.ts +244 -0
- package/src/resources/extensions/gsd/tests/recovery-finalize-logs.test.ts +119 -0
- package/src/resources/extensions/gsd/tests/recovery-verify-logs.test.ts +428 -0
- package/src/resources/extensions/gsd/tests/register-extension-guard.test.ts +25 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +79 -4
- package/src/resources/extensions/gsd/tests/replan-handler.test.ts +4 -4
- package/src/resources/extensions/gsd/tests/resume-missing-worktree-warning.test.ts +5 -5
- package/src/resources/extensions/gsd/tests/round-trip-property.test.ts +137 -0
- package/src/resources/extensions/gsd/tests/session-lock-transient-read.test.ts +28 -2
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +68 -0
- package/src/resources/extensions/gsd/tests/show-config-command.test.ts +3 -0
- package/src/resources/extensions/gsd/tests/single-writer-invariant.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/stale-dirlistcache-4648.test.ts +7 -1
- package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +155 -58
- package/src/resources/extensions/gsd/tests/stop-backtrack.test.ts +6 -2
- package/src/resources/extensions/gsd/tests/stuck-state-via-db.test.ts +85 -0
- package/src/resources/extensions/gsd/tests/sync-lock.test.ts +23 -0
- package/src/resources/extensions/gsd/tests/system-context-message-routing.test.ts +29 -1
- package/src/resources/extensions/gsd/tests/terminal-tool-surface-classification.test.ts +80 -0
- package/src/resources/extensions/gsd/tests/thinking-level-resolution.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/tool-schema-model-fallback.test.ts +64 -0
- package/src/resources/extensions/gsd/tests/tool-search-shim.test.ts +71 -0
- package/src/resources/extensions/gsd/tests/tool-surface-readiness.test.ts +26 -7
- package/src/resources/extensions/gsd/tests/tool-unavailable-retry.test.ts +23 -0
- package/src/resources/extensions/gsd/tests/tui-header-lifecycle.test.ts +40 -86
- package/src/resources/extensions/gsd/tests/tui-render-kit.test.ts +44 -6
- package/src/resources/extensions/gsd/tests/undo.test.ts +39 -37
- package/src/resources/extensions/gsd/tests/unit-context-composer.test.ts +22 -0
- package/src/resources/extensions/gsd/tests/unmerged-milestone-guard.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/uok-audit.test.ts +194 -0
- package/src/resources/extensions/gsd/tests/uok-gitops-turn-action.test.ts +72 -1
- package/src/resources/extensions/gsd/tests/validate-milestone-write-order.test.ts +9 -1
- package/src/resources/extensions/gsd/tests/validation-block-guard.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/validation-gate-patterns.test.ts +34 -6
- package/src/resources/extensions/gsd/tests/verify-artifact-tightened.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/visualizer-views.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/workflow-kernel.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/workflow-mcp-preflight.test.ts +133 -0
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +34 -8
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +3 -4
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +64 -8
- package/src/resources/extensions/gsd/tests/worktree-health.test.ts +43 -3
- package/src/resources/extensions/gsd/tests/worktree-manager.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/worktree-safety.test.ts +39 -18
- package/src/resources/extensions/gsd/tests/worktree-write-gate.test.ts +75 -3
- package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +4 -1
- package/src/resources/extensions/gsd/tests/write-gate.test.ts +103 -0
- package/src/resources/extensions/gsd/tool-surface-readiness.ts +226 -16
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +4 -7
- package/src/resources/extensions/gsd/tools/complete-slice.ts +12 -9
- package/src/resources/extensions/gsd/tools/complete-task.ts +15 -1
- package/src/resources/extensions/gsd/tools/exec-tool.ts +2 -118
- package/src/resources/extensions/gsd/tools/plan-slice.ts +1 -3
- package/src/resources/extensions/gsd/tools/plan-task.ts +17 -1
- package/src/resources/extensions/gsd/tools/reassess-roadmap.ts +9 -10
- package/src/resources/extensions/gsd/tools/validate-milestone.ts +8 -13
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +43 -4
- package/src/resources/extensions/gsd/triage-resolution.ts +14 -7
- package/src/resources/extensions/gsd/tui/render-kit.ts +56 -13
- package/src/resources/extensions/gsd/undo.ts +8 -9
- package/src/resources/extensions/gsd/unit-registry.ts +27 -3
- package/src/resources/extensions/gsd/unmerged-milestone-guard.ts +60 -1
- package/src/resources/extensions/gsd/validation-block-guard.ts +46 -0
- package/src/resources/extensions/gsd/visualizer-data.ts +55 -0
- package/src/resources/extensions/gsd/visualizer-views.ts +27 -2
- package/src/resources/extensions/gsd/workflow-logger.ts +5 -0
- package/src/resources/extensions/gsd/workflow-mcp.ts +12 -1
- package/src/resources/extensions/gsd/workflow-projections.ts +24 -4
- package/src/resources/extensions/gsd/worktree-command.ts +6 -6
- package/src/resources/extensions/gsd/worktree-health.ts +6 -3
- package/src/resources/extensions/gsd/worktree-manager.ts +122 -16
- package/src/resources/extensions/gsd/worktree-safety.ts +31 -11
- package/src/resources/extensions/gsd/worktree-shell-guard.ts +123 -0
- package/src/resources/extensions/mcp-client/manager.ts +3 -3
- package/src/resources/extensions/search-the-web/index.ts +45 -9
- package/src/resources/extensions/search-the-web/native-search.ts +16 -4
- package/src/resources/extensions/shared/gsd-browser-cli.ts +41 -2
- package/src/resources/extensions/subagent/index.ts +20 -15
- package/src/resources/extensions/subagent/tests/worktree-cwd.test.ts +57 -0
- package/src/resources/extensions/subagent/worktree-cwd.ts +35 -0
- package/dist/web/standalone/.next/static/chunks/8785.2e5a118797fb2dd2.js +0 -1
- /package/dist/web/standalone/.next/static/{2T9IOdiiM3o3gZ4UbPi8E → BTKtGFF1Y-hvVJEGhBRo9}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{2T9IOdiiM3o3gZ4UbPi8E → BTKtGFF1Y-hvVJEGhBRo9}/_ssgManifest.js +0 -0
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* - No AST parsers — uses regex heuristics
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
19
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
20
20
|
import { resolve, dirname, join, extname } from "node:path";
|
|
21
21
|
import type { TaskRow } from "./db-task-slice-rows.js";
|
|
22
22
|
|
|
@@ -364,6 +364,15 @@ interface FunctionSignature {
|
|
|
364
364
|
lineNum: number;
|
|
365
365
|
}
|
|
366
366
|
|
|
367
|
+
interface CachedFunctionSignatures {
|
|
368
|
+
mtimeMs: number;
|
|
369
|
+
size: number;
|
|
370
|
+
signatures: FunctionSignature[];
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
let signatureCacheScope: string | null = null;
|
|
374
|
+
const signatureCache = new Map<string, CachedFunctionSignatures>();
|
|
375
|
+
|
|
367
376
|
/**
|
|
368
377
|
* Extract function signatures from TypeScript/JavaScript source code.
|
|
369
378
|
*/
|
|
@@ -404,6 +413,37 @@ function extractFunctionSignatures(
|
|
|
404
413
|
return signatures;
|
|
405
414
|
}
|
|
406
415
|
|
|
416
|
+
function signatureCacheFor(taskRow: TaskRow, basePath: string): Map<string, CachedFunctionSignatures> {
|
|
417
|
+
const scope = `${resolve(basePath)}\0${taskRow.milestone_id}\0${taskRow.slice_id}`;
|
|
418
|
+
|
|
419
|
+
if (signatureCacheScope !== scope) {
|
|
420
|
+
signatureCacheScope = scope;
|
|
421
|
+
signatureCache.clear();
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
return signatureCache;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
function getCachedFunctionSignatures(
|
|
428
|
+
cache: Map<string, CachedFunctionSignatures>,
|
|
429
|
+
absolutePath: string,
|
|
430
|
+
fileName: string
|
|
431
|
+
): FunctionSignature[] {
|
|
432
|
+
const stat = statSync(absolutePath);
|
|
433
|
+
const mtimeMs = stat.mtimeMs;
|
|
434
|
+
const size = stat.size;
|
|
435
|
+
const cached = cache.get(absolutePath);
|
|
436
|
+
|
|
437
|
+
if (cached && cached.mtimeMs === mtimeMs && cached.size === size) {
|
|
438
|
+
return cached.signatures.map((sig) => ({ ...sig, file: fileName }));
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
const source = readFileSync(absolutePath, "utf-8");
|
|
442
|
+
const signatures = extractFunctionSignatures(source, fileName);
|
|
443
|
+
cache.set(absolutePath, { mtimeMs, size, signatures });
|
|
444
|
+
return signatures;
|
|
445
|
+
}
|
|
446
|
+
|
|
407
447
|
/**
|
|
408
448
|
* Normalize parameter list for comparison.
|
|
409
449
|
*/
|
|
@@ -437,6 +477,7 @@ export function checkCrossTaskSignatures(
|
|
|
437
477
|
|
|
438
478
|
// Build map of functions from prior tasks' key_files
|
|
439
479
|
const priorSignatures = new Map<string, FunctionSignature[]>();
|
|
480
|
+
const cache = signatureCacheFor(taskRow, basePath);
|
|
440
481
|
|
|
441
482
|
for (const task of priorTasks) {
|
|
442
483
|
for (const file of task.key_files) {
|
|
@@ -447,8 +488,7 @@ export function checkCrossTaskSignatures(
|
|
|
447
488
|
if (!existsSync(absolutePath)) continue;
|
|
448
489
|
|
|
449
490
|
try {
|
|
450
|
-
const
|
|
451
|
-
const sigs = extractFunctionSignatures(source, file);
|
|
491
|
+
const sigs = getCachedFunctionSignatures(cache, absolutePath, file);
|
|
452
492
|
for (const sig of sigs) {
|
|
453
493
|
const existing = priorSignatures.get(sig.name) || [];
|
|
454
494
|
existing.push(sig);
|
|
@@ -25,7 +25,7 @@ import type {
|
|
|
25
25
|
ResolvedModelConfig,
|
|
26
26
|
AutoSupervisorConfig,
|
|
27
27
|
} from "./preferences-types.js";
|
|
28
|
-
import { loadEffectiveGSDPreferences, getGlobalGSDPreferencesPath } from "./preferences.js";
|
|
28
|
+
import { clearGSDPreferencesCache, loadEffectiveGSDPreferences, getGlobalGSDPreferencesPath } from "./preferences.js";
|
|
29
29
|
import { getUnitPhaseChain } from "./unit-registry.js";
|
|
30
30
|
|
|
31
31
|
// Re-export types so existing consumers of ./preferences-models.js keep working
|
|
@@ -94,8 +94,16 @@ function resolveWinningPhase(
|
|
|
94
94
|
* - Legacy: `planning: claude-opus-4-6`
|
|
95
95
|
* - Extended: `planning: { model: claude-opus-4-6, fallbacks: [glm-5, minimax-m2.5] }`
|
|
96
96
|
*/
|
|
97
|
-
export function resolveModelWithFallbacksForUnit(
|
|
98
|
-
|
|
97
|
+
export function resolveModelWithFallbacksForUnit(
|
|
98
|
+
unitType: string,
|
|
99
|
+
basePath?: string,
|
|
100
|
+
availableModelIds?: string[],
|
|
101
|
+
preferredModelId?: string,
|
|
102
|
+
): ResolvedModelConfig | undefined {
|
|
103
|
+
const loadOpts = availableModelIds !== undefined || preferredModelId !== undefined
|
|
104
|
+
? { availableModelIds, preferredModelId }
|
|
105
|
+
: undefined;
|
|
106
|
+
const prefs = loadEffectiveGSDPreferences(basePath, loadOpts);
|
|
99
107
|
const chain = phaseChainForUnit(unitType);
|
|
100
108
|
if (!chain) return undefined;
|
|
101
109
|
const winner = resolveWinningPhase(prefs?.preferences?.models as GSDModelConfigV2 | undefined, chain);
|
|
@@ -141,8 +149,13 @@ export function resolveModelWithFallbacksForUnit(unitType: string): ResolvedMode
|
|
|
141
149
|
* floor. Session level, defaults, the floor, and capability clamping are NOT
|
|
142
150
|
* applied here.
|
|
143
151
|
*/
|
|
144
|
-
export function resolveThinkingLevelForUnit(
|
|
145
|
-
|
|
152
|
+
export function resolveThinkingLevelForUnit(
|
|
153
|
+
unitType: string,
|
|
154
|
+
basePath?: string,
|
|
155
|
+
availableModelIds?: string[],
|
|
156
|
+
): GSDThinkingLevel | undefined {
|
|
157
|
+
const loadOpts = availableModelIds !== undefined ? { availableModelIds } : undefined;
|
|
158
|
+
const prefs = loadEffectiveGSDPreferences(basePath, loadOpts)?.preferences;
|
|
146
159
|
if (!prefs) return undefined;
|
|
147
160
|
const chain = phaseChainForUnit(unitType);
|
|
148
161
|
if (!chain) return undefined;
|
|
@@ -178,7 +191,9 @@ export function resolveThinkingLevelForUnit(unitType: string): GSDThinkingLevel
|
|
|
178
191
|
* `openai-codex/gpt-5.4`). When a bare ID is found and sessionProvider
|
|
179
192
|
* is available, the session provider is used. Without sessionProvider,
|
|
180
193
|
* bare IDs are still returned with provider set to the bare ID itself
|
|
181
|
-
* so downstream resolution (resolveModelId) can match it.
|
|
194
|
+
* so downstream resolution (resolveModelId) can match it. Accepts an optional
|
|
195
|
+
* `sessionModelId` so token-profile defaults can preserve the selected model
|
|
196
|
+
* before auto-mode captures its start snapshot.
|
|
182
197
|
*
|
|
183
198
|
* Returns `{ provider, id }` or `undefined` if no model preference is
|
|
184
199
|
* configured.
|
|
@@ -186,8 +201,16 @@ export function resolveThinkingLevelForUnit(unitType: string): GSDThinkingLevel
|
|
|
186
201
|
export function resolveDefaultSessionModel(
|
|
187
202
|
sessionProvider?: string,
|
|
188
203
|
basePath?: string,
|
|
204
|
+
availableModelIds?: string[],
|
|
205
|
+
sessionModelId?: string,
|
|
189
206
|
): { provider: string; id: string } | undefined {
|
|
190
|
-
const
|
|
207
|
+
const preferredModelId = sessionModelId && sessionProvider
|
|
208
|
+
? `${sessionProvider}/${sessionModelId}`
|
|
209
|
+
: sessionModelId;
|
|
210
|
+
const loadOpts = availableModelIds !== undefined || preferredModelId !== undefined
|
|
211
|
+
? { availableModelIds, preferredModelId }
|
|
212
|
+
: undefined;
|
|
213
|
+
const prefs = loadEffectiveGSDPreferences(basePath, loadOpts);
|
|
191
214
|
const models = prefs?.preferences?.models;
|
|
192
215
|
if (!models) return undefined;
|
|
193
216
|
|
|
@@ -382,6 +405,7 @@ export function updatePreferencesModels(models: GSDModelConfigV2): void {
|
|
|
382
405
|
}
|
|
383
406
|
|
|
384
407
|
writeFileSync(prefsPath, content, "utf-8");
|
|
408
|
+
clearGSDPreferencesCache();
|
|
385
409
|
}
|
|
386
410
|
|
|
387
411
|
/**
|
|
@@ -413,7 +437,10 @@ export function resolveAutoSupervisorConfig(): AutoSupervisorConfig {
|
|
|
413
437
|
|
|
414
438
|
// ─── Token Profile Resolution ─────────────────────────────────────────────
|
|
415
439
|
|
|
416
|
-
const VALID_TOKEN_PROFILES = new Set<TokenProfile>(["budget", "balanced", "quality", "burn-max"]);
|
|
440
|
+
export const VALID_TOKEN_PROFILES = new Set<TokenProfile>(["budget", "balanced", "quality", "burn-max"]);
|
|
441
|
+
|
|
442
|
+
/** D046: balanced is the implicit profile when `token_profile` is omitted. */
|
|
443
|
+
export const DEFAULT_TOKEN_PROFILE: TokenProfile = "balanced";
|
|
417
444
|
|
|
418
445
|
/**
|
|
419
446
|
* Per-phase tier intentions for each token profile.
|
|
@@ -459,27 +486,34 @@ const PROFILE_TIER_MAP: Record<TokenProfile, Record<string, ComplexityTier>> = {
|
|
|
459
486
|
*
|
|
460
487
|
* Model IDs are resolved from capability tiers, not hardcoded to any
|
|
461
488
|
* provider. When available models are known (runtime), the resolver picks
|
|
462
|
-
* the best match
|
|
463
|
-
*
|
|
489
|
+
* the best match on the anchor provider (session / auto-start model). Callers
|
|
490
|
+
* scope the available-model list via `modelIdsForProfileResolution` so token
|
|
491
|
+
* profiles do not hop to a cheaper provider (e.g. Gemini Flash) when the user
|
|
492
|
+
* is working on OpenAI or Anthropic. When the selected/session model is known,
|
|
493
|
+
* it is preferred for tiers it can satisfy. When the registry is unavailable
|
|
494
|
+
* (e.g., early startup), falls back to canonical Anthropic model IDs.
|
|
464
495
|
*
|
|
465
496
|
* @param profile The token profile to resolve
|
|
466
497
|
* @param availableModelIds Optional list of available model IDs for cross-provider resolution.
|
|
467
498
|
* Undefined means the registry is unavailable.
|
|
468
499
|
* @param routingConfig Optional routing config for tier model pins.
|
|
500
|
+
* @param preferredModelId Optional selected/session model ID to prefer.
|
|
469
501
|
*/
|
|
470
502
|
export function resolveProfileDefaults(
|
|
471
503
|
profile: TokenProfile,
|
|
472
504
|
availableModelIds?: string[],
|
|
473
505
|
routingConfig: DynamicRoutingConfig = defaultRoutingConfig(),
|
|
506
|
+
preferredModelId?: string,
|
|
474
507
|
): Partial<GSDPreferences> {
|
|
475
508
|
// burn-max never writes model defaults — preserve user-selected models.
|
|
476
509
|
// For the other three profiles, derive concrete model IDs from the tier map
|
|
477
510
|
// against the available-model list when the registry is provided. If callers
|
|
478
511
|
// omit the registry entirely, use canonical fallbacks explicitly.
|
|
479
512
|
const tierMap = PROFILE_TIER_MAP[profile];
|
|
480
|
-
const resolveTierModel = (tier: ComplexityTier): string =>
|
|
481
|
-
|
|
482
|
-
|
|
513
|
+
const resolveTierModel = (tier: ComplexityTier): string =>
|
|
514
|
+
Array.isArray(availableModelIds) || preferredModelId
|
|
515
|
+
? resolveModelForTier(tier, availableModelIds ?? [], routingConfig, undefined, preferredModelId)
|
|
516
|
+
: canonicalModelForTier(tier);
|
|
483
517
|
const models: GSDModelConfigV2 | undefined = profile === "burn-max"
|
|
484
518
|
? undefined
|
|
485
519
|
: {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* statements continue to work without modification.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
13
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
14
14
|
import { homedir } from "node:os";
|
|
15
15
|
import { join } from "node:path";
|
|
16
16
|
|
|
@@ -20,7 +20,12 @@ import type { PostUnitHookConfig, PreDispatchHookConfig, TokenProfile } from "./
|
|
|
20
20
|
import type { DynamicRoutingConfig } from "./model-router.js";
|
|
21
21
|
import { normalizeStringArray } from "../shared/format-utils.js";
|
|
22
22
|
import { logWarning } from "./workflow-logger.js";
|
|
23
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
DEFAULT_TOKEN_PROFILE,
|
|
25
|
+
resolveProfileDefaults as _resolveProfileDefaults,
|
|
26
|
+
VALID_TOKEN_PROFILES,
|
|
27
|
+
resolveDisabledModelProvidersFromPreferences,
|
|
28
|
+
} from "./preferences-models.js";
|
|
24
29
|
import { nativeHasCommittedHead, nativeIsRepo } from "./native-git-bridge.js";
|
|
25
30
|
|
|
26
31
|
import {
|
|
@@ -142,6 +147,94 @@ export function getProjectGSDPreferencesPath(basePath?: string): string {
|
|
|
142
147
|
return projectPreferencesPath(basePath);
|
|
143
148
|
}
|
|
144
149
|
|
|
150
|
+
/** Minimal model-registry surface for provider-aware preference resolution. */
|
|
151
|
+
export type PreferencesModelRegistry = {
|
|
152
|
+
getAvailable: () => ReadonlyArray<{ provider: string; id: string }>;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/** Format registry models the same way tier resolution and prefs persistence use. */
|
|
156
|
+
export function availableModelIdsFromRegistry(registry: PreferencesModelRegistry): string[] {
|
|
157
|
+
return registry.getAvailable().map((m) => `${m.provider}/${m.id}`);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Keep only provider-qualified model IDs for a single provider (case-insensitive).
|
|
162
|
+
* Bare IDs are excluded — tier resolution requires provider/model form.
|
|
163
|
+
*/
|
|
164
|
+
export function restrictModelIdsToProvider(modelIds: string[], provider: string): string[] {
|
|
165
|
+
const normalized = provider.trim().toLowerCase();
|
|
166
|
+
if (!normalized) return modelIds;
|
|
167
|
+
return modelIds.filter((id) => {
|
|
168
|
+
const slash = id.indexOf("/");
|
|
169
|
+
if (slash <= 0) return false;
|
|
170
|
+
return id.slice(0, slash).toLowerCase() === normalized;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Model IDs for token-profile tier resolution. When an anchor provider is known
|
|
176
|
+
* (session model / auto-start snapshot), stay on that provider instead of picking
|
|
177
|
+
* the globally cheapest tier match across every logged-in provider (e.g. Gemini
|
|
178
|
+
* Flash beating GPT mini on cost).
|
|
179
|
+
*/
|
|
180
|
+
export function modelIdsForProfileResolution(
|
|
181
|
+
registry: PreferencesModelRegistry,
|
|
182
|
+
anchorProvider?: string,
|
|
183
|
+
disabledProviders?: string[],
|
|
184
|
+
): string[] | undefined {
|
|
185
|
+
let all = availableModelIdsFromRegistry(registry);
|
|
186
|
+
if (disabledProviders?.length) {
|
|
187
|
+
const blocked = new Set(
|
|
188
|
+
disabledProviders.map((p) => p.trim().toLowerCase()).filter((p) => p.length > 0),
|
|
189
|
+
);
|
|
190
|
+
all = all.filter((id) => {
|
|
191
|
+
const slash = id.indexOf("/");
|
|
192
|
+
if (slash <= 0) return true;
|
|
193
|
+
return !blocked.has(id.slice(0, slash).toLowerCase());
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
if (all.length === 0) return undefined;
|
|
197
|
+
if (!anchorProvider?.trim()) return all;
|
|
198
|
+
// Stay on the anchor provider — do not fall back to the full registry when the
|
|
199
|
+
// scoped list is empty (that reintroduces cross-provider cost picks like Gemini).
|
|
200
|
+
return restrictModelIdsToProvider(all, anchorProvider);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/** Provider anchor for token-profile tier resolution (auto-start model wins). */
|
|
204
|
+
export function resolveProfileAnchorProvider(
|
|
205
|
+
sessionProvider?: string,
|
|
206
|
+
autoModeStartProvider?: string | null,
|
|
207
|
+
): string | undefined {
|
|
208
|
+
const start = autoModeStartProvider?.trim();
|
|
209
|
+
if (start) return start;
|
|
210
|
+
const session = sessionProvider?.trim();
|
|
211
|
+
return session || undefined;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Load effective preferences with token-profile tiers resolved against models
|
|
216
|
+
* the user can actually call (from the live registry), not canonical Anthropic
|
|
217
|
+
* fallbacks.
|
|
218
|
+
*/
|
|
219
|
+
export function loadEffectiveGSDPreferencesWithRegistry(
|
|
220
|
+
registry: PreferencesModelRegistry | undefined,
|
|
221
|
+
basePath?: string,
|
|
222
|
+
anchorProvider?: string,
|
|
223
|
+
preferredModelId?: string,
|
|
224
|
+
): LoadedGSDPreferences | null {
|
|
225
|
+
const preferenceOpts = preferredModelId !== undefined
|
|
226
|
+
? { preferredModelId }
|
|
227
|
+
: undefined;
|
|
228
|
+
if (!registry) {
|
|
229
|
+
return loadEffectiveGSDPreferences(basePath, preferenceOpts);
|
|
230
|
+
}
|
|
231
|
+
const disabledProviders = resolveDisabledModelProvidersFromPreferences();
|
|
232
|
+
const availableModelIds = modelIdsForProfileResolution(registry, anchorProvider, disabledProviders);
|
|
233
|
+
if (!availableModelIds) {
|
|
234
|
+
return loadEffectiveGSDPreferences(basePath, preferenceOpts);
|
|
235
|
+
}
|
|
236
|
+
return loadEffectiveGSDPreferences(basePath, { availableModelIds, preferredModelId });
|
|
237
|
+
}
|
|
145
238
|
|
|
146
239
|
/**
|
|
147
240
|
* Normalize a value loaded from disk (or passed from another component) into
|
|
@@ -174,32 +267,94 @@ export function normalizePreferencesShape(
|
|
|
174
267
|
}
|
|
175
268
|
// ─── Loading ────────────────────────────────────────────────────────────────
|
|
176
269
|
|
|
177
|
-
|
|
178
|
-
|
|
270
|
+
const EFFECTIVE_PREFERENCES_CACHE_MAX = 64;
|
|
271
|
+
const effectivePreferencesCache = new Map<string, LoadedGSDPreferences | null>();
|
|
272
|
+
|
|
273
|
+
export function clearGSDPreferencesCache(): void {
|
|
274
|
+
effectivePreferencesCache.clear();
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function globalPreferencesCandidatePaths(): string[] {
|
|
278
|
+
return [
|
|
179
279
|
globalPreferencesPath(),
|
|
180
280
|
legacyGlobalPreferencesPathLowercase(),
|
|
181
281
|
legacyGlobalPreferencesPath(),
|
|
182
|
-
]
|
|
282
|
+
];
|
|
183
283
|
}
|
|
184
284
|
|
|
185
|
-
|
|
186
|
-
return
|
|
285
|
+
function projectPreferencesCandidatePaths(basePath?: string): string[] {
|
|
286
|
+
return [
|
|
187
287
|
projectPreferencesPath(basePath),
|
|
188
288
|
legacyProjectPreferencesPathLowercase(basePath),
|
|
189
|
-
]
|
|
289
|
+
];
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
function preferencesFileSignature(path: string): string {
|
|
293
|
+
try {
|
|
294
|
+
const stats = statSync(path);
|
|
295
|
+
return `${path}:${stats.size}:${stats.mtimeMs}`;
|
|
296
|
+
} catch (err) {
|
|
297
|
+
const code = (err as NodeJS.ErrnoException).code ?? "unknown";
|
|
298
|
+
return `${path}:missing:${code}`;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function effectivePreferencesCacheKey(
|
|
303
|
+
basePath?: string,
|
|
304
|
+
opts?: { availableModelIds?: string[]; preferredModelId?: string },
|
|
305
|
+
): string {
|
|
306
|
+
return JSON.stringify({
|
|
307
|
+
basePath: basePath ?? null,
|
|
308
|
+
global: globalPreferencesCandidatePaths().map(preferencesFileSignature),
|
|
309
|
+
project: projectPreferencesCandidatePaths(basePath).map(preferencesFileSignature),
|
|
310
|
+
availableModelIds: opts?.availableModelIds ?? null,
|
|
311
|
+
preferredModelId: opts?.preferredModelId ?? null,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function cloneLoadedPreferences(
|
|
316
|
+
loaded: LoadedGSDPreferences | null,
|
|
317
|
+
): LoadedGSDPreferences | null {
|
|
318
|
+
return loaded ? structuredClone(loaded) : null;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function cacheEffectivePreferences(
|
|
322
|
+
key: string,
|
|
323
|
+
loaded: LoadedGSDPreferences | null,
|
|
324
|
+
): void {
|
|
325
|
+
if (!effectivePreferencesCache.has(key) && effectivePreferencesCache.size >= EFFECTIVE_PREFERENCES_CACHE_MAX) {
|
|
326
|
+
effectivePreferencesCache.clear();
|
|
327
|
+
}
|
|
328
|
+
effectivePreferencesCache.set(key, cloneLoadedPreferences(loaded));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export function loadGlobalGSDPreferences(): LoadedGSDPreferences | null {
|
|
332
|
+
return loadFirstUsablePreferencesFile(globalPreferencesCandidatePaths(), "global");
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export function loadProjectGSDPreferences(basePath?: string): LoadedGSDPreferences | null {
|
|
336
|
+
return loadFirstUsablePreferencesFile(projectPreferencesCandidatePaths(basePath), "project");
|
|
190
337
|
}
|
|
191
338
|
|
|
192
339
|
export function loadEffectiveGSDPreferences(
|
|
193
340
|
basePath?: string,
|
|
194
|
-
opts?: { availableModelIds?: string[] },
|
|
341
|
+
opts?: { availableModelIds?: string[]; preferredModelId?: string },
|
|
195
342
|
): LoadedGSDPreferences | null {
|
|
343
|
+
const cacheKey = effectivePreferencesCacheKey(basePath, opts);
|
|
344
|
+
if (effectivePreferencesCache.has(cacheKey)) {
|
|
345
|
+
return cloneLoadedPreferences(effectivePreferencesCache.get(cacheKey)!);
|
|
346
|
+
}
|
|
347
|
+
|
|
196
348
|
const globalPreferences = loadGlobalGSDPreferences();
|
|
197
349
|
const projectPreferences = loadProjectGSDPreferences(basePath);
|
|
198
350
|
const effectiveGlobalPreferences = globalPreferences?.ignored ? null : globalPreferences;
|
|
199
351
|
const effectiveProjectPreferences = projectPreferences?.ignored ? null : projectPreferences;
|
|
200
352
|
const projectHasPlanningDepth = effectiveProjectPreferences?.preferences.planning_depth !== undefined;
|
|
201
353
|
|
|
202
|
-
if (!effectiveGlobalPreferences && !effectiveProjectPreferences)
|
|
354
|
+
if (!effectiveGlobalPreferences && !effectiveProjectPreferences) {
|
|
355
|
+
cacheEffectivePreferences(cacheKey, null);
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
203
358
|
|
|
204
359
|
let result: LoadedGSDPreferences;
|
|
205
360
|
if (!effectiveGlobalPreferences) {
|
|
@@ -220,16 +375,28 @@ export function loadEffectiveGSDPreferences(
|
|
|
220
375
|
// Apply token-profile defaults as the lowest-priority layer so that
|
|
221
376
|
// `token_profile: budget` sets models and phase-skips automatically.
|
|
222
377
|
// Explicit user preferences always override profile defaults.
|
|
223
|
-
const
|
|
224
|
-
|
|
378
|
+
const explicitProfile = result.preferences.token_profile as TokenProfile | undefined;
|
|
379
|
+
let profileForDefaults: TokenProfile | undefined;
|
|
380
|
+
if (explicitProfile) {
|
|
381
|
+
if (VALID_TOKEN_PROFILES.has(explicitProfile)) {
|
|
382
|
+
profileForDefaults = explicitProfile;
|
|
383
|
+
}
|
|
384
|
+
} else {
|
|
385
|
+
profileForDefaults = DEFAULT_TOKEN_PROFILE;
|
|
386
|
+
}
|
|
387
|
+
if (profileForDefaults) {
|
|
225
388
|
const profileDefaults = _resolveProfileDefaults(
|
|
226
|
-
|
|
389
|
+
profileForDefaults,
|
|
227
390
|
opts?.availableModelIds,
|
|
228
391
|
result.preferences.dynamic_routing,
|
|
392
|
+
opts?.preferredModelId,
|
|
229
393
|
);
|
|
394
|
+
const defaultsToApply = explicitProfile
|
|
395
|
+
? profileDefaults
|
|
396
|
+
: withoutProfilePhaseDefaults(profileDefaults);
|
|
230
397
|
result = {
|
|
231
398
|
...result,
|
|
232
|
-
preferences: mergePreferences(
|
|
399
|
+
preferences: mergePreferences(defaultsToApply as GSDPreferences, result.preferences),
|
|
233
400
|
};
|
|
234
401
|
}
|
|
235
402
|
|
|
@@ -243,9 +410,16 @@ export function loadEffectiveGSDPreferences(
|
|
|
243
410
|
|
|
244
411
|
result = stripInheritedPlanningDepth(result, projectHasPlanningDepth);
|
|
245
412
|
|
|
413
|
+
cacheEffectivePreferences(cacheKey, result);
|
|
246
414
|
return result;
|
|
247
415
|
}
|
|
248
416
|
|
|
417
|
+
function withoutProfilePhaseDefaults(defaults: Partial<GSDPreferences>): Partial<GSDPreferences> {
|
|
418
|
+
if (defaults.phases === undefined) return defaults;
|
|
419
|
+
const { phases: _phases, ...rest } = defaults;
|
|
420
|
+
return rest;
|
|
421
|
+
}
|
|
422
|
+
|
|
249
423
|
function mergePreferenceMetadata(
|
|
250
424
|
primary: LoadedGSDPreferences,
|
|
251
425
|
secondary: LoadedGSDPreferences | null,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
You are running the GSD **ai-integration-phase** workflow — produce an AI design contract (AI-SPEC) for a milestone/slice that builds an AI system.
|
|
2
|
+
|
|
3
|
+
## Target
|
|
4
|
+
|
|
5
|
+
{{target}}
|
|
6
|
+
|
|
7
|
+
## Process
|
|
8
|
+
|
|
9
|
+
1. **Load intent.** Read the milestone/slice goal and requirements for the AI capability.
|
|
10
|
+
|
|
11
|
+
2. **Define the AI capability contract:**
|
|
12
|
+
- **Inputs:** what the model receives (schema, context, examples) and any preprocessing.
|
|
13
|
+
- **Outputs:** the expected response shape, how it's parsed/validated, and how failures are handled.
|
|
14
|
+
- **Model & parameters:** which model/provider, temperature, max tokens, fallback chain — never hardcode; reference config.
|
|
15
|
+
- **Prompt/contract:** the system/user prompt strategy, or tool/function calling schema.
|
|
16
|
+
- **Evaluation:** how quality is measured (eval set, rubric, human-in-the-loop checkpoints).
|
|
17
|
+
- **Cost & latency budget:** expected per-call cost and latency, and the ceiling that triggers a redesign.
|
|
18
|
+
|
|
19
|
+
3. **Risk register.** Hallucination/grounding, prompt injection, data leakage, cost runaway, model deprecation. For each, the mitigation.
|
|
20
|
+
|
|
21
|
+
4. **Write the AI-SPEC** to the milestone/slice artifact in `.gsd/`. Recommend `/gsd plan-phase` or `/gsd spike` for high-uncertainty model behaviors.
|
|
22
|
+
|
|
23
|
+
## Success criteria
|
|
24
|
+
|
|
25
|
+
- Inputs/outputs are schema-defined, not prose-only.
|
|
26
|
+
- Evaluation is concrete (eval set + rubric), not "it looks good".
|
|
27
|
+
- Cost/latency has a budget and a ceiling.
|
|
28
|
+
- The risk register covers the standard AI failure modes.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
You are running the GSD **audit-fix** workflow — autonomous audit-to-fix pipeline: find issues, classify them, fix the auto-fixable ones, test after each fix, and commit atomically.
|
|
2
|
+
|
|
3
|
+
## Source
|
|
4
|
+
|
|
5
|
+
{{source}}
|
|
6
|
+
|
|
7
|
+
## Severity filter
|
|
8
|
+
|
|
9
|
+
{{severity}}
|
|
10
|
+
|
|
11
|
+
## Max fixes
|
|
12
|
+
|
|
13
|
+
{{maxFixes}}
|
|
14
|
+
|
|
15
|
+
## Dry run
|
|
16
|
+
|
|
17
|
+
{{dryRun}}
|
|
18
|
+
|
|
19
|
+
## Process
|
|
20
|
+
|
|
21
|
+
1. **Run the audit.** Use the named source audit (default: the most recent audit-uat / scan findings). If no audit exists, run a fresh `/gsd scan --focus concerns` first and use those findings.
|
|
22
|
+
|
|
23
|
+
2. **Parse and classify findings.** For each finding, decide: `auto-fixable` (deterministic, localized, no public-behavior change) or `manual-only` (ambiguous, risky, or behavior-changing). Apply the severity filter and the `--max` cap.
|
|
24
|
+
|
|
25
|
+
3. **Fix loop** (skip entirely if `--dry-run`). For each auto-fixable finding, in priority order:
|
|
26
|
+
- Apply the fix.
|
|
27
|
+
- Run the project's tests.
|
|
28
|
+
- If tests pass, stage the change and record the finding id.
|
|
29
|
+
- If tests fail, revert that fix, mark it manual-only, and continue.
|
|
30
|
+
Commit atomically, referencing the finding ids in the commit message for traceability.
|
|
31
|
+
|
|
32
|
+
4. **Report.** List: fixed (with finding ids + commits), deferred to manual (with reasons), and any that were attempted but reverted due to test failure.
|
|
33
|
+
|
|
34
|
+
## Success criteria
|
|
35
|
+
|
|
36
|
+
- Every fix is tested before it's kept; failing fixes are reverted, not left half-applied.
|
|
37
|
+
- Commits are atomic and reference finding ids.
|
|
38
|
+
- `--dry-run` shows what would be fixed without changing anything.
|
|
39
|
+
- Manual-only findings are reported, not silently ignored.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
You are running the GSD **audit-milestone** workflow — verify a milestone achieved its definition of done before it is archived.
|
|
2
|
+
|
|
3
|
+
## Target
|
|
4
|
+
|
|
5
|
+
{{target}}
|
|
6
|
+
|
|
7
|
+
## Process
|
|
8
|
+
|
|
9
|
+
1. **Load the milestone.** Read the milestone's ROADMAP entry, its slices' plans and SUMMARY/ASSESSMENT artifacts, and the requirements/acceptance criteria. If a specific milestone id was given, target it; otherwise target the active or most-recently-completed milestone.
|
|
10
|
+
|
|
11
|
+
2. **Aggregate per-slice verification.** For each slice, confirm its tasks were completed and its verification strategy was satisfied (tests pass, UAT recorded). Flag slices with incomplete verification.
|
|
12
|
+
|
|
13
|
+
3. **Check requirements coverage.** Map each requirement/acceptance criterion to the slice(s) and tasks that delivered it. Flag any requirement with no covering evidence.
|
|
14
|
+
|
|
15
|
+
4. **Check cross-slice integration.** Identify slices that touch shared resources (APIs, data models, state) and confirm their integration points are consistent — no broken handoffs, conflicting schemas, or sequencing gaps.
|
|
16
|
+
|
|
17
|
+
5. **Aggregate debt and deferred items.** Collect tech debt, deferred tasks, and known gaps into a single list with severity and owner-hint.
|
|
18
|
+
|
|
19
|
+
6. **Produce the verdict.** Report: `PASS` (done-of-definition met), `NEEDS-ATTENTION` (gaps that need a human call), or `NEEDS-REMEDIATION` (gaps that block archival). Recommend the matching gsd-pi next step (`/gsd verdict`, `/gsd dispatch validate`, or scheduling remediation).
|
|
20
|
+
|
|
21
|
+
## Success criteria
|
|
22
|
+
|
|
23
|
+
- Every requirement is mapped to covering evidence or flagged as uncovered.
|
|
24
|
+
- Cross-slice integration risks are explicit, not assumed away.
|
|
25
|
+
- The verdict is one of the three canonical values with supporting evidence.
|
|
26
|
+
- Debt/deferred items are listed, not silently dropped.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
You are running the GSD **audit-uat** workflow — cross-milestone audit of all outstanding UAT and verification items.
|
|
2
|
+
|
|
3
|
+
## Verify mode
|
|
4
|
+
|
|
5
|
+
{{verifyMode}}
|
|
6
|
+
|
|
7
|
+
## Process
|
|
8
|
+
|
|
9
|
+
1. **Find every outstanding verification item.** Scan all milestones and slices for items in a non-passing state: pending, skipped, blocked, human_needed. Read the slice SUMMARY/ASSESSMENT artifacts and any UAT records.
|
|
10
|
+
|
|
11
|
+
2. **Classify each item.** For each outstanding item, record: milestone/slice id, the item, its current state, and why it's outstanding (skipped intentionally, blocked by a dependency, awaiting a human, stale).
|
|
12
|
+
|
|
13
|
+
3. **Verify against the codebase** (only when `--verify` is set): for each item, check whether the code now satisfies it — turning stale "pending" items into pass/fail based on current evidence. Do not modify code; only re-evaluate.
|
|
14
|
+
|
|
15
|
+
4. **Produce a prioritized test plan.** Order the genuinely-outstanding items into a human test plan: blockers first, then high-risk, then the rest. Each entry has a clear test step and expected result.
|
|
16
|
+
|
|
17
|
+
5. **Summarize.** Report counts by state, the count turned pass/fail by verification, and the prioritized plan.
|
|
18
|
+
|
|
19
|
+
## Success criteria
|
|
20
|
+
|
|
21
|
+
- Every outstanding verification item is listed with its milestone/slice and reason.
|
|
22
|
+
- Stale items are detected (and, in verify mode, re-evaluated against the code).
|
|
23
|
+
- The test plan is prioritized by risk, not alphabetical.
|
|
24
|
+
- No item is silently dropped or assumed resolved.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
You are running the GSD **autonomous** workflow — run all remaining work on a milestone/slice continuously: discuss → plan → execute per slice, then validate, with minimal human intervention.
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
{{scope}}
|
|
6
|
+
|
|
7
|
+
## Flags
|
|
8
|
+
|
|
9
|
+
- `--interactive` — {{interactiveFlag}} (pause for confirmation at key boundaries)
|
|
10
|
+
- `--converge` — {{convergeFlag}} (re-run review cycles until concerns resolve before advancing)
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
|
|
14
|
+
This workflow is the gsd-pi equivalent of `/gsd auto` with explicit phase-ceremony. It drives the milestone through its lifecycle:
|
|
15
|
+
|
|
16
|
+
1. **For each pending slice**, in order: discuss (if not done) → plan (if not done) → execute (all tasks) → complete slice.
|
|
17
|
+
2. **Between slices**, honor the closeout boundary stop rule: stop after a slice closeout and leave the closeout surface visible, unless the user opted out of pause-at-boundary.
|
|
18
|
+
3. **`--converge`:** before advancing, run a plan-review-convergence pass on the slice; only advance when concerns resolve.
|
|
19
|
+
4. **`--interactive`:** confirm before each slice's discuss→plan→execute transitions.
|
|
20
|
+
5. **At milestone completion,** run validation (`/gsd dispatch validate`) rather than auto-closing.
|
|
21
|
+
|
|
22
|
+
Prefer delegating each lifecycle step to gsd-pi's native dispatch (`/gsd dispatch discuss|plan|execute`, `/gsd next`, `/gsd auto`) rather than reimplementing the unit machinery.
|
|
23
|
+
|
|
24
|
+
Never barrel past a closeout boundary silently; never mark a milestone complete without validation.
|
|
25
|
+
|
|
26
|
+
## Success criteria
|
|
27
|
+
|
|
28
|
+
- The milestone advances through its lifecycle in the correct order.
|
|
29
|
+
- Closeout boundaries are respected (stop and surface, don't barrel).
|
|
30
|
+
- `--converge` actually gates advancement on resolved concerns.
|
|
31
|
+
- Milestone completion goes through validation, not auto-close.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
You are running the GSD **code-review** workflow — review source files changed during recent work for bugs, security issues, and code quality problems.
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
{{scope}}
|
|
6
|
+
|
|
7
|
+
## Depth
|
|
8
|
+
|
|
9
|
+
{{depth}}
|
|
10
|
+
|
|
11
|
+
## Fix mode
|
|
12
|
+
|
|
13
|
+
{{fixMode}}
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
1. **Determine the file set.** Use the explicit `--files` list if provided. Otherwise derive the changed source files from the active slice's recent commits / SUMMARY, or fall back to the git diff against the base branch. Exclude `.gsd/`, lockfiles, generated/vendored code, and docs unless `--files` names them.
|
|
18
|
+
|
|
19
|
+
2. **Review each file** at the requested depth:
|
|
20
|
+
- **quick** — bugs, security, and correctness only.
|
|
21
|
+
- **standard** (default) — quick + maintainability, error handling, edge cases.
|
|
22
|
+
- **deep** — standard + performance, concurrency, API design, test coverage gaps.
|
|
23
|
+
|
|
24
|
+
Ground every finding in the actual code with file path + line reference. Categorize each by severity (critical / warning / nit) and type (bug, security, quality, performance).
|
|
25
|
+
|
|
26
|
+
3. **Write the review.** Produce `.gsd/reviews/{{reviewId}}-REVIEW.md` with the findings table and per-finding detail (location, issue, suggested fix).
|
|
27
|
+
|
|
28
|
+
4. **Present results.** Summarize counts by severity and list the critical findings first.
|
|
29
|
+
|
|
30
|
+
5. **Fix mode** (only when `--fix` is set): for each finding that is safely auto-fixable (deterministic, no behavior change beyond the fix), apply it. After each fix batch, run the project's tests. Commit atomically with the finding IDs referenced in the message. Do not auto-apply findings that are ambiguous or that change public behavior — surface those for a human decision instead.
|
|
31
|
+
|
|
32
|
+
## Success criteria
|
|
33
|
+
|
|
34
|
+
- Every finding cites a concrete file path and line.
|
|
35
|
+
- Findings are categorized by severity and type.
|
|
36
|
+
- The review is written to `.gsd/reviews/`.
|
|
37
|
+
- Fixes only touch safely-auto-fixable findings, and tests run after each batch.
|