gsdd-cli 0.1.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 +38 -20
- package/agents/DISTILLATION.md +116 -3
- package/agents/README.md +9 -0
- package/agents/approach-explorer.md +361 -0
- package/agents/planner.md +20 -5
- package/bin/adapters/claude.mjs +41 -11
- package/bin/adapters/codex.mjs +20 -1
- package/bin/adapters/opencode.mjs +37 -11
- 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 -379
- package/bin/lib/models.mjs +27 -10
- package/distilled/DESIGN.md +366 -7
- package/distilled/README.md +173 -169
- package/distilled/templates/agents.block.md +5 -3
- package/distilled/templates/approach.md +232 -0
- package/distilled/templates/delegates/approach-explorer.md +25 -0
- package/distilled/templates/delegates/plan-checker.md +11 -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 +83 -12
- package/distilled/workflows/quick.md +163 -4
- package/package.json +11 -3
|
@@ -5,6 +5,7 @@ You are the fresh-context plan checker for `/gsdd:plan`.
|
|
|
5
5
|
Read only the explicit inputs provided by the orchestrator:
|
|
6
6
|
- target phase goal and requirement IDs
|
|
7
7
|
- relevant locked decisions or deferred items from `.planning/SPEC.md`
|
|
8
|
+
- approach decisions from `.planning/phases/*-APPROACH.md` (if provided)
|
|
8
9
|
- any relevant phase research file
|
|
9
10
|
- the produced `.planning/phases/*-PLAN.md` file(s)
|
|
10
11
|
|
|
@@ -21,6 +22,15 @@ Verify these dimensions:
|
|
|
21
22
|
- `scope_sanity`: plans are sized so an executor can complete them without context collapse
|
|
22
23
|
- `must_have_quality`: success criteria and must-haves are specific, observable, and reflected in tasks
|
|
23
24
|
- `context_compliance`: locked decisions are honored and deferred ideas stay out of scope
|
|
25
|
+
- `goal_achievement`: does the plan, if executed perfectly, actually achieve the stated phase goal? Check:
|
|
26
|
+
- **Goal addressed?** Compare the phase goal statement to the plan's collective task outputs. Would successful completion of all tasks deliver the goal? If the goal says "users can authenticate" but tasks only set up database schema → `blocker`.
|
|
27
|
+
- **Success criteria reachable?** Are the phase success criteria from ROADMAP.md achievable through the planned tasks? Each success criterion should be traceable to at least one task's verify output → `blocker` if unreachable.
|
|
28
|
+
- **Outcome observable?** After execution, could a human or automated check confirm the goal was met? Plans that produce only internal artifacts with no user-visible or testable outcome → `warning`.
|
|
29
|
+
- `approach_alignment`: when APPROACH.md is provided, verify that plan tasks implement the chosen approaches from the user's decisions. Check:
|
|
30
|
+
- **Chosen honored?** Does each plan task align with the approach chosen in APPROACH.md for its gray area? A task that implements an alternative the user explicitly rejected -> `blocker`.
|
|
31
|
+
- **Discretion respected?** "Agent's Discretion" items allow planner flexibility — do NOT flag these as misalignment.
|
|
32
|
+
- **Deferred excluded?** Deferred ideas from APPROACH.md must not appear in plan tasks -> `blocker` if found.
|
|
33
|
+
- If no APPROACH.md was provided, skip this dimension entirely.
|
|
24
34
|
|
|
25
35
|
Return JSON only as a single object with this shape:
|
|
26
36
|
|
|
@@ -30,7 +40,7 @@ Return JSON only as a single object with this shape:
|
|
|
30
40
|
"summary": "One sentence overall assessment",
|
|
31
41
|
"issues": [
|
|
32
42
|
{
|
|
33
|
-
"dimension": "requirement_coverage",
|
|
43
|
+
"dimension": "requirement_coverage | task_completeness | dependency_correctness | key_link_completeness | scope_sanity | must_have_quality | context_compliance | goal_achievement | approach_alignment",
|
|
34
44
|
"severity": "blocker",
|
|
35
45
|
"description": "What is wrong",
|
|
36
46
|
"plan": "01-PLAN",
|
|
@@ -160,6 +160,8 @@ Plus full markdown report body with tables for requirements, phases, integration
|
|
|
160
160
|
- `gaps_found` - critical blockers exist (unsatisfied requirements, unprotected sensitive flows, broken flows, or missing verifications)
|
|
161
161
|
- `tech_debt` - no blockers but accumulated deferred items need review
|
|
162
162
|
|
|
163
|
+
**MANDATORY: The milestone audit report must exist at `.planning/v{version}-MILESTONE-AUDIT.md` on disk before presenting results. If the file was not written, STOP and report the write failure. Do NOT present audit results from conversation context alone — this is the highest-cost artifact to regenerate.**
|
|
164
|
+
|
|
163
165
|
## 7. Present Results
|
|
164
166
|
|
|
165
167
|
Route by audit status:
|
|
@@ -160,13 +160,18 @@ These 4 documents are consumed by downstream GSDD workflows:
|
|
|
160
160
|
|
|
161
161
|
After all mappers complete, verify:
|
|
162
162
|
|
|
163
|
-
- [ ] All 4 documents exist in `.planning/codebase/`
|
|
164
|
-
- [ ] No document is empty or trivially short
|
|
165
|
-
- [ ] Each document contains actual file path references (
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
- [ ] All 4 documents exist in `.planning/codebase/` (L1: exists)
|
|
164
|
+
- [ ] No document is empty or trivially short — each must exceed 20 non-empty lines (L2: substantive)
|
|
165
|
+
- [ ] Each document contains actual file path references in backtick format — not generic advice (L2: specificity)
|
|
166
|
+
- [ ] STACK.md names at least 2 concrete technologies with version information (L2: specificity)
|
|
167
|
+
- [ ] ARCHITECTURE.md references at least 1 specific directory or module path (L2: specificity)
|
|
168
|
+
- [ ] No document is a carbon copy of another — each covers a distinct dimension (L2: non-duplicate)
|
|
169
|
+
|
|
170
|
+
If any check fails, note the specific failure and inform the user which documents need re-mapping or manual completion.
|
|
168
171
|
</validation>
|
|
169
172
|
|
|
173
|
+
**MANDATORY: All 4 codebase documents must exist on disk before proceeding to security scan or commit. If any document is missing, STOP and report which mapper(s) failed. Do NOT proceed to `<secrets_scan>` with incomplete output.**
|
|
174
|
+
|
|
170
175
|
<secrets_scan>
|
|
171
176
|
### 5. Security Scan (Mandatory Before Commit)
|
|
172
177
|
|
|
@@ -282,26 +282,9 @@ Display key findings before moving to spec creation.
|
|
|
282
282
|
**STOP. Research is complete. Do NOT write any application code. Proceed to spec creation below. Your job now is to produce SPEC.md and ROADMAP.md — not to build the project.**
|
|
283
283
|
|
|
284
284
|
<data_schema_definition>
|
|
285
|
-
|
|
286
|
-
Multi-agent systems require Typed Schemas to pass reliable state. Natural language instructions fail across agent handoffs.
|
|
287
|
-
Before writing the final SPEC.md, explicitly define the core Data Models/Typed Schemas the project will use (e.g., `type UserProfile = { id: number; plan: 'free' | 'pro' }`).
|
|
288
|
-
These strict schemas MUST be included in the `SPEC.md` to prevent agent hallucination during the implementation phases.
|
|
289
|
-
6. **Typed Data Schemas**: Add the strict data models defined earlier.
|
|
290
|
-
7. **Done-When Verification Chain (SOTA Insight from Cyanluna)**: For EVERY single requirement in the "Must Have (v1)" section, you MUST define a clear, verifiable `[Done-When: ...]` criteria. Vague requirements like "User can log in" must become "User can log in [Done-When: Login form submits, JWT is received, and User is redirected to Dashboard]". No exceptions.
|
|
291
|
-
|
|
292
|
-
*DO NOT include implementation tasks here. SPEC.md defines WHAT, not HOW.*
|
|
285
|
+
Before writing SPEC.md, define core Data Models/Typed Schemas *(SOTA: GitHub Blog — "Multi-agent workflows often fail")*. Multi-agent systems require typed schemas to pass reliable state. These schemas MUST be included in SPEC.md (see item 7 in `<spec_creation>` below). Also define Done-When verification criteria for every requirement (see item 8). *SPEC.md defines WHAT, not HOW — do not include implementation tasks.*
|
|
293
286
|
</data_schema_definition>
|
|
294
287
|
|
|
295
|
-
<capability_gates>
|
|
296
|
-
**(SOTA Insight: Derived from OpenFang - "16 Security Systems & Capability Gates")**
|
|
297
|
-
Before finishing SPEC.md, explicitly define what the agents are NOT allowed to do automatically without human approval.
|
|
298
|
-
If `autoAdvance: true`, skip this question. Add a deferred placeholder to SPEC.md:
|
|
299
|
-
"## Capability & Security Gates\n_Deferred — auto mode cannot elicit gate preferences; requires explicit review before production deployment._"
|
|
300
|
-
Otherwise:
|
|
301
|
-
Ask the user: "Are there any destructive actions, purchases, or external API calls that should require mandatory human approval (Capability Gates)?"
|
|
302
|
-
Add these into the new `## Capability & Security Gates` section of the SPEC.md.
|
|
303
|
-
</capability_gates>
|
|
304
|
-
|
|
305
288
|
<spec_creation>
|
|
306
289
|
After the subagent research completes, synthesize EVERYTHING into `SPEC.md`:
|
|
307
290
|
|
|
@@ -311,9 +294,21 @@ After the subagent research completes, synthesize EVERYTHING into `SPEC.md`:
|
|
|
311
294
|
4. **Requirements are ordered** by priority within each category
|
|
312
295
|
5. **Out of Scope is populated** — includes things the developer explicitly said "not now" AND anti-features found in Research.
|
|
313
296
|
6. **Key Decisions are logged** — any choices made during questioning or dictated by the SOTA research.
|
|
314
|
-
7. **
|
|
315
|
-
8. **
|
|
316
|
-
9. **
|
|
297
|
+
7. **Typed Data Schemas** *(SOTA: GitHub Blog — "Multi-agent workflows often fail")*: explicitly define the core Data Models/Typed Schemas the project will use (e.g., `type UserProfile = { id: number; plan: 'free' | 'pro' }`). Multi-agent systems require typed schemas to pass reliable state; natural language instructions fail across agent handoffs. *SPEC.md defines WHAT, not HOW — do not include implementation tasks.*
|
|
298
|
+
8. **Done-When Verification Chain** *(SOTA: Cyanluna)*: For EVERY requirement in the "Must Have (v1)" section, define a clear, verifiable `[Done-When: ...]` criterion. "User can log in" must become "User can log in [Done-When: Login form submits, JWT is received, and User is redirected to Dashboard]". No exceptions.
|
|
299
|
+
9. **Capability & Security Gates**: Handle per the `<capability_gates>` section below.
|
|
300
|
+
10. **Authorization Matrix (optional)**: For projects with multiple user roles or protected resources, create `.planning/AUTH_MATRIX.md` using the template at `.planning/templates/auth-matrix.md`. The integration checker will use this matrix for systematic auth verification during milestone audits.
|
|
301
|
+
11. **Current State is set** to Phase 1, Status: Not started.
|
|
302
|
+
|
|
303
|
+
<capability_gates>
|
|
304
|
+
**(SOTA Insight: Derived from OpenFang - "16 Security Systems & Capability Gates")**
|
|
305
|
+
Before finishing SPEC.md, explicitly define what the agents are NOT allowed to do automatically without human approval.
|
|
306
|
+
If `autoAdvance: true`, skip this question. Add a deferred placeholder to SPEC.md:
|
|
307
|
+
"## Capability & Security Gates\n_Deferred — auto mode cannot elicit gate preferences; requires explicit review before production deployment._"
|
|
308
|
+
Otherwise:
|
|
309
|
+
Ask the user: "Are there any destructive actions, purchases, or external API calls that should require mandatory human approval (Capability Gates)?"
|
|
310
|
+
Add these into the `## Capability & Security Gates` section of the SPEC.md.
|
|
311
|
+
</capability_gates>
|
|
317
312
|
|
|
318
313
|
### Quality Check Before Presenting
|
|
319
314
|
- [ ] Can I explain the core value in one sentence?
|
|
@@ -331,6 +326,8 @@ Do NOT proceed to roadmap creation until the developer explicitly approves.
|
|
|
331
326
|
**Commit**: `docs: initialize project spec`
|
|
332
327
|
</spec_creation>
|
|
333
328
|
|
|
329
|
+
**STOP. Spec creation is complete. Verify that `.planning/SPEC.md` exists on disk with the approved content before creating the roadmap. Do NOT create ROADMAP.md from memory — read the persisted SPEC.md as input.**
|
|
330
|
+
|
|
334
331
|
<roadmap_creation>
|
|
335
332
|
After `SPEC.md` is approved, you must create `ROADMAP.md`.
|
|
336
333
|
Since you are an Orchestrator with fresh context, you DO NOT need to spawn a subagent for this—write it yourself directly, retaining full thoroughness.
|
|
@@ -382,6 +379,14 @@ Do NOT proceed to planning until the developer explicitly approves.
|
|
|
382
379
|
**Commit**: `docs: create project roadmap`
|
|
383
380
|
</roadmap_creation>
|
|
384
381
|
|
|
382
|
+
<persistence>
|
|
383
|
+
MANDATORY: Both `.planning/SPEC.md` and `.planning/ROADMAP.md` must exist on disk before reporting completion.
|
|
384
|
+
|
|
385
|
+
If either file was not written (permissions issue, path problem), STOP and report the blocker to the user. Do NOT report success without persisted artifacts.
|
|
386
|
+
|
|
387
|
+
These files are consumed by every downstream workflow. Artifacts that exist only in chat context will be lost on context compression, leaving the project in an unrecoverable state.
|
|
388
|
+
</persistence>
|
|
389
|
+
|
|
385
390
|
<success_criteria>
|
|
386
391
|
Init is DONE when ALL of these are true:
|
|
387
392
|
|
|
@@ -80,6 +80,8 @@ timestamp: $ISO_8601_TIMESTAMP
|
|
|
80
80
|
The checkpoint is project-scoped (lives at `.planning/.continue-here.md`, not inside a phase directory) so resume always knows where to look.
|
|
81
81
|
</write_checkpoint>
|
|
82
82
|
|
|
83
|
+
**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.**
|
|
84
|
+
|
|
83
85
|
<advisory_git>
|
|
84
86
|
Read `.planning/config.json` for the `gitProtocol` section. If config.json cannot be read, skip git advice.
|
|
85
87
|
|
|
@@ -10,8 +10,9 @@ Before starting, read these files:
|
|
|
10
10
|
1. `.planning/SPEC.md` - requirements, constraints, key decisions, current state
|
|
11
11
|
2. `.planning/ROADMAP.md` - find the target phase, its goal, requirements, and success criteria
|
|
12
12
|
3. `.planning/research/*.md` - if research exists and is relevant to this phase
|
|
13
|
-
4. `.planning/phases/*-
|
|
14
|
-
5.
|
|
13
|
+
4. `.planning/phases/*-APPROACH.md` - approach decisions from user discussion (if exists)
|
|
14
|
+
5. `.planning/phases/*-PLAN.md` - any previous plans that affect this phase
|
|
15
|
+
6. Relevant source code - if this phase builds on existing code, read the key files
|
|
15
16
|
|
|
16
17
|
Identify the target phase: the first phase with status `[ ]` or `[-]` in `ROADMAP.md`.
|
|
17
18
|
</load_context>
|
|
@@ -20,8 +21,9 @@ Identify the target phase: the first phase with status `[ ]` or `[-]` in `ROADMA
|
|
|
20
21
|
Before planning, acknowledge what is locked:
|
|
21
22
|
|
|
22
23
|
- Decisions in `.planning/SPEC.md` "Key Decisions" - do not revisit them.
|
|
24
|
+
- Decisions in APPROACH.md "Implementation Decisions" - these are user-validated choices. Implement the chosen approaches, not alternatives. "Agent's Discretion" items give you flexibility.
|
|
23
25
|
- Patterns from previous phases - match existing conventions. Do not introduce new patterns without cause.
|
|
24
|
-
- Deferred items - items marked v2, nice-to-have, or out of scope. Do not plan for them.
|
|
26
|
+
- Deferred items - items marked v2, nice-to-have, or out of scope in SPEC.md or APPROACH.md. Do not plan for them.
|
|
25
27
|
|
|
26
28
|
If you need to challenge a locked decision: stop, ask the developer, and document the new decision explicitly.
|
|
27
29
|
</context_fidelity>
|
|
@@ -250,15 +252,79 @@ must_haves:
|
|
|
250
252
|
```
|
|
251
253
|
</plan_structure>
|
|
252
254
|
|
|
253
|
-
<
|
|
254
|
-
|
|
255
|
+
<approach_exploration>
|
|
256
|
+
### When This Runs
|
|
255
257
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
258
|
+
Check `.planning/config.json` for `workflow.discuss`:
|
|
259
|
+
- If `workflow.discuss: false` (or key missing): skip this section, go to `<goal_backward_planning>`. Note `reduced_alignment` in the orchestration summary.
|
|
260
|
+
- If `workflow.discuss: true`: mandatory before planning.
|
|
259
261
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
+
### Check for Existing APPROACH.md
|
|
263
|
+
|
|
264
|
+
Check if `{phase_dir}/{padded_phase}-APPROACH.md` exists.
|
|
265
|
+
|
|
266
|
+
**If exists:**
|
|
267
|
+
Offer the user a choice:
|
|
268
|
+
- "Use existing" — load decisions from APPROACH.md, skip to `<goal_backward_planning>`
|
|
269
|
+
- "Update it" — run the approach explorer to revise decisions
|
|
270
|
+
- "View it" — display APPROACH.md contents, then offer "Use existing" / "Update"
|
|
271
|
+
|
|
272
|
+
**If does not exist (or user chose "Update"):**
|
|
273
|
+
Run the approach explorer.
|
|
274
|
+
|
|
275
|
+
### Running the Approach Explorer
|
|
276
|
+
|
|
277
|
+
**Primary path — inline conversation with research subagents:**
|
|
278
|
+
|
|
279
|
+
The conversation with the user runs inline in the main context. For each technical gray area, a read-only research subagent is spawned to isolate heavy codebase and documentation reads, returning only compressed summaries.
|
|
280
|
+
|
|
281
|
+
1. Load context: read ONLY locked decisions from `.planning/SPEC.md` and the target phase goal/requirements from `.planning/ROADMAP.md`.
|
|
282
|
+
|
|
283
|
+
2. Identify 3-4 domain-specific gray areas. Classify each as **taste** (preference, no research needed), **technical** (trade-offs, research first), or **hybrid** (both).
|
|
284
|
+
|
|
285
|
+
3. For each **technical or hybrid** gray area, spawn a read-only research subagent.
|
|
286
|
+
Use the prompt template from `.planning/templates/roles/approach-explorer.md` (`<research_subagent_prompt>` section), substituting the gray area name, classification, phase context, and relevant codebase files. Each subagent returns a structured summary under 1000 tokens.
|
|
287
|
+
|
|
288
|
+
4. Present each gray area to the user individually:
|
|
289
|
+
- For taste areas: ask directly
|
|
290
|
+
- For technical/hybrid: present the research summary, lead with recommendation
|
|
291
|
+
- Ask: "Discuss this, or should I use my judgment?"
|
|
292
|
+
|
|
293
|
+
5. For each area the user chose to discuss, ask adaptive questions until the decision converges. Persist each confirmed decision to disk incrementally.
|
|
294
|
+
|
|
295
|
+
6. Surface assumptions across 5 dimensions with confidence levels. Wait for corrections.
|
|
296
|
+
|
|
297
|
+
7. Self-check: verify every decision is concrete enough for the planner before writing.
|
|
298
|
+
|
|
299
|
+
8. Write `{padded_phase}-APPROACH.md` to the phase directory.
|
|
300
|
+
|
|
301
|
+
**Native agent optimization:**
|
|
302
|
+
|
|
303
|
+
If your runtime provides an interactive `gsdd-approach-explorer` agent:
|
|
304
|
+
- Invoke it with: target phase goal, requirement IDs, locked decisions, phase research (if exists), relevant codebase files
|
|
305
|
+
- The native agent runs the full exploration in its own context window
|
|
306
|
+
- This is an optimization — the output (APPROACH.md) is identical to the primary path
|
|
307
|
+
|
|
308
|
+
**Inline fallback (reduced alignment):**
|
|
309
|
+
|
|
310
|
+
If neither the primary path nor native agent is available (e.g., the runtime cannot spawn research subagents):
|
|
311
|
+
- Read the phase goal and identify 2-3 obvious gray areas
|
|
312
|
+
- Present them to the user with your best assessment
|
|
313
|
+
- Capture any decisions the user provides
|
|
314
|
+
- Explicitly report `reduced_alignment` — the user did not get full research-backed exploration
|
|
315
|
+
|
|
316
|
+
### Using APPROACH.md Decisions
|
|
317
|
+
|
|
318
|
+
After approach exploration completes (or existing APPROACH.md is loaded):
|
|
319
|
+
- Treat decisions from APPROACH.md as locked constraints, same priority as `.planning/SPEC.md` decisions
|
|
320
|
+
- "Agent's Discretion" items from APPROACH.md give the planner flexibility — do not treat them as locked
|
|
321
|
+
- Thread the APPROACH.md file path to both the planner prompt and the plan-checker prompt
|
|
322
|
+
- Deferred ideas from APPROACH.md must not appear in the plan
|
|
323
|
+
|
|
324
|
+
### Role Contract
|
|
325
|
+
|
|
326
|
+
The approach explorer's full role contract is at `.planning/templates/roles/approach-explorer.md`. The portable workflow describes the orchestration; the role contract describes the agent's behavior.
|
|
327
|
+
</approach_exploration>
|
|
262
328
|
|
|
263
329
|
<plan_check_orchestration>
|
|
264
330
|
### How Plan Checking Works
|
|
@@ -274,6 +340,8 @@ After the planner produces a draft plan, an independent checker reviews it in fr
|
|
|
274
340
|
5. `scope_sanity` - plans are sized so an executor can complete them without context collapse
|
|
275
341
|
6. `must_have_quality` - success criteria are specific, observable, and reflected in tasks
|
|
276
342
|
7. `context_compliance` - locked decisions are honored and deferred ideas stay out of scope
|
|
343
|
+
8. `goal_achievement` - the plan, if executed perfectly, actually achieves the stated phase goal: goal addressed (tasks deliver the goal), success criteria reachable (each criterion traceable to a task verify output), and outcome observable (a human or automated check can confirm the goal was met)
|
|
344
|
+
9. `approach_alignment` - when APPROACH.md exists, plans implement the chosen approaches, not alternatives. Blocker if plan contradicts an explicit user choice. Warning if plan drifts from recommendation without justification. Skipped when no APPROACH.md is provided.
|
|
277
345
|
|
|
278
346
|
### Invoking the Checker
|
|
279
347
|
|
|
@@ -282,6 +350,7 @@ After the planner produces a draft plan, an independent checker reviews it in fr
|
|
|
282
350
|
3. If a native checker agent is available, invoke it in a fresh context with only these explicit inputs:
|
|
283
351
|
- target phase goal and requirement IDs
|
|
284
352
|
- relevant locked decisions / deferred items from `.planning/SPEC.md`
|
|
353
|
+
- approach decisions from `.planning/phases/*-APPROACH.md` (if exists)
|
|
285
354
|
- relevant phase research file(s)
|
|
286
355
|
- produced `.planning/phases/*-PLAN.md` file(s)
|
|
287
356
|
4. Require the checker to return a single JSON object:
|
|
@@ -291,7 +360,7 @@ After the planner produces a draft plan, an independent checker reviews it in fr
|
|
|
291
360
|
"summary": "One sentence overall assessment",
|
|
292
361
|
"issues": [
|
|
293
362
|
{
|
|
294
|
-
"dimension": "requirement_coverage | task_completeness | dependency_correctness | key_link_completeness | scope_sanity | must_have_quality | context_compliance",
|
|
363
|
+
"dimension": "requirement_coverage | task_completeness | dependency_correctness | key_link_completeness | scope_sanity | must_have_quality | context_compliance | goal_achievement | approach_alignment",
|
|
295
364
|
"severity": "blocker | warning",
|
|
296
365
|
"description": "What is wrong",
|
|
297
366
|
"plan": "01-PLAN",
|
|
@@ -354,6 +423,8 @@ For each task:
|
|
|
354
423
|
Planning is done when all of these are true:
|
|
355
424
|
|
|
356
425
|
- [ ] Target phase identified from `ROADMAP.md`
|
|
426
|
+
- [ ] Approach exploration completed or explicitly skipped with `reduced_alignment` reported
|
|
427
|
+
- [ ] When `workflow.discuss: true`: user alignment confirmed via APPROACH.md before planning
|
|
357
428
|
- [ ] Research check completed where needed
|
|
358
429
|
- [ ] Plan self-check passed
|
|
359
430
|
- [ ] Success criteria from `ROADMAP.md` are represented as must-haves
|
|
@@ -362,7 +433,7 @@ Planning is done when all of these are true:
|
|
|
362
433
|
- [ ] Every task has XML structure with `id`, `type`, `files`, `action`, `verify`, and `done`
|
|
363
434
|
- [ ] Every task has at least one runnable verify command
|
|
364
435
|
- [ ] Plan sizing stays within 2-5 tasks, preferring 2-3
|
|
365
|
-
- [ ] Locked decisions from `.planning/SPEC.md` are honored
|
|
436
|
+
- [ ] Locked decisions from `.planning/SPEC.md` and APPROACH.md are honored
|
|
366
437
|
- [ ] Any git guidance stays repo-native and follows `.planning/config.json`
|
|
367
438
|
</success_criteria>
|
|
368
439
|
|
|
@@ -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,14 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gsdd-cli",
|
|
3
|
-
"version": "0.1
|
|
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"
|
|
11
11
|
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"semantic-release": "^24.2.3",
|
|
14
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
15
|
+
"@semantic-release/git": "^10.0.1"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18"
|
|
19
|
+
},
|
|
12
20
|
"files": [
|
|
13
21
|
"bin/adapters/",
|
|
14
22
|
"bin/lib/",
|
|
@@ -40,6 +48,6 @@
|
|
|
40
48
|
"license": "MIT",
|
|
41
49
|
"repository": {
|
|
42
50
|
"type": "git",
|
|
43
|
-
"url": "https://github.com/PatrickSys/get-shit-done-distilled"
|
|
51
|
+
"url": "git+https://github.com/PatrickSys/get-shit-done-distilled.git"
|
|
44
52
|
}
|
|
45
53
|
}
|