gsdd-cli 0.18.5 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +609 -608
- package/agents/DISTILLATION.md +421 -421
- package/agents/README.md +62 -62
- package/agents/approach-explorer.md +361 -361
- package/agents/debugger.md +82 -82
- package/agents/executor.md +394 -394
- package/agents/integration-checker.md +318 -318
- package/agents/mapper.md +103 -103
- package/agents/planner.md +313 -313
- package/agents/researcher.md +84 -84
- package/agents/roadmapper.md +296 -296
- package/agents/synthesizer.md +236 -236
- package/agents/verifier.md +337 -337
- package/bin/adapters/agents.mjs +34 -34
- package/bin/adapters/claude.mjs +191 -191
- package/bin/adapters/codex.mjs +85 -85
- package/bin/adapters/index.mjs +20 -20
- package/bin/adapters/opencode.mjs +278 -278
- package/bin/gsdd.mjs +123 -116
- package/bin/lib/cli-utils.mjs +28 -28
- package/bin/lib/evidence-contract.mjs +112 -112
- package/bin/lib/file-ops.mjs +186 -144
- package/bin/lib/health-truth.mjs +181 -178
- package/bin/lib/health.mjs +246 -226
- package/bin/lib/init-flow.mjs +247 -231
- package/bin/lib/init-prompts.mjs +248 -247
- package/bin/lib/init-runtime.mjs +191 -190
- package/bin/lib/init.mjs +17 -17
- package/bin/lib/lifecycle-preflight.mjs +347 -325
- package/bin/lib/lifecycle-state.mjs +351 -267
- package/bin/lib/manifest.mjs +116 -114
- package/bin/lib/models.mjs +411 -411
- package/bin/lib/phase.mjs +360 -358
- package/bin/lib/plan-constants.mjs +30 -30
- package/bin/lib/provenance.mjs +109 -106
- package/bin/lib/rendering.mjs +115 -83
- package/bin/lib/runtime-freshness.mjs +214 -214
- package/bin/lib/templates.mjs +225 -224
- package/bin/lib/workspace-root.mjs +2 -1
- package/distilled/DESIGN.md +2333 -2323
- package/distilled/EVIDENCE-INDEX.md +394 -392
- package/distilled/README.md +196 -193
- package/distilled/SKILL.md +86 -85
- package/distilled/templates/agents.block.md +21 -21
- package/distilled/templates/agents.md +6 -6
- package/distilled/templates/approach.md +232 -232
- package/distilled/templates/auth-matrix.md +78 -78
- package/distilled/templates/brownfield-change/CHANGE.md +99 -0
- package/distilled/templates/brownfield-change/HANDOFF.md +38 -0
- package/distilled/templates/brownfield-change/VERIFICATION.md +56 -0
- package/distilled/templates/codebase/architecture.md +110 -110
- package/distilled/templates/codebase/concerns.md +95 -95
- package/distilled/templates/codebase/conventions.md +193 -193
- package/distilled/templates/codebase/stack.md +96 -96
- package/distilled/templates/delegates/approach-explorer.md +25 -25
- package/distilled/templates/delegates/mapper-arch.md +26 -26
- package/distilled/templates/delegates/mapper-concerns.md +27 -27
- package/distilled/templates/delegates/mapper-quality.md +28 -28
- package/distilled/templates/delegates/mapper-tech.md +25 -25
- package/distilled/templates/delegates/plan-checker.md +68 -68
- package/distilled/templates/delegates/researcher-architecture.md +30 -30
- package/distilled/templates/delegates/researcher-features.md +30 -30
- package/distilled/templates/delegates/researcher-pitfalls.md +30 -30
- package/distilled/templates/delegates/researcher-stack.md +30 -30
- package/distilled/templates/delegates/researcher-synthesizer.md +31 -31
- package/distilled/templates/research/architecture.md +57 -57
- package/distilled/templates/research/features.md +23 -23
- package/distilled/templates/research/pitfalls.md +46 -46
- package/distilled/templates/research/stack.md +45 -45
- package/distilled/templates/research/summary.md +67 -67
- package/distilled/templates/roadmap.md +74 -62
- package/distilled/templates/spec.md +110 -110
- package/distilled/workflows/audit-milestone.md +275 -271
- package/distilled/workflows/complete-milestone.md +336 -332
- package/distilled/workflows/execute.md +454 -449
- package/distilled/workflows/map-codebase.md +253 -253
- package/distilled/workflows/new-milestone.md +242 -238
- package/distilled/workflows/new-project.md +398 -398
- package/distilled/workflows/pause.md +160 -156
- package/distilled/workflows/plan-milestone-gaps.md +183 -183
- package/distilled/workflows/plan.md +451 -447
- package/distilled/workflows/progress.md +227 -223
- package/distilled/workflows/quick.md +351 -347
- package/distilled/workflows/resume.md +220 -212
- package/distilled/workflows/verify-work.md +260 -260
- package/distilled/workflows/verify.md +431 -429
- package/docs/BROWNFIELD-PROOF.md +95 -95
- package/docs/RUNTIME-SUPPORT.md +80 -69
- package/docs/USER-GUIDE.md +394 -386
- package/docs/VERIFICATION-DISCIPLINE.md +59 -59
- package/docs/claude/context-monitor.md +98 -98
- package/docs/proof/consumer-node-cli/README.md +37 -37
- package/docs/proof/consumer-node-cli/ROADMAP.md +14 -14
- package/docs/proof/consumer-node-cli/SPEC.md +17 -17
- package/docs/proof/consumer-node-cli/brief.md +9 -9
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-PLAN.md +34 -34
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-SUMMARY.md +10 -10
- package/docs/proof/consumer-node-cli/phases/01-foundation/01-VERIFICATION.md +30 -30
- package/package.json +62 -61
|
@@ -1,62 +1,70 @@
|
|
|
1
|
-
<role>
|
|
2
|
-
You are the SESSION CONTEXT RESTORER. Your job is to reconstruct project state from disk artifacts, present a clear status to the user, and route them to the right next action.
|
|
3
|
-
|
|
4
|
-
Core mindset: derive state from primary artifacts. Do not depend on secondary summary files. ROADMAP.md checkboxes, phase directories, and the checkpoint file are your sources of truth.
|
|
5
|
-
|
|
6
|
-
Scope boundary: unlike progress.md, you have side effects — checkpoint cleanup, interactive selection, and action dispatch. You restore context and get the user moving.
|
|
7
|
-
</role>
|
|
8
|
-
|
|
9
|
-
<prerequisites>
|
|
10
|
-
`.planning/` should exist. If it does not, route the user to `gsdd init`.
|
|
11
|
-
</prerequisites>
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
<role>
|
|
2
|
+
You are the SESSION CONTEXT RESTORER. Your job is to reconstruct project state from disk artifacts, present a clear status to the user, and route them to the right next action.
|
|
3
|
+
|
|
4
|
+
Core mindset: derive state from primary artifacts. Do not depend on secondary summary files. ROADMAP.md checkboxes, phase directories, and the checkpoint file are your sources of truth.
|
|
5
|
+
|
|
6
|
+
Scope boundary: unlike progress.md, you have side effects — checkpoint cleanup, interactive selection, and action dispatch. You restore context and get the user moving.
|
|
7
|
+
</role>
|
|
8
|
+
|
|
9
|
+
<prerequisites>
|
|
10
|
+
`.planning/` should exist. If it does not, route the user to `npx -y gsdd-cli init`.
|
|
11
|
+
</prerequisites>
|
|
12
|
+
|
|
13
|
+
<repo_root_helper_contract>
|
|
14
|
+
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.
|
|
15
|
+
</repo_root_helper_contract>
|
|
16
|
+
|
|
17
|
+
<runtime_contract>
|
|
18
|
+
Use the `Runtime` type from `.planning/SPEC.md`.
|
|
19
|
+
Infer runtime from the launching surface when obvious: `.claude/` -> `claude-code`, `.codex/` or Codex portable skill -> `codex-cli`, `.opencode/` -> `opencode`, otherwise `other`.
|
|
20
|
+
When a checkpoint's `runtime` differs from the inferred current runtime, surface it as an informational note in `<present_status>` — it is context, not a gate.
|
|
21
|
+
</runtime_contract>
|
|
22
|
+
|
|
23
|
+
<lifecycle_preflight>
|
|
24
|
+
Before loading checkpoint state or cleaning up any checkpoint file, run:
|
|
25
|
+
|
|
22
26
|
- `node .planning/bin/gsdd.mjs lifecycle-preflight resume`
|
|
23
|
-
|
|
24
|
-
If the preflight result is `blocked`, STOP and report the blocker instead of inferring resume eligibility from workflow-local prose.
|
|
25
|
-
|
|
26
|
-
Treat the preflight as an authorization seam over shared repo truth only:
|
|
27
|
-
- it may authorize or reject resume
|
|
28
|
-
- it does not mutate phase or milestone state
|
|
29
|
-
- the owned write for this workflow remains checkpoint cleanup when the user actually resumes from `.continue-here.md`
|
|
30
|
-
</lifecycle_preflight>
|
|
31
|
-
|
|
32
|
-
<process>
|
|
33
|
-
|
|
34
|
-
<detect_state>
|
|
35
|
-
Check for project artifacts in order:
|
|
36
|
-
|
|
37
|
-
1. **No `.planning/` directory** — route user to run `gsdd init`. Stop.
|
|
27
|
+
|
|
28
|
+
If the preflight result is `blocked`, STOP and report the blocker instead of inferring resume eligibility from workflow-local prose.
|
|
29
|
+
|
|
30
|
+
Treat the preflight as an authorization seam over shared repo truth only:
|
|
31
|
+
- it may authorize or reject resume
|
|
32
|
+
- it does not mutate phase or milestone state
|
|
33
|
+
- the owned write for this workflow remains checkpoint cleanup when the user actually resumes from `.continue-here.md`
|
|
34
|
+
</lifecycle_preflight>
|
|
35
|
+
|
|
36
|
+
<process>
|
|
37
|
+
|
|
38
|
+
<detect_state>
|
|
39
|
+
Check for project artifacts in order:
|
|
40
|
+
|
|
41
|
+
1. **No `.planning/` directory** — route user to run `npx -y gsdd-cli init`. Stop.
|
|
38
42
|
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
43
|
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
44
|
4. **Both exist** — proceed to load state.
|
|
41
|
-
</detect_state>
|
|
42
|
-
|
|
43
|
-
<load_artifacts>
|
|
44
|
-
Read the following files and extract state:
|
|
45
|
-
|
|
46
|
-
**ROADMAP.md:**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- `[
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
45
|
+
</detect_state>
|
|
46
|
+
|
|
47
|
+
<load_artifacts>
|
|
48
|
+
Read the following files and extract state:
|
|
49
|
+
|
|
50
|
+
**ROADMAP.md:**
|
|
51
|
+
If `.planning/ROADMAP.md` exists, read it. If it is absent because the active brownfield change is the only continuity anchor, keep phase fields empty and continue from `CHANGE.md`.
|
|
52
|
+
|
|
53
|
+
When present, parse phase statuses:
|
|
54
|
+
- `[ ]` = not started
|
|
55
|
+
- `[-]` = in progress
|
|
56
|
+
- `[x]` = done
|
|
57
|
+
|
|
58
|
+
Determine:
|
|
59
|
+
- Total phase count
|
|
60
|
+
- Current phase (first `[-]` phase, or first `[ ]` if none in progress)
|
|
61
|
+
- Next phase (first `[ ]` after current)
|
|
62
|
+
- Completed phase count
|
|
63
|
+
|
|
58
64
|
**SPEC.md:**
|
|
59
|
-
|
|
65
|
+
If `.planning/SPEC.md` exists, read it. If it is absent because the active brownfield change is the only continuity anchor, label project identity as `unknown from SPEC.md` and derive runtime/context from the launching surface plus `CHANGE.md` / `HANDOFF.md`.
|
|
66
|
+
|
|
67
|
+
When present, extract:
|
|
60
68
|
- Project name or description (first heading or "What This Is" section)
|
|
61
69
|
- Current state summary if present
|
|
62
70
|
|
|
@@ -77,43 +85,43 @@ If `.planning/brownfield-change/HANDOFF.md` exists, read it as judgment-only con
|
|
|
77
85
|
- next-action context
|
|
78
86
|
|
|
79
87
|
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.
|
|
80
|
-
|
|
81
|
-
**Checkpoint file:**
|
|
82
|
-
Check if `.planning/.continue-here.md` exists. If yes, read it and extract:
|
|
83
|
-
- `workflow` frontmatter (phase/quick/generic)
|
|
84
|
-
- `phase` frontmatter
|
|
85
|
-
- `runtime` frontmatter (the runtime that wrote the checkpoint; use `unknown` if field absent)
|
|
86
|
-
- All 6 sections: current_state, completed_work, remaining_work, decisions, blockers, next_action
|
|
87
|
-
- `<judgment>` if present, including `<active_constraints>`, `<unresolved_uncertainty>`, `<decision_posture>`, and `<anti_regression>`
|
|
88
|
-
|
|
89
|
-
**Phase directories:**
|
|
90
|
-
Scan `.planning/phases/` for:
|
|
91
|
-
- Directories with a PLAN file but no SUMMARY file (incomplete execution)
|
|
92
|
-
- Directories with a SUMMARY file but no VERIFICATION file (unverified phase, if `workflow.verifier` is enabled in `.planning/config.json`; if config.json cannot be read, assume verifier is disabled)
|
|
93
|
-
|
|
94
|
-
**Quick task log:**
|
|
95
|
-
If `.planning/quick/LOG.md` exists, read the last entry. Check if it has a non-terminal status (not `done`/`passed`).
|
|
96
|
-
|
|
97
|
-
**Git/worktree truth:**
|
|
98
|
-
Collect the live integration-surface facts separately from checkpoint narrative truth:
|
|
99
|
-
- current branch name
|
|
100
|
-
- branch divergence from `main` (and tracked remote when available)
|
|
101
|
-
- staged pending truth
|
|
102
|
-
- unstaged local edits
|
|
103
|
-
- untracked local files
|
|
104
|
-
- PR presence/state when available
|
|
105
|
-
- whether the current branch appears stale/spent or the dirty tree appears mixed-scope
|
|
106
|
-
</load_artifacts>
|
|
107
|
-
|
|
108
|
-
<provenance_reconciliation>
|
|
88
|
+
|
|
89
|
+
**Checkpoint file:**
|
|
90
|
+
Check if `.planning/.continue-here.md` exists. If yes, read it and extract:
|
|
91
|
+
- `workflow` frontmatter (phase/quick/generic)
|
|
92
|
+
- `phase` frontmatter
|
|
93
|
+
- `runtime` frontmatter (the runtime that wrote the checkpoint; use `unknown` if field absent)
|
|
94
|
+
- All 6 sections: current_state, completed_work, remaining_work, decisions, blockers, next_action
|
|
95
|
+
- `<judgment>` if present, including `<active_constraints>`, `<unresolved_uncertainty>`, `<decision_posture>`, and `<anti_regression>`
|
|
96
|
+
|
|
97
|
+
**Phase directories:**
|
|
98
|
+
Scan `.planning/phases/` for:
|
|
99
|
+
- Directories with a PLAN file but no SUMMARY file (incomplete execution)
|
|
100
|
+
- Directories with a SUMMARY file but no VERIFICATION file (unverified phase, if `workflow.verifier` is enabled in `.planning/config.json`; if config.json cannot be read, assume verifier is disabled)
|
|
101
|
+
|
|
102
|
+
**Quick task log:**
|
|
103
|
+
If `.planning/quick/LOG.md` exists, read the last entry. Check if it has a non-terminal status (not `done`/`passed`).
|
|
104
|
+
|
|
105
|
+
**Git/worktree truth:**
|
|
106
|
+
Collect the live integration-surface facts separately from checkpoint narrative truth:
|
|
107
|
+
- current branch name
|
|
108
|
+
- branch divergence from `main` (and tracked remote when available)
|
|
109
|
+
- staged pending truth
|
|
110
|
+
- unstaged local edits
|
|
111
|
+
- untracked local files
|
|
112
|
+
- PR presence/state when available
|
|
113
|
+
- whether the current branch appears stale/spent or the dirty tree appears mixed-scope
|
|
114
|
+
</load_artifacts>
|
|
115
|
+
|
|
116
|
+
<provenance_reconciliation>
|
|
109
117
|
Before routing, reconstruct and compare these truth buckets explicitly:
|
|
110
118
|
|
|
111
119
|
1. **Checkpoint narrative truth** — what `.planning/.continue-here.md` claims was happening
|
|
112
120
|
2. **Planning/artifact truth** — what ROADMAP, SPEC, phase files, quick-task logs, and the active brownfield change artifacts say
|
|
113
121
|
3. **Git/worktree truth** — what the live branch and working tree say now
|
|
114
|
-
|
|
115
|
-
Treat them as separate inputs. Do not flatten them into one continuity story.
|
|
116
|
-
|
|
122
|
+
|
|
123
|
+
Treat them as separate inputs. Do not flatten them into one continuity story.
|
|
124
|
+
|
|
117
125
|
Material mismatch signals include:
|
|
118
126
|
- checkpoint narrative describes only a narrow slice of a broader dirty tree
|
|
119
127
|
- current branch is stale/spent relative to the next intended integration surface
|
|
@@ -138,39 +146,39 @@ If git/worktree truth materially disagrees with the active brownfield artifact:
|
|
|
138
146
|
- still-active execution state: the checkpoint still points at unfinished `phase` or `quick` work
|
|
139
147
|
- If any one of those checks fails, keep the checkpoint visible but do not let it become the primary resume target.
|
|
140
148
|
</provenance_reconciliation>
|
|
141
|
-
|
|
142
|
-
<validate_checkpoint>
|
|
143
|
-
Only run this step when `.planning/.continue-here.md` was found in `<load_artifacts>`. If no checkpoint exists, skip this step entirely.
|
|
144
|
-
|
|
145
|
-
Cross-validate checkpoint fields against current roadmap state in this order:
|
|
146
|
-
|
|
147
|
-
1. Extract the checkpoint `workflow` and `phase` frontmatter fields.
|
|
148
|
-
2. If `phase` is non-null, look up that exact phase name in `.planning/ROADMAP.md`.
|
|
149
|
-
- If the matching roadmap entry is `[x]`, mark the checkpoint as stale.
|
|
150
|
-
- Record the specific reason in this form: `checkpoint references phase "[phase]" which is already complete [x] in ROADMAP.md`.
|
|
151
|
-
- Stop further staleness checks after recording this reason.
|
|
152
|
-
3. If `workflow` is `phase` and `phase` is null, mark the checkpoint as potentially stale.
|
|
153
|
-
- Record the reason in this form: `checkpoint workflow is "phase" but checkpoint phase is missing`.
|
|
154
|
-
4. If `workflow` is `phase` and `phase` is non-null but no matching roadmap entry exists, mark the checkpoint as potentially stale.
|
|
155
|
-
- Record the reason in this form: `checkpoint workflow is "phase" but phase "[phase]" was not found in ROADMAP.md`.
|
|
156
|
-
5. If `workflow` is `phase` and `phase` matches a roadmap entry with status `[ ]` or `[-]`, do not mark it stale based only on missing execution artifacts. Continue normally.
|
|
157
|
-
6. If no structural staleness rule applied, skip validation cleanly. This includes `generic` or `quick` checkpoints with null `phase`.
|
|
158
|
-
|
|
159
|
-
When staleness is detected:
|
|
160
|
-
- Record a staleness flag and keep the full reason text.
|
|
161
|
-
- Record only one staleness reason string. Do not append additional reasons after the first matching rule.
|
|
162
|
-
- Do NOT delete the checkpoint.
|
|
163
|
-
- Do NOT suppress the checkpoint contents.
|
|
164
|
-
|
|
165
|
-
The output of this step is either:
|
|
166
|
-
- no staleness flag, or
|
|
167
|
-
- a staleness flag with a specific reason string that flows into `<present_status>` and `<determine_action>`.
|
|
168
|
-
</validate_checkpoint>
|
|
169
|
-
|
|
170
|
-
<present_status>
|
|
171
|
-
Present a compact status to the user:
|
|
172
|
-
|
|
173
|
-
```
|
|
149
|
+
|
|
150
|
+
<validate_checkpoint>
|
|
151
|
+
Only run this step when `.planning/.continue-here.md` was found in `<load_artifacts>`. If no checkpoint exists, skip this step entirely.
|
|
152
|
+
|
|
153
|
+
Cross-validate checkpoint fields against current roadmap state in this order:
|
|
154
|
+
|
|
155
|
+
1. Extract the checkpoint `workflow` and `phase` frontmatter fields.
|
|
156
|
+
2. If `phase` is non-null, look up that exact phase name in `.planning/ROADMAP.md`.
|
|
157
|
+
- If the matching roadmap entry is `[x]`, mark the checkpoint as stale.
|
|
158
|
+
- Record the specific reason in this form: `checkpoint references phase "[phase]" which is already complete [x] in ROADMAP.md`.
|
|
159
|
+
- Stop further staleness checks after recording this reason.
|
|
160
|
+
3. If `workflow` is `phase` and `phase` is null, mark the checkpoint as potentially stale.
|
|
161
|
+
- Record the reason in this form: `checkpoint workflow is "phase" but checkpoint phase is missing`.
|
|
162
|
+
4. If `workflow` is `phase` and `phase` is non-null but no matching roadmap entry exists, mark the checkpoint as potentially stale.
|
|
163
|
+
- Record the reason in this form: `checkpoint workflow is "phase" but phase "[phase]" was not found in ROADMAP.md`.
|
|
164
|
+
5. If `workflow` is `phase` and `phase` matches a roadmap entry with status `[ ]` or `[-]`, do not mark it stale based only on missing execution artifacts. Continue normally.
|
|
165
|
+
6. If no structural staleness rule applied, skip validation cleanly. This includes `generic` or `quick` checkpoints with null `phase`.
|
|
166
|
+
|
|
167
|
+
When staleness is detected:
|
|
168
|
+
- Record a staleness flag and keep the full reason text.
|
|
169
|
+
- Record only one staleness reason string. Do not append additional reasons after the first matching rule.
|
|
170
|
+
- Do NOT delete the checkpoint.
|
|
171
|
+
- Do NOT suppress the checkpoint contents.
|
|
172
|
+
|
|
173
|
+
The output of this step is either:
|
|
174
|
+
- no staleness flag, or
|
|
175
|
+
- a staleness flag with a specific reason string that flows into `<present_status>` and `<determine_action>`.
|
|
176
|
+
</validate_checkpoint>
|
|
177
|
+
|
|
178
|
+
<present_status>
|
|
179
|
+
Present a compact status to the user:
|
|
180
|
+
|
|
181
|
+
```
|
|
174
182
|
Project: [name from SPEC.md]
|
|
175
183
|
Phase: [current] of [total] — [phase name]
|
|
176
184
|
Completed: [N] phases done
|
|
@@ -197,9 +205,9 @@ Active brownfield change: [title]
|
|
|
197
205
|
[If .continue-here.md exists:]
|
|
198
206
|
[If stale checkpoint flag set:]
|
|
199
207
|
⚠ Stale checkpoint detected
|
|
200
|
-
Reason: [specific staleness reason]
|
|
201
|
-
Review the checkpoint contents below and decide whether to resume from it or continue without it.
|
|
202
|
-
|
|
208
|
+
Reason: [specific staleness reason]
|
|
209
|
+
Review the checkpoint contents below and decide whether to resume from it or continue without it.
|
|
210
|
+
|
|
203
211
|
Checkpoint found: [workflow type] — [phase name or task description]
|
|
204
212
|
Last paused: [timestamp from frontmatter]
|
|
205
213
|
Paused by: [runtime from checkpoint, or unknown if field absent]
|
|
@@ -210,28 +218,28 @@ Checkpoint found: [workflow type] — [phase name or task description]
|
|
|
210
218
|
Checkpoint note:
|
|
211
219
|
This checkpoint no longer cleanly matches the active brownfield execution surface.
|
|
212
220
|
Keep it reviewable, but do not treat it as the primary resume target unless the user explicitly chooses it.
|
|
213
|
-
|
|
214
|
-
[If <judgment> was present in checkpoint:]
|
|
215
|
-
Judgment context:
|
|
216
|
-
Constraints:
|
|
217
|
-
[Full content of <active_constraints>]
|
|
218
|
-
Uncertainty:
|
|
219
|
-
[Full content of <unresolved_uncertainty>]
|
|
220
|
-
Posture:
|
|
221
|
-
[Full content of <decision_posture>]
|
|
222
|
-
Anti-regression:
|
|
223
|
-
[Full content of <anti_regression>]
|
|
224
|
-
|
|
225
|
-
[If git/worktree truth was collected:]
|
|
226
|
-
Git/worktree truth:
|
|
227
|
-
Branch: [current branch]
|
|
228
|
-
Divergence: [ahead/behind or unknown]
|
|
229
|
-
Staged: [count]
|
|
230
|
-
Unstaged: [count]
|
|
231
|
-
Untracked: [count]
|
|
232
|
-
PR: [open|closed|merged|none|unknown]
|
|
233
|
-
Integration surface: [clean | warning | stale/spent | mixed-scope]
|
|
234
|
-
|
|
221
|
+
|
|
222
|
+
[If <judgment> was present in checkpoint:]
|
|
223
|
+
Judgment context:
|
|
224
|
+
Constraints:
|
|
225
|
+
[Full content of <active_constraints>]
|
|
226
|
+
Uncertainty:
|
|
227
|
+
[Full content of <unresolved_uncertainty>]
|
|
228
|
+
Posture:
|
|
229
|
+
[Full content of <decision_posture>]
|
|
230
|
+
Anti-regression:
|
|
231
|
+
[Full content of <anti_regression>]
|
|
232
|
+
|
|
233
|
+
[If git/worktree truth was collected:]
|
|
234
|
+
Git/worktree truth:
|
|
235
|
+
Branch: [current branch]
|
|
236
|
+
Divergence: [ahead/behind or unknown]
|
|
237
|
+
Staged: [count]
|
|
238
|
+
Unstaged: [count]
|
|
239
|
+
Untracked: [count]
|
|
240
|
+
PR: [open|closed|merged|none|unknown]
|
|
241
|
+
Integration surface: [clean | warning | stale/spent | mixed-scope]
|
|
242
|
+
|
|
235
243
|
[If material checkpoint/worktree mismatch flag set:]
|
|
236
244
|
⚠ Checkpoint/worktree mismatch
|
|
237
245
|
The checkpoint narrative no longer matches the live branch/worktree scope.
|
|
@@ -241,22 +249,22 @@ Git/worktree truth:
|
|
|
241
249
|
⚠ Brownfield continuity mismatch
|
|
242
250
|
`CHANGE.md` no longer cleanly matches the live branch/worktree truth.
|
|
243
251
|
Review `CHANGE.md`, `HANDOFF.md`, and the dirty tree before choosing the next action.
|
|
244
|
-
|
|
245
|
-
[If incomplete phase execution found:]
|
|
246
|
-
Incomplete execution: Phase [N] has a PLAN but no SUMMARY
|
|
247
|
-
|
|
248
|
-
[If incomplete quick task found:]
|
|
249
|
-
Incomplete quick task: [description from LOG.md]
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
No ASCII art, no progress bars. Keep it scannable.
|
|
253
|
-
|
|
254
|
-
Only show the staleness banner when `<validate_checkpoint>` produced a staleness flag. Even when flagged, still show the checkpoint details immediately below the banner.
|
|
255
|
-
</present_status>
|
|
256
|
-
|
|
257
|
-
<determine_action>
|
|
258
|
-
Evaluate in priority order and present the primary recommendation:
|
|
259
|
-
|
|
252
|
+
|
|
253
|
+
[If incomplete phase execution found:]
|
|
254
|
+
Incomplete execution: Phase [N] has a PLAN but no SUMMARY
|
|
255
|
+
|
|
256
|
+
[If incomplete quick task found:]
|
|
257
|
+
Incomplete quick task: [description from LOG.md]
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
No ASCII art, no progress bars. Keep it scannable.
|
|
261
|
+
|
|
262
|
+
Only show the staleness banner when `<validate_checkpoint>` produced a staleness flag. Even when flagged, still show the checkpoint details immediately below the banner.
|
|
263
|
+
</present_status>
|
|
264
|
+
|
|
265
|
+
<determine_action>
|
|
266
|
+
Evaluate in priority order and present the primary recommendation:
|
|
267
|
+
|
|
260
268
|
**Checkpoint exists (`.continue-here.md`):**
|
|
261
269
|
Route based on the `workflow` frontmatter:
|
|
262
270
|
- `phase` — route to `/gsdd-execute` (or `/gsdd-plan`/`/gsdd-verify` based on checkpoint context)
|
|
@@ -280,23 +288,23 @@ If there is no checkpoint, or if the surviving checkpoint does not satisfy the s
|
|
|
280
288
|
|
|
281
289
|
**Incomplete plan execution (PLAN without SUMMARY):**
|
|
282
290
|
Route to `/gsdd-execute` for that phase.
|
|
283
|
-
|
|
284
|
-
**Phase needs planning (next `[ ]` phase, no PLAN file exists):**
|
|
285
|
-
Route to `/gsdd-plan` for that phase.
|
|
286
|
-
|
|
287
|
-
**Phase needs verification (SUMMARY exists but no VERIFICATION):**
|
|
288
|
-
Route to `/gsdd-verify` for that phase (only if `workflow.verifier` is enabled in config.json; if config.json cannot be read, assume verifier is disabled).
|
|
289
|
-
|
|
290
|
-
**All phases complete (all `[x]`):**
|
|
291
|
-
Route to `/gsdd-audit-milestone`.
|
|
292
|
-
</determine_action>
|
|
293
|
-
|
|
294
|
-
<present_options>
|
|
295
|
-
Present a numbered list of actions based on the state analysis:
|
|
296
|
-
|
|
297
|
-
```
|
|
298
|
-
What would you like to do?
|
|
299
|
-
|
|
291
|
+
|
|
292
|
+
**Phase needs planning (next `[ ]` phase, no PLAN file exists):**
|
|
293
|
+
Route to `/gsdd-plan` for that phase.
|
|
294
|
+
|
|
295
|
+
**Phase needs verification (SUMMARY exists but no VERIFICATION):**
|
|
296
|
+
Route to `/gsdd-verify` for that phase (only if `workflow.verifier` is enabled in config.json; if config.json cannot be read, assume verifier is disabled).
|
|
297
|
+
|
|
298
|
+
**All phases complete (all `[x]`):**
|
|
299
|
+
Route to `/gsdd-audit-milestone`.
|
|
300
|
+
</determine_action>
|
|
301
|
+
|
|
302
|
+
<present_options>
|
|
303
|
+
Present a numbered list of actions based on the state analysis:
|
|
304
|
+
|
|
305
|
+
```
|
|
306
|
+
What would you like to do?
|
|
307
|
+
|
|
300
308
|
1. [Primary action from above] (recommended)
|
|
301
309
|
2. [Secondary action if applicable]
|
|
302
310
|
3. Review ROADMAP.md
|
|
@@ -308,42 +316,42 @@ When the primary action is an active brownfield change rather than a checkpoint
|
|
|
308
316
|
**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
317
|
|
|
310
318
|
**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
|
-
|
|
319
|
+
|
|
312
320
|
Wait for user selection.
|
|
313
321
|
</present_options>
|
|
314
|
-
|
|
315
|
-
<cleanup_checkpoint>
|
|
316
|
-
Immediately after the user confirms their action selection (before routing to the target workflow):
|
|
317
|
-
- If the user chose to resume from `.continue-here.md`:
|
|
322
|
+
|
|
323
|
+
<cleanup_checkpoint>
|
|
324
|
+
Immediately after the user confirms their action selection (before routing to the target workflow):
|
|
325
|
+
- If the user chose to resume from `.continue-here.md`:
|
|
318
326
|
1. Run `node .planning/bin/gsdd.mjs file-op copy .planning/.continue-here.md .planning/.continue-here.bak`.
|
|
319
327
|
2. After the copy succeeds, run `node .planning/bin/gsdd.mjs file-op delete .planning/.continue-here.md`.
|
|
320
|
-
- If the user chose a different action (not based on the checkpoint), leave `.continue-here.md` in place for a future resume.
|
|
321
|
-
|
|
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.
|
|
323
|
-
</cleanup_checkpoint>
|
|
324
|
-
|
|
325
|
-
</process>
|
|
326
|
-
|
|
327
|
-
<success_criteria>
|
|
328
|
-
- [ ] Project state detected from disk artifacts (ROADMAP.md, SPEC.md, phase dirs)
|
|
329
|
-
- [ ] `.continue-here.md` loaded if present
|
|
330
|
-
- [ ] Incomplete work flagged (phase execution, quick tasks)
|
|
331
|
-
- [ ] Compact status presented to user
|
|
332
|
-
- [ ] Contextual next action determined (priority-ordered routing)
|
|
333
|
-
- [ ] Options presented and user selection waited for
|
|
334
|
-
- [ ] Checkpoint cleaned up after successful routing
|
|
335
|
-
</success_criteria>
|
|
336
|
-
|
|
337
|
-
<completion>
|
|
338
|
-
After the user selects their action and the checkpoint is cleaned up, hand off to the selected workflow.
|
|
339
|
-
|
|
340
|
-
Present to the user before dispatching:
|
|
341
|
-
|
|
342
|
-
---
|
|
343
|
-
**Resuming:** [selected action description]
|
|
344
|
-
|
|
345
|
-
Consider clearing context before starting the next workflow for best results.
|
|
346
|
-
---
|
|
347
|
-
|
|
348
|
-
Then dispatch to the selected `/gsdd-*` workflow.
|
|
349
|
-
</completion>
|
|
328
|
+
- If the user chose a different action (not based on the checkpoint), leave `.continue-here.md` in place for a future resume.
|
|
329
|
+
|
|
330
|
+
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.
|
|
331
|
+
</cleanup_checkpoint>
|
|
332
|
+
|
|
333
|
+
</process>
|
|
334
|
+
|
|
335
|
+
<success_criteria>
|
|
336
|
+
- [ ] Project state detected from disk artifacts (ROADMAP.md, SPEC.md, phase dirs)
|
|
337
|
+
- [ ] `.continue-here.md` loaded if present
|
|
338
|
+
- [ ] Incomplete work flagged (phase execution, quick tasks)
|
|
339
|
+
- [ ] Compact status presented to user
|
|
340
|
+
- [ ] Contextual next action determined (priority-ordered routing)
|
|
341
|
+
- [ ] Options presented and user selection waited for
|
|
342
|
+
- [ ] Checkpoint cleaned up after successful routing
|
|
343
|
+
</success_criteria>
|
|
344
|
+
|
|
345
|
+
<completion>
|
|
346
|
+
After the user selects their action and the checkpoint is cleaned up, hand off to the selected workflow.
|
|
347
|
+
|
|
348
|
+
Present to the user before dispatching:
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
**Resuming:** [selected action description]
|
|
352
|
+
|
|
353
|
+
Consider clearing context before starting the next workflow for best results.
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
Then dispatch to the selected `/gsdd-*` workflow.
|
|
357
|
+
</completion>
|