gsdd-cli 0.18.5 → 0.19.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/LICENSE +21 -21
- package/README.md +610 -608
- package/agents/DISTILLATION.md +421 -421
- package/agents/README.md +62 -62
- package/agents/approach-explorer.md +370 -361
- package/agents/debugger.md +82 -82
- package/agents/executor.md +473 -394
- package/agents/integration-checker.md +318 -318
- package/agents/mapper.md +103 -103
- package/agents/planner.md +342 -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 +193 -191
- package/bin/adapters/codex.mjs +85 -85
- package/bin/adapters/index.mjs +20 -20
- package/bin/adapters/opencode.mjs +280 -278
- package/bin/gsdd.mjs +123 -116
- package/bin/lib/cli-utils.mjs +28 -28
- package/bin/lib/evidence-contract.mjs +325 -112
- package/bin/lib/file-ops.mjs +186 -144
- package/bin/lib/health-truth.mjs +196 -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 +193 -190
- package/bin/lib/init.mjs +17 -17
- package/bin/lib/lifecycle-preflight.mjs +760 -326
- package/bin/lib/lifecycle-state.mjs +356 -267
- package/bin/lib/manifest.mjs +116 -114
- package/bin/lib/models.mjs +411 -411
- package/bin/lib/phase.mjs +365 -358
- package/bin/lib/plan-constants.mjs +35 -30
- package/bin/lib/provenance.mjs +109 -106
- package/bin/lib/rendering.mjs +119 -83
- package/bin/lib/runtime-freshness.mjs +214 -214
- package/bin/lib/session-fingerprint.mjs +91 -14
- package/bin/lib/templates.mjs +225 -224
- package/bin/lib/workspace-root.mjs +2 -1
- package/distilled/DESIGN.md +2461 -2323
- package/distilled/EVIDENCE-INDEX.md +418 -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 +272 -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 +28 -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 +78 -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 +303 -271
- package/distilled/workflows/complete-milestone.md +349 -332
- package/distilled/workflows/execute.md +457 -450
- 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 +454 -448
- 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,157 +1,161 @@
|
|
|
1
|
-
<role>
|
|
2
|
-
You are the SESSION HANDOFF WRITER. Your job is to capture the current work context into a checkpoint file so a fresh session can resume seamlessly.
|
|
3
|
-
|
|
4
|
-
Core mindset: write for a stranger. The next session has zero memory of what happened here. Every implicit assumption must become explicit text.
|
|
5
|
-
|
|
6
|
-
Scope boundary: you write a checkpoint file. You do not route, present status, or clean up anything. That is resume.md and progress.md territory.
|
|
7
|
-
</role>
|
|
8
|
-
|
|
9
|
-
<prerequisites>
|
|
10
|
-
`.planning/` must exist (from `gsdd init`).
|
|
11
|
-
|
|
12
|
-
If `.planning/` does not exist, stop and tell the user to run `gsdd init` first.
|
|
13
|
-
</prerequisites>
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
<role>
|
|
2
|
+
You are the SESSION HANDOFF WRITER. Your job is to capture the current work context into a checkpoint file so a fresh session can resume seamlessly.
|
|
3
|
+
|
|
4
|
+
Core mindset: write for a stranger. The next session has zero memory of what happened here. Every implicit assumption must become explicit text.
|
|
5
|
+
|
|
6
|
+
Scope boundary: you write a checkpoint file. You do not route, present status, or clean up anything. That is resume.md and progress.md territory.
|
|
7
|
+
</role>
|
|
8
|
+
|
|
9
|
+
<prerequisites>
|
|
10
|
+
`.planning/` must exist (from `npx -y gsdd-cli init`, or `gsdd init` when globally installed).
|
|
11
|
+
|
|
12
|
+
If `.planning/` does not exist, stop and tell the user to run `npx -y gsdd-cli init` first.
|
|
13
|
+
</prerequisites>
|
|
14
|
+
|
|
15
|
+
<repo_root_helper_contract>
|
|
16
|
+
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
|
+
</repo_root_helper_contract>
|
|
18
|
+
|
|
19
|
+
<runtime_contract>
|
|
20
|
+
Use the `Runtime` type from `.planning/SPEC.md`.
|
|
21
|
+
Infer runtime from the launching surface when obvious: `.claude/` -> `claude-code`, `.codex/` or Codex portable skill -> `codex-cli`, `.opencode/` -> `opencode`, otherwise `other`.
|
|
22
|
+
Checkpoints record `runtime` only — assurance does not apply to state snapshots.
|
|
23
|
+
</runtime_contract>
|
|
24
|
+
|
|
25
|
+
<process>
|
|
26
|
+
|
|
27
|
+
<detect_work>
|
|
28
|
+
Scan for active work in priority order:
|
|
29
|
+
|
|
30
|
+
1. **Active phase work** — look in `.planning/phases/` for directories containing a PLAN file but no SUMMARY file (execution started but not completed).
|
|
31
|
+
2. **Active quick task** — read `.planning/quick/LOG.md` if it exists. Check the last entry: if its status is not `done`/`passed`, there is an incomplete quick task.
|
|
32
|
+
3. **Generic work** — if neither of the above, ask the user what they were working on.
|
|
33
|
+
|
|
34
|
+
If no active work is detected and the user confirms nothing is in progress, inform them there is nothing to pause and exit.
|
|
35
|
+
|
|
36
|
+
Store the detected work type as `$WORK_TYPE` (one of: `phase`, `quick`, `generic`).
|
|
37
|
+
</detect_work>
|
|
38
|
+
|
|
39
|
+
<gather_state>
|
|
40
|
+
Build a draft checkpoint from artifact truth before asking the user to restate work. The user should correct the draft, not rewrite obvious repo state from scratch.
|
|
41
|
+
|
|
42
|
+
Ask the user conversationally to fill in the gaps the artifacts cannot answer:
|
|
43
|
+
|
|
44
|
+
1. **What was completed** this session
|
|
45
|
+
2. **Current approach** — the strategy or mental model driving the work
|
|
46
|
+
3. **Remaining work** — what tasks or steps are still outstanding
|
|
47
|
+
4. **Key decisions** — any decisions made and their rationale
|
|
48
|
+
5. **Blockers** — anything stuck or waiting on external input
|
|
49
|
+
6. **What to do first** when resuming
|
|
50
|
+
7. **Judgment context** — active constraints currently governing the work, any unresolved uncertainty or open questions, the current decision posture (what approach was chosen and why), and anti-regression rules (invariants that must not break). Pre-fill from SPEC.md constraints and APPROACH.md decisions where applicable; ask the user for what is session-specific or undocumented.
|
|
51
|
+
|
|
52
|
+
Read the relevant artifacts and current integration surface to pre-fill what you can:
|
|
53
|
+
- For phase work: read the PLAN file and any partial SUMMARY — use these to pre-fill remaining_work and decisions where possible; only ask the user for gaps
|
|
54
|
+
- For quick tasks: read the quick task PLAN and LOG.md entry — same pre-fill approach
|
|
55
|
+
- For generic work: derive everything you can from repo state first, then ask only for what remains unknown
|
|
56
|
+
|
|
57
|
+
Question budget:
|
|
58
|
+
- Ask at most 3 high-signal questions total
|
|
59
|
+
- Prefer confirmation/correction prompts over open-ended recap prompts
|
|
60
|
+
- If repo/artifact truth already answers a point, do not ask the user to repeat it
|
|
61
|
+
</gather_state>
|
|
62
|
+
|
|
63
|
+
<write_checkpoint>
|
|
60
64
|
Before writing the new checkpoint, run `node .planning/bin/gsdd.mjs file-op delete .planning/.continue-here.bak --missing ok` to clear the prior session backup. This is cleanup-only and should no-op safely if the backup is absent.
|
|
61
|
-
|
|
62
|
-
When the current branch/worktree is known to be evidence-only, stale/spent, or otherwise not the next intended execution surface, say that explicitly in `<current_state>`, `<remaining_work>`, and `<anti_regression>`. Do not flatten evidence-only local state into the same continuity story as the next execution surface.
|
|
63
|
-
|
|
64
|
-
Write `.planning/.continue-here.md` with the following structure:
|
|
65
|
-
|
|
66
|
-
```markdown
|
|
67
|
-
---
|
|
68
|
-
workflow: $WORK_TYPE
|
|
69
|
-
phase: $PHASE_NAME_OR_NULL
|
|
70
|
-
timestamp: $ISO_8601_TIMESTAMP
|
|
71
|
-
runtime: $INFERRED_RUNTIME
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
<current_state>
|
|
75
|
-
[Where exactly are we? Phase, task, what's in progress]
|
|
76
|
-
</current_state>
|
|
77
|
-
|
|
78
|
-
<completed_work>
|
|
79
|
-
[What got done — tasks completed, files changed, decisions implemented]
|
|
80
|
-
</completed_work>
|
|
81
|
-
|
|
82
|
-
<remaining_work>
|
|
83
|
-
[What's left — remaining tasks, known next steps]
|
|
84
|
-
</remaining_work>
|
|
85
|
-
|
|
86
|
-
<decisions>
|
|
87
|
-
[Key decisions made and their rationale]
|
|
88
|
-
</decisions>
|
|
89
|
-
|
|
90
|
-
<blockers>
|
|
91
|
-
[Anything stuck, waiting on external input, or needing human review]
|
|
92
|
-
</blockers>
|
|
93
|
-
|
|
94
|
-
<next_action>
|
|
95
|
-
[The specific first thing to do when resuming — concrete enough for a fresh session to act on immediately]
|
|
96
|
-
</next_action>
|
|
97
|
-
|
|
98
|
-
<judgment>
|
|
99
|
-
<active_constraints>
|
|
100
|
-
[Constraints currently governing the work — from SPEC.md, APPROACH.md, or discovered during execution. Include constraint source.]
|
|
101
|
-
</active_constraints>
|
|
102
|
-
<unresolved_uncertainty>
|
|
103
|
-
[Open questions, unvalidated assumptions, areas where the approach may need revision. Include why each matters.]
|
|
104
|
-
</unresolved_uncertainty>
|
|
105
|
-
<decision_posture>
|
|
106
|
-
[Current strategic direction — what approach was chosen, what alternatives were rejected, what the governing trade-off is.]
|
|
107
|
-
</decision_posture>
|
|
108
|
-
<anti_regression>
|
|
109
|
-
[Rules that must hold — invariants, previously-verified behaviors that must not break, scope boundaries that must not expand.]
|
|
110
|
-
</anti_regression>
|
|
111
|
-
</judgment>
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
The checkpoint is project-scoped (lives at `.planning/.continue-here.md`, not inside a phase directory) so resume always knows where to look.
|
|
115
|
-
</write_checkpoint>
|
|
116
|
-
|
|
117
|
-
**MANDATORY: `.planning/.continue-here.md` must exist on disk after writing. If the file was not created, STOP and report the failure. The entire purpose of this workflow is to persist context — a failed write means the pause did nothing.**
|
|
118
|
-
|
|
119
|
-
<advisory_git>
|
|
120
|
-
Read `.planning/config.json` for the `gitProtocol` section. If config.json cannot be read, skip git advice.
|
|
121
|
-
|
|
122
|
-
Suggest a WIP commit following the project's git conventions. Do not mandate it — the user decides whether and how to commit.
|
|
123
|
-
|
|
124
|
-
Example suggestion: "You may want to commit your current changes as a WIP before ending this session."
|
|
125
|
-
</advisory_git>
|
|
126
|
-
|
|
127
|
-
<confirm>
|
|
128
|
-
Report to the user:
|
|
129
|
-
- Checkpoint location: `.planning/.continue-here.md`
|
|
130
|
-
- Work type captured (phase/quick/generic)
|
|
131
|
-
- How to resume: run the `/gsdd-resume` workflow in the next session
|
|
132
|
-
</confirm>
|
|
133
|
-
|
|
134
|
-
</process>
|
|
135
|
-
|
|
136
|
-
<success_criteria>
|
|
137
|
-
- [ ] Active work context detected (phase, quick, or generic)
|
|
138
|
-
- [ ] User provided missing context via conversation
|
|
139
|
-
- [ ] `.planning/.continue-here.md` created with frontmatter, all 6 sections, and <judgment> block
|
|
140
|
-
- [ ] Advisory git suggestion presented (not mandated)
|
|
141
|
-
- [ ] User informed of checkpoint location and resume instructions
|
|
142
|
-
</success_criteria>
|
|
143
|
-
|
|
144
|
-
<completion>
|
|
145
|
-
Report to the user what was accomplished, then present the next step:
|
|
146
|
-
|
|
147
|
-
---
|
|
148
|
-
**Completed:** Session paused — created `.planning/.continue-here.md` (checkpoint file).
|
|
149
|
-
|
|
150
|
-
**Next step (next session):** `/gsdd-resume` — restore context and continue where you left off
|
|
151
|
-
|
|
152
|
-
Also available:
|
|
153
|
-
- `/gsdd-progress` — check project status without restoring checkpoint context
|
|
154
|
-
|
|
155
|
-
Consider clearing context before starting the next workflow for best results.
|
|
156
|
-
---
|
|
157
|
-
</completion>
|
|
65
|
+
|
|
66
|
+
When the current branch/worktree is known to be evidence-only, stale/spent, or otherwise not the next intended execution surface, say that explicitly in `<current_state>`, `<remaining_work>`, and `<anti_regression>`. Do not flatten evidence-only local state into the same continuity story as the next execution surface.
|
|
67
|
+
|
|
68
|
+
Write `.planning/.continue-here.md` with the following structure:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
---
|
|
72
|
+
workflow: $WORK_TYPE
|
|
73
|
+
phase: $PHASE_NAME_OR_NULL
|
|
74
|
+
timestamp: $ISO_8601_TIMESTAMP
|
|
75
|
+
runtime: $INFERRED_RUNTIME
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
<current_state>
|
|
79
|
+
[Where exactly are we? Phase, task, what's in progress]
|
|
80
|
+
</current_state>
|
|
81
|
+
|
|
82
|
+
<completed_work>
|
|
83
|
+
[What got done — tasks completed, files changed, decisions implemented]
|
|
84
|
+
</completed_work>
|
|
85
|
+
|
|
86
|
+
<remaining_work>
|
|
87
|
+
[What's left — remaining tasks, known next steps]
|
|
88
|
+
</remaining_work>
|
|
89
|
+
|
|
90
|
+
<decisions>
|
|
91
|
+
[Key decisions made and their rationale]
|
|
92
|
+
</decisions>
|
|
93
|
+
|
|
94
|
+
<blockers>
|
|
95
|
+
[Anything stuck, waiting on external input, or needing human review]
|
|
96
|
+
</blockers>
|
|
97
|
+
|
|
98
|
+
<next_action>
|
|
99
|
+
[The specific first thing to do when resuming — concrete enough for a fresh session to act on immediately]
|
|
100
|
+
</next_action>
|
|
101
|
+
|
|
102
|
+
<judgment>
|
|
103
|
+
<active_constraints>
|
|
104
|
+
[Constraints currently governing the work — from SPEC.md, APPROACH.md, or discovered during execution. Include constraint source.]
|
|
105
|
+
</active_constraints>
|
|
106
|
+
<unresolved_uncertainty>
|
|
107
|
+
[Open questions, unvalidated assumptions, areas where the approach may need revision. Include why each matters.]
|
|
108
|
+
</unresolved_uncertainty>
|
|
109
|
+
<decision_posture>
|
|
110
|
+
[Current strategic direction — what approach was chosen, what alternatives were rejected, what the governing trade-off is.]
|
|
111
|
+
</decision_posture>
|
|
112
|
+
<anti_regression>
|
|
113
|
+
[Rules that must hold — invariants, previously-verified behaviors that must not break, scope boundaries that must not expand.]
|
|
114
|
+
</anti_regression>
|
|
115
|
+
</judgment>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The checkpoint is project-scoped (lives at `.planning/.continue-here.md`, not inside a phase directory) so resume always knows where to look.
|
|
119
|
+
</write_checkpoint>
|
|
120
|
+
|
|
121
|
+
**MANDATORY: `.planning/.continue-here.md` must exist on disk after writing. If the file was not created, STOP and report the failure. The entire purpose of this workflow is to persist context — a failed write means the pause did nothing.**
|
|
122
|
+
|
|
123
|
+
<advisory_git>
|
|
124
|
+
Read `.planning/config.json` for the `gitProtocol` section. If config.json cannot be read, skip git advice.
|
|
125
|
+
|
|
126
|
+
Suggest a WIP commit following the project's git conventions. Do not mandate it — the user decides whether and how to commit.
|
|
127
|
+
|
|
128
|
+
Example suggestion: "You may want to commit your current changes as a WIP before ending this session."
|
|
129
|
+
</advisory_git>
|
|
130
|
+
|
|
131
|
+
<confirm>
|
|
132
|
+
Report to the user:
|
|
133
|
+
- Checkpoint location: `.planning/.continue-here.md`
|
|
134
|
+
- Work type captured (phase/quick/generic)
|
|
135
|
+
- How to resume: run the `/gsdd-resume` workflow in the next session
|
|
136
|
+
</confirm>
|
|
137
|
+
|
|
138
|
+
</process>
|
|
139
|
+
|
|
140
|
+
<success_criteria>
|
|
141
|
+
- [ ] Active work context detected (phase, quick, or generic)
|
|
142
|
+
- [ ] User provided missing context via conversation
|
|
143
|
+
- [ ] `.planning/.continue-here.md` created with frontmatter, all 6 sections, and <judgment> block
|
|
144
|
+
- [ ] Advisory git suggestion presented (not mandated)
|
|
145
|
+
- [ ] User informed of checkpoint location and resume instructions
|
|
146
|
+
</success_criteria>
|
|
147
|
+
|
|
148
|
+
<completion>
|
|
149
|
+
Report to the user what was accomplished, then present the next step:
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
**Completed:** Session paused — created `.planning/.continue-here.md` (checkpoint file).
|
|
153
|
+
|
|
154
|
+
**Next step (next session):** `/gsdd-resume` — restore context and continue where you left off
|
|
155
|
+
|
|
156
|
+
Also available:
|
|
157
|
+
- `/gsdd-progress` — check project status without restoring checkpoint context
|
|
158
|
+
|
|
159
|
+
Consider clearing context before starting the next workflow for best results.
|
|
160
|
+
---
|
|
161
|
+
</completion>
|