@opengsd/gsd-pi 1.0.2-dev.e9a1b49 → 1.0.2-dev.fb7ddf1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -12
- package/dist/headless-answers.js +2 -1
- package/dist/headless-events.d.ts +1 -0
- package/dist/headless-events.js +8 -1
- package/dist/onboarding.js +22 -3
- package/dist/resource-loader.d.ts +7 -0
- package/dist/resource-loader.js +44 -9
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +34 -11
- package/dist/resources/extensions/context7/index.js +12 -2
- package/dist/resources/extensions/get-secrets-from-user.js +16 -16
- package/dist/resources/extensions/google-cli/index.js +30 -0
- package/dist/resources/extensions/google-cli/models.js +55 -0
- package/dist/resources/extensions/google-cli/package.json +11 -0
- package/dist/resources/extensions/google-cli/readiness.js +12 -0
- package/dist/resources/extensions/google-cli/stream-adapter.js +191 -0
- package/dist/resources/extensions/gsd/auto/loop.js +81 -1
- package/dist/resources/extensions/gsd/auto/orchestrator.js +4 -2
- package/dist/resources/extensions/gsd/auto/phases.js +38 -1
- package/dist/resources/extensions/gsd/auto/run-unit.js +8 -0
- package/dist/resources/extensions/gsd/auto/session.js +3 -0
- package/dist/resources/extensions/gsd/auto-dispatch.js +17 -7
- package/dist/resources/extensions/gsd/auto-post-unit.js +65 -16
- package/dist/resources/extensions/gsd/auto-prompts.js +5 -236
- package/dist/resources/extensions/gsd/auto-recovery.js +10 -5
- package/dist/resources/extensions/gsd/auto-start.js +232 -49
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +2 -1
- package/dist/resources/extensions/gsd/auto-verification.js +14 -2
- package/dist/resources/extensions/gsd/auto-worktree.js +36 -55
- package/dist/resources/extensions/gsd/auto.js +40 -2
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +4 -3
- package/dist/resources/extensions/gsd/bootstrap/exec-tools.js +7 -2
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +39 -5
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +107 -27
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +3 -27
- package/dist/resources/extensions/gsd/bootstrap/tool-search-shim.js +4 -4
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +1 -1
- package/dist/resources/extensions/gsd/closeout-recovery.js +7 -1
- package/dist/resources/extensions/gsd/commands/handlers/auto.js +9 -1
- package/dist/resources/extensions/gsd/commands-handlers.js +3 -0
- package/dist/resources/extensions/gsd/commands-usage.js +105 -1
- package/dist/resources/extensions/gsd/config-overlay.js +20 -14
- package/dist/resources/extensions/gsd/context-overlay.js +22 -16
- package/dist/resources/extensions/gsd/dashboard-overlay.js +10 -23
- package/dist/resources/extensions/gsd/doctor-engine-checks.js +87 -0
- package/dist/resources/extensions/gsd/doctor-git-checks.js +70 -5
- package/dist/resources/extensions/gsd/doctor-providers.js +54 -24
- package/dist/resources/extensions/gsd/doctor.js +7 -2
- package/dist/resources/extensions/gsd/git-conflict-state.js +26 -1
- package/dist/resources/extensions/gsd/guided-flow.js +5 -6
- package/dist/resources/extensions/gsd/key-manager.js +45 -13
- package/dist/resources/extensions/gsd/mcp-filter.js +57 -18
- package/dist/resources/extensions/gsd/mcp-project-config.js +15 -9
- package/dist/resources/extensions/gsd/migration-auto-check.js +5 -1
- package/dist/resources/extensions/gsd/milestone-actions.js +3 -0
- package/dist/resources/extensions/gsd/milestone-reopen-events.js +28 -0
- package/dist/resources/extensions/gsd/notification-overlay.js +8 -9
- package/dist/resources/extensions/gsd/parallel-merge.js +6 -4
- package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +15 -13
- package/dist/resources/extensions/gsd/post-execution-checks.js +5 -4
- package/dist/resources/extensions/gsd/preferences-skills.js +11 -4
- package/dist/resources/extensions/gsd/preferences.js +14 -2
- package/dist/resources/extensions/gsd/prompt-loader.js +2 -0
- package/dist/resources/extensions/gsd/prompts/discuss.md +4 -2
- package/dist/resources/extensions/gsd/prompts/gate-evaluate.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/dist/resources/extensions/gsd/prompts/system.md +3 -20
- package/dist/resources/extensions/gsd/queue-reorder-ui.js +28 -18
- package/dist/resources/extensions/gsd/repo-identity.js +36 -6
- package/dist/resources/extensions/gsd/repository-registry.js +3 -1
- package/dist/resources/extensions/gsd/safety/evidence-collector.js +13 -6
- package/dist/resources/extensions/gsd/skill-activation.js +233 -0
- package/dist/resources/extensions/gsd/skill-catalog.data.js +820 -0
- package/dist/resources/extensions/gsd/skill-catalog.install.js +179 -0
- package/dist/resources/extensions/gsd/skill-catalog.js +5 -1028
- package/dist/resources/extensions/gsd/skill-discovery.js +121 -79
- package/dist/resources/extensions/gsd/skill-scope.js +52 -0
- package/dist/resources/extensions/gsd/skill-telemetry.js +6 -39
- package/dist/resources/extensions/gsd/skills/gsd-headless/SKILL.md +1 -1
- package/dist/resources/extensions/gsd/skills.js +60 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/artifact-db.js +351 -0
- package/dist/resources/extensions/gsd/state-reconciliation/index.js +41 -0
- package/dist/resources/extensions/gsd/state-reconciliation/registry.js +4 -0
- package/dist/resources/extensions/gsd/tools/complete-task.js +9 -0
- package/dist/resources/extensions/gsd/tools/exec-tool.js +42 -8
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +63 -2
- package/dist/resources/extensions/gsd/tui/render-kit.js +51 -0
- package/dist/resources/extensions/gsd/unit-context-manifest.js +35 -26
- package/dist/resources/extensions/gsd/user-input-boundary.js +1 -1
- package/dist/resources/extensions/gsd/vision-ask.js +22 -0
- package/dist/resources/extensions/gsd/visualizer-overlay.js +8 -36
- package/dist/resources/extensions/gsd/worktree-lifecycle.js +24 -3
- package/dist/resources/extensions/gsd/worktree-post-create-hook.js +117 -0
- package/dist/resources/extensions/gsd/worktree-state-projection.js +29 -0
- package/dist/resources/extensions/search-the-web/native-search.js +57 -8
- package/dist/resources/extensions/shared/confirm-ui.js +9 -6
- package/dist/resources/extensions/shared/dialog-frame.js +42 -0
- package/dist/resources/extensions/shared/interview-ui.js +42 -30
- package/dist/resources/extensions/shared/next-action-ui.js +6 -6
- package/dist/resources/extensions/subagent/index.js +8 -15
- package/dist/resources/shared/package-manager-detection.js +36 -0
- package/dist/resources/skills/agent-browser/SKILL.md +1 -1
- package/dist/resources/skills/api-design/SKILL.md +1 -1
- package/dist/resources/skills/code-optimizer/SKILL.md +6 -11
- package/dist/resources/skills/create-gsd-extension/SKILL.md +1 -1
- package/dist/resources/skills/create-mcp-server/SKILL.md +1 -1
- package/dist/resources/skills/create-skill/references/gsd-skill-ecosystem.md +1 -1
- package/dist/resources/skills/create-skill/workflows/verify-skill.md +2 -10
- package/dist/resources/skills/debug-like-expert/references/when-to-research.md +1 -5
- package/dist/resources/skills/decompose-into-slices/SKILL.md +3 -3
- package/dist/resources/skills/dependency-upgrade/SKILL.md +1 -1
- package/dist/resources/skills/forensics/SKILL.md +2 -2
- package/dist/resources/skills/grill-me/SKILL.md +1 -1
- package/dist/resources/skills/handoff/SKILL.md +1 -1
- package/dist/resources/skills/make-interfaces-feel-better/SKILL.md +1 -1
- package/dist/resources/skills/observability/SKILL.md +1 -1
- package/dist/resources/skills/security-review/SKILL.md +1 -1
- package/dist/resources/skills/spike-wrap-up/SKILL.md +1 -1
- package/dist/resources/skills/tdd/SKILL.md +1 -1
- package/dist/resources/skills/write-docs/SKILL.md +1 -1
- package/dist/resources/skills/write-milestone-brief/SKILL.md +1 -1
- package/dist/update-check.d.ts +6 -2
- package/dist/update-check.js +7 -3
- 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 +2 -2
- package/dist/web/standalone/.next/prerender-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/api/update/route.js +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/1834.js +2 -2
- package/dist/web/standalone/.next/server/middleware-build-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/node_modules/node-pty/build/Makefile +1 -1
- package/dist/worktree-cli.d.ts +0 -2
- package/dist/worktree-cli.js +21 -9
- package/package.json +5 -2
- package/packages/cloud-mcp-gateway/bin/gsd-cloud-mcp-gateway.js +14 -0
- package/packages/cloud-mcp-gateway/package.json +4 -3
- package/packages/contracts/dist/rpc.test.js +5 -0
- package/packages/contracts/dist/rpc.test.js.map +1 -1
- package/packages/contracts/dist/workflow.d.ts +15 -0
- package/packages/contracts/dist/workflow.d.ts.map +1 -1
- package/packages/contracts/dist/workflow.js +16 -0
- package/packages/contracts/dist/workflow.js.map +1 -1
- package/packages/contracts/dist/workflow.test.js +1 -0
- package/packages/contracts/dist/workflow.test.js.map +1 -1
- package/packages/contracts/package.json +1 -1
- package/packages/daemon/package.json +4 -4
- package/packages/gsd-agent-core/dist/session/agent-session-extensions.d.ts +1 -0
- package/packages/gsd-agent-core/dist/session/agent-session-extensions.d.ts.map +1 -1
- package/packages/gsd-agent-core/dist/session/agent-session-extensions.js +22 -8
- package/packages/gsd-agent-core/dist/session/agent-session-extensions.js.map +1 -1
- package/packages/gsd-agent-core/package.json +5 -5
- package/packages/gsd-agent-modes/dist/modes/interactive/components/dialog-container.d.ts +12 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/dialog-container.d.ts.map +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/dialog-container.js +45 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/dialog-container.js.map +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.d.ts +3 -2
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.js +11 -11
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.d.ts +3 -3
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.js +13 -11
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-input.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.d.ts +3 -3
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.js +12 -10
- package/packages/gsd-agent-modes/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/index.d.ts +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/index.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/index.js +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/index.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.d.ts +1 -1
- 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 +2 -2
- package/packages/gsd-agent-modes/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.d.ts +6 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.js +9 -6
- package/packages/gsd-agent-modes/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- 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 +3 -1
- 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.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js +0 -2
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.d.ts +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.js +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode-class-constants.js.map +1 -1
- 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 +2 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-auth.d.ts +3 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-auth.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-auth.js +144 -2
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-auth.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-session.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-session.js +2 -14
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-selectors-session.js.map +1 -1
- package/packages/gsd-agent-modes/package.json +7 -7
- package/packages/mcp-server/bin/gsd-mcp-server.js +14 -0
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +7 -1
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts +13 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +47 -8
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +5 -4
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +16 -14
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/harness/skills.js +6 -0
- package/packages/pi-agent-core/dist/harness/skills.js.map +1 -1
- package/packages/pi-agent-core/dist/harness/system-prompt.d.ts +7 -0
- package/packages/pi-agent-core/dist/harness/system-prompt.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/harness/system-prompt.js +7 -0
- package/packages/pi-agent-core/dist/harness/system-prompt.js.map +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-ai/bin/pi-ai.js +14 -0
- package/packages/pi-ai/dist/models.generated.d.ts +48 -206
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +73 -226
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +50 -0
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses-shared.js +28 -4
- package/packages/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/packages/pi-ai/dist/types.d.ts +2 -0
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/dist/utils/tests/tool-search-shim.test.js +29 -1
- package/packages/pi-ai/dist/utils/tests/tool-search-shim.test.js.map +1 -1
- package/packages/pi-ai/dist/utils/tool-search-shim.d.ts +4 -1
- package/packages/pi-ai/dist/utils/tool-search-shim.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/tool-search-shim.js +58 -10
- package/packages/pi-ai/dist/utils/tool-search-shim.js.map +1 -1
- package/packages/pi-ai/dist/utils/tool-shims.d.ts +1 -1
- package/packages/pi-ai/dist/utils/tool-shims.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/tool-shims.js.map +1 -1
- package/packages/pi-ai/package.json +3 -2
- package/packages/pi-coding-agent/README.md +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-upstream-types.d.ts +2 -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/loader.js +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -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 +8 -2
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.d.ts +3 -0
- package/packages/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.js +3 -0
- package/packages/pi-coding-agent/dist/core/skills.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/edit.js +5 -7
- package/packages/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/read.d.ts +2 -2
- package/packages/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/read.js +5 -4
- package/packages/pi-coding-agent/dist/core/tools/read.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/write.js +0 -1
- package/packages/pi-coding-agent/dist/core/tools/write.js.map +1 -1
- package/packages/pi-coding-agent/package.json +8 -8
- package/packages/pi-tui/package.json +1 -1
- package/packages/rpc-client/package.json +2 -2
- package/pkg/package.json +1 -1
- package/scripts/install/deps.js +10 -0
- package/scripts/install/detect-existing.js +17 -3
- package/scripts/install/npm-global.js +103 -33
- package/scripts/install.js +1 -0
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +36 -11
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +86 -19
- package/src/resources/extensions/context7/index.ts +15 -2
- package/src/resources/extensions/get-secrets-from-user.ts +17 -16
- package/src/resources/extensions/google-cli/index.ts +34 -0
- package/src/resources/extensions/google-cli/models.ts +57 -0
- package/src/resources/extensions/google-cli/package.json +11 -0
- package/src/resources/extensions/google-cli/readiness.ts +15 -0
- package/src/resources/extensions/google-cli/stream-adapter.ts +245 -0
- package/src/resources/extensions/gsd/auto/loop.ts +96 -1
- package/src/resources/extensions/gsd/auto/orchestrator.ts +4 -2
- package/src/resources/extensions/gsd/auto/phases.ts +47 -1
- package/src/resources/extensions/gsd/auto/run-unit.ts +10 -0
- package/src/resources/extensions/gsd/auto/session.ts +3 -0
- package/src/resources/extensions/gsd/auto-dispatch.ts +31 -11
- package/src/resources/extensions/gsd/auto-post-unit.ts +101 -18
- package/src/resources/extensions/gsd/auto-prompts.ts +4 -284
- package/src/resources/extensions/gsd/auto-recovery.ts +10 -7
- package/src/resources/extensions/gsd/auto-start.ts +307 -56
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +3 -1
- package/src/resources/extensions/gsd/auto-verification.ts +18 -2
- package/src/resources/extensions/gsd/auto-worktree.ts +47 -57
- package/src/resources/extensions/gsd/auto.ts +50 -2
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +4 -3
- package/src/resources/extensions/gsd/bootstrap/exec-tools.ts +9 -4
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +42 -5
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +124 -25
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +3 -28
- package/src/resources/extensions/gsd/bootstrap/tool-search-shim.ts +4 -4
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +1 -1
- package/src/resources/extensions/gsd/closeout-recovery.ts +6 -1
- package/src/resources/extensions/gsd/commands/handlers/auto.ts +9 -1
- package/src/resources/extensions/gsd/commands-handlers.ts +2 -0
- package/src/resources/extensions/gsd/commands-usage.ts +110 -5
- package/src/resources/extensions/gsd/config-overlay.ts +19 -16
- package/src/resources/extensions/gsd/context-overlay.ts +24 -19
- package/src/resources/extensions/gsd/dashboard-overlay.ts +14 -27
- package/src/resources/extensions/gsd/doctor-engine-checks.ts +99 -0
- package/src/resources/extensions/gsd/doctor-git-checks.ts +72 -5
- package/src/resources/extensions/gsd/doctor-providers.ts +55 -27
- package/src/resources/extensions/gsd/doctor-types.ts +2 -0
- package/src/resources/extensions/gsd/doctor.ts +7 -2
- package/src/resources/extensions/gsd/git-conflict-state.ts +25 -1
- package/src/resources/extensions/gsd/guided-flow.ts +5 -6
- package/src/resources/extensions/gsd/key-manager.ts +57 -14
- package/src/resources/extensions/gsd/mcp-filter.ts +64 -17
- package/src/resources/extensions/gsd/mcp-project-config.ts +24 -9
- package/src/resources/extensions/gsd/migration-auto-check.ts +6 -0
- package/src/resources/extensions/gsd/milestone-actions.ts +2 -0
- package/src/resources/extensions/gsd/milestone-reopen-events.ts +28 -0
- package/src/resources/extensions/gsd/notification-overlay.ts +12 -11
- package/src/resources/extensions/gsd/parallel-merge.ts +6 -4
- package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +16 -12
- package/src/resources/extensions/gsd/post-execution-checks.ts +7 -4
- package/src/resources/extensions/gsd/preferences-skills.ts +11 -4
- package/src/resources/extensions/gsd/preferences.ts +17 -2
- package/src/resources/extensions/gsd/prompt-loader.ts +2 -0
- package/src/resources/extensions/gsd/prompts/discuss.md +4 -2
- package/src/resources/extensions/gsd/prompts/gate-evaluate.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/src/resources/extensions/gsd/prompts/system.md +3 -20
- package/src/resources/extensions/gsd/queue-reorder-ui.ts +29 -20
- package/src/resources/extensions/gsd/repo-identity.ts +35 -7
- package/src/resources/extensions/gsd/repository-registry.ts +3 -1
- package/src/resources/extensions/gsd/safety/evidence-collector.ts +13 -6
- package/src/resources/extensions/gsd/skill-activation.ts +292 -0
- package/src/resources/extensions/gsd/skill-catalog.data.ts +858 -0
- package/src/resources/extensions/gsd/skill-catalog.install.ts +205 -0
- package/src/resources/extensions/gsd/skill-catalog.ts +16 -1087
- package/src/resources/extensions/gsd/skill-discovery.ts +134 -78
- package/src/resources/extensions/gsd/skill-scope.ts +63 -0
- package/src/resources/extensions/gsd/skill-telemetry.ts +6 -40
- package/src/resources/extensions/gsd/skills/gsd-headless/SKILL.md +1 -1
- package/src/resources/extensions/gsd/skills.ts +75 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/artifact-db.ts +499 -0
- package/src/resources/extensions/gsd/state-reconciliation/index.ts +40 -0
- package/src/resources/extensions/gsd/state-reconciliation/registry.ts +8 -0
- package/src/resources/extensions/gsd/state-reconciliation/types.ts +30 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +328 -2
- package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +75 -0
- package/src/resources/extensions/gsd/tests/auto-post-unit-artifact-diagnostic.test.ts +28 -2
- package/src/resources/extensions/gsd/tests/auto-post-unit-evidence-crossref-4909.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +41 -0
- package/src/resources/extensions/gsd/tests/auto-retry-mcp-churn-fixes.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/auto-start-orphan-bootstrap.test.ts +436 -0
- package/src/resources/extensions/gsd/tests/auto-worktree-untracked-content.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/closeout-recovery.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/collect-from-manifest.test.ts +31 -0
- package/src/resources/extensions/gsd/tests/commands-context.test.ts +5 -3
- package/src/resources/extensions/gsd/tests/commands-dispatcher-workspace-git.test.ts +15 -2
- package/src/resources/extensions/gsd/tests/commands-usage.test.ts +97 -0
- package/src/resources/extensions/gsd/tests/complete-slice-reopen-handoff.test.ts +40 -3
- package/src/resources/extensions/gsd/tests/context-chart.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +64 -0
- package/src/resources/extensions/gsd/tests/dashboard-overlay.test.ts +25 -0
- package/src/resources/extensions/gsd/tests/discord-invite-links.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/discuss-prompt.test.ts +4 -2
- package/src/resources/extensions/gsd/tests/discuss-tool-scoping.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/doctor-empty-worktree.test.ts +71 -1
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +105 -0
- package/src/resources/extensions/gsd/tests/doctor-scope-db-unavailable.test.ts +101 -1
- package/src/resources/extensions/gsd/tests/exec-sandbox.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/guided-discuss-milestone-prompt-rendering.test.ts +6 -0
- package/src/resources/extensions/gsd/tests/headless-answers.test.ts +22 -3
- package/src/resources/extensions/gsd/tests/integration/parallel-merge.test.ts +43 -0
- package/src/resources/extensions/gsd/tests/interactive-tool-idle-exemption.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/key-manager.test.ts +23 -4
- package/src/resources/extensions/gsd/tests/mcp-filter.test.ts +19 -1
- package/src/resources/extensions/gsd/tests/mcp-project-config.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/migration-auto-check.test.ts +56 -1
- package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +6 -1
- package/src/resources/extensions/gsd/tests/orphaned-worktree-audit.test.ts +70 -10
- package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +7 -1
- package/src/resources/extensions/gsd/tests/park-milestone.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/post-exec-retry-bypass.test.ts +127 -10
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/post-unit-retry-on-orchestrator-bridge.test.ts +93 -0
- package/src/resources/extensions/gsd/tests/project-relocation-recovery.test.ts +101 -0
- package/src/resources/extensions/gsd/tests/queue-reorder-ui.test.ts +46 -0
- package/src/resources/extensions/gsd/tests/register-extension-guard.test.ts +116 -11
- package/src/resources/extensions/gsd/tests/repo-identity-worktree.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/repository-registry.test.ts +30 -1
- package/src/resources/extensions/gsd/tests/show-config-command.test.ts +4 -0
- package/src/resources/extensions/gsd/tests/skill-discovery.test.ts +111 -0
- package/src/resources/extensions/gsd/tests/skill-scope-auto.test.ts +67 -0
- package/src/resources/extensions/gsd/tests/skills.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/start-auto-detached.test.ts +13 -2
- package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +303 -0
- package/src/resources/extensions/gsd/tests/token-tool-gating.test.ts +67 -1
- package/src/resources/extensions/gsd/tests/tool-param-optionality.test.ts +24 -1
- package/src/resources/extensions/gsd/tests/tui-border-assertions.ts +28 -0
- package/src/resources/extensions/gsd/tests/tui-render-kit.test.ts +14 -0
- package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/user-input-boundary.test.ts +26 -0
- package/src/resources/extensions/gsd/tests/vision-ask.test.ts +23 -0
- package/src/resources/extensions/gsd/tests/visualizer-overlay.test.ts +6 -1
- package/src/resources/extensions/gsd/tests/workflow-mcp-auto-prep.test.ts +133 -0
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +82 -0
- package/src/resources/extensions/gsd/tests/workspace-git-preflight.test.ts +16 -1
- package/src/resources/extensions/gsd/tests/worktree-lifecycle.test.ts +28 -0
- package/src/resources/extensions/gsd/tests/worktree-post-create-hook.test.ts +141 -1
- package/src/resources/extensions/gsd/tests/worktree-state-projection.test.ts +38 -1
- package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +10 -0
- package/src/resources/extensions/gsd/tests/zombie-gsd-state.test.ts +45 -1
- package/src/resources/extensions/gsd/tools/complete-task.ts +9 -0
- package/src/resources/extensions/gsd/tools/exec-tool.ts +42 -10
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +82 -5
- package/src/resources/extensions/gsd/tui/render-kit.ts +82 -0
- package/src/resources/extensions/gsd/unit-context-manifest.ts +37 -26
- package/src/resources/extensions/gsd/user-input-boundary.ts +1 -1
- package/src/resources/extensions/gsd/vision-ask.ts +28 -0
- package/src/resources/extensions/gsd/visualizer-overlay.ts +12 -40
- package/src/resources/extensions/gsd/worktree-lifecycle.ts +37 -2
- package/src/resources/extensions/gsd/worktree-post-create-hook.ts +127 -0
- package/src/resources/extensions/gsd/worktree-state-projection.ts +33 -0
- package/src/resources/extensions/search-the-web/native-search.ts +60 -8
- package/src/resources/extensions/shared/confirm-ui.ts +8 -12
- package/src/resources/extensions/shared/dialog-frame.ts +71 -0
- package/src/resources/extensions/shared/interview-ui.ts +43 -42
- package/src/resources/extensions/shared/next-action-ui.ts +6 -6
- package/src/resources/extensions/shared/tests/confirm-ui.test.ts +57 -0
- package/src/resources/extensions/shared/tests/interview-ui-border.test.ts +163 -0
- package/src/resources/extensions/shared/tests/next-action-ui-hasui.test.ts +55 -0
- package/src/resources/extensions/subagent/index.ts +8 -15
- package/src/resources/shared/package-manager-detection.ts +39 -0
- package/src/resources/skills/agent-browser/SKILL.md +1 -1
- package/src/resources/skills/api-design/SKILL.md +1 -1
- package/src/resources/skills/code-optimizer/SKILL.md +6 -11
- package/src/resources/skills/create-gsd-extension/SKILL.md +1 -1
- package/src/resources/skills/create-mcp-server/SKILL.md +1 -1
- package/src/resources/skills/create-skill/references/gsd-skill-ecosystem.md +1 -1
- package/src/resources/skills/create-skill/workflows/verify-skill.md +2 -10
- package/src/resources/skills/debug-like-expert/references/when-to-research.md +1 -5
- package/src/resources/skills/decompose-into-slices/SKILL.md +3 -3
- package/src/resources/skills/dependency-upgrade/SKILL.md +1 -1
- package/src/resources/skills/forensics/SKILL.md +2 -2
- package/src/resources/skills/grill-me/SKILL.md +1 -1
- package/src/resources/skills/handoff/SKILL.md +1 -1
- package/src/resources/skills/make-interfaces-feel-better/SKILL.md +1 -1
- package/src/resources/skills/observability/SKILL.md +1 -1
- package/src/resources/skills/security-review/SKILL.md +1 -1
- package/src/resources/skills/spike-wrap-up/SKILL.md +1 -1
- package/src/resources/skills/tdd/SKILL.md +1 -1
- package/src/resources/skills/write-docs/SKILL.md +1 -1
- package/src/resources/skills/write-milestone-brief/SKILL.md +1 -1
- package/dist/tsconfig.extensions.tsbuildinfo +0 -1
- /package/dist/web/standalone/.next/static/{BEjZM0MLHLibeMFbjtMol → tH1tnDYt1E0hK9Ien73Z0}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{BEjZM0MLHLibeMFbjtMol → tH1tnDYt1E0hK9Ien73Z0}/_ssgManifest.js +0 -0
|
@@ -6,37 +6,84 @@ import { resolveModelMcpConfig } from "./preferences-mcp.js";
|
|
|
6
6
|
|
|
7
7
|
interface McpJsonFile {
|
|
8
8
|
mcpServers?: Record<string, unknown>;
|
|
9
|
+
servers?: Record<string, unknown>;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
interface ClaudeSettingsFile {
|
|
12
13
|
mcpServers?: Record<string, unknown>;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
interface DiscoveredMcpServer {
|
|
17
|
+
name: string;
|
|
18
|
+
config: unknown;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
22
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function readJsonFile(path: string, ignoreParseErrors = false): unknown | undefined {
|
|
26
|
+
if (!existsSync(path)) return undefined;
|
|
27
|
+
try {
|
|
28
|
+
return JSON.parse(readFileSync(path, "utf-8")) as unknown;
|
|
29
|
+
} catch (err) {
|
|
30
|
+
if (!ignoreParseErrors) throw err;
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function collectServerEntries(servers: unknown): DiscoveredMcpServer[] {
|
|
36
|
+
if (!isRecord(servers)) return [];
|
|
37
|
+
return Object.entries(servers).map(([name, config]) => ({ name, config }));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function discoverMcpServers(projectDir: string): DiscoveredMcpServer[] {
|
|
16
41
|
const mcpJsonPath = resolve(projectDir, ".mcp.json");
|
|
17
42
|
const settingsPath = resolve(projectDir, ".claude", "settings.json");
|
|
18
43
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
44
|
+
const mcpJson = readJsonFile(mcpJsonPath) as McpJsonFile | undefined;
|
|
45
|
+
const settings = readJsonFile(settingsPath, true) as ClaudeSettingsFile | undefined;
|
|
46
|
+
|
|
47
|
+
const seen = new Set<string>();
|
|
48
|
+
const discovered: DiscoveredMcpServer[] = [];
|
|
49
|
+
for (const entry of [
|
|
50
|
+
...collectServerEntries(mcpJson?.mcpServers),
|
|
51
|
+
...collectServerEntries(mcpJson?.servers),
|
|
52
|
+
...collectServerEntries(settings?.mcpServers),
|
|
53
|
+
]) {
|
|
54
|
+
if (seen.has(entry.name)) continue;
|
|
55
|
+
seen.add(entry.name);
|
|
56
|
+
discovered.push(entry);
|
|
24
57
|
}
|
|
58
|
+
return discovered;
|
|
59
|
+
}
|
|
25
60
|
|
|
26
|
-
|
|
27
|
-
if (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
61
|
+
function isWorkflowMcpServerConfig(config: unknown): boolean {
|
|
62
|
+
if (!isRecord(config)) return false;
|
|
63
|
+
const env = config.env;
|
|
64
|
+
if (isRecord(env)) {
|
|
65
|
+
if (
|
|
66
|
+
typeof env.GSD_WORKFLOW_PROJECT_ROOT === "string"
|
|
67
|
+
|| typeof env.GSD_WORKFLOW_EXECUTORS_MODULE === "string"
|
|
68
|
+
|| typeof env.GSD_WORKFLOW_WRITE_GATE_MODULE === "string"
|
|
69
|
+
|| typeof env.GSD_PERSIST_WRITE_GATE_STATE === "string"
|
|
70
|
+
) {
|
|
71
|
+
return true;
|
|
36
72
|
}
|
|
37
73
|
}
|
|
38
74
|
|
|
39
|
-
|
|
75
|
+
const command = typeof config.command === "string" ? config.command : "";
|
|
76
|
+
if (command.includes("gsd-mcp-server")) return true;
|
|
77
|
+
const args = Array.isArray(config.args) ? config.args.filter((arg): arg is string => typeof arg === "string") : [];
|
|
78
|
+
return args.some((arg) => arg.includes("gsd-mcp-server") || arg.includes("packages/mcp-server"));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function discoverWorkflowMcpServerName(projectDir: string): string | undefined {
|
|
82
|
+
return discoverMcpServers(projectDir).find((server) => isWorkflowMcpServerConfig(server.config))?.name;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function discoverMcpServerNames(projectDir: string): string[] {
|
|
86
|
+
return discoverMcpServers(projectDir).map((server) => server.name);
|
|
40
87
|
}
|
|
41
88
|
|
|
42
89
|
export function computeMcpDisallowedTools(
|
|
@@ -21,6 +21,11 @@ export interface EnsureProjectWorkflowMcpConfigResult {
|
|
|
21
21
|
status: "created" | "updated" | "unchanged";
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
interface ProjectWorkflowMcpServerSpec {
|
|
25
|
+
serverName: string;
|
|
26
|
+
server: ProjectMcpServerConfig;
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
interface McpConfigFile {
|
|
25
30
|
mcpServers?: Record<string, ProjectMcpServerConfig>;
|
|
26
31
|
servers?: Record<string, ProjectMcpServerConfig>;
|
|
@@ -48,6 +53,13 @@ export function buildProjectWorkflowMcpServerConfig(
|
|
|
48
53
|
projectRoot: string,
|
|
49
54
|
env: NodeJS.ProcessEnv = process.env,
|
|
50
55
|
): ProjectMcpServerConfig {
|
|
56
|
+
return buildProjectWorkflowMcpServerSpec(projectRoot, env).server;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function buildProjectWorkflowMcpServerSpec(
|
|
60
|
+
projectRoot: string,
|
|
61
|
+
env: NodeJS.ProcessEnv = process.env,
|
|
62
|
+
): ProjectWorkflowMcpServerSpec {
|
|
51
63
|
const resolvedProjectRoot = resolve(projectRoot);
|
|
52
64
|
const gsdCliPath = resolveBundledGsdCliPath(env);
|
|
53
65
|
const launch = detectWorkflowMcpLaunchConfig(resolvedProjectRoot, {
|
|
@@ -62,10 +74,13 @@ export function buildProjectWorkflowMcpServerConfig(
|
|
|
62
74
|
}
|
|
63
75
|
|
|
64
76
|
return {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
77
|
+
serverName: launch.name || GSD_WORKFLOW_MCP_SERVER_NAME,
|
|
78
|
+
server: {
|
|
79
|
+
command: launch.command,
|
|
80
|
+
...(launch.args && launch.args.length > 0 ? { args: launch.args } : {}),
|
|
81
|
+
...(launch.cwd ? { cwd: launch.cwd } : {}),
|
|
82
|
+
...(launch.env ? { env: launch.env } : {}),
|
|
83
|
+
},
|
|
69
84
|
};
|
|
70
85
|
}
|
|
71
86
|
|
|
@@ -92,23 +107,23 @@ export function ensureProjectWorkflowMcpConfig(
|
|
|
92
107
|
|
|
93
108
|
const configPath = resolve(resolvedProjectRoot, ".mcp.json");
|
|
94
109
|
const existing = readExistingConfig(configPath);
|
|
95
|
-
const desiredServer =
|
|
110
|
+
const { serverName, server: desiredServer } = buildProjectWorkflowMcpServerSpec(resolvedProjectRoot, env);
|
|
96
111
|
const previousServers = existing.mcpServers ?? {};
|
|
97
112
|
const nextServers = {
|
|
98
113
|
...previousServers,
|
|
99
|
-
[
|
|
114
|
+
[serverName]: desiredServer,
|
|
100
115
|
};
|
|
101
116
|
|
|
102
117
|
const alreadyPresent = existsSync(configPath);
|
|
103
118
|
const unchanged =
|
|
104
|
-
JSON.stringify(previousServers[
|
|
119
|
+
JSON.stringify(previousServers[serverName] ?? null)
|
|
105
120
|
=== JSON.stringify(desiredServer)
|
|
106
121
|
&& existing.mcpServers !== undefined;
|
|
107
122
|
|
|
108
123
|
if (unchanged) {
|
|
109
124
|
return {
|
|
110
125
|
configPath,
|
|
111
|
-
serverName
|
|
126
|
+
serverName,
|
|
112
127
|
status: "unchanged",
|
|
113
128
|
};
|
|
114
129
|
}
|
|
@@ -122,7 +137,7 @@ export function ensureProjectWorkflowMcpConfig(
|
|
|
122
137
|
|
|
123
138
|
return {
|
|
124
139
|
configPath,
|
|
125
|
-
serverName
|
|
140
|
+
serverName,
|
|
126
141
|
status: alreadyPresent ? "updated" : "created",
|
|
127
142
|
};
|
|
128
143
|
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
getMilestoneSlices,
|
|
7
7
|
getSliceTasks,
|
|
8
8
|
isDbAvailable,
|
|
9
|
+
refreshOpenDatabaseFromDisk,
|
|
9
10
|
} from "./gsd-db.js";
|
|
10
11
|
import { parsePlan, parseRoadmap } from "./parsers-legacy.js";
|
|
11
12
|
import {
|
|
@@ -100,6 +101,11 @@ export async function checkMarkdownHierarchyAgainstDb(
|
|
|
100
101
|
throw new Error(`failed to open or create the GSD database at ${basePath}`);
|
|
101
102
|
}
|
|
102
103
|
|
|
104
|
+
// The markdown projections may have just been written by a workflow/MCP
|
|
105
|
+
// server in another process. Reopen before comparing so startup does not
|
|
106
|
+
// warn from a stale long-lived SQLite handle.
|
|
107
|
+
refreshOpenDatabaseFromDisk();
|
|
108
|
+
|
|
103
109
|
const beforeDb = countDbHierarchy();
|
|
104
110
|
if (sameCounts(markdown, beforeDb)) {
|
|
105
111
|
return { action: "none", reason: "in-sync", markdown, beforeDb, afterDb: beforeDb };
|
|
@@ -162,6 +162,8 @@ export function discardMilestone(basePath: string, milestoneId: string): boolean
|
|
|
162
162
|
} catch (err) {
|
|
163
163
|
logWarning("engine", `discardMilestone DB cleanup failed for ${milestoneId}: ${(err as Error).message}`);
|
|
164
164
|
}
|
|
165
|
+
} else {
|
|
166
|
+
logWarning("engine", `discardMilestone DB cleanup skipped for ${milestoneId}: database unavailable`);
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
invalidateAllCaches();
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
|
|
3
|
+
import { gsdRoot } from "./paths.js";
|
|
4
|
+
import { readEvents } from "./workflow-events.js";
|
|
5
|
+
|
|
6
|
+
export function latestExplicitReopenAt(basePath: string, milestoneId: string): string | null {
|
|
7
|
+
const root = gsdRoot(basePath);
|
|
8
|
+
const candidates = [
|
|
9
|
+
join(root, "event-log.jsonl"),
|
|
10
|
+
join(root, `event-log-${milestoneId}.jsonl.archived`),
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
let latest: string | null = null;
|
|
14
|
+
for (const file of candidates) {
|
|
15
|
+
for (const event of readEvents(file)) {
|
|
16
|
+
const eventMilestoneId = (event.params as { milestoneId?: unknown }).milestoneId;
|
|
17
|
+
if (event.cmd !== "reopen-milestone" || eventMilestoneId !== milestoneId) continue;
|
|
18
|
+
if (!latest || event.ts > latest) latest = event.ts;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return latest;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function isAfter(value: string | null | undefined, cutoff: string | null): boolean {
|
|
25
|
+
if (!cutoff) return true;
|
|
26
|
+
if (!value) return true;
|
|
27
|
+
return Date.parse(value) > Date.parse(cutoff);
|
|
28
|
+
}
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
16
16
|
import {
|
|
17
17
|
padRightVisible,
|
|
18
|
-
|
|
18
|
+
renderDialogFrame,
|
|
19
19
|
renderKeyHints,
|
|
20
20
|
rightAlign,
|
|
21
21
|
wrapVisibleText,
|
|
@@ -200,13 +200,20 @@ export class GSDNotificationOverlay {
|
|
|
200
200
|
availableRows,
|
|
201
201
|
Math.max(1, Math.floor((terminalRows * OVERLAY_MAX_HEIGHT_PERCENT) / 100)),
|
|
202
202
|
);
|
|
203
|
-
const maxVisibleRows = Math.max(5, overlayRows -
|
|
203
|
+
const maxVisibleRows = Math.max(5, overlayRows - 4);
|
|
204
204
|
const visibleContentRows = Math.min(content.length, maxVisibleRows);
|
|
205
205
|
const maxScroll = Math.max(0, content.length - visibleContentRows);
|
|
206
206
|
this.scrollOffset = Math.min(this.scrollOffset, maxScroll);
|
|
207
207
|
const visibleContent = content.slice(this.scrollOffset, this.scrollOffset + visibleContentRows);
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
const footer = renderKeyHints(
|
|
209
|
+
this.theme,
|
|
210
|
+
["↑/↓ scroll", "f filter", "c clear", `Esc/${formattedShortcutPair("notifications")} close`],
|
|
211
|
+
Math.max(1, width - 4),
|
|
212
|
+
);
|
|
213
|
+
const lines = renderDialogFrame(this.theme, "Notifications", visibleContent, width, {
|
|
214
|
+
footer,
|
|
215
|
+
scroll: { offset: this.scrollOffset, visibleRows: visibleContentRows, totalRows: content.length },
|
|
216
|
+
});
|
|
210
217
|
|
|
211
218
|
this.cachedWidth = width;
|
|
212
219
|
this.cachedLines = lines;
|
|
@@ -256,8 +263,6 @@ export class GSDNotificationOverlay {
|
|
|
256
263
|
const blank = () => row("");
|
|
257
264
|
const hr = () => row(th.fg("dim", "─".repeat(contentWidth)));
|
|
258
265
|
|
|
259
|
-
// Header
|
|
260
|
-
const title = th.fg("accent", th.bold("Notifications"));
|
|
261
266
|
const filterLabel = this.filter === "all"
|
|
262
267
|
? th.fg("dim", "all")
|
|
263
268
|
: th.fg(
|
|
@@ -269,15 +274,11 @@ export class GSDNotificationOverlay {
|
|
|
269
274
|
);
|
|
270
275
|
const count = `${this.filteredEntries.length} entries`;
|
|
271
276
|
lines.push(row(rightAlign(
|
|
272
|
-
`${
|
|
277
|
+
`${th.fg("dim", "filter:")} ${filterLabel}`,
|
|
273
278
|
th.fg("dim", count),
|
|
274
279
|
contentWidth,
|
|
275
280
|
)));
|
|
276
281
|
lines.push(hr());
|
|
277
|
-
|
|
278
|
-
// Controls
|
|
279
|
-
const closeShortcut = formattedShortcutPair("notifications");
|
|
280
|
-
lines.push(row(renderKeyHints(th, ["↑/↓ scroll", "f filter", "c clear", `Esc/${closeShortcut} close`], contentWidth)));
|
|
281
282
|
lines.push(blank());
|
|
282
283
|
|
|
283
284
|
// Entries
|
|
@@ -154,12 +154,13 @@ export async function mergeCompletedMilestone(
|
|
|
154
154
|
// to read it from. Only use the worktree path when git actually knows
|
|
155
155
|
// about it (`getAutoWorktreePath` returns non-null). When the directory
|
|
156
156
|
// exists on disk but isn't a registered git worktree (e.g. a stale
|
|
157
|
-
// session-status marker dir),
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
//
|
|
157
|
+
// session-status marker dir), recover through branch mode from the project
|
|
158
|
+
// root. Letting worktree-mode run from the project root can auto-commit
|
|
159
|
+
// overlapping root files to the integration branch before the squash merge,
|
|
160
|
+
// creating a synthetic conflict.
|
|
161
161
|
const registeredWtPath = getAutoWorktreePath(basePath, milestoneId);
|
|
162
162
|
const worktreeBasePath = registeredWtPath ?? basePath;
|
|
163
|
+
const isolationModeOverride = registeredWtPath ? undefined : "branch";
|
|
163
164
|
|
|
164
165
|
let result: MergeStandaloneResult;
|
|
165
166
|
try {
|
|
@@ -167,6 +168,7 @@ export async function mergeCompletedMilestone(
|
|
|
167
168
|
originalBasePath: basePath,
|
|
168
169
|
worktreeBasePath,
|
|
169
170
|
milestoneId,
|
|
171
|
+
isolationModeOverride,
|
|
170
172
|
// Parallel context never runs with degraded isolation — workers only
|
|
171
173
|
// exist when isolation succeeded. Pass `false` explicitly so the
|
|
172
174
|
// standalone's degraded-skip branch is not reached.
|
|
@@ -13,6 +13,7 @@ import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
|
13
13
|
import { resolveGsdPathContract } from "./paths.js";
|
|
14
14
|
import {
|
|
15
15
|
renderBar,
|
|
16
|
+
renderDialogFrame,
|
|
16
17
|
renderKeyHints,
|
|
17
18
|
renderProgressBar,
|
|
18
19
|
safeLine,
|
|
@@ -378,19 +379,18 @@ export class ParallelMonitorOverlay {
|
|
|
378
379
|
const t = this.theme;
|
|
379
380
|
const lines: string[] = [];
|
|
380
381
|
const w = Math.max(1, width);
|
|
382
|
+
const contentWidth = Math.max(1, w - 4);
|
|
381
383
|
|
|
382
|
-
// Header
|
|
383
384
|
const totalCost = this.workers.reduce((s, wk) => s + wk.cost, 0);
|
|
384
385
|
const aliveCount = this.workers.filter((wk) => wk.alive).length;
|
|
385
386
|
const now = new Date().toLocaleTimeString();
|
|
386
387
|
|
|
387
|
-
lines.push(t.bold(t.fg("accent", " GSD Parallel Monitor ")));
|
|
388
388
|
lines.push(
|
|
389
389
|
t.fg("muted", ` ${now} │ ${aliveCount}/${this.workers.length} alive │ Total: `) +
|
|
390
390
|
t.bold(`$${totalCost.toFixed(2)}`) +
|
|
391
391
|
t.fg("muted", " │ 5s refresh"),
|
|
392
392
|
);
|
|
393
|
-
lines.push(renderBar(t,
|
|
393
|
+
lines.push(renderBar(t, contentWidth));
|
|
394
394
|
|
|
395
395
|
if (this.workers.length === 0) {
|
|
396
396
|
lines.push("");
|
|
@@ -444,7 +444,7 @@ export class ParallelMonitorOverlay {
|
|
|
444
444
|
lines.push(` ${t.fg("muted", "slices")} ${chips.join(" ")}`);
|
|
445
445
|
|
|
446
446
|
// Task progress bar
|
|
447
|
-
const barWidth = Math.max(6, Math.min(25,
|
|
447
|
+
const barWidth = Math.max(6, Math.min(25, contentWidth - 32));
|
|
448
448
|
const bar = renderProgressBar(t, wk.doneTasks, wk.totalTasks, barWidth, {
|
|
449
449
|
filledChar: "█",
|
|
450
450
|
emptyChar: "░",
|
|
@@ -466,7 +466,7 @@ export class ParallelMonitorOverlay {
|
|
|
466
466
|
|
|
467
467
|
// Event feed
|
|
468
468
|
lines.push("");
|
|
469
|
-
lines.push(renderBar(t,
|
|
469
|
+
lines.push(renderBar(t, contentWidth));
|
|
470
470
|
lines.push(` ${t.bold("Recent Events")}`);
|
|
471
471
|
|
|
472
472
|
if (this.events.length === 0) {
|
|
@@ -478,7 +478,6 @@ export class ParallelMonitorOverlay {
|
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
|
|
481
|
-
// Footer
|
|
482
481
|
lines.push("");
|
|
483
482
|
const allDone = this.workers.length > 0 && this.workers.every((wk) => !wk.alive);
|
|
484
483
|
if (allDone) {
|
|
@@ -491,17 +490,22 @@ export class ParallelMonitorOverlay {
|
|
|
491
490
|
}
|
|
492
491
|
lines.push(` ${t.bold("Total: $" + this.workers.reduce((s, wk) => s + wk.cost, 0).toFixed(2))}`);
|
|
493
492
|
}
|
|
494
|
-
lines.push(renderKeyHints(t, [`ESC/q/${formattedShortcutPair("parallel")} close`, "↑↓ scroll"], w));
|
|
495
493
|
|
|
496
494
|
// Apply scroll — use terminal rows as height estimate
|
|
497
495
|
const termHeight = process.stdout.rows || 40;
|
|
498
|
-
const
|
|
496
|
+
const maxBodyRows = Math.max(1, Math.min(lines.length, termHeight - 12));
|
|
497
|
+
const maxScroll = Math.max(0, lines.length - maxBodyRows);
|
|
499
498
|
this.scrollOffset = Math.min(Math.max(this.scrollOffset, 0), maxScroll);
|
|
500
499
|
const visible = lines
|
|
501
|
-
.slice(this.scrollOffset, this.scrollOffset +
|
|
502
|
-
.map((line) => safeLine(line,
|
|
503
|
-
|
|
500
|
+
.slice(this.scrollOffset, this.scrollOffset + maxBodyRows)
|
|
501
|
+
.map((line) => safeLine(line, contentWidth));
|
|
502
|
+
const footer = renderKeyHints(t, [`ESC/q/${formattedShortcutPair("parallel")} close`, "↑↓ scroll"], contentWidth);
|
|
503
|
+
|
|
504
|
+
this.cachedLines = renderDialogFrame(t, "GSD Parallel Monitor", visible, w, {
|
|
505
|
+
footer,
|
|
506
|
+
scroll: { offset: this.scrollOffset, visibleRows: maxBodyRows, totalRows: lines.length },
|
|
507
|
+
});
|
|
504
508
|
this.cachedWidth = width;
|
|
505
|
-
return
|
|
509
|
+
return this.cachedLines;
|
|
506
510
|
}
|
|
507
511
|
}
|
|
@@ -318,10 +318,13 @@ export function checkImportResolution(
|
|
|
318
318
|
const imports = extractRelativeImports(source);
|
|
319
319
|
|
|
320
320
|
for (const { importPath, lineNum } of imports) {
|
|
321
|
-
//
|
|
322
|
-
//
|
|
323
|
-
// completion on these imports.
|
|
324
|
-
if (
|
|
321
|
+
// Framework-generated type modules may not exist on disk during post-exec
|
|
322
|
+
// checks (typically generated during framework builds/typegen). Don't
|
|
323
|
+
// block task completion on these imports.
|
|
324
|
+
if (
|
|
325
|
+
/^\.{1,2}\/\+types\//.test(importPath) ||
|
|
326
|
+
/^(?:\.{1,2}\/)+(?:[^/]+\/)*\$types(?:$|\/)/.test(importPath)
|
|
327
|
+
) {
|
|
325
328
|
continue;
|
|
326
329
|
}
|
|
327
330
|
|
|
@@ -23,10 +23,17 @@ import { validatePreferences } from "./preferences-validation.js";
|
|
|
23
23
|
export type { GSDSkillRule, SkillDiscoveryMode, SkillResolution, SkillResolutionReport } from "./preferences-types.js";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Known skill directories
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* Known skill directories for **preference reference resolution** (bare skill names).
|
|
27
|
+
*
|
|
28
|
+
* Search order (first match wins):
|
|
29
|
+
* 1. ~/.gsd/agent/skills/ (GSD bundled)
|
|
30
|
+
* 2. ~/.agents/skills/ (ecosystem global)
|
|
31
|
+
* 3. .agents/skills/ (project ecosystem)
|
|
32
|
+
* 4. ~/.claude/skills/ and .claude/skills/ (Claude Code compatibility)
|
|
33
|
+
*
|
|
34
|
+
* Note: the ResourceLoader catalog uses PackageManager precedence instead —
|
|
35
|
+
* project `.gsd/skills` and `.agents/skills` can override bundled GSD skills
|
|
36
|
+
* on name collision. See docs/dev/what-is-pi/09-the-customization-stack.md.
|
|
30
37
|
*/
|
|
31
38
|
export function getSkillSearchDirs(cwd: string): Array<{ dir: string; method: SkillResolution["method"] }> {
|
|
32
39
|
const dirs: Array<{ dir: string; method: SkillResolution["method"] }> = [
|
|
@@ -570,9 +570,14 @@ function mergePreDispatchHooks(
|
|
|
570
570
|
|
|
571
571
|
// ─── System Prompt Rendering ──────────────────────────────────────────────────
|
|
572
572
|
|
|
573
|
-
export function renderPreferencesForSystemPrompt(
|
|
573
|
+
export function renderPreferencesForSystemPrompt(
|
|
574
|
+
preferences: GSDPreferences,
|
|
575
|
+
resolutions?: Map<string, SkillResolution>,
|
|
576
|
+
options?: { includeResolvedPaths?: boolean },
|
|
577
|
+
): string {
|
|
574
578
|
const validated = validatePreferences(preferences);
|
|
575
579
|
const lines: string[] = ["## GSD Skill Preferences"];
|
|
580
|
+
const includeResolvedPaths = options?.includeResolvedPaths ?? true;
|
|
576
581
|
|
|
577
582
|
if (validated.errors.length > 0) {
|
|
578
583
|
lines.push("- Validation: some preference values were ignored because they were invalid.");
|
|
@@ -589,7 +594,17 @@ export function renderPreferencesForSystemPrompt(preferences: GSDPreferences, re
|
|
|
589
594
|
"- Current user instructions still override these defaults.",
|
|
590
595
|
);
|
|
591
596
|
|
|
592
|
-
const fmt = (ref: string) =>
|
|
597
|
+
const fmt = (ref: string) => {
|
|
598
|
+
if (!resolutions) return ref;
|
|
599
|
+
if (!includeResolvedPaths) {
|
|
600
|
+
const resolution = resolutions.get(ref);
|
|
601
|
+
if (!resolution || resolution.method === "unresolved") {
|
|
602
|
+
return `${ref} (⚠ not found — check skill name or path)`;
|
|
603
|
+
}
|
|
604
|
+
return ref;
|
|
605
|
+
}
|
|
606
|
+
return formatSkillRef(ref, resolutions);
|
|
607
|
+
};
|
|
593
608
|
|
|
594
609
|
if (preferences.always_use_skills && preferences.always_use_skills.length > 0) {
|
|
595
610
|
lines.push("- Always use these skills when relevant:");
|
|
@@ -22,6 +22,7 @@ import { join, dirname } from "node:path";
|
|
|
22
22
|
import { fileURLToPath } from "node:url";
|
|
23
23
|
import { logWarning } from "./workflow-logger.js";
|
|
24
24
|
import { gsdHome } from "./gsd-home.js";
|
|
25
|
+
import { chooseVisionAskVariant } from "./vision-ask.js";
|
|
25
26
|
|
|
26
27
|
type ExistsFn = (path: string) => boolean;
|
|
27
28
|
|
|
@@ -184,6 +185,7 @@ export function loadPrompt(name: string, vars: Record<string, string> = {}): str
|
|
|
184
185
|
planTemplatePath: join(getTemplatesDir(), "plan.md"),
|
|
185
186
|
taskPlanTemplatePath: join(getTemplatesDir(), "task-plan.md"),
|
|
186
187
|
taskSummaryTemplatePath: join(getTemplatesDir(), "task-summary.md"),
|
|
188
|
+
visionAsk: chooseVisionAskVariant(),
|
|
187
189
|
skillActivation: "If a `GSD Skill Preferences` block is present in system context, use it and the `<available_skills>` catalog in your system prompt to decide which skills to load and follow for this unit, without relaxing required verification or artifact rules.",
|
|
188
190
|
...vars,
|
|
189
191
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{{preamble}}
|
|
2
2
|
|
|
3
|
-
Ask
|
|
3
|
+
Ask exactly this once: "{{visionAsk}}" Then use the user's reply as vision input.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The opener is intentionally variable so GSD feels alive across project starts. Keep it natural, easy to answer, and assistant/developer shaped: plain language, light guidance, no corporate wording, no roleplay.
|
|
6
|
+
|
|
7
|
+
**Special handling:** If the **user's** message is status, branch state, clarification, or any other non-project-description, treat it as vision input and proceed instead of repeating the opener. Do **not** treat the system preamble above (e.g. "New milestone M00X.") as vision input — wait for the user.
|
|
6
8
|
|
|
7
9
|
## Reflection Step
|
|
8
10
|
|
|
@@ -35,7 +35,7 @@ You are evaluating **quality gates in parallel** for this slice. Each gate is an
|
|
|
35
35
|
2. **Wait for all subagents** to complete.
|
|
36
36
|
3. **Verify each gate wrote its result** by checking that `gsd_save_gate_result` was called for each gate ID.
|
|
37
37
|
- Call it **directly** — do **not** use `ToolSearch` (it is not available in GSD).
|
|
38
|
-
- Inside Claude Code use `
|
|
38
|
+
- Inside Claude Code use the active MCP-scoped workflow name for `gsd_save_gate_result`; otherwise use `gsd_save_gate_result`.
|
|
39
39
|
- Always pass all required fields (camelCase): `milestoneId`, `sliceId`, `gateId`, `verdict`, `rationale`. Never call with an empty `{}` object.
|
|
40
40
|
4. **Report the batch outcome** — which gates passed, which flagged concerns, and which were omitted as not applicable.
|
|
41
41
|
|
|
@@ -4,6 +4,8 @@ Discuss milestone {{milestoneId}} ("{{milestoneTitle}}"). Identify real gray are
|
|
|
4
4
|
|
|
5
5
|
**Structured questions available: {{structuredQuestionsAvailable}}**
|
|
6
6
|
|
|
7
|
+
**Conversation opener:** For the first user-facing question round, if you need a broad starting question, use: "{{visionAsk}}" Pair it with investigation-shaped follow-ups. Keep the tone natural and easy to answer, like an assistant/developer helping the user shape the next piece of work.
|
|
8
|
+
|
|
7
9
|
{{inlinedTemplates}}
|
|
8
10
|
|
|
9
11
|
---
|
|
@@ -19,9 +19,7 @@ Leave the project ready for the next agent to understand and continue. Artifacts
|
|
|
19
19
|
|
|
20
20
|
## Skills
|
|
21
21
|
|
|
22
|
-
GSD ships with bundled skills.
|
|
23
|
-
|
|
24
|
-
{{bundledSkillsTable}}
|
|
22
|
+
GSD ships with bundled skills. Installed skills are listed in `<available_skills>` in your system prompt — load the relevant skill file with `read` using the path shown there before starting matching work. Use bare skill names in preferences; GSD resolves paths.
|
|
25
23
|
|
|
26
24
|
## Hard Rules
|
|
27
25
|
|
|
@@ -122,18 +120,7 @@ Templates are in `{{templatesDir}}`.
|
|
|
122
120
|
|
|
123
121
|
**Browser verification:** Verify frontend work against a running app. Discovery: `browser_find`/`browser_snapshot_refs`. Action: refs/selectors -> `browser_batch`. Verification: `browser_assert`. Diagnostics: `browser_diff` -> console/network logs -> full inspection as last resort. Retry only with a new hypothesis.
|
|
124
122
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
- Never use `cat` to read a file you might edit; use `read`.
|
|
128
|
-
- Never `grep` for a function definition when `lsp` go-to-definition is available.
|
|
129
|
-
- Never poll servers with `sleep` loops; use `bg_shell wait_for_ready`.
|
|
130
|
-
- Never background with `bash` + `&`; use `bg_shell start`.
|
|
131
|
-
- Never use `bg_shell output` for status; use `digest`.
|
|
132
|
-
- Never read files one-by-one to understand a subsystem; use `rg` or `scout` first.
|
|
133
|
-
- Never guess library APIs; use `get_library_docs`.
|
|
134
|
-
- Never ask the user to run/check/set something you can do.
|
|
135
|
-
- Never await stale async jobs after editing source; cancel then re-run.
|
|
136
|
-
- Never query `.gsd/gsd.db` directly via `sqlite3`, `better-sqlite3`, or `node -e require('better-sqlite3')`; the engine owns a single-writer WAL connection. Use `gsd_milestone_status`, `gsd_journal_query`, or other `gsd_*` tools.
|
|
123
|
+
**Database:** Never query `.gsd/gsd.db` directly via `sqlite3`, `better-sqlite3`, or `node -e require('better-sqlite3')`; the engine owns a single-writer WAL connection. Use `gsd_milestone_status`, `gsd_journal_query`, or other `gsd_*` tools.
|
|
137
124
|
|
|
138
125
|
### Ask vs infer
|
|
139
126
|
|
|
@@ -173,8 +160,4 @@ Fix root causes, not symptoms. If applying temporary mitigation, label it and pr
|
|
|
173
160
|
- When debugging, stay curious. Problems are puzzles. Say what's interesting about the failure before reaching for fixes.
|
|
174
161
|
- After completing a task, give a brief summary and 2-4 numbered next-step options; last option is always "Other". Omit the list for strict output formats.
|
|
175
162
|
|
|
176
|
-
Good narration: "Three
|
|
177
|
-
Good narration: "Tests pass. Running slice-level verification."
|
|
178
|
-
Good narration: "I need the task-plan template first, then I'll compare the existing T01 and T02 plans."
|
|
179
|
-
Bad narration: "Reading the file now." / "Let me check this." / "I'll look at the tests next."
|
|
180
|
-
Bad narration: "Need create plan artifact likely requires template maybe read existing task plans."
|
|
163
|
+
Good narration states a decision or finding: "Three handlers follow a middleware pattern - using that instead of a custom wrapper." Bad narration just announces the next call ("Reading the file now.") or emits compressed planner notes ("Need create plan artifact maybe read existing plans.").
|