gsd-pi 2.82.0-dev.ed17d078d → 3.0.0-dev.2e8b124f7
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 +93 -18
- package/dist/cli.js +20 -9
- package/dist/headless-ui.js +13 -6
- package/dist/headless.js +9 -2
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/GSD-WORKFLOW.md +10 -1
- package/dist/resources/extensions/claude-code-cli/partial-builder.js +2 -1
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +44 -6
- package/dist/resources/extensions/cmux/index.js +5 -0
- package/dist/resources/extensions/gsd/auto/infra-errors.js +9 -3
- package/dist/resources/extensions/gsd/auto/loop.js +110 -37
- package/dist/resources/extensions/gsd/auto/orchestrator.js +13 -2
- package/dist/resources/extensions/gsd/auto/phases.js +104 -38
- package/dist/resources/extensions/gsd/auto/session.js +6 -0
- package/dist/resources/extensions/gsd/auto/unit-runner-events.js +7 -1
- package/dist/resources/extensions/gsd/auto/workflow-kernel.js +3 -0
- package/dist/resources/extensions/gsd/auto/workflow-memory-pressure.js +12 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +66 -1
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +1 -0
- package/dist/resources/extensions/gsd/auto-dispatch.js +71 -20
- package/dist/resources/extensions/gsd/auto-model-selection.js +2 -0
- package/dist/resources/extensions/gsd/auto-post-unit.js +278 -137
- package/dist/resources/extensions/gsd/auto-prompts.js +36 -10
- package/dist/resources/extensions/gsd/auto-recovery.js +79 -14
- package/dist/resources/extensions/gsd/auto-start.js +90 -14
- package/dist/resources/extensions/gsd/auto-timers.js +11 -3
- package/dist/resources/extensions/gsd/auto-verification.js +102 -34
- package/dist/resources/extensions/gsd/auto-worktree.js +178 -11
- package/dist/resources/extensions/gsd/auto.js +107 -54
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +31 -7
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +10 -9
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +5 -4
- package/dist/resources/extensions/gsd/bootstrap/subagent-input.js +21 -9
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +24 -9
- package/dist/resources/extensions/gsd/clean-root-preflight.js +170 -8
- package/dist/resources/extensions/gsd/commands/catalog.js +10 -1
- package/dist/resources/extensions/gsd/commands/handlers/core.js +38 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +20 -0
- package/dist/resources/extensions/gsd/commands-bootstrap.js +5 -0
- package/dist/resources/extensions/gsd/commands-handlers.js +2 -0
- package/dist/resources/extensions/gsd/commands-mcp-status.js +9 -0
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +10 -2
- package/dist/resources/extensions/gsd/commands-verdict.js +139 -0
- package/dist/resources/extensions/gsd/crash-recovery.js +52 -7
- package/dist/resources/extensions/gsd/db/milestone-leases.js +24 -0
- package/dist/resources/extensions/gsd/db/unit-dispatches.js +3 -2
- package/dist/resources/extensions/gsd/db-base-schema.js +2 -0
- package/dist/resources/extensions/gsd/db-migration-steps.js +4 -0
- package/dist/resources/extensions/gsd/db-task-slice-rows.js +2 -0
- package/dist/resources/extensions/gsd/dispatch-guard.js +46 -2
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +8 -0
- package/dist/resources/extensions/gsd/doctor-git-checks.js +46 -1
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +28 -11
- package/dist/resources/extensions/gsd/doctor.js +2 -28
- package/dist/resources/extensions/gsd/export-html.js +27 -425
- package/dist/resources/extensions/gsd/forensics.js +10 -3
- package/dist/resources/extensions/gsd/git-service.js +138 -10
- package/dist/resources/extensions/gsd/gsd-db.js +76 -33
- package/dist/resources/extensions/gsd/guided-flow-queue.js +4 -3
- package/dist/resources/extensions/gsd/guided-flow.js +110 -117
- package/dist/resources/extensions/gsd/guided-unit-context.js +23 -0
- package/dist/resources/extensions/gsd/init-wizard.js +17 -2
- package/dist/resources/extensions/gsd/markdown-renderer.js +14 -11
- package/dist/resources/extensions/gsd/mcp-filter.js +58 -0
- package/dist/resources/extensions/gsd/migrate/parsers.js +10 -0
- package/dist/resources/extensions/gsd/migration-auto-check.js +12 -17
- package/dist/resources/extensions/gsd/milestone-actions.js +11 -4
- package/dist/resources/extensions/gsd/native-git-bridge.js +57 -14
- package/dist/resources/extensions/gsd/parallel-orchestrator.js +3 -0
- package/dist/resources/extensions/gsd/paths.js +4 -0
- package/dist/resources/extensions/gsd/pending-auto-start.js +52 -0
- package/dist/resources/extensions/gsd/planning-path-scope.js +9 -3
- package/dist/resources/extensions/gsd/post-execution-checks.js +73 -9
- package/dist/resources/extensions/gsd/pre-execution-checks.js +38 -11
- package/dist/resources/extensions/gsd/preferences-mcp.js +19 -0
- package/dist/resources/extensions/gsd/preferences-types.js +2 -0
- package/dist/resources/extensions/gsd/preferences-validation.js +138 -0
- package/dist/resources/extensions/gsd/preferences.js +2 -0
- package/dist/resources/extensions/gsd/prompt-loader.js +1 -1
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +8 -8
- package/dist/resources/extensions/gsd/prompts/discuss.md +9 -9
- package/dist/resources/extensions/gsd/prompts/forensics.md +3 -3
- package/dist/resources/extensions/gsd/prompts/guided-discuss-project.md +4 -4
- package/dist/resources/extensions/gsd/prompts/guided-discuss-requirements.md +3 -3
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +4 -4
- package/dist/resources/extensions/gsd/prompts/queue.md +4 -4
- package/dist/resources/extensions/gsd/prompts/reactive-execute.md +1 -1
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +2 -2
- package/dist/resources/extensions/gsd/prompts/rewrite-docs.md +1 -1
- package/dist/resources/extensions/gsd/queue-reorder-ui.js +30 -13
- package/dist/resources/extensions/gsd/repository-registry.js +44 -0
- package/dist/resources/extensions/gsd/safety/evidence-collector.js +2 -0
- package/dist/resources/extensions/gsd/safety/evidence-cross-ref.js +42 -18
- package/dist/resources/extensions/gsd/slice-parallel-orchestrator.js +59 -2
- package/dist/resources/extensions/gsd/smart-entry-routing.js +36 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/merge-state.js +6 -1
- package/dist/resources/extensions/gsd/state-reconciliation/drift/project-md.js +9 -14
- package/dist/resources/extensions/gsd/state-reconciliation/drift/roadmap.js +19 -24
- package/dist/resources/extensions/gsd/state.js +14 -4
- package/dist/resources/extensions/gsd/status-guards.js +14 -2
- package/dist/resources/extensions/gsd/templates/plan.md +9 -5
- package/dist/resources/extensions/gsd/templates/task-plan.md +10 -2
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +6 -8
- package/dist/resources/extensions/gsd/tools/complete-slice.js +6 -8
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +7 -1
- package/dist/resources/extensions/gsd/tools/plan-slice.js +151 -15
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +119 -0
- package/dist/resources/extensions/gsd/unit-context-composer.js +2 -0
- package/dist/resources/extensions/gsd/unit-context-manifest.js +69 -17
- package/dist/resources/extensions/gsd/validation.js +23 -1
- package/dist/resources/extensions/gsd/verification-gate.js +142 -7
- package/dist/resources/extensions/gsd/verification-verdict.js +26 -0
- package/dist/resources/extensions/gsd/workflow-manifest.js +2 -0
- package/dist/resources/extensions/gsd/workflow-mcp.js +17 -1
- package/dist/resources/extensions/gsd/workflow-projections.js +6 -8
- package/dist/resources/extensions/gsd/worktree-lifecycle.js +83 -19
- package/dist/resources/extensions/gsd/worktree-manager.js +11 -2
- package/dist/resources/extensions/gsd/worktree-safety.js +33 -1
- package/dist/resources/extensions/gsd/worktree-state-projection.js +31 -0
- package/dist/resources/extensions/shared/html-shell.js +388 -0
- package/dist/resources/extensions/shared/interview-ui.js +6 -4
- package/dist/resources/extensions/subagent/index.js +448 -78
- package/dist/resources/extensions/subagent/launch.js +77 -0
- package/dist/resources/extensions/subagent/run-store.js +148 -0
- package/dist/resources/extensions/ttsr/ttsr-manager.js +3 -1
- package/dist/resources/extensions/visual-brief/artifact-policy.js +29 -0
- package/dist/resources/extensions/visual-brief/extension-manifest.json +8 -0
- package/dist/resources/extensions/visual-brief/index.js +5 -0
- package/dist/resources/extensions/visual-brief/page-contract.js +124 -0
- package/dist/resources/extensions/visual-brief/prompts.js +140 -0
- package/dist/resources/skills/forensics/SKILL.md +1 -1
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +10 -10
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +5 -5
- package/dist/web/standalone/.next/required-server-files.json +1 -1
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
- package/dist/web/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +4 -7
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -7
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +4 -5
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -5
- package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +4 -7
- 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 +4 -7
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +4 -5
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -5
- package/dist/web/standalone/.next/server/app/page.js +2 -2
- package/dist/web/standalone/.next/server/app/page.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +10 -10
- package/dist/web/standalone/.next/server/chunks/4266.js +2 -0
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/2973.33f26573894b6153.js +2 -0
- package/dist/web/standalone/.next/static/chunks/8359.65b24fac92188a6b.js +10 -0
- package/dist/web/standalone/.next/static/chunks/9441.ff70bb53f6835771.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/layout-8c10ec293ae0f1d5.js +1 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-de742b64187e13fe.js → webpack-855d616060cb6e59.js} +1 -1
- package/dist/web/standalone/.next/static/css/746ee28c929d1880.css +1 -0
- package/dist/web/standalone/server.js +1 -1
- package/package.json +4 -4
- package/packages/contracts/dist/rpc.test.js +7 -0
- package/packages/contracts/dist/rpc.test.js.map +1 -1
- package/packages/contracts/dist/workflow.d.ts +21 -0
- package/packages/contracts/dist/workflow.d.ts.map +1 -1
- package/packages/contracts/dist/workflow.js +24 -0
- package/packages/contracts/dist/workflow.js.map +1 -1
- package/packages/contracts/src/rpc.test.ts +8 -0
- package/packages/contracts/src/workflow.ts +24 -0
- package/packages/daemon/package.json +2 -2
- package/packages/mcp-server/README.md +13 -4
- package/packages/mcp-server/dist/workflow-tools.d.ts +0 -3
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +80 -0
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +2 -2
- package/packages/mcp-server/src/workflow-tools.test.ts +23 -1
- package/packages/mcp-server/src/workflow-tools.ts +168 -0
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +1 -1
- package/packages/native/tsconfig.json +2 -1
- package/packages/native/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-ai/dist/providers/google-gemini-cli.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/google-gemini-cli.js +5 -0
- package/packages/pi-ai/dist/providers/google-gemini-cli.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-gemini-cli.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/google-gemini-cli.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/google-gemini-cli.test.js +41 -0
- package/packages/pi-ai/dist/providers/google-gemini-cli.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-codex-responses.js +82 -1
- package/packages/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-codex-responses.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/openai-codex-responses.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/openai-codex-responses.test.js +52 -0
- package/packages/pi-ai/dist/providers/openai-codex-responses.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/simple-options.d.ts +2 -4
- package/packages/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/simple-options.js +5 -6
- package/packages/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/packages/pi-ai/dist/providers/simple-options.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/simple-options.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/simple-options.test.js +50 -0
- package/packages/pi-ai/dist/providers/simple-options.test.js.map +1 -0
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/src/providers/google-gemini-cli.test.ts +49 -0
- package/packages/pi-ai/src/providers/google-gemini-cli.ts +7 -0
- package/packages/pi-ai/src/providers/openai-codex-responses.test.ts +63 -0
- package/packages/pi-ai/src/providers/openai-codex-responses.ts +91 -1
- package/packages/pi-ai/src/providers/simple-options.test.ts +60 -0
- package/packages/pi-ai/src/providers/simple-options.ts +5 -6
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session-thinking-level.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session-thinking-level.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session-thinking-level.test.js +66 -0
- package/packages/pi-coding-agent/dist/core/agent-session-thinking-level.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session.js +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +44 -3
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts +6 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js +7 -2
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js +14 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js +8 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +24 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +71 -97
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js +7 -7
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +11 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-ordering.test.js +25 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +2 -0
- 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 +24 -10
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session-thinking-level.test.ts +79 -0
- package/packages/pi-coding-agent/src/core/agent-session.ts +1 -1
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +53 -3
- package/packages/pi-coding-agent/src/core/compaction/compaction.test.ts +23 -1
- package/packages/pi-coding-agent/src/core/compaction/compaction.ts +7 -2
- package/packages/pi-coding-agent/src/core/sdk.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-execution.test.ts +17 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +23 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +75 -102
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +15 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.ts +9 -9
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode-ordering.test.ts +30 -1
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +29 -10
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/dist/__tests__/terminal.test.d.ts +2 -0
- package/packages/pi-tui/dist/__tests__/terminal.test.d.ts.map +1 -0
- package/packages/pi-tui/dist/__tests__/terminal.test.js +103 -0
- package/packages/pi-tui/dist/__tests__/terminal.test.js.map +1 -0
- package/packages/pi-tui/dist/__tests__/tui.test.js +45 -2
- package/packages/pi-tui/dist/__tests__/tui.test.js.map +1 -1
- package/packages/pi-tui/dist/terminal.d.ts +2 -0
- package/packages/pi-tui/dist/terminal.d.ts.map +1 -1
- package/packages/pi-tui/dist/terminal.js +12 -0
- package/packages/pi-tui/dist/terminal.js.map +1 -1
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +106 -27
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/package.json +1 -1
- package/packages/pi-tui/src/__tests__/terminal.test.ts +121 -0
- package/packages/pi-tui/src/__tests__/tui.test.ts +59 -2
- package/packages/pi-tui/src/terminal.ts +11 -0
- package/packages/pi-tui/src/tui.ts +108 -27
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/packages/rpc-client/package.json +1 -1
- package/packages/rpc-client/tsconfig.tsbuildinfo +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/GSD-WORKFLOW.md +10 -1
- package/src/resources/extensions/claude-code-cli/partial-builder.ts +2 -1
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +52 -6
- package/src/resources/extensions/claude-code-cli/tests/partial-builder.test.ts +19 -2
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +49 -2
- package/src/resources/extensions/cmux/index.ts +6 -0
- package/src/resources/extensions/gsd/auto/contracts.ts +17 -6
- package/src/resources/extensions/gsd/auto/infra-errors.ts +9 -3
- package/src/resources/extensions/gsd/auto/loop.ts +111 -38
- package/src/resources/extensions/gsd/auto/orchestrator.ts +13 -2
- package/src/resources/extensions/gsd/auto/phases.ts +127 -49
- package/src/resources/extensions/gsd/auto/session.ts +16 -0
- package/src/resources/extensions/gsd/auto/types.ts +3 -0
- package/src/resources/extensions/gsd/auto/unit-runner-events.ts +6 -2
- package/src/resources/extensions/gsd/auto/workflow-kernel.ts +5 -1
- package/src/resources/extensions/gsd/auto/workflow-memory-pressure.ts +13 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +72 -1
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +1 -0
- package/src/resources/extensions/gsd/auto-dispatch.ts +74 -20
- package/src/resources/extensions/gsd/auto-model-selection.ts +2 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +312 -148
- package/src/resources/extensions/gsd/auto-prompts.ts +36 -13
- package/src/resources/extensions/gsd/auto-recovery.ts +83 -11
- package/src/resources/extensions/gsd/auto-start.ts +99 -12
- package/src/resources/extensions/gsd/auto-timers.ts +10 -3
- package/src/resources/extensions/gsd/auto-verification.ts +124 -42
- package/src/resources/extensions/gsd/auto-worktree.ts +195 -11
- package/src/resources/extensions/gsd/auto.ts +100 -42
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +42 -7
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +10 -9
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +5 -4
- package/src/resources/extensions/gsd/bootstrap/subagent-input.ts +19 -7
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +27 -10
- package/src/resources/extensions/gsd/clean-root-preflight.ts +174 -8
- package/src/resources/extensions/gsd/commands/catalog.ts +10 -1
- package/src/resources/extensions/gsd/commands/handlers/core.ts +41 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +21 -0
- package/src/resources/extensions/gsd/commands-bootstrap.ts +10 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +2 -0
- package/src/resources/extensions/gsd/commands-mcp-status.ts +8 -0
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +11 -3
- package/src/resources/extensions/gsd/commands-verdict.ts +202 -0
- package/src/resources/extensions/gsd/crash-recovery.ts +52 -6
- package/src/resources/extensions/gsd/db/milestone-leases.ts +26 -0
- package/src/resources/extensions/gsd/db/unit-dispatches.ts +4 -3
- package/src/resources/extensions/gsd/db-base-schema.ts +2 -0
- package/src/resources/extensions/gsd/db-migration-steps.ts +5 -0
- package/src/resources/extensions/gsd/db-task-slice-rows.ts +4 -0
- package/src/resources/extensions/gsd/dispatch-guard.ts +60 -2
- package/src/resources/extensions/gsd/docs/preferences-reference.md +8 -0
- package/src/resources/extensions/gsd/doctor-git-checks.ts +45 -1
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +25 -13
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +2 -27
- package/src/resources/extensions/gsd/export-html.ts +27 -427
- package/src/resources/extensions/gsd/forensics.ts +9 -3
- package/src/resources/extensions/gsd/git-service.ts +166 -11
- package/src/resources/extensions/gsd/gsd-db.ts +80 -31
- package/src/resources/extensions/gsd/guided-flow-queue.ts +4 -3
- package/src/resources/extensions/gsd/guided-flow.ts +142 -134
- package/src/resources/extensions/gsd/guided-unit-context.ts +30 -0
- package/src/resources/extensions/gsd/init-wizard.ts +17 -2
- package/src/resources/extensions/gsd/journal.ts +8 -1
- package/src/resources/extensions/gsd/markdown-renderer.ts +14 -11
- package/src/resources/extensions/gsd/mcp-filter.ts +80 -0
- package/src/resources/extensions/gsd/migrate/parsers.ts +11 -0
- package/src/resources/extensions/gsd/migration-auto-check.ts +15 -23
- package/src/resources/extensions/gsd/milestone-actions.ts +10 -4
- package/src/resources/extensions/gsd/native-git-bridge.ts +63 -14
- package/src/resources/extensions/gsd/parallel-orchestrator.ts +3 -0
- package/src/resources/extensions/gsd/paths.ts +5 -0
- package/src/resources/extensions/gsd/pending-auto-start.ts +79 -0
- package/src/resources/extensions/gsd/planning-path-scope.ts +10 -2
- package/src/resources/extensions/gsd/post-execution-checks.ts +87 -12
- package/src/resources/extensions/gsd/pre-execution-checks.ts +49 -11
- package/src/resources/extensions/gsd/preferences-mcp.ts +27 -0
- package/src/resources/extensions/gsd/preferences-types.ts +33 -0
- package/src/resources/extensions/gsd/preferences-validation.ts +145 -0
- package/src/resources/extensions/gsd/preferences.ts +5 -0
- package/src/resources/extensions/gsd/prompt-loader.ts +1 -1
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/complete-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +8 -8
- package/src/resources/extensions/gsd/prompts/discuss.md +9 -9
- package/src/resources/extensions/gsd/prompts/forensics.md +3 -3
- package/src/resources/extensions/gsd/prompts/guided-discuss-project.md +4 -4
- package/src/resources/extensions/gsd/prompts/guided-discuss-requirements.md +3 -3
- package/src/resources/extensions/gsd/prompts/plan-slice.md +4 -4
- package/src/resources/extensions/gsd/prompts/queue.md +4 -4
- package/src/resources/extensions/gsd/prompts/reactive-execute.md +1 -1
- package/src/resources/extensions/gsd/prompts/refine-slice.md +2 -2
- package/src/resources/extensions/gsd/prompts/rewrite-docs.md +1 -1
- package/src/resources/extensions/gsd/queue-reorder-ui.ts +31 -13
- package/src/resources/extensions/gsd/repository-registry.ts +77 -0
- package/src/resources/extensions/gsd/safety/evidence-collector.ts +2 -0
- package/src/resources/extensions/gsd/safety/evidence-cross-ref.ts +54 -19
- package/src/resources/extensions/gsd/slice-parallel-orchestrator.ts +52 -1
- package/src/resources/extensions/gsd/smart-entry-routing.ts +77 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/merge-state.ts +8 -1
- package/src/resources/extensions/gsd/state-reconciliation/drift/project-md.ts +12 -15
- package/src/resources/extensions/gsd/state-reconciliation/drift/roadmap.ts +17 -25
- package/src/resources/extensions/gsd/state.ts +15 -4
- package/src/resources/extensions/gsd/status-guards.ts +16 -2
- package/src/resources/extensions/gsd/templates/plan.md +9 -5
- package/src/resources/extensions/gsd/templates/task-plan.md +10 -2
- package/src/resources/extensions/gsd/tests/auto-abort-pause-regression.test.ts +10 -1
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +71 -0
- package/src/resources/extensions/gsd/tests/auto-deterministic-error-classification-4973.test.ts +116 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +300 -1
- package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +197 -11
- package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +151 -12
- package/src/resources/extensions/gsd/tests/auto-phases-lifecycle.test.ts +53 -2
- package/src/resources/extensions/gsd/tests/auto-post-unit-step-message.test.ts +18 -6
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +129 -6
- package/src/resources/extensions/gsd/tests/auto-retry-mcp-churn-fixes.test.ts +12 -0
- package/src/resources/extensions/gsd/tests/auto-start-orphan-bootstrap.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/auto-stop-notification.test.ts +20 -0
- package/src/resources/extensions/gsd/tests/auto-worktree-registry.test.ts +69 -1
- package/src/resources/extensions/gsd/tests/autocomplete-regressions-1675.test.ts +21 -0
- package/src/resources/extensions/gsd/tests/brief-command.test.ts +89 -0
- package/src/resources/extensions/gsd/tests/checkout-branch-stash-guard.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/clean-root-preflight.test.ts +107 -2
- package/src/resources/extensions/gsd/tests/clear-stale-autostart.test.ts +32 -4
- package/src/resources/extensions/gsd/tests/closeout-git-deferral.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/commands-verdict.test.ts +378 -0
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +4 -1
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +5 -9
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +3 -1
- package/src/resources/extensions/gsd/tests/crash-recovery-via-db.test.ts +104 -2
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +2 -0
- package/src/resources/extensions/gsd/tests/db-authority-regression.test.ts +208 -0
- package/src/resources/extensions/gsd/tests/db-task-slice-rows.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/deep-project-auto-loop.test.ts +61 -2
- package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +111 -1
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +68 -1
- package/src/resources/extensions/gsd/tests/doctor-empty-worktree.test.ts +65 -0
- package/src/resources/extensions/gsd/tests/doctor-forensics-db-open-regression.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/evidence-cross-ref.test.ts +97 -0
- package/src/resources/extensions/gsd/tests/export-html-enhancements.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +28 -0
- package/src/resources/extensions/gsd/tests/gsdroot-worktree-detection.test.ts +5 -2
- package/src/resources/extensions/gsd/tests/guided-discuss-project-prompt-rendering.test.ts +2 -0
- package/src/resources/extensions/gsd/tests/guided-dispatch-root.test.ts +106 -0
- package/src/resources/extensions/gsd/tests/guided-flow-session-isolation.test.ts +59 -11
- package/src/resources/extensions/gsd/tests/guided-flow.test.ts +21 -0
- package/src/resources/extensions/gsd/tests/guided-tool-contract.test.ts +65 -0
- package/src/resources/extensions/gsd/tests/headless-milestone-parity.test.ts +7 -7
- package/src/resources/extensions/gsd/tests/hook-model-resolution.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/infra-error.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/infra-errors-cooldown.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/init-prefs-routing.test.ts +22 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-runtime.test.ts +20 -0
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +199 -2
- package/src/resources/extensions/gsd/tests/integration/state-machine-runtime-failures.test.ts +6 -1
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +49 -3
- package/src/resources/extensions/gsd/tests/journal.test.ts +32 -0
- package/src/resources/extensions/gsd/tests/mcp-filter.test.ts +287 -0
- package/src/resources/extensions/gsd/tests/mcp-status.test.ts +11 -0
- package/src/resources/extensions/gsd/tests/merge-db-cycle.test.ts +179 -0
- package/src/resources/extensions/gsd/tests/migrate-validator-parsers.test.ts +24 -1
- package/src/resources/extensions/gsd/tests/migration-auto-check.test.ts +26 -18
- package/src/resources/extensions/gsd/tests/native-git-bridge-exec-fallback.test.ts +80 -2
- package/src/resources/extensions/gsd/tests/orphaned-worktree-audit.test.ts +121 -1
- package/src/resources/extensions/gsd/tests/parallel-orchestrator-zombie-cleanup.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/park-db-sync.test.ts +55 -1
- package/src/resources/extensions/gsd/tests/pending-autostart-scope.test.ts +29 -5
- package/src/resources/extensions/gsd/tests/pipeline-variant-dispatch.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +26 -0
- package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +2 -0
- package/src/resources/extensions/gsd/tests/plan-slice.test.ts +343 -3
- package/src/resources/extensions/gsd/tests/plan-task.test.ts +18 -1
- package/src/resources/extensions/gsd/tests/post-exec-retry-bypass.test.ts +79 -1
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +105 -3
- package/src/resources/extensions/gsd/tests/post-unit-git-failure.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/post-unit-state-rebuild.test.ts +84 -0
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +59 -0
- package/src/resources/extensions/gsd/tests/pre-execution-pause-wiring.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/preferences-mcp.test.ts +128 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +75 -0
- package/src/resources/extensions/gsd/tests/prefs-wizard-coverage.test.ts +78 -0
- package/src/resources/extensions/gsd/tests/prompt-loader.test.ts +23 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +37 -1
- package/src/resources/extensions/gsd/tests/quality-gates.test.ts +6 -0
- package/src/resources/extensions/gsd/tests/queue-reorder-ui.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/remediation-completion-guard.test.ts +89 -2
- package/src/resources/extensions/gsd/tests/repository-registry.test.ts +52 -0
- package/src/resources/extensions/gsd/tests/run-uat-replay-cap.test.ts +2 -3
- package/src/resources/extensions/gsd/tests/session-switch-abort-misclassification.test.ts +21 -1
- package/src/resources/extensions/gsd/tests/slice-parallel-orchestrator.test.ts +72 -1
- package/src/resources/extensions/gsd/tests/smart-entry-routing.test.ts +113 -0
- package/src/resources/extensions/gsd/tests/start-auto-detached.test.ts +86 -2
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +6 -0
- package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +119 -23
- package/src/resources/extensions/gsd/tests/status-guards.test.ts +17 -1
- package/src/resources/extensions/gsd/tests/stuck-state-via-db.test.ts +64 -1
- package/src/resources/extensions/gsd/tests/subagent-model-dispatch.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +7 -3
- package/src/resources/extensions/gsd/tests/unit-context-composer.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +131 -9
- package/src/resources/extensions/gsd/tests/uok-gitops-turn-action.test.ts +111 -1
- package/src/resources/extensions/gsd/tests/validate-milestone-stuck-guard.test.ts +29 -2
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +42 -1
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +173 -1
- package/src/resources/extensions/gsd/tests/verification-verdict.test.ts +78 -0
- package/src/resources/extensions/gsd/tests/workflow-kernel.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +19 -1
- package/src/resources/extensions/gsd/tests/workflow-memory-pressure.test.ts +21 -1
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/worktree-git-pathspec.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +64 -12
- package/src/resources/extensions/gsd/tests/worktree-lifecycle.test.ts +57 -2
- package/src/resources/extensions/gsd/tests/worktree-preferences-sync.test.ts +25 -0
- package/src/resources/extensions/gsd/tests/worktree-safety.test.ts +46 -0
- package/src/resources/extensions/gsd/tests/worktree-sync-milestones.test.ts +95 -0
- package/src/resources/extensions/gsd/tests/worktree-write-gate.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +59 -0
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +8 -10
- package/src/resources/extensions/gsd/tools/complete-slice.ts +6 -8
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +5 -1
- package/src/resources/extensions/gsd/tools/plan-slice.ts +172 -12
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +135 -0
- package/src/resources/extensions/gsd/types.ts +1 -1
- package/src/resources/extensions/gsd/unit-context-composer.ts +3 -0
- package/src/resources/extensions/gsd/unit-context-manifest.ts +86 -19
- package/src/resources/extensions/gsd/validation.ts +23 -1
- package/src/resources/extensions/gsd/verification-gate.ts +170 -6
- package/src/resources/extensions/gsd/verification-verdict.ts +47 -0
- package/src/resources/extensions/gsd/workflow-manifest.ts +2 -0
- package/src/resources/extensions/gsd/workflow-mcp.ts +18 -1
- package/src/resources/extensions/gsd/workflow-projections.ts +6 -8
- package/src/resources/extensions/gsd/worktree-lifecycle.ts +93 -20
- package/src/resources/extensions/gsd/worktree-manager.ts +14 -2
- package/src/resources/extensions/gsd/worktree-safety.ts +45 -6
- package/src/resources/extensions/gsd/worktree-state-projection.ts +43 -0
- package/src/resources/extensions/shared/html-shell.ts +412 -0
- package/src/resources/extensions/shared/interview-ui.ts +6 -4
- package/src/resources/extensions/shared/tests/interview-notes-loop.test.ts +15 -0
- package/src/resources/extensions/subagent/index.ts +567 -103
- package/src/resources/extensions/subagent/launch.ts +131 -0
- package/src/resources/extensions/subagent/run-store.ts +218 -0
- package/src/resources/extensions/subagent/tests/launch.test.ts +115 -0
- package/src/resources/extensions/subagent/tests/run-store.test.ts +111 -0
- package/src/resources/extensions/ttsr/ttsr-manager.ts +5 -1
- package/src/resources/extensions/visual-brief/artifact-policy.ts +41 -0
- package/src/resources/extensions/visual-brief/extension-manifest.json +8 -0
- package/src/resources/extensions/visual-brief/index.ts +8 -0
- package/src/resources/extensions/visual-brief/page-contract.ts +136 -0
- package/src/resources/extensions/visual-brief/prompts.ts +183 -0
- package/src/resources/extensions/visual-brief/tests/visual-brief.test.ts +212 -0
- package/src/resources/skills/forensics/SKILL.md +1 -1
- package/dist/web/standalone/.next/server/chunks/5822.js +0 -2
- package/dist/web/standalone/.next/static/chunks/2556.0527fea66e123b7f.js +0 -1
- package/dist/web/standalone/.next/static/chunks/8359.e059d86b255fce1c.js +0 -10
- package/dist/web/standalone/.next/static/chunks/9441.1081da1125d1764f.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/layout-a16c7a7ecdf0c2cf.js +0 -1
- package/dist/web/standalone/.next/static/css/54ec2745c1da488b.css +0 -1
- package/dist/web/standalone/.next/static/css/de70bee13400563f.css +0 -1
- package/dist/web/standalone/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
- package/dist/web/standalone/.next/static/media/747892c23ea88013-s.woff2 +0 -0
- package/dist/web/standalone/.next/static/media/8d697b304b401681-s.woff2 +0 -0
- package/dist/web/standalone/.next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
- package/dist/web/standalone/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
- package/dist/web/standalone/.next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
- /package/dist/web/standalone/.next/static/{YEvjuT-fsFfYQhDSWtueS → zCegwxH2e6vLp1vEZLLuZ}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{YEvjuT-fsFfYQhDSWtueS → zCegwxH2e6vLp1vEZLLuZ}/_ssgManifest.js +0 -0
|
@@ -186,7 +186,7 @@ Research is advisory, not auto-binding. Use discussion output to identify table
|
|
|
186
186
|
|
|
187
187
|
## Capability Contract
|
|
188
188
|
|
|
189
|
-
Before writing a roadmap,
|
|
189
|
+
Before writing a roadmap, persist requirements with `gsd_requirement_save` or `gsd_requirement_update`, then render `.gsd/REQUIREMENTS.md` through `gsd_summary_save` with `artifact_type: "REQUIREMENTS"`.
|
|
190
190
|
|
|
191
191
|
Use it as the project's explicit capability contract.
|
|
192
192
|
|
|
@@ -226,8 +226,8 @@ Directories use bare IDs. Files use ID-SUFFIX format. Titles live inside file co
|
|
|
226
226
|
|
|
227
227
|
Once the user is satisfied, in a single pass:
|
|
228
228
|
1. `mkdir -p .gsd/milestones/{{milestoneId}}/slices`
|
|
229
|
-
2.
|
|
230
|
-
3.
|
|
229
|
+
2. Call `gsd_summary_save` with `artifact_type: "PROJECT"` and full Project template content. The tool persists the DB-backed PROJECT artifact and renders `.gsd/PROJECT.md`. Describe what the project is, its current state, and list the milestone sequence.
|
|
230
|
+
3. Persist requirements with `gsd_requirement_save` or `gsd_requirement_update`, then call `gsd_summary_save` with `artifact_type: "REQUIREMENTS"` so the tool renders `.gsd/REQUIREMENTS.md` from DB rows. Confirm requirement states, ownership, and traceability before roadmap creation.
|
|
231
231
|
**Depth-Preservation Guidance for context.md:**
|
|
232
232
|
When writing context.md, preserve the user's exact terminology, emphasis, and framing. Do not flatten nuance into generic summaries. If the user said "craft feel," write "craft feel," not "high-quality user experience." CONTEXT.md is downstream agents' only window into this conversation.
|
|
233
233
|
|
|
@@ -243,8 +243,8 @@ When writing CONTEXT.md, include discussion-layer sections: **Scope**, **Archite
|
|
|
243
243
|
|
|
244
244
|
Before emitting the ready phrase, verify in the CURRENT turn that you have:
|
|
245
245
|
|
|
246
|
-
- [ ]
|
|
247
|
-
- [ ]
|
|
246
|
+
- [ ] Called `gsd_summary_save` for the PROJECT artifact (step 2)
|
|
247
|
+
- [ ] Persisted requirements and called `gsd_summary_save` for the REQUIREMENTS artifact (step 3)
|
|
248
248
|
- [ ] Written `{{contextPath}}` (step 4)
|
|
249
249
|
- [ ] Called `gsd_plan_milestone` (step 5)
|
|
250
250
|
|
|
@@ -270,8 +270,8 @@ Once the user confirms the milestone split:
|
|
|
270
270
|
#### Phase 1: Shared artifacts
|
|
271
271
|
|
|
272
272
|
1. For each milestone, call `gsd_milestone_generate_id`; never invent IDs. Then `mkdir -p .gsd/milestones/<ID>/slices`.
|
|
273
|
-
2.
|
|
274
|
-
3.
|
|
273
|
+
2. Call `gsd_summary_save` with `artifact_type: "PROJECT"` and full Project template content so the tool persists the DB-backed PROJECT artifact and renders `.gsd/PROJECT.md`.
|
|
274
|
+
3. Persist requirements with `gsd_requirement_save` or `gsd_requirement_update`, then call `gsd_summary_save` with `artifact_type: "REQUIREMENTS"` so the tool renders `.gsd/REQUIREMENTS.md` from DB rows. Capture Active, Deferred, Out of Scope, and any already Validated requirements. Later milestones may have provisional ownership where slice plans do not exist yet.
|
|
275
275
|
4. For any architectural or pattern decisions made during discussion, call `gsd_decision_save` — the tool auto-assigns IDs and regenerates `.gsd/DECISIONS.md` automatically.
|
|
276
276
|
|
|
277
277
|
#### Phase 2: Primary milestone
|
|
@@ -344,8 +344,8 @@ For single-milestone projects, do NOT write this file.
|
|
|
344
344
|
|
|
345
345
|
Before emitting the ready phrase, verify in the CURRENT turn that you have:
|
|
346
346
|
|
|
347
|
-
- [ ]
|
|
348
|
-
- [ ]
|
|
347
|
+
- [ ] Called `gsd_summary_save` for the PROJECT artifact (Phase 1)
|
|
348
|
+
- [ ] Persisted requirements and called `gsd_summary_save` for the REQUIREMENTS artifact (Phase 1)
|
|
349
349
|
- [ ] Written primary-milestone `CONTEXT.md` (Phase 2)
|
|
350
350
|
- [ ] Called `gsd_plan_milestone` for the primary milestone (Phase 2)
|
|
351
351
|
- [ ] Written `.gsd/DISCUSSION-MANIFEST.json` with `gates_completed === total` (Phase 3)
|
|
@@ -50,11 +50,11 @@ GSD extension source: `{{gsdSourceDir}}`
|
|
|
50
50
|
|
|
51
51
|
The journal is a structured event log for auto-mode iterations. Daily files contain JSONL:
|
|
52
52
|
|
|
53
|
-
```
|
|
54
|
-
{ ts: "ISO-8601", flowId: "UUID", seq: 0, eventType: "iteration-start", rule?: "rule-name", causedBy?: { flowId, seq }, data?: { unitId, status, ... } }
|
|
53
|
+
```json
|
|
54
|
+
{ ts: "ISO-8601", flowId: "UUID", seq: 0, eventType: "orchestrator-iteration-start", rule?: "rule-name", causedBy?: { flowId, seq }, data?: { unitId, status, ... } }
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Key events: `iteration-start/end`, `dispatch-match/stop`, `unit-start/end`, `terminal`, `guard-block`, `stuck-detected`, `milestone-transition
|
|
57
|
+
Key orchestrator events: `orchestrator-iteration-start/end`, `orchestrator-dispatch-match/stop`, `orchestrator-guard-block`, `orchestrator-terminal`. Legacy loop and phase events (`iteration-start/end`, `dispatch-match/stop`, `unit-start/end`, `terminal`, `guard-block`, `stuck-detected`, `milestone-transition`) still appear for non-orchestrator paths, along with worktree events. `flowId` groups one loop; `causedBy` links causal events; `seq` orders events. Trace orchestrator stalls with `orchestrator-guard-block`/`orchestrator-dispatch-stop` and `data.reason`.
|
|
58
58
|
|
|
59
59
|
### Crash Lock Format (`auto.lock`)
|
|
60
60
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
**Working directory:** `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` elsewhere. For `.gsd` files, use absolute paths rooted at `{{workingDirectory}}`, not `Glob`.
|
|
2
2
|
|
|
3
|
-
Discuss the **project** as a whole: vision, users, anti-goals, constraints, and rough milestone sequence. Ask only real gray areas, then
|
|
3
|
+
Discuss the **project** as a whole: vision, users, anti-goals, constraints, and rough milestone sequence. Ask only real gray areas, then persist the final Project template through `gsd_summary_save` with `artifact_type: "PROJECT"`. The tool renders `.gsd/PROJECT.md`; do not write the projection directly. If a `GSD Skill Preferences` block exists, use it; artifact rules still apply.
|
|
4
4
|
|
|
5
5
|
This runs once before milestone discussion. Later milestones, requirements, and roadmaps depend on it.
|
|
6
6
|
|
|
@@ -34,7 +34,7 @@ After the opening answer, classify project shape as **`simple`** or **`complex`*
|
|
|
34
34
|
|
|
35
35
|
**Default to `complex` when uncertain.** The user can override the verdict in plain text; if they do, accept it and proceed.
|
|
36
36
|
|
|
37
|
-
Persist the verdict
|
|
37
|
+
Persist the verdict through `gsd_summary_save` with `artifact_type: "PROJECT"` into `## Project Shape`; downstream `discuss-requirements`, `discuss-milestone`, and `discuss-slice` read the rendered projection.
|
|
38
38
|
|
|
39
39
|
### Before deeper rounds
|
|
40
40
|
|
|
@@ -95,7 +95,7 @@ If they clarify, absorb the correction and re-verify.
|
|
|
95
95
|
|
|
96
96
|
The depth verification is the only required confirmation gate. Do not add a second "ready to proceed?" gate after it.
|
|
97
97
|
|
|
98
|
-
**CRITICAL — Confirmation gate:** Do not
|
|
98
|
+
**CRITICAL — Confirmation gate:** Do not persist final PROJECT content until the user selects the "(Recommended)" option (structured path) or explicitly confirms (plain-text path). If the user declines, cancels, does not respond, or the tool fails, re-ask.
|
|
99
99
|
|
|
100
100
|
---
|
|
101
101
|
|
|
@@ -104,7 +104,7 @@ The depth verification is the only required confirmation gate. Do not add a seco
|
|
|
104
104
|
Once the user confirms depth:
|
|
105
105
|
|
|
106
106
|
1. Use the **Project** output template (inlined above).
|
|
107
|
-
2. Call `gsd_summary_save` with `artifact_type: "PROJECT"` and full project markdown as `content`; omit `milestone_id`. The tool
|
|
107
|
+
2. Call `gsd_summary_save` with `artifact_type: "PROJECT"` and full project markdown as `content`; omit `milestone_id`. The tool persists the DB-backed PROJECT artifact and renders `.gsd/PROJECT.md`. Preserve the user's terms and framing.
|
|
108
108
|
3. The `## Project Shape` section MUST contain `**Complexity:** simple` or `**Complexity:** complex` (matching the verdict you announced) plus a one-line `**Why:**` rationale. Downstream stages read this line.
|
|
109
109
|
4. The `## Capability Contract` section MUST reference `.gsd/REQUIREMENTS.md` — that file does not yet exist; the next stage (`discuss-requirements`) will produce it.
|
|
110
110
|
5. The `## Milestone Sequence` MUST list at least M001 with title and one-liner. Subsequent milestones may be listed as known intents; they will be elaborated in their own discuss-milestone stages.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
**Working directory:** `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` elsewhere. For `.gsd` files, use absolute paths rooted at `{{workingDirectory}}`, not `Glob`.
|
|
2
2
|
|
|
3
|
-
Discuss **project-level requirements**. Read `.gsd/PROJECT.md` first; it is
|
|
3
|
+
Discuss **project-level requirements**. Read `.gsd/PROJECT.md` first; it is the rendered project artifact for vision, core value, anti-goals, and milestone sequence. Requirements must trace to it. Ask capability gray areas, then persist requirements with `gsd_requirement_save` and render `.gsd/REQUIREMENTS.md` through `gsd_summary_save` using v2 `R###` format and the **Requirements** template.
|
|
4
4
|
|
|
5
5
|
This runs once after `discuss-project` and before milestone work, creating the capability contract for milestones, slices, and verification.
|
|
6
6
|
|
|
@@ -25,7 +25,7 @@ Before your first action, print this banner verbatim in chat:
|
|
|
25
25
|
3. If `.gsd/REQUIREMENTS.md` exists, read it as the working set.
|
|
26
26
|
|
|
27
27
|
**Shape-dependent cadence:**
|
|
28
|
-
- **`simple`**: one fast pass. Extract from PROJECT.md, ask 1-2 plain-text clarifiers only when class/status is ambiguous, then
|
|
28
|
+
- **`simple`**: one fast pass. Extract from PROJECT.md, ask 1-2 plain-text clarifiers only when class/status is ambiguous, then persist requirements through the DB-backed tools.
|
|
29
29
|
- **`complex`**: multi-round questioning with structured 3-4-option questions where alternatives matter.
|
|
30
30
|
|
|
31
31
|
---
|
|
@@ -81,7 +81,7 @@ Before the wrap-up gate, verify: every milestone has an Active requirement; Core
|
|
|
81
81
|
|
|
82
82
|
If they adjust, absorb and re-verify.
|
|
83
83
|
|
|
84
|
-
**CRITICAL — Confirmation gate:** Do not
|
|
84
|
+
**CRITICAL — Confirmation gate:** Do not persist final REQUIREMENTS content until explicit confirmation. Never rationalize past it.
|
|
85
85
|
|
|
86
86
|
---
|
|
87
87
|
|
|
@@ -26,7 +26,7 @@ Before planning, validate roadmap assumptions against code and dependency summar
|
|
|
26
26
|
|
|
27
27
|
{{sourceFilePaths}}
|
|
28
28
|
|
|
29
|
-
If slice research is inlined, trust
|
|
29
|
+
If slice research is inlined, trust its architectural findings, but verify every concrete file path you place in task `inputs` or `expectedOutput` against the current tree or prior/same-task outputs. Explore enough code to confirm paths, boundaries, and verification. Executors later get only task plans, slice excerpt, and prior summaries, so put required paths, steps, inputs, and outputs in task plans.
|
|
30
30
|
|
|
31
31
|
{{executorContextConstraints}}
|
|
32
32
|
|
|
@@ -39,10 +39,10 @@ If slice research is inlined, trust it. Explore enough code to confirm paths, bo
|
|
|
39
39
|
5. Define slice verification before tasks. Non-trivial slices need real tests or executable assertions; boundary contracts need contract-exercising checks. Tests must not read .gitignore/gitignored paths such as `.gsd/`, `.planning/`, or `.audits/`.
|
|
40
40
|
6. Include Threat Surface (Q3), Requirement Impact (Q4), proof level, observability, integration closure, Failure Modes (Q5), Load Profile (Q6), and Negative Tests (Q7) only where applicable.
|
|
41
41
|
7. Right-size tasks. Simple slices can be one task; split only when context, ownership, or verification boundaries justify it.
|
|
42
|
-
8. Each task needs
|
|
43
|
-
9. Persist with `gsd_plan_slice` using goal
|
|
42
|
+
8. Each task needs the exact `gsd_plan_slice.tasks[]` shape: `taskId`, `title`, `description`, `estimate`, `files`, `verify`, `inputs`, `expectedOutput`, and optional `observabilityImpact`. `description` should contain the Why / Do / Done-when narrative. `files`, `inputs`, and `expectedOutput` must be JSON arrays of strings, even when there is only one path (for example, `"inputs": ["src/index.ts"]`, never `"inputs": "src/index.ts"`). Use paths relative to `{{workingDirectory}}`; do not put absolute paths to the original checkout or any directory outside `{{workingDirectory}}` in `files`, `inputs`, `expectedOutput`, or verification commands. **`expectedOutput` must only list files the task actually creates or overwrites on disk.** Do NOT include files the task merely reads, verifies, or tests — those belong only in `inputs`. If a task is a pure verification or test task that produces no new files, `expectedOutput` may be `[]` or limited to test-result artifacts (e.g. a log or assertion output). A file that does not yet exist on disk and is needed as an `input` must be produced by an earlier task's `expectedOutput` — if no prior task creates it, add a task before this one that does.
|
|
43
|
+
9. Persist with `gsd_plan_slice` using `milestoneId`, `sliceId`, `goal`, optional `successCriteria`/`proofLevel`/`integrationClosure`/`observabilityImpact`, and `tasks`. `gsd_plan_slice` handles task persistence transactionally and renders `{{outputPath}}` plus task plans; do not call `gsd_plan_task`. The DB-backed tool is the canonical write path. Do **not** rely on direct `PLAN.md` writes as the source of truth.
|
|
44
44
|
10. Self-audit before finishing: goal/demo closure, requirement coverage, locked decisions, concrete paths, dependency order, wiring, scope size, proof truthfulness, feature completeness, and quality gates. Quality gates: non-trivial slices/tasks include specific Q3-Q7 coverage where applicable.
|
|
45
|
-
11. If planning creates structural decisions,
|
|
45
|
+
11. If planning creates structural decisions, call `gsd_decision_save` for each; the tool persists the decision and regenerates `.gsd/DECISIONS.md`.
|
|
46
46
|
12. {{commitInstruction}}
|
|
47
47
|
|
|
48
48
|
The slice directory already exists. Do not mkdir.
|
|
@@ -114,10 +114,10 @@ Once the user is satisfied, in one pass for **each** new milestone:
|
|
|
114
114
|
|
|
115
115
|
After all milestone directories and context files are written:
|
|
116
116
|
|
|
117
|
-
3.
|
|
118
|
-
4. If
|
|
119
|
-
5. If discussion produced decisions relevant to existing work,
|
|
120
|
-
6.
|
|
117
|
+
3. Refresh project state through `gsd_summary_save` with `artifact_type: "PROJECT"` and full PROJECT content that includes the new milestones in the Milestone Sequence; omit `milestone_id`.
|
|
118
|
+
4. If the queued work introduces new in-scope capabilities or promotes Deferred items, persist those changes with `gsd_requirement_save` or `gsd_requirement_update`, then call `gsd_summary_save` with `artifact_type: "REQUIREMENTS"` so `.gsd/REQUIREMENTS.md` renders from DB rows.
|
|
119
|
+
5. If discussion produced decisions relevant to existing work, call `gsd_decision_save` for each decision; the tool regenerates `.gsd/DECISIONS.md`.
|
|
120
|
+
6. If `.gsd/QUEUE.md` is maintained, update it only as an audit projection of queued intent. Runtime queue state must come from the DB-backed milestone/context tool calls above.
|
|
121
121
|
7. {{commitInstruction}}
|
|
122
122
|
|
|
123
123
|
**Do NOT write roadmaps for queued milestones.**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
You are executing **multiple tasks in parallel** for this slice. The task graph below shows which tasks are ready for simultaneous execution based on their input/output dependencies.
|
|
10
10
|
|
|
11
|
-
**Critical rule:** Use the `subagent` tool in **parallel mode** to dispatch all ready tasks simultaneously. Each subagent gets a
|
|
11
|
+
**Critical rule:** Use the `subagent` tool in **parallel mode** to dispatch all ready tasks simultaneously. Each subagent gets a task-specific execution packet (task plan + dependency carry-forward + completion contract) and is responsible for its own implementation, verification, task summary, and completion tool calls. The parent batch agent orchestrates, verifies, and records failures only when a dispatched task failed before it could leave its own summary behind.
|
|
12
12
|
|
|
13
13
|
## Task Dependency Graph
|
|
14
14
|
|
|
@@ -64,10 +64,10 @@ Then:
|
|
|
64
64
|
2. {{skillActivation}} Record the installed skills you expect executors to use in each task plan's `skills_used` frontmatter.
|
|
65
65
|
3. Define slice-level verification: the objective stopping condition. Plan real test files with real assertions; for simple slices, executable commands are fine.
|
|
66
66
|
4. For non-trivial slices, plan observability / proof level / integration closure, threat surface, and requirement impact. Omit entirely for simple slices.
|
|
67
|
-
5. Decompose the slice into tasks that fit one context window each. Every task must
|
|
67
|
+
5. Decompose the slice into tasks that fit one context window each. Every task passed to `gsd_plan_slice` must use the exact keys `taskId`, `title`, `description`, `estimate`, `files`, `verify`, `inputs`, `expectedOutput`, and optional `observabilityImpact`. Put Why / Do / Done-when detail in `description`. `files`, `inputs`, and `expectedOutput` must be JSON arrays of strings, even for one path (for example, `"expectedOutput": ["src/index.ts"]`, never `"expectedOutput": "src/index.ts"`).
|
|
68
68
|
6. **Persist planning state through `gsd_plan_slice`.** Call it with the full payload. The tool writes to the DB and renders `{{outputPath}}` and `{{slicePath}}/tasks/T##-PLAN.md` automatically. Do NOT rely on direct `PLAN.md` writes.
|
|
69
69
|
7. **Self-audit the plan.** If every task were completed exactly as written, the slice goal/demo should be true. Every must-have maps to a task. Inputs and Expected Output are backtick-wrapped file paths.
|
|
70
|
-
8. If refinement produced structural decisions that diverge from the sketch,
|
|
70
|
+
8. If refinement produced structural decisions that diverge from the sketch, call `gsd_decision_save` for each; the tool persists the decision and regenerates `.gsd/DECISIONS.md`.
|
|
71
71
|
9. {{commitInstruction}}
|
|
72
72
|
|
|
73
73
|
The slice directory and tasks/ subdirectory already exist. Do NOT mkdir.
|
|
@@ -23,7 +23,7 @@ An override was issued by the user that changes a fundamental decision or approa
|
|
|
23
23
|
- For DECISIONS.md: append a new decision entry documenting the override and why. Do NOT delete prior decisions — mark them as superseded with a note.
|
|
24
24
|
- For slice plans (S##-PLAN.md): update Goal, Demo, and Verification sections if affected. Update Files Likely Touched if the override changes scope. Do NOT modify completed task entries.
|
|
25
25
|
- For REQUIREMENTS.md: update requirement descriptions if the override changes what "done" means, but do not remove requirements.
|
|
26
|
-
- For PROJECT.md:
|
|
26
|
+
- For PROJECT.md: do not edit the projection directly. If the override changes project-level facts, persist the revised Project content through `gsd_summary_save` with `artifact_type: "PROJECT"` so the DB remains authoritative.
|
|
27
27
|
- Milestone context files are reference only — do not modify them.
|
|
28
28
|
4. Mark all active overrides as resolved: change `**Scope:** active` to `**Scope:** resolved` in `{{overridesPath}}`
|
|
29
29
|
5. Do not commit manually — the system auto-commits your changes after this unit completes.
|
|
@@ -43,6 +43,7 @@ export async function showQueueReorder(
|
|
|
43
43
|
const items = [...pending];
|
|
44
44
|
let cursor = 0;
|
|
45
45
|
let grabbed = false;
|
|
46
|
+
let scrollOffset = 0;
|
|
46
47
|
let cachedLines: string[] | undefined;
|
|
47
48
|
let validation: DependencyValidation;
|
|
48
49
|
|
|
@@ -154,8 +155,10 @@ export async function showQueueReorder(
|
|
|
154
155
|
|
|
155
156
|
const ui = makeUI(theme, width);
|
|
156
157
|
const lines: string[] = [];
|
|
158
|
+
const queueRows: string[] = [];
|
|
157
159
|
const push = (...rows: string[][]) => { for (const r of rows) lines.push(...r); };
|
|
158
160
|
const add = (s: string) => truncateToWidth(s, width);
|
|
161
|
+
let cursorQueueRow = 0;
|
|
159
162
|
|
|
160
163
|
const headerText = grabbed ? " Queue Reorder — Moving Item" : " Queue Reorder";
|
|
161
164
|
push(ui.bar(), ui.blank(), ui.header(headerText), ui.blank());
|
|
@@ -188,11 +191,13 @@ export async function showQueueReorder(
|
|
|
188
191
|
const label = item.title && item.title !== item.id ? `${item.id} ${item.title}` : item.id;
|
|
189
192
|
|
|
190
193
|
if (isCursor && grabbed) {
|
|
191
|
-
|
|
194
|
+
cursorQueueRow = queueRows.length;
|
|
195
|
+
queueRows.push(add(` ${theme.fg("warning", `▸▸ ${num}. ${label}`)}`));
|
|
192
196
|
} else if (isCursor) {
|
|
193
|
-
|
|
197
|
+
cursorQueueRow = queueRows.length;
|
|
198
|
+
queueRows.push(add(` ${theme.fg("accent", `${GLYPH.cursor} ${num}. ${label}`)}`));
|
|
194
199
|
} else {
|
|
195
|
-
|
|
200
|
+
queueRows.push(add(` ${theme.fg("text", `${num}. ${label}`)}`));
|
|
196
201
|
}
|
|
197
202
|
|
|
198
203
|
// depends_on annotations
|
|
@@ -201,36 +206,37 @@ export async function showQueueReorder(
|
|
|
201
206
|
if (completedIds.has(dep)) continue;
|
|
202
207
|
const pairKey = `${item.id}:${dep}`;
|
|
203
208
|
if (violatedPairs.has(pairKey)) {
|
|
204
|
-
|
|
209
|
+
queueRows.push(add(` ${theme.fg("warning", `${GLYPH.statusWarning} depends_on: ${dep} — auto-removed on confirm`)}`));
|
|
205
210
|
} else if (redundantPairs.has(pairKey)) {
|
|
206
|
-
|
|
211
|
+
queueRows.push(add(` ${theme.fg("dim", `↳ depends_on: ${dep} (redundant)`)}`));
|
|
207
212
|
} else {
|
|
208
|
-
|
|
213
|
+
queueRows.push(add(` ${theme.fg("dim", `↳ depends_on: ${dep}`)}`));
|
|
209
214
|
}
|
|
210
215
|
}
|
|
211
216
|
|
|
212
217
|
// Missing deps
|
|
213
218
|
for (const v of validation.violations.filter(v => v.milestone === item.id && v.type === 'missing_dep')) {
|
|
214
|
-
|
|
219
|
+
queueRows.push(add(` ${theme.fg("error", `${GLYPH.statusWarning} depends_on: ${v.dependsOn} (does not exist)`)}`));
|
|
215
220
|
}
|
|
216
221
|
}
|
|
217
222
|
|
|
218
223
|
// Removed deps feedback
|
|
224
|
+
const trailingLines: string[] = [];
|
|
219
225
|
if (removedDeps.length > 0) {
|
|
220
|
-
push(ui.blank());
|
|
226
|
+
trailingLines.push(...ui.blank());
|
|
221
227
|
for (const r of removedDeps) {
|
|
222
|
-
|
|
228
|
+
trailingLines.push(add(` ${theme.fg("success", `${GLYPH.statusDone} Removed: ${r.milestone} depends_on ${r.dep}`)}`));
|
|
223
229
|
}
|
|
224
230
|
}
|
|
225
231
|
|
|
226
232
|
// Circular warning
|
|
227
233
|
const circ = validation.violations.find(v => v.type === 'circular');
|
|
228
234
|
if (circ) {
|
|
229
|
-
push(ui.blank());
|
|
230
|
-
|
|
235
|
+
trailingLines.push(...ui.blank());
|
|
236
|
+
trailingLines.push(add(` ${theme.fg("error", `${GLYPH.statusWarning} ${circ.message}`)}`));
|
|
231
237
|
}
|
|
232
238
|
|
|
233
|
-
push(ui.blank());
|
|
239
|
+
trailingLines.push(...ui.blank());
|
|
234
240
|
|
|
235
241
|
// Hints — context-sensitive based on grab state
|
|
236
242
|
const hints: string[] = [];
|
|
@@ -250,7 +256,19 @@ export async function showQueueReorder(
|
|
|
250
256
|
}
|
|
251
257
|
hints.push("esc");
|
|
252
258
|
|
|
253
|
-
push(ui.hints(hints), ui.bar());
|
|
259
|
+
trailingLines.push(...ui.hints(hints), ...ui.bar());
|
|
260
|
+
|
|
261
|
+
const maxOverlayRows = Math.max(10, process.stdout.rows ? Math.floor(process.stdout.rows * 0.8) : 24);
|
|
262
|
+
const availableQueueRows = Math.max(1, maxOverlayRows - lines.length - trailingLines.length);
|
|
263
|
+
const maxScroll = Math.max(0, queueRows.length - availableQueueRows);
|
|
264
|
+
if (cursorQueueRow < scrollOffset) {
|
|
265
|
+
scrollOffset = cursorQueueRow;
|
|
266
|
+
} else if (cursorQueueRow >= scrollOffset + availableQueueRows) {
|
|
267
|
+
scrollOffset = cursorQueueRow - availableQueueRows + 1;
|
|
268
|
+
}
|
|
269
|
+
scrollOffset = Math.min(Math.max(scrollOffset, 0), maxScroll);
|
|
270
|
+
|
|
271
|
+
lines.push(...queueRows.slice(scrollOffset, scrollOffset + availableQueueRows), ...trailingLines);
|
|
254
272
|
|
|
255
273
|
cachedLines = lines;
|
|
256
274
|
return lines;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// GSD-2 + Repository registry seam for parent workspace multi-repo resolution.
|
|
2
|
+
|
|
3
|
+
import { isAbsolute, relative, resolve } from "node:path";
|
|
4
|
+
import type { GSDPreferences, WorkspacePreferences, WorkspaceRepositoryPreference } from "./preferences-types.js";
|
|
5
|
+
import { resolveGsdPathContract } from "./paths.js";
|
|
6
|
+
|
|
7
|
+
export interface RegisteredRepository {
|
|
8
|
+
id: string;
|
|
9
|
+
root: string;
|
|
10
|
+
role?: string;
|
|
11
|
+
verification?: string[];
|
|
12
|
+
commitPolicy?: "auto" | "skip";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface RepositoryRegistry {
|
|
16
|
+
projectRoot: string;
|
|
17
|
+
mode: "project" | "parent";
|
|
18
|
+
repositories: RegisteredRepository[];
|
|
19
|
+
byId: ReadonlyMap<string, RegisteredRepository>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function assertInsideProjectRoot(projectRoot: string, candidateRoot: string, repoId: string): void {
|
|
23
|
+
const rel = relative(projectRoot, candidateRoot);
|
|
24
|
+
if (rel === "") return;
|
|
25
|
+
if (rel.startsWith("..") || isAbsolute(rel)) {
|
|
26
|
+
throw new Error(`workspace.repositories.${repoId}.path resolves outside project root: ${candidateRoot}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function resolveRepositoryRoot(
|
|
31
|
+
projectRoot: string,
|
|
32
|
+
repoId: string,
|
|
33
|
+
repo: WorkspaceRepositoryPreference,
|
|
34
|
+
): RegisteredRepository {
|
|
35
|
+
const root = resolve(projectRoot, repo.path);
|
|
36
|
+
assertInsideProjectRoot(projectRoot, root, repoId);
|
|
37
|
+
return {
|
|
38
|
+
id: repoId,
|
|
39
|
+
root,
|
|
40
|
+
role: repo.role,
|
|
41
|
+
verification: repo.verification,
|
|
42
|
+
commitPolicy: repo.commit_policy,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function createRepositoryRegistry(
|
|
47
|
+
basePath: string,
|
|
48
|
+
workspacePrefs?: WorkspacePreferences,
|
|
49
|
+
): RepositoryRegistry {
|
|
50
|
+
const contract = resolveGsdPathContract(basePath);
|
|
51
|
+
const projectRoot = contract.projectRoot;
|
|
52
|
+
const mode = workspacePrefs?.mode ?? "project";
|
|
53
|
+
const repoMap = new Map<string, RegisteredRepository>();
|
|
54
|
+
|
|
55
|
+
// Backward-compatible default for single-repo projects.
|
|
56
|
+
// Explicit workspacePrefs?.repositories entries can override "project"
|
|
57
|
+
// via resolveRepositoryRoot to customize role/verification/commit policy.
|
|
58
|
+
repoMap.set("project", { id: "project", root: projectRoot });
|
|
59
|
+
|
|
60
|
+
for (const [repoId, repoConfig] of Object.entries(workspacePrefs?.repositories ?? {})) {
|
|
61
|
+
repoMap.set(repoId, resolveRepositoryRoot(projectRoot, repoId, repoConfig));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
projectRoot,
|
|
66
|
+
mode,
|
|
67
|
+
repositories: Array.from(repoMap.values()),
|
|
68
|
+
byId: repoMap,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function createRepositoryRegistryFromPreferences(
|
|
73
|
+
basePath: string,
|
|
74
|
+
preferences?: Pick<GSDPreferences, "workspace">,
|
|
75
|
+
): RepositoryRegistry {
|
|
76
|
+
return createRepositoryRegistry(basePath, preferences?.workspace);
|
|
77
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
/**
|
|
2
3
|
* Evidence cross-reference for auto-mode safety harness.
|
|
3
4
|
* Compares the LLM's claimed verification evidence (command + exitCode)
|
|
@@ -14,6 +15,7 @@ export interface ClaimedEvidence {
|
|
|
14
15
|
command: string;
|
|
15
16
|
exitCode: number;
|
|
16
17
|
verdict: string;
|
|
18
|
+
createdAt?: string;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export interface EvidenceMismatch {
|
|
@@ -40,7 +42,7 @@ export function crossReferenceEvidence(
|
|
|
40
42
|
);
|
|
41
43
|
const mismatches: EvidenceMismatch[] = [];
|
|
42
44
|
|
|
43
|
-
for (const claimed of claimedEvidence) {
|
|
45
|
+
for (const claimed of latestClaimBatch(claimedEvidence)) {
|
|
44
46
|
// Skip coerced entries — they're already flagged with exitCode: -1
|
|
45
47
|
// and verdict: "unknown (coerced from string)" by db-tools.ts
|
|
46
48
|
if (claimed.verdict?.includes("coerced from string")) continue;
|
|
@@ -49,10 +51,12 @@ export function crossReferenceEvidence(
|
|
|
49
51
|
// Skip entries with empty or generic commands
|
|
50
52
|
if (!claimed.command || claimed.command.length < 3) continue;
|
|
51
53
|
|
|
52
|
-
// Find matching bash
|
|
53
|
-
|
|
54
|
+
// Find matching bash calls by command similarity. A command may be retried
|
|
55
|
+
// after a failed first run; the newest matching execution is the one that
|
|
56
|
+
// supports or rejects a claimed pass.
|
|
57
|
+
const matches = findMatches(claimed.command, bashCalls);
|
|
54
58
|
|
|
55
|
-
if (
|
|
59
|
+
if (matches.length === 0) {
|
|
56
60
|
mismatches.push({
|
|
57
61
|
severity: "warning",
|
|
58
62
|
claimed,
|
|
@@ -63,6 +67,7 @@ export function crossReferenceEvidence(
|
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
// Exit code mismatch: LLM claims success but actual command failed
|
|
70
|
+
const match = latestMatch(matches);
|
|
66
71
|
if (claimed.exitCode === 0 && match.exitCode !== 0) {
|
|
67
72
|
mismatches.push({
|
|
68
73
|
severity: "error",
|
|
@@ -79,42 +84,72 @@ export function crossReferenceEvidence(
|
|
|
79
84
|
// ─── Internals ──────────────────────────────────────────────────────────────
|
|
80
85
|
|
|
81
86
|
/**
|
|
82
|
-
*
|
|
87
|
+
* Verification evidence rows are append-only across retries, but a task
|
|
88
|
+
* completion inserts one batch at a single created_at timestamp. When that
|
|
89
|
+
* timestamp is present, safety should judge the newest completion claim only.
|
|
90
|
+
*/
|
|
91
|
+
function latestClaimBatch(
|
|
92
|
+
claimedEvidence: readonly ClaimedEvidence[],
|
|
93
|
+
): readonly ClaimedEvidence[] {
|
|
94
|
+
const dated = claimedEvidence
|
|
95
|
+
.map((claim) => ({
|
|
96
|
+
claim,
|
|
97
|
+
time: typeof claim.createdAt === "string" ? Date.parse(claim.createdAt) : Number.NaN,
|
|
98
|
+
}))
|
|
99
|
+
.filter((entry) => Number.isFinite(entry.time));
|
|
100
|
+
|
|
101
|
+
if (dated.length === 0) return claimedEvidence;
|
|
102
|
+
|
|
103
|
+
const latestTime = Math.max(...dated.map((entry) => entry.time));
|
|
104
|
+
return claimedEvidence.filter((claim) => (
|
|
105
|
+
typeof claim.createdAt === "string" && Date.parse(claim.createdAt) === latestTime
|
|
106
|
+
));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Find bash evidence entries matching a claimed command.
|
|
83
111
|
* Uses substring matching — the claimed command may be a shortened version
|
|
84
112
|
* of the actual command, or vice versa.
|
|
85
113
|
*/
|
|
86
|
-
function
|
|
114
|
+
function findMatches(
|
|
87
115
|
claimedCommand: string,
|
|
88
116
|
bashCalls: readonly BashEvidence[],
|
|
89
|
-
): BashEvidence
|
|
117
|
+
): BashEvidence[] {
|
|
90
118
|
const normalized = claimedCommand.trim();
|
|
91
119
|
|
|
92
|
-
// Exact
|
|
93
|
-
const exact = bashCalls.
|
|
94
|
-
if (exact) return exact;
|
|
120
|
+
// Exact matches first
|
|
121
|
+
const exact = bashCalls.filter(b => b.command.trim() === normalized);
|
|
122
|
+
if (exact.length > 0) return exact;
|
|
95
123
|
|
|
96
124
|
// Substring match: claimed is contained in actual or actual in claimed
|
|
97
|
-
const substring = bashCalls.
|
|
125
|
+
const substring = bashCalls.filter(
|
|
98
126
|
b => b.command.includes(normalized) || normalized.includes(b.command),
|
|
99
127
|
);
|
|
100
|
-
if (substring) return substring;
|
|
128
|
+
if (substring.length > 0) return substring;
|
|
101
129
|
|
|
102
130
|
// Token match: split on whitespace and check significant overlap
|
|
103
131
|
const claimedTokens = normalized.split(/\s+/).filter(t => t.length > 2);
|
|
104
|
-
if (claimedTokens.length === 0) return
|
|
132
|
+
if (claimedTokens.length === 0) return [];
|
|
105
133
|
|
|
106
|
-
|
|
107
|
-
let bestScore = 0;
|
|
134
|
+
const scoredMatches: Array<{ call: BashEvidence; score: number }> = [];
|
|
108
135
|
|
|
109
136
|
for (const call of bashCalls) {
|
|
110
137
|
const callTokens = new Set(call.command.split(/\s+/));
|
|
111
138
|
const matchCount = claimedTokens.filter(t => callTokens.has(t)).length;
|
|
112
139
|
const score = matchCount / claimedTokens.length;
|
|
113
|
-
if (score
|
|
114
|
-
|
|
115
|
-
bestMatch = call;
|
|
140
|
+
if (score >= 0.5) {
|
|
141
|
+
scoredMatches.push({ call, score });
|
|
116
142
|
}
|
|
117
143
|
}
|
|
118
144
|
|
|
119
|
-
|
|
145
|
+
const bestScore = Math.max(0, ...scoredMatches.map((match) => match.score));
|
|
146
|
+
return scoredMatches
|
|
147
|
+
.filter((match) => match.score === bestScore)
|
|
148
|
+
.map((match) => match.call);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function latestMatch(matches: readonly BashEvidence[]): BashEvidence {
|
|
152
|
+
return matches.reduce((latest, match) => (
|
|
153
|
+
match.timestamp > latest.timestamp ? match : latest
|
|
154
|
+
));
|
|
120
155
|
}
|
|
@@ -18,13 +18,15 @@ import { randomUUID } from "node:crypto";
|
|
|
18
18
|
import {
|
|
19
19
|
appendFileSync,
|
|
20
20
|
existsSync,
|
|
21
|
+
lstatSync,
|
|
22
|
+
rmSync,
|
|
21
23
|
writeFileSync,
|
|
22
24
|
readFileSync,
|
|
23
25
|
mkdirSync,
|
|
24
26
|
renameSync,
|
|
25
27
|
unlinkSync,
|
|
26
28
|
} from "node:fs";
|
|
27
|
-
import { join, dirname } from "node:path";
|
|
29
|
+
import { isAbsolute, join, dirname, resolve } from "node:path";
|
|
28
30
|
import { fileURLToPath } from "node:url";
|
|
29
31
|
import { gsdRoot } from "./paths.js";
|
|
30
32
|
import { createWorktree, worktreePath, removeWorktree } from "./worktree-manager.js";
|
|
@@ -105,6 +107,37 @@ export function _buildSliceWorkerEnvForTest(
|
|
|
105
107
|
};
|
|
106
108
|
}
|
|
107
109
|
|
|
110
|
+
function isValidSliceWorktreePath(basePath: string, wtPath: string): boolean {
|
|
111
|
+
if (!existsSync(wtPath)) return false;
|
|
112
|
+
const gitPath = join(wtPath, ".git");
|
|
113
|
+
if (!existsSync(gitPath)) return false;
|
|
114
|
+
try {
|
|
115
|
+
if (!lstatSync(gitPath).isFile()) return false;
|
|
116
|
+
const content = readFileSync(gitPath, "utf8").trim();
|
|
117
|
+
if (!content.startsWith("gitdir: ")) return false;
|
|
118
|
+
const rawGitdir = content.slice("gitdir: ".length).trim();
|
|
119
|
+
if (!rawGitdir) return false;
|
|
120
|
+
const resolvedGitdir = isAbsolute(rawGitdir) ? rawGitdir : resolve(wtPath, rawGitdir);
|
|
121
|
+
const expectedPrefix = join(basePath, ".git", "worktrees").replaceAll("\\", "/");
|
|
122
|
+
const normalized = resolvedGitdir.replaceAll("\\", "/");
|
|
123
|
+
return normalized === expectedPrefix || normalized.startsWith(`${expectedPrefix}/`);
|
|
124
|
+
} catch {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function isWorkerPidAlive(pid: number): boolean {
|
|
130
|
+
if (!Number.isFinite(pid) || pid <= 0) return false;
|
|
131
|
+
try {
|
|
132
|
+
process.kill(pid, 0);
|
|
133
|
+
return true;
|
|
134
|
+
} catch (err) {
|
|
135
|
+
const code = (err as NodeJS.ErrnoException)?.code;
|
|
136
|
+
if (code === "ESRCH") return false;
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
108
141
|
interface PersistedSliceWorker {
|
|
109
142
|
milestoneId: string;
|
|
110
143
|
sliceId: string;
|
|
@@ -427,6 +460,9 @@ export async function startSliceParallel(
|
|
|
427
460
|
const wtName = `${milestoneId}-${slice.id}`;
|
|
428
461
|
const wtPath = worktreePath(basePath, wtName);
|
|
429
462
|
|
|
463
|
+
if (existsSync(wtPath) && !isValidSliceWorktreePath(basePath, wtPath)) {
|
|
464
|
+
rmSync(wtPath, { recursive: true, force: true });
|
|
465
|
+
}
|
|
430
466
|
if (!existsSync(wtPath)) {
|
|
431
467
|
createWorktree(basePath, wtName, { branch: wtBranch });
|
|
432
468
|
}
|
|
@@ -470,6 +506,21 @@ export async function startSliceParallel(
|
|
|
470
506
|
}
|
|
471
507
|
}
|
|
472
508
|
|
|
509
|
+
// Guard: if workers died immediately, treat as failed start so callers
|
|
510
|
+
// don't exit auto-mode and re-dispatch in a rapid loop.
|
|
511
|
+
for (let i = started.length - 1; i >= 0; i--) {
|
|
512
|
+
const sid = started[i];
|
|
513
|
+
const worker = sliceState.workers.get(sid);
|
|
514
|
+
if (worker && isWorkerPidAlive(worker.pid)) continue;
|
|
515
|
+
started.splice(i, 1);
|
|
516
|
+
errors.push({ sid, error: "Worker exited immediately after spawn" });
|
|
517
|
+
sliceState.workers.delete(sid);
|
|
518
|
+
const wtName = `${milestoneId}-${sid}`;
|
|
519
|
+
try {
|
|
520
|
+
removeWorktree(basePath, wtName, { deleteBranch: true, force: true });
|
|
521
|
+
} catch { /* ignore cleanup failures */ }
|
|
522
|
+
}
|
|
523
|
+
|
|
473
524
|
// If nothing started, deactivate
|
|
474
525
|
if (started.length === 0) {
|
|
475
526
|
sliceState.active = false;
|