@tuan_son.dinh/gsd 2.6.0
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/LICENSE +21 -0
- package/README.md +453 -0
- package/dist/app-paths.d.ts +4 -0
- package/dist/app-paths.js +6 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +269 -0
- package/dist/loader.d.ts +2 -0
- package/dist/loader.js +70 -0
- package/dist/logo.d.ts +16 -0
- package/dist/logo.js +25 -0
- package/dist/onboarding.d.ts +43 -0
- package/dist/onboarding.js +418 -0
- package/dist/pi-migration.d.ts +14 -0
- package/dist/pi-migration.js +57 -0
- package/dist/resource-loader.d.ts +22 -0
- package/dist/resource-loader.js +60 -0
- package/dist/tool-bootstrap.d.ts +4 -0
- package/dist/tool-bootstrap.js +74 -0
- package/dist/wizard.d.ts +7 -0
- package/dist/wizard.js +25 -0
- package/package.json +60 -0
- package/patches/@mariozechner+pi-coding-agent+0.57.1.patch +108 -0
- package/patches/@mariozechner+pi-tui+0.57.1.patch +47 -0
- package/pkg/dist/modes/interactive/theme/dark.json +85 -0
- package/pkg/dist/modes/interactive/theme/light.json +84 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.json +335 -0
- package/pkg/dist/modes/interactive/theme/theme.d.ts +78 -0
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -0
- package/pkg/dist/modes/interactive/theme/theme.js +949 -0
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -0
- package/pkg/package.json +8 -0
- package/scripts/postinstall.js +127 -0
- package/src/resources/GSD-WORKFLOW.md +661 -0
- package/src/resources/agents/researcher.md +29 -0
- package/src/resources/agents/scout.md +56 -0
- package/src/resources/agents/worker.md +31 -0
- package/src/resources/extensions/ask-user-questions.ts +249 -0
- package/src/resources/extensions/bg-shell/index.ts +2808 -0
- package/src/resources/extensions/browser-tools/BROWSER-TOOLS-V2-PROPOSAL.md +1277 -0
- package/src/resources/extensions/browser-tools/core.js +1057 -0
- package/src/resources/extensions/browser-tools/index.ts +4989 -0
- package/src/resources/extensions/browser-tools/package.json +20 -0
- package/src/resources/extensions/context7/index.ts +428 -0
- package/src/resources/extensions/context7/package.json +11 -0
- package/src/resources/extensions/get-secrets-from-user.ts +352 -0
- package/src/resources/extensions/google-search/index.ts +323 -0
- package/src/resources/extensions/google-search/package.json +9 -0
- package/src/resources/extensions/gsd/activity-log.ts +69 -0
- package/src/resources/extensions/gsd/auto.ts +2744 -0
- package/src/resources/extensions/gsd/commands.ts +313 -0
- package/src/resources/extensions/gsd/crash-recovery.ts +85 -0
- package/src/resources/extensions/gsd/dashboard-overlay.ts +521 -0
- package/src/resources/extensions/gsd/docs/preferences-reference.md +176 -0
- package/src/resources/extensions/gsd/doctor.ts +690 -0
- package/src/resources/extensions/gsd/files.ts +732 -0
- package/src/resources/extensions/gsd/git-service.ts +597 -0
- package/src/resources/extensions/gsd/gitignore.ts +168 -0
- package/src/resources/extensions/gsd/guided-flow.ts +817 -0
- package/src/resources/extensions/gsd/index.ts +558 -0
- package/src/resources/extensions/gsd/metrics.ts +374 -0
- package/src/resources/extensions/gsd/migrate/command.ts +218 -0
- package/src/resources/extensions/gsd/migrate/index.ts +42 -0
- package/src/resources/extensions/gsd/migrate/parser.ts +323 -0
- package/src/resources/extensions/gsd/migrate/parsers.ts +624 -0
- package/src/resources/extensions/gsd/migrate/preview.ts +48 -0
- package/src/resources/extensions/gsd/migrate/transformer.ts +346 -0
- package/src/resources/extensions/gsd/migrate/types.ts +370 -0
- package/src/resources/extensions/gsd/migrate/validator.ts +55 -0
- package/src/resources/extensions/gsd/migrate/writer.ts +539 -0
- package/src/resources/extensions/gsd/observability-validator.ts +408 -0
- package/src/resources/extensions/gsd/package.json +11 -0
- package/src/resources/extensions/gsd/paths.ts +308 -0
- package/src/resources/extensions/gsd/preferences.ts +757 -0
- package/src/resources/extensions/gsd/prompt-loader.ts +50 -0
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +25 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +29 -0
- package/src/resources/extensions/gsd/prompts/discuss.md +189 -0
- package/src/resources/extensions/gsd/prompts/doctor-heal.md +29 -0
- package/src/resources/extensions/gsd/prompts/execute-task.md +61 -0
- package/src/resources/extensions/gsd/prompts/guided-complete-slice.md +1 -0
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +3 -0
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +59 -0
- package/src/resources/extensions/gsd/prompts/guided-execute-task.md +1 -0
- package/src/resources/extensions/gsd/prompts/guided-plan-milestone.md +23 -0
- package/src/resources/extensions/gsd/prompts/guided-plan-slice.md +1 -0
- package/src/resources/extensions/gsd/prompts/guided-research-slice.md +11 -0
- package/src/resources/extensions/gsd/prompts/guided-resume-task.md +1 -0
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +65 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +51 -0
- package/src/resources/extensions/gsd/prompts/queue.md +85 -0
- package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +48 -0
- package/src/resources/extensions/gsd/prompts/replan-slice.md +39 -0
- package/src/resources/extensions/gsd/prompts/research-milestone.md +37 -0
- package/src/resources/extensions/gsd/prompts/research-slice.md +28 -0
- package/src/resources/extensions/gsd/prompts/review-migration.md +66 -0
- package/src/resources/extensions/gsd/prompts/run-uat.md +109 -0
- package/src/resources/extensions/gsd/prompts/system.md +187 -0
- package/src/resources/extensions/gsd/prompts/worktree-merge.md +123 -0
- package/src/resources/extensions/gsd/session-forensics.ts +487 -0
- package/src/resources/extensions/gsd/skill-discovery.ts +137 -0
- package/src/resources/extensions/gsd/state.ts +460 -0
- package/src/resources/extensions/gsd/templates/context.md +76 -0
- package/src/resources/extensions/gsd/templates/decisions.md +8 -0
- package/src/resources/extensions/gsd/templates/milestone-summary.md +73 -0
- package/src/resources/extensions/gsd/templates/plan.md +131 -0
- package/src/resources/extensions/gsd/templates/preferences.md +24 -0
- package/src/resources/extensions/gsd/templates/project.md +31 -0
- package/src/resources/extensions/gsd/templates/reassessment.md +28 -0
- package/src/resources/extensions/gsd/templates/requirements.md +81 -0
- package/src/resources/extensions/gsd/templates/research.md +46 -0
- package/src/resources/extensions/gsd/templates/roadmap.md +118 -0
- package/src/resources/extensions/gsd/templates/slice-context.md +58 -0
- package/src/resources/extensions/gsd/templates/slice-summary.md +99 -0
- package/src/resources/extensions/gsd/templates/state.md +19 -0
- package/src/resources/extensions/gsd/templates/task-plan.md +52 -0
- package/src/resources/extensions/gsd/templates/task-summary.md +57 -0
- package/src/resources/extensions/gsd/templates/uat.md +54 -0
- package/src/resources/extensions/gsd/tests/activity-log-prune.test.ts +327 -0
- package/src/resources/extensions/gsd/tests/auto-preflight.test.ts +56 -0
- package/src/resources/extensions/gsd/tests/auto-supervisor.test.mjs +53 -0
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +225 -0
- package/src/resources/extensions/gsd/tests/cost-projection.test.ts +160 -0
- package/src/resources/extensions/gsd/tests/derive-state-deps.test.ts +341 -0
- package/src/resources/extensions/gsd/tests/derive-state.test.ts +689 -0
- package/src/resources/extensions/gsd/tests/discuss-prompt.test.ts +38 -0
- package/src/resources/extensions/gsd/tests/doctor.test.ts +505 -0
- package/src/resources/extensions/gsd/tests/git-service.test.ts +1313 -0
- package/src/resources/extensions/gsd/tests/idle-recovery.test.ts +308 -0
- package/src/resources/extensions/gsd/tests/metrics-io.test.ts +201 -0
- package/src/resources/extensions/gsd/tests/metrics.test.ts +217 -0
- package/src/resources/extensions/gsd/tests/migrate-command.test.ts +390 -0
- package/src/resources/extensions/gsd/tests/migrate-parser.test.ts +786 -0
- package/src/resources/extensions/gsd/tests/migrate-transformer.test.ts +657 -0
- package/src/resources/extensions/gsd/tests/migrate-validator-parsers.test.ts +443 -0
- package/src/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +318 -0
- package/src/resources/extensions/gsd/tests/migrate-writer.test.ts +420 -0
- package/src/resources/extensions/gsd/tests/must-have-parser.test.ts +309 -0
- package/src/resources/extensions/gsd/tests/parsers.test.ts +1351 -0
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +163 -0
- package/src/resources/extensions/gsd/tests/plan-quality-validator.test.ts +386 -0
- package/src/resources/extensions/gsd/tests/reassess-prompt.test.ts +171 -0
- package/src/resources/extensions/gsd/tests/remote-questions.test.ts +155 -0
- package/src/resources/extensions/gsd/tests/remote-status.test.ts +99 -0
- package/src/resources/extensions/gsd/tests/replan-slice.test.ts +521 -0
- package/src/resources/extensions/gsd/tests/requirements.test.ts +125 -0
- package/src/resources/extensions/gsd/tests/resolve-ts-hooks.mjs +34 -0
- package/src/resources/extensions/gsd/tests/resolve-ts.mjs +11 -0
- package/src/resources/extensions/gsd/tests/run-uat.test.ts +348 -0
- package/src/resources/extensions/gsd/tests/unit-runtime.test.ts +247 -0
- package/src/resources/extensions/gsd/tests/workflow-config.test.mjs +53 -0
- package/src/resources/extensions/gsd/tests/workspace-index.test.ts +94 -0
- package/src/resources/extensions/gsd/tests/worktree-integration.test.ts +253 -0
- package/src/resources/extensions/gsd/tests/worktree-manager.test.ts +160 -0
- package/src/resources/extensions/gsd/tests/worktree.test.ts +264 -0
- package/src/resources/extensions/gsd/types.ts +159 -0
- package/src/resources/extensions/gsd/unit-runtime.ts +184 -0
- package/src/resources/extensions/gsd/workspace-index.ts +203 -0
- package/src/resources/extensions/gsd/worktree-command.ts +845 -0
- package/src/resources/extensions/gsd/worktree-manager.ts +392 -0
- package/src/resources/extensions/gsd/worktree.ts +183 -0
- package/src/resources/extensions/mac-tools/index.ts +852 -0
- package/src/resources/extensions/mac-tools/swift-cli/Package.swift +22 -0
- package/src/resources/extensions/mac-tools/swift-cli/Sources/main.swift +1318 -0
- package/src/resources/extensions/mcporter/index.ts +429 -0
- package/src/resources/extensions/remote-questions/config.ts +81 -0
- package/src/resources/extensions/remote-questions/discord-adapter.ts +128 -0
- package/src/resources/extensions/remote-questions/format.ts +163 -0
- package/src/resources/extensions/remote-questions/manager.ts +192 -0
- package/src/resources/extensions/remote-questions/remote-command.ts +307 -0
- package/src/resources/extensions/remote-questions/slack-adapter.ts +92 -0
- package/src/resources/extensions/remote-questions/status.ts +31 -0
- package/src/resources/extensions/remote-questions/store.ts +77 -0
- package/src/resources/extensions/remote-questions/types.ts +75 -0
- package/src/resources/extensions/search-the-web/cache.ts +78 -0
- package/src/resources/extensions/search-the-web/command-search-provider.ts +95 -0
- package/src/resources/extensions/search-the-web/format.ts +258 -0
- package/src/resources/extensions/search-the-web/http.ts +238 -0
- package/src/resources/extensions/search-the-web/index.ts +65 -0
- package/src/resources/extensions/search-the-web/native-search.ts +157 -0
- package/src/resources/extensions/search-the-web/provider.ts +118 -0
- package/src/resources/extensions/search-the-web/tavily.ts +116 -0
- package/src/resources/extensions/search-the-web/tool-fetch-page.ts +519 -0
- package/src/resources/extensions/search-the-web/tool-llm-context.ts +561 -0
- package/src/resources/extensions/search-the-web/tool-search.ts +576 -0
- package/src/resources/extensions/search-the-web/url-utils.ts +91 -0
- package/src/resources/extensions/shared/confirm-ui.ts +126 -0
- package/src/resources/extensions/shared/interview-ui.ts +613 -0
- package/src/resources/extensions/shared/next-action-ui.ts +197 -0
- package/src/resources/extensions/shared/progress-widget.ts +282 -0
- package/src/resources/extensions/shared/terminal.ts +23 -0
- package/src/resources/extensions/shared/thinking-widget.ts +107 -0
- package/src/resources/extensions/shared/ui.ts +400 -0
- package/src/resources/extensions/shared/wizard-ui.ts +551 -0
- package/src/resources/extensions/slash-commands/audit.ts +88 -0
- package/src/resources/extensions/slash-commands/clear.ts +10 -0
- package/src/resources/extensions/slash-commands/create-extension.ts +297 -0
- package/src/resources/extensions/slash-commands/create-slash-command.ts +234 -0
- package/src/resources/extensions/slash-commands/index.ts +12 -0
- package/src/resources/extensions/subagent/agents.ts +126 -0
- package/src/resources/extensions/subagent/index.ts +1020 -0
- package/src/resources/extensions/voice/index.ts +195 -0
- package/src/resources/extensions/voice/speech-recognizer.swift +154 -0
- package/src/resources/skills/debug-like-expert/SKILL.md +231 -0
- package/src/resources/skills/debug-like-expert/references/debugging-mindset.md +253 -0
- package/src/resources/skills/debug-like-expert/references/hypothesis-testing.md +373 -0
- package/src/resources/skills/debug-like-expert/references/investigation-techniques.md +337 -0
- package/src/resources/skills/debug-like-expert/references/verification-patterns.md +425 -0
- package/src/resources/skills/debug-like-expert/references/when-to-research.md +361 -0
- package/src/resources/skills/frontend-design/SKILL.md +45 -0
- package/src/resources/skills/swiftui/SKILL.md +208 -0
- package/src/resources/skills/swiftui/references/animations.md +921 -0
- package/src/resources/skills/swiftui/references/architecture.md +1561 -0
- package/src/resources/skills/swiftui/references/layout-system.md +1186 -0
- package/src/resources/skills/swiftui/references/navigation.md +1492 -0
- package/src/resources/skills/swiftui/references/networking-async.md +214 -0
- package/src/resources/skills/swiftui/references/performance.md +1706 -0
- package/src/resources/skills/swiftui/references/platform-integration.md +204 -0
- package/src/resources/skills/swiftui/references/state-management.md +1443 -0
- package/src/resources/skills/swiftui/references/swiftdata.md +297 -0
- package/src/resources/skills/swiftui/references/testing-debugging.md +247 -0
- package/src/resources/skills/swiftui/references/uikit-appkit-interop.md +218 -0
- package/src/resources/skills/swiftui/workflows/add-feature.md +191 -0
- package/src/resources/skills/swiftui/workflows/build-new-app.md +311 -0
- package/src/resources/skills/swiftui/workflows/debug-swiftui.md +192 -0
- package/src/resources/skills/swiftui/workflows/optimize-performance.md +197 -0
- package/src/resources/skills/swiftui/workflows/ship-app.md +203 -0
- package/src/resources/skills/swiftui/workflows/write-tests.md +235 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lex Christopherson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# GSD 2
|
|
4
|
+
|
|
5
|
+
**The evolution of [Get Shit Done](https://github.com/gsd-build/get-shit-done) — now a real coding agent.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/gsd-pi)
|
|
8
|
+
[](https://www.npmjs.com/package/gsd-pi)
|
|
9
|
+
[](https://github.com/gsd-build/GSD-2)
|
|
10
|
+
[](LICENSE)
|
|
11
|
+
|
|
12
|
+
The original GSD went viral as a prompt framework for Claude Code. It worked, but it was fighting the tool — injecting prompts through slash commands, hoping the LLM would follow instructions, with no actual control over context windows, sessions, or execution.
|
|
13
|
+
|
|
14
|
+
This version is different. GSD is now a standalone CLI built on the [Pi SDK](https://github.com/badlogic/pi-mono), which gives it direct TypeScript access to the agent harness itself. That means GSD can actually *do* what v1 could only *ask* the LLM to do: clear context between tasks, inject exactly the right files at dispatch time, manage git branches, track cost and tokens, detect stuck loops, recover from crashes, and auto-advance through an entire milestone without human intervention.
|
|
15
|
+
|
|
16
|
+
One command. Walk away. Come back to a built project with clean git history.
|
|
17
|
+
|
|
18
|
+
<pre><code>npm install -g gsd-pi</code></pre>
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## What Changed From v1
|
|
25
|
+
|
|
26
|
+
The original GSD was a collection of markdown prompts installed into `~/.claude/commands/`. It relied entirely on the LLM reading those prompts and doing the right thing. That worked surprisingly well — but it had hard limits:
|
|
27
|
+
|
|
28
|
+
- **No context control.** The LLM accumulated garbage over a long session. Quality degraded.
|
|
29
|
+
- **No real automation.** "Auto mode" was the LLM calling itself in a loop, burning context on orchestration overhead.
|
|
30
|
+
- **No crash recovery.** If the session died mid-task, you started over.
|
|
31
|
+
- **No observability.** No cost tracking, no progress dashboard, no stuck detection.
|
|
32
|
+
|
|
33
|
+
GSD v2 solves all of these because it's not a prompt framework anymore — it's a TypeScript application that *controls* the agent session.
|
|
34
|
+
|
|
35
|
+
| | v1 (Prompt Framework) | v2 (Agent Application) |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| Runtime | Claude Code slash commands | Standalone CLI via Pi SDK |
|
|
38
|
+
| Context management | Hope the LLM doesn't fill up | Fresh session per task, programmatic |
|
|
39
|
+
| Auto mode | LLM self-loop | State machine reading `.gsd/` files |
|
|
40
|
+
| Crash recovery | None | Lock files + session forensics |
|
|
41
|
+
| Git strategy | LLM writes git commands | Programmatic branch-per-slice, squash merge |
|
|
42
|
+
| Cost tracking | None | Per-unit token/cost ledger with dashboard |
|
|
43
|
+
| Stuck detection | None | Retry once, then stop with diagnostics |
|
|
44
|
+
| Timeout supervision | None | Soft/idle/hard timeouts with recovery steering |
|
|
45
|
+
| Context injection | "Read this file" | Pre-inlined into dispatch prompt |
|
|
46
|
+
| Roadmap reassessment | Manual | Automatic after each slice completes |
|
|
47
|
+
| Skill discovery | None | Auto-detect and install relevant skills during research |
|
|
48
|
+
|
|
49
|
+
### Migrating from v1
|
|
50
|
+
|
|
51
|
+
> **Note:** Migration works best with a `ROADMAP.md` file for milestone structure. Without one, milestones are inferred from the `phases/` directory.
|
|
52
|
+
|
|
53
|
+
If you have projects with `.planning` directories from the original Get Shit Done, you can migrate them to GSD-2's `.gsd` format:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# From within the project directory
|
|
57
|
+
/gsd migrate
|
|
58
|
+
|
|
59
|
+
# Or specify a path
|
|
60
|
+
/gsd migrate ~/projects/my-old-project
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The migration tool:
|
|
64
|
+
- Parses your old `PROJECT.md`, `ROADMAP.md`, `REQUIREMENTS.md`, phase directories, plans, summaries, and research
|
|
65
|
+
- Maps phases → slices, plans → tasks, milestones → milestones
|
|
66
|
+
- Preserves completion state (`[x]` phases stay done, summaries carry over)
|
|
67
|
+
- Consolidates research files into the new structure
|
|
68
|
+
- Shows a preview before writing anything
|
|
69
|
+
- Optionally runs an agent-driven review of the output for quality assurance
|
|
70
|
+
|
|
71
|
+
Supports format variations including milestone-sectioned roadmaps with `<details>` blocks, bold phase entries, bullet-format requirements, decimal phase numbering, and duplicate phase numbers across milestones.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## How It Works
|
|
76
|
+
|
|
77
|
+
GSD structures work into a hierarchy:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Milestone → a shippable version (4-10 slices)
|
|
81
|
+
Slice → one demoable vertical capability (1-7 tasks)
|
|
82
|
+
Task → one context-window-sized unit of work
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The iron rule: **a task must fit in one context window.** If it can't, it's two tasks.
|
|
86
|
+
|
|
87
|
+
### The Loop
|
|
88
|
+
|
|
89
|
+
Each slice flows through phases automatically:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Research → Plan → Execute (per task) → Complete → Reassess Roadmap → Next Slice
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Research** scouts the codebase and relevant docs. **Plan** decomposes the slice into tasks with must-haves (mechanically verifiable outcomes). **Execute** runs each task in a fresh context window with only the relevant files pre-loaded. **Complete** writes the summary, UAT script, marks the roadmap, and commits. **Reassess** checks if the roadmap still makes sense given what was learned.
|
|
96
|
+
|
|
97
|
+
### `/gsd auto` — The Main Event
|
|
98
|
+
|
|
99
|
+
This is what makes GSD different. Run it, walk away, come back to built software.
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
/gsd auto
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Auto mode is a state machine driven by files on disk. It reads `.gsd/STATE.md`, determines the next unit of work, creates a fresh agent session, injects a focused prompt with all relevant context pre-inlined, and lets the LLM execute. When the LLM finishes, auto mode reads disk state again and dispatches the next unit.
|
|
106
|
+
|
|
107
|
+
**What happens under the hood:**
|
|
108
|
+
|
|
109
|
+
1. **Fresh session per unit** — Every task, every research phase, every planning step gets a clean 200k-token context window. No accumulated garbage. No "I'll be more concise now."
|
|
110
|
+
|
|
111
|
+
2. **Context pre-loading** — The dispatch prompt includes inlined task plans, slice plans, prior task summaries, dependency summaries, roadmap excerpts, and decisions register. The LLM starts with everything it needs instead of spending tool calls reading files.
|
|
112
|
+
|
|
113
|
+
3. **Git branch-per-slice** — Each slice gets its own branch (`gsd/M001/S01`). Tasks commit atomically on the branch. When the slice completes, it's squash-merged to main as one clean commit.
|
|
114
|
+
|
|
115
|
+
4. **Crash recovery** — A lock file tracks the current unit. If the session dies, the next `/gsd auto` reads the surviving session file, synthesizes a recovery briefing from every tool call that made it to disk, and resumes with full context.
|
|
116
|
+
|
|
117
|
+
5. **Stuck detection** — If the same unit dispatches twice (the LLM didn't produce the expected artifact), it retries once with a deep diagnostic. If it fails again, auto mode stops with the exact file it expected.
|
|
118
|
+
|
|
119
|
+
6. **Timeout supervision** — Soft timeout warns the LLM to wrap up. Idle watchdog detects stalls. Hard timeout pauses auto mode. Recovery steering nudges the LLM to finish durable output before giving up.
|
|
120
|
+
|
|
121
|
+
7. **Cost tracking** — Every unit's token usage and cost is captured, broken down by phase, slice, and model. The dashboard shows running totals and projections. Budget ceilings can pause auto mode before overspending.
|
|
122
|
+
|
|
123
|
+
8. **Adaptive replanning** — After each slice completes, the roadmap is reassessed. If the work revealed new information that changes the plan, slices are reordered, added, or removed before continuing.
|
|
124
|
+
|
|
125
|
+
9. **Escape hatch** — Press Escape to pause. The conversation is preserved. Interact with the agent, inspect what happened, or just `/gsd auto` to resume from disk state.
|
|
126
|
+
|
|
127
|
+
### `/gsd` and `/gsd next` — Step Mode
|
|
128
|
+
|
|
129
|
+
By default, `/gsd` runs in **step mode**: the same state machine as auto mode, but it pauses between units with a wizard showing what completed and what's next. You advance one step at a time, review the output, and continue when ready.
|
|
130
|
+
|
|
131
|
+
- **No `.gsd/` directory** → Start a new project. Discussion flow captures your vision, constraints, and preferences.
|
|
132
|
+
- **Milestone exists, no roadmap** → Discuss or research the milestone.
|
|
133
|
+
- **Roadmap exists, slices pending** → Plan the next slice, execute one task, or switch to auto.
|
|
134
|
+
- **Mid-task** → Resume from where you left off.
|
|
135
|
+
|
|
136
|
+
`/gsd next` is an explicit alias for step mode. You can switch from step → auto mid-session via the wizard.
|
|
137
|
+
|
|
138
|
+
Step mode is the on-ramp. Auto mode is the highway.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Getting Started
|
|
143
|
+
|
|
144
|
+
### Install
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm install -g gsd-pi
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Log in to a provider
|
|
151
|
+
|
|
152
|
+
First, choose your LLM provider:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
gsd
|
|
156
|
+
/login
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Select from 20+ providers — Anthropic, OpenAI, Google, OpenRouter, GitHub Copilot, and more. If you have a Claude Max or Copilot subscription, the OAuth flow handles everything. Otherwise, paste your API key when prompted.
|
|
160
|
+
|
|
161
|
+
GSD auto-selects a default model after login. To switch models later:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
/model
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Use it
|
|
168
|
+
|
|
169
|
+
Open a terminal in your project and run:
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
gsd
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
GSD opens an interactive agent session. From there, you have two ways to work:
|
|
176
|
+
|
|
177
|
+
**`/gsd` — step mode.** Type `/gsd` and GSD executes one unit of work at a time, pausing between each with a wizard showing what completed and what's next. Same state machine as auto mode, but you stay in the loop. No project yet? It starts the discussion flow. Roadmap exists? It plans or executes the next step.
|
|
178
|
+
|
|
179
|
+
**`/gsd auto` — autonomous mode.** Type `/gsd auto` and walk away. GSD researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete. Fresh context window per task. No babysitting.
|
|
180
|
+
|
|
181
|
+
### Two terminals, one project
|
|
182
|
+
|
|
183
|
+
The real workflow: run auto mode in one terminal, steer from another.
|
|
184
|
+
|
|
185
|
+
**Terminal 1 — let it build**
|
|
186
|
+
```bash
|
|
187
|
+
gsd
|
|
188
|
+
/gsd auto
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Terminal 2 — steer while it works**
|
|
192
|
+
```bash
|
|
193
|
+
gsd
|
|
194
|
+
/gsd discuss # talk through architecture decisions
|
|
195
|
+
/gsd status # check progress
|
|
196
|
+
/gsd queue # queue the next milestone
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Both terminals read and write the same `.gsd/` files on disk. Your decisions in terminal 2 are picked up automatically at the next phase boundary — no need to stop auto mode.
|
|
200
|
+
|
|
201
|
+
### First launch
|
|
202
|
+
|
|
203
|
+
On first run, GSD launches a branded setup wizard that walks you through LLM provider selection (OAuth or API key), then optional tool API keys (Brave Search, Context7, Jina, Slack, Discord). Every step is skippable — press Enter to skip any. If you have an existing Pi installation, your provider credentials (LLM and tool keys) are imported automatically. Run `gsd config` anytime to re-run the wizard.
|
|
204
|
+
|
|
205
|
+
### Commands
|
|
206
|
+
|
|
207
|
+
| Command | What it does |
|
|
208
|
+
|---------|-------------|
|
|
209
|
+
| `/gsd` | Step mode — executes one unit at a time, pauses between each |
|
|
210
|
+
| `/gsd next` | Explicit step mode (same as bare `/gsd`) |
|
|
211
|
+
| `/gsd auto` | Autonomous mode — researches, plans, executes, commits, repeats |
|
|
212
|
+
| `/gsd stop` | Stop auto mode gracefully |
|
|
213
|
+
| `/gsd discuss` | Discuss architecture and decisions (works alongside auto mode) |
|
|
214
|
+
| `/gsd status` | Progress dashboard |
|
|
215
|
+
| `/gsd queue` | Queue future milestones (safe during auto mode) |
|
|
216
|
+
| `/gsd prefs` | Model selection, timeouts, budget ceiling |
|
|
217
|
+
| `/gsd migrate` | Migrate a v1 `.planning` directory to `.gsd` format |
|
|
218
|
+
| `/gsd doctor` | Validate `.gsd/` integrity, find and fix issues |
|
|
219
|
+
| `/worktree` (`/wt`) | Git worktree lifecycle — create, switch, merge, remove |
|
|
220
|
+
| `/voice` | Toggle real-time speech-to-text (macOS only) |
|
|
221
|
+
| `/exit` | Kill GSD process immediately |
|
|
222
|
+
| `/clear` | Start a new session (alias for `/new`) |
|
|
223
|
+
| `Ctrl+Alt+G` | Toggle dashboard overlay |
|
|
224
|
+
| `Ctrl+Alt+V` | Toggle voice transcription |
|
|
225
|
+
| `Ctrl+Alt+B` | Show background shell processes |
|
|
226
|
+
| `gsd config` | Re-run the setup wizard (LLM provider + tool keys) |
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## What GSD Manages For You
|
|
231
|
+
|
|
232
|
+
### Context Engineering
|
|
233
|
+
|
|
234
|
+
Every dispatch is carefully constructed. The LLM never wastes tool calls on orientation.
|
|
235
|
+
|
|
236
|
+
| Artifact | Purpose |
|
|
237
|
+
|----------|---------|
|
|
238
|
+
| `PROJECT.md` | Living doc — what the project is right now |
|
|
239
|
+
| `DECISIONS.md` | Append-only register of architectural decisions |
|
|
240
|
+
| `STATE.md` | Quick-glance dashboard — always read first |
|
|
241
|
+
| `M001-ROADMAP.md` | Milestone plan with slice checkboxes, risk levels, dependencies |
|
|
242
|
+
| `M001-CONTEXT.md` | User decisions from the discuss phase |
|
|
243
|
+
| `M001-RESEARCH.md` | Codebase and ecosystem research |
|
|
244
|
+
| `S01-PLAN.md` | Slice task decomposition with must-haves |
|
|
245
|
+
| `T01-PLAN.md` | Individual task plan with verification criteria |
|
|
246
|
+
| `T01-SUMMARY.md` | What happened — YAML frontmatter + narrative |
|
|
247
|
+
| `S01-UAT.md` | Human test script derived from slice outcomes |
|
|
248
|
+
|
|
249
|
+
### Git Strategy
|
|
250
|
+
|
|
251
|
+
Branch-per-slice with squash merge. Fully automated.
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
main:
|
|
255
|
+
docs(M001/S04): workflow documentation and examples
|
|
256
|
+
fix(M001/S03): bug fixes and doc corrections
|
|
257
|
+
feat(M001/S02): API endpoints and middleware
|
|
258
|
+
feat(M001/S01): data model and type system
|
|
259
|
+
|
|
260
|
+
gsd/M001/S01 (deleted after merge):
|
|
261
|
+
feat(S01/T03): file writer with round-trip fidelity
|
|
262
|
+
feat(S01/T02): markdown parser for plan files
|
|
263
|
+
feat(S01/T01): core types and interfaces
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
One commit per slice on main. Squash commits are the permanent record — branches are deleted after merge. Git bisect works. Individual slices are revertable.
|
|
267
|
+
|
|
268
|
+
### Verification
|
|
269
|
+
|
|
270
|
+
Every task has must-haves — mechanically checkable outcomes:
|
|
271
|
+
|
|
272
|
+
- **Truths** — Observable behaviors ("User can sign up with email")
|
|
273
|
+
- **Artifacts** — Files that must exist with real implementation, not stubs
|
|
274
|
+
- **Key Links** — Imports and wiring between artifacts
|
|
275
|
+
|
|
276
|
+
The verification ladder: static checks → command execution → behavioral testing → human review (only when the agent genuinely can't verify itself).
|
|
277
|
+
|
|
278
|
+
### Dashboard
|
|
279
|
+
|
|
280
|
+
`Ctrl+Alt+G` or `/gsd status` opens a real-time overlay showing:
|
|
281
|
+
|
|
282
|
+
- Current milestone, slice, and task progress
|
|
283
|
+
- Auto mode elapsed time and phase
|
|
284
|
+
- Per-unit cost and token breakdown by phase, slice, and model
|
|
285
|
+
- Cost projections based on completed work
|
|
286
|
+
- Completed and in-progress units
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Configuration
|
|
291
|
+
|
|
292
|
+
### Preferences
|
|
293
|
+
|
|
294
|
+
GSD preferences live in `~/.gsd/preferences.md` (global) or `.gsd/preferences.md` (project). Manage with `/gsd prefs`.
|
|
295
|
+
|
|
296
|
+
```yaml
|
|
297
|
+
---
|
|
298
|
+
version: 1
|
|
299
|
+
models:
|
|
300
|
+
research: claude-sonnet-4-6
|
|
301
|
+
planning: claude-opus-4-6
|
|
302
|
+
execution: claude-sonnet-4-6
|
|
303
|
+
completion: claude-sonnet-4-6
|
|
304
|
+
skill_discovery: suggest
|
|
305
|
+
auto_supervisor:
|
|
306
|
+
soft_timeout_minutes: 20
|
|
307
|
+
idle_timeout_minutes: 10
|
|
308
|
+
hard_timeout_minutes: 30
|
|
309
|
+
budget_ceiling: 50.00
|
|
310
|
+
---
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
**Key settings:**
|
|
314
|
+
|
|
315
|
+
| Setting | What it controls |
|
|
316
|
+
|---------|-----------------|
|
|
317
|
+
| `models.*` | Per-phase model selection (Opus for planning, Sonnet for execution, etc.) |
|
|
318
|
+
| `skill_discovery` | `auto` / `suggest` / `off` — how GSD finds and applies skills |
|
|
319
|
+
| `auto_supervisor.*` | Timeout thresholds for auto mode supervision |
|
|
320
|
+
| `budget_ceiling` | USD ceiling — auto mode pauses when reached |
|
|
321
|
+
| `uat_dispatch` | Enable automatic UAT runs after slice completion |
|
|
322
|
+
| `always_use_skills` | Skills to always load when relevant |
|
|
323
|
+
| `skill_rules` | Situational rules for skill routing |
|
|
324
|
+
|
|
325
|
+
### Bundled Tools
|
|
326
|
+
|
|
327
|
+
GSD ships with 13 extensions, all loaded automatically:
|
|
328
|
+
|
|
329
|
+
| Extension | What it provides |
|
|
330
|
+
|-----------|-----------------|
|
|
331
|
+
| **GSD** | Core workflow engine, auto mode, commands, dashboard |
|
|
332
|
+
| **Browser Tools** | Playwright-based browser for UI verification |
|
|
333
|
+
| **Search the Web** | Brave Search, Tavily, or Jina page extraction |
|
|
334
|
+
| **Google Search** | Gemini-powered web search with AI-synthesized answers |
|
|
335
|
+
| **Context7** | Up-to-date library/framework documentation |
|
|
336
|
+
| **Background Shell** | Long-running process management with readiness detection |
|
|
337
|
+
| **Subagent** | Delegated tasks with isolated context windows |
|
|
338
|
+
| **Mac Tools** | macOS native app automation via Accessibility APIs |
|
|
339
|
+
| **MCPorter** | Lazy on-demand MCP server integration |
|
|
340
|
+
| **Voice** | Real-time speech-to-text transcription (macOS) |
|
|
341
|
+
| **Slash Commands** | Custom command creation |
|
|
342
|
+
| **Ask User Questions** | Structured user input with single/multi-select |
|
|
343
|
+
| **Secure Env Collect** | Masked secret collection without manual .env editing |
|
|
344
|
+
|
|
345
|
+
### Bundled Agents
|
|
346
|
+
|
|
347
|
+
Three specialized subagents for delegated work:
|
|
348
|
+
|
|
349
|
+
| Agent | Role |
|
|
350
|
+
|-------|------|
|
|
351
|
+
| **Scout** | Fast codebase recon — returns compressed context for handoff |
|
|
352
|
+
| **Researcher** | Web research — finds and synthesizes current information |
|
|
353
|
+
| **Worker** | General-purpose execution in an isolated context window |
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Architecture
|
|
358
|
+
|
|
359
|
+
GSD is a TypeScript application that embeds the Pi coding agent SDK.
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
gsd (CLI binary)
|
|
363
|
+
└─ loader.ts Sets PI_PACKAGE_DIR, GSD env vars, dynamic-imports cli.ts
|
|
364
|
+
└─ cli.ts Wires SDK managers, loads extensions, starts InteractiveMode
|
|
365
|
+
├─ onboarding.ts First-run setup wizard (LLM provider + tool keys)
|
|
366
|
+
├─ wizard.ts Env hydration from stored auth.json credentials
|
|
367
|
+
├─ app-paths.ts ~/.gsd/agent/, ~/.gsd/sessions/, auth.json
|
|
368
|
+
├─ resource-loader.ts Syncs bundled extensions + agents to ~/.gsd/agent/
|
|
369
|
+
└─ src/resources/
|
|
370
|
+
├─ extensions/gsd/ Core GSD extension (auto, state, commands, ...)
|
|
371
|
+
├─ extensions/... 12 supporting extensions
|
|
372
|
+
├─ agents/ scout, researcher, worker
|
|
373
|
+
├─ AGENTS.md Agent routing instructions
|
|
374
|
+
└─ GSD-WORKFLOW.md Manual bootstrap protocol
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**Key design decisions:**
|
|
378
|
+
|
|
379
|
+
- **`pkg/` shim directory** — `PI_PACKAGE_DIR` points here (not project root) to avoid Pi's theme resolution collision with our `src/` directory. Contains only `piConfig` and theme assets.
|
|
380
|
+
- **Two-file loader pattern** — `loader.ts` sets all env vars with zero SDK imports, then dynamic-imports `cli.ts` which does static SDK imports. This ensures `PI_PACKAGE_DIR` is set before any SDK code evaluates.
|
|
381
|
+
- **Always-overwrite sync** — `npm update -g` takes effect immediately. Bundled extensions and agents are synced to `~/.gsd/agent/` on every launch, not just first run.
|
|
382
|
+
- **State lives on disk** — `.gsd/` is the source of truth. Auto mode reads it, writes it, and advances based on what it finds. No in-memory state survives across sessions.
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Requirements
|
|
387
|
+
|
|
388
|
+
- **Node.js** ≥ 20.6.0 (22+ recommended)
|
|
389
|
+
- **An LLM provider** — any of the 20+ supported providers (see [Use Any Model](#use-any-model))
|
|
390
|
+
- **Git** — initialized automatically if missing
|
|
391
|
+
|
|
392
|
+
Optional:
|
|
393
|
+
- Brave Search API key (web research)
|
|
394
|
+
- Tavily API key (web research — alternative to Brave)
|
|
395
|
+
- Google Gemini API key (web research via Gemini Search grounding)
|
|
396
|
+
- Context7 API key (library docs)
|
|
397
|
+
- Jina API key (page extraction)
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Use Any Model
|
|
402
|
+
|
|
403
|
+
GSD isn't locked to one provider. It runs on the [Pi SDK](https://github.com/badlogic/pi-mono), which supports **20+ model providers** out of the box. Use different models for different phases — Opus for planning, Sonnet for execution, a fast model for research.
|
|
404
|
+
|
|
405
|
+
### Built-in Providers
|
|
406
|
+
|
|
407
|
+
Anthropic, OpenAI, Google (Gemini), OpenRouter, GitHub Copilot, Amazon Bedrock, Azure OpenAI, Google Vertex, Groq, Cerebras, Mistral, xAI, HuggingFace, Vercel AI Gateway, and more.
|
|
408
|
+
|
|
409
|
+
### OAuth / Max Plans
|
|
410
|
+
|
|
411
|
+
If you have a **Claude Max**, **Codex**, or **GitHub Copilot** subscription, you can use those directly — Pi handles the OAuth flow. No API key needed.
|
|
412
|
+
|
|
413
|
+
### OpenRouter
|
|
414
|
+
|
|
415
|
+
[OpenRouter](https://openrouter.ai) gives you access to hundreds of models through a single API key. Use it to run GSD with Llama, DeepSeek, Qwen, or anything else OpenRouter supports.
|
|
416
|
+
|
|
417
|
+
### Per-Phase Model Selection
|
|
418
|
+
|
|
419
|
+
In your preferences (`/gsd prefs`), assign different models to different phases:
|
|
420
|
+
|
|
421
|
+
```yaml
|
|
422
|
+
models:
|
|
423
|
+
research: openrouter/deepseek/deepseek-r1
|
|
424
|
+
planning: claude-opus-4-6
|
|
425
|
+
execution: claude-sonnet-4-6
|
|
426
|
+
completion: claude-sonnet-4-6
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
Use expensive models where quality matters (planning, complex execution) and cheaper/faster models where speed matters (research, simple completions). GSD tracks cost per-model so you can see exactly where your budget goes.
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Star History
|
|
434
|
+
|
|
435
|
+
<a href="https://star-history.com/#gsd-build/gsd-2&Date">
|
|
436
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=gsd-build/gsd-2&type=Date" />
|
|
437
|
+
</a>
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## License
|
|
442
|
+
|
|
443
|
+
[MIT License](LICENSE)
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
<div align="center">
|
|
448
|
+
|
|
449
|
+
**The original GSD showed what was possible. This version delivers it.**
|
|
450
|
+
|
|
451
|
+
**`npm install -g gsd-pi && gsd`**
|
|
452
|
+
|
|
453
|
+
</div>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { homedir } from 'os';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
export const appRoot = join(homedir(), '.gsd');
|
|
4
|
+
export const agentDir = join(appRoot, 'agent');
|
|
5
|
+
export const sessionsDir = join(appRoot, 'sessions');
|
|
6
|
+
export const authFilePath = join(agentDir, 'auth.json');
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|