gsd-pi 2.33.1-dev.ee47f1b → 2.34.0-dev.0150ae9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled-resource-path.d.ts +8 -0
- package/dist/bundled-resource-path.js +14 -0
- package/dist/headless-query.js +6 -6
- package/dist/resources/extensions/gsd/auto/session.js +27 -32
- package/dist/resources/extensions/gsd/auto-dashboard.js +29 -109
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +6 -1
- package/dist/resources/extensions/gsd/auto-dispatch.js +52 -81
- package/dist/resources/extensions/gsd/auto-loop.js +956 -0
- package/dist/resources/extensions/gsd/auto-observability.js +4 -2
- package/dist/resources/extensions/gsd/auto-post-unit.js +75 -185
- package/dist/resources/extensions/gsd/auto-prompts.js +133 -101
- package/dist/resources/extensions/gsd/auto-recovery.js +59 -97
- package/dist/resources/extensions/gsd/auto-start.js +330 -309
- package/dist/resources/extensions/gsd/auto-supervisor.js +5 -11
- package/dist/resources/extensions/gsd/auto-timeout-recovery.js +7 -7
- package/dist/resources/extensions/gsd/auto-timers.js +3 -4
- package/dist/resources/extensions/gsd/auto-verification.js +35 -73
- package/dist/resources/extensions/gsd/auto-worktree-sync.js +167 -0
- package/dist/resources/extensions/gsd/auto-worktree.js +291 -126
- package/dist/resources/extensions/gsd/auto.js +283 -1013
- package/dist/resources/extensions/gsd/captures.js +10 -4
- package/dist/resources/extensions/gsd/dispatch-guard.js +7 -8
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +25 -18
- package/dist/resources/extensions/gsd/doctor-checks.js +3 -4
- package/dist/resources/extensions/gsd/git-service.js +1 -1
- package/dist/resources/extensions/gsd/gsd-db.js +296 -151
- package/dist/resources/extensions/gsd/index.js +92 -228
- package/dist/resources/extensions/gsd/post-unit-hooks.js +13 -13
- package/dist/resources/extensions/gsd/progress-score.js +61 -156
- package/dist/resources/extensions/gsd/quick.js +98 -122
- package/dist/resources/extensions/gsd/session-lock.js +13 -0
- package/dist/resources/extensions/gsd/templates/preferences.md +1 -0
- package/dist/resources/extensions/gsd/undo.js +43 -48
- package/dist/resources/extensions/gsd/unit-runtime.js +16 -15
- package/dist/resources/extensions/gsd/verification-evidence.js +0 -1
- package/dist/resources/extensions/gsd/verification-gate.js +6 -35
- package/dist/resources/extensions/gsd/worktree-command.js +30 -24
- package/dist/resources/extensions/gsd/worktree-manager.js +2 -3
- package/dist/resources/extensions/gsd/worktree-resolver.js +344 -0
- package/dist/resources/extensions/gsd/worktree.js +7 -44
- package/dist/resources/extensions/mcp-client/index.js +2 -1
- package/dist/tool-bootstrap.js +59 -11
- package/dist/worktree-cli.js +7 -7
- package/package.json +1 -1
- package/packages/native/dist/native.d.ts +0 -2
- package/packages/native/dist/native.js +0 -2
- package/packages/native/src/native.ts +0 -3
- package/packages/pi-agent-core/dist/proxy.d.ts +1 -25
- package/packages/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/proxy.js +1 -1
- package/packages/pi-agent-core/dist/proxy.js.map +1 -1
- package/packages/pi-agent-core/src/proxy.ts +1 -1
- package/packages/pi-ai/dist/api-registry.d.ts +0 -2
- package/packages/pi-ai/dist/api-registry.d.ts.map +1 -1
- package/packages/pi-ai/dist/api-registry.js +0 -10
- package/packages/pi-ai/dist/api-registry.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +3630 -5483
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +735 -2588
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +0 -8
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/github-copilot-headers.d.ts +0 -1
- package/packages/pi-ai/dist/providers/github-copilot-headers.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/github-copilot-headers.js +1 -1
- package/packages/pi-ai/dist/providers/github-copilot-headers.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-gemini-cli.d.ts +1 -43
- package/packages/pi-ai/dist/providers/google-gemini-cli.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/google-gemini-cli.js +2 -2
- package/packages/pi-ai/dist/providers/google-gemini-cli.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-shared.d.ts +0 -4
- package/packages/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/google-shared.js +1 -1
- package/packages/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/register-builtins.d.ts +0 -1
- package/packages/pi-ai/dist/providers/register-builtins.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/register-builtins.js +1 -1
- package/packages/pi-ai/dist/providers/register-builtins.js.map +1 -1
- package/packages/pi-ai/dist/utils/event-stream.d.ts +0 -2
- package/packages/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/event-stream.js +0 -4
- package/packages/pi-ai/dist/utils/event-stream.js.map +1 -1
- package/packages/pi-ai/dist/utils/overflow.d.ts +0 -4
- package/packages/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/overflow.js +0 -6
- package/packages/pi-ai/dist/utils/overflow.js.map +1 -1
- package/packages/pi-ai/dist/utils/validation.d.ts +0 -8
- package/packages/pi-ai/dist/utils/validation.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/validation.js +0 -14
- package/packages/pi-ai/dist/utils/validation.js.map +1 -1
- package/packages/pi-ai/src/api-registry.ts +0 -12
- package/packages/pi-ai/src/models.generated.ts +1039 -2892
- package/packages/pi-ai/src/providers/anthropic.ts +1 -1
- package/packages/pi-ai/src/providers/github-copilot-headers.ts +1 -1
- package/packages/pi-ai/src/providers/google-gemini-cli.ts +2 -2
- package/packages/pi-ai/src/providers/google-shared.ts +1 -1
- package/packages/pi-ai/src/providers/register-builtins.ts +1 -1
- package/packages/pi-ai/src/utils/event-stream.ts +0 -5
- package/packages/pi-ai/src/utils/overflow.ts +1 -8
- package/packages/pi-ai/src/utils/validation.ts +0 -15
- package/packages/pi-coding-agent/dist/config.d.ts +0 -9
- package/packages/pi-coding-agent/dist/config.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/config.js +4 -8
- package/packages/pi-coding-agent/dist/config.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/export-html/ansi-to-html.d.ts +0 -4
- package/packages/pi-coding-agent/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/export-html/ansi-to-html.js +1 -1
- package/packages/pi-coding-agent/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +0 -5
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +0 -13
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/keybindings.d.ts +0 -8
- package/packages/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/keybindings.js +2 -2
- package/packages/pi-coding-agent/dist/core/keybindings.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts +0 -17
- package/packages/pi-coding-agent/dist/core/lsp/client.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/client.js +3 -62
- package/packages/pi-coding-agent/dist/core/lsp/client.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts +0 -2
- package/packages/pi-coding-agent/dist/core/lsp/config.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/config.js +0 -7
- package/packages/pi-coding-agent/dist/core/lsp/config.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts +0 -5
- package/packages/pi-coding-agent/dist/core/lsp/edits.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/edits.js +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/edits.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts +0 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lspmux.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts +1 -6
- package/packages/pi-coding-agent/dist/core/lsp/utils.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/utils.js +1 -28
- package/packages/pi-coding-agent/dist/core/lsp/utils.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.d.ts +0 -8
- package/packages/pi-coding-agent/dist/core/messages.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.js +5 -5
- package/packages/pi-coding-agent/dist/core/messages.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts +0 -3
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +1 -3
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.d.ts +1 -26
- package/packages/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +3 -59
- package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/prompt-templates.d.ts +0 -17
- package/packages/pi-coding-agent/dist/core/prompt-templates.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/prompt-templates.js +2 -2
- package/packages/pi-coding-agent/dist/core/prompt-templates.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/session-manager.d.ts +0 -4
- package/packages/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/session-manager.js +2 -4
- package/packages/pi-coding-agent/dist/core/session-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +0 -12
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +2 -2
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/migrations.d.ts +0 -16
- package/packages/pi-coding-agent/dist/migrations.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/migrations.js +2 -2
- package/packages/pi-coding-agent/dist/migrations.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector-search.d.ts +0 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector-search.js +2 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +1 -24
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +50 -512
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts +71 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +514 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +65 -4
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +6 -23
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts +12 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +175 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -0
- package/packages/pi-coding-agent/dist/utils/changelog.d.ts +0 -4
- package/packages/pi-coding-agent/dist/utils/changelog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/changelog.js +1 -1
- package/packages/pi-coding-agent/dist/utils/changelog.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.d.ts +0 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.js +1 -1
- package/packages/pi-coding-agent/dist/utils/clipboard-image.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/photon.d.ts +0 -19
- package/packages/pi-coding-agent/dist/utils/photon.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/photon.js +1 -120
- package/packages/pi-coding-agent/dist/utils/photon.js.map +1 -1
- package/packages/pi-coding-agent/dist/utils/tools-manager.d.ts +0 -1
- package/packages/pi-coding-agent/dist/utils/tools-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/utils/tools-manager.js +1 -1
- package/packages/pi-coding-agent/dist/utils/tools-manager.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/config.ts +5 -10
- package/packages/pi-coding-agent/src/core/export-html/ansi-to-html.ts +1 -1
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +0 -13
- package/packages/pi-coding-agent/src/core/keybindings.ts +2 -2
- package/packages/pi-coding-agent/src/core/lsp/client.ts +3 -73
- package/packages/pi-coding-agent/src/core/lsp/config.ts +0 -11
- package/packages/pi-coding-agent/src/core/lsp/edits.ts +1 -1
- package/packages/pi-coding-agent/src/core/lsp/lspmux.ts +1 -1
- package/packages/pi-coding-agent/src/core/lsp/utils.ts +1 -33
- package/packages/pi-coding-agent/src/core/messages.ts +5 -5
- package/packages/pi-coding-agent/src/core/model-registry.ts +0 -2
- package/packages/pi-coding-agent/src/core/model-resolver.ts +3 -77
- package/packages/pi-coding-agent/src/core/prompt-templates.ts +2 -2
- package/packages/pi-coding-agent/src/core/session-manager.ts +2 -4
- package/packages/pi-coding-agent/src/core/settings-manager.ts +2 -2
- package/packages/pi-coding-agent/src/migrations.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/session-selector-search.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +50 -561
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +653 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +7 -26
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +196 -0
- package/packages/pi-coding-agent/src/utils/changelog.ts +1 -1
- package/packages/pi-coding-agent/src/utils/clipboard-image.ts +1 -1
- package/packages/pi-coding-agent/src/utils/photon.ts +0 -137
- package/packages/pi-coding-agent/src/utils/tools-manager.ts +1 -1
- package/packages/pi-tui/dist/components/editor.d.ts +0 -10
- package/packages/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/editor.js +1 -1
- package/packages/pi-tui/dist/components/editor.js.map +1 -1
- package/packages/pi-tui/dist/overlay-layout.d.ts +55 -0
- package/packages/pi-tui/dist/overlay-layout.d.ts.map +1 -0
- package/packages/pi-tui/dist/overlay-layout.js +288 -0
- package/packages/pi-tui/dist/overlay-layout.js.map +1 -0
- package/packages/pi-tui/dist/tui.d.ts +0 -22
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +6 -272
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/dist/utils.d.ts +0 -7
- package/packages/pi-tui/dist/utils.d.ts.map +1 -1
- package/packages/pi-tui/dist/utils.js +0 -44
- package/packages/pi-tui/dist/utils.js.map +1 -1
- package/packages/pi-tui/src/components/editor.ts +1 -1
- package/packages/pi-tui/src/overlay-layout.ts +372 -0
- package/packages/pi-tui/src/tui.ts +11 -312
- package/packages/pi-tui/src/utils.ts +0 -43
- package/pkg/dist/core/export-html/ansi-to-html.d.ts +0 -4
- package/pkg/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/pkg/dist/core/export-html/ansi-to-html.js +1 -1
- package/pkg/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts +65 -4
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +6 -23
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts +12 -0
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -0
- package/pkg/dist/modes/interactive/theme/themes.js +175 -0
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -0
- package/pkg/package.json +1 -1
- package/src/resources/extensions/gsd/auto/session.ts +47 -30
- package/src/resources/extensions/gsd/auto-dashboard.ts +28 -131
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +6 -1
- package/src/resources/extensions/gsd/auto-dispatch.ts +135 -91
- package/src/resources/extensions/gsd/auto-loop.ts +1665 -0
- package/src/resources/extensions/gsd/auto-observability.ts +4 -2
- package/src/resources/extensions/gsd/auto-post-unit.ts +85 -228
- package/src/resources/extensions/gsd/auto-prompts.ts +138 -109
- package/src/resources/extensions/gsd/auto-recovery.ts +124 -118
- package/src/resources/extensions/gsd/auto-start.ts +440 -354
- package/src/resources/extensions/gsd/auto-supervisor.ts +5 -12
- package/src/resources/extensions/gsd/auto-timeout-recovery.ts +8 -8
- package/src/resources/extensions/gsd/auto-timers.ts +3 -4
- package/src/resources/extensions/gsd/auto-verification.ts +76 -90
- package/src/resources/extensions/gsd/auto-worktree-sync.ts +204 -0
- package/src/resources/extensions/gsd/auto-worktree.ts +389 -141
- package/src/resources/extensions/gsd/auto.ts +515 -1199
- package/src/resources/extensions/gsd/captures.ts +10 -4
- package/src/resources/extensions/gsd/dispatch-guard.ts +13 -9
- package/src/resources/extensions/gsd/docs/preferences-reference.md +25 -18
- package/src/resources/extensions/gsd/doctor-checks.ts +3 -4
- package/src/resources/extensions/gsd/git-service.ts +8 -1
- package/src/resources/extensions/gsd/gitignore.ts +4 -2
- package/src/resources/extensions/gsd/gsd-db.ts +375 -180
- package/src/resources/extensions/gsd/index.ts +104 -263
- package/src/resources/extensions/gsd/post-unit-hooks.ts +13 -13
- package/src/resources/extensions/gsd/progress-score.ts +65 -200
- package/src/resources/extensions/gsd/quick.ts +121 -125
- package/src/resources/extensions/gsd/session-lock.ts +11 -0
- package/src/resources/extensions/gsd/templates/preferences.md +1 -0
- package/src/resources/extensions/gsd/tests/agent-end-retry.test.ts +32 -59
- package/src/resources/extensions/gsd/tests/all-milestones-complete-merge.test.ts +75 -27
- package/src/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/auto-lock-creation.test.ts +37 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +1458 -0
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +8 -162
- package/src/resources/extensions/gsd/tests/auto-secrets-gate.test.ts +2 -108
- package/src/resources/extensions/gsd/tests/auto-session-encapsulation.test.ts +1 -3
- package/src/resources/extensions/gsd/tests/auto-worktree-milestone-merge.test.ts +0 -3
- package/src/resources/extensions/gsd/tests/auto-worktree.test.ts +58 -0
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +0 -55
- package/src/resources/extensions/gsd/tests/headless-query.test.ts +22 -0
- package/src/resources/extensions/gsd/tests/milestone-transition-worktree.test.ts +8 -11
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +4 -6
- package/src/resources/extensions/gsd/tests/run-uat.test.ts +3 -3
- package/src/resources/extensions/gsd/tests/session-lock-regression.test.ts +64 -0
- package/src/resources/extensions/gsd/tests/sidecar-queue.test.ts +181 -0
- package/src/resources/extensions/gsd/tests/stale-worktree-cwd.test.ts +0 -3
- package/src/resources/extensions/gsd/tests/token-profile.test.ts +6 -6
- package/src/resources/extensions/gsd/tests/triage-dispatch.test.ts +6 -6
- package/src/resources/extensions/gsd/tests/undo.test.ts +6 -0
- package/src/resources/extensions/gsd/tests/verification-evidence.test.ts +24 -26
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +7 -201
- package/src/resources/extensions/gsd/tests/worktree-db-integration.test.ts +205 -0
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +442 -0
- package/src/resources/extensions/gsd/tests/worktree-e2e.test.ts +0 -3
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +705 -0
- package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +57 -106
- package/src/resources/extensions/gsd/tests/worktree.test.ts +5 -1
- package/src/resources/extensions/gsd/tests/write-gate.test.ts +43 -132
- package/src/resources/extensions/gsd/types.ts +90 -81
- package/src/resources/extensions/gsd/undo.ts +42 -46
- package/src/resources/extensions/gsd/unit-runtime.ts +14 -18
- package/src/resources/extensions/gsd/verification-evidence.ts +1 -3
- package/src/resources/extensions/gsd/verification-gate.ts +6 -39
- package/src/resources/extensions/gsd/worktree-command.ts +36 -24
- package/src/resources/extensions/gsd/worktree-manager.ts +2 -3
- package/src/resources/extensions/gsd/worktree-resolver.ts +485 -0
- package/src/resources/extensions/gsd/worktree.ts +7 -44
- package/src/resources/extensions/mcp-client/index.ts +2 -1
- package/dist/resources/extensions/gsd/auto-constants.js +0 -5
- package/dist/resources/extensions/gsd/auto-idempotency.js +0 -106
- package/dist/resources/extensions/gsd/auto-stuck-detection.js +0 -165
- package/dist/resources/extensions/gsd/mechanical-completion.js +0 -351
- package/packages/pi-coding-agent/dist/modes/interactive/theme/dark.json +0 -85
- package/packages/pi-coding-agent/dist/modes/interactive/theme/light.json +0 -84
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -335
- package/packages/pi-coding-agent/src/modes/interactive/theme/dark.json +0 -85
- package/packages/pi-coding-agent/src/modes/interactive/theme/light.json +0 -84
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.json +0 -335
- package/pkg/dist/modes/interactive/theme/dark.json +0 -85
- package/pkg/dist/modes/interactive/theme/light.json +0 -84
- package/pkg/dist/modes/interactive/theme/theme-schema.json +0 -335
- package/src/resources/extensions/gsd/auto-constants.ts +0 -6
- package/src/resources/extensions/gsd/auto-idempotency.ts +0 -151
- package/src/resources/extensions/gsd/auto-stuck-detection.ts +0 -221
- package/src/resources/extensions/gsd/mechanical-completion.ts +0 -430
- package/src/resources/extensions/gsd/tests/auto-dispatch-loop.test.ts +0 -691
- package/src/resources/extensions/gsd/tests/auto-reentrancy-guard.test.ts +0 -127
- package/src/resources/extensions/gsd/tests/auto-skip-loop.test.ts +0 -123
- package/src/resources/extensions/gsd/tests/dispatch-stall-guard.test.ts +0 -126
- package/src/resources/extensions/gsd/tests/loop-regression.test.ts +0 -874
- package/src/resources/extensions/gsd/tests/mechanical-completion.test.ts +0 -356
- package/src/resources/extensions/gsd/tests/progress-score.test.ts +0 -206
- package/src/resources/extensions/gsd/tests/session-lock.test.ts +0 -434
|
@@ -44,6 +44,44 @@ function formatExecutorConstraints() {
|
|
|
44
44
|
`- Keep individual tasks completable within a single context window — if a task needs more context than fits, split it`,
|
|
45
45
|
].join("\n");
|
|
46
46
|
}
|
|
47
|
+
function buildSourceFilePaths(base, mid, sid) {
|
|
48
|
+
const paths = [];
|
|
49
|
+
const projectPath = resolveGsdRootFile(base, "PROJECT");
|
|
50
|
+
if (existsSync(projectPath)) {
|
|
51
|
+
paths.push(`- **Project**: \`${relGsdRootFile("PROJECT")}\``);
|
|
52
|
+
}
|
|
53
|
+
const requirementsPath = resolveGsdRootFile(base, "REQUIREMENTS");
|
|
54
|
+
if (existsSync(requirementsPath)) {
|
|
55
|
+
paths.push(`- **Requirements**: \`${relGsdRootFile("REQUIREMENTS")}\``);
|
|
56
|
+
}
|
|
57
|
+
const decisionsPath = resolveGsdRootFile(base, "DECISIONS");
|
|
58
|
+
if (existsSync(decisionsPath)) {
|
|
59
|
+
paths.push(`- **Decisions**: \`${relGsdRootFile("DECISIONS")}\``);
|
|
60
|
+
}
|
|
61
|
+
const contextPath = resolveMilestoneFile(base, mid, "CONTEXT");
|
|
62
|
+
if (contextPath) {
|
|
63
|
+
paths.push(`- **Milestone Context**: \`${relMilestoneFile(base, mid, "CONTEXT")}\``);
|
|
64
|
+
}
|
|
65
|
+
const roadmapPath = resolveMilestoneFile(base, mid, "ROADMAP");
|
|
66
|
+
if (roadmapPath) {
|
|
67
|
+
paths.push(`- **Roadmap**: \`${relMilestoneFile(base, mid, "ROADMAP")}\``);
|
|
68
|
+
}
|
|
69
|
+
if (sid) {
|
|
70
|
+
const researchPath = resolveSliceFile(base, mid, sid, "RESEARCH");
|
|
71
|
+
if (researchPath) {
|
|
72
|
+
paths.push(`- **Slice Research**: \`${relSliceFile(base, mid, sid, "RESEARCH")}\``);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const researchPath = resolveMilestoneFile(base, mid, "RESEARCH");
|
|
77
|
+
if (researchPath) {
|
|
78
|
+
paths.push(`- **Milestone Research**: \`${relMilestoneFile(base, mid, "RESEARCH")}\``);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return paths.length > 0
|
|
82
|
+
? paths.join("\n")
|
|
83
|
+
: "- Use `rg --files` and targeted reads to identify the relevant source files before planning.";
|
|
84
|
+
}
|
|
47
85
|
// ─── Inline Helpers ───────────────────────────────────────────────────────
|
|
48
86
|
/**
|
|
49
87
|
* Load a file and format it for inlining into a prompt.
|
|
@@ -159,46 +197,29 @@ export async function inlineGsdRootFile(base, filename, label) {
|
|
|
159
197
|
}
|
|
160
198
|
// ─── DB-Aware Inline Helpers ──────────────────────────────────────────────
|
|
161
199
|
/**
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
* or the query yields no results.
|
|
165
|
-
*
|
|
166
|
-
* @param base Project root for filesystem fallback
|
|
167
|
-
* @param label Section heading (e.g. "Decisions")
|
|
168
|
-
* @param filename Filesystem fallback file (e.g. "decisions.md")
|
|
169
|
-
* @param queryDb Async callback receiving the dynamically-imported
|
|
170
|
-
* context-store module. Returns formatted markdown or null.
|
|
200
|
+
* Inline decisions with optional milestone scoping from the DB.
|
|
201
|
+
* Falls back to filesystem via inlineGsdRootFile when DB unavailable or empty.
|
|
171
202
|
*/
|
|
172
|
-
async function
|
|
203
|
+
export async function inlineDecisionsFromDb(base, milestoneId, scope, level) {
|
|
204
|
+
const inlineLevel = level ?? resolveInlineLevel();
|
|
173
205
|
try {
|
|
174
206
|
const { isDbAvailable } = await import("./gsd-db.js");
|
|
175
207
|
if (isDbAvailable()) {
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
|
|
208
|
+
const { queryDecisions, formatDecisionsForPrompt } = await import("./context-store.js");
|
|
209
|
+
const decisions = queryDecisions({ milestoneId, scope });
|
|
210
|
+
if (decisions.length > 0) {
|
|
211
|
+
// Use compact format for non-full levels to save ~35% tokens
|
|
212
|
+
const formatted = inlineLevel !== "full"
|
|
213
|
+
? formatDecisionsCompact(decisions)
|
|
214
|
+
: formatDecisionsForPrompt(decisions);
|
|
215
|
+
return `### Decisions\nSource: \`.gsd/DECISIONS.md\`\n\n${formatted}`;
|
|
180
216
|
}
|
|
181
217
|
}
|
|
182
218
|
}
|
|
183
219
|
catch {
|
|
184
220
|
// DB not available — fall through to filesystem
|
|
185
221
|
}
|
|
186
|
-
return inlineGsdRootFile(base,
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Inline decisions with optional milestone scoping from the DB.
|
|
190
|
-
* Falls back to filesystem via inlineGsdRootFile when DB unavailable or empty.
|
|
191
|
-
*/
|
|
192
|
-
export async function inlineDecisionsFromDb(base, milestoneId, scope, level) {
|
|
193
|
-
const inlineLevel = level ?? resolveInlineLevel();
|
|
194
|
-
return inlineFromDbOrFile(base, "Decisions", "decisions.md", (cs) => {
|
|
195
|
-
const decisions = cs.queryDecisions({ milestoneId, scope });
|
|
196
|
-
if (decisions.length === 0)
|
|
197
|
-
return null;
|
|
198
|
-
return inlineLevel !== "full"
|
|
199
|
-
? formatDecisionsCompact(decisions)
|
|
200
|
-
: cs.formatDecisionsForPrompt(decisions);
|
|
201
|
-
});
|
|
222
|
+
return inlineGsdRootFile(base, "decisions.md", "Decisions");
|
|
202
223
|
}
|
|
203
224
|
/**
|
|
204
225
|
* Inline requirements with optional slice scoping from the DB.
|
|
@@ -206,23 +227,44 @@ export async function inlineDecisionsFromDb(base, milestoneId, scope, level) {
|
|
|
206
227
|
*/
|
|
207
228
|
export async function inlineRequirementsFromDb(base, sliceId, level) {
|
|
208
229
|
const inlineLevel = level ?? resolveInlineLevel();
|
|
209
|
-
|
|
210
|
-
const
|
|
211
|
-
if (
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
230
|
+
try {
|
|
231
|
+
const { isDbAvailable } = await import("./gsd-db.js");
|
|
232
|
+
if (isDbAvailable()) {
|
|
233
|
+
const { queryRequirements, formatRequirementsForPrompt } = await import("./context-store.js");
|
|
234
|
+
const requirements = queryRequirements({ sliceId });
|
|
235
|
+
if (requirements.length > 0) {
|
|
236
|
+
// Use compact format for non-full levels to save ~40% tokens
|
|
237
|
+
const formatted = inlineLevel !== "full"
|
|
238
|
+
? formatRequirementsCompact(requirements)
|
|
239
|
+
: formatRequirementsForPrompt(requirements);
|
|
240
|
+
return `### Requirements\nSource: \`.gsd/REQUIREMENTS.md\`\n\n${formatted}`;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
catch {
|
|
245
|
+
// DB not available — fall through to filesystem
|
|
246
|
+
}
|
|
247
|
+
return inlineGsdRootFile(base, "requirements.md", "Requirements");
|
|
217
248
|
}
|
|
218
249
|
/**
|
|
219
250
|
* Inline project context from the DB.
|
|
220
251
|
* Falls back to filesystem via inlineGsdRootFile when DB unavailable or empty.
|
|
221
252
|
*/
|
|
222
253
|
export async function inlineProjectFromDb(base) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
254
|
+
try {
|
|
255
|
+
const { isDbAvailable } = await import("./gsd-db.js");
|
|
256
|
+
if (isDbAvailable()) {
|
|
257
|
+
const { queryProject } = await import("./context-store.js");
|
|
258
|
+
const content = queryProject();
|
|
259
|
+
if (content) {
|
|
260
|
+
return `### Project\nSource: \`.gsd/PROJECT.md\`\n\n${content}`;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
// DB not available — fall through to filesystem
|
|
266
|
+
}
|
|
267
|
+
return inlineGsdRootFile(base, "project.md", "Project");
|
|
226
268
|
}
|
|
227
269
|
// ─── Skill Discovery ──────────────────────────────────────────────────────
|
|
228
270
|
/**
|
|
@@ -274,25 +316,6 @@ export function escapeRegExp(value) {
|
|
|
274
316
|
function oneLine(text) {
|
|
275
317
|
return text.replace(/\s+/g, " ").trim();
|
|
276
318
|
}
|
|
277
|
-
/** Build the standard inlined-context section used by all prompt builders. */
|
|
278
|
-
function buildInlinedContextSection(inlined) {
|
|
279
|
-
return `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
280
|
-
}
|
|
281
|
-
/** Build the formatted list of available GSD source files for planners to read on demand. */
|
|
282
|
-
function buildSourceFileList(base, opts) {
|
|
283
|
-
const paths = [];
|
|
284
|
-
if (opts?.includeProject && existsSync(resolveGsdRootFile(base, "PROJECT")))
|
|
285
|
-
paths.push(`- **Project**: \`${relGsdRootFile("PROJECT")}\``);
|
|
286
|
-
if (existsSync(resolveGsdRootFile(base, "REQUIREMENTS")))
|
|
287
|
-
paths.push(`- **Requirements**: \`${relGsdRootFile("REQUIREMENTS")}\``);
|
|
288
|
-
if (existsSync(resolveGsdRootFile(base, "DECISIONS")))
|
|
289
|
-
paths.push(`- **Decisions**: \`${relGsdRootFile("DECISIONS")}\``);
|
|
290
|
-
if (paths.length === 0) {
|
|
291
|
-
const types = opts?.includeProject ? "project/requirements/decisions" : "requirements/decisions";
|
|
292
|
-
return `_No ${types} files found._`;
|
|
293
|
-
}
|
|
294
|
-
return paths.join("\n");
|
|
295
|
-
}
|
|
296
319
|
// ─── Section Builders ──────────────────────────────────────────────────────
|
|
297
320
|
export function buildResumeSection(continueContent, legacyContinueContent, continueRelPath, legacyContinueRelPath) {
|
|
298
321
|
const resolvedContent = continueContent ?? legacyContinueContent;
|
|
@@ -419,17 +442,6 @@ export async function checkNeedsReassessment(base, mid, state) {
|
|
|
419
442
|
const hasAssessment = !!(assessmentFile && await loadFile(assessmentFile));
|
|
420
443
|
if (hasAssessment)
|
|
421
444
|
return null;
|
|
422
|
-
// Fallback: check the expected path directly via existsSync.
|
|
423
|
-
// resolveSliceFile relies on directory listing (readdirSync) which may not
|
|
424
|
-
// reflect a freshly written file in git worktree directories on some
|
|
425
|
-
// filesystems (observed on macOS APFS). A direct existsSync on the
|
|
426
|
-
// constructed path bypasses directory listing entirely. (#1112)
|
|
427
|
-
const sliceDir = resolveSlicePath(base, mid, lastCompleted.id);
|
|
428
|
-
if (sliceDir) {
|
|
429
|
-
const directPath = join(sliceDir, `${lastCompleted.id}-ASSESSMENT.md`);
|
|
430
|
-
if (existsSync(directPath))
|
|
431
|
-
return null;
|
|
432
|
-
}
|
|
433
445
|
// Also need a summary to reassess against
|
|
434
446
|
const summaryFile = resolveSliceFile(base, mid, lastCompleted.id, "SUMMARY");
|
|
435
447
|
const hasSummary = !!(summaryFile && await loadFile(summaryFile));
|
|
@@ -475,22 +487,15 @@ export async function checkNeedsRunUat(base, mid, state, prefs) {
|
|
|
475
487
|
const uatContent = await loadFile(uatFile);
|
|
476
488
|
if (!uatContent)
|
|
477
489
|
return null;
|
|
478
|
-
// If
|
|
479
|
-
// be re-dispatched. PASS means progression can continue; any non-PASS verdict
|
|
480
|
-
// must be handled by the dispatch table's verdict gate, which stops progression
|
|
481
|
-
// with a human-action message instead of replaying the same run-uat unit.
|
|
490
|
+
// If UAT result already exists, skip (idempotent)
|
|
482
491
|
const uatResultFile = resolveSliceFile(base, mid, sid, "UAT-RESULT");
|
|
483
492
|
if (uatResultFile) {
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
493
|
+
const hasResult = !!(await loadFile(uatResultFile));
|
|
494
|
+
if (hasResult)
|
|
486
495
|
return null;
|
|
487
496
|
}
|
|
488
|
-
// Classify UAT type;
|
|
489
|
-
// execute mechanical checks. Non-artifact UATs are tracked in the dashboard
|
|
490
|
-
// but don't block auto-mode progression.
|
|
497
|
+
// Classify UAT type; unknown type → treat as human-experience (human review)
|
|
491
498
|
const uatType = extractUatType(uatContent) ?? "human-experience";
|
|
492
|
-
if (uatType !== "artifact-driven")
|
|
493
|
-
return null;
|
|
494
499
|
return { sliceId: sid, uatType };
|
|
495
500
|
}
|
|
496
501
|
// ─── Prompt Builders ──────────────────────────────────────────────────────
|
|
@@ -512,7 +517,7 @@ export async function buildResearchMilestonePrompt(mid, midTitle, base) {
|
|
|
512
517
|
if (knowledgeInlineRM)
|
|
513
518
|
inlined.push(knowledgeInlineRM);
|
|
514
519
|
inlined.push(inlineTemplate("research", "Research"));
|
|
515
|
-
const inlinedContext =
|
|
520
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
516
521
|
const outputRelPath = relMilestoneFile(base, mid, "RESEARCH");
|
|
517
522
|
return loadPrompt("research-milestone", {
|
|
518
523
|
workingDirectory: base,
|
|
@@ -539,7 +544,17 @@ export async function buildPlanMilestonePrompt(mid, midTitle, base, level) {
|
|
|
539
544
|
const priorSummaryInline = await inlinePriorMilestoneSummary(mid, base);
|
|
540
545
|
if (priorSummaryInline)
|
|
541
546
|
inlined.push(priorSummaryInline);
|
|
542
|
-
|
|
547
|
+
if (inlineLevel !== "minimal") {
|
|
548
|
+
const projectInline = await inlineProjectFromDb(base);
|
|
549
|
+
if (projectInline)
|
|
550
|
+
inlined.push(projectInline);
|
|
551
|
+
const requirementsInline = await inlineRequirementsFromDb(base, undefined, inlineLevel);
|
|
552
|
+
if (requirementsInline)
|
|
553
|
+
inlined.push(requirementsInline);
|
|
554
|
+
const decisionsInline = await inlineDecisionsFromDb(base, mid, undefined, inlineLevel);
|
|
555
|
+
if (decisionsInline)
|
|
556
|
+
inlined.push(decisionsInline);
|
|
557
|
+
}
|
|
543
558
|
const knowledgeInlinePM = await inlineGsdRootFile(base, "knowledge.md", "Project Knowledge");
|
|
544
559
|
if (knowledgeInlinePM)
|
|
545
560
|
inlined.push(knowledgeInlinePM);
|
|
@@ -555,21 +570,21 @@ export async function buildPlanMilestonePrompt(mid, midTitle, base, level) {
|
|
|
555
570
|
inlined.push(inlineTemplate("plan", "Slice Plan"));
|
|
556
571
|
inlined.push(inlineTemplate("task-plan", "Task Plan"));
|
|
557
572
|
}
|
|
558
|
-
const inlinedContext =
|
|
573
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
559
574
|
const outputRelPath = relMilestoneFile(base, mid, "ROADMAP");
|
|
575
|
+
const researchOutputPath = join(base, relMilestoneFile(base, mid, "RESEARCH"));
|
|
560
576
|
const secretsOutputPath = join(base, relMilestoneFile(base, mid, "SECRETS"));
|
|
561
|
-
const researchOutputRelPath = relMilestoneFile(base, mid, "RESEARCH");
|
|
562
577
|
return loadPrompt("plan-milestone", {
|
|
563
578
|
workingDirectory: base,
|
|
564
579
|
milestoneId: mid, milestoneTitle: midTitle,
|
|
565
580
|
milestonePath: relMilestonePath(base, mid),
|
|
566
581
|
contextPath: contextRel,
|
|
567
582
|
researchPath: researchRel,
|
|
583
|
+
researchOutputPath,
|
|
568
584
|
outputPath: join(base, outputRelPath),
|
|
569
585
|
secretsOutputPath,
|
|
570
586
|
inlinedContext,
|
|
571
|
-
sourceFilePaths,
|
|
572
|
-
researchOutputPath: join(base, researchOutputRelPath),
|
|
587
|
+
sourceFilePaths: buildSourceFilePaths(base, mid),
|
|
573
588
|
...buildSkillDiscoveryVars(),
|
|
574
589
|
});
|
|
575
590
|
}
|
|
@@ -603,7 +618,7 @@ export async function buildResearchSlicePrompt(mid, _midTitle, sid, sTitle, base
|
|
|
603
618
|
const overridesInline = formatOverridesSection(activeOverrides);
|
|
604
619
|
if (overridesInline)
|
|
605
620
|
inlined.unshift(overridesInline);
|
|
606
|
-
const inlinedContext =
|
|
621
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
607
622
|
const outputRelPath = relSliceFile(base, mid, sid, "RESEARCH");
|
|
608
623
|
return loadPrompt("research-slice", {
|
|
609
624
|
workingDirectory: base,
|
|
@@ -629,7 +644,14 @@ export async function buildPlanSlicePrompt(mid, _midTitle, sid, sTitle, base, le
|
|
|
629
644
|
const researchInline = await inlineFileOptional(researchPath, researchRel, "Slice Research");
|
|
630
645
|
if (researchInline)
|
|
631
646
|
inlined.push(researchInline);
|
|
632
|
-
|
|
647
|
+
if (inlineLevel !== "minimal") {
|
|
648
|
+
const decisionsInline = await inlineDecisionsFromDb(base, mid, undefined, inlineLevel);
|
|
649
|
+
if (decisionsInline)
|
|
650
|
+
inlined.push(decisionsInline);
|
|
651
|
+
const requirementsInline = await inlineRequirementsFromDb(base, sid, inlineLevel);
|
|
652
|
+
if (requirementsInline)
|
|
653
|
+
inlined.push(requirementsInline);
|
|
654
|
+
}
|
|
633
655
|
const knowledgeInlinePS = await inlineGsdRootFile(base, "knowledge.md", "Project Knowledge");
|
|
634
656
|
if (knowledgeInlinePS)
|
|
635
657
|
inlined.push(knowledgeInlinePS);
|
|
@@ -642,11 +664,15 @@ export async function buildPlanSlicePrompt(mid, _midTitle, sid, sTitle, base, le
|
|
|
642
664
|
const planOverridesInline = formatOverridesSection(planActiveOverrides);
|
|
643
665
|
if (planOverridesInline)
|
|
644
666
|
inlined.unshift(planOverridesInline);
|
|
645
|
-
const inlinedContext =
|
|
667
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
646
668
|
// Build executor context constraints from the budget engine
|
|
647
669
|
const executorContextConstraints = formatExecutorConstraints();
|
|
648
670
|
const outputRelPath = relSliceFile(base, mid, sid, "PLAN");
|
|
649
|
-
const
|
|
671
|
+
const prefs = loadEffectiveGSDPreferences();
|
|
672
|
+
const commitDocsEnabled = prefs?.preferences?.git?.commit_docs !== false;
|
|
673
|
+
const commitInstruction = commitDocsEnabled
|
|
674
|
+
? `Commit the plan files only: \`git add ${relSlicePath(base, mid, sid)}/ .gsd/DECISIONS.md .gitignore && git commit -m "docs(${sid}): add slice plan"\`. Do not stage .gsd/STATE.md or other runtime files — the system manages those.`
|
|
675
|
+
: "Do not commit — planning docs are not tracked in git for this project.";
|
|
650
676
|
return loadPrompt("plan-slice", {
|
|
651
677
|
workingDirectory: base,
|
|
652
678
|
milestoneId: mid, sliceId: sid, sliceTitle: sTitle,
|
|
@@ -656,9 +682,9 @@ export async function buildPlanSlicePrompt(mid, _midTitle, sid, sTitle, base, le
|
|
|
656
682
|
outputPath: join(base, outputRelPath),
|
|
657
683
|
inlinedContext,
|
|
658
684
|
dependencySummaries: depContent,
|
|
685
|
+
sourceFilePaths: buildSourceFilePaths(base, mid, sid),
|
|
659
686
|
executorContextConstraints,
|
|
660
687
|
commitInstruction,
|
|
661
|
-
sourceFilePaths: sliceSourceFilePaths,
|
|
662
688
|
});
|
|
663
689
|
}
|
|
664
690
|
export async function buildExecuteTaskPrompt(mid, sid, sTitle, tid, tTitle, base, level) {
|
|
@@ -785,7 +811,7 @@ export async function buildCompleteSlicePrompt(mid, _midTitle, sid, sTitle, base
|
|
|
785
811
|
const completeOverridesInline = formatOverridesSection(completeActiveOverrides);
|
|
786
812
|
if (completeOverridesInline)
|
|
787
813
|
inlined.unshift(completeOverridesInline);
|
|
788
|
-
const inlinedContext =
|
|
814
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
789
815
|
const sliceRel = relSlicePath(base, mid, sid);
|
|
790
816
|
const sliceSummaryPath = join(base, `${sliceRel}/${sid}-SUMMARY.md`);
|
|
791
817
|
const sliceUatPath = join(base, `${sliceRel}/${sid}-UAT.md`);
|
|
@@ -841,7 +867,7 @@ export async function buildCompleteMilestonePrompt(mid, midTitle, base, level) {
|
|
|
841
867
|
if (contextInline)
|
|
842
868
|
inlined.push(contextInline);
|
|
843
869
|
inlined.push(inlineTemplate("milestone-summary", "Milestone Summary"));
|
|
844
|
-
const inlinedContext =
|
|
870
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
845
871
|
const milestoneSummaryPath = join(base, `${relMilestonePath(base, mid)}/${mid}-SUMMARY.md`);
|
|
846
872
|
return loadPrompt("complete-milestone", {
|
|
847
873
|
workingDirectory: base,
|
|
@@ -908,7 +934,7 @@ export async function buildValidateMilestonePrompt(mid, midTitle, base, level) {
|
|
|
908
934
|
const contextInline = await inlineFileOptional(contextPath, contextRel, "Milestone Context");
|
|
909
935
|
if (contextInline)
|
|
910
936
|
inlined.push(contextInline);
|
|
911
|
-
const inlinedContext =
|
|
937
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
912
938
|
const validationOutputPath = join(base, `${relMilestonePath(base, mid)}/${mid}-VALIDATION.md`);
|
|
913
939
|
const roadmapOutputPath = `${relMilestonePath(base, mid)}/${mid}-ROADMAP.md`;
|
|
914
940
|
return loadPrompt("validate-milestone", {
|
|
@@ -956,7 +982,7 @@ export async function buildReplanSlicePrompt(mid, midTitle, sid, sTitle, base) {
|
|
|
956
982
|
const replanOverridesInline = formatOverridesSection(replanActiveOverrides);
|
|
957
983
|
if (replanOverridesInline)
|
|
958
984
|
inlined.unshift(replanOverridesInline);
|
|
959
|
-
const inlinedContext =
|
|
985
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
960
986
|
const replanPath = join(base, `${relSlicePath(base, mid, sid)}/${sid}-REPLAN.md`);
|
|
961
987
|
// Build capture context for replan prompt (captures that triggered this replan)
|
|
962
988
|
let captureContext = "(none)";
|
|
@@ -983,7 +1009,7 @@ export async function buildReplanSlicePrompt(mid, midTitle, sid, sTitle, base) {
|
|
|
983
1009
|
captureContext,
|
|
984
1010
|
});
|
|
985
1011
|
}
|
|
986
|
-
export async function buildRunUatPrompt(mid, sliceId, uatPath, base) {
|
|
1012
|
+
export async function buildRunUatPrompt(mid, sliceId, uatPath, uatContent, base) {
|
|
987
1013
|
const inlined = [];
|
|
988
1014
|
inlined.push(await inlineFile(resolveSliceFile(base, mid, sliceId, "UAT"), uatPath, `${sliceId} UAT`));
|
|
989
1015
|
const summaryPath = resolveSliceFile(base, mid, sliceId, "SUMMARY");
|
|
@@ -996,14 +1022,16 @@ export async function buildRunUatPrompt(mid, sliceId, uatPath, base) {
|
|
|
996
1022
|
const projectInline = await inlineProjectFromDb(base);
|
|
997
1023
|
if (projectInline)
|
|
998
1024
|
inlined.push(projectInline);
|
|
999
|
-
const inlinedContext =
|
|
1025
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
1000
1026
|
const uatResultPath = join(base, relSliceFile(base, mid, sliceId, "UAT-RESULT"));
|
|
1027
|
+
const uatType = extractUatType(uatContent) ?? "human-experience";
|
|
1001
1028
|
return loadPrompt("run-uat", {
|
|
1002
1029
|
workingDirectory: base,
|
|
1003
1030
|
milestoneId: mid,
|
|
1004
1031
|
sliceId,
|
|
1005
1032
|
uatPath,
|
|
1006
1033
|
uatResultPath,
|
|
1034
|
+
uatType,
|
|
1007
1035
|
inlinedContext,
|
|
1008
1036
|
});
|
|
1009
1037
|
}
|
|
@@ -1030,7 +1058,7 @@ export async function buildReassessRoadmapPrompt(mid, midTitle, completedSliceId
|
|
|
1030
1058
|
const knowledgeInlineRA = await inlineGsdRootFile(base, "knowledge.md", "Project Knowledge");
|
|
1031
1059
|
if (knowledgeInlineRA)
|
|
1032
1060
|
inlined.push(knowledgeInlineRA);
|
|
1033
|
-
const inlinedContext =
|
|
1061
|
+
const inlinedContext = `## Inlined Context (preloaded — do not re-read these files)\n\n${inlined.join("\n\n---\n\n")}`;
|
|
1034
1062
|
const assessmentPath = join(base, relSliceFile(base, mid, completedSliceId, "ASSESSMENT"));
|
|
1035
1063
|
// Build deferred captures context for reassess prompt
|
|
1036
1064
|
let deferredCaptures = "(none)";
|
|
@@ -1044,7 +1072,11 @@ export async function buildReassessRoadmapPrompt(mid, midTitle, completedSliceId
|
|
|
1044
1072
|
catch {
|
|
1045
1073
|
// Non-fatal — captures module may not be available
|
|
1046
1074
|
}
|
|
1047
|
-
const
|
|
1075
|
+
const reassessPrefs = loadEffectiveGSDPreferences();
|
|
1076
|
+
const reassessCommitDocsEnabled = reassessPrefs?.preferences?.git?.commit_docs !== false;
|
|
1077
|
+
const reassessCommitInstruction = reassessCommitDocsEnabled
|
|
1078
|
+
? `Commit: \`docs(${mid}): reassess roadmap after ${completedSliceId}\`. Stage only the .gsd/milestones/ files you changed — do not stage .gsd/STATE.md or other runtime files.`
|
|
1079
|
+
: "Do not commit — planning docs are not tracked in git for this project.";
|
|
1048
1080
|
return loadPrompt("reassess-roadmap", {
|
|
1049
1081
|
workingDirectory: base,
|
|
1050
1082
|
milestoneId: mid,
|