gsdd-cli 0.26.0 → 0.28.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 (82) hide show
  1. package/README.md +55 -23
  2. package/agents/DISTILLATION.md +2 -2
  3. package/agents/README.md +4 -4
  4. package/agents/approach-explorer.md +4 -4
  5. package/agents/executor.md +14 -14
  6. package/agents/integration-checker.md +2 -2
  7. package/agents/researcher.md +2 -2
  8. package/agents/roadmapper.md +6 -6
  9. package/agents/synthesizer.md +18 -18
  10. package/agents/verifier.md +2 -2
  11. package/bin/adapters/agents.mjs +3 -3
  12. package/bin/adapters/claude.mjs +16 -14
  13. package/bin/adapters/opencode.mjs +15 -12
  14. package/bin/gsdd.mjs +16 -13
  15. package/bin/lib/{models.mjs → config.mjs} +23 -16
  16. package/bin/lib/control-map.mjs +17 -488
  17. package/bin/lib/global-install.mjs +16 -3
  18. package/bin/lib/health-truth.mjs +8 -13
  19. package/bin/lib/health.mjs +25 -39
  20. package/bin/lib/init-flow.mjs +44 -38
  21. package/bin/lib/init-prompts.mjs +3 -3
  22. package/bin/lib/init-runtime.mjs +17 -33
  23. package/bin/lib/lifecycle-preflight.mjs +297 -404
  24. package/bin/lib/lifecycle-state.mjs +2 -1
  25. package/bin/lib/next.mjs +243 -20
  26. package/bin/lib/phase.mjs +10 -315
  27. package/bin/lib/rendering.mjs +64 -44
  28. package/bin/lib/runtime-freshness.mjs +18 -15
  29. package/bin/lib/state-dir.mjs +45 -0
  30. package/bin/lib/templates.mjs +59 -22
  31. package/bin/lib/work-context.mjs +12 -1
  32. package/bin/lib/workflows.mjs +0 -1
  33. package/bin/lib/workspace-root.mjs +11 -6
  34. package/distilled/DESIGN.md +58 -2
  35. package/distilled/EVIDENCE-INDEX.md +15 -2
  36. package/distilled/README.md +23 -33
  37. package/distilled/SKILL.md +9 -10
  38. package/distilled/templates/agents.block.md +5 -5
  39. package/distilled/templates/approach.md +3 -3
  40. package/distilled/templates/auth-matrix.md +2 -2
  41. package/distilled/templates/brownfield-change/CHANGE.md +1 -1
  42. package/distilled/templates/delegates/approach-explorer.md +5 -5
  43. package/distilled/templates/delegates/mapper-arch.md +3 -3
  44. package/distilled/templates/delegates/mapper-concerns.md +4 -4
  45. package/distilled/templates/delegates/mapper-quality.md +3 -3
  46. package/distilled/templates/delegates/mapper-tech.md +3 -3
  47. package/distilled/templates/delegates/plan-checker.md +5 -5
  48. package/distilled/templates/delegates/researcher-architecture.md +3 -3
  49. package/distilled/templates/delegates/researcher-features.md +3 -3
  50. package/distilled/templates/delegates/researcher-pitfalls.md +3 -3
  51. package/distilled/templates/delegates/researcher-stack.md +3 -3
  52. package/distilled/templates/delegates/researcher-synthesizer.md +7 -7
  53. package/distilled/templates/research/architecture.md +1 -1
  54. package/distilled/templates/research/pitfalls.md +1 -1
  55. package/distilled/templates/research/stack.md +1 -1
  56. package/distilled/templates/roadmap.md +4 -4
  57. package/distilled/templates/spec.md +2 -2
  58. package/distilled/workflows/audit-milestone.md +22 -22
  59. package/distilled/workflows/complete-milestone.md +35 -35
  60. package/distilled/workflows/execute.md +29 -29
  61. package/distilled/workflows/map-codebase.md +30 -30
  62. package/distilled/workflows/new-milestone.md +18 -18
  63. package/distilled/workflows/new-project.md +45 -45
  64. package/distilled/workflows/pause.md +15 -15
  65. package/distilled/workflows/plan.md +63 -63
  66. package/distilled/workflows/progress.md +40 -39
  67. package/distilled/workflows/quick.md +43 -43
  68. package/distilled/workflows/resume.md +23 -22
  69. package/distilled/workflows/verify-work.md +7 -7
  70. package/distilled/workflows/verify.md +20 -20
  71. package/docs/BROWNFIELD-PROOF.md +1 -1
  72. package/docs/RUNTIME-SUPPORT.md +16 -16
  73. package/docs/USER-GUIDE.md +21 -21
  74. package/docs/claude/context-monitor.md +1 -1
  75. package/docs/proof/consumer-node-cli/README.md +1 -1
  76. package/package.json +3 -3
  77. package/bin/lib/closeout-report.mjs +0 -318
  78. package/bin/lib/evidence-contract.mjs +0 -325
  79. package/bin/lib/provenance.mjs +0 -390
  80. package/bin/lib/session-fingerprint.mjs +0 -223
  81. package/bin/lib/ui-proof.mjs +0 -1007
  82. package/distilled/workflows/plan-milestone-gaps.md +0 -204
@@ -1,7 +1,7 @@
1
1
  <role>
2
2
  You are a Codebase Mapper Orchestrator. You analyze an existing codebase using 4 specialized mapper delegates, each focused on one dimension. The delegates write their documents directly -- you only coordinate, validate, and synthesize a bounded brownfield routing summary from their results.
3
3
 
4
- Output: `.planning/codebase/` with 4 structured documents about the codebase state.
4
+ Output: `.work/codebase/` with 4 structured documents about the codebase state.
5
5
  </role>
6
6
 
7
7
  <when_to_use>
@@ -21,22 +21,22 @@ Do NOT use when:
21
21
  <load_context>
22
22
  ### 1. Read Config
23
23
 
24
- Read `.planning/config.json` to extract:
24
+ Read `.work/config.json` to extract:
25
25
  - `parallelization` -- determines whether mappers run in parallel or sequentially
26
26
  - `commitDocs` -- determines whether to commit generated documents
27
27
 
28
- If `.planning/config.json` does not exist, assume `parallelization: true` and `commitDocs: false` (safe default -- do not commit potentially sensitive codebase documents without explicit opt-in).
28
+ If `.work/config.json` does not exist, assume `parallelization: true` and `commitDocs: false` (safe default -- do not commit potentially sensitive codebase documents without explicit opt-in).
29
29
  </load_context>
30
30
 
31
31
  <check_existing>
32
32
  ### 2. Check Existing Maps
33
33
 
34
- Check whether `.planning/codebase/STACK.md`, `.planning/codebase/ARCHITECTURE.md`, `.planning/codebase/CONVENTIONS.md`, or `.planning/codebase/CONCERNS.md` already exist and contain content.
34
+ Check whether `.work/codebase/STACK.md`, `.work/codebase/ARCHITECTURE.md`, `.work/codebase/CONVENTIONS.md`, or `.work/codebase/CONCERNS.md` already exist and contain content.
35
35
 
36
36
  **If maps exist, present the user with three options:**
37
37
 
38
38
  ```
39
- .planning/codebase/ already exists with these documents:
39
+ .work/codebase/ already exists with these documents:
40
40
  [List files found with sizes]
41
41
 
42
42
  Options:
@@ -47,7 +47,7 @@ Options:
47
47
 
48
48
  Wait for user response.
49
49
 
50
- - **Refresh**: Delete all files in `.planning/codebase/`, continue to mapping step.
50
+ - **Refresh**: Delete all files in `.work/codebase/`, continue to mapping step.
51
51
  - **Update**: Ask which documents to regenerate (STACK, ARCHITECTURE, CONVENTIONS, CONCERNS), then continue to mapping step with only the selected delegates.
52
52
  - **Skip**: End workflow. Inform user maps are unchanged.
53
53
 
@@ -83,55 +83,55 @@ Wait for user response.
83
83
  <mapping>
84
84
  ### 3. Spawn Mapper Delegates
85
85
 
86
- Ensure `.planning/codebase/` directory exists before spawning.
86
+ Ensure `.work/codebase/` directory exists before spawning.
87
87
 
88
88
  **If `parallelization: true` and your platform supports parallel execution -- run all selected mappers in parallel.**
89
89
  **If `parallelization: false` or your platform lacks parallel execution -- run the same mappers sequentially.**
90
90
 
91
91
  ```
92
92
  Spawning codebase mappers...
93
- -> Tech mapper -> .planning/codebase/STACK.md
94
- -> Arch mapper -> .planning/codebase/ARCHITECTURE.md
95
- -> Quality mapper -> .planning/codebase/CONVENTIONS.md
96
- -> Concerns mapper -> .planning/codebase/CONCERNS.md
93
+ -> Tech mapper -> .work/codebase/STACK.md
94
+ -> Arch mapper -> .work/codebase/ARCHITECTURE.md
95
+ -> Quality mapper -> .work/codebase/CONVENTIONS.md
96
+ -> Concerns mapper -> .work/codebase/CONCERNS.md
97
97
  ```
98
98
 
99
99
  <delegate>
100
100
  Agent: TechMapper
101
- Parallel: (use parallelization value from .planning/config.json)
101
+ Parallel: (use parallelization value from .work/config.json)
102
102
  Context: Current working directory. DO NOT share conversation history.
103
- Instruction: Read `.planning/templates/delegates/mapper-tech.md` for full task instructions. Follow them exactly.
104
- Output: `.planning/codebase/STACK.md`
103
+ Instruction: Read `.work/templates/delegates/mapper-tech.md` for full task instructions. Follow them exactly.
104
+ Output: `.work/codebase/STACK.md`
105
105
  Return: Routing summary to Orchestrator (100-200 tokens); full findings stay in the output artifact.
106
106
  Guardrails: Max Agent Hops = 3. No static dumps. Never read .env contents.
107
107
  </delegate>
108
108
 
109
109
  <delegate>
110
110
  Agent: ArchMapper
111
- Parallel: (use parallelization value from .planning/config.json)
111
+ Parallel: (use parallelization value from .work/config.json)
112
112
  Context: Current working directory. DO NOT share conversation history.
113
- Instruction: Read `.planning/templates/delegates/mapper-arch.md` for full task instructions. Follow them exactly.
114
- Output: `.planning/codebase/ARCHITECTURE.md`
113
+ Instruction: Read `.work/templates/delegates/mapper-arch.md` for full task instructions. Follow them exactly.
114
+ Output: `.work/codebase/ARCHITECTURE.md`
115
115
  Return: Routing summary to Orchestrator (100-200 tokens); full findings stay in the output artifact.
116
116
  Guardrails: Max Agent Hops = 3. No static directory dumps. Never read .env contents.
117
117
  </delegate>
118
118
 
119
119
  <delegate>
120
120
  Agent: QualityMapper
121
- Parallel: (use parallelization value from .planning/config.json)
121
+ Parallel: (use parallelization value from .work/config.json)
122
122
  Context: Current working directory. DO NOT share conversation history.
123
- Instruction: Read `.planning/templates/delegates/mapper-quality.md` for full task instructions. Follow them exactly.
124
- Output: `.planning/codebase/CONVENTIONS.md`
123
+ Instruction: Read `.work/templates/delegates/mapper-quality.md` for full task instructions. Follow them exactly.
124
+ Output: `.work/codebase/CONVENTIONS.md`
125
125
  Return: Routing summary to Orchestrator (100-200 tokens); full findings stay in the output artifact.
126
126
  Guardrails: Max Agent Hops = 3. Rules not inventories. Never read .env contents.
127
127
  </delegate>
128
128
 
129
129
  <delegate>
130
130
  Agent: ConcernsMapper
131
- Parallel: (use parallelization value from .planning/config.json)
131
+ Parallel: (use parallelization value from .work/config.json)
132
132
  Context: Current working directory. DO NOT share conversation history.
133
- Instruction: Read `.planning/templates/delegates/mapper-concerns.md` for full task instructions. Follow them exactly. Hard stop if secrets found -- report immediately.
134
- Output: `.planning/codebase/CONCERNS.md`
133
+ Instruction: Read `.work/templates/delegates/mapper-concerns.md` for full task instructions. Follow them exactly. Hard stop if secrets found -- report immediately.
134
+ Output: `.work/codebase/CONCERNS.md`
135
135
  Return: Routing summary to Orchestrator (100-200 tokens); full findings stay in the output artifact. If secrets found, STOP and report immediately.
136
136
  Guardrails: Max Agent Hops = 3. Hard stop on secrets. Never read .env contents.
137
137
  </delegate>
@@ -163,7 +163,7 @@ These 4 documents are consumed by downstream GSDD workflows:
163
163
 
164
164
  After all mappers complete, verify:
165
165
 
166
- - [ ] All 4 documents exist in `.planning/codebase/` (L1: exists)
166
+ - [ ] All 4 documents exist in `.work/codebase/` (L1: exists)
167
167
  - [ ] No document is empty or trivially short — each must exceed 20 non-empty lines (L2: substantive)
168
168
  - [ ] Each document contains actual file path references in backtick format — not generic advice (L2: specificity)
169
169
  - [ ] STACK.md names at least 2 concrete technologies with version information (L2: specificity)
@@ -180,7 +180,7 @@ If any check fails, note the specific failure and inform the user which document
180
180
 
181
181
  **CRITICAL SECURITY CHECK:** Scan all generated documents for accidentally leaked secrets before committing.
182
182
 
183
- Search `.planning/codebase/*.md` for these patterns (use your platform's search/grep capability):
183
+ Search `.work/codebase/*.md` for these patterns (use your platform's search/grep capability):
184
184
 
185
185
  **Reference patterns (regex):**
186
186
  - `sk-[a-zA-Z0-9]{20,}` | `sk_live_[a-zA-Z0-9]+` | `sk_test_[a-zA-Z0-9]+` -- Stripe/OpenAI keys
@@ -218,11 +218,11 @@ Wait for user confirmation before continuing.
218
218
  <commit>
219
219
  ### 6. Commit (if configured)
220
220
 
221
- Read `commitDocs` from `.planning/config.json`.
221
+ Read `commitDocs` from `.work/config.json`.
222
222
 
223
223
  **If `commitDocs: true`:** Commit the generated codebase documents.
224
224
  Suggested commit message: `docs: map existing codebase`
225
- Files: `.planning/codebase/*.md`
225
+ Files: `.work/codebase/*.md`
226
226
 
227
227
  **If `commitDocs: false`:** Skip commit. Documents remain local-only.
228
228
  </commit>
@@ -231,7 +231,7 @@ Files: `.planning/codebase/*.md`
231
231
  Report to the user what was accomplished, then present the next step:
232
232
 
233
233
  ---
234
- **Completed:** Codebase mapping — 4 documents written to `.planning/codebase/` (STACK.md, ARCHITECTURE.md, CONVENTIONS.md, CONCERNS.md).
234
+ **Completed:** Codebase mapping — 4 documents written to `.work/codebase/` (STACK.md, ARCHITECTURE.md, CONVENTIONS.md, CONCERNS.md).
235
235
 
236
236
  **Brownfield routing summary:** Synthesize this directly from the 4 generated documents before recommending the next workflow.
237
237
  - Safest next change lane — which module or surface looks cheapest and safest to modify first
@@ -247,14 +247,14 @@ Use only the 4 generated documents for this synthesis. Do NOT create a fifth per
247
247
 
248
248
  Also available:
249
249
  - `/gsdd-map-codebase` — re-map if results need refinement
250
- - Review specific file: read `.planning/codebase/STACK.md`
250
+ - Review specific file: read `.work/codebase/STACK.md`
251
251
 
252
252
  Consider clearing context before starting the next workflow for best results.
253
253
  ---
254
254
  </completion>
255
255
 
256
256
  <success_criteria>
257
- - `.planning/codebase/` directory exists with 4 documents
257
+ - `.work/codebase/` directory exists with 4 documents
258
258
  - All selected mapper delegates were spawned (parallel or sequential per config)
259
259
  - Delegates wrote documents directly (orchestrator did not receive document contents)
260
260
  - Security scan completed -- no secrets in generated documents
@@ -7,8 +7,8 @@ Scope boundary: you produce updated SPEC.md requirements and a new set of phases
7
7
  </role>
8
8
 
9
9
  <prerequisites>
10
- `.planning/SPEC.md` must exist (project has been initialized and at least one milestone shipped).
11
- `.planning/MILESTONES.md` must exist (at least one milestone was completed and archived).
10
+ `.work/SPEC.md` must exist (project has been initialized and at least one milestone shipped).
11
+ `.work/MILESTONES.md` must exist (at least one milestone was completed and archived).
12
12
 
13
13
  If SPEC.md is missing, the project has not been initialized — run `/gsdd-new-project` instead.
14
14
  If MILESTONES.md is missing, no milestone has been completed — complete the current milestone first with `/gsdd-complete-milestone`.
@@ -17,21 +17,21 @@ If MILESTONES.md is missing, no milestone has been completed — complete the cu
17
17
  <load_context>
18
18
  Before starting, read these files:
19
19
 
20
- 1. `.planning/SPEC.md` — project identity, core value, validated requirements, constraints, decisions
21
- 2. `.planning/MILESTONES.md` — what shipped previously, last milestone version and date
22
- 3. `.planning/ROADMAP.md` — collapsed milestone phases, current phase numbering (to determine where to continue)
23
- 4. `.planning/config.json` — `workflow.research`, `researchDepth`, `gitProtocol`
24
- 5. `.planning/brownfield-change/CHANGE.md`, `.planning/brownfield-change/HANDOFF.md`, and `.planning/brownfield-change/VERIFICATION.md` when an active bounded change is being widened into the next milestone
20
+ 1. `.work/SPEC.md` — project identity, core value, validated requirements, constraints, decisions
21
+ 2. `.work/MILESTONES.md` — what shipped previously, last milestone version and date
22
+ 3. `.work/ROADMAP.md` — collapsed milestone phases, current phase numbering (to determine where to continue)
23
+ 4. `.work/config.json` — `workflow.research`, `researchDepth`, `gitProtocol`
24
+ 5. `.work/brownfield-change/CHANGE.md`, `.work/brownfield-change/HANDOFF.md`, and `.work/brownfield-change/VERIFICATION.md` when an active bounded change is being widened into the next milestone
25
25
  </load_context>
26
26
 
27
27
  <repo_root_helper_contract>
28
- All `node .planning/bin/gsdd.mjs ...` helper commands below assume the current working directory is the repo root. If the runtime launched from a subdirectory, change to the repo root before running them.
28
+ All `node .work/bin/gsdd.mjs ...` helper commands below assume the current working directory is the repo root. If the runtime launched from a subdirectory, change to the repo root before running them.
29
29
  </repo_root_helper_contract>
30
30
 
31
31
  <lifecycle_preflight>
32
32
  Before presenting the last milestone or gathering new milestone goals, run:
33
33
 
34
- - `node .planning/bin/gsdd.mjs lifecycle-preflight new-milestone`
34
+ - `node .work/bin/gsdd.mjs lifecycle-preflight new-milestone`
35
35
 
36
36
  If the preflight result is `blocked`, STOP and report the blocker instead of inferring milestone-start eligibility from workflow-local prose.
37
37
 
@@ -52,7 +52,7 @@ If milestone truth on disk is local-only or AI-generated draft truth, or if the
52
52
  </integration_surface_check>
53
53
 
54
54
  <brownfield_widening_inputs>
55
- If `.planning/brownfield-change/CHANGE.md` exists, treat invocation of `/gsdd-new-milestone` as an explicit widen request for that active bounded change.
55
+ If `.work/brownfield-change/CHANGE.md` exists, treat invocation of `/gsdd-new-milestone` as an explicit widen request for that active bounded change.
56
56
 
57
57
  Before gathering new milestone goals, read and preserve:
58
58
  - `CHANGE.md` for the current goal, scope, done-when, next action, and declared write scope
@@ -66,7 +66,7 @@ Do not force the user to rediscover this context and do not create a new promoti
66
66
 
67
67
  ## 1. Present What Shipped Last
68
68
 
69
- Read `.planning/MILESTONES.md`. Find the most recent milestone entry. Present it to the user:
69
+ Read `.work/MILESTONES.md`. Find the most recent milestone entry. Present it to the user:
70
70
 
71
71
  ```
72
72
  Last milestone: v[X.Y] — [Name] (shipped [date])
@@ -87,8 +87,8 @@ Ask the user what the next milestone should focus on. Explore:
87
87
 
88
88
  If widening from an active brownfield change, start by presenting the preserved brownfield goal/scope/proof context and ask what now needs milestone-owned lifecycle state beyond that bounded lane.
89
89
 
90
- If a `.planning/MILESTONE-BRIEF.md` exists, use it as the input instead of asking. Note any assumptions inferred from the brief.
91
- (MILESTONE-BRIEF.md is an optional pre-written document with goals and scope for the next milestone — useful when the user wants to skip the interactive questioning. Create it manually in `.planning/` before running this workflow.)
90
+ If a `.work/MILESTONE-BRIEF.md` exists, use it as the input instead of asking. Note any assumptions inferred from the brief.
91
+ (MILESTONE-BRIEF.md is an optional pre-written document with goals and scope for the next milestone — useful when the user wants to skip the interactive questioning. Create it manually in `.work/` before running this workflow.)
92
92
 
93
93
  ## 3. Determine Version
94
94
 
@@ -121,11 +121,11 @@ Use `<delegate>` blocks to spawn researchers. Pass milestone context to each:
121
121
  ```
122
122
  <delegate>
123
123
  **Identity:** Researcher — Stack
124
- **Instruction:** Read `.planning/templates/roles/researcher.md`, then research what stack additions are needed for the new milestone capabilities.
124
+ **Instruction:** Read `.work/templates/roles/researcher.md`, then research what stack additions are needed for the new milestone capabilities.
125
125
 
126
126
  **Milestone context:** [existing validated capabilities, new capabilities being added]
127
127
  **Question:** What library/framework additions are needed? What should NOT be added?
128
- **Output:** Write findings to `.planning/research/STACK.md`
128
+ **Output:** Write findings to `.work/research/STACK.md`
129
129
  **Return:** 2-3 sentence summary of key findings
130
130
  </delegate>
131
131
  ```
@@ -219,7 +219,7 @@ Also update the Milestones list at the top of ROADMAP.md:
219
219
  Create placeholder directories for each new phase:
220
220
 
221
221
  ```
222
- .planning/phases/[NN]-[phase-name-kebab]/
222
+ .work/phases/[NN]-[phase-name-kebab]/
223
223
  ```
224
224
 
225
225
  No files inside — the `/gsdd-plan` workflow populates them.
@@ -258,7 +258,7 @@ Update the `## Current State` section in SPEC.md:
258
258
  - [ ] Phase directories created
259
259
  </success_criteria>
260
260
 
261
- **MANDATORY: `.planning/SPEC.md` and `.planning/ROADMAP.md` must be updated on disk before this workflow is complete. If either write fails, STOP and report the failure. These are the handoff artifacts — without them, the next session cannot proceed.**
261
+ **MANDATORY: `.work/SPEC.md` and `.work/ROADMAP.md` must be updated on disk before this workflow is complete. If either write fails, STOP and report the failure. These are the handoff artifacts — without them, the next session cannot proceed.**
262
262
 
263
263
  <completion>
264
264
  Report to the user what was created, then present the next step:
@@ -269,7 +269,7 @@ Report to the user what was created, then present the next step:
269
269
  Created:
270
270
  - [N] new requirements in `SPEC.md` Must Have section
271
271
  - [M] new phases in `ROADMAP.md` (Phases [start]–[end])
272
- - Phase directories in `.planning/phases/`
272
+ - Phase directories in `.work/phases/`
273
273
 
274
274
  **Next step:** `/gsdd-plan [N]` — plan Phase [N]: [phase name]
275
275
 
@@ -6,11 +6,11 @@ Your output: SPEC.md (the single source of truth) and ROADMAP.md (the execution
6
6
  </role>
7
7
 
8
8
  <auto_mode>
9
- Check `.planning/config.json` for `autoAdvance: true`. If NOT set, skip this section entirely.
9
+ Check `.work/config.json` for `autoAdvance: true`. If NOT set, skip this section entirely.
10
10
 
11
11
  When `autoAdvance: true`, this workflow runs non-interactively:
12
12
 
13
- 1. **Input:** Read `.planning/PROJECT_BRIEF.md`. If it does not exist, stop with a clear error: "Auto mode requires a project brief. Provide one via `npx -y gsdd-cli init --auto --tools <runtime> --brief <path>` or place it at `.planning/PROJECT_BRIEF.md`."
13
+ 1. **Input:** Read `.work/PROJECT_BRIEF.md`. If it does not exist, stop with a clear error: "Auto mode requires a project brief. Provide one via `npx -y gsdd-cli init --auto --tools <runtime> --brief <path>` or place it at `.work/PROJECT_BRIEF.md`."
14
14
 
15
15
  2. **Extract context from brief:** Parse the brief document to understand the project goal, target users, constraints, requirements, and out-of-scope items. Apply the same requirement categorization as `<questioning>` (Table Stakes / Differentiators / Out of Scope). Do NOT ask interactive questions.
16
16
 
@@ -28,10 +28,10 @@ All other sections (`<detect_mode>`, `<codebase_context>`, `<research>`, `<spec_
28
28
  <load_context>
29
29
  Before starting, read these files (if they exist):
30
30
  1. `AGENTS.md` (root) — understand the full SDD workflow and governance rules.
31
- 2. `.planning/templates/spec.md` — template for creating SPEC.md
32
- 3. `.planning/templates/roadmap.md` — template for creating ROADMAP.md
31
+ 2. `.work/templates/spec.md` — template for creating SPEC.md
32
+ 3. `.work/templates/roadmap.md` — template for creating ROADMAP.md
33
33
  4. Project root files: `package.json`, `README.md`, main entry point, `.gitignore`
34
- 5. `.planning/config.json` — The deterministic project settings. Key fields:
34
+ 5. `.work/config.json` — The deterministic project settings. Key fields:
35
35
  - `researchDepth`: balanced | fast | deep — controls research thoroughness
36
36
  - `parallelization`: true | false - whether to run delegate work in parallel when the platform supports it; when false, run the same delegates sequentially
37
37
  - `workflow.research`: true | false - whether to do domain research before spec
@@ -39,13 +39,13 @@ Before starting, read these files (if they exist):
39
39
  - `workflow.verifier`: true | false — whether verifier runs after execution
40
40
  - `modelProfile`: balanced | quality | budget — model selection hint
41
41
  - `gitProtocol`: advisory git guidance only — follow repo/user conventions first and never invent phase/plan/task git naming by default
42
- 6. Any existing `.planning/SPEC.md` or `.planning/ROADMAP.md` (if resuming)
43
- 7. `.planning/brownfield-change/CHANGE.md`, `HANDOFF.md`, and `VERIFICATION.md` (when present as the widening input from an active bounded change)
42
+ 6. Any existing `.work/SPEC.md` or `.work/ROADMAP.md` (if resuming)
43
+ 7. `.work/brownfield-change/CHANGE.md`, `HANDOFF.md`, and `VERIFICATION.md` (when present as the widening input from an active bounded change)
44
44
  </load_context>
45
45
 
46
46
  <project_principles>
47
47
  Before diving into technical specifications, establish the core governing principles of the project.
48
- If `autoAdvance: true` in `.planning/config.json`, skip this question. Infer core principles
48
+ If `autoAdvance: true` in `.work/config.json`, skip this question. Infer core principles
49
49
  from the project brief (code quality signals, constraint language, scope decisions) and note
50
50
  the inferred principles in the completion report. Otherwise:
51
51
  Ask the user: "What are the core principles for this project regarding code quality, UI consistency, or performance?"
@@ -57,23 +57,23 @@ Determine the situation:
57
57
 
58
58
  - **Greenfield**: No existing code. Empty or minimal project. Skip codebase audit, go to questioning.
59
59
  - **Brownfield**: Existing codebase. You MUST audit before questioning.
60
- - **Resuming**: `.planning/SPEC.md` already exists. Read it, confirm current state with developer, continue from where things left off.
61
- - **Concrete brownfield continuity already exists**: if `.planning/brownfield-change/CHANGE.md` exists, treat `/gsdd-new-project` as an explicit widen path into full milestone setup, not as the default resume route for that bounded change. Preserve the current bounded context unless the user clearly wants to widen scope.
60
+ - **Resuming**: `.work/SPEC.md` already exists. Read it, confirm current state with developer, continue from where things left off.
61
+ - **Concrete brownfield continuity already exists**: if `.work/brownfield-change/CHANGE.md` exists, treat `/gsdd-new-project` as an explicit widen path into full milestone setup, not as the default resume route for that bounded change. Preserve the current bounded context unless the user clearly wants to widen scope.
62
62
  </detect_mode>
63
63
 
64
64
  <brownfield_widening_context>
65
- If `.planning/brownfield-change/CHANGE.md` exists, treat it as an explicit widening input rather than as noise to rediscover:
65
+ If `.work/brownfield-change/CHANGE.md` exists, treat it as an explicit widening input rather than as noise to rediscover:
66
66
 
67
67
  1. Read `CHANGE.md` for the active goal, in-scope/out-of-scope, done-when, next action, and declared write scope.
68
68
  2. Read `HANDOFF.md` for preserved constraints, unresolved uncertainty, decision posture, and anti-regression rules.
69
69
  3. Read `VERIFICATION.md` for existing proof, open gaps, and any partial validation that the first milestone should inherit honestly.
70
70
 
71
71
  Do not create a new promotion artifact. Reuse the existing brownfield folder directly when widening into milestone setup.
72
- If `.planning/MILESTONES.md` already contains shipped milestone history, stop and route this widen request to `/gsdd-new-milestone` instead of reopening first-milestone initialization here.
72
+ If `.work/MILESTONES.md` already contains shipped milestone history, stop and route this widen request to `/gsdd-new-milestone` instead of reopening first-milestone initialization here.
73
73
  </brownfield_widening_context>
74
74
 
75
75
  <milestone_context>
76
- Determine research context before spawning researchers. Check if `.planning/SPEC.md` has existing Validated requirements:
76
+ Determine research context before spawning researchers. Check if `.work/SPEC.md` has existing Validated requirements:
77
77
 
78
78
  - **Greenfield**: No SPEC.md, or SPEC.md has no "Validated" items → Research from scratch for this domain.
79
79
  - **Subsequent milestone**: SPEC.md exists with Validated items → Research what's needed to ADD the new feature set — do NOT re-research the existing system.
@@ -87,7 +87,7 @@ Before asking ANY questions, you must understand what exists.
87
87
 
88
88
  ### Check for Existing Codebase Maps
89
89
 
90
- Check whether `.planning/codebase/STACK.md`, `.planning/codebase/ARCHITECTURE.md`, `.planning/codebase/CONVENTIONS.md`, or `.planning/codebase/CONCERNS.md` already exist and contain substantive content.
90
+ Check whether `.work/codebase/STACK.md`, `.work/codebase/ARCHITECTURE.md`, `.work/codebase/CONVENTIONS.md`, or `.work/codebase/CONCERNS.md` already exist and contain substantive content.
91
91
 
92
92
  **If codebase maps exist:** Use them directly. Skip to Brownfield Validated Requirements Inference below.
93
93
 
@@ -97,7 +97,7 @@ Inform the user: "No codebase maps found. Running codebase mapping before contin
97
97
 
98
98
  This is an internal prerequisite of `new-project`, not a user-facing routing requirement. If the user started with `/gsdd-new-project` on a brownfield repo, do not bounce them out and tell them to restart with `/gsdd-map-codebase`. Run the mapping dependency, then continue this workflow.
99
99
 
100
- If `.planning/brownfield-change/CHANGE.md` exists, keep it as the current bounded continuity anchor while you do this work. Do not treat its presence as evidence that the user should have used another command instead. The only question is whether they intentionally want to widen that bounded brownfield change into full milestone planning.
100
+ If `.work/brownfield-change/CHANGE.md` exists, keep it as the current bounded continuity anchor while you do this work. Do not treat its presence as evidence that the user should have used another command instead. The only question is whether they intentionally want to widen that bounded brownfield change into full milestone planning.
101
101
 
102
102
  Read and follow the `gsdd-map-codebase` skill now. Prefer the repo-local `.agents/skills/gsdd-map-codebase/SKILL.md` when it exists; otherwise use the globally installed `gsdd-map-codebase` skill available in the current runtime. Execute its full flow (check existing, spawn mappers, validate, secrets scan). When map-codebase completes, return here and continue from Brownfield Validated Requirements Inference below.
103
103
 
@@ -105,8 +105,8 @@ Read and follow the `gsdd-map-codebase` skill now. Prefer the repo-local `.agent
105
105
 
106
106
  Read the completed codebase map and infer what the project already does. These become **Validated** requirements in SPEC.md -- existing capabilities the new work must not break.
107
107
 
108
- 1. Read `.planning/codebase/ARCHITECTURE.md` -- identify existing components and their responsibilities
109
- 2. Read `.planning/codebase/STACK.md` -- identify what's already integrated
108
+ 1. Read `.work/codebase/ARCHITECTURE.md` -- identify existing components and their responsibilities
109
+ 2. Read `.work/codebase/STACK.md` -- identify what's already integrated
110
110
  3. For each existing capability: add as a Validated requirement in SPEC.md later
111
111
 
112
112
  Example format (for SPEC.md requirements section):
@@ -199,7 +199,7 @@ YOU: "So two views: today and someday. What happens to completed tasks — archi
199
199
  <research>
200
200
  MANDATORY STEP. After the goal is clarified but BEFORE writing any specs.
201
201
 
202
- **Check config first:** Read `.planning/config.json`.
202
+ **Check config first:** Read `.work/config.json`.
203
203
  - If `workflow.research: false` → skip this section entirely, go to `<spec_creation>`.
204
204
  - If `researchDepth: "fast"` - use the same 4 specialists below, then synthesize `SUMMARY.md` inline. Faster and cheaper; acceptable for well-known domains.
205
205
  - If `researchDepth: "balanced"` or `"deep"` - use the same 4 specialists below plus the synthesizer (default).
@@ -218,50 +218,50 @@ Use the same 4 specialized researchers every time. The difference is execution o
218
218
 
219
219
  ```
220
220
  Spawning 4 researchers...
221
- -> Stack research -> .planning/research/STACK.md
222
- -> Features research -> .planning/research/FEATURES.md
223
- -> Architecture research -> .planning/research/ARCHITECTURE.md
224
- -> Pitfalls research -> .planning/research/PITFALLS.md
221
+ -> Stack research -> .work/research/STACK.md
222
+ -> Features research -> .work/research/FEATURES.md
223
+ -> Architecture research -> .work/research/ARCHITECTURE.md
224
+ -> Pitfalls research -> .work/research/PITFALLS.md
225
225
  ```
226
226
 
227
- Ensure `.planning/research/` directory exists before spawning.
227
+ Ensure `.work/research/` directory exists before spawning.
228
228
 
229
229
  <delegate>
230
230
  Agent: StackResearcher
231
- Parallel: (use parallelization value from .planning/config.json)
231
+ Parallel: (use parallelization value from .work/config.json)
232
232
  Context: Project goal: [user's stated goal]. Milestone context: [greenfield|subsequent]. DO NOT share conversation history.
233
- Instruction: Read `.planning/templates/delegates/researcher-stack.md` for full task instructions. Apply the project goal and milestone context provided above.
234
- Output: `.planning/research/STACK.md`
233
+ Instruction: Read `.work/templates/delegates/researcher-stack.md` for full task instructions. Apply the project goal and milestone context provided above.
234
+ Output: `.work/research/STACK.md`
235
235
  Return: Human-read structured summary to Orchestrator (300-500 tokens); full findings stay in the output artifact.
236
236
  Guardrails: Max Agent Hops = 3.
237
237
  </delegate>
238
238
 
239
239
  <delegate>
240
240
  Agent: FeaturesResearcher
241
- Parallel: (use parallelization value from .planning/config.json)
241
+ Parallel: (use parallelization value from .work/config.json)
242
242
  Context: Project goal: [user's stated goal]. Milestone context: [greenfield|subsequent]. DO NOT share conversation history.
243
- Instruction: Read `.planning/templates/delegates/researcher-features.md` for full task instructions. Apply the project goal and milestone context provided above.
244
- Output: `.planning/research/FEATURES.md`
243
+ Instruction: Read `.work/templates/delegates/researcher-features.md` for full task instructions. Apply the project goal and milestone context provided above.
244
+ Output: `.work/research/FEATURES.md`
245
245
  Return: Human-read structured summary to Orchestrator (300-500 tokens); full findings stay in the output artifact.
246
246
  Guardrails: Max Agent Hops = 3.
247
247
  </delegate>
248
248
 
249
249
  <delegate>
250
250
  Agent: ArchitectureResearcher
251
- Parallel: (use parallelization value from .planning/config.json)
251
+ Parallel: (use parallelization value from .work/config.json)
252
252
  Context: Project goal: [user's stated goal]. Milestone context: [greenfield|subsequent]. DO NOT share conversation history.
253
- Instruction: Read `.planning/templates/delegates/researcher-architecture.md` for full task instructions. Apply the project goal and milestone context provided above.
254
- Output: `.planning/research/ARCHITECTURE.md`
253
+ Instruction: Read `.work/templates/delegates/researcher-architecture.md` for full task instructions. Apply the project goal and milestone context provided above.
254
+ Output: `.work/research/ARCHITECTURE.md`
255
255
  Return: Human-read structured summary to Orchestrator (300-500 tokens); full findings stay in the output artifact.
256
256
  Guardrails: Max Agent Hops = 3.
257
257
  </delegate>
258
258
 
259
259
  <delegate>
260
260
  Agent: PitfallsResearcher
261
- Parallel: (use parallelization value from .planning/config.json)
261
+ Parallel: (use parallelization value from .work/config.json)
262
262
  Context: Project goal: [user's stated goal]. Milestone context: [greenfield|subsequent]. DO NOT share conversation history.
263
- Instruction: Read `.planning/templates/delegates/researcher-pitfalls.md` for full task instructions. Apply the project goal and milestone context provided above.
264
- Output: `.planning/research/PITFALLS.md`
263
+ Instruction: Read `.work/templates/delegates/researcher-pitfalls.md` for full task instructions. Apply the project goal and milestone context provided above.
264
+ Output: `.work/research/PITFALLS.md`
265
265
  Return: Human-read structured summary to Orchestrator (300-500 tokens); full findings stay in the output artifact.
266
266
  Guardrails: Max Agent Hops = 3.
267
267
  </delegate>
@@ -269,7 +269,7 @@ Guardrails: Max Agent Hops = 3.
269
269
  **After all 4 researchers complete**, synthesize based on `researchDepth`:
270
270
 
271
271
  **If `researchDepth: "fast"`:** Synthesize inline.
272
- You hold 4 human-read structured summaries. Write `.planning/research/SUMMARY.md` directly using `.planning/templates/research/summary.md`. Cross-reference the summaries. Do NOT spawn another agent.
272
+ You hold 4 human-read structured summaries. Write `.work/research/SUMMARY.md` directly using `.work/templates/research/summary.md`. Cross-reference the summaries. Do NOT spawn another agent.
273
273
 
274
274
  **If `researchDepth: "balanced"` or `"deep"`:** Spawn synthesizer to read the full research files.
275
275
 
@@ -277,8 +277,8 @@ You hold 4 human-read structured summaries. Write `.planning/research/SUMMARY.md
277
277
  Agent: ResearchSynthesizer
278
278
  Parallel: false
279
279
  Context: Researcher summaries returned above. DO NOT share conversation history.
280
- Instruction: Read `.planning/templates/delegates/researcher-synthesizer.md` for full task instructions.
281
- Output: `.planning/research/SUMMARY.md`
280
+ Instruction: Read `.work/templates/delegates/researcher-synthesizer.md` for full task instructions.
281
+ Output: `.work/research/SUMMARY.md`
282
282
  Return: Agent-mediated structured summary to Orchestrator (500-800 tokens); full synthesis stays in the output artifact.
283
283
  Guardrails: Max Agent Hops = 2. Do not do new research — synthesize only.
284
284
  </delegate>
@@ -288,7 +288,7 @@ Guardrails: Max Agent Hops = 2. Do not do new research — synthesize only.
288
288
  Display key findings before moving to spec creation.
289
289
 
290
290
  ### Research Quality Gate — All of These Must Be True:
291
- - [ ] All 4 specialist files written to `.planning/research/`
291
+ - [ ] All 4 specialist files written to `.work/research/`
292
292
  - [ ] SUMMARY.md written with "Implications for Roadmap" section populated
293
293
  - [ ] Negative claims verified with current web docs (not training data)
294
294
  - [ ] Confidence levels assigned: verified | likely | uncertain
@@ -305,7 +305,7 @@ Before writing SPEC.md, define core Data Models/Typed Schemas. Multi-agent hando
305
305
  <spec_creation>
306
306
  After the subagent research completes, synthesize EVERYTHING into `SPEC.md`:
307
307
 
308
- 1. **Use the template** from `.planning/templates/spec.md`.
308
+ 1. **Use the template** from `.work/templates/spec.md`.
309
309
  2. **Requirements are testable**: "User can X" not "System does Y"
310
310
  3. **Requirements have IDs**: `AUTH-01`, `DATA-02`, `UI-03`
311
311
  4. **Requirements are ordered** by priority within each category
@@ -314,7 +314,7 @@ After the subagent research completes, synthesize EVERYTHING into `SPEC.md`:
314
314
  7. **Typed Data Schemas**: explicitly define the core Data Models/Typed Schemas the project will use (e.g., `type UserProfile = { id: number; plan: 'free' | 'pro' }`). Multi-agent handoffs require typed schemas to pass reliable state; natural language instructions fail across agent handoffs. *SPEC.md defines WHAT, not HOW - do not include implementation tasks.*
315
315
  8. **Done-When Verification Chain**: For EVERY requirement in the "Must Have (v1)" section, define a clear, verifiable `[Done-When: ...]` criterion. "User can log in" must become "User can log in [Done-When: Login form submits, JWT is received, and User is redirected to Dashboard]". No exceptions.
316
316
  9. **Capability & Security Gates**: Handle per the `<capability_gates>` section at the end of this `<spec_creation>` block.
317
- 10. **Authorization Matrix (optional)**: For projects with multiple user roles or protected resources, create `.planning/AUTH_MATRIX.md` using the template at `.planning/templates/auth-matrix.md`. The integration checker will use this matrix for systematic auth verification during milestone audits.
317
+ 10. **Authorization Matrix (optional)**: For projects with multiple user roles or protected resources, create `.work/AUTH_MATRIX.md` using the template at `.work/templates/auth-matrix.md`. The integration checker will use this matrix for systematic auth verification during milestone audits.
318
318
  11. **ROADMAP phase status is initialized** with Phase 1 marked `[ ]` / not started using the roadmap template's phase-status language.
319
319
 
320
320
  <capability_gates>
@@ -341,7 +341,7 @@ Do NOT proceed to roadmap creation until the developer explicitly approves.
341
341
  **Commit**: `docs: initialize project spec`
342
342
  </spec_creation>
343
343
 
344
- **STOP. Spec creation is complete. Verify that `.planning/SPEC.md` exists on disk with the approved content before creating the roadmap. Do NOT create ROADMAP.md from memory — read the persisted SPEC.md as input.**
344
+ **STOP. Spec creation is complete. Verify that `.work/SPEC.md` exists on disk with the approved content before creating the roadmap. Do NOT create ROADMAP.md from memory — read the persisted SPEC.md as input.**
345
345
 
346
346
  <roadmap_creation>
347
347
  After `SPEC.md` is approved, you must create `ROADMAP.md`.
@@ -395,7 +395,7 @@ Do NOT proceed to planning until the developer explicitly approves.
395
395
  </roadmap_creation>
396
396
 
397
397
  <persistence>
398
- MANDATORY: Both `.planning/SPEC.md` and `.planning/ROADMAP.md` must exist on disk before reporting completion.
398
+ MANDATORY: Both `.work/SPEC.md` and `.work/ROADMAP.md` must exist on disk before reporting completion.
399
399
 
400
400
  If either file was not written (permissions issue, path problem), STOP and report the blocker to the user. Do NOT report success without persisted artifacts.
401
401
 
@@ -424,8 +424,8 @@ Report to the user what was accomplished, then present the next step:
424
424
 
425
425
  ---
426
426
  **Completed:** Project initialization — created:
427
- - `.planning/SPEC.md` — living specification (requirements, constraints, decisions)
428
- - `.planning/ROADMAP.md` — phased execution plan with success criteria
427
+ - `.work/SPEC.md` — living specification (requirements, constraints, decisions)
428
+ - `.work/ROADMAP.md` — phased execution plan with success criteria
429
429
 
430
430
  **Next step:** `/gsdd-plan` — create a detailed plan for Phase 1
431
431