gsdd-cli 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -6
- package/bin/gsdd.mjs +17 -14
- package/bin/lib/health-truth.mjs +8 -8
- package/bin/lib/health.mjs +29 -26
- package/bin/lib/init-flow.mjs +91 -34
- package/bin/lib/init-runtime.mjs +5 -4
- package/bin/lib/lifecycle-state.mjs +211 -28
- package/bin/lib/manifest.mjs +24 -20
- package/bin/lib/provenance.mjs +281 -59
- package/bin/lib/rendering.mjs +69 -19
- package/bin/lib/runtime-freshness.mjs +46 -21
- package/distilled/DESIGN.md +314 -6
- package/distilled/EVIDENCE-INDEX.md +70 -10
- package/distilled/README.md +2 -2
- package/distilled/workflows/audit-milestone.md +1 -1
- package/distilled/workflows/complete-milestone.md +1 -1
- package/distilled/workflows/execute.md +5 -5
- package/distilled/workflows/map-codebase.md +11 -11
- package/distilled/workflows/new-milestone.md +40 -24
- package/distilled/workflows/new-project.md +43 -26
- package/distilled/workflows/pause.md +1 -1
- package/distilled/workflows/plan.md +184 -73
- package/distilled/workflows/progress.md +103 -54
- package/distilled/workflows/quick.md +11 -10
- package/distilled/workflows/resume.md +140 -66
- package/distilled/workflows/verify.md +5 -5
- package/docs/RUNTIME-SUPPORT.md +2 -2
- package/docs/USER-GUIDE.md +9 -5
- package/package.json +19 -20
|
@@ -16,8 +16,8 @@ This is a read-only workflow. No files are created, modified, or deleted. If `.p
|
|
|
16
16
|
`progress` stays read-only.
|
|
17
17
|
|
|
18
18
|
- Derive lifecycle posture from repo truth only; do not mutate phase or milestone state from this workflow.
|
|
19
|
-
- Do not call `gsdd phase-status` here.
|
|
20
|
-
- If you recommend a next step that crosses a lifecycle boundary, the downstream mutating workflow must rerun its own `gsdd lifecycle-preflight ...` gate before acting.
|
|
19
|
+
- Do not call `node .planning/bin/gsdd.mjs phase-status` here.
|
|
20
|
+
- If you recommend a next step that crosses a lifecycle boundary, the downstream mutating workflow must rerun its own `node .planning/bin/gsdd.mjs lifecycle-preflight ...` gate before acting.
|
|
21
21
|
</lifecycle_boundary>
|
|
22
22
|
|
|
23
23
|
<process>
|
|
@@ -26,11 +26,12 @@ This is a read-only workflow. No files are created, modified, or deleted. If `.p
|
|
|
26
26
|
Check for project artifacts in order:
|
|
27
27
|
|
|
28
28
|
1. **No `.planning/` directory** — tell the user to run `gsdd init`. Stop.
|
|
29
|
-
2. **
|
|
29
|
+
2. **If `.planning/brownfield-change/CHANGE.md` exists** — treat this as the active medium-scope brownfield continuity state. Go to Branch F.
|
|
30
|
+
3. **No `.planning/ROADMAP.md` AND no `.planning/SPEC.md`** — check for non-phase brownfield artifacts:
|
|
30
31
|
- if `.planning/codebase/` has substantive map documents, or `.planning/quick/` has LOG/task artifacts, treat this as a non-phase brownfield state. Go to Branch F.
|
|
31
32
|
- otherwise the project has no artifacts. Suggest running the `/gsdd-new-project` workflow. Stop.
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
4. **No `.planning/ROADMAP.md` BUT `.planning/SPEC.md` exists** — this is a between-milestones state (milestone was completed and archived). Go to Branch F.
|
|
34
|
+
5. **Both exist** — proceed to derive status, including whether a retained `ROADMAP.md` already represents an archived milestone rather than an audit-ready one.
|
|
34
35
|
</check_existence>
|
|
35
36
|
|
|
36
37
|
<derive_status>
|
|
@@ -40,13 +41,30 @@ Read the following and extract state:
|
|
|
40
41
|
- If `.planning/SPEC.md` exists, read it and extract the project name from the first heading.
|
|
41
42
|
- If `.planning/SPEC.md` does not exist, derive the project name from the repo root directory name.
|
|
42
43
|
|
|
43
|
-
**Non-phase brownfield state:**
|
|
44
|
-
If `.planning/ROADMAP.md` does not exist, determine whether the repo is currently in one of these Branch F states:
|
|
45
|
-
- `
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
**Non-phase brownfield state:**
|
|
45
|
+
If `.planning/ROADMAP.md` does not exist, determine whether the repo is currently in one of these Branch F states:
|
|
46
|
+
- `active_brownfield_change` — `.planning/brownfield-change/CHANGE.md` exists; read `CHANGE.md` first as the canonical operational anchor, then read `HANDOFF.md` for judgment-only context
|
|
47
|
+
- `between_milestones` — `.planning/SPEC.md` exists
|
|
48
|
+
- `codebase_only` — `.planning/codebase/` has substantive map documents but `.planning/SPEC.md` does not exist
|
|
49
|
+
- `quick_lane` — `.planning/quick/LOG.md` or quick task directories exist but `.planning/SPEC.md` and `.planning/ROADMAP.md` do not
|
|
50
|
+
|
|
51
|
+
For `active_brownfield_change`, `codebase_only`, and `quick_lane`, there is no active phase count. Record the non-phase state instead of trying to infer current milestone progress.
|
|
52
|
+
|
|
53
|
+
**Active brownfield change:**
|
|
54
|
+
If `.planning/brownfield-change/CHANGE.md` exists, extract:
|
|
55
|
+
- change title from the first heading
|
|
56
|
+
- current posture from `## Current Status`
|
|
57
|
+
- current branch / integration surface from `## Current Status`
|
|
58
|
+
- next action from `## Next Action`
|
|
59
|
+
- declared write scope from `## PR Slice Ownership` when present
|
|
60
|
+
|
|
61
|
+
If `.planning/brownfield-change/HANDOFF.md` exists, read it as judgment-only context:
|
|
62
|
+
- active constraints
|
|
63
|
+
- unresolved uncertainty
|
|
64
|
+
- decision posture
|
|
65
|
+
- anti-regression
|
|
66
|
+
|
|
67
|
+
Do not treat `HANDOFF.md` as a co-equal status source. It explains the active change; `CHANGE.md` remains the operational anchor.
|
|
50
68
|
|
|
51
69
|
**Phase statuses:**
|
|
52
70
|
If `.planning/ROADMAP.md` exists, read it and parse phase statuses:
|
|
@@ -68,19 +86,30 @@ If `ROADMAP.md` exists and all phases in the current milestone are `[x]`, determ
|
|
|
68
86
|
- if both the shipped ledger entry and the matching archived audit artifact exist, treat the retained `ROADMAP.md` as archived milestone evidence and route to Branch F instead of Branch E
|
|
69
87
|
- if either one is missing, keep the milestone in the audit-ready Branch E state
|
|
70
88
|
|
|
71
|
-
**Checkpoint:**
|
|
72
|
-
Check if `.planning/.continue-here.md` exists. If yes, note the `workflow` and `phase` frontmatter and the `next_action` section.
|
|
73
|
-
- Treat checkpoint routing classes explicitly:
|
|
74
|
-
- `phase` and `quick` checkpoints remain blocking resume-owned surfaces for routing.
|
|
75
|
-
- `generic` checkpoints are informational-only for this read-only reporter: show the checkpoint and its `next_action`, but keep evaluating the real lifecycle recommendation instead of routing Branch A back through `/gsdd-resume`.
|
|
89
|
+
**Checkpoint:**
|
|
90
|
+
Check if `.planning/.continue-here.md` exists. If yes, note the `workflow` and `phase` frontmatter and the `next_action` section.
|
|
91
|
+
- Treat checkpoint routing classes explicitly:
|
|
92
|
+
- `phase` and `quick` checkpoints remain blocking resume-owned surfaces for routing only when there is no active brownfield change, or when a shared strict-match rule proves they still describe the active execution surface.
|
|
93
|
+
- `generic` checkpoints are informational-only for this read-only reporter: show the checkpoint and its `next_action`, but keep evaluating the real lifecycle recommendation instead of routing Branch A back through `/gsdd-resume`.
|
|
94
|
+
- If `.planning/brownfield-change/CHANGE.md` also exists, apply one shared strict-match rule before letting a surviving `phase` or `quick` checkpoint outrank the operational anchor:
|
|
95
|
+
- branch alignment: the checkpoint branch, `CHANGE.md` integration surface, and current git branch all match
|
|
96
|
+
- scope alignment: the live dirty tree stays inside the declared brownfield write scope
|
|
97
|
+
- still-active execution state: the checkpoint still points at live unfinished `phase` or `quick` work
|
|
98
|
+
- If any one of those checks fails, keep the checkpoint visible in the status block but continue routing from the active brownfield change instead of bouncing Branch A back through `/gsdd-resume`.
|
|
76
99
|
|
|
77
100
|
**Incomplete work:**
|
|
78
101
|
If `.planning/phases/` exists, scan it for:
|
|
79
102
|
- PLAN files without a matching SUMMARY file (incomplete execution)
|
|
80
103
|
- SUMMARY files without a matching VERIFICATION file (unverified, only relevant if `workflow.verifier` is enabled in `.planning/config.json`; if config.json cannot be read, assume verifier is disabled)
|
|
81
104
|
|
|
82
|
-
**Quick task log:**
|
|
83
|
-
If `.planning/quick/LOG.md` exists, check the last entry for a non-terminal status.
|
|
105
|
+
**Quick task log:**
|
|
106
|
+
If `.planning/quick/LOG.md` exists, check the last entry for a non-terminal status.
|
|
107
|
+
|
|
108
|
+
**Artifact-versus-worktree mismatch:**
|
|
109
|
+
If an active brownfield change exists, compare `CHANGE.md` to live git/worktree truth:
|
|
110
|
+
- branch mismatch between `CHANGE.md` and the current git branch is a warning
|
|
111
|
+
- dirty files outside the declared brownfield write scope are a warning
|
|
112
|
+
- `CHANGE.md` may stay the operational anchor, but conflicting worktree truth must not remain silent
|
|
84
113
|
|
|
85
114
|
<unmerged_commits_check>
|
|
86
115
|
Run `git log main..HEAD --oneline` to detect commits on the current branch that have not been merged to `main`.
|
|
@@ -111,16 +140,28 @@ Project: [name from SPEC.md]
|
|
|
111
140
|
Phase: [current] of [total] — [phase name]
|
|
112
141
|
Completed: [N] phases done
|
|
113
142
|
|
|
114
|
-
[If no active roadmap and Branch F is handling a non-phase state:]
|
|
115
|
-
State: [between milestones | codebase map only | quick lane only]
|
|
116
|
-
Completed: no active roadmap
|
|
143
|
+
[If no active roadmap and Branch F is handling a non-phase state:]
|
|
144
|
+
State: [active brownfield change | between milestones | codebase map only | quick lane only]
|
|
145
|
+
Completed: no active roadmap
|
|
146
|
+
|
|
147
|
+
[If an active brownfield change exists:]
|
|
148
|
+
Active change: [title]
|
|
149
|
+
Status: [current posture]
|
|
150
|
+
Integration surface: [branch / integration surface from CHANGE.md]
|
|
151
|
+
Next action: [next action from CHANGE.md]
|
|
152
|
+
Judgment context: `HANDOFF.md` remains the decision-critical context surface, not a co-equal status authority
|
|
153
|
+
Growth boundary: stay in the bounded lane unless the work now needs multiple active streams, milestone-owned lifecycle state, or broader requirement tracking
|
|
154
|
+
|
|
155
|
+
[If the active brownfield artifact conflicts with git/worktree truth:]
|
|
156
|
+
Brownfield continuity warning: the active change artifact and live integration surface disagree
|
|
157
|
+
Review `CHANGE.md`, `HANDOFF.md`, and the current worktree before resuming
|
|
117
158
|
|
|
118
159
|
Recent Work:
|
|
119
160
|
- Phase [X]: [one-liner from SUMMARY.md]
|
|
120
161
|
- Phase [Y]: [one-liner from SUMMARY.md]
|
|
121
162
|
|
|
122
|
-
[If .continue-here.md exists:]
|
|
123
|
-
Checkpoint: paused work found — `phase`/`quick` checkpoints
|
|
163
|
+
[If .continue-here.md exists:]
|
|
164
|
+
Checkpoint: paused work found — `phase`/`quick` checkpoints route through /gsdd-resume only when the strict-match rule still proves they are the active execution surface; `generic` checkpoints stay visible as informational context only
|
|
124
165
|
|
|
125
166
|
[If PLAN without SUMMARY found:]
|
|
126
167
|
Incomplete execution: Phase [N] has PLAN but no SUMMARY
|
|
@@ -167,16 +208,17 @@ No ASCII art, no progress bars. Keep it scannable.
|
|
|
167
208
|
<route_action>
|
|
168
209
|
Evaluate in priority order. Present the single best next step as a suggestion with a formatted output block. Do not wait for user selection, do not present numbered menus, do not clean up files. This is purely informational.
|
|
169
210
|
|
|
170
|
-
**Branch A: Resume checkpoint**
|
|
171
|
-
Condition: `.continue-here.md` exists
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
Suggested next action:
|
|
175
|
-
Run /gsdd-resume to restore paused session context
|
|
176
|
-
Also available: /gsdd-execute (ignore checkpoint, continue current phase), /gsdd-progress (refresh)
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
If `.continue-here.md` exists and its `workflow` is `generic`, do **not** route back through Branch A from this read-only reporter. Show the checkpoint in the status block, surface its `next_action`, and keep evaluating Branch B-F so the primary recommendation can advance toward the real next phase, verification, or milestone-close action.
|
|
211
|
+
**Branch A: Resume checkpoint**
|
|
212
|
+
Condition: `.continue-here.md` exists, its `workflow` is `phase` or `quick`, and either no active brownfield change exists or the strict-match rule still proves that checkpoint is the active execution surface.
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
Suggested next action:
|
|
216
|
+
Run /gsdd-resume to restore paused session context
|
|
217
|
+
Also available: /gsdd-execute (ignore checkpoint, continue current phase), /gsdd-progress (refresh)
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
If `.continue-here.md` exists and its `workflow` is `generic`, do **not** route back through Branch A from this read-only reporter. Show the checkpoint in the status block, surface its `next_action`, and keep evaluating Branch B-F so the primary recommendation can advance toward the real next phase, verification, or milestone-close action.
|
|
221
|
+
If an active brownfield change exists and a `phase` or `quick` checkpoint fails the strict-match rule, treat that checkpoint the same way: keep it visible in the status block, but keep evaluating Branch B-F so the active brownfield change remains the primary recommendation.
|
|
180
222
|
|
|
181
223
|
**Branch B: Execute (PLAN without SUMMARY in current phase)**
|
|
182
224
|
Condition: Current phase has a PLAN file but no matching SUMMARY.
|
|
@@ -215,36 +257,41 @@ Suggested next action:
|
|
|
215
257
|
```
|
|
216
258
|
|
|
217
259
|
**Branch F: Non-phase state (no active roadmap, or retained roadmap already archived)**
|
|
218
|
-
Condition:
|
|
219
|
-
- `.planning/
|
|
220
|
-
- `.planning/
|
|
221
|
-
- `.planning/
|
|
260
|
+
Condition:
|
|
261
|
+
- `.planning/brownfield-change/CHANGE.md` exists, **or**
|
|
262
|
+
- `.planning/SPEC.md` exists but `.planning/ROADMAP.md` does not, **or**
|
|
263
|
+
- `.planning/codebase/` or `.planning/quick/` exists while both `.planning/SPEC.md` and `.planning/ROADMAP.md` are absent, **or**
|
|
264
|
+
- `.planning/ROADMAP.md` still exists, but the current roadmap milestone/version already has both a shipped entry in `.planning/MILESTONES.md` and the matching archived milestone audit artifact — this is the archived-with-`ROADMAP.md` state, not a second trip through audit
|
|
222
265
|
|
|
223
266
|
Check `.planning/MILESTONES.md`:
|
|
224
267
|
- If MILESTONES.md exists and has at least one milestone entry → this is a subsequent milestone
|
|
225
268
|
- If MILESTONES.md does not exist or is empty → this is the first milestone setup
|
|
226
269
|
|
|
227
|
-
```
|
|
228
|
-
Suggested next action (
|
|
229
|
-
Run /gsdd-
|
|
230
|
-
Also available: /gsdd-progress (refresh after milestone
|
|
270
|
+
```
|
|
271
|
+
Suggested next action (active brownfield change):
|
|
272
|
+
Run /gsdd-resume to restore the active brownfield change context from `.planning/brownfield-change/CHANGE.md`
|
|
273
|
+
Also available: inspect `.planning/brownfield-change/HANDOFF.md`, /gsdd-progress (refresh after the artifact or worktree changes), /gsdd-new-project (only if you intentionally want to widen this bounded change into the first milestone), /gsdd-new-milestone (only if the repo already has shipped milestone history and you intentionally want to widen this change into the next milestone cycle)
|
|
274
|
+
|
|
275
|
+
Suggested next action (subsequent milestone):
|
|
276
|
+
Run /gsdd-new-milestone to start the next milestone cycle (gather goals, define requirements, create ROADMAP.md)
|
|
277
|
+
Also available: /gsdd-progress (refresh after milestone setup)
|
|
231
278
|
|
|
232
279
|
Suggested next action (incomplete milestone state — SPEC.md exists but no milestone archived yet):
|
|
233
280
|
Inspect .planning/ manually — a milestone is likely still in progress.
|
|
234
281
|
If a ROADMAP.md was deleted prematurely, re-run /gsdd-new-milestone to restore it.
|
|
235
282
|
Do NOT run /gsdd-new-project — SPEC.md already exists and re-running would overwrite it.
|
|
236
283
|
|
|
237
|
-
Suggested next action (codebase-only brownfield state):
|
|
238
|
-
Run /gsdd-quick if the bounded change is already concrete.
|
|
239
|
-
Also available: /gsdd-new-project (
|
|
284
|
+
Suggested next action (codebase-only brownfield state):
|
|
285
|
+
Run /gsdd-quick if the bounded change is already concrete.
|
|
286
|
+
Also available: /gsdd-new-project (if you intentionally want to widen into full lifecycle work), /gsdd-map-codebase (refresh or deepen the baseline)
|
|
240
287
|
|
|
241
|
-
Suggested next action (quick-lane brownfield state with incomplete quick work):
|
|
242
|
-
Run /gsdd-quick to continue or finish the current bounded change.
|
|
243
|
-
Also available: /gsdd-new-project (
|
|
288
|
+
Suggested next action (quick-lane brownfield state with incomplete quick work):
|
|
289
|
+
Run /gsdd-quick to continue or finish the current bounded change.
|
|
290
|
+
Also available: /gsdd-new-project (only if you intentionally want to widen this bounded change into full lifecycle setup), /gsdd-progress (refresh after the quick task is updated)
|
|
244
291
|
|
|
245
|
-
Suggested next action (quick-lane brownfield state with no incomplete quick work):
|
|
246
|
-
Run /gsdd-quick for the next bounded change.
|
|
247
|
-
Also available: /gsdd-new-project (if you
|
|
292
|
+
Suggested next action (quick-lane brownfield state with no incomplete quick work):
|
|
293
|
+
Run /gsdd-quick for the next bounded change.
|
|
294
|
+
Also available: /gsdd-new-project (if you intentionally want to widen into SPEC.md + ROADMAP.md), /gsdd-map-codebase (if the repo baseline feels stale)
|
|
248
295
|
```
|
|
249
296
|
|
|
250
297
|
If none of the above conditions match, report that the project is in a clean state with no obvious next action.
|
|
@@ -253,9 +300,11 @@ If none of the above conditions match, report that the project is in a clean sta
|
|
|
253
300
|
<edge_cases>
|
|
254
301
|
Handle compound states:
|
|
255
302
|
|
|
256
|
-
- **Checkpoint + unexecuted plan:** Both `.continue-here.md` exists and a PLAN lacks a SUMMARY. Prioritize checkpoint (Branch A) but mention the unexecuted plan in the status block.
|
|
257
|
-
- **Generic checkpoint + current phase work:** A `workflow: generic` checkpoint may coexist with an incomplete plan, unverified phase, or completed milestone. Keep the checkpoint visible in the status block, but let Branch B-F supply the primary recommendation instead of bouncing back to `/gsdd-resume`.
|
|
258
|
-
- **
|
|
303
|
+
- **Checkpoint + unexecuted plan:** Both `.continue-here.md` exists and a PLAN lacks a SUMMARY. Prioritize checkpoint (Branch A) but mention the unexecuted plan in the status block.
|
|
304
|
+
- **Generic checkpoint + current phase work:** A `workflow: generic` checkpoint may coexist with an incomplete plan, unverified phase, or completed milestone. Keep the checkpoint visible in the status block, but let Branch B-F supply the primary recommendation instead of bouncing back to `/gsdd-resume`.
|
|
305
|
+
- **Active brownfield change + generic checkpoint:** Keep the generic checkpoint visible as informational context, but let the active brownfield change remain the continuity anchor and use Branch F for the primary recommendation.
|
|
306
|
+
- **Active brownfield change + non-matching `phase`/`quick` checkpoint:** Show the checkpoint as surviving context, but let the active brownfield change stay primary unless branch alignment, scope alignment, and still-active execution state all match.
|
|
307
|
+
- **All phases complete + checkpoint:** All phases `[x]` but a checkpoint exists. If the checkpoint is `phase` or `quick`, mention both and suggest `/gsdd-resume` before continuing. If the checkpoint is `generic`, keep it visible as informational context and still route the primary recommendation to milestone audit.
|
|
259
308
|
- **Phase done but next unplanned:** Current phase has both PLAN and SUMMARY, but the next phase has no PLAN. Show the current phase as complete and suggest planning the next phase (Branch C targeting the next phase).
|
|
260
309
|
- **No matching condition:** If the project state does not match any branch, report it clearly and suggest the user inspect `.planning/` manually.
|
|
261
310
|
</edge_cases>
|
|
@@ -33,14 +33,15 @@ Store the response as `$DESCRIPTION`. If empty, re-prompt.
|
|
|
33
33
|
|
|
34
34
|
## Step 2: Initialize
|
|
35
35
|
|
|
36
|
-
1. Read `.planning/config.json` for workflow toggles and git protocol.
|
|
37
|
-
2. Scan `.planning/quick/` for existing task directories. Calculate `$NEXT_NUM` as the next 3-digit number (001, 002, ...).
|
|
38
|
-
3. Generate `$SLUG` from `$DESCRIPTION` (lowercase, hyphens, max 40 chars).
|
|
39
|
-
4. Create `.planning/quick/$NEXT_NUM-$SLUG/`.
|
|
40
|
-
5. If `.planning/
|
|
41
|
-
6. If `.planning/codebase/`
|
|
42
|
-
7.
|
|
43
|
-
8.
|
|
36
|
+
1. Read `.planning/config.json` for workflow toggles and git protocol.
|
|
37
|
+
2. Scan `.planning/quick/` for existing task directories. Calculate `$NEXT_NUM` as the next 3-digit number (001, 002, ...).
|
|
38
|
+
3. Generate `$SLUG` from `$DESCRIPTION` (lowercase, hyphens, max 40 chars).
|
|
39
|
+
4. Create `.planning/quick/$NEXT_NUM-$SLUG/`.
|
|
40
|
+
5. If `.planning/brownfield-change/CHANGE.md` exists, read it first as the current bounded brownfield continuity anchor. Capture the active goal, current posture, next action, and declared write scope as `$BROWNFIELD_CONTEXT`. If `.planning/brownfield-change/HANDOFF.md` exists, read it as supporting judgment context only. Do not let `/gsdd-new-project` become the default fallback when this active change already defines a concrete bounded lane.
|
|
41
|
+
6. If `.planning/codebase/` exists, read whichever of `.planning/codebase/ARCHITECTURE.md`, `.planning/codebase/STACK.md`, `.planning/codebase/CONVENTIONS.md`, and `.planning/codebase/CONCERNS.md` are present. Summarize key findings from available docs in <=500 words as `$CODEBASE_CONTEXT`, emphasizing: safest surfaces to touch, risky zones to avoid, must-know conventions/traps, and what must be re-verified after change. Note any missing docs in the summary.
|
|
42
|
+
7. If `.planning/codebase/` does not exist, build a just-enough inline brownfield baseline instead of stopping. Read the repo root guidance that is cheap and stable (`README.md`, root manifest such as `package.json` / `pyproject.toml` / `Cargo.toml` when present, top-level app entrypoints, and any obviously relevant config or module files surfaced by `$DESCRIPTION`). Summarize the findings in <=500 words as `$CODEBASE_CONTEXT`, explicitly labeling it as a provisional baseline and calling out unknowns. Emphasize: likely implementation surface, likely dependency boundaries, conventions already visible, risky areas to avoid touching blindly, and what must be re-verified after the change. If the repo is still too unclear after this pass, keep that uncertainty explicit so Step 3.6 can recommend `/gsdd-map-codebase`.
|
|
43
|
+
8. **Session-boundary fallback:** If `.planning/.continue-here.bak` exists, read its `<judgment>` section. Use `<active_constraints>` and `<anti_regression>` rules as task-scoping context (do not violate active constraints; do not regress on listed invariants). After reading, run `node .planning/bin/gsdd.mjs file-op delete .planning/.continue-here.bak --missing ok` (auto-clean).
|
|
44
|
+
9. Inspect the live branch/worktree surface separately from checkpoint or planning artifacts. If the current branch appears stale/spent, PR-less with overlapping write scope, or otherwise like the wrong execution surface, warn before proceeding. This is advisory for quick tasks unless the mismatch makes the task description materially misleading.
|
|
44
45
|
|
|
45
46
|
If `.planning/quick/` does not exist, create it along with an empty `LOG.md`:
|
|
46
47
|
|
|
@@ -180,7 +181,7 @@ Evaluate the plan against quick-scope boundaries. Read the plan file and check:
|
|
|
180
181
|
| Architecture keywords in `$DESCRIPTION` | contains: `refactor`, `migration`, `security`, `auth`, `API design`, `schema`, `database` | "This looks like architectural work — consider `/gsdd-plan` for approach exploration." |
|
|
181
182
|
| New public APIs | Plan tasks create new route files, API endpoints, or exported interfaces | "New public surface area detected — consider `/gsdd-plan` for approach exploration." |
|
|
182
183
|
| Orientation gap | No `.planning/codebase/` exists AND the inline brownfield baseline still cannot name a clear implementation surface, dependency boundary, or safe-to-touch module | "This repo still needs deeper orientation — consider `/gsdd-map-codebase` before changing code." |
|
|
183
|
-
| Undefined bounded change | `$DESCRIPTION` still does not identify a concrete bug, feature, target surface, or observable outcome after clarification | "This does not yet describe a bounded change — use `/gsdd-new-project` to define the work first." |
|
|
184
|
+
| Undefined bounded change | `$DESCRIPTION` still does not identify a concrete bug, feature, target surface, or observable outcome after clarification | "This does not yet describe a bounded change — use `/gsdd-new-project` to define the work first. If `.planning/brownfield-change/CHANGE.md` already defines a concrete bounded lane, treat `/gsdd-new-project` as an intentional widen path rather than the default fallback." |
|
|
184
185
|
|
|
185
186
|
If any signals fire, concatenate the matching advisory text in the listed order as `$SCOPE_WARNING`. If the undefined bounded change signal fires, keep that advisory first so the routing recommendation stays explicit.
|
|
186
187
|
If no signals fire, `$SCOPE_WARNING` is empty.
|
|
@@ -226,7 +227,7 @@ Present options (default-yes — pressing Enter proceeds):
|
|
|
226
227
|
Handle response:
|
|
227
228
|
- **Enter (or "yes"):** proceed to Step 4.
|
|
228
229
|
- **"edit description":** clean up the task directory, then return to Step 1 with `$DESCRIPTION` pre-filled as the starting point.
|
|
229
|
-
- **"switch to /gsdd-new-project":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-new-project` to define the
|
|
230
|
+
- **"switch to /gsdd-new-project":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-new-project` to define or intentionally widen the work into full lifecycle planning. Task description: {$DESCRIPTION}"
|
|
230
231
|
- **"switch to /gsdd-map-codebase":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-map-codebase` for a deeper brownfield baseline before quick work. Task description: {$DESCRIPTION}"
|
|
231
232
|
- **"switch to /gsdd-plan":** clean up the task directory, then stop quick workflow and report: "Use `/gsdd-plan` for full ceremony with approach exploration. Task description: {$DESCRIPTION}"
|
|
232
233
|
- **"abort":** clean up the task directory, report cancellation, stop.
|
|
@@ -19,7 +19,7 @@ When a checkpoint's `runtime` differs from the inferred current runtime, surface
|
|
|
19
19
|
<lifecycle_preflight>
|
|
20
20
|
Before loading checkpoint state or cleaning up any checkpoint file, run:
|
|
21
21
|
|
|
22
|
-
- `gsdd lifecycle-preflight resume`
|
|
22
|
+
- `node .planning/bin/gsdd.mjs lifecycle-preflight resume`
|
|
23
23
|
|
|
24
24
|
If the preflight result is `blocked`, STOP and report the blocker instead of inferring resume eligibility from workflow-local prose.
|
|
25
25
|
|
|
@@ -34,9 +34,10 @@ Treat the preflight as an authorization seam over shared repo truth only:
|
|
|
34
34
|
<detect_state>
|
|
35
35
|
Check for project artifacts in order:
|
|
36
36
|
|
|
37
|
-
1. **No `.planning/` directory** — route user to run `gsdd init`. Stop.
|
|
38
|
-
2. **
|
|
39
|
-
3. **
|
|
37
|
+
1. **No `.planning/` directory** — route user to run `gsdd init`. Stop.
|
|
38
|
+
2. **If `.planning/brownfield-change/CHANGE.md` exists** — this repo has an active medium-scope brownfield change. Proceed to load brownfield continuity state even if there is no active roadmap.
|
|
39
|
+
3. **No `.planning/SPEC.md` or no `.planning/ROADMAP.md`** — `.planning/` exists but the project is not fully initialized (partial init). Route user to run the `/gsdd-new-project` workflow. Stop.
|
|
40
|
+
4. **Both exist** — proceed to load state.
|
|
40
41
|
</detect_state>
|
|
41
42
|
|
|
42
43
|
<load_artifacts>
|
|
@@ -54,10 +55,28 @@ Determine:
|
|
|
54
55
|
- Next phase (first `[ ]` after current)
|
|
55
56
|
- Completed phase count
|
|
56
57
|
|
|
57
|
-
**SPEC.md:**
|
|
58
|
-
Read `.planning/SPEC.md`. Extract:
|
|
59
|
-
- Project name or description (first heading or "What This Is" section)
|
|
60
|
-
- Current state summary if present
|
|
58
|
+
**SPEC.md:**
|
|
59
|
+
Read `.planning/SPEC.md`. Extract:
|
|
60
|
+
- Project name or description (first heading or "What This Is" section)
|
|
61
|
+
- Current state summary if present
|
|
62
|
+
|
|
63
|
+
**Active brownfield change:**
|
|
64
|
+
If `.planning/brownfield-change/CHANGE.md` exists, read it first as the canonical operational continuity anchor and extract:
|
|
65
|
+
- change title from the first heading
|
|
66
|
+
- current posture from `## Current Status`
|
|
67
|
+
- current branch / integration surface from `## Current Status`
|
|
68
|
+
- current owner / runtime from `## Current Status`
|
|
69
|
+
- next action from `## Next Action`
|
|
70
|
+
- declared write scope from `## PR Slice Ownership` when present
|
|
71
|
+
|
|
72
|
+
If `.planning/brownfield-change/HANDOFF.md` exists, read it as judgment-only context:
|
|
73
|
+
- active constraints
|
|
74
|
+
- unresolved uncertainty
|
|
75
|
+
- decision posture
|
|
76
|
+
- anti-regression
|
|
77
|
+
- next-action context
|
|
78
|
+
|
|
79
|
+
Do not flatten `CHANGE.md` and `HANDOFF.md` into co-equal operational sources. `CHANGE.md` stays the live status/next-action anchor; `HANDOFF.md` explains why that posture exists.
|
|
61
80
|
|
|
62
81
|
**Checkpoint file:**
|
|
63
82
|
Check if `.planning/.continue-here.md` exists. If yes, read it and extract:
|
|
@@ -87,25 +106,38 @@ Collect the live integration-surface facts separately from checkpoint narrative
|
|
|
87
106
|
</load_artifacts>
|
|
88
107
|
|
|
89
108
|
<provenance_reconciliation>
|
|
90
|
-
Before routing, reconstruct and compare these truth buckets explicitly:
|
|
91
|
-
|
|
92
|
-
1. **Checkpoint narrative truth** — what `.planning/.continue-here.md` claims was happening
|
|
93
|
-
2. **Planning/artifact truth** — what ROADMAP, SPEC, phase files,
|
|
94
|
-
3. **Git/worktree truth** — what the live branch and working tree say now
|
|
109
|
+
Before routing, reconstruct and compare these truth buckets explicitly:
|
|
110
|
+
|
|
111
|
+
1. **Checkpoint narrative truth** — what `.planning/.continue-here.md` claims was happening
|
|
112
|
+
2. **Planning/artifact truth** — what ROADMAP, SPEC, phase files, quick-task logs, and the active brownfield change artifacts say
|
|
113
|
+
3. **Git/worktree truth** — what the live branch and working tree say now
|
|
95
114
|
|
|
96
115
|
Treat them as separate inputs. Do not flatten them into one continuity story.
|
|
97
116
|
|
|
98
|
-
Material mismatch signals include:
|
|
99
|
-
- checkpoint narrative describes only a narrow slice of a broader dirty tree
|
|
100
|
-
- current branch is stale/spent relative to the next intended integration surface
|
|
101
|
-
- dirty files suggest overlapping write sets or mixed phase scope
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
|
|
117
|
+
Material mismatch signals include:
|
|
118
|
+
- checkpoint narrative describes only a narrow slice of a broader dirty tree
|
|
119
|
+
- current branch is stale/spent relative to the next intended integration surface
|
|
120
|
+
- dirty files suggest overlapping write sets or mixed phase scope
|
|
121
|
+
- `CHANGE.md` names a different branch / integration surface than the current git branch
|
|
122
|
+
- dirty files fall outside the active brownfield write scope declared in `CHANGE.md`
|
|
123
|
+
|
|
124
|
+
If git/worktree truth materially disagrees with checkpoint narrative truth:
|
|
125
|
+
- record a mismatch flag
|
|
126
|
+
- keep ordinary git risk warning-level by default
|
|
127
|
+
- require explicit user acknowledgement before routing onward
|
|
128
|
+
- do not allow a quick "continue" shortcut to skip that acknowledgement
|
|
129
|
+
|
|
130
|
+
If git/worktree truth materially disagrees with the active brownfield artifact:
|
|
131
|
+
- keep `CHANGE.md` as the operational anchor
|
|
132
|
+
- surface the mismatch explicitly
|
|
133
|
+
- require acknowledgement before continuing the brownfield change from this workflow
|
|
134
|
+
- keep ordinary git warnings separate from this stronger continuity gate
|
|
135
|
+
- When a checkpoint also exists, let that checkpoint outrank the brownfield anchor only if a strict-match rule proves it is still the active execution surface:
|
|
136
|
+
- branch alignment: checkpoint branch, `CHANGE.md` integration surface, and current git branch all match
|
|
137
|
+
- scope alignment: the live dirty tree stays inside the declared brownfield write scope
|
|
138
|
+
- still-active execution state: the checkpoint still points at unfinished `phase` or `quick` work
|
|
139
|
+
- If any one of those checks fails, keep the checkpoint visible but do not let it become the primary resume target.
|
|
140
|
+
</provenance_reconciliation>
|
|
109
141
|
|
|
110
142
|
<validate_checkpoint>
|
|
111
143
|
Only run this step when `.planning/.continue-here.md` was found in `<load_artifacts>`. If no checkpoint exists, skip this step entirely.
|
|
@@ -139,21 +171,45 @@ The output of this step is either:
|
|
|
139
171
|
Present a compact status to the user:
|
|
140
172
|
|
|
141
173
|
```
|
|
142
|
-
Project: [name from SPEC.md]
|
|
143
|
-
Phase: [current] of [total] — [phase name]
|
|
144
|
-
Completed: [N] phases done
|
|
145
|
-
|
|
146
|
-
[If
|
|
147
|
-
|
|
148
|
-
|
|
174
|
+
Project: [name from SPEC.md]
|
|
175
|
+
Phase: [current] of [total] — [phase name]
|
|
176
|
+
Completed: [N] phases done
|
|
177
|
+
|
|
178
|
+
[If an active brownfield change exists:]
|
|
179
|
+
Active brownfield change: [title]
|
|
180
|
+
Status: [current posture]
|
|
181
|
+
Integration surface: [branch / integration surface from CHANGE.md]
|
|
182
|
+
Next action: [next action from CHANGE.md]
|
|
183
|
+
Judgment source: `HANDOFF.md` explains constraints/posture but does not override the operational state in `CHANGE.md`
|
|
184
|
+
Growth boundary: stay in the bounded lane unless the work now needs multiple active streams, milestone-owned lifecycle state, or broader requirement tracking
|
|
185
|
+
|
|
186
|
+
[If `HANDOFF.md` exists for the active brownfield change:]
|
|
187
|
+
Brownfield judgment:
|
|
188
|
+
Constraints:
|
|
189
|
+
[Full content of Active Constraints]
|
|
190
|
+
Uncertainty:
|
|
191
|
+
[Full content of Unresolved Uncertainty]
|
|
192
|
+
Posture:
|
|
193
|
+
[Full content of Decision Posture]
|
|
194
|
+
Anti-regression:
|
|
195
|
+
[Full content of Anti-Regression]
|
|
196
|
+
|
|
197
|
+
[If .continue-here.md exists:]
|
|
198
|
+
[If stale checkpoint flag set:]
|
|
199
|
+
⚠ Stale checkpoint detected
|
|
149
200
|
Reason: [specific staleness reason]
|
|
150
201
|
Review the checkpoint contents below and decide whether to resume from it or continue without it.
|
|
151
202
|
|
|
152
|
-
Checkpoint found: [workflow type] — [phase name or task description]
|
|
153
|
-
Last paused: [timestamp from frontmatter]
|
|
154
|
-
Paused by: [runtime from checkpoint, or unknown if field absent]
|
|
155
|
-
Resuming in: [inferred current runtime]
|
|
156
|
-
Next action: [next_action section content]
|
|
203
|
+
Checkpoint found: [workflow type] — [phase name or task description]
|
|
204
|
+
Last paused: [timestamp from frontmatter]
|
|
205
|
+
Paused by: [runtime from checkpoint, or unknown if field absent]
|
|
206
|
+
Resuming in: [inferred current runtime]
|
|
207
|
+
Next action: [next_action section content]
|
|
208
|
+
|
|
209
|
+
[If an active brownfield change also exists and the checkpoint fails the strict-match rule:]
|
|
210
|
+
Checkpoint note:
|
|
211
|
+
This checkpoint no longer cleanly matches the active brownfield execution surface.
|
|
212
|
+
Keep it reviewable, but do not treat it as the primary resume target unless the user explicitly chooses it.
|
|
157
213
|
|
|
158
214
|
[If <judgment> was present in checkpoint:]
|
|
159
215
|
Judgment context:
|
|
@@ -176,10 +232,15 @@ Git/worktree truth:
|
|
|
176
232
|
PR: [open|closed|merged|none|unknown]
|
|
177
233
|
Integration surface: [clean | warning | stale/spent | mixed-scope]
|
|
178
234
|
|
|
179
|
-
[If material checkpoint/worktree mismatch flag set:]
|
|
180
|
-
⚠ Checkpoint/worktree mismatch
|
|
181
|
-
The checkpoint narrative no longer matches the live branch/worktree scope.
|
|
182
|
-
Review both truth surfaces before choosing the next action.
|
|
235
|
+
[If material checkpoint/worktree mismatch flag set:]
|
|
236
|
+
⚠ Checkpoint/worktree mismatch
|
|
237
|
+
The checkpoint narrative no longer matches the live branch/worktree scope.
|
|
238
|
+
Review both truth surfaces before choosing the next action.
|
|
239
|
+
|
|
240
|
+
[If material brownfield artifact/worktree mismatch flag set:]
|
|
241
|
+
⚠ Brownfield continuity mismatch
|
|
242
|
+
`CHANGE.md` no longer cleanly matches the live branch/worktree truth.
|
|
243
|
+
Review `CHANGE.md`, `HANDOFF.md`, and the dirty tree before choosing the next action.
|
|
183
244
|
|
|
184
245
|
[If incomplete phase execution found:]
|
|
185
246
|
Incomplete execution: Phase [N] has a PLAN but no SUMMARY
|
|
@@ -196,18 +257,29 @@ Only show the staleness banner when `<validate_checkpoint>` produced a staleness
|
|
|
196
257
|
<determine_action>
|
|
197
258
|
Evaluate in priority order and present the primary recommendation:
|
|
198
259
|
|
|
199
|
-
**Checkpoint exists (`.continue-here.md`):**
|
|
200
|
-
Route based on the `workflow` frontmatter:
|
|
201
|
-
- `phase` — route to `/gsdd-execute` (or `/gsdd-plan`/`/gsdd-verify` based on checkpoint context)
|
|
202
|
-
- `quick` — route to `/gsdd-quick` to complete the task
|
|
203
|
-
- `generic` — present the checkpoint `next_action` and let the user decide. This workflow still owns checkpoint cleanup only if the user explicitly resumes from that checkpoint, but downstream read-only `progress` routing must treat the surviving generic checkpoint as informational context rather than an automatic blocker.
|
|
204
|
-
|
|
205
|
-
If `<validate_checkpoint>` marked the checkpoint as stale, keep the same routing logic. The user may still choose to resume from the checkpoint after reviewing the warning. If the user chooses a different path, leave the checkpoint in place and continue without it.
|
|
206
|
-
|
|
207
|
-
If `<provenance_reconciliation>` marked a material checkpoint/worktree mismatch, keep the same routing logic but require explicit acknowledgement before continuing. The workflow should not silently route onward from a materially misleading checkpoint narrative.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
260
|
+
**Checkpoint exists (`.continue-here.md`):**
|
|
261
|
+
Route based on the `workflow` frontmatter:
|
|
262
|
+
- `phase` — route to `/gsdd-execute` (or `/gsdd-plan`/`/gsdd-verify` based on checkpoint context)
|
|
263
|
+
- `quick` — route to `/gsdd-quick` to complete the task
|
|
264
|
+
- `generic` — present the checkpoint `next_action` and let the user decide. This workflow still owns checkpoint cleanup only if the user explicitly resumes from that checkpoint, but downstream read-only `progress` routing must treat the surviving generic checkpoint as informational context rather than an automatic blocker.
|
|
265
|
+
|
|
266
|
+
If `<validate_checkpoint>` marked the checkpoint as stale, keep the same routing logic. The user may still choose to resume from the checkpoint after reviewing the warning. If the user chooses a different path, leave the checkpoint in place and continue without it.
|
|
267
|
+
|
|
268
|
+
If `<provenance_reconciliation>` marked a material checkpoint/worktree mismatch, keep the same routing logic but require explicit acknowledgement before continuing. The workflow should not silently route onward from a materially misleading checkpoint narrative.
|
|
269
|
+
If an active brownfield change also exists, apply the same strict-match rule before making a `phase` or `quick` checkpoint primary. A checkpoint only stays primary when branch alignment, scope alignment, and still-active execution state all hold at once. Otherwise, keep the checkpoint visible and user-selectable, but fall through to the active brownfield change as the default resume target.
|
|
270
|
+
|
|
271
|
+
**Active brownfield change (`.planning/brownfield-change/CHANGE.md`):**
|
|
272
|
+
If there is no checkpoint, or if the surviving checkpoint does not satisfy the strict-match rule against the active brownfield change:
|
|
273
|
+
- present the `CHANGE.md` next action as the primary resume target
|
|
274
|
+
- keep `HANDOFF.md` as supporting judgment context only
|
|
275
|
+
- if artifact/worktree mismatch is material, require explicit acknowledgement before continuing
|
|
276
|
+
- if the user does not want to continue immediately, let them review `CHANGE.md` or `HANDOFF.md` without deleting any checkpoint file
|
|
277
|
+
- do not force this state back through `/gsdd-new-project` or milestone routing just because there is no active roadmap
|
|
278
|
+
- keep `/gsdd-new-project` and `/gsdd-new-milestone` as explicit widen-only choices when the bounded change no longer fits one active stream or now needs milestone-owned lifecycle state
|
|
279
|
+
- use `/gsdd-new-project` for first-milestone setup and `/gsdd-new-milestone` when the repo already has shipped milestone history
|
|
280
|
+
|
|
281
|
+
**Incomplete plan execution (PLAN without SUMMARY):**
|
|
282
|
+
Route to `/gsdd-execute` for that phase.
|
|
211
283
|
|
|
212
284
|
**Phase needs planning (next `[ ]` phase, no PLAN file exists):**
|
|
213
285
|
Route to `/gsdd-plan` for that phase.
|
|
@@ -225,24 +297,26 @@ Present a numbered list of actions based on the state analysis:
|
|
|
225
297
|
```
|
|
226
298
|
What would you like to do?
|
|
227
299
|
|
|
228
|
-
1. [Primary action from above] (recommended)
|
|
229
|
-
2. [Secondary action if applicable]
|
|
230
|
-
3. Review ROADMAP.md
|
|
231
|
-
4. Something else
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
**
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
300
|
+
1. [Primary action from above] (recommended)
|
|
301
|
+
2. [Secondary action if applicable]
|
|
302
|
+
3. Review ROADMAP.md
|
|
303
|
+
4. Something else
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
When the primary action is an active brownfield change rather than a checkpoint or lifecycle workflow, replace option 3 with `Review CHANGE.md or HANDOFF.md` if there is no active roadmap to inspect.
|
|
307
|
+
|
|
308
|
+
**Quick-resume shortcut:** If there is no stale-checkpoint banner and no material checkpoint/worktree mismatch, the user may say "continue", "go", or "resume" without further input to execute the primary action directly.
|
|
309
|
+
|
|
310
|
+
**Mismatch acknowledgement:** If material checkpoint/worktree mismatch or material brownfield artifact/worktree mismatch was detected, require an explicit acknowledgement such as "continue despite mismatch" or a different selected path. Do not let a bare "continue" skip the warning.
|
|
311
|
+
|
|
312
|
+
Wait for user selection.
|
|
313
|
+
</present_options>
|
|
240
314
|
|
|
241
315
|
<cleanup_checkpoint>
|
|
242
316
|
Immediately after the user confirms their action selection (before routing to the target workflow):
|
|
243
317
|
- If the user chose to resume from `.continue-here.md`:
|
|
244
|
-
1. Run `gsdd file-op copy .planning/.continue-here.md .planning/.continue-here.bak`.
|
|
245
|
-
2. After the copy succeeds, run `gsdd file-op delete .planning/.continue-here.md`.
|
|
318
|
+
1. Run `node .planning/bin/gsdd.mjs file-op copy .planning/.continue-here.md .planning/.continue-here.bak`.
|
|
319
|
+
2. After the copy succeeds, run `node .planning/bin/gsdd.mjs file-op delete .planning/.continue-here.md`.
|
|
246
320
|
- If the user chose a different action (not based on the checkpoint), leave `.continue-here.md` in place for a future resume.
|
|
247
321
|
|
|
248
322
|
Copying before deleting ensures the checkpoint survives a session crash between deletion and dispatch. `.continue-here.bak` is cleaned up by the downstream workflow after absorbing the judgment, or by the next `pause.md` run.
|
|
@@ -13,7 +13,7 @@ Before starting, read these files:
|
|
|
13
13
|
4. `.planning/SPEC.md` - requirements and constraints for the phase
|
|
14
14
|
5. From the SUMMARY.md loaded in step 3, if a `<judgment>` section is present - read `<anti_regression>` rules as additional verification targets: confirm that invariants listed there were not broken by execution. Read `<active_constraints>` to calibrate verification scope.
|
|
15
15
|
6. The relevant codebase files - the code that was actually built
|
|
16
|
-
7. **Session-boundary fallback:** If the SUMMARY.md loaded in step 3 has no `<judgment>` section, check whether `.planning/.continue-here.bak` exists. If it does, read its `<judgment>` section. Treat `<anti_regression>` rules as additional verification targets and `<active_constraints>` to calibrate verification scope (same usage as step 5). After reading, run `gsdd file-op delete .planning/.continue-here.bak --missing ok` (auto-clean).
|
|
16
|
+
7. **Session-boundary fallback:** If the SUMMARY.md loaded in step 3 has no `<judgment>` section, check whether `.planning/.continue-here.bak` exists. If it does, read its `<judgment>` section. Treat `<anti_regression>` rules as additional verification targets and `<active_constraints>` to calibrate verification scope (same usage as step 5). After reading, run `node .planning/bin/gsdd.mjs file-op delete .planning/.continue-here.bak --missing ok` (auto-clean).
|
|
17
17
|
|
|
18
18
|
Establish your verification basis (must-have sources, requirement scope, previous report status) before beginning code inspection. Do not jump to loose file reading until this basis is explicit.
|
|
19
19
|
|
|
@@ -23,14 +23,14 @@ If a previous `.planning/phases/{phase_dir}/{phase_num}-VERIFICATION.md` exists,
|
|
|
23
23
|
<lifecycle_preflight>
|
|
24
24
|
Before code inspection or report writing, run:
|
|
25
25
|
|
|
26
|
-
- `gsdd lifecycle-preflight verify {phase_num} --expects-mutation phase-status`
|
|
26
|
+
- `node .planning/bin/gsdd.mjs lifecycle-preflight verify {phase_num} --expects-mutation phase-status`
|
|
27
27
|
|
|
28
28
|
If the preflight result is `blocked`, STOP and report the blocker instead of inferring lifecycle eligibility from prompt-local prose.
|
|
29
29
|
|
|
30
30
|
Treat the preflight as an authorization seam over shared repo truth only:
|
|
31
31
|
- it may authorize or reject verification
|
|
32
32
|
- it does not mutate `.planning/ROADMAP.md` by itself
|
|
33
|
-
- owned writes remain the verification artifact plus any explicit `gsdd phase-status` transition that occurs later on `passed`
|
|
33
|
+
- owned writes remain the verification artifact plus any explicit `node .planning/bin/gsdd.mjs phase-status` transition that occurs later on `passed`
|
|
34
34
|
</lifecycle_preflight>
|
|
35
35
|
|
|
36
36
|
<runtime_contract>
|
|
@@ -381,7 +381,7 @@ If you cannot write the file (permissions, path issue), STOP and report the bloc
|
|
|
381
381
|
|
|
382
382
|
Before any ROADMAP closure step, confirm the required phase `SUMMARY.md` still exists on disk. If `SUMMARY.md` is missing, STOP and report the blocker — do NOT treat verification as terminally successful and do NOT close ROADMAP state from conversation context alone.
|
|
383
383
|
|
|
384
|
-
After writing VERIFICATION.md, if `status: passed`, run `gsdd phase-status {phase_num} done` to close the phase entry in `.planning/ROADMAP.md`. Execute is the primary owner of ROADMAP status, but execute can be interrupted before its state_updates run. Verify is the terminal workflow and must close the ROADMAP entry when it confirms the phase is complete. If the helper cannot update ROADMAP.md (path issue, missing phase, invalid state), STOP and report the blocker — do NOT complete verification without closing the phase.
|
|
384
|
+
After writing VERIFICATION.md, if `status: passed`, run `node .planning/bin/gsdd.mjs phase-status {phase_num} done` to close the phase entry in `.planning/ROADMAP.md`. Execute is the primary owner of ROADMAP status, but execute can be interrupted before its state_updates run. Verify is the terminal workflow and must close the ROADMAP entry when it confirms the phase is complete. If the helper cannot update ROADMAP.md (path issue, missing phase, invalid state), STOP and report the blocker — do NOT complete verification without closing the phase.
|
|
385
385
|
</persistence>
|
|
386
386
|
|
|
387
387
|
<success_criteria>
|
|
@@ -400,7 +400,7 @@ Verification is done when all of these are true:
|
|
|
400
400
|
- [ ] Verification explicitly reviewed SUMMARY `<handoff>` and `<deltas>` content
|
|
401
401
|
- [ ] Status is one of `passed`, `gaps_found`, or `human_needed`
|
|
402
402
|
- [ ] The required phase `SUMMARY.md` still exists before any ROADMAP closure on passed status
|
|
403
|
-
- [ ] If status is `passed`, ROADMAP.md phase entry is `[x]` via `gsdd phase-status`
|
|
403
|
+
- [ ] If status is `passed`, ROADMAP.md phase entry is `[x]` via `node .planning/bin/gsdd.mjs phase-status`
|
|
404
404
|
- [ ] The developer was informed of the result and recommended next step
|
|
405
405
|
- [ ] Related failures grouped by concern, not returned as a flat symptom list
|
|
406
406
|
- [ ] Requirements coverage chain completed (collect, restate, map, report, check orphans)
|