gsdd-cli 0.27.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 (81) hide show
  1. package/README.md +53 -22
  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/health-truth.mjs +8 -13
  18. package/bin/lib/health.mjs +25 -39
  19. package/bin/lib/init-flow.mjs +44 -38
  20. package/bin/lib/init-prompts.mjs +3 -3
  21. package/bin/lib/init-runtime.mjs +11 -30
  22. package/bin/lib/lifecycle-preflight.mjs +97 -410
  23. package/bin/lib/lifecycle-state.mjs +2 -1
  24. package/bin/lib/next.mjs +243 -20
  25. package/bin/lib/phase.mjs +10 -315
  26. package/bin/lib/rendering.mjs +64 -44
  27. package/bin/lib/runtime-freshness.mjs +18 -15
  28. package/bin/lib/state-dir.mjs +45 -0
  29. package/bin/lib/templates.mjs +59 -22
  30. package/bin/lib/work-context.mjs +12 -1
  31. package/bin/lib/workflows.mjs +0 -1
  32. package/bin/lib/workspace-root.mjs +11 -6
  33. package/distilled/DESIGN.md +58 -2
  34. package/distilled/EVIDENCE-INDEX.md +15 -2
  35. package/distilled/README.md +23 -33
  36. package/distilled/SKILL.md +9 -10
  37. package/distilled/templates/agents.block.md +5 -5
  38. package/distilled/templates/approach.md +3 -3
  39. package/distilled/templates/auth-matrix.md +2 -2
  40. package/distilled/templates/brownfield-change/CHANGE.md +1 -1
  41. package/distilled/templates/delegates/approach-explorer.md +5 -5
  42. package/distilled/templates/delegates/mapper-arch.md +3 -3
  43. package/distilled/templates/delegates/mapper-concerns.md +4 -4
  44. package/distilled/templates/delegates/mapper-quality.md +3 -3
  45. package/distilled/templates/delegates/mapper-tech.md +3 -3
  46. package/distilled/templates/delegates/plan-checker.md +5 -5
  47. package/distilled/templates/delegates/researcher-architecture.md +3 -3
  48. package/distilled/templates/delegates/researcher-features.md +3 -3
  49. package/distilled/templates/delegates/researcher-pitfalls.md +3 -3
  50. package/distilled/templates/delegates/researcher-stack.md +3 -3
  51. package/distilled/templates/delegates/researcher-synthesizer.md +7 -7
  52. package/distilled/templates/research/architecture.md +1 -1
  53. package/distilled/templates/research/pitfalls.md +1 -1
  54. package/distilled/templates/research/stack.md +1 -1
  55. package/distilled/templates/roadmap.md +4 -4
  56. package/distilled/templates/spec.md +2 -2
  57. package/distilled/workflows/audit-milestone.md +22 -22
  58. package/distilled/workflows/complete-milestone.md +35 -35
  59. package/distilled/workflows/execute.md +29 -29
  60. package/distilled/workflows/map-codebase.md +30 -30
  61. package/distilled/workflows/new-milestone.md +18 -18
  62. package/distilled/workflows/new-project.md +45 -45
  63. package/distilled/workflows/pause.md +15 -15
  64. package/distilled/workflows/plan.md +63 -63
  65. package/distilled/workflows/progress.md +40 -39
  66. package/distilled/workflows/quick.md +43 -43
  67. package/distilled/workflows/resume.md +23 -22
  68. package/distilled/workflows/verify-work.md +7 -7
  69. package/distilled/workflows/verify.md +20 -20
  70. package/docs/BROWNFIELD-PROOF.md +1 -1
  71. package/docs/RUNTIME-SUPPORT.md +13 -13
  72. package/docs/USER-GUIDE.md +17 -20
  73. package/docs/claude/context-monitor.md +1 -1
  74. package/docs/proof/consumer-node-cli/README.md +1 -1
  75. package/package.json +3 -3
  76. package/bin/lib/closeout-report.mjs +0 -318
  77. package/bin/lib/evidence-contract.mjs +0 -325
  78. package/bin/lib/provenance.mjs +0 -390
  79. package/bin/lib/session-fingerprint.mjs +0 -223
  80. package/bin/lib/ui-proof.mjs +0 -1007
  81. package/distilled/workflows/plan-milestone-gaps.md +0 -204
@@ -6,28 +6,28 @@ Core mindset: individual phases can pass while the milestone fails. Integration
6
6
 
7
7
  <load_context>
8
8
  Before starting, read these files:
9
- 1. `.planning/ROADMAP.md` - milestone phases, definitions of done, requirement assignments
10
- 2. `.planning/SPEC.md` - requirement IDs, descriptions, and checkbox status
11
- 3. All phase VERIFICATION.md files (from `.planning/phases/`)
12
- 4. All phase SUMMARY.md files (from `.planning/phases/`)
13
- 5. `.planning/AUTH_MATRIX.md` (if it exists) — authorization matrix for matrix-driven auth verification
9
+ 1. `.work/ROADMAP.md` - milestone phases, definitions of done, requirement assignments
10
+ 2. `.work/SPEC.md` - requirement IDs, descriptions, and checkbox status
11
+ 3. All phase VERIFICATION.md files (from `.work/phases/`)
12
+ 4. All phase SUMMARY.md files (from `.work/phases/`)
13
+ 5. `.work/AUTH_MATRIX.md` (if it exists) — authorization matrix for matrix-driven auth verification
14
14
  </load_context>
15
15
 
16
16
  <repo_root_helper_contract>
17
- 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.
17
+ 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.
18
18
  </repo_root_helper_contract>
19
19
 
20
20
  <lifecycle_preflight>
21
21
  Before determining milestone scope or spawning the integration checker, run:
22
22
 
23
- - `node .planning/bin/gsdd.mjs lifecycle-preflight audit-milestone`
23
+ - `node .work/bin/gsdd.mjs lifecycle-preflight audit-milestone`
24
24
 
25
25
  If the preflight result is `blocked`, STOP and report the blocker instead of inferring milestone eligibility from workflow-local prose.
26
26
 
27
27
  Treat the preflight as an authorization seam over shared repo truth only:
28
28
  - it may authorize or reject milestone audit
29
29
  - it does not archive or mutate milestone state
30
- - the owned write for this workflow remains `.planning/v{version}-MILESTONE-AUDIT.md`
30
+ - the owned write for this workflow remains `.work/v{version}-MILESTONE-AUDIT.md`
31
31
  </lifecycle_preflight>
32
32
 
33
33
  <evidence_contract>
@@ -64,25 +64,25 @@ Rules:
64
64
  - deferrals must name the unsupported claim, missing evidence kind(s), and later workflow or milestone candidate when known
65
65
  - contradiction checks must cover evidence, public-surface, runtime, delivery, planning-drift, and generated-surface contradictions; stop or downgrade when the claim outruns the evidence
66
66
  - `delivery_posture` and `release_claim_posture` must remain compatible: `repo_closeout` and `runtime_validated_closeout` pair with `repo_only`; `delivery_supported_closeout` pairs with `delivery_sensitive`
67
- - local-only `.planning/` proof may support `repo_closeout`, but public-facing release/support claims need tracked public or repo-visible evidence when intended for external readers
67
+ - local-only `.work/` proof may support `repo_closeout`, but public-facing release/support claims need tracked public or repo-visible evidence when intended for external readers
68
68
  </evidence_contract>
69
69
 
70
70
  <process>
71
71
 
72
72
  ## 1. Determine Milestone Scope
73
73
 
74
- Parse `.planning/ROADMAP.md` for:
74
+ Parse `.work/ROADMAP.md` for:
75
75
  - All phases in the current milestone (sorted numerically)
76
76
  - Milestone definition of done
77
77
  - Phase-to-requirement mappings (the Requirements field in each phase detail)
78
78
 
79
- Parse `.planning/SPEC.md` for:
79
+ Parse `.work/SPEC.md` for:
80
80
  - All requirement IDs with descriptions
81
81
  - Current checkbox status (`[x]` vs `[ ]`)
82
82
 
83
83
  ## 2. Read All Phase Verifications
84
84
 
85
- For each phase directory in `.planning/phases/`, read the VERIFICATION.md.
85
+ For each phase directory in `.work/phases/`, read the VERIFICATION.md.
86
86
 
87
87
  From each VERIFICATION.md, extract:
88
88
  - **Status:** passed | gaps_found | human_needed
@@ -99,14 +99,14 @@ With phase context collected, delegate cross-phase integration checking:
99
99
 
100
100
  <delegate>
101
101
  **Identity:** Integration Checker
102
- **Instruction:** Read `.planning/templates/roles/integration-checker.md`, then check cross-phase integration.
102
+ **Instruction:** Read `.work/templates/roles/integration-checker.md`, then check cross-phase integration.
103
103
 
104
104
  **Context to provide:**
105
105
  - Phase directories in milestone scope
106
106
  - Key exports from each phase (extracted from SUMMARYs)
107
107
  - API routes and endpoints created
108
108
  - Milestone requirement IDs with descriptions and assigned phases
109
- - `.planning/AUTH_MATRIX.md` path (if it exists)
109
+ - `.work/AUTH_MATRIX.md` path (if it exists)
110
110
 
111
111
  **Task:** Verify cross-phase wiring, API coverage, auth protection, and E2E user flows. Return structured integration report with wiring summary, API coverage, auth protection, E2E flow status, and Requirements Integration Map.
112
112
 
@@ -134,12 +134,12 @@ Cross-reference three independent sources for each requirement to determine sati
134
134
 
135
135
  ### 5a. Parse SPEC.md Requirements
136
136
 
137
- Extract all requirement IDs from `.planning/SPEC.md`:
137
+ Extract all requirement IDs from `.work/SPEC.md`:
138
138
  - Requirement ID, description, checkbox status (`[x]` vs `[ ]`)
139
139
 
140
140
  ### 5b. Parse ROADMAP.md Phase-to-Requirement Mapping
141
141
 
142
- For each phase in `.planning/ROADMAP.md`, extract the Requirements field:
142
+ For each phase in `.work/ROADMAP.md`, extract the Requirements field:
143
143
  - Which requirements are assigned to which phase
144
144
 
145
145
  ### 5c. Parse Phase VERIFICATION.md Requirements Tables
@@ -170,11 +170,11 @@ For each requirement, determine status using all available sources:
170
170
 
171
171
  **FAIL gate:** Any `unsatisfied` requirement forces `gaps_found` status on the milestone audit. No exceptions.
172
172
 
173
- **Orphan detection:** Requirements in `.planning/SPEC.md` that are mapped to phases in `.planning/ROADMAP.md` but absent from ALL phase VERIFICATION.md files are orphaned. Orphaned requirements are treated as `unsatisfied` - they were assigned but never verified by any phase.
173
+ **Orphan detection:** Requirements in `.work/SPEC.md` that are mapped to phases in `.work/ROADMAP.md` but absent from ALL phase VERIFICATION.md files are orphaned. Orphaned requirements are treated as `unsatisfied` - they were assigned but never verified by any phase.
174
174
 
175
175
  ## 6. Write Milestone Audit Report
176
176
 
177
- Create `.planning/v{version}-MILESTONE-AUDIT.md` with structured frontmatter:
177
+ Create `.work/v{version}-MILESTONE-AUDIT.md` with structured frontmatter:
178
178
 
179
179
  ```yaml
180
180
  ---
@@ -240,10 +240,10 @@ Evidence gate:
240
240
  - `repo_only` audits cannot be downgraded merely because `runtime` or `delivery` evidence was never relevant
241
241
  - a `passed` audit must have no unsupported stronger release claims unless they are explicitly downgraded or deferred in `release_claim_contract`
242
242
  - invalid waivers are blockers: human approval cannot replace missing `code`, `test`, `runtime`, or `delivery` evidence for a stronger claim
243
- - public/support wording must be scoped to tracked public or repo-visible evidence; local-only `.planning/` artifacts cannot carry public release claims by themselves
243
+ - public/support wording must be scoped to tracked public or repo-visible evidence; local-only `.work/` artifacts cannot carry public release claims by themselves
244
244
  - generated-surface freshness is claim-scoped: W11-style drift blocks only claims that depend on generated runtime/helper freshness, not unrelated repo-only closeout
245
245
 
246
- **MANDATORY: The milestone audit report must exist at `.planning/v{version}-MILESTONE-AUDIT.md` on disk before presenting results. If the file was not written, STOP and report the write failure. Do NOT present audit results from conversation context alone — this is the highest-cost artifact to regenerate. Do NOT downgrade a write failure into "results shown inline anyway."**
246
+ **MANDATORY: The milestone audit report must exist at `.work/v{version}-MILESTONE-AUDIT.md` on disk before presenting results. If the file was not written, STOP and report the write failure. Do NOT present audit results from conversation context alone — this is the highest-cost artifact to regenerate. Do NOT downgrade a write failure into "results shown inline anyway."**
247
247
 
248
248
  ## 7. Present Results
249
249
 
@@ -285,13 +285,13 @@ Audit is complete when all of these are true:
285
285
  Report the audit result to the user, then present the next step:
286
286
 
287
287
  ---
288
- **Completed:** Milestone audit — created `.planning/v{version}-MILESTONE-AUDIT.md`.
288
+ **Completed:** Milestone audit — created `.work/v{version}-MILESTONE-AUDIT.md`.
289
289
 
290
290
  If status is `passed`:
291
291
  **Next step:** `/gsdd-complete-milestone` — archive the milestone and prepare for the next
292
292
 
293
293
  If status is `gaps_found`:
294
- **Next step:** `/gsdd-plan-milestone-gaps` — create gap-closure phases for the unsatisfied requirements
294
+ **Next step:** `/gsdd-plan` amend/extend mode — create gap-closure phases for the unsatisfied requirements
295
295
 
296
296
  If status is `tech_debt`:
297
297
  **Next step:** Either `/gsdd-complete-milestone` (accept debt) or `/gsdd-plan` (cleanup phase)
@@ -7,39 +7,39 @@ Scope boundary: you archive the current milestone. You do not start the next one
7
7
  </role>
8
8
 
9
9
  <prerequisites>
10
- `.planning/ROADMAP.md` must exist with phases.
11
- `.planning/SPEC.md` must exist.
12
- If `.planning/MILESTONES.md` does not exist, create it now (this is the first milestone completion — Step 8 will write the first entry).
10
+ `.work/ROADMAP.md` must exist with phases.
11
+ `.work/SPEC.md` must exist.
12
+ If `.work/MILESTONES.md` does not exist, create it now (this is the first milestone completion — Step 8 will write the first entry).
13
13
 
14
- If `.planning/milestones/` does not exist, create it before writing archive files.
14
+ If `.work/milestones/` does not exist, create it before writing archive files.
15
15
  </prerequisites>
16
16
 
17
17
  <load_context>
18
18
  Before starting, read these files:
19
19
 
20
- 1. `.planning/ROADMAP.md` — phase statuses, milestone name, phase range
21
- 2. `.planning/SPEC.md` — requirements, validated capabilities, current state section
22
- 3. `.planning/MILESTONES.md` — previous milestone entries (for format reference); if this is the first milestone, skip — no previous entries exist yet
23
- 4. `.planning/config.json` — `gitProtocol`, `mode` (for STOP gate behavior)
24
- 5. All phase SUMMARY.md files in `.planning/phases/` — accomplishments, task counts
25
- 6. Most recent `.planning/v*-MILESTONE-AUDIT.md` — audit status (passed / gaps_found)
20
+ 1. `.work/ROADMAP.md` — phase statuses, milestone name, phase range
21
+ 2. `.work/SPEC.md` — requirements, validated capabilities, current state section
22
+ 3. `.work/MILESTONES.md` — previous milestone entries (for format reference); if this is the first milestone, skip — no previous entries exist yet
23
+ 4. `.work/config.json` — `gitProtocol`, `mode` (for STOP gate behavior)
24
+ 5. All phase SUMMARY.md files in `.work/phases/` — accomplishments, task counts
25
+ 6. Most recent `.work/v*-MILESTONE-AUDIT.md` — audit status (passed / gaps_found)
26
26
  </load_context>
27
27
 
28
28
  <repo_root_helper_contract>
29
- 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.
29
+ 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.
30
30
  </repo_root_helper_contract>
31
31
 
32
32
  <lifecycle_preflight>
33
33
  Before verifying readiness or gathering archive stats, run:
34
34
 
35
- - `node .planning/bin/gsdd.mjs lifecycle-preflight complete-milestone`
35
+ - `node .work/bin/gsdd.mjs lifecycle-preflight complete-milestone`
36
36
 
37
37
  If the preflight result is `blocked`, STOP and report the blocker instead of inferring milestone-close eligibility from workflow-local prose.
38
38
 
39
39
  Treat the preflight as an authorization seam over shared repo truth only:
40
40
  - it may authorize or reject milestone completion
41
41
  - it does not mutate lifecycle state by itself
42
- - owned writes remain the archive artifacts, `MILESTONES.md`, `.planning/SPEC.md`, and the retained `ROADMAP.md` collapse
42
+ - owned writes remain the archive artifacts, `MILESTONES.md`, `.work/SPEC.md`, and the retained `ROADMAP.md` collapse
43
43
  </lifecycle_preflight>
44
44
 
45
45
  <evidence_contract>
@@ -66,7 +66,7 @@ Read the audit frontmatter and preserve:
66
66
  Shared closure rules:
67
67
  - `repo_only` completion may proceed with repo-local closure evidence only; do not invent `runtime` or `delivery` proof
68
68
  - `delivery_sensitive` completion must not proceed on code/prose-only evidence; the audit must already show required `code`, `test`, `runtime`, and `delivery` evidence with no missing required kinds
69
- - if the audit omits the evidence contract or still has missing required kinds, STOP and route back to `/gsdd-audit-milestone` or `/gsdd-plan-milestone-gaps` instead of silently closing the milestone
69
+ - if the audit omits the evidence contract or still has missing required kinds, STOP and route back to `/gsdd-audit-milestone` or `/gsdd-plan` amend/extend mode instead of silently closing the milestone
70
70
  - release claim postures are inherited from audit:
71
71
  - `repo_closeout` permits repo-local milestone closure only and must not imply public support, delivery, runtime validation, generated-surface freshness, package publication, tags, or GitHub Releases
72
72
  - `runtime_validated_closeout` may name only the runtime or surface with explicit `runtime` evidence
@@ -74,7 +74,7 @@ Shared closure rules:
74
74
  - inherited `delivery_posture` and `release_claim_posture` must be compatible: `repo_closeout` and `runtime_validated_closeout` use `repo_only`; `delivery_supported_closeout` uses `delivery_sensitive`
75
75
  - waivers are valid only when they narrow the release claim or defer an unsupported claim. Deferrals must name the unsupported claim, missing evidence kind(s), and later workflow or milestone candidate when known. STOP if a waiver preserves a stronger claim while required evidence is missing.
76
76
  - STOP if `release_claim_contract.unsupported_claims` remain without downgrade or deferral, if unsupported claims, invalid waivers, or failed contradiction checks remain, or if completion wording would claim more than the audit evidence supports. Failed contradiction checks are claim-scoped: generated-surface failures block only runtime/generated freshness claims, not unrelated `repo_closeout` completion.
77
- - local-only `.planning/` proof can support repo closeout, but cannot become public release proof by itself.
77
+ - local-only `.work/` proof can support repo closeout, but cannot become public release proof by itself.
78
78
  </evidence_contract>
79
79
 
80
80
  <process>
@@ -93,7 +93,7 @@ Check:
93
93
 
94
94
  STOP without archiving. Route to the narrowest corrective workflow instead:
95
95
  1. **Run audit first** — `/gsdd-audit-milestone` if audit is missing, stale, or missing required release-claim schema.
96
- 2. **Close gaps first** — `/gsdd-plan-milestone-gaps` if audit found gaps or the release claim outruns available evidence.
96
+ 2. **Close gaps first** — `/gsdd-plan` amend/extend mode if audit found gaps or the release claim outruns available evidence.
97
97
  3. **Abort** — stop without archiving if the user does not want corrective work now.
98
98
 
99
99
  **If all phases complete, audit passed, the audit evidence contract is satisfied, and the inherited release claim contract has no unsupported stronger claims:** Proceed.
@@ -122,7 +122,7 @@ Present 4-8 accomplishments for review. Trim or adjust with user before writing
122
122
 
123
123
  ## 5. Archive Roadmap
124
124
 
125
- Create `.planning/milestones/v[X.Y]-ROADMAP.md` with full milestone details:
125
+ Create `.work/milestones/v[X.Y]-ROADMAP.md` with full milestone details:
126
126
 
127
127
  ```markdown
128
128
  # Milestone v[X.Y]: [Name]
@@ -173,19 +173,19 @@ Plans:
173
173
 
174
174
  ---
175
175
 
176
- *For current project status, see `.planning/ROADMAP.md`*
176
+ *For current project status, see `.work/ROADMAP.md`*
177
177
  ```
178
178
 
179
179
  ## 6. Archive Requirements
180
180
 
181
- Create `.planning/milestones/v[X.Y]-REQUIREMENTS.md`:
181
+ Create `.work/milestones/v[X.Y]-REQUIREMENTS.md`:
182
182
 
183
183
  ```markdown
184
184
  # Requirements Archive: v[X.Y] Milestone
185
185
 
186
186
  **Archived:** [date]
187
187
  **Milestone:** [name]
188
- **Source:** `.planning/SPEC.md` requirements section at milestone completion
188
+ **Source:** `.work/SPEC.md` requirements section at milestone completion
189
189
 
190
190
  ---
191
191
 
@@ -211,17 +211,17 @@ Create `.planning/milestones/v[X.Y]-REQUIREMENTS.md`:
211
211
 
212
212
  ---
213
213
 
214
- *Source: `.planning/SPEC.md` as of [date]*
214
+ *Source: `.work/SPEC.md` as of [date]*
215
215
  *Next milestone requirements: defined via `/gsdd-new-milestone`*
216
216
  ```
217
217
 
218
218
  ## 7. Move Audit File
219
219
 
220
- If `.planning/v[X.Y]-MILESTONE-AUDIT.md` exists, note its location in the MILESTONES.md entry. (Leave the file in `.planning/` — it is already in the gitignored planning directory. No move required unless you prefer to co-locate it with the other archives.)
220
+ If `.work/v[X.Y]-MILESTONE-AUDIT.md` exists, note its location in the MILESTONES.md entry. (Leave the file in `.work/` — it is already in the gitignored planning directory. No move required unless you prefer to co-locate it with the other archives.)
221
221
 
222
222
  ## 8. Update MILESTONES.md
223
223
 
224
- Append an entry to `.planning/MILESTONES.md`:
224
+ Append an entry to `.work/MILESTONES.md`:
225
225
 
226
226
  ```markdown
227
227
  ## ✅ v[X.Y] — [Name] ([date])
@@ -239,8 +239,8 @@ Append an entry to `.planning/MILESTONES.md`:
239
239
  3. [Accomplishment 3]
240
240
  4. [Accomplishment 4]
241
241
 
242
- **Archive:** `.planning/milestones/v[X.Y]-ROADMAP.md`
243
- **Requirements:** `.planning/milestones/v[X.Y]-REQUIREMENTS.md`
242
+ **Archive:** `.work/milestones/v[X.Y]-ROADMAP.md`
243
+ **Requirements:** `.work/milestones/v[X.Y]-REQUIREMENTS.md`
244
244
  **Suggested tag:** `v[X.Y]` (advisory; omit or mark not created unless git confirms it exists)
245
245
  ```
246
246
 
@@ -259,7 +259,7 @@ Update SPEC.md to reflect the completed milestone:
259
259
 
260
260
  - **Milestone:** v[X.Y] [Name] — COMPLETED [date]
261
261
  - **Phases:** [N]–[M] complete, all requirements verified ([N]/[N]), [test count] tests passing
262
- - **Archive:** `.planning/milestones/v[X.Y]-ROADMAP.md`
262
+ - **Archive:** `.work/milestones/v[X.Y]-ROADMAP.md`
263
263
  - **Decisions:** [D1–DN] evidence-backed, all in [reference if applicable]
264
264
  - **Blockers:** None — [list any LATER-priority gaps if applicable]
265
265
  - **Next:** `/gsdd-new-milestone` to plan v[X.next] work
@@ -288,7 +288,7 @@ Replace the active milestone phases in ROADMAP.md with a collapsed `<details>` b
288
288
  - [x] **Phase [N+1]: [Name]** — completed [date]
289
289
  [...]
290
290
 
291
- Full details: [`.planning/milestones/v[X.Y]-ROADMAP.md`](milestones/v[X.Y]-ROADMAP.md)
291
+ Full details: [`.work/milestones/v[X.Y]-ROADMAP.md`](milestones/v[X.Y]-ROADMAP.md)
292
292
 
293
293
  </details>
294
294
 
@@ -315,9 +315,9 @@ Advisory: Tag this milestone in git:
315
315
  - [ ] Version confirmed
316
316
  - [ ] Stats gathered from SUMMARY.md files and git
317
317
  - [ ] Accomplishments extracted and reviewed
318
- - [ ] `.planning/milestones/v[X.Y]-ROADMAP.md` created with full phase details
319
- - [ ] `.planning/milestones/v[X.Y]-REQUIREMENTS.md` created with all requirement statuses
320
- - [ ] `.planning/MILESTONES.md` updated with new entry
318
+ - [ ] `.work/milestones/v[X.Y]-ROADMAP.md` created with full phase details
319
+ - [ ] `.work/milestones/v[X.Y]-REQUIREMENTS.md` created with all requirement statuses
320
+ - [ ] `.work/MILESTONES.md` updated with new entry
321
321
  - [ ] SPEC.md Must Have requirements moved to Validated section
322
322
  - [ ] SPEC.md Current State updated to reflect completed status
323
323
  - [ ] ROADMAP.md collapsed with `<details>` block pointing to archive
@@ -333,11 +333,11 @@ Report to the user what was archived, then present the next step:
333
333
  **Completed:** Milestone v[X.Y] [Name] archived.
334
334
 
335
335
  Archived:
336
- - `.planning/milestones/v[X.Y]-ROADMAP.md` — full phase details
337
- - `.planning/milestones/v[X.Y]-REQUIREMENTS.md` — requirements at milestone completion
338
- - `.planning/MILESTONES.md` — updated milestone history
339
- - `.planning/SPEC.md` — requirements evolved, current state updated
340
- - `.planning/ROADMAP.md` — active phases collapsed to `<details>`
336
+ - `.work/milestones/v[X.Y]-ROADMAP.md` — full phase details
337
+ - `.work/milestones/v[X.Y]-REQUIREMENTS.md` — requirements at milestone completion
338
+ - `.work/MILESTONES.md` — updated milestone history
339
+ - `.work/SPEC.md` — requirements evolved, current state updated
340
+ - `.work/ROADMAP.md` — active phases collapsed to `<details>`
341
341
 
342
342
  **Next step:** `/gsdd-new-milestone` — start the next milestone cycle
343
343
 
@@ -8,34 +8,34 @@ You follow the plan, verify before reporting completion, document deviations, an
8
8
  Load only the context needed for the next safe action. Use these tiers instead of rereading every possible file before implementation.
9
9
 
10
10
  ### mandatory_now
11
- Read before mutation: target `PLAN.md` frontmatter/current task/boundaries; bounded `.planning/SPEC.md` current state, active requirement IDs, and relevant constraints; `.planning/ROADMAP.md` phase goal/status/success criteria; immediately prior `.planning/phases/*-SUMMARY.md` `<judgment>` when present; and the preflight result from `<lifecycle_preflight>`.
12
- If no immediately prior SUMMARY `<judgment>` exists, check whether `.planning/.continue-here.bak` exists before mutation. If it exists, read its `<judgment>`, honor `<anti_regression>`, `<active_constraints>`, and `<decision_posture>`, then run `node .planning/bin/gsdd.mjs file-op delete .planning/.continue-here.bak --missing ok` (workflow-owned auto-clean).
11
+ Read before mutation: target `PLAN.md` frontmatter/current task/boundaries; bounded `.work/SPEC.md` current state, active requirement IDs, and relevant constraints; `.work/ROADMAP.md` phase goal/status/success criteria; immediately prior `.work/phases/*-SUMMARY.md` `<judgment>` when present; and the preflight result from `<lifecycle_preflight>`.
12
+ If no immediately prior SUMMARY `<judgment>` exists, check whether `.work/.continue-here.bak` exists before mutation. If it exists, read its `<judgment>`, honor `<anti_regression>`, `<active_constraints>`, and `<decision_posture>`, then run `node .work/bin/gsdd.mjs file-op delete .work/.continue-here.bak --missing ok` (workflow-owned auto-clean).
13
13
 
14
14
  ### task_scoped
15
15
  Read before editing each task, not all at startup: current task `<files>` entries, relevant source needed for current symbols/callers/tests/generated surfaces, and focused neighboring references found by targeted search.
16
16
 
17
17
  ### reference_only
18
- Consult deeper `.planning/SPEC.md` and `.planning/ROADMAP.md` sections only for the specific decision, requirement, or status being validated.
18
+ Consult deeper `.work/SPEC.md` and `.work/ROADMAP.md` sections only for the specific decision, requirement, or status being validated.
19
19
 
20
20
  ### deferred_or_conditional
21
21
  Read only when the current task or a deviation needs them: older phase summaries and broader historical context beyond the mandatory-now handoff.
22
22
  </load_context>
23
23
 
24
24
  <repo_root_helper_contract>
25
- 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.
25
+ 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.
26
26
  </repo_root_helper_contract>
27
27
 
28
28
  <lifecycle_preflight>
29
29
  Before implementing or mutating any lifecycle artifact, run:
30
- - `node .planning/bin/gsdd.mjs lifecycle-preflight execute {phase_num} --expects-mutation phase-status`
30
+ - `node .work/bin/gsdd.mjs lifecycle-preflight execute {phase_num} --expects-mutation phase-status`
31
31
  If the preflight result is `blocked`, STOP and surface the blocker instead of inferring eligibility from workflow-local prose.
32
32
 
33
33
  Treat the preflight as an authorization seam over shared repo truth only:
34
34
  - it may authorize or reject execution
35
- - it does not mutate `.planning/ROADMAP.md` by itself
36
- - owned writes remain execution artifacts, and ROADMAP mutation stays explicit in `<state_updates>` via `node .planning/bin/gsdd.mjs phase-status`
35
+ - it does not mutate `.work/ROADMAP.md` by itself
36
+ - owned writes remain execution artifacts, and ROADMAP mutation stays explicit in `<state_updates>` via `node .work/bin/gsdd.mjs phase-status`
37
37
  </lifecycle_preflight>
38
- <control_map_check>Before code mutation, run `node .planning/bin/gsdd.mjs control-map --json` when available. Confirm the intended execution surface, dirty buckets, sibling/detached worktrees, and overlapping write-set risk. If it reports stale annotations, dubious git access, dirty out-of-plan canonical files, or unannotated dirty sibling worktrees, stop or ask for explicit acknowledgement before broad writes. Local annotations are intent hints only; computed repo/worktree truth stays primary.
38
+ <control_map_check>Before code mutation, run `node .work/bin/gsdd.mjs control-map --json` when available. Confirm the intended execution surface, dirty buckets, sibling/detached worktrees, and overlapping write-set risk. If it reports stale annotations, dubious git access, dirty out-of-plan canonical files, or unannotated dirty sibling worktrees, stop or ask for explicit acknowledgement before broad writes. Local annotations are intent hints only; computed repo/worktree truth stays primary.
39
39
  </control_map_check>
40
40
  <runtime_contract>
41
41
  Execution uses the same `Runtime` and `Assurance` types as planning and verification.
@@ -55,7 +55,7 @@ If plan runtime/assurance is missing, use `status: unknown`.
55
55
  A phase often contains multiple plans. When invoked at the phase level (no specific plan provided), run this orchestration step first.
56
56
 
57
57
  ### Discover Plans and Group by Wave
58
- 1. Scan `.planning/phases/{phase_dir}/` for all `*-PLAN.md` files.
58
+ 1. Scan `.work/phases/{phase_dir}/` for all `*-PLAN.md` files.
59
59
  2. For each plan, read its frontmatter `wave` field (default: `wave: 1` if absent).
60
60
  3. Group plans by wave number. Collect the set of distinct wave numbers and sort them ascending.
61
61
  4. Check for `*-SUMMARY.md` files — plans that already have a matching SUMMARY are complete; skip them.
@@ -119,8 +119,8 @@ Checkpoint tasks are contract boundaries. Continuing past one silently breaks th
119
119
  ### Implementation Rules
120
120
  - Follow the `<action>` precisely.
121
121
  - If a task references existing code, read it first and match existing patterns.
122
- - If you are unsure about something, check `.planning/SPEC.md` decisions first, then ask if still unclear.
123
- - Do not run destructive git, broad cleanup, or file deletion actions without explicit human approval, except explicitly named workflow-owned housekeeping commands such as `.planning/.continue-here.bak` auto-clean.
122
+ - If you are unsure about something, check `.work/SPEC.md` decisions first, then ask if still unclear.
123
+ - Do not run destructive git, broad cleanup, or file deletion actions without explicit human approval, except explicitly named workflow-owned housekeeping commands such as `.work/.continue-here.bak` auto-clean.
124
124
 
125
125
  ### Change-Impact Discipline
126
126
  Before modifying any existing behavior, run a targeted ripple check for the current task:
@@ -195,7 +195,7 @@ git commit -m "feat: wire users page to real route"
195
195
 
196
196
  Git rules:
197
197
  - **Repo and user conventions win first.** This table is a reference, not a mandate.
198
- - `.planning/config.json -> gitProtocol` is advisory only.
198
+ - `.work/config.json -> gitProtocol` is advisory only.
199
199
  - **Stage only files listed in the plan's `files-modified` frontmatter.** Never use `git add .` or `git add -A`. If you need to stage a file not in `files-modified`, record it as a deviation.
200
200
  - **Wrong-branch check:** Before significant implementation begins, verify HEAD is not `main` or `master` if repo convention expects a feature branch; if it is, STOP and hard-warn the user before proceeding.
201
201
  - **Transition-safety warning pass:** Before significant implementation begins, inspect staged, unstaged, untracked, unpushed, PR-less, stale/spent, and mixed-scope branch signals. Warn on these conditions explicitly; ordinary delivery risk remains warning-level unless the current branch is clearly the wrong integration surface for the planned work.
@@ -279,7 +279,7 @@ If a task fails verification 3 times after fixes, STOP and report the failure to
279
279
  <state_updates>
280
280
  After completing all tasks in the plan:
281
281
 
282
- ### 1. Update `.planning/SPEC.md` "Current State"
282
+ ### 1. Update `.work/SPEC.md` "Current State"
283
283
  Keep the update factual and compact:
284
284
 
285
285
  ```markdown
@@ -292,18 +292,18 @@ Keep the update factual and compact:
292
292
 
293
293
  ### 2. Update ROADMAP.md Phase Status
294
294
  Do not hand-edit the ROADMAP checkbox line. Use the status-aware helper instead:
295
- - Run `node .planning/bin/gsdd.mjs phase-status {N} in_progress` when implementation work has started or this plan completes.
296
- - Do NOT run `node .planning/bin/gsdd.mjs phase-status {N} done` from execute. Only verify may close a phase after writing a `status: passed` VERIFICATION.md.
295
+ - Run `node .work/bin/gsdd.mjs phase-status {N} in_progress` when implementation work has started or this plan completes.
296
+ - Do NOT run `node .work/bin/gsdd.mjs phase-status {N} done` from execute. Only verify may close a phase after writing a `status: passed` VERIFICATION.md.
297
297
 
298
- The helper owns the `[ ]` / `[-]` / `[x]` mutation for `.planning/ROADMAP.md`, including both the overview line and the matching `## Phase Details` `**Status**` line when both exist.
298
+ The helper owns the `[ ]` / `[-]` / `[x]` mutation for `.work/ROADMAP.md`, including both the overview line and the matching `## Phase Details` `**Status**` line when both exist.
299
299
 
300
- ### 3. Rebaseline Reviewed Planning State
301
- After `.planning/SPEC.md` and `phase-status` updates are complete and reviewed as intentional, run:
302
- - `node .planning/bin/gsdd.mjs session-fingerprint write`
303
- This is the explicit planning-state handoff. Do not rely on a no-op `phase-status` command to rebaseline SPEC drift.
300
+ ### 3. Confirm Reviewed Planning State
301
+ After `.work/SPEC.md` and `phase-status` updates are complete and reviewed as intentional, run:
302
+ - `node .work/bin/gsdd.mjs next --json`
303
+ This is the explicit routing-state handoff. Do not rely on a no-op `phase-status` command to prove the next action reflects reviewed SPEC or ROADMAP changes.
304
304
 
305
305
  ### 4. Write Phase Summary
306
- Create `.planning/phases/{phase_dir}/{plan_id}-SUMMARY.md` with:
306
+ Create `.work/phases/{phase_dir}/{plan_id}-SUMMARY.md` with:
307
307
 
308
308
  ```markdown
309
309
  ---
@@ -377,7 +377,7 @@ Write the structured sections honestly:
377
377
  Do not invent an inline PLAN task-state mutation scheme if the plan does not define one.
378
378
  Summary-driven progress tracking avoids silent drift between the plan contract and what execution actually completed.
379
379
 
380
- **MANDATORY: You MUST write SUMMARY.md to disk at `.planning/phases/{phase_dir}/{plan_id}-SUMMARY.md`. Output to conversation alone is NOT sufficient. If this file is not written to disk, execution is NOT complete.**
380
+ **MANDATORY: You MUST write SUMMARY.md to disk at `.work/phases/{phase_dir}/{plan_id}-SUMMARY.md`. Output to conversation alone is NOT sufficient. If this file is not written to disk, execution is NOT complete.**
381
381
  </state_updates>
382
382
 
383
383
  <checkpoint_protocol>
@@ -414,9 +414,9 @@ For each completed task:
414
414
  [ ] Local verification passed
415
415
 
416
416
  For state updates:
417
- [ ] .planning/SPEC.md "Current State" is accurate
417
+ [ ] .work/SPEC.md "Current State" is accurate
418
418
  [ ] ROADMAP.md status remains open (`[-]` if status was updated) until verification passes
419
- [ ] `node .planning/bin/gsdd.mjs session-fingerprint write` ran after reviewed SPEC and phase-status updates
419
+ [ ] `node .work/bin/gsdd.mjs next --json` ran after reviewed SPEC and phase-status updates
420
420
  [ ] SUMMARY.md exists with `<checks>`, `<handoff>`, `<deltas>`, and `<judgment>` and reflects the actual work
421
421
 
422
422
  Overall:
@@ -435,21 +435,21 @@ Execution is done when all of these are true:
435
435
  - [ ] Deviation rules were followed
436
436
  - [ ] Mandatory-now context and task-scoped files read at the correct execution point
437
437
  - [ ] Authentication gates handled with the auth-gate protocol
438
- - [ ] `.planning/SPEC.md` current state is updated accurately
438
+ - [ ] `.work/SPEC.md` current state is updated accurately
439
439
  - [ ] `ROADMAP.md` uses `[ ]`, `[-]`, `[x]` consistently and is not marked `[x]` by execute
440
- - [ ] `node .planning/bin/gsdd.mjs session-fingerprint write` was run after reviewed planning-state updates
440
+ - [ ] `node .work/bin/gsdd.mjs next --json` was run after reviewed planning-state updates
441
441
  - [ ] `SUMMARY.md` is written
442
442
  - [ ] `SUMMARY.md` frontmatter records `runtime` and `assurance`
443
443
  - [ ] `SUMMARY.md` includes structured `<checks>`, `<handoff>`, `<deltas>`, and `<judgment>` sections
444
444
  - [ ] Self-check passed
445
- - [ ] Any git actions honor repo or user conventions and `.planning/config.json`
445
+ - [ ] Any git actions honor repo or user conventions and `.work/config.json`
446
446
  </success_criteria>
447
447
 
448
448
  <completion>
449
449
  Report what was accomplished, then present the next step:
450
450
  ---
451
- **Completed:** Plan execution — created `.planning/phases/{phase_dir}/{plan_id}-SUMMARY.md`.
452
- **Next step:** Check `.planning/config.json` → `workflow.verifier`:
451
+ **Completed:** Plan execution — created `.work/phases/{phase_dir}/{plan_id}-SUMMARY.md`.
452
+ **Next step:** Check `.work/config.json` → `workflow.verifier`:
453
453
  - If `true`: run `/gsdd-verify` — verify that the phase goal was achieved
454
454
  - If `false` (or key missing): run `/gsdd-progress` — check status and route to the next phase
455
455