gsdd-cli 0.2.0 → 0.3.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 +31 -13
- package/bin/adapters/claude.mjs +1 -1
- package/bin/adapters/opencode.mjs +1 -1
- package/bin/gsdd.mjs +44 -34
- package/bin/lib/init-flow.mjs +220 -0
- package/bin/lib/init-prompts.mjs +308 -0
- package/bin/lib/init-runtime.mjs +224 -0
- package/bin/lib/init.mjs +20 -383
- package/distilled/DESIGN.md +286 -0
- package/distilled/README.md +6 -2
- package/distilled/templates/agents.block.md +4 -2
- package/distilled/templates/delegates/plan-checker.md +5 -1
- package/distilled/workflows/audit-milestone.md +2 -0
- package/distilled/workflows/map-codebase.md +10 -5
- package/distilled/workflows/new-project.md +26 -21
- package/distilled/workflows/pause.md +2 -0
- package/distilled/workflows/plan.md +3 -2
- package/distilled/workflows/quick.md +163 -4
- package/package.json +3 -3
|
@@ -5,6 +5,16 @@ Quick tasks are for sub-hour work: bug fixes, small features, config changes, on
|
|
|
5
5
|
They reuse the same planner, executor, and verifier roles but skip research and synthesizer.
|
|
6
6
|
</role>
|
|
7
7
|
|
|
8
|
+
<anti_patterns>
|
|
9
|
+
- Do not execute before the user sees the plan preview (Step 3.7 must complete before Step 4)
|
|
10
|
+
- Do not proceed past file verification gates if the expected file does not exist on disk — a plan that exists only in conversation context will be lost on compaction
|
|
11
|
+
- Do not ask more than 2 approach clarification questions — if 3+ grey areas exist, recommend /gsdd:plan instead
|
|
12
|
+
- Do not create APPROACH.md for quick tasks — use inline $APPROACH_CONTEXT only
|
|
13
|
+
- Do not update ROADMAP.md or SPEC.md from quick tasks — these are phase-level artifacts
|
|
14
|
+
- Do not skip config.json reads — workflow toggles (discuss, planCheck, verifier) control flow
|
|
15
|
+
- Do not expand scope mid-execution — if the plan reveals architectural work, surface the scope signal (Step 3.6) and let the user decide
|
|
16
|
+
</anti_patterns>
|
|
17
|
+
|
|
8
18
|
<prerequisites>
|
|
9
19
|
`.planning/` must exist (from `gsdd init`). ROADMAP.md is NOT required -- quick tasks work during any project phase.
|
|
10
20
|
|
|
@@ -39,6 +49,44 @@ If `.planning/quick/` does not exist, create it along with an empty `LOG.md`:
|
|
|
39
49
|
|
|
40
50
|
---
|
|
41
51
|
|
|
52
|
+
## Step 2.5: Approach clarification (conditional)
|
|
53
|
+
|
|
54
|
+
Read `.planning/config.json`.
|
|
55
|
+
- If `workflow.discuss` is `false` (or key missing): set `$APPROACH_CONTEXT` to empty, skip to Step 3.
|
|
56
|
+
- If `workflow.discuss` is `true`: evaluate `$DESCRIPTION` for ambiguity signals.
|
|
57
|
+
|
|
58
|
+
### Ambiguity signals
|
|
59
|
+
|
|
60
|
+
| Signal | Detection | Example |
|
|
61
|
+
|--------|-----------|---------|
|
|
62
|
+
| Multiple valid approaches | Description could be solved via distinct patterns | "add caching" (Redis? in-memory? HTTP headers?) |
|
|
63
|
+
| Destructive operations | Contains: `delete`, `remove`, `migrate`, `rename`, `replace`, `rewrite`, `drop` | "remove the old auth middleware" |
|
|
64
|
+
| Vague scope | Contains: `improve`, `fix`, `update`, `refactor`, `clean up`, `optimize` without specifying target | "improve error handling" |
|
|
65
|
+
| Trade-off present | Description implies competing goals (performance vs simplicity, DRY vs explicit) | "make it faster" |
|
|
66
|
+
|
|
67
|
+
If **no signals fire**: set `$APPROACH_CONTEXT` to empty, skip to Step 3 silently.
|
|
68
|
+
|
|
69
|
+
If **any signal fires**: identify 1-2 grey areas and ask targeted questions.
|
|
70
|
+
|
|
71
|
+
### Question format
|
|
72
|
+
|
|
73
|
+
For each grey area, present 2-3 concrete options with a recommended default:
|
|
74
|
+
|
|
75
|
+
"I'd approach this with **{recommendation}** because {reason}. Want me to proceed, or do you prefer {alternative}?"
|
|
76
|
+
|
|
77
|
+
- If user says "go ahead" / "your call" / presses Enter → use the recommendation.
|
|
78
|
+
- If user specifies a preference → record it.
|
|
79
|
+
- Maximum 2 questions. If the task has 3+ grey areas, it's not a quick task.
|
|
80
|
+
|
|
81
|
+
### Output
|
|
82
|
+
|
|
83
|
+
Store confirmed decisions as `$APPROACH_CONTEXT` — a short string of user-validated choices.
|
|
84
|
+
Example: "User confirmed: use in-memory LRU cache, not Redis. Keep existing error format."
|
|
85
|
+
|
|
86
|
+
No APPROACH.md file is created. This is inline context only.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
42
90
|
## Step 3: Plan
|
|
43
91
|
|
|
44
92
|
Delegate to the planner role in quick mode.
|
|
@@ -49,10 +97,12 @@ Delegate to the planner role in quick mode.
|
|
|
49
97
|
|
|
50
98
|
**Context to provide:**
|
|
51
99
|
- Task description: `$DESCRIPTION`
|
|
100
|
+
- Approach context: `$APPROACH_CONTEXT` (user-confirmed decisions from Step 2.5 — treat as locked constraints, do not revisit)
|
|
52
101
|
- Mode: quick (single plan, 1-3 tasks, no research phase)
|
|
53
102
|
- Output path: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
|
|
54
103
|
|
|
55
104
|
**Constraints:**
|
|
105
|
+
- If `$APPROACH_CONTEXT` is non-empty, implement the user's confirmed choices — do not substitute alternatives
|
|
56
106
|
- Create a SINGLE plan with 1-3 focused tasks
|
|
57
107
|
- Quick tasks are atomic and self-contained
|
|
58
108
|
- No research phase, no ROADMAP requirements
|
|
@@ -66,13 +116,116 @@ Delegate to the planner role in quick mode.
|
|
|
66
116
|
</delegate>
|
|
67
117
|
|
|
68
118
|
After the planner returns:
|
|
69
|
-
|
|
70
|
-
|
|
119
|
+
|
|
120
|
+
**STOP. Verify that `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md` exists on disk before proceeding to execution. If the file does not exist, report the error to the user and do NOT proceed. A plan that exists only in conversation context will be lost.**
|
|
121
|
+
|
|
122
|
+
### Quick Plan Self-Check
|
|
123
|
+
|
|
124
|
+
Before proceeding to execution, verify the plan meets minimum quality:
|
|
125
|
+
- [ ] Plan has at least 1 task with `<action>` and `<verify>` sections
|
|
126
|
+
- [ ] Each task's `<verify>` has at least one runnable command
|
|
127
|
+
- [ ] Plan tasks do not exceed 3 (quick scope constraint)
|
|
128
|
+
|
|
129
|
+
This is a self-check, not an independent plan-check. Failures are noted but do NOT block execution — report `reduced_assurance` in the completion summary.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Step 3.5: Independent plan check (conditional)
|
|
134
|
+
|
|
135
|
+
Read `.planning/config.json`.
|
|
136
|
+
- If `workflow.planCheck` is `false` (or key missing): skip to Step 3.6.
|
|
137
|
+
- If `workflow.planCheck` is `true`: delegate to the plan-checker with quick-scoped dimensions.
|
|
138
|
+
|
|
139
|
+
<delegate>
|
|
140
|
+
**Identity:** Plan Checker (quick mode)
|
|
141
|
+
**Instruction:** Read `.planning/templates/delegates/plan-checker.md` for your role contract, then check this quick task plan.
|
|
142
|
+
|
|
143
|
+
**Context to provide:**
|
|
144
|
+
- Task description: `$DESCRIPTION` (treat as the phase goal equivalent)
|
|
145
|
+
- Plan: `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-PLAN.md`
|
|
146
|
+
- Mode: quick
|
|
147
|
+
|
|
148
|
+
**Constraints:**
|
|
149
|
+
- Check 5 dimensions only: `requirement_coverage`, `task_completeness`, `dependency_correctness`, `scope_sanity`, `must_have_quality`
|
|
150
|
+
- Skip: `key_link_completeness`, `context_compliance`, `goal_achievement`, `approach_alignment`
|
|
151
|
+
- Maximum 1 revision cycle (if blockers found, send back to planner once, then accept result)
|
|
152
|
+
- Blocker threshold: only block on `task_completeness` or `scope_sanity` violations
|
|
153
|
+
- Warnings for other dimensions are noted but do not block
|
|
154
|
+
|
|
155
|
+
**Output:** Checker response (passed | issues_found) with issue details.
|
|
156
|
+
**Return:** Status and issue summary.
|
|
157
|
+
</delegate>
|
|
158
|
+
|
|
159
|
+
If the checker returns `issues_found` with blockers and this is the first cycle:
|
|
160
|
+
1. Send the issue list back to the planner for targeted revision of the plan file.
|
|
161
|
+
2. Re-run the checker once more.
|
|
162
|
+
3. If blockers remain after 1 revision cycle, store `$CHECKER_ISSUES` for display in the plan preview. Do NOT block — the user decides in Step 3.7.
|
|
163
|
+
|
|
164
|
+
If the checker returns `passed`, or `workflow.planCheck` is false, `$CHECKER_ISSUES` is empty.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Step 3.6: Scope signal evaluation
|
|
169
|
+
|
|
170
|
+
Evaluate the plan against quick-scope boundaries. Read the plan file and check:
|
|
171
|
+
|
|
172
|
+
| Signal | Threshold | `$SCOPE_WARNING` text |
|
|
173
|
+
|--------|-----------|----------------------|
|
|
174
|
+
| Files modified | >8 distinct files in plan | "This task touches {N} files — consider `/gsdd:plan` for full ceremony." |
|
|
175
|
+
| Architecture keywords in `$DESCRIPTION` | contains: `refactor`, `migration`, `security`, `auth`, `API design`, `schema`, `database` | "This looks like architectural work — consider `/gsdd:plan` for approach exploration." |
|
|
176
|
+
| 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." |
|
|
177
|
+
|
|
178
|
+
If any signal fires, set `$SCOPE_WARNING` to the first matching advisory text. Multiple signals concatenate.
|
|
179
|
+
If no signals fire, `$SCOPE_WARNING` is empty.
|
|
180
|
+
|
|
181
|
+
This is advisory only — it does NOT block execution.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Step 3.7: Plan preview
|
|
186
|
+
|
|
187
|
+
Present the plan summary to the user before execution begins.
|
|
188
|
+
|
|
189
|
+
Read the plan file and extract:
|
|
190
|
+
- Task count and task names
|
|
191
|
+
- List of files to be modified/created (from plan task `<files>` sections)
|
|
192
|
+
- A 1-sentence approach summary (first sentence of the plan's objective or goal)
|
|
193
|
+
|
|
194
|
+
Display:
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
Quick Task Plan Preview:
|
|
198
|
+
- Tasks: {count} ({task_names})
|
|
199
|
+
- Files: {file_list}
|
|
200
|
+
- Approach: {1-sentence summary}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
If `$SCOPE_WARNING` is non-empty, append:
|
|
204
|
+
```
|
|
205
|
+
Scope signal: {$SCOPE_WARNING}
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
If `$CHECKER_ISSUES` is non-empty, append:
|
|
209
|
+
```
|
|
210
|
+
Plan check issues: {$CHECKER_ISSUES}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Present options (default-yes — pressing Enter proceeds):
|
|
214
|
+
- If `$SCOPE_WARNING` is empty: `[Enter to proceed / edit description / abort]`
|
|
215
|
+
- If `$SCOPE_WARNING` is non-empty: `[Enter to proceed / switch to /gsdd:plan / edit description / abort]`
|
|
216
|
+
|
|
217
|
+
Handle response:
|
|
218
|
+
- **Enter (or "yes"):** proceed to Step 4.
|
|
219
|
+
- **"edit description":** clean up the task directory, then return to Step 1 with `$DESCRIPTION` pre-filled as the starting point.
|
|
220
|
+
- **"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}"
|
|
221
|
+
- **"abort":** clean up the task directory, report cancellation, stop.
|
|
71
222
|
|
|
72
223
|
---
|
|
73
224
|
|
|
74
225
|
## Step 4: Execute
|
|
75
226
|
|
|
227
|
+
**Only reached after the user has seen the plan preview in Step 3.7.**
|
|
228
|
+
|
|
76
229
|
Delegate to the executor role.
|
|
77
230
|
|
|
78
231
|
<delegate>
|
|
@@ -96,8 +249,8 @@ Delegate to the executor role.
|
|
|
96
249
|
</delegate>
|
|
97
250
|
|
|
98
251
|
After the executor returns:
|
|
99
|
-
|
|
100
|
-
|
|
252
|
+
|
|
253
|
+
**STOP. Verify the SUMMARY file exists at `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-SUMMARY.md` on disk. If it does not exist, report the write failure. Do NOT proceed to verification or LOG.md update without a persisted summary.**
|
|
101
254
|
|
|
102
255
|
---
|
|
103
256
|
|
|
@@ -125,6 +278,8 @@ Read `.planning/config.json`.
|
|
|
125
278
|
**Return:** Verification status (passed | gaps_found | human_needed).
|
|
126
279
|
</delegate>
|
|
127
280
|
|
|
281
|
+
**STOP. Verify the VERIFICATION file exists at `.planning/quick/$NEXT_NUM-$SLUG/$NEXT_NUM-VERIFICATION.md` on disk (when verifier ran). If it does not exist, report the write failure. Do NOT proceed to LOG.md update without a persisted verification report.**
|
|
282
|
+
|
|
128
283
|
---
|
|
129
284
|
|
|
130
285
|
## Step 6: Update LOG.md
|
|
@@ -154,9 +309,13 @@ Report to the user:
|
|
|
154
309
|
|
|
155
310
|
<success_criteria>
|
|
156
311
|
- [ ] User provided a task description
|
|
312
|
+
- [ ] Approach clarification ran (only if workflow.discuss is true AND ambiguity detected)
|
|
157
313
|
- [ ] `.planning/quick/` directory exists (created if needed)
|
|
158
314
|
- [ ] Task directory created at `.planning/quick/NNN-slug/`
|
|
159
315
|
- [ ] `NNN-PLAN.md` created by planner (1-3 tasks)
|
|
316
|
+
- [ ] Independent plan check ran (only if workflow.planCheck is true)
|
|
317
|
+
- [ ] Plan preview presented to user before execution
|
|
318
|
+
- [ ] User confirmed (or pressed Enter) before execution proceeded
|
|
160
319
|
- [ ] `NNN-SUMMARY.md` created by executor
|
|
161
320
|
- [ ] `NNN-VERIFICATION.md` created by verifier (only if workflow.verifier is true)
|
|
162
321
|
- [ ] `LOG.md` updated with task row
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gsdd-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "GSDD — a portable, spec-driven development kernel for AI coding agents. Works with Claude Code, Codex CLI, OpenCode, Cursor, Copilot, and Gemini CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"gsdd": "
|
|
7
|
+
"gsdd": "bin/gsdd.mjs"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"test:gsdd": "node tests/gsdd.init.test.cjs && node tests/gsdd.models.test.cjs && node tests/gsdd.manifest.test.cjs && node tests/gsdd.plan.adapters.test.cjs && node tests/gsdd.audit-milestone.test.cjs && node tests/gsdd.invariants.test.cjs && node tests/gsdd.guards.test.cjs && node tests/gsdd.health.test.cjs && node tests/gsdd.scenarios.test.cjs"
|
|
@@ -48,6 +48,6 @@
|
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"repository": {
|
|
50
50
|
"type": "git",
|
|
51
|
-
"url": "https://github.com/PatrickSys/get-shit-done-distilled"
|
|
51
|
+
"url": "git+https://github.com/PatrickSys/get-shit-done-distilled.git"
|
|
52
52
|
}
|
|
53
53
|
}
|