gsd-pi 2.68.0 → 2.68.1-dev.58193fa
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 +66 -70
- package/dist/resources/extensions/gsd/auto-model-selection.js +27 -1
- package/dist/resources/extensions/gsd/auto.js +8 -2
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +7 -0
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +1 -5
- package/dist/resources/extensions/gsd/codebase-generator.js +12 -0
- package/dist/resources/extensions/gsd/guided-flow.js +25 -70
- package/dist/resources/extensions/gsd/model-router.js +85 -2
- package/dist/resources/extensions/gsd/prompts/discuss.md +2 -0
- package/dist/resources/extensions/gsd/templates/context.md +34 -2
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +16 -16
- 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/required-server-files.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- 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_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 +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- 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 +3 -3
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/page.js +2 -2
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +16 -16
- package/dist/web/standalone/.next/server/chunks/63.js +3 -3
- package/dist/web/standalone/.next/server/chunks/6897.js +1 -1
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware.js +2 -2
- 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/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-f1e30ab6bb269149.js +1 -0
- package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/server.js +1 -1
- package/package.json +1 -1
- package/packages/pi-ai/dist/index.d.ts +3 -0
- package/packages/pi-ai/dist/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/index.js +2 -0
- package/packages/pi-ai/dist/index.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.js +2 -2
- package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +2 -2
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-shared.js +2 -2
- package/packages/pi-ai/dist/providers/google-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/mistral.js +2 -2
- package/packages/pi-ai/dist/providers/mistral.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.js +2 -2
- package/packages/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses-shared.js +2 -2
- package/packages/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/provider-capabilities.d.ts +59 -0
- package/packages/pi-ai/dist/providers/provider-capabilities.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/provider-capabilities.js +173 -0
- package/packages/pi-ai/dist/providers/provider-capabilities.js.map +1 -0
- package/packages/pi-ai/dist/providers/provider-capabilities.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/provider-capabilities.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/provider-capabilities.test.js +132 -0
- package/packages/pi-ai/dist/providers/provider-capabilities.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/transform-messages-report.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/transform-messages-report.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/transform-messages-report.test.js +172 -0
- package/packages/pi-ai/dist/providers/transform-messages-report.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/transform-messages.d.ts +34 -1
- package/packages/pi-ai/dist/providers/transform-messages.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/transform-messages.js +73 -2
- package/packages/pi-ai/dist/providers/transform-messages.js.map +1 -1
- package/packages/pi-ai/src/index.ts +3 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.ts +2 -2
- package/packages/pi-ai/src/providers/anthropic-shared.ts +2 -2
- package/packages/pi-ai/src/providers/google-shared.ts +2 -2
- package/packages/pi-ai/src/providers/mistral.ts +2 -2
- package/packages/pi-ai/src/providers/openai-completions.ts +2 -2
- package/packages/pi-ai/src/providers/openai-responses-shared.ts +2 -2
- package/packages/pi-ai/src/providers/provider-capabilities.test.ts +174 -0
- package/packages/pi-ai/src/providers/provider-capabilities.ts +215 -0
- package/packages/pi-ai/src/providers/transform-messages-report.test.ts +189 -0
- package/packages/pi-ai/src/providers/transform-messages.ts +94 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +10 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +2 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +15 -0
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +41 -0
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/tools/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/index.js +1 -0
- package/packages/pi-coding-agent/dist/core/tools/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/tool-compatibility-registry.d.ts +27 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-compatibility-registry.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-compatibility-registry.js +69 -0
- package/packages/pi-coding-agent/dist/core/tools/tool-compatibility-registry.js.map +1 -0
- package/packages/pi-coding-agent/dist/index.d.ts +2 -2
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +3 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/extensions/index.ts +4 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +11 -1
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +18 -0
- package/packages/pi-coding-agent/src/core/extensions/types.ts +45 -0
- package/packages/pi-coding-agent/src/core/tools/index.ts +7 -0
- package/packages/pi-coding-agent/src/core/tools/tool-compatibility-registry.ts +83 -0
- package/packages/pi-coding-agent/src/index.ts +9 -0
- package/pkg/package.json +1 -1
- package/src/resources/extensions/gsd/auto-model-selection.ts +36 -4
- package/src/resources/extensions/gsd/auto.ts +8 -2
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +8 -0
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +1 -5
- package/src/resources/extensions/gsd/codebase-generator.ts +16 -0
- package/src/resources/extensions/gsd/guided-flow.ts +22 -84
- package/src/resources/extensions/gsd/model-router.ts +117 -10
- package/src/resources/extensions/gsd/preferences-types.ts +3 -1
- package/src/resources/extensions/gsd/prompts/discuss.md +2 -0
- package/src/resources/extensions/gsd/templates/context.md +34 -2
- package/src/resources/extensions/gsd/tests/capability-router.test.ts +31 -7
- package/src/resources/extensions/gsd/tests/codebase-generator.test.ts +28 -0
- package/src/resources/extensions/gsd/tests/discord-invite-links.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/model-router.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/resource-loader-import-path.test.ts +37 -0
- package/src/resources/extensions/gsd/tests/tool-compatibility.test.ts +199 -0
- package/src/resources/extensions/gsd/tests/write-gate.test.ts +13 -16
- package/dist/resources/extensions/gsd/prompt-validation.js +0 -67
- package/dist/resources/extensions/gsd/prompts/discuss-prepared.md +0 -424
- package/dist/resources/extensions/gsd/templates/context-enhanced.md +0 -138
- package/dist/web/standalone/.next/static/chunks/app/page-7115e62689b5fd84.js +0 -1
- package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
- package/src/resources/extensions/gsd/prompt-validation.ts +0 -88
- package/src/resources/extensions/gsd/prompts/discuss-prepared.md +0 -424
- package/src/resources/extensions/gsd/templates/context-enhanced.md +0 -138
- package/src/resources/extensions/gsd/tests/adversarial-review-fixes.test.ts +0 -223
- package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +0 -53
- package/src/resources/extensions/gsd/tests/integration-prepared-discussion.test.ts +0 -525
- package/src/resources/extensions/gsd/tests/preparation.test.ts +0 -1211
- package/src/resources/extensions/gsd/tests/prompt-builder.test.ts +0 -669
- /package/dist/web/standalone/.next/static/{ka3ShQTakcliYL-EXRRb6 → YFZaRxYFkrifCiWU3AcrJ}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{ka3ShQTakcliYL-EXRRb6 → YFZaRxYFkrifCiWU3AcrJ}/_ssgManifest.js +0 -0
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
{{preamble}}
|
|
2
|
-
|
|
3
|
-
You are conducting a **prepared discussion** — the system has already analyzed the codebase, gathered prior context, and researched the ecosystem. Your job is to present these findings, make recommendations, and gather the user's input through a structured 4-layer protocol.
|
|
4
|
-
|
|
5
|
-
## Preparation Briefs
|
|
6
|
-
|
|
7
|
-
The following briefs were generated during the preparation phase. Use them to ground your recommendations.
|
|
8
|
-
|
|
9
|
-
### Codebase Brief
|
|
10
|
-
|
|
11
|
-
{{codebaseBrief}}
|
|
12
|
-
|
|
13
|
-
### Prior Context Brief
|
|
14
|
-
|
|
15
|
-
{{priorContextBrief}}
|
|
16
|
-
|
|
17
|
-
### Ecosystem Brief
|
|
18
|
-
|
|
19
|
-
{{ecosystemBrief}}
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 4-Layer Discussion Protocol
|
|
24
|
-
|
|
25
|
-
This discussion proceeds through four mandatory layers. At each layer:
|
|
26
|
-
1. **Present findings** — share what the preparation revealed
|
|
27
|
-
2. **Make a recommendation** — take a position based on the evidence
|
|
28
|
-
3. **Ask clarifying questions** — fill gaps the preparation couldn't answer
|
|
29
|
-
4. **Gate** — use `ask_user_questions` to get explicit sign-off before advancing
|
|
30
|
-
|
|
31
|
-
**Do NOT skip layers.** Each layer builds on the previous. The user must explicitly approve each layer before you proceed.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Depth Adaptation
|
|
36
|
-
|
|
37
|
-
The depth of questioning at each layer should match THIS milestone's work type. Do not apply a fixed checklist — reason from first principles about what matters for this specific work.
|
|
38
|
-
|
|
39
|
-
**Work-type reasoning:**
|
|
40
|
-
- **API/service work** — Focus Layer 2 questions on contracts, versioning, backwards compatibility, authentication boundaries. Layer 3 must cover rate limiting, timeout cascades, and partial failure states.
|
|
41
|
-
- **CLI/developer tools** — Focus Layer 1 on user mental model and command grammar. Layer 4 needs shell compatibility, error message clarity, and exit code semantics.
|
|
42
|
-
- **ML/data pipelines** — Focus Layer 2 on data flow, reproducibility, and intermediate state. Layer 3 must cover data corruption, training divergence, and checkpoint recovery.
|
|
43
|
-
- **UI/frontend work** — Focus Layer 2 on component boundaries and state management. Layer 3 needs loading states, optimistic updates, and offline behavior. Layer 4 must include visual regression criteria.
|
|
44
|
-
- **Infrastructure/platform** — Focus Layer 2 on deployment topology and failure domains. Layer 3 must cover cascading failures, resource exhaustion, and rollback paths.
|
|
45
|
-
- **Refactoring/migration** — Focus Layer 1 on what changes vs what must stay identical. Layer 4 needs behavioral equivalence tests, not just code coverage.
|
|
46
|
-
|
|
47
|
-
**Adaptation principle:** Ask "What would cause this milestone to fail silently or succeed incorrectly?" The answer shapes which questions deserve deep exploration vs quick confirmation.
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## Layer 1 — Scope (What are we building?)
|
|
52
|
-
|
|
53
|
-
### Identify Work Type
|
|
54
|
-
|
|
55
|
-
**Before presenting findings, identify the primary work type and state it explicitly:**
|
|
56
|
-
|
|
57
|
-
"Based on [user's request and codebase analysis], this milestone is primarily **[work type]** work (e.g., API/backend, UI/frontend, CLI tool, data pipeline, simulation, infrastructure)."
|
|
58
|
-
|
|
59
|
-
This classification determines the depth and focus of questioning at each layer. If the work type spans multiple categories, state the dominant type and note the secondary types. The user can correct this classification.
|
|
60
|
-
|
|
61
|
-
### Present Findings
|
|
62
|
-
|
|
63
|
-
Start by presenting what you learned from the preparation:
|
|
64
|
-
|
|
65
|
-
1. **From the Codebase Brief:** Summarize the technology stack, key modules, and established patterns. Call out anything that constrains or enables the proposed work.
|
|
66
|
-
|
|
67
|
-
2. **From the Prior Context Brief:** Surface existing decisions, requirements, and knowledge that are relevant. Note any prior commitments or constraints.
|
|
68
|
-
|
|
69
|
-
3. **Scope implications:** Based on the above, explain what scope makes sense and what would conflict with the existing codebase.
|
|
70
|
-
|
|
71
|
-
### Make a Recommendation
|
|
72
|
-
|
|
73
|
-
Take a clear position: "Based on [specific findings], I recommend the milestone scope as [concrete description]."
|
|
74
|
-
|
|
75
|
-
Include:
|
|
76
|
-
- What the milestone will deliver (user-visible outcome)
|
|
77
|
-
- What it explicitly excludes (to prevent scope creep)
|
|
78
|
-
- Rough size estimate (number of slices, complexity)
|
|
79
|
-
|
|
80
|
-
### Resolve Scope — Mandatory Rounds
|
|
81
|
-
|
|
82
|
-
After presenting your recommendation, you MUST complete these rounds in order. Each round uses `ask_user_questions` or direct questions. Do NOT skip rounds. Do NOT combine rounds. Do NOT jump to the Layer 1 Gate until all rounds are complete.
|
|
83
|
-
|
|
84
|
-
**Complexity calibration:** If the milestone is simple (1-2 slices, well-understood patterns, no ambiguity), you may compress rounds — but you must still explicitly address each round's topic, even if briefly. You may NOT skip rounds entirely. For complex milestones (3+ slices, novel architecture, significant ambiguity), give each round full treatment.
|
|
85
|
-
|
|
86
|
-
**Round 1 — Feature boundaries:**
|
|
87
|
-
For each feature in your recommendation, state what it includes and excludes. Ask the user to confirm or adjust each boundary. Example: "Signup — I'm including email/password registration. I'm excluding OAuth, email verification, and phone number signup. Correct?"
|
|
88
|
-
|
|
89
|
-
**Round 2 — Ambiguity resolution:**
|
|
90
|
-
Identify every term or concept in the scope that could be interpreted multiple ways. For each one, state the two most likely interpretations and ask which the user intends. Example: "'User authentication' — do you mean just login/signup, or also session management, token refresh, and logout?"
|
|
91
|
-
|
|
92
|
-
**Round 3 — Dependencies and constraints:**
|
|
93
|
-
Ask about external dependencies (APIs, services, databases), existing code that will be affected, and constraints the user hasn't mentioned. Reference specific findings from the codebase brief. Example: "Your db.ts already has a getUser() function — should signup create users compatible with this existing model?"
|
|
94
|
-
|
|
95
|
-
**Round 4 — Priority and ordering:**
|
|
96
|
-
If the scope has multiple features, ask the user to rank them by priority. Ask what's the minimum viable version if the milestone needs to be cut short. Example: "If we had to ship with only 2 of the 3 slices, which two matter most?"
|
|
97
|
-
|
|
98
|
-
After completing all 4 rounds, proceed to the Layer 1 Gate.
|
|
99
|
-
|
|
100
|
-
### Layer 1 Gate
|
|
101
|
-
|
|
102
|
-
Before advancing, use `ask_user_questions` with question ID containing `layer1_scope_gate`:
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
Header: "Scope Gate"
|
|
106
|
-
Question: "Does this scope capture what you want to build?"
|
|
107
|
-
Options:
|
|
108
|
-
- "Yes, scope is correct (Recommended)" — proceed to Layer 2
|
|
109
|
-
- "Needs adjustment" — user will clarify, then re-present scope
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
**CRITICAL — Non-bypassable gate:** Do NOT proceed to Layer 2 until the user explicitly approves the scope. If `ask_user_questions` fails, errors, returns no response, or the user's response does not match a provided option, you MUST re-ask — never rationalize past the block. "Tool not responding, I'll proceed," "auth issues," or "I'll use my recommended scope" are all **forbidden**. The gate exists to protect the user's work; treat a block as an instruction to wait, not an obstacle to work around.
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## Ecosystem Research (between layers)
|
|
117
|
-
|
|
118
|
-
Before presenting Layer 2 findings, use your available web search tools to research the technologies identified in the Codebase Brief. For each major technology (framework, ORM, key library):
|
|
119
|
-
|
|
120
|
-
1. Search for "[technology] [version] best practices [current year]"
|
|
121
|
-
2. Search for "[technology] [version] known issues"
|
|
122
|
-
|
|
123
|
-
Summarize findings concisely. If search tools fail or are unavailable, note this and proceed using your training knowledge — but do NOT use a search failure as justification to skip any gate.
|
|
124
|
-
|
|
125
|
-
Present ecosystem findings at the start of Layer 2 alongside your architecture recommendation.
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Layer 2 — Architecture (How will it work?)
|
|
130
|
-
|
|
131
|
-
### Present Findings
|
|
132
|
-
|
|
133
|
-
Now present architectural recommendations grounded in evidence:
|
|
134
|
-
|
|
135
|
-
1. **From the Ecosystem Brief:** Share relevant best practices, known issues, library recommendations, and integration patterns discovered during research.
|
|
136
|
-
|
|
137
|
-
2. **From the Codebase Brief:** Identify existing architectural patterns that should be followed or deliberately broken from.
|
|
138
|
-
|
|
139
|
-
3. **Synthesis:** Explain how the ecosystem research applies to this specific codebase context.
|
|
140
|
-
|
|
141
|
-
### Make a Recommendation
|
|
142
|
-
|
|
143
|
-
Take a clear position: "I'd suggest [approach] because [evidence-based rationale]."
|
|
144
|
-
|
|
145
|
-
Cover:
|
|
146
|
-
- Overall architectural approach (new module? extend existing? separate service?)
|
|
147
|
-
- Key technical decisions (which libraries, patterns, data flow)
|
|
148
|
-
- Integration points with existing code
|
|
149
|
-
- What you'd avoid and why
|
|
150
|
-
|
|
151
|
-
### Resolve Architecture — Mandatory Rounds
|
|
152
|
-
|
|
153
|
-
After presenting your recommendation, you MUST complete these rounds in order. Do NOT skip rounds. Do NOT jump to the Layer 2 Gate until all rounds are complete.
|
|
154
|
-
|
|
155
|
-
**Complexity calibration:** If the milestone is simple (1-2 slices, well-understood patterns, no ambiguity), you may compress rounds — but you must still explicitly address each round's topic, even if briefly. You may NOT skip rounds entirely. For complex milestones (3+ slices, novel architecture, significant ambiguity), give each round full treatment.
|
|
156
|
-
|
|
157
|
-
**Round 1 — Per-slice technical decisions:**
|
|
158
|
-
For each slice in your decomposition, state the specific technical approach. Ask the user to confirm or adjust. Don't just say "build the signup endpoint" — state which library handles password hashing, where the route file lives, what the request/response schema looks like.
|
|
159
|
-
|
|
160
|
-
**Round 2 — Inter-slice contracts:**
|
|
161
|
-
For each dependency between slices, state explicitly what the upstream slice produces and what the downstream slice expects. Ask the user to confirm the interface. Example: "S01 produces a User model with {id, email, hashedPassword}. S02's login endpoint will query by email and compare password. Does this contract work?"
|
|
162
|
-
|
|
163
|
-
**Round 3 — Library and pattern decisions:**
|
|
164
|
-
For each library or pattern choice, present at least one alternative with tradeoffs. Ask the user to confirm. Example: "bcrypt vs argon2 for password hashing — bcrypt is more common in Node, argon2 is newer and more resistant to GPU attacks. I recommend bcrypt for simplicity. Agree?"
|
|
165
|
-
|
|
166
|
-
**Round 4 — Integration with existing code:**
|
|
167
|
-
Walk through how the new code connects to existing files and patterns. Ask about anything that might conflict. Reference specific files from the codebase brief. Example: "The new auth routes will mount at /api/auth alongside your existing /api router in routes.ts. Should they share the same router file or get their own auth-routes.ts?"
|
|
168
|
-
|
|
169
|
-
After completing all 4 rounds, proceed to the Layer 2 Gate.
|
|
170
|
-
|
|
171
|
-
### Layer 2 Gate
|
|
172
|
-
|
|
173
|
-
Before advancing, use `ask_user_questions` with question ID containing `layer2_architecture_gate`:
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
Header: "Architecture Gate"
|
|
177
|
-
Question: "Ready to move to error handling, or want to adjust the architecture?"
|
|
178
|
-
Options:
|
|
179
|
-
- "Architecture looks good (Recommended)" — proceed to Layer 3
|
|
180
|
-
- "Want to adjust" — user will clarify, then re-present architecture
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
**CRITICAL — Non-bypassable gate:** Do NOT proceed to Layer 3 until the user explicitly approves the architecture. If `ask_user_questions` fails, errors, returns no response, or the user's response does not match a provided option, you MUST re-ask — never rationalize past the block. The gate exists to protect the user's work; treat a block as an instruction to wait, not an obstacle to work around.
|
|
184
|
-
|
|
185
|
-
---
|
|
186
|
-
|
|
187
|
-
## Layer 3 — Error States (What can go wrong?)
|
|
188
|
-
|
|
189
|
-
### Present Findings
|
|
190
|
-
|
|
191
|
-
Identify failure modes based on the scope and architecture:
|
|
192
|
-
|
|
193
|
-
1. **From the Ecosystem Brief:** Known issues, common pitfalls, edge cases that trip up similar implementations.
|
|
194
|
-
|
|
195
|
-
2. **From the Architecture:** Failure points at integration boundaries, async operations, external dependencies, user input handling.
|
|
196
|
-
|
|
197
|
-
3. **From the Codebase Brief:** How existing code handles errors — patterns to follow, gaps to fill.
|
|
198
|
-
|
|
199
|
-
### Make a Recommendation
|
|
200
|
-
|
|
201
|
-
Take a clear position: "The critical error paths are [X, Y, Z]. I recommend handling them by [approach]."
|
|
202
|
-
|
|
203
|
-
Cover:
|
|
204
|
-
- **Must-handle errors:** Failures that would break the user experience or corrupt data
|
|
205
|
-
- **Should-handle errors:** Degraded experiences that are acceptable with good messaging
|
|
206
|
-
- **Edge cases:** Boundary conditions, malformed input, timing issues
|
|
207
|
-
- **Recovery strategy:** Retry logic, fallback behavior, user notification
|
|
208
|
-
|
|
209
|
-
### Resolve Error Handling — Mandatory Rounds
|
|
210
|
-
|
|
211
|
-
After presenting your recommendation, ask the user:
|
|
212
|
-
|
|
213
|
-
**"Do you want to go deep on error handling, or accept the defaults I recommended?"**
|
|
214
|
-
|
|
215
|
-
Use `ask_user_questions` with options: "Go deep" / "Accept defaults"
|
|
216
|
-
|
|
217
|
-
If they accept defaults, record your recommendations as decisions and proceed to the Layer 3 Gate.
|
|
218
|
-
|
|
219
|
-
If they want to go deep, complete these rounds:
|
|
220
|
-
|
|
221
|
-
**Complexity calibration:** If the milestone is simple, you may compress rounds — but you must still explicitly address each round's topic. You may NOT skip rounds entirely.
|
|
222
|
-
|
|
223
|
-
**Round 1 — Input validation:**
|
|
224
|
-
For each endpoint or entry point, state what input validation happens and what error the user sees for invalid input. Ask the user to confirm. Example: "Signup with missing email returns 400 with {error: 'Email is required'}. Signup with invalid email format returns 400 with {error: 'Invalid email format'}. Right?"
|
|
225
|
-
|
|
226
|
-
**Round 2 — Authentication/authorization failures:**
|
|
227
|
-
For each protected operation, state what happens when auth fails. Ask the user to confirm. Example: "Expired JWT returns 401. Missing JWT returns 401. Malformed JWT returns 401. All three use the same generic message to avoid information leakage. Correct?"
|
|
228
|
-
|
|
229
|
-
**Round 3 — System failures:**
|
|
230
|
-
For each external dependency (database, API, file system), state what happens when it's unavailable. Ask the user to confirm. Example: "If Prisma can't connect to the database, all endpoints return 500 with a generic message. We log the real error server-side but never expose it to the client."
|
|
231
|
-
|
|
232
|
-
After completing all rounds (or accepting defaults), proceed to the Layer 3 Gate.
|
|
233
|
-
|
|
234
|
-
### Layer 3 Gate
|
|
235
|
-
|
|
236
|
-
Before advancing, use `ask_user_questions` with question ID containing `layer3_error_gate`:
|
|
237
|
-
|
|
238
|
-
```
|
|
239
|
-
Header: "Error Handling Gate"
|
|
240
|
-
Question: "Error handling strategy captured. Ready to define the quality bar?"
|
|
241
|
-
Options:
|
|
242
|
-
- "Yes, move to quality bar (Recommended)" — proceed to Layer 4
|
|
243
|
-
- "Want to adjust error handling" — user will clarify, then re-present errors
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
**CRITICAL — Non-bypassable gate:** Do NOT proceed to Layer 4 until the user explicitly approves error handling. If `ask_user_questions` fails, errors, returns no response, or the user's response does not match a provided option, you MUST re-ask — never rationalize past the block. The gate exists to protect the user's work; treat a block as an instruction to wait, not an obstacle to work around.
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## Layer 4 — Quality Bar (What does done mean?)
|
|
251
|
-
|
|
252
|
-
### Present Findings
|
|
253
|
-
|
|
254
|
-
Define what "done" looks like based on everything discussed:
|
|
255
|
-
|
|
256
|
-
1. **Testing requirements:** What must be tested? Unit tests, integration tests, E2E tests? Based on the architecture's complexity and risk profile.
|
|
257
|
-
|
|
258
|
-
2. **Acceptance criteria:** Concrete, observable outcomes that prove the milestone is complete. Derived from the scope discussion.
|
|
259
|
-
|
|
260
|
-
3. **Performance/quality constraints:** Based on ecosystem research and codebase patterns — response times, error rates, accessibility requirements.
|
|
261
|
-
|
|
262
|
-
### Make a Recommendation
|
|
263
|
-
|
|
264
|
-
Take a clear position: "For this scope, I'd suggest these acceptance criteria: [list]."
|
|
265
|
-
|
|
266
|
-
Include:
|
|
267
|
-
- **Definition of done:** What conditions must be true for the milestone to be complete?
|
|
268
|
-
- **Test coverage expectations:** What must be tested vs nice-to-have?
|
|
269
|
-
- **Quality gates:** What would block shipping?
|
|
270
|
-
|
|
271
|
-
### Resolve Quality — Mandatory Rounds
|
|
272
|
-
|
|
273
|
-
After presenting your recommendation, you MUST complete these rounds in order. Do NOT skip rounds.
|
|
274
|
-
|
|
275
|
-
**Complexity calibration:** If the milestone is simple, you may compress rounds — but you must still explicitly address each round's topic, even if briefly. You may NOT skip rounds entirely.
|
|
276
|
-
|
|
277
|
-
**Round 1 — Per-slice acceptance criteria:**
|
|
278
|
-
For each slice, state 3-5 specific, testable acceptance criteria. Ask the user to confirm each slice's criteria. These must be concrete enough that the planner can use them directly. "Tests pass" is NOT an acceptance criterion. "POST /api/auth/signup with {email, password} returns 201 with {id, email}" IS an acceptance criterion.
|
|
279
|
-
|
|
280
|
-
**Round 2 — Test strategy:**
|
|
281
|
-
For each slice, state what type of tests are needed (unit, integration, e2e) and what specifically gets tested. Ask the user to confirm. Example: "S01 needs: unit test for password hashing, integration test for signup endpoint with valid and invalid inputs. No e2e needed for this slice."
|
|
282
|
-
|
|
283
|
-
**Round 3 — Definition of done:**
|
|
284
|
-
State the end-to-end scenario that proves the milestone works. Ask the user to confirm. Example: "Done means: a new user can sign up, log in, receive a JWT, and use that JWT to access a protected endpoint — all verified by running the sequence manually or via integration test."
|
|
285
|
-
|
|
286
|
-
After completing all 3 rounds, proceed to the Layer 4 Gate.
|
|
287
|
-
|
|
288
|
-
### Layer 4 Gate
|
|
289
|
-
|
|
290
|
-
Before advancing, use `ask_user_questions` with question ID containing `layer4_quality_gate`:
|
|
291
|
-
|
|
292
|
-
```
|
|
293
|
-
Header: "Quality Gate"
|
|
294
|
-
Question: "Quality bar defined. Ready to write context and roadmap?"
|
|
295
|
-
Options:
|
|
296
|
-
- "Yes, write the artifacts (Recommended)" — proceed to Output Phase
|
|
297
|
-
- "Want to adjust the quality bar" — user will clarify, then re-present quality
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
**CRITICAL — Non-bypassable gate:** Do NOT proceed to Output Phase until the user explicitly approves the quality bar. If `ask_user_questions` fails, errors, returns no response, or the user's response does not match a provided option, you MUST re-ask — never rationalize past the block. The gate exists to protect the user's work; treat a block as an instruction to wait, not an obstacle to work around.
|
|
301
|
-
|
|
302
|
-
---
|
|
303
|
-
|
|
304
|
-
## Output Phase
|
|
305
|
-
|
|
306
|
-
Once all four layers are complete, you have gathered:
|
|
307
|
-
- Confirmed scope (Layer 1)
|
|
308
|
-
- Approved architecture (Layer 2)
|
|
309
|
-
- Error handling strategy (Layer 3)
|
|
310
|
-
- Quality bar and acceptance criteria (Layer 4)
|
|
311
|
-
|
|
312
|
-
### Capability Contract
|
|
313
|
-
|
|
314
|
-
Before writing a roadmap, produce or update `.gsd/REQUIREMENTS.md`.
|
|
315
|
-
|
|
316
|
-
Use it as the project's explicit capability contract. Requirements discovered during the 4-layer discussion should be captured here with source `user` or `inferred` as appropriate.
|
|
317
|
-
|
|
318
|
-
**Print the requirements in chat before writing the roadmap.** Print a markdown table with columns: ID, Title, Status, Owner, Source. Group by status (Active, Deferred, Out of Scope). After the table, ask: "Confirm, adjust, or add?" **Non-bypassable:** If the user does not respond or gives an ambiguous answer, you MUST re-ask — never proceed to roadmap creation without explicit requirement confirmation.
|
|
319
|
-
|
|
320
|
-
### Roadmap Preview
|
|
321
|
-
|
|
322
|
-
Before writing any files, **print the planned roadmap in chat** so the user can see and approve it. Print a markdown table with columns: Slice, Title, Risk, Depends, Demo. One row per slice. Below the table, print the milestone definition of done as a bullet list.
|
|
323
|
-
|
|
324
|
-
If the user raises a substantive objection, adjust the roadmap. Otherwise, present the roadmap and ask: "Ready to write, or want to adjust?" — one gate, not two. **Non-bypassable:** If the user does not respond or gives an ambiguous answer, you MUST re-ask — never write files without explicit approval. A missing response is not a "yes."
|
|
325
|
-
|
|
326
|
-
### Naming Convention
|
|
327
|
-
|
|
328
|
-
Directories use bare IDs. Files use ID-SUFFIX format. Titles live inside file content, not in names.
|
|
329
|
-
- Milestone dir: `.gsd/milestones/{{milestoneId}}/`
|
|
330
|
-
- Milestone files: `{{milestoneId}}-CONTEXT.md`, `{{milestoneId}}-ROADMAP.md`
|
|
331
|
-
- Slice dirs: `S01/`, `S02/`, etc.
|
|
332
|
-
|
|
333
|
-
### Single Milestone
|
|
334
|
-
|
|
335
|
-
Once the user is satisfied, in a single pass:
|
|
336
|
-
1. `mkdir -p .gsd/milestones/{{milestoneId}}/slices`
|
|
337
|
-
2. Write or update `.gsd/PROJECT.md` — use the **Project** output template below. Describe what the project is, its current state, and list the milestone sequence.
|
|
338
|
-
3. Write or update `.gsd/REQUIREMENTS.md` — use the **Requirements** output template below. Confirm requirement states, ownership, and traceability before roadmap creation.
|
|
339
|
-
|
|
340
|
-
**Depth-Preservation Guidance for context.md:**
|
|
341
|
-
When writing context.md, preserve the user's exact terminology, emphasis, and specific framing from the discussion. Do not paraphrase user nuance into generic summaries. If the user said "craft feel," write "craft feel" — not "high-quality user experience." If they emphasized a specific constraint or negative requirement, carry that emphasis through verbatim. The context file is downstream agents' only window into this conversation — flattening specifics into generics loses the signal that shaped every decision.
|
|
342
|
-
|
|
343
|
-
**Enhanced Context Requirement:** Because this is a prepared discussion, use the `context-enhanced` template which includes sections for Codebase Brief, Architectural Decisions, Interface Contracts, Error Handling Strategy, Testing Requirements, Acceptance Criteria, and Ecosystem Notes. Populate these from the 4-layer discussion:
|
|
344
|
-
- Codebase Brief: from Layer 1 presentation
|
|
345
|
-
- Architectural Decisions: from Layer 2 — each decision with rationale, evidence, alternatives
|
|
346
|
-
- Error Handling Strategy: from Layer 3
|
|
347
|
-
- Testing Requirements and Acceptance Criteria: from Layer 4
|
|
348
|
-
- Ecosystem Notes: key findings from the ecosystem brief
|
|
349
|
-
|
|
350
|
-
4. Write `{{contextPath}}` — use the **Context Enhanced** output template below. Preserve key risks, unknowns, existing codebase constraints, integration points, and relevant requirements surfaced during discussion.
|
|
351
|
-
5. Call `gsd_plan_milestone` to create the roadmap. Decompose into demoable vertical slices with risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, requirement coverage, and a boundary map. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment. Use the **Roadmap** output template below to structure the tool call parameters.
|
|
352
|
-
6. For each architectural or pattern decision made during discussion, call `gsd_decision_save` — the tool auto-assigns IDs and regenerates `.gsd/DECISIONS.md` automatically.
|
|
353
|
-
7. {{commitInstruction}}
|
|
354
|
-
|
|
355
|
-
After writing the files, say exactly: "Milestone {{milestoneId}} ready." — nothing else. Auto-mode will start automatically.
|
|
356
|
-
|
|
357
|
-
### Multi-Milestone
|
|
358
|
-
|
|
359
|
-
Once the user confirms the milestone split:
|
|
360
|
-
|
|
361
|
-
#### Phase 1: Shared artifacts
|
|
362
|
-
|
|
363
|
-
1. For each milestone, call `gsd_milestone_generate_id` to get its ID — never invent milestone IDs manually. Then `mkdir -p .gsd/milestones/<ID>/slices`.
|
|
364
|
-
2. Write `.gsd/PROJECT.md` — use the **Project** output template below.
|
|
365
|
-
3. Write `.gsd/REQUIREMENTS.md` — use the **Requirements** output template below. Capture Active, Deferred, Out of Scope, and any already Validated requirements. Later milestones may have provisional ownership where slice plans do not exist yet.
|
|
366
|
-
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.
|
|
367
|
-
|
|
368
|
-
#### Phase 2: Primary milestone
|
|
369
|
-
|
|
370
|
-
5. Write a full enhanced `CONTEXT.md` for the primary milestone (the one discussed in depth). Use the `context-enhanced` template.
|
|
371
|
-
6. Call `gsd_plan_milestone` for **only the primary milestone** — detail-planning later milestones now is waste because the codebase will change. Include requirement coverage and a milestone definition of done.
|
|
372
|
-
|
|
373
|
-
#### MANDATORY: depends_on Frontmatter in CONTEXT.md
|
|
374
|
-
|
|
375
|
-
Every CONTEXT.md for a milestone that depends on other milestones MUST have YAML frontmatter with `depends_on`. The auto-mode state machine reads this field to determine execution order — without it, milestones may execute out of order or in parallel when they shouldn't.
|
|
376
|
-
|
|
377
|
-
```yaml
|
|
378
|
-
---
|
|
379
|
-
depends_on: [M001, M002]
|
|
380
|
-
---
|
|
381
|
-
|
|
382
|
-
# M003: Title
|
|
383
|
-
```
|
|
384
|
-
|
|
385
|
-
If a milestone has no dependencies, omit the frontmatter. The dependency chain from the milestone confirmation gate MUST be reflected in each CONTEXT.md frontmatter. Do NOT rely on QUEUE.md or PROJECT.md for dependency tracking — the state machine only reads CONTEXT.md frontmatter.
|
|
386
|
-
|
|
387
|
-
#### Phase 3: Sequential readiness gate for remaining milestones
|
|
388
|
-
|
|
389
|
-
For each remaining milestone **one at a time, in sequence**, decide the most likely readiness mode from the evidence you already have, then use `ask_user_questions` to let the user correct that recommendation. Present three options:
|
|
390
|
-
|
|
391
|
-
- **"Discuss now"** — The user wants to conduct a focused discussion for this milestone in the current session, while the context from the broader discussion is still fresh. Proceed with a focused discussion for this milestone (Layer 1-4 protocol). When the discussion concludes, write a full enhanced `CONTEXT.md`. Then move to the gate for the next milestone.
|
|
392
|
-
- **"Write draft for later"** — This milestone has seed material from the current conversation but needs its own dedicated discussion in a future session. Write a `CONTEXT-DRAFT.md` capturing the seed material (what was discussed, key ideas, provisional scope, open questions). Mark it clearly as a draft, not a finalized context. **What happens downstream:** When auto-mode reaches this milestone, it pauses and notifies the user: "M00x has draft context — needs discussion. Run /gsd." The `/gsd` wizard shows a "Discuss from draft" option that seeds the new discussion with this draft, so nothing from the current conversation is lost. After the dedicated discussion produces a full CONTEXT.md, the draft file is automatically deleted.
|
|
393
|
-
- **"Just queue it"** — This milestone is identified but intentionally left without context. No context file is written — the directory already exists from Phase 1. **What happens downstream:** When auto-mode reaches this milestone, it pauses and notifies the user to run /gsd. The wizard starts a full discussion from scratch.
|
|
394
|
-
|
|
395
|
-
**When "Discuss now" is chosen:** Run the full 4-layer protocol for that milestone using fresh preparation briefs scoped to that milestone.
|
|
396
|
-
|
|
397
|
-
#### Milestone Gate Tracking (MANDATORY for multi-milestone)
|
|
398
|
-
|
|
399
|
-
After EVERY Phase 3 gate decision, immediately write or update `.gsd/DISCUSSION-MANIFEST.json` with the cumulative state. This file is mechanically validated by the system before auto-mode starts — if gates are incomplete, auto-mode will NOT start.
|
|
400
|
-
|
|
401
|
-
```json
|
|
402
|
-
{
|
|
403
|
-
"primary": "M001",
|
|
404
|
-
"milestones": {
|
|
405
|
-
"M001": { "gate": "discussed", "context": "full" },
|
|
406
|
-
"M002": { "gate": "discussed", "context": "full" },
|
|
407
|
-
"M003": { "gate": "queued", "context": "none" }
|
|
408
|
-
},
|
|
409
|
-
"total": 3,
|
|
410
|
-
"gates_completed": 3
|
|
411
|
-
}
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
Write this file AFTER each gate decision, not just at the end. Update `gates_completed` incrementally. The system reads this file and BLOCKS auto-start if `gates_completed < total`.
|
|
415
|
-
|
|
416
|
-
For single-milestone projects, do NOT write this file — it is only for multi-milestone discussions.
|
|
417
|
-
|
|
418
|
-
#### Phase 4: Finalize
|
|
419
|
-
|
|
420
|
-
7. {{multiMilestoneCommitInstruction}}
|
|
421
|
-
|
|
422
|
-
After writing the files, say exactly: "Milestone M001 ready." — nothing else. Auto-mode will start automatically.
|
|
423
|
-
|
|
424
|
-
{{inlinedTemplates}}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# {{milestoneId}}: {{milestoneTitle}}
|
|
2
|
-
|
|
3
|
-
**Gathered:** {{date}}
|
|
4
|
-
**Status:** Ready for planning
|
|
5
|
-
|
|
6
|
-
## Project Description
|
|
7
|
-
|
|
8
|
-
{{description}}
|
|
9
|
-
|
|
10
|
-
## Why This Milestone
|
|
11
|
-
|
|
12
|
-
{{whatProblemThisSolves_AND_whyNow}}
|
|
13
|
-
|
|
14
|
-
## Codebase Brief
|
|
15
|
-
|
|
16
|
-
### Technology Stack
|
|
17
|
-
|
|
18
|
-
{{techStack}}
|
|
19
|
-
|
|
20
|
-
### Key Modules
|
|
21
|
-
|
|
22
|
-
{{keyModules}}
|
|
23
|
-
|
|
24
|
-
### Patterns in Use
|
|
25
|
-
|
|
26
|
-
{{patternsInUse}}
|
|
27
|
-
|
|
28
|
-
## User-Visible Outcome
|
|
29
|
-
|
|
30
|
-
### When this milestone is complete, the user can:
|
|
31
|
-
|
|
32
|
-
- {{literalUserActionInRealEnvironment}}
|
|
33
|
-
- {{literalUserActionInRealEnvironment}}
|
|
34
|
-
|
|
35
|
-
### Entry point / environment
|
|
36
|
-
|
|
37
|
-
- Entry point: {{CLI command / URL / bot / extension / service / workflow}}
|
|
38
|
-
- Environment: {{local dev / browser / mobile / launchd / CI / production-like}}
|
|
39
|
-
- Live dependencies involved: {{telegram / database / webhook / rpc subprocess / none}}
|
|
40
|
-
|
|
41
|
-
## Completion Class
|
|
42
|
-
|
|
43
|
-
- Contract complete means: {{what can be proven by tests / fixtures / artifacts}}
|
|
44
|
-
- Integration complete means: {{what must work across real subsystems}}
|
|
45
|
-
- Operational complete means: {{what must work under real lifecycle conditions, or none}}
|
|
46
|
-
|
|
47
|
-
## Architectural Decisions
|
|
48
|
-
|
|
49
|
-
### {{decisionTitle}}
|
|
50
|
-
|
|
51
|
-
**Decision:** {{decisionStatement}}
|
|
52
|
-
|
|
53
|
-
**Rationale:** {{rationale}}
|
|
54
|
-
|
|
55
|
-
**Evidence:** {{evidence}}
|
|
56
|
-
|
|
57
|
-
**Alternatives Considered:**
|
|
58
|
-
- {{alternative1}} — {{whyNotChosen1}}
|
|
59
|
-
- {{alternative2}} — {{whyNotChosen2}}
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
> Add additional decisions as separate `### Decision Title` blocks following the same structure above.
|
|
64
|
-
|
|
65
|
-
## Interface Contracts
|
|
66
|
-
|
|
67
|
-
{{interfaceContracts}}
|
|
68
|
-
|
|
69
|
-
> Document API boundaries, function signatures, data shapes, or protocol agreements that must be honored. Leave blank or remove if not applicable to this milestone.
|
|
70
|
-
|
|
71
|
-
## Error Handling Strategy
|
|
72
|
-
|
|
73
|
-
{{errorHandlingStrategy}}
|
|
74
|
-
|
|
75
|
-
> Describe the approach for handling failures, edge cases, and error propagation. Include retry policies, fallback behaviors, and user-facing error messages where relevant.
|
|
76
|
-
|
|
77
|
-
## Final Integrated Acceptance
|
|
78
|
-
|
|
79
|
-
To call this milestone complete, we must prove:
|
|
80
|
-
|
|
81
|
-
- {{one real end-to-end scenario}}
|
|
82
|
-
- {{one real end-to-end scenario}}
|
|
83
|
-
- {{what cannot be simulated if this milestone is to be considered truly done}}
|
|
84
|
-
|
|
85
|
-
## Testing Requirements
|
|
86
|
-
|
|
87
|
-
{{testingRequirements}}
|
|
88
|
-
|
|
89
|
-
> Specify test types (unit, integration, e2e), coverage expectations, and any specific test scenarios that must pass.
|
|
90
|
-
|
|
91
|
-
## Acceptance Criteria
|
|
92
|
-
|
|
93
|
-
{{acceptanceCriteria}}
|
|
94
|
-
|
|
95
|
-
> Per-slice acceptance criteria gathered during discussion. Each slice should have clear, testable criteria.
|
|
96
|
-
|
|
97
|
-
## Risks and Unknowns
|
|
98
|
-
|
|
99
|
-
- {{riskOrUnknown}} — {{whyItMatters}}
|
|
100
|
-
|
|
101
|
-
## Existing Codebase / Prior Art
|
|
102
|
-
|
|
103
|
-
- `{{fileOrModule}}` — {{howItRelates}}
|
|
104
|
-
- `{{fileOrModule}}` — {{howItRelates}}
|
|
105
|
-
|
|
106
|
-
> See `.gsd/DECISIONS.md` for all architectural and pattern decisions — it is an append-only register; read it during planning, append to it during execution.
|
|
107
|
-
|
|
108
|
-
## Relevant Requirements
|
|
109
|
-
|
|
110
|
-
- {{requirementId}} — {{howThisMilestoneAdvancesIt}}
|
|
111
|
-
|
|
112
|
-
## Scope
|
|
113
|
-
|
|
114
|
-
### In Scope
|
|
115
|
-
|
|
116
|
-
- {{inScopeItem}}
|
|
117
|
-
|
|
118
|
-
### Out of Scope / Non-Goals
|
|
119
|
-
|
|
120
|
-
- {{outOfScopeItem}}
|
|
121
|
-
|
|
122
|
-
## Technical Constraints
|
|
123
|
-
|
|
124
|
-
- {{constraint}}
|
|
125
|
-
|
|
126
|
-
## Integration Points
|
|
127
|
-
|
|
128
|
-
- {{systemOrService}} — {{howThisMilestoneInteractsWithIt}}
|
|
129
|
-
|
|
130
|
-
## Ecosystem Notes
|
|
131
|
-
|
|
132
|
-
{{ecosystemNotes}}
|
|
133
|
-
|
|
134
|
-
> Research findings, best practices, known issues, and relevant external documentation discovered during preparation.
|
|
135
|
-
|
|
136
|
-
## Open Questions
|
|
137
|
-
|
|
138
|
-
- {{question}} — {{currentThinking}}
|