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.
Files changed (101) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +610 -608
  3. package/agents/DISTILLATION.md +421 -421
  4. package/agents/README.md +62 -62
  5. package/agents/approach-explorer.md +370 -361
  6. package/agents/debugger.md +82 -82
  7. package/agents/executor.md +473 -394
  8. package/agents/integration-checker.md +318 -318
  9. package/agents/mapper.md +103 -103
  10. package/agents/planner.md +342 -313
  11. package/agents/researcher.md +84 -84
  12. package/agents/roadmapper.md +296 -296
  13. package/agents/synthesizer.md +236 -236
  14. package/agents/verifier.md +337 -337
  15. package/bin/adapters/agents.mjs +34 -34
  16. package/bin/adapters/claude.mjs +193 -191
  17. package/bin/adapters/codex.mjs +85 -85
  18. package/bin/adapters/index.mjs +20 -20
  19. package/bin/adapters/opencode.mjs +280 -278
  20. package/bin/gsdd.mjs +123 -116
  21. package/bin/lib/cli-utils.mjs +28 -28
  22. package/bin/lib/evidence-contract.mjs +325 -112
  23. package/bin/lib/file-ops.mjs +186 -144
  24. package/bin/lib/health-truth.mjs +196 -178
  25. package/bin/lib/health.mjs +246 -226
  26. package/bin/lib/init-flow.mjs +247 -231
  27. package/bin/lib/init-prompts.mjs +248 -247
  28. package/bin/lib/init-runtime.mjs +193 -190
  29. package/bin/lib/init.mjs +17 -17
  30. package/bin/lib/lifecycle-preflight.mjs +760 -326
  31. package/bin/lib/lifecycle-state.mjs +356 -267
  32. package/bin/lib/manifest.mjs +116 -114
  33. package/bin/lib/models.mjs +411 -411
  34. package/bin/lib/phase.mjs +365 -358
  35. package/bin/lib/plan-constants.mjs +35 -30
  36. package/bin/lib/provenance.mjs +109 -106
  37. package/bin/lib/rendering.mjs +119 -83
  38. package/bin/lib/runtime-freshness.mjs +214 -214
  39. package/bin/lib/session-fingerprint.mjs +91 -14
  40. package/bin/lib/templates.mjs +225 -224
  41. package/bin/lib/workspace-root.mjs +2 -1
  42. package/distilled/DESIGN.md +2461 -2323
  43. package/distilled/EVIDENCE-INDEX.md +418 -392
  44. package/distilled/README.md +196 -193
  45. package/distilled/SKILL.md +86 -85
  46. package/distilled/templates/agents.block.md +21 -21
  47. package/distilled/templates/agents.md +6 -6
  48. package/distilled/templates/approach.md +272 -232
  49. package/distilled/templates/auth-matrix.md +78 -78
  50. package/distilled/templates/brownfield-change/CHANGE.md +99 -0
  51. package/distilled/templates/brownfield-change/HANDOFF.md +38 -0
  52. package/distilled/templates/brownfield-change/VERIFICATION.md +56 -0
  53. package/distilled/templates/codebase/architecture.md +110 -110
  54. package/distilled/templates/codebase/concerns.md +95 -95
  55. package/distilled/templates/codebase/conventions.md +193 -193
  56. package/distilled/templates/codebase/stack.md +96 -96
  57. package/distilled/templates/delegates/approach-explorer.md +28 -25
  58. package/distilled/templates/delegates/mapper-arch.md +26 -26
  59. package/distilled/templates/delegates/mapper-concerns.md +27 -27
  60. package/distilled/templates/delegates/mapper-quality.md +28 -28
  61. package/distilled/templates/delegates/mapper-tech.md +25 -25
  62. package/distilled/templates/delegates/plan-checker.md +78 -68
  63. package/distilled/templates/delegates/researcher-architecture.md +30 -30
  64. package/distilled/templates/delegates/researcher-features.md +30 -30
  65. package/distilled/templates/delegates/researcher-pitfalls.md +30 -30
  66. package/distilled/templates/delegates/researcher-stack.md +30 -30
  67. package/distilled/templates/delegates/researcher-synthesizer.md +31 -31
  68. package/distilled/templates/research/architecture.md +57 -57
  69. package/distilled/templates/research/features.md +23 -23
  70. package/distilled/templates/research/pitfalls.md +46 -46
  71. package/distilled/templates/research/stack.md +45 -45
  72. package/distilled/templates/research/summary.md +67 -67
  73. package/distilled/templates/roadmap.md +74 -62
  74. package/distilled/templates/spec.md +110 -110
  75. package/distilled/workflows/audit-milestone.md +303 -271
  76. package/distilled/workflows/complete-milestone.md +349 -332
  77. package/distilled/workflows/execute.md +457 -450
  78. package/distilled/workflows/map-codebase.md +253 -253
  79. package/distilled/workflows/new-milestone.md +242 -238
  80. package/distilled/workflows/new-project.md +398 -398
  81. package/distilled/workflows/pause.md +160 -156
  82. package/distilled/workflows/plan-milestone-gaps.md +183 -183
  83. package/distilled/workflows/plan.md +454 -448
  84. package/distilled/workflows/progress.md +227 -223
  85. package/distilled/workflows/quick.md +351 -347
  86. package/distilled/workflows/resume.md +220 -212
  87. package/distilled/workflows/verify-work.md +260 -260
  88. package/distilled/workflows/verify.md +431 -429
  89. package/docs/BROWNFIELD-PROOF.md +95 -95
  90. package/docs/RUNTIME-SUPPORT.md +80 -69
  91. package/docs/USER-GUIDE.md +394 -386
  92. package/docs/VERIFICATION-DISCIPLINE.md +59 -59
  93. package/docs/claude/context-monitor.md +98 -98
  94. package/docs/proof/consumer-node-cli/README.md +37 -37
  95. package/docs/proof/consumer-node-cli/ROADMAP.md +14 -14
  96. package/docs/proof/consumer-node-cli/SPEC.md +17 -17
  97. package/docs/proof/consumer-node-cli/brief.md +9 -9
  98. package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-PLAN.md +34 -34
  99. package/docs/proof/consumer-node-cli/phases/01-foundation/01-01-SUMMARY.md +10 -10
  100. package/docs/proof/consumer-node-cli/phases/01-foundation/01-VERIFICATION.md +30 -30
  101. package/package.json +62 -61
@@ -1,183 +1,183 @@
1
- <role>
2
- You are the GAP CLOSURE PLANNER. Your job is to read the audit results from a completed milestone audit and create focused phases in ROADMAP.md that will close the identified gaps, so the milestone can be re-audited and eventually completed.
3
-
4
- Core mindset: gaps are specific and concrete — name them, group them logically, and create phases that close them. Do not create vague "cleanup" phases.
5
-
6
- Scope boundary: you create gap closure phases in ROADMAP.md. You do not plan the phases — that is `/gsdd-plan` territory. You do not close the gaps yourself.
7
- </role>
8
-
9
- <prerequisites>
10
- `.planning/ROADMAP.md` must exist.
11
- `.planning/SPEC.md` must exist.
12
- A `.planning/v*-MILESTONE-AUDIT.md` file must exist with `status: gaps_found`.
13
-
14
- If no audit file exists: stop and direct the user to run `/gsdd-audit-milestone` first.
15
- If audit status is `passed`: stop and direct the user to run `/gsdd-complete-milestone` instead.
16
- </prerequisites>
17
-
18
- <load_context>
19
- Before starting, read these files:
20
-
21
- 1. `.planning/v*-MILESTONE-AUDIT.md` (most recent) — gap details, requirement failures, integration issues, broken flows
22
- 2. `.planning/SPEC.md` — requirement priorities (v1/v2), requirement descriptions
23
- 3. `.planning/ROADMAP.md` — existing phases (to determine phase numbering continuation)
24
- </load_context>
25
-
26
- <process>
27
-
28
- ## 1. Load Audit Gaps
29
-
30
- Parse the MILESTONE-AUDIT.md. Extract all gap objects:
31
- - **Requirement gaps** — requirements marked unsatisfied with reason and missing evidence
32
- - **Integration gaps** — cross-phase wiring failures (e.g., module A exports not consumed by module B)
33
- - **Flow gaps** — E2E user flows broken at specific steps
34
-
35
- For each gap, note:
36
- - Gap type (requirement / integration / flow)
37
- - Priority: derive from SPEC.md (`v1` requirement = must close, `v2` = optional)
38
- - What is missing or broken
39
-
40
- If no gaps are found after parsing, stop and direct the user to `/gsdd-complete-milestone`.
41
-
42
- ## 2. Prioritize Gaps
43
-
44
- Sort gaps into two buckets:
45
-
46
- **Must close** (v1 requirements, or integration/flow gaps affecting v1 requirements):
47
- - These must become phases. The milestone cannot complete until they are resolved.
48
-
49
- **Optional** (v2 requirements, low-severity integration gaps):
50
- - Present to user: include in this milestone or defer?
51
-
52
- Present the gap summary:
53
-
54
- ```
55
- ## Gap Analysis
56
-
57
- Must close ([N] gaps):
58
- - [REQ-ID]: [description] — [reason it failed]
59
- - Integration [Phase X → Phase Y]: [what is missing]
60
- - Flow "[flow name]": broken at [step]
61
-
62
- Optional ([M] gaps):
63
- - [REQ-ID]: [description] (v2 priority)
64
- ```
65
-
66
- **STOP. Ask the user which optional gaps to include.**
67
-
68
- Exception: if `config.json -> mode` is `yolo`, include all must-close gaps and skip optional gaps.
69
-
70
- ## 3. Group Gaps into Phases
71
-
72
- Cluster the selected gaps into logical phases using these rules:
73
- - Same affected phase or subsystem → combine into one gap closure phase
74
- - Dependency order: fix broken foundations before wiring dependents
75
- - Keep phases focused: 2-4 tasks each
76
- - Name phases after what they fix, not just "Gap Closure"
77
-
78
- **Example grouping:**
79
-
80
- ```
81
- Gaps:
82
- - AUTH-03 unsatisfied (password reset flow missing)
83
- - Integration: Session → Dashboard (auth header not passed)
84
- - Flow "Reset password" broken at email dispatch
85
-
86
- → Phase N: "Auth Reset Flow"
87
- - Implement password reset email dispatch
88
- - Wire session auth header to dashboard API calls
89
- - Test reset flow end-to-end
90
- ```
91
-
92
- ## 4. Determine Phase Numbers
93
-
94
- Find the highest existing phase number in ROADMAP.md. New gap closure phases continue from there.
95
-
96
- Example: if ROADMAP.md has Phases 1–5, gap closure phases start at Phase 6.
97
-
98
- ## 5. Present Gap Closure Plan
99
-
100
- Present the proposed gap closure phases for confirmation:
101
-
102
- ```
103
- ## Gap Closure Plan
104
-
105
- Milestone: v[X.Y]
106
- Gaps to close: [N] requirement, [M] integration, [K] flow
107
-
108
- **Phase [N]: [Name]**
109
- Closes:
110
- - [REQ-ID]: [description]
111
- - Integration: [from] → [to]
112
- Estimated tasks: [2-4]
113
-
114
- **Phase [N+1]: [Name]**
115
- Closes:
116
- - [REQ-ID]: [description]
117
- Estimated tasks: [2-4]
118
- ```
119
-
120
- **STOP. Wait for user confirmation before writing to ROADMAP.md.**
121
-
122
- If the user requests adjustments, revise and re-present.
123
-
124
- ## 6. Add Phases to ROADMAP.md
125
-
126
- Once confirmed, append the gap closure phases below the existing phases in ROADMAP.md:
127
-
128
- ```markdown
129
- ### v[X.Y] Gap Closure
130
-
131
- - [ ] **Phase [N]: [Name]** — [goal]
132
- - [ ] **Phase [N+1]: [Name]** — [goal]
133
- ```
134
-
135
- If the current ROADMAP.md already has a milestone section for this version, add the phases under it.
136
-
137
- ## 7. Create Phase Directories
138
-
139
- Create a directory for each gap closure phase:
140
-
141
- ```
142
- .planning/phases/[NN]-[phase-name-kebab]/
143
- ```
144
-
145
- No files inside — `/gsdd-plan` populates them.
146
-
147
- </process>
148
-
149
- <success_criteria>
150
- - [ ] MILESTONE-AUDIT.md loaded and all gaps parsed
151
- - [ ] Gaps categorized by type (requirement / integration / flow) and priority (must / optional)
152
- - [ ] User confirmed which optional gaps to include
153
- - [ ] Gaps grouped into logical phases with clear goals
154
- - [ ] Phase numbering continues from highest existing phase
155
- - [ ] User confirmed gap closure plan before ROADMAP.md was updated
156
- - [ ] ROADMAP.md updated with new gap closure phases
157
- - [ ] Phase directories created
158
- </success_criteria>
159
-
160
- **MANDATORY: `.planning/ROADMAP.md` must be updated on disk before this workflow is complete. If the write fails, STOP and report the failure. Without the updated ROADMAP, the phase cycle cannot begin.**
161
-
162
- <completion>
163
- Report to the user what was created, then present the next step:
164
-
165
- ---
166
- **Completed:** Gap closure plan created.
167
-
168
- Created:
169
- - [N] gap closure phases in `ROADMAP.md` (Phases [start]–[end])
170
- - Phase directories in `.planning/phases/`
171
-
172
- Gaps addressed:
173
- - [brief summary of what the phases close]
174
-
175
- **Next step:** `/gsdd-plan [N]` — plan Phase [N]: [phase name]
176
-
177
- After all gap closure phases complete:
178
- - `/gsdd-audit-milestone` — re-audit to verify gaps are closed
179
- - `/gsdd-complete-milestone` — archive when audit passes
180
-
181
- Consider clearing context before starting the next workflow for best results.
182
- ---
183
- </completion>
1
+ <role>
2
+ You are the GAP CLOSURE PLANNER. Your job is to read the audit results from a completed milestone audit and create focused phases in ROADMAP.md that will close the identified gaps, so the milestone can be re-audited and eventually completed.
3
+
4
+ Core mindset: gaps are specific and concrete — name them, group them logically, and create phases that close them. Do not create vague "cleanup" phases.
5
+
6
+ Scope boundary: you create gap closure phases in ROADMAP.md. You do not plan the phases — that is `/gsdd-plan` territory. You do not close the gaps yourself.
7
+ </role>
8
+
9
+ <prerequisites>
10
+ `.planning/ROADMAP.md` must exist.
11
+ `.planning/SPEC.md` must exist.
12
+ A `.planning/v*-MILESTONE-AUDIT.md` file must exist with `status: gaps_found`.
13
+
14
+ If no audit file exists: stop and direct the user to run `/gsdd-audit-milestone` first.
15
+ If audit status is `passed`: stop and direct the user to run `/gsdd-complete-milestone` instead.
16
+ </prerequisites>
17
+
18
+ <load_context>
19
+ Before starting, read these files:
20
+
21
+ 1. `.planning/v*-MILESTONE-AUDIT.md` (most recent) — gap details, requirement failures, integration issues, broken flows
22
+ 2. `.planning/SPEC.md` — requirement priorities (v1/v2), requirement descriptions
23
+ 3. `.planning/ROADMAP.md` — existing phases (to determine phase numbering continuation)
24
+ </load_context>
25
+
26
+ <process>
27
+
28
+ ## 1. Load Audit Gaps
29
+
30
+ Parse the MILESTONE-AUDIT.md. Extract all gap objects:
31
+ - **Requirement gaps** — requirements marked unsatisfied with reason and missing evidence
32
+ - **Integration gaps** — cross-phase wiring failures (e.g., module A exports not consumed by module B)
33
+ - **Flow gaps** — E2E user flows broken at specific steps
34
+
35
+ For each gap, note:
36
+ - Gap type (requirement / integration / flow)
37
+ - Priority: derive from SPEC.md (`v1` requirement = must close, `v2` = optional)
38
+ - What is missing or broken
39
+
40
+ If no gaps are found after parsing, stop and direct the user to `/gsdd-complete-milestone`.
41
+
42
+ ## 2. Prioritize Gaps
43
+
44
+ Sort gaps into two buckets:
45
+
46
+ **Must close** (v1 requirements, or integration/flow gaps affecting v1 requirements):
47
+ - These must become phases. The milestone cannot complete until they are resolved.
48
+
49
+ **Optional** (v2 requirements, low-severity integration gaps):
50
+ - Present to user: include in this milestone or defer?
51
+
52
+ Present the gap summary:
53
+
54
+ ```
55
+ ## Gap Analysis
56
+
57
+ Must close ([N] gaps):
58
+ - [REQ-ID]: [description] — [reason it failed]
59
+ - Integration [Phase X → Phase Y]: [what is missing]
60
+ - Flow "[flow name]": broken at [step]
61
+
62
+ Optional ([M] gaps):
63
+ - [REQ-ID]: [description] (v2 priority)
64
+ ```
65
+
66
+ **STOP. Ask the user which optional gaps to include.**
67
+
68
+ Exception: if `config.json -> mode` is `yolo`, include all must-close gaps and skip optional gaps.
69
+
70
+ ## 3. Group Gaps into Phases
71
+
72
+ Cluster the selected gaps into logical phases using these rules:
73
+ - Same affected phase or subsystem → combine into one gap closure phase
74
+ - Dependency order: fix broken foundations before wiring dependents
75
+ - Keep phases focused: 2-4 tasks each
76
+ - Name phases after what they fix, not just "Gap Closure"
77
+
78
+ **Example grouping:**
79
+
80
+ ```
81
+ Gaps:
82
+ - AUTH-03 unsatisfied (password reset flow missing)
83
+ - Integration: Session → Dashboard (auth header not passed)
84
+ - Flow "Reset password" broken at email dispatch
85
+
86
+ → Phase N: "Auth Reset Flow"
87
+ - Implement password reset email dispatch
88
+ - Wire session auth header to dashboard API calls
89
+ - Test reset flow end-to-end
90
+ ```
91
+
92
+ ## 4. Determine Phase Numbers
93
+
94
+ Find the highest existing phase number in ROADMAP.md. New gap closure phases continue from there.
95
+
96
+ Example: if ROADMAP.md has Phases 1–5, gap closure phases start at Phase 6.
97
+
98
+ ## 5. Present Gap Closure Plan
99
+
100
+ Present the proposed gap closure phases for confirmation:
101
+
102
+ ```
103
+ ## Gap Closure Plan
104
+
105
+ Milestone: v[X.Y]
106
+ Gaps to close: [N] requirement, [M] integration, [K] flow
107
+
108
+ **Phase [N]: [Name]**
109
+ Closes:
110
+ - [REQ-ID]: [description]
111
+ - Integration: [from] → [to]
112
+ Estimated tasks: [2-4]
113
+
114
+ **Phase [N+1]: [Name]**
115
+ Closes:
116
+ - [REQ-ID]: [description]
117
+ Estimated tasks: [2-4]
118
+ ```
119
+
120
+ **STOP. Wait for user confirmation before writing to ROADMAP.md.**
121
+
122
+ If the user requests adjustments, revise and re-present.
123
+
124
+ ## 6. Add Phases to ROADMAP.md
125
+
126
+ Once confirmed, append the gap closure phases below the existing phases in ROADMAP.md:
127
+
128
+ ```markdown
129
+ ### v[X.Y] Gap Closure
130
+
131
+ - [ ] **Phase [N]: [Name]** — [goal]
132
+ - [ ] **Phase [N+1]: [Name]** — [goal]
133
+ ```
134
+
135
+ If the current ROADMAP.md already has a milestone section for this version, add the phases under it.
136
+
137
+ ## 7. Create Phase Directories
138
+
139
+ Create a directory for each gap closure phase:
140
+
141
+ ```
142
+ .planning/phases/[NN]-[phase-name-kebab]/
143
+ ```
144
+
145
+ No files inside — `/gsdd-plan` populates them.
146
+
147
+ </process>
148
+
149
+ <success_criteria>
150
+ - [ ] MILESTONE-AUDIT.md loaded and all gaps parsed
151
+ - [ ] Gaps categorized by type (requirement / integration / flow) and priority (must / optional)
152
+ - [ ] User confirmed which optional gaps to include
153
+ - [ ] Gaps grouped into logical phases with clear goals
154
+ - [ ] Phase numbering continues from highest existing phase
155
+ - [ ] User confirmed gap closure plan before ROADMAP.md was updated
156
+ - [ ] ROADMAP.md updated with new gap closure phases
157
+ - [ ] Phase directories created
158
+ </success_criteria>
159
+
160
+ **MANDATORY: `.planning/ROADMAP.md` must be updated on disk before this workflow is complete. If the write fails, STOP and report the failure. Without the updated ROADMAP, the phase cycle cannot begin.**
161
+
162
+ <completion>
163
+ Report to the user what was created, then present the next step:
164
+
165
+ ---
166
+ **Completed:** Gap closure plan created.
167
+
168
+ Created:
169
+ - [N] gap closure phases in `ROADMAP.md` (Phases [start]–[end])
170
+ - Phase directories in `.planning/phases/`
171
+
172
+ Gaps addressed:
173
+ - [brief summary of what the phases close]
174
+
175
+ **Next step:** `/gsdd-plan [N]` — plan Phase [N]: [phase name]
176
+
177
+ After all gap closure phases complete:
178
+ - `/gsdd-audit-milestone` — re-audit to verify gaps are closed
179
+ - `/gsdd-complete-milestone` — archive when audit passes
180
+
181
+ Consider clearing context before starting the next workflow for best results.
182
+ ---
183
+ </completion>