gsdd-cli 0.1.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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +528 -0
  3. package/agents/DISTILLATION.md +306 -0
  4. package/agents/README.md +53 -0
  5. package/agents/debugger.md +82 -0
  6. package/agents/executor.md +394 -0
  7. package/agents/integration-checker.md +318 -0
  8. package/agents/mapper.md +103 -0
  9. package/agents/planner.md +296 -0
  10. package/agents/researcher.md +84 -0
  11. package/agents/roadmapper.md +296 -0
  12. package/agents/synthesizer.md +236 -0
  13. package/agents/verifier.md +337 -0
  14. package/bin/adapters/agents.mjs +33 -0
  15. package/bin/adapters/claude.mjs +145 -0
  16. package/bin/adapters/codex.mjs +58 -0
  17. package/bin/adapters/index.mjs +20 -0
  18. package/bin/adapters/opencode.mjs +237 -0
  19. package/bin/gsdd.mjs +102 -0
  20. package/bin/lib/cli-utils.mjs +28 -0
  21. package/bin/lib/health.mjs +248 -0
  22. package/bin/lib/init.mjs +379 -0
  23. package/bin/lib/manifest.mjs +134 -0
  24. package/bin/lib/models.mjs +379 -0
  25. package/bin/lib/phase.mjs +237 -0
  26. package/bin/lib/rendering.mjs +95 -0
  27. package/bin/lib/templates.mjs +207 -0
  28. package/distilled/DESIGN.md +1286 -0
  29. package/distilled/README.md +169 -0
  30. package/distilled/SKILL.md +85 -0
  31. package/distilled/templates/agents.block.md +90 -0
  32. package/distilled/templates/agents.md +13 -0
  33. package/distilled/templates/auth-matrix.md +78 -0
  34. package/distilled/templates/codebase/architecture.md +110 -0
  35. package/distilled/templates/codebase/concerns.md +95 -0
  36. package/distilled/templates/codebase/conventions.md +193 -0
  37. package/distilled/templates/codebase/stack.md +96 -0
  38. package/distilled/templates/delegates/mapper-arch.md +26 -0
  39. package/distilled/templates/delegates/mapper-concerns.md +27 -0
  40. package/distilled/templates/delegates/mapper-quality.md +28 -0
  41. package/distilled/templates/delegates/mapper-tech.md +25 -0
  42. package/distilled/templates/delegates/plan-checker.md +55 -0
  43. package/distilled/templates/delegates/researcher-architecture.md +30 -0
  44. package/distilled/templates/delegates/researcher-features.md +30 -0
  45. package/distilled/templates/delegates/researcher-pitfalls.md +30 -0
  46. package/distilled/templates/delegates/researcher-stack.md +30 -0
  47. package/distilled/templates/delegates/researcher-synthesizer.md +31 -0
  48. package/distilled/templates/research/architecture.md +57 -0
  49. package/distilled/templates/research/features.md +23 -0
  50. package/distilled/templates/research/pitfalls.md +46 -0
  51. package/distilled/templates/research/stack.md +45 -0
  52. package/distilled/templates/research/summary.md +67 -0
  53. package/distilled/templates/roadmap.md +62 -0
  54. package/distilled/templates/spec.md +110 -0
  55. package/distilled/workflows/audit-milestone.md +220 -0
  56. package/distilled/workflows/execute.md +270 -0
  57. package/distilled/workflows/map-codebase.md +246 -0
  58. package/distilled/workflows/new-project.md +418 -0
  59. package/distilled/workflows/pause.md +121 -0
  60. package/distilled/workflows/plan.md +383 -0
  61. package/distilled/workflows/progress.md +199 -0
  62. package/distilled/workflows/quick.md +187 -0
  63. package/distilled/workflows/resume.md +152 -0
  64. package/distilled/workflows/verify.md +307 -0
  65. package/package.json +45 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 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,528 @@
1
+ <div align="center">
2
+
3
+ # GSD Distilled
4
+
5
+ **A portable, spec-driven development kernel for AI coding agents.**
6
+
7
+ Extracted from [Get Shit Done](https://github.com/gsd-build/get-shit-done). Same long-horizon delivery spine — fewer moving parts.
8
+
9
+ [![npm version](https://img.shields.io/npm/v/gsdd-cli?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/gsdd-cli)
10
+ [![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)](LICENSE)
11
+ [![Tests](https://img.shields.io/badge/assertions-862_passing-brightgreen?style=for-the-badge)](tests/)
12
+
13
+ ```bash
14
+ npx gsdd-cli init
15
+ ```
16
+
17
+ **Works with Claude Code, OpenCode, Codex CLI, Cursor, Copilot, and Gemini CLI.**
18
+
19
+ </div>
20
+
21
+ ---
22
+
23
+ ## What This Is
24
+
25
+ GSDD is a distilled fork of GSD. It preserves the high-leverage parts of long-horizon AI-assisted development:
26
+
27
+ - **Persistent artifacts** — SPEC.md, ROADMAP.md, and config.json as the durable workspace
28
+ - **Codebase mapping** — 4 parallel mappers produce STACK, ARCHITECTURE, CONVENTIONS, CONCERNS
29
+ - **Scoped planning** — research, backward planning, fresh-context adversarial plan checking
30
+ - **Execution** — wave-based parallel execution with fresh context per plan
31
+ - **Verification** — Exists/Substantive/Wired gate, anti-pattern scan
32
+ - **Milestone audit** — cross-phase integration, requirements coverage, E2E flows
33
+ - **Session management** — pause work with checkpoint, resume with context restoration and routing
34
+
35
+ What it strips: GSD's broader operator surface (32 workflows, 11 agents, discovery modes, sprint ceremony, a settings flow, and additional operator ergonomics). GSDD has 10 workflows and 9 roles.
36
+
37
+ **Target user:** Developer or small team that wants a spec-driven long-horizon kernel, not full operator comfort.
38
+
39
+ ---
40
+
41
+ ## Getting Started
42
+
43
+ ```bash
44
+ npx gsdd-cli init
45
+ ```
46
+
47
+ This creates:
48
+
49
+ 1. `.planning/` — durable workspace with templates, role contracts, and config
50
+ 2. `.agents/skills/gsdd-*` — portable workflow entrypoints
51
+ 3. Tool-specific adapters if detected (Claude skills/commands/agents, OpenCode commands/agents, Codex agents)
52
+
53
+ Then run the new-project workflow to produce `.planning/SPEC.md` and `.planning/ROADMAP.md`.
54
+
55
+ ### Quickstart (after init)
56
+
57
+ Your tool determines how you invoke workflows:
58
+
59
+ - **Claude Code / OpenCode:** Use slash commands directly — `/gsdd-new-project`, `/gsdd-plan`, etc.
60
+ - **Codex CLI:** Use skill references — `$gsdd-new-project`, `$gsdd-plan`, etc.
61
+ - **Cursor / Copilot / Gemini / Others:** Open `.agents/skills/gsdd-<workflow>/SKILL.md` and follow the instructions. The root `AGENTS.md` governance block keeps the agent on track.
62
+
63
+ First workflow to run: **new-project** — it asks about your goals, audits the codebase (if brownfield), and produces `.planning/SPEC.md` + `.planning/ROADMAP.md`.
64
+
65
+ ### Platform Adapters
66
+
67
+ GSDD generates adapters for whichever tools you use:
68
+
69
+ ```bash
70
+ npx gsdd-cli init # Auto-detect installed tools
71
+ npx gsdd-cli init --tools claude # Claude Code: .claude/skills + commands + agents
72
+ npx gsdd-cli init --tools opencode # OpenCode: .opencode/commands + agents
73
+ npx gsdd-cli init --tools codex # Codex CLI: portable gsdd-plan skill + .codex/agents checker
74
+ npx gsdd-cli init --tools agents # Root AGENTS.md fallback
75
+ npx gsdd-cli init --tools all # All of the above
76
+ ```
77
+
78
+ | Platform | Tier | What's generated |
79
+ |----------|------|-----------------|
80
+ | **All** (default) | Open standard | `.agents/skills/gsdd-*/SKILL.md` — portable workflow entrypoints (always generated) |
81
+ | **Claude Code** | Native | `.claude/skills/`, `.claude/commands/`, `.claude/agents/` — slash commands work immediately |
82
+ | **OpenCode** | Native | `.opencode/commands/`, `.opencode/agents/` — slash commands work immediately |
83
+ | **Codex CLI** | Native | `.codex/agents/gsdd-plan-checker.toml` — skill reference `$gsdd-plan` works immediately |
84
+ | **Cursor / Copilot / Gemini** | Governance | Root `AGENTS.md` block — governs agent behavior; invoke workflows by opening `.agents/skills/gsdd-*/SKILL.md` directly |
85
+
86
+ ### Updating
87
+
88
+ ```bash
89
+ npx gsdd-cli update # Regenerate adapters from latest sources
90
+ npx gsdd-cli update --tools claude # Update specific platform only
91
+ npx gsdd-cli update --templates # Refresh .planning/templates/ and role contracts from framework source
92
+ ```
93
+
94
+ ### Headless Mode (CI / Automation)
95
+
96
+ For non-interactive environments:
97
+
98
+ ```bash
99
+ npx gsdd-cli init --auto --tools claude
100
+ npx gsdd-cli init --auto --tools claude --brief path/to/PRD.md
101
+ ```
102
+
103
+ `--auto` skips interactive prompts, uses smart defaults (`autoAdvance: true` in config). `--brief` copies a project document to `.planning/PROJECT_BRIEF.md` for `new-project` to consume.
104
+
105
+ ### Team Use
106
+
107
+ - **Shared state:** Set `commitDocs: true` (default) — `.planning/` is tracked in git. Everyone sees the same spec, roadmap, and phase plans.
108
+ - **Onboarding:** After cloning, run `npx gsdd-cli init` to generate tool-specific adapters. `.planning/` is already tracked — no re-initialization needed.
109
+ - **Session handoff:** Use `gsdd-pause` / `gsdd-resume` to hand off work. The checkpoint (`.planning/.continue-here.md`) captures context for the next person.
110
+ - **Adapter isolation:** Each developer runs `gsdd init --tools <their-tool>`. Adapter files don't conflict across tools.
111
+
112
+ For detailed workflow diagrams, recovery procedures, and extended examples, see the [User Guide](docs/USER-GUIDE.md).
113
+
114
+ ---
115
+
116
+ ## How It Works
117
+
118
+ ### The Core Loop
119
+
120
+ ```
121
+ init → [plan → execute → verify] × N phases → audit-milestone → done
122
+ ↕ pause/resume (any point)
123
+ ```
124
+
125
+ ### 1. Initialize Project
126
+
127
+ Run the `gsdd-new-project` workflow. The system:
128
+
129
+ 1. **Questions** — asks until it understands your idea (goals, constraints, tech, edge cases)
130
+ 2. **Codebase audit** — if brownfield, runs 4 parallel mappers (or prompts for `/gsdd-map-codebase` first)
131
+ 3. **Research** — spawns parallel researchers to investigate the domain (configurable depth: fast/balanced/deep)
132
+ 4. **Spec + Roadmap** — produces `SPEC.md` (living specification) and `ROADMAP.md` (phased delivery plan)
133
+
134
+ **Creates:** `.planning/SPEC.md`, `.planning/ROADMAP.md`
135
+
136
+ ---
137
+
138
+ ### 2. Plan Phase
139
+
140
+ Run `gsdd-plan` for the current phase. The system:
141
+
142
+ 1. **Researches** — investigates how to implement this phase (if `workflow.research` is enabled)
143
+ 2. **Plans** — creates atomic task plans with XML structure
144
+ 3. **Checks** — a separate agent in a fresh context window reviews the plan against 7 dimensions (requirement coverage, task completeness, dependency correctness, key-link completeness, scope sanity, must-have quality, context compliance). If the plan fails, it revises and re-checks — up to 3 cycles before escalating to the human. Output is typed JSON so orchestration is machine-parseable, not prompt-dependent.
145
+
146
+ Each plan is small enough to execute in a fresh context window. The checker runs in a separate context from the planner — this is the [ICLR-validated](https://arxiv.org/abs/2310.12397) pattern for catching blind spots the planner inherits from its own reasoning.
147
+
148
+ **Creates:** Phase plans in `.planning/phases/`
149
+
150
+ ---
151
+
152
+ ### 3. Execute Phase
153
+
154
+ Run `gsdd-execute`. The system:
155
+
156
+ 1. **Runs plans in waves** — parallel where possible, sequential when dependent
157
+ 2. **Fresh context per plan** — 200k tokens purely for implementation
158
+ 3. **Clean commits** — follows repo conventions, no framework-imposed commit format
159
+ 4. **Creates summaries** — records what happened for verification
160
+
161
+ **Creates:** Phase summaries in `.planning/phases/`
162
+
163
+ ---
164
+
165
+ ### 4. Verify Phase
166
+
167
+ Run `gsdd-verify`. The system checks three levels:
168
+
169
+ 1. **Exists** — do the expected files exist?
170
+ 2. **Substantive** — is the code real, not stubs?
171
+ 3. **Wired** — is it connected and functional?
172
+
173
+ Plus anti-pattern scan (TODO/FIXME/HACK markers, empty catches).
174
+
175
+ **Creates:** Phase verification report in `.planning/phases/`
176
+
177
+ ---
178
+
179
+ ### 5. Repeat and Audit
180
+
181
+ Loop **plan → execute → verify** for each phase in the roadmap.
182
+
183
+ When all phases are done, run `gsdd-audit-milestone` to verify:
184
+
185
+ - Cross-phase integration (do the pieces connect?)
186
+ - Requirements coverage (did we deliver what SPEC.md promised?)
187
+ - E2E flows (do user workflows complete end-to-end?)
188
+
189
+ ---
190
+
191
+ ### Quick Mode
192
+
193
+ - `Claude Code / OpenCode`: `/gsdd-quick`
194
+ - `Codex CLI`: `$gsdd-quick`
195
+ - `Cursor / Copilot / Gemini / Others`: open `.agents/skills/gsdd-quick/SKILL.md`
196
+
197
+ For sub-hour tasks that don't need the full phase cycle:
198
+
199
+ - Same roles: planner + executor, conditional verifier
200
+ - Skips research: no researcher, no synthesizer
201
+ - Separate tracking: lives in `.planning/quick/`, logged in `LOG.md`
202
+ - Advisory git: follows repo conventions, no framework-imposed commit format
203
+
204
+ Use for: bug fixes, small features, config changes, one-off tasks.
205
+
206
+ **Creates:** `.planning/quick/NNN-slug/PLAN.md`, `SUMMARY.md`, updates `LOG.md`
207
+
208
+ ---
209
+
210
+ ## Workflows
211
+
212
+ GSDD has 10 workflows, run via generated skills or adapters:
213
+
214
+ | Workflow | What it does |
215
+ |----------|--------------|
216
+ | `gsdd-new-project` | Full initialization: questioning, codebase audit, research, spec, roadmap |
217
+ | `gsdd-map-codebase` | Map existing codebase with 4 parallel mappers |
218
+ | `gsdd-plan` | Research + plan + check for a phase |
219
+ | `gsdd-execute` | Execute phase plan: implement tasks, verify changes |
220
+ | `gsdd-verify` | Verify completed phase: 3-level checks, anti-pattern scan |
221
+ | `gsdd-audit-milestone` | Audit milestone: cross-phase integration, requirements coverage, E2E flows |
222
+ | `gsdd-quick` | Quick task: plan and execute sub-hour work outside the phase cycle |
223
+ | `gsdd-pause` | Pause work: save session context to checkpoint for seamless resumption |
224
+ | `gsdd-resume` | Resume work: restore context from artifacts and route to next action |
225
+ | `gsdd-progress` | Show project status and route to next action |
226
+
227
+ Workflows are agent skills or commands, not plain shell utilities. How you invoke them depends on your platform:
228
+
229
+ | Platform | How to invoke workflows |
230
+ |----------|------------------------|
231
+ | Claude Code | `/gsdd-plan` (slash command, works immediately after init) |
232
+ | OpenCode | `/gsdd-plan` (slash command, works immediately after init) |
233
+ | Codex CLI | `$gsdd-plan` (skill reference, works immediately after init) |
234
+ | Cursor / Copilot / Gemini | Open `.agents/skills/gsdd-plan/SKILL.md` and paste or reference its content. The `AGENTS.md` governance block steers agent behavior. |
235
+
236
+ ## CLI Commands
237
+
238
+ | Command | What it does |
239
+ |---------|--------------|
240
+ | `gsdd init [--tools <platform>]` | Set up `.planning/`, generate adapters |
241
+ | `gsdd update [--tools <platform>] [--templates]` | Regenerate adapters; `--templates` refreshes `.planning/templates/` and role contracts |
242
+ | `gsdd health [--json]` | Check workspace integrity (healthy/degraded/broken) |
243
+ | `gsdd find-phase [N]` | Show phase info as JSON (for agent consumption) |
244
+ | `gsdd verify <N>` | Run artifact checks for phase N |
245
+ | `gsdd scaffold phase <N> [name]` | Create a new phase plan file |
246
+ | `gsdd models [show\|profile\|set\|...]` | Inspect and manage model profile propagation |
247
+ | `gsdd help` | Show all commands |
248
+
249
+ ---
250
+
251
+ ## Architecture
252
+
253
+ ### Roles (9 canonical)
254
+
255
+ GSDD consolidates GSD's agent surface into 9 roles with durable contracts:
256
+
257
+ | Role | Responsibility |
258
+ |------|---------------|
259
+ | **Mapper** | Codebase analysis — produces STACK, ARCHITECTURE, CONVENTIONS, CONCERNS |
260
+ | **Researcher** | Domain investigation — merges GSD's project + phase researcher |
261
+ | **Synthesizer** | Research consolidation (conditional — skipped in fast mode) |
262
+ | **Planner** | Phase planning — absorbs plan-checking responsibility |
263
+ | **Executor** | Task implementation |
264
+ | **Verifier** | Phase verification — Exists/Substantive/Wired gate |
265
+ | **Roadmapper** | Roadmap generation from spec |
266
+ | **Integration Checker** | Cross-phase wiring, API coverage, auth protection, E2E flows |
267
+ | **Debugger** | Utility role for systematic debugging |
268
+
269
+ ### Two-Layer Architecture
270
+
271
+ - **Role contracts** (`agents/*.md`) — durable, contain the full behavioral specification
272
+ - **Delegates** (`distilled/templates/delegates/*.md`) — thin wrappers that reference roles and provide task-specific context
273
+
274
+ 10 delegates: 4 mapper, 4 researcher, 1 synthesizer, 1 plan-checker. Workflows use `<delegate>` blocks to dispatch work. For detailed GSD-to-GSDD role distillation rationale, see [`agents/DISTILLATION.md`](agents/DISTILLATION.md).
275
+
276
+ ### Adapter Architecture
277
+
278
+ GSDD generates vendor-specific files from vendor-agnostic markdown — it does not convert from one vendor format to another. This means every adapter gets first-class output shaped to its platform's native capabilities.
279
+
280
+ | Adapter | Kind | Strategy |
281
+ |---------|------|----------|
282
+ | **Claude Code** | `native_capable` | Skill-primary plan surface (stays in main context to spawn checker subagent), thin command alias, native `gsdd-plan-checker` agent |
283
+ | **OpenCode** | `native_capable` | Specialized `/gsdd-plan` command (`subtask: false`), hidden `gsdd-plan-checker` subagent (`mode: subagent`) |
284
+ | **Codex CLI** | `native_capable` | Portable skill as entry surface, `.codex/agents/gsdd-plan-checker.toml` (read-only, high reasoning effort) |
285
+ | **Cursor / Copilot / Gemini** | `governance_only` | Root `AGENTS.md` block governs agent behavior; invoke workflows by opening `.agents/skills/gsdd-*/SKILL.md` directly |
286
+
287
+ All adapters render the plan-checker from a single source (`distilled/templates/delegates/plan-checker.md`). Each adapter shapes the output to its platform's native mechanics, and the portable skill remains the shared workflow source.
288
+
289
+ Cursor, Copilot, and Gemini CLI generate the same root `AGENTS.md` governance block as `--tools agents`. They do not have native adapter surfaces — invoke workflows by opening `.agents/skills/gsdd-*/SKILL.md` directly.
290
+
291
+ Model IDs pass through a two-layer injection guard: a regex whitelist (`/^[a-zA-Z0-9._\/:@-]+$/`) at the CLI boundary, plus format-specific escaping (TOML string escaping, triple-quote break prevention) at the adapter layer.
292
+
293
+ ### Artifacts
294
+
295
+ | File | Purpose |
296
+ |------|---------|
297
+ | `.planning/SPEC.md` | Living specification — replaces GSD's separate PROJECT.md + REQUIREMENTS.md |
298
+ | `.planning/ROADMAP.md` | Phased delivery plan with inline status — replaces STATE.md |
299
+ | `.planning/config.json` | Project configuration (research depth, workflow toggles, git protocol) |
300
+ | `.planning/phases/` | Plans, summaries, and verification reports per phase |
301
+ | `.planning/research/` | Research outputs |
302
+ | `.planning/codebase/` | Codebase maps (4 files) |
303
+ | `.planning/quick/` | Quick task tracking |
304
+ | `.planning/.continue-here.md` | Session checkpoint (created by pause, consumed by resume) |
305
+
306
+ ### Advisory Git Protocol
307
+
308
+ GSDD does not impose commit formats, branch naming, or one-commit-per-task rules. Git guidance is advisory — repository and team conventions take precedence:
309
+
310
+ - **Branching** — follow existing repo conventions
311
+ - **Commits** — group changes logically, no framework-imposed format
312
+ - **PRs** — follow existing repo review workflow
313
+
314
+ Defaults configurable in `.planning/config.json` under `gitProtocol`.
315
+
316
+ ### What to Track in Git
317
+
318
+ | Path | Track? | Why |
319
+ |------|--------|-----|
320
+ | `.planning/` | Yes (default) | Shared project state — spec, roadmap, phase plans. Controlled by `commitDocs` in config. |
321
+ | `.agents/skills/` | Yes | Portable workflow entrypoints. Generated, safe to track. |
322
+ | `.claude/`, `.opencode/`, `.codex/` | Yes | Tool-specific adapters. Don't conflict across tools. |
323
+ | `AGENTS.md` (root) | Yes (if generated) | Governance block. Uses bounded upsert — won't overwrite existing content. |
324
+
325
+ No secrets or credentials are generated. Set `commitDocs: false` for local-only planning state.
326
+
327
+ ### Context Isolation
328
+
329
+ Orchestrators stay thin. Delegates write documents to disk and return summaries — the orchestrator never accumulates full research or plan content in its context window. This keeps the main session fast and responsive even during deep phases.
330
+
331
+ ---
332
+
333
+ ## Configuration
334
+
335
+ `gsdd init` creates `.planning/config.json` interactively (or with defaults in non-interactive mode).
336
+
337
+ | Setting | Options | Default | What it controls |
338
+ |---------|---------|---------|------------------|
339
+ | `researchDepth` | `fast`, `balanced`, `deep` | `balanced` | Research thoroughness per phase |
340
+ | `parallelization` | `true`, `false` | `true` | Run independent agents simultaneously |
341
+ | `commitDocs` | `true`, `false` | `true` | Track `.planning/` in git |
342
+ | `modelProfile` | `balanced`, `quality`, `budget` | `balanced` | Portable semantic model tier |
343
+
344
+ **When to use each profile:**
345
+ - **`quality`** — maximize plan-checking rigor. Use for production milestones or security-sensitive work.
346
+ - **`balanced`** (default) — good checking at reasonable cost. Suitable for most development.
347
+ - **`budget`** — minimize cost. Use for prototyping or familiar domains where you'll review plans manually.
348
+
349
+ The profile only affects the plan-checker agent. Disable `workflow.planCheck` entirely to skip checking.
350
+
351
+ Optional model-control keys:
352
+
353
+ | Setting | What it controls |
354
+ |---------|------------------|
355
+ | `agentModelProfiles.<agent>` | Per-agent semantic override. Current supported agent id: `plan-checker`. |
356
+ | `runtimeModelOverrides.<runtime>.<agent>` | Exact runtime-native model override. Supported targets: `claude.plan-checker`, `opencode.plan-checker`, `codex.plan-checker`. |
357
+
358
+ Runtime behavior:
359
+ - Claude translates semantic tiers to native aliases for the checker agent.
360
+ - OpenCode inherits its runtime model by default; GSDD only injects an exact OpenCode `model:` when you set an explicit runtime override.
361
+ - Codex inherits its session model by default; GSDD only injects an explicit `model` in the TOML when you set an explicit runtime override.
362
+
363
+ CLI:
364
+ - `gsdd models show`
365
+ - `gsdd models profile <quality|balanced|budget>`
366
+ - `gsdd models agent-profile --agent plan-checker --profile <quality|balanced|budget>`
367
+ - `gsdd models clear-agent-profile --agent plan-checker`
368
+ - `gsdd models set --runtime <claude|opencode|codex> --agent plan-checker --model <id>`
369
+ - `gsdd models clear --runtime <claude|opencode|codex> --agent plan-checker`
370
+
371
+ ### Workflow Toggles
372
+
373
+ Each adds quality but costs tokens and time:
374
+
375
+ | Setting | Default | What it does |
376
+ |---------|---------|--------------|
377
+ | `workflow.research` | `true` | Research domain before planning each phase |
378
+ | `workflow.planCheck` | `true` | Verify plans achieve goals before execution |
379
+ | `workflow.verifier` | `true` | Verify phase deliverables after execution |
380
+
381
+ ### Git Protocol
382
+
383
+ Advisory defaults, overridden by repo conventions:
384
+
385
+ | Setting | Default |
386
+ |---------|---------|
387
+ | `gitProtocol.branch` | Follow existing repo conventions |
388
+ | `gitProtocol.commit` | Logical grouping, no phase/task IDs |
389
+ | `gitProtocol.pr` | Follow existing review workflow |
390
+
391
+ ---
392
+
393
+ ## Troubleshooting
394
+
395
+ **First step:** Run `gsdd health` — it checks workspace integrity and prints actionable fix instructions.
396
+
397
+ | Problem | What to do |
398
+ |---------|------------|
399
+ | Workspace feels broken | `gsdd health` — checks errors, warnings, info |
400
+ | Lost track of progress | Run `gsdd-progress` — reads artifacts, shows status |
401
+ | Need context from last session | Run `gsdd-resume` — restores state, routes to next action |
402
+ | Plans seem wrong | Check `workflow.research: true` in config |
403
+ | Execution produces stubs | Re-plan with smaller scope (2-5 tasks per plan) |
404
+ | Templates out of date | `npx gsdd-cli update --templates` — warns before overwriting |
405
+ | Model costs too high | `gsdd models profile budget` + disable `workflow.planCheck` |
406
+
407
+ For detailed troubleshooting and recovery procedures, see the [User Guide](docs/USER-GUIDE.md#troubleshooting).
408
+
409
+ ---
410
+
411
+ ## Design Decisions
412
+
413
+ GSDD makes 28 documented design decisions relative to GSD, each with evidence from source files and external research. See [`distilled/DESIGN.md`](distilled/DESIGN.md) for the full rationale.
414
+
415
+ Key choices:
416
+ - **4-file codebase standard** — drop state that rots (STRUCTURE, INTEGRATIONS, TESTING), keep rules that don't
417
+ - **Agent consolidation** — 9 roles from GSD's 11, with explicit reduced-assurance mode when independent checking isn't available
418
+ - **Adapter generation over conversion** — generate vendor-specific files from vendor-agnostic markdown instead of converting from Claude-first
419
+ - **Advisory git** — repo conventions over framework defaults
420
+ - **Context isolation** — summaries up, documents to disk
421
+ - **Mechanical invariant enforcement** — structural properties guarded by assertions, not code review
422
+ - **Model profile propagation** — semantic tiers (`quality`/`balanced`/`budget`) translated to native model IDs per runtime
423
+ - **Template versioning** — SHA-256 generation manifest detects user modifications before overwriting
424
+ - **CLI composition root boundary** — 100-line facade delegates to extracted modules
425
+ - **Codex CLI native adapter** — portable skill entry + TOML checker agent, documented platform gaps tracked against upstream issues
426
+
427
+ ---
428
+
429
+ ## Testing
430
+
431
+ GSDD has 862 structural assertions across 9 test files — 41 named suites that guard properties PRs repeatedly fixed manually. These are not unit tests for application code; they are invariant checks on the specification itself.
432
+
433
+ ### Invariant Suites (I-series)
434
+
435
+ Structural contracts that prevent drift between roles, delegates, workflows, and artifacts:
436
+
437
+ | Suite | What it guards |
438
+ |-------|---------------|
439
+ | **I1** | Delegate-role reference integrity — 10 delegates resolve to existing role contracts |
440
+ | **I2** | Role section structure — 9 roles have role def, scope, output format, success criteria |
441
+ | **I3** | Delegate thinness — no leaked role-contract sections in delegates |
442
+ | **I3-gate** | New-project approval gates — required human checkpoints present |
443
+ | **I4** | Workflow references — 10 workflows, all delegate/role refs resolve |
444
+ | **I5** | Session management — no vendor APIs, no STATE.md, checkpoint contract |
445
+ | **I5b** | Session workflow scope boundaries |
446
+ | **I6** | Artifact schema definitions |
447
+ | **I7** | Plan-checker dimension integrity — 7 dimensions present and correctly structured |
448
+ | **I8** | Workflow vendor API cleanliness — no platform-specific calls in portable workflows |
449
+ | **I9** | No deprecated content — no vendor paths, dropped files, legacy tooling |
450
+ | **I10** | Mandatory initial-read enforcement on hardened lifecycle roles |
451
+ | **S13** | STATE.md elimination — D7 compliance verified across all artifacts |
452
+
453
+ ### Guard Suites (G-series)
454
+
455
+ Mechanical enforcement that catches cross-document inconsistencies:
456
+
457
+ | Suite | What it guards |
458
+ |-------|---------------|
459
+ | **G1** | Cross-document schema consistency |
460
+ | **G3** | File size guards — role contracts and delegates within bounds |
461
+ | **G4** | XML section well-formedness across all workflows |
462
+ | **G5** | Artifact lifecycle chain — plan → execute → verify → audit linkage |
463
+ | **G6** | DESIGN.md decision registry — ToC matches actual decisions |
464
+ | **G7** | Delegate thinness (mechanical) |
465
+ | **G8** | Auto-mode contract |
466
+ | **G9** | Generation manifest contract |
467
+ | **G10** | CLI module boundary — composition root stays thin |
468
+ | **G11** | Codex doc contract — no deprecated references |
469
+ | **G12** | Documentation accuracy — decision counts, workflow counts, CLI commands, ghost commands |
470
+ | **G13** | Models pre-init safety — mutation commands guard uninitialized workspaces |
471
+ | **G14** | Health module contract — export, command wiring, help text, fix instructions |
472
+ | **G15** | OWASP authorization matrix — template format, integration-checker Step 4a, backwards compat |
473
+ | **G16** | Distillation ledger — DISTILLATION.md role coverage, merger table, D22 registration |
474
+ | **G17** | Mapper output quantification — template sections, delegate instructions, D23 registration |
475
+ | **G18** | Consumer governance completeness — agents.block.md workflow coverage, CHANGELOG accuracy |
476
+ | **G19** | Consumer first-run accuracy — honest platform tiers, per-platform invocation guidance, Quickstart section |
477
+ | **G20** | Session continuity contract — pause checkpoint format, resume routing, progress detection, cross-workflow paths |
478
+
479
+ ### Scenario Suites (S-series)
480
+
481
+ Golden-path eval tests that verify artifact-chain contracts across end-to-end workflows:
482
+
483
+ | Suite | What it covers |
484
+ |-------|---------------|
485
+ | **S1** | Greenfield golden path — init → new-project → plan → execute → verify → audit-milestone |
486
+ | **S2** | Brownfield path — map-codebase delegates, codebase map references, mapper role |
487
+ | **S3** | Quick-task path — isolation from ROADMAP/research, role references |
488
+ | **S4** | Native runtime chain — Claude + Codex checker completeness, 7 dimensions |
489
+ | **S5** | Config-to-content propagation — default config values reflected in generated artifacts |
490
+
491
+ ### Functional Test Suites
492
+
493
+ | Suite | What it covers |
494
+ |-------|---------------|
495
+ | Init & update | Planning structure, config, templates, adapters, idempotency, auto mode |
496
+ | Models | Profile propagation, runtime overrides, CLI commands, injection prevention |
497
+ | Generation manifest | SHA-256 hashing, modification detection, dry-run mode |
498
+ | Plan adapters | Portable skill neutrality, TOML format, triple-quote escaping |
499
+ | Audit milestone | Integration checking contract |
500
+ | Health | Pre-init guard, all check categories, verdict logic, JSON/human output |
501
+
502
+ ```bash
503
+ npm run test:gsdd
504
+ ```
505
+
506
+ ---
507
+
508
+ ## Relationship to GSD
509
+
510
+ GSDD is a distilled fork of [Get Shit Done](https://github.com/gsd-build/get-shit-done). It is **not** a full replacement for current upstream GSD.
511
+
512
+ **What GSDD preserves** (~76% of core method): the long-horizon delivery spine — persistent artifacts, codebase mapping, scoped planning, execution, verification, and milestone auditing.
513
+
514
+ **What GSDD does not cover** (~44% of full upstream surface): GSD currently exposes 32 workflow files and 11 agent files including discovery modes, a settings flow, extra operator ergonomics, and broader session-management/control-plane surface area. GSDD intentionally does not recreate this full surface.
515
+
516
+ **The trade-off:** Fewer moving parts for the human operator. Cleaner role contracts and a simpler artifact model. But reduced operator comfort and limited control-plane features (no telemetry, no artifact linting). Health diagnostics are available via `gsdd health`.
517
+
518
+ ---
519
+
520
+ ## Credits
521
+
522
+ GSDD is a distilled fork of [Get Shit Done](https://github.com/gsd-build/get-shit-done) by [Lex Christopherson](https://github.com/glittercowboy), licensed under MIT.
523
+
524
+ ---
525
+
526
+ ## License
527
+
528
+ MIT License. See [LICENSE](LICENSE) for details.