opencode-goopspec 0.1.3 → 0.1.4

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 (53) hide show
  1. package/README.md +253 -331
  2. package/agents/goop-debugger.md +175 -172
  3. package/agents/goop-designer.md +232 -160
  4. package/agents/goop-executor.md +197 -127
  5. package/agents/goop-explorer.md +148 -150
  6. package/agents/goop-librarian.md +218 -164
  7. package/agents/goop-orchestrator.md +364 -338
  8. package/agents/goop-planner.md +331 -153
  9. package/agents/goop-researcher.md +198 -126
  10. package/agents/goop-tester.md +277 -202
  11. package/agents/goop-verifier.md +191 -201
  12. package/agents/goop-writer.md +241 -133
  13. package/agents/memory-distiller.md +228 -136
  14. package/commands/goop-accept.md +430 -36
  15. package/commands/goop-amend.md +13 -0
  16. package/commands/goop-complete.md +13 -0
  17. package/commands/goop-debug.md +13 -0
  18. package/commands/goop-discuss.md +419 -7
  19. package/commands/goop-execute.md +386 -37
  20. package/commands/goop-help.md +11 -0
  21. package/commands/goop-map-codebase.md +13 -0
  22. package/commands/goop-memory.md +11 -0
  23. package/commands/goop-milestone.md +13 -0
  24. package/commands/goop-pause.md +12 -0
  25. package/commands/goop-plan.md +320 -266
  26. package/commands/goop-quick.md +12 -0
  27. package/commands/goop-recall.md +11 -0
  28. package/commands/goop-remember.md +12 -0
  29. package/commands/goop-research.md +13 -0
  30. package/commands/goop-resume.md +12 -0
  31. package/commands/goop-setup.md +18 -8
  32. package/commands/goop-specify.md +315 -39
  33. package/commands/goop-status.md +276 -28
  34. package/dist/index.js +328 -15
  35. package/package.json +1 -1
  36. package/references/context-injection.md +307 -0
  37. package/references/discovery-interview.md +278 -0
  38. package/references/enforcement-system.md +213 -0
  39. package/references/handoff-protocol.md +290 -0
  40. package/references/model-profiles.md +1 -1
  41. package/references/phase-gates.md +360 -0
  42. package/references/plugin-architecture.md +212 -0
  43. package/references/response-format.md +41 -9
  44. package/references/subagent-protocol.md +83 -33
  45. package/references/visual-style.md +199 -0
  46. package/references/xml-response-schema.md +236 -0
  47. package/templates/blueprint.md +88 -41
  48. package/templates/chronicle.md +130 -16
  49. package/templates/handoff.md +140 -0
  50. package/templates/project.md +114 -0
  51. package/templates/requirements.md +121 -0
  52. package/templates/spec.md +85 -20
  53. package/templates/state.md +103 -0
@@ -1,184 +1,185 @@
1
1
  ---
2
2
  name: goop-plan
3
- description: Start the Planning Phase
3
+ description: Create specification and blueprint from discovery interview
4
4
  phase: plan
5
- next-step: "When planning is complete and requirements are clear, lock the specification"
5
+ requires: interview_complete
6
+ next-step: "When planning is complete, lock the specification"
6
7
  next-command: /goop-specify
7
8
  alternatives:
9
+ - command: /goop-discuss
10
+ when: "If discovery interview was not completed"
8
11
  - command: /goop-research
9
- when: "If there are unknowns or technology questions to investigate"
12
+ when: "If there are unknowns to investigate"
10
13
  - command: /goop-pause
11
14
  when: "To save progress and continue later"
12
15
  ---
13
16
 
14
17
  # /goop-plan
15
18
 
16
- **Start the Planning Phase.** Capture intent, clarify requirements, and prepare for execution.
19
+ **Create Specification and Blueprint.** Transform discovery interview into executable plans.
17
20
 
18
21
  ## Usage
19
22
 
20
23
  ```bash
21
- /goop-plan [brief description of task]
24
+ /goop-plan
22
25
  ```
23
26
 
24
- ## Orchestrator Role
27
+ ## Gate Requirement
25
28
 
26
- **YOU conduct the interview directly.** Do NOT spawn agents for conversation. Only spawn agents when it's time to BUILD documents.
29
+ ```
30
+ +================================================================+
31
+ | DISCOVERY GATE: Interview must be complete before planning. |
32
+ | This ensures we build the RIGHT thing. |
33
+ +================================================================+
34
+ ```
27
35
 
28
- Why: The interview builds shared understanding. That understanding stays in YOUR context and informs how you delegate. Spawning for conversation fragments knowledge.
36
+ **Required before this command:**
37
+ - `interviewComplete: true` (check via `goop_state({ action: "get" })`)
38
+ - `.goopspec/REQUIREMENTS.md` exists
29
39
 
30
- ## Process
40
+ **If not satisfied:** Refuse and redirect to `/goop-discuss`
31
41
 
32
- ### Phase 1: Setup
42
+ **CRITICAL: Never read or edit .goopspec/state.json directly. Always use `goop_state` tool.**
33
43
 
34
- **Execute these checks BEFORE any user interaction:**
44
+ ## Orchestrator Role
35
45
 
36
- **1.1 Check for existing project documents:**
37
- ```
38
- goop_status()
39
- Read(".goopspec/SPEC.md")
40
- Read(".goopspec/BLUEPRINT.md")
41
- Read(".goopspec/CHRONICLE.md")
42
- ```
46
+ **You check the gate, then spawn the planner.** The planner creates SPEC.md and BLUEPRINT.md.
43
47
 
44
- **1.2 If documents exist, offer archive:**
48
+ ## Tools Used
45
49
 
46
- Use `question` tool:
47
- - header: "Existing Project"
48
- - question: "I found existing project documents. How would you like to proceed?"
49
- - options:
50
- - "Archive and start fresh (Recommended)" Move current docs to archive, extract learnings, start new project
51
- - "Continue existing project" Resume work on current spec (exit planning, run /goop-status)
52
- - "Overwrite without archiving" Replace documents (loses history)
50
+ | Tool | Purpose in This Command |
51
+ |------|------------------------|
52
+ | `goop_status` | Check current phase and gate requirements |
53
+ | `goop_spec` | Validate interview complete, load existing specs |
54
+ | `memory_search` | Find prior architecture decisions |
55
+ | `memory_decision` | Record new planning decisions |
56
+ | `goop_reference` | Load spec/blueprint templates |
53
57
 
54
- **On "Archive and start fresh":**
55
- ```
56
- task({
57
- subagent_type: "goop-writer",
58
- description: "Archive current milestone",
59
- prompt: `
60
- Archive the current project:
61
- 1. Read .goopspec/SPEC.md and .goopspec/CHRONICLE.md
62
- 2. Generate RETROSPECTIVE.md summarizing:
63
- - What was built
64
- - Key decisions made
65
- - Learnings for next time
66
- 3. Move all documents to .goopspec/archive/[milestone-name]/
67
- 4. Clear working documents (keep archive/)
68
- 5. Return ARCHIVE COMPLETE with summary
69
- `
70
- })
71
- ```
72
- Then continue to Phase 2.
58
+ **Hook Support:** `tool.execute.after` may auto-transition to specify phase.
73
59
 
74
- **On "Continue existing":** Exit command. Suggest `/goop-status` for current state.
60
+ ---
75
61
 
76
- **On "Overwrite":** Warn user, then continue to Phase 2.
62
+ ## Process
77
63
 
78
- **1.3 Initialize if needed:**
79
- ```bash
80
- mkdir -p .goopspec
81
- ```
64
+ ### Phase 1: Gate Check
65
+
66
+ **Execute BEFORE anything else:**
82
67
 
83
- **1.4 Search memory for context:**
84
68
  ```
85
- memory_search({ query: "project preferences architecture decisions [user's topic]", limit: 5 })
69
+ goop_status()
70
+ goop_state({ action: "get" }) # NEVER read state.json directly
71
+ Read(".goopspec/REQUIREMENTS.md")
86
72
  ```
87
73
 
88
- Store any relevant findings - use them to skip questions you already know answers to.
89
-
90
- ### Phase 2: Deep Questioning
74
+ **1.1 Check interviewComplete:**
91
75
 
92
- **Display stage banner:**
93
76
  ```
94
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
95
- GOOPSPEC ▸ PLANNING
96
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
+ IF state.interviewComplete != true:
78
+ REFUSE with:
79
+
80
+ ## 🔮 GoopSpec · Gate Blocked
81
+
82
+ ✗ Discovery interview required before planning.
83
+
84
+ → Run: `/goop-discuss`
85
+
86
+ ---
87
+
88
+ EXIT command.
97
89
  ```
98
90
 
99
- **2.1 Open the conversation:**
91
+ **1.2 Check REQUIREMENTS.md exists:**
100
92
 
101
- If `$ARGUMENTS` provided:
102
- > "You want to **[argument]**. Let me understand this better."
93
+ ```
94
+ IF .goopspec/REQUIREMENTS.md does not exist:
95
+ REFUSE with:
96
+
97
+ ## 🔮 GoopSpec · Gate Blocked
98
+
99
+ ✗ No discovery output found.
100
+
101
+ → Run: `/goop-discuss`
102
+
103
+ ---
104
+
105
+ EXIT command.
106
+ ```
103
107
 
104
- Otherwise:
105
- > "What do you want to build?"
108
+ **1.3 Gate passed:**
106
109
 
107
- Wait for response. This gives context for intelligent follow-ups.
110
+ ```
111
+ ## 🔮 GoopSpec · Planning
108
112
 
109
- **2.2 Follow the thread:**
113
+ Discovery gate passed
110
114
 
111
- Based on their response, ask follow-up questions. Use the `question` tool with options that probe what they mentioned.
115
+ Creating specification and blueprint...
112
116
 
113
- Keep following threads. Each answer opens new areas:
114
- - What excited them about this idea
115
- - What problem sparked it
116
- - What vague terms mean concretely
117
- - What it would look like in use
118
- - What's already decided vs open
117
+ ---
118
+ ```
119
119
 
120
- **2.3 Memory-first questioning protocol:**
120
+ ### Phase 2: Check for Existing Documents
121
121
 
122
- Before asking ANYTHING:
123
- 1. Check memory: `memory_search({ query: "[topic] preference" })`
124
- 2. If found with high confidence: "I recall you prefer X for this. Still true? [Y/n]"
125
- 3. If not found: Ask, then SAVE the answer with `memory_note`
122
+ **2.1 Check for existing SPEC.md/BLUEPRINT.md:**
126
123
 
127
- **Never ask what you already know.**
124
+ ```
125
+ Read(".goopspec/SPEC.md")
126
+ Read(".goopspec/BLUEPRINT.md")
127
+ ```
128
128
 
129
- **2.4 Context checklist (gather all of these):**
129
+ **2.2 If documents exist:**
130
130
 
131
- | Category | Questions to Answer |
132
- |----------|-------------------|
133
- | **Goal** | What is the ONE thing that must work? |
134
- | **Context** | Why now? What problem does this solve? |
135
- | **Success** | How do we know it's done? Observable outcomes? |
136
- | **Constraints** | Tech stack? Performance? Security? Timeline? |
137
- | **Scope** | What's explicitly NOT included? |
138
- | **UI/UX** | Visual direction? Key patterns? States to handle? |
131
+ Use `question` tool:
132
+ - header: "Existing Project"
133
+ - question: "I found existing project documents. How would you like to proceed?"
134
+ - options:
135
+ - "Archive and start fresh (Recommended)" Move current docs to archive, create new
136
+ - "Continue existing project" Resume work (exit, run /goop-status)
137
+ - "Overwrite without archiving" Replace documents (loses history)
139
138
 
140
- Don't ask all at once. Weave naturally through conversation.
139
+ **On "Archive":** Spawn writer to archive, then continue.
140
+ **On "Continue":** Exit, suggest `/goop-status`.
141
+ **On "Overwrite":** Warn, then continue.
141
142
 
142
- **2.5 Strategy decision gate:**
143
+ ### Phase 3: Load Context
143
144
 
144
- When you could write a clear SPEC.md, use `question` tool:
145
+ **3.1 Load discovery interview:**
145
146
 
146
- - header: "Strategy"
147
- - question: "I understand what you're building. How should we proceed?"
148
- - options:
149
- - "Create specification (Recommended)" — I'll create SPEC.md and BLUEPRINT.md now
150
- - "Research first" — Investigate unknowns before planning (/goop-research)
151
- - "Map codebase first" — Understand existing code before planning (/goop-map-codebase)
152
- - "Keep exploring" I want to share more context
147
+ ```
148
+ Read(".goopspec/REQUIREMENTS.md")
149
+ ```
150
+
151
+ Extract:
152
+ - Vision
153
+ - Must-haves (with acceptance criteria)
154
+ - Constraints
155
+ - Out of scope
156
+ - Assumptions
157
+ - Risks
153
158
 
154
- **On "Keep exploring":** Ask what they want to add, identify gaps, continue conversation.
159
+ **3.2 Search memory:**
155
160
 
156
- **On "Research first":**
157
161
  ```
158
- Suggest: "Run `/goop-research [topic]` to investigate, then return to `/goop-plan`"
162
+ memory_search({ query: "[feature] architecture decisions patterns", limit: 5 })
159
163
  ```
160
- Exit command.
161
164
 
162
- **On "Map codebase":**
165
+ **3.3 Load project knowledge:**
166
+
163
167
  ```
164
- Suggest: "Run `/goop-map-codebase` to understand the existing code, then return to `/goop-plan`"
168
+ Read(".goopspec/PROJECT_KNOWLEDGE_BASE.md") # If exists
165
169
  ```
166
- Exit command.
167
-
168
- **On "Create specification":** Continue to Phase 3.
169
170
 
170
- ### Phase 3: Document Creation
171
+ ### Phase 4: Spawn Planner
171
172
 
172
- **Display stage banner:**
173
+ **Display banner:**
173
174
  ```
174
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
175
- GOOPSPEC ▸ CREATING DOCUMENTS
176
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
175
+ ## 🔮 GoopSpec · Creating Documents
176
+
177
+ ⏳ Spawning planner to create SPEC.md and BLUEPRINT.md...
177
178
 
178
- ◆ Spawning planner to create SPEC.md and BLUEPRINT.md...
179
+ ---
179
180
  ```
180
181
 
181
- **Spawn goop-planner with full interview context:**
182
+ **Spawn goop-planner with full context:**
182
183
 
183
184
  ```
184
185
  task({
@@ -186,147 +187,203 @@ task({
186
187
  description: "Create SPEC and BLUEPRINT",
187
188
  prompt: `
188
189
  ## TASK
189
- Create specification and blueprint for: [feature name]
190
-
191
- ## CONTEXT FROM INTERVIEW
190
+ Create specification and blueprint from discovery interview.
192
191
 
193
- ### User Intent
194
- [The core "why" - what problem this solves, why now]
192
+ ## PROJECT CONTEXT
193
+ [From PROJECT_KNOWLEDGE_BASE.md if exists]
194
+ - Stack: [technologies]
195
+ - Conventions: [naming, patterns]
195
196
 
196
- ### Requirements Gathered
197
+ ## DISCOVERY INTERVIEW OUTPUT
198
+ [Full content of REQUIREMENTS.md]
197
199
 
198
- **Must Have:**
199
- - [Requirement 1 from interview]
200
- - [Requirement 2 from interview]
201
- - [Requirement 3 from interview]
200
+ ### Vision
201
+ [Vision section]
202
202
 
203
- **Nice to Have:**
204
- - [If mentioned]
203
+ ### Must-Haves
204
+ [Must-haves with acceptance criteria]
205
205
 
206
- **Out of Scope:**
207
- - [Explicit exclusions from interview]
206
+ ### Constraints
207
+ [Technical and practical constraints]
208
208
 
209
- ### Technical Constraints
210
- - Stack: [from interview]
211
- - Performance: [from interview]
212
- - Security: [from interview]
209
+ ### Out of Scope
210
+ [Explicit exclusions]
213
211
 
214
- ### Success Criteria
215
- - [Observable outcome 1]
216
- - [Observable outcome 2]
212
+ ### Assumptions
213
+ [Baseline assumptions]
217
214
 
218
- ### UI/UX Requirements (if applicable)
219
- - Visual direction: [from interview]
220
- - Key patterns: [from interview]
221
- - States to handle: [loading, empty, error, success]
215
+ ### Risks
216
+ [Identified risks with mitigations]
222
217
 
223
218
  ## INSTRUCTIONS
224
- 1. Load templates:
225
- - goop_reference({ name: "spec", type: "template" })
226
- - goop_reference({ name: "blueprint", type: "template" })
227
-
228
- 2. Create .goopspec/SPEC.md with:
229
- - All must-haves as checkboxes with IDs (MH-01, MH-02)
230
- - Nice-to-haves marked separately
231
- - Clear out-of-scope section
232
- - Success criteria
233
-
234
- 3. Create .goopspec/BLUEPRINT.md with:
235
- - Wave-based execution plan
236
- - Each task is atomic and verifiable
237
- - Dependencies mapped
238
- - Estimated effort per wave
239
-
240
- 4. Initialize .goopspec/CHRONICLE.md with:
219
+
220
+ 1. **Verify discovery completeness:**
221
+ - Vision defined?
222
+ - Must-haves listed with acceptance criteria?
223
+ - Out of scope defined?
224
+ - Risks identified?
225
+
226
+ If missing critical info, return BLOCKED.
227
+
228
+ 2. **Create .goopspec/SPEC.md:**
229
+ - Transform must-haves into formal requirements (MH1, MH2, etc.)
230
+ - Include acceptance criteria for each
231
+ - Add traceability section (will be filled after blueprint)
232
+ - Mark status as "Draft"
233
+
234
+ 3. **Create .goopspec/BLUEPRINT.md:**
235
+ - Design wave architecture
236
+ - Create tasks that cover ALL must-haves
237
+ - Add spec coverage to each task
238
+ - Build traceability matrix
239
+
240
+ 4. **Update .goopspec/SPEC.md:**
241
+ - Fill traceability matrix (must-have → tasks)
242
+ - Verify 100% coverage
243
+
244
+ 5. **Initialize .goopspec/CHRONICLE.md:**
241
245
  - Phase: plan → ready for specify
242
246
  - Documents created with timestamps
243
247
 
244
- 5. Save key decisions to memory:
245
- memory_decision({
246
- decision: "[key architectural choice]",
247
- reasoning: "[why]",
248
- impact: "medium"
249
- })
250
-
251
- 6. Return: ## PLANNING COMPLETE with summary
252
-
253
- Write files IMMEDIATELY. Don't draft - commit to disk.
248
+ 6. **Save to memory:**
249
+ - Key architectural decisions
250
+ - Technology choices with rationale
251
+
252
+ 7. **Return XML response envelope** with:
253
+ - BLUEPRINT COMPLETE status
254
+ - Wave summary
255
+ - Traceability summary
256
+ - Handoff instructions
257
+
258
+ ## VERIFICATION
259
+ Before returning COMPLETE:
260
+ - [ ] Every must-have has mapped tasks
261
+ - [ ] Every task has spec coverage
262
+ - [ ] Traceability matrix shows 100%
263
+ - [ ] SPEC.md has all sections filled
264
+ - [ ] BLUEPRINT.md has verification commands
254
265
  `
255
266
  })
256
267
  ```
257
268
 
258
- ### Phase 4: Handle Response
269
+ ### Phase 5: Handle Response
259
270
 
260
- **On `## PLANNING COMPLETE`:**
271
+ **Parse XML response from planner.**
261
272
 
262
- Read created documents and present:
273
+ **On `COMPLETE` status:**
274
+
275
+ Read created documents:
276
+ ```
277
+ Read(".goopspec/SPEC.md")
278
+ Read(".goopspec/BLUEPRINT.md")
279
+ ```
263
280
 
281
+ Display completion:
264
282
  ```
265
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
266
- GOOPSPEC ▸ PLANNING COMPLETE ✓
267
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
283
+ ## 🔮 GoopSpec · Planning Complete
284
+
285
+ ✨ Blueprint created successfully
268
286
 
269
287
  **Feature:** [Name from SPEC.md]
270
288
 
271
- | Artifact | Status | Location |
272
- |------------|---------|------------------------|
273
- | Spec | Created | .goopspec/SPEC.md |
274
- | Blueprint | Created | .goopspec/BLUEPRINT.md |
275
- | Chronicle | Created | .goopspec/CHRONICLE.md |
289
+ | Document | Status | Location |
290
+ |----------|--------|----------|
291
+ | Spec | Created | .goopspec/SPEC.md |
292
+ | Blueprint | Created | .goopspec/BLUEPRINT.md |
293
+ | Chronicle | Created | .goopspec/CHRONICLE.md |
276
294
 
277
295
  **[N] must-haves** | **[M] waves** | **[P] tasks**
278
296
 
279
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
297
+ ### Traceability
298
+ | Must-Have | Covered By |
299
+ |-----------|------------|
300
+ | MH1 | Wave X, Tasks Y |
301
+ | MH2 | Wave X, Tasks Y |
302
+
303
+ ✓ Coverage: 100%
280
304
 
281
- ## Next Up
305
+ ### Next Step
282
306
 
283
307
  **Lock the specification** — Confirm requirements before execution
284
308
 
285
- `/goop-specify`
309
+ `/goop-specify`
286
310
 
287
311
  ---
288
312
 
313
+ Start a **new session** for fresh context, then run the command.
314
+
289
315
  **Also available:**
290
- - `/goop-research [topic]` — Investigate unknowns before specifying
291
- - `cat .goopspec/SPEC.md` — Review the specification
292
- - `cat .goopspec/BLUEPRINT.md` — Review the execution plan
316
+ - `cat .goopspec/SPEC.md` — Review specification
317
+ - `cat .goopspec/BLUEPRINT.md` — Review execution plan
318
+ - `/goop-research [topic]` — Investigate unknowns first
319
+ ```
293
320
 
294
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
321
+ **Generate HANDOFF.md:**
322
+
323
+ ```
324
+ Write(".goopspec/HANDOFF.md", `
325
+ # Session Handoff
326
+
327
+ **Generated:** [timestamp]
328
+ **Phase:** plan
329
+
330
+ ## Accomplished
331
+ - [x] Discovery interview completed
332
+ - [x] SPEC.md created with [N] must-haves
333
+ - [x] BLUEPRINT.md created with [M] waves, [P] tasks
334
+ - [x] 100% traceability achieved
335
+
336
+ ## Current State
337
+ - Phase: plan
338
+ - Interview: complete
339
+ - Spec: draft (not locked)
340
+
341
+ ## Next Session
342
+ Run: /goop-specify
343
+
344
+ ## Files to Read
345
+ 1. .goopspec/SPEC.md — Requirements
346
+ 2. .goopspec/BLUEPRINT.md — Execution plan
347
+
348
+ ## Context Summary
349
+ Planning complete for [feature]. [N] must-haves mapped to [P] tasks
350
+ across [M] waves. Ready to lock specification.
351
+ `)
295
352
  ```
296
353
 
297
- **On `## PLANNING BLOCKED`:**
354
+ **On `BLOCKED` status:**
298
355
 
299
- Present blocker to user:
300
356
  ```
301
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
302
- GOOPSPEC ▸ PLANNING BLOCKED
303
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
357
+ ## 🔮 GoopSpec · Planning Blocked
358
+
359
+ ✗ Cannot proceed
304
360
 
305
361
  **Blocker:** [From planner response]
306
362
 
307
363
  **Options:**
308
- 1. Provide more context → continue planning
309
- 2. Research the unknown → /goop-research
310
- 3. Abort → /goop-pause
364
+ 1. Provide more context → `/goop-discuss`
365
+ 2. Research the unknown → `/goop-research [topic]`
366
+
367
+ ---
311
368
  ```
312
369
 
313
370
  Use `question` tool to get user choice.
314
371
 
315
- **On `## PLANNING PARTIAL`:**
372
+ **On `PARTIAL` status:**
316
373
 
317
374
  Present what was created, explain gaps, offer to continue or restart.
318
375
 
319
- ### Phase 5: Memory Persistence
376
+ ### Phase 6: Memory Persistence
320
377
 
321
- After successful planning, persist key context:
378
+ After successful planning:
322
379
 
323
380
  ```
324
381
  memory_save({
325
382
  type: "note",
326
- title: "Project: [Feature Name]",
327
- content: "Building [summary]. Key decisions: [list]. Success = [criteria].",
328
- concepts: ["project", "planning", "[domain]"],
329
- importance: 0.8
383
+ title: "Plan: [Feature Name]",
384
+ content: "Created [N]-wave blueprint. Key decisions: [list]. Must-haves: [summary].",
385
+ concepts: ["planning", "blueprint", "[domain]"],
386
+ importance: 0.7
330
387
  })
331
388
  ```
332
389
 
@@ -334,103 +391,100 @@ memory_save({
334
391
 
335
392
  | File | Purpose |
336
393
  |------|---------|
337
- | `.goopspec/SPEC.md` | Requirements specification (Draft) |
394
+ | `.goopspec/SPEC.md` | Specification (Draft) |
338
395
  | `.goopspec/BLUEPRINT.md` | Wave-based execution plan |
339
396
  | `.goopspec/CHRONICLE.md` | Progress tracking |
340
- | `.goopspec/state.json` | Workflow state |
397
+ | `.goopspec/HANDOFF.md` | Session handoff |
398
+ | State (via goop_state) | Workflow state (phase transitions) |
341
399
 
342
400
  ## Transitions
343
401
 
344
402
  | Outcome | Next Step |
345
403
  |---------|-----------|
346
- | Planning complete | `/goop-specify` to lock the specification |
404
+ | Planning complete | `/goop-specify` to lock |
405
+ | Missing discovery | `/goop-discuss` to interview |
347
406
  | Unknowns remain | `/goop-research` to investigate |
348
- | Need to pause | `/goop-pause` to save checkpoint |
349
- | Existing project | `/goop-status` to see current state |
407
+ | Need to pause | `/goop-pause` to checkpoint |
350
408
 
351
409
  ## Examples
352
410
 
353
- **Simple Feature:**
411
+ **Gate Passed:**
354
412
  ```
355
- User: /goop-plan add a dark mode toggle
356
-
357
- Orchestrator: "Dark mode toggle. A few questions:
358
-
359
- 1. Should it persist to localStorage across sessions?
360
- 2. Auto-detect system preference (prefers-color-scheme)?
361
- 3. Animate the transition, or instant switch?
413
+ User: /goop-plan
362
414
 
363
- [Uses question tool with options for each]"
415
+ Orchestrator:
416
+ +--------------------------------------------------------+
417
+ | GOOPSPEC > PLANNING |
418
+ +--------------------------------------------------------+
419
+ | Discovery gate: PASSED |
420
+ | Creating specification and blueprint... |
421
+ +--------------------------------------------------------+
364
422
 
365
- ... gathers answers ...
366
-
367
- Orchestrator: "Got it. Creating specification..."
368
423
  [Spawns goop-planner]
369
- ```
370
424
 
371
- **Complex Feature:**
372
- ```
373
- User: /goop-plan refactor the authentication system
425
+ ...
374
426
 
375
- Orchestrator: "Auth refactor is significant. Let me understand the scope.
427
+ +--------------------------------------------------------+
428
+ | GOOPSPEC > PLANNING COMPLETE |
429
+ +--------------------------------------------------------+
376
430
 
377
- I found 3 auth-related modules in the codebase:
378
- - src/auth/ (main auth logic)
379
- - src/middleware/auth.ts (route protection)
380
- - src/utils/jwt.ts (token handling)
431
+ **Feature:** Dark Mode Toggle
381
432
 
382
- What's driving this refactor?
433
+ | Document | Status |
434
+ |------------|---------|
435
+ | Spec | Created |
436
+ | Blueprint | Created |
383
437
 
384
- [Uses question tool]:
385
- - Security vulnerability found
386
- - Adding new auth method (OAuth, SSO)
387
- - Performance issues
388
- - Technical debt cleanup
389
- - Other (describe)"
390
- ```
438
+ **3 must-haves** | **2 waves** | **5 tasks**
391
439
 
392
- **Existing Project Detected:**
440
+ ## > Next Step
441
+ `/goop-specify`
393
442
  ```
394
- User: /goop-plan new dashboard widgets
395
443
 
396
- Orchestrator: "I found existing project documents:
397
- - SPEC.md: 'User Authentication System'
398
- - Status: Execute phase, Wave 2 of 3
399
-
400
- [Uses question tool]:
401
- - Archive auth project and start fresh on widgets
402
- - Continue auth project (run /goop-status)
403
- - Overwrite without archiving"
444
+ **Gate Blocked:**
445
+ ```
446
+ User: /goop-plan
447
+
448
+ Orchestrator:
449
+ +--------------------------------------------------------+
450
+ | GOOPSPEC > GATE BLOCKED |
451
+ +--------------------------------------------------------+
452
+ | Discovery interview required before planning. |
453
+ | |
454
+ | Run: /goop-discuss |
455
+ +--------------------------------------------------------+
404
456
  ```
405
457
 
406
458
  ## Success Criteria
407
459
 
408
- - [ ] Existing documents detected and handled (archive/continue/overwrite)
409
- - [ ] Memory searched before asking questions
410
- - [ ] Interview conducted by orchestrator directly (no agent spawn for conversation)
411
- - [ ] All context checklist categories gathered
412
- - [ ] User confirmed strategy (create/research/map/explore)
413
- - [ ] goop-planner spawned with complete interview context
414
- - [ ] SPEC.md created with must-haves, nice-to-haves, out-of-scope
415
- - [ ] BLUEPRINT.md created with waves and tasks
416
- - [ ] CHRONICLE.md initialized
417
- - [ ] Key decisions saved to memory
460
+ - [ ] Gate check performed (interview_complete + REQUIREMENTS.md)
461
+ - [ ] If gate fails, refused with clear redirect to /goop-discuss
462
+ - [ ] Existing documents handled (archive/continue/overwrite)
463
+ - [ ] goop-planner spawned with full discovery context
464
+ - [ ] SPEC.md created with traceability
465
+ - [ ] BLUEPRINT.md created with spec coverage
466
+ - [ ] 100% must-have coverage achieved
467
+ - [ ] HANDOFF.md generated
418
468
  - [ ] User knows next step is `/goop-specify`
469
+ - [ ] Suggested to start new session for fresh context
419
470
 
420
471
  ## Anti-Patterns
421
472
 
422
473
  **DON'T:**
423
- - Spawn an agent to conduct the interview
424
- - Ask questions you found answers to in memory
425
- - Skip the archive check when existing docs exist
426
- - Create documents without user confirming strategy
427
- - Leave user without clear next steps
428
- - Rush through questioning to get to document creation
474
+ - Skip the discovery gate check
475
+ - Conduct interview in /goop-plan (that's /goop-discuss)
476
+ - Create documents without traceability
477
+ - Leave user without next steps
478
+ - Skip handoff generation
429
479
 
430
480
  **DO:**
431
- - Search memory before every question category
432
- - Follow conversation threads naturally
433
- - Challenge vague requirements ("what do you mean by fast?")
434
- - Save new preferences to memory immediately
435
- - Present clear "Next Up" section with copy-paste commands
436
- - Take time to understand - planning is the highest leverage phase
481
+ - Enforce the gate strictly
482
+ - Spawn planner with complete context
483
+ - Verify 100% traceability
484
+ - Generate HANDOFF.md
485
+ - Suggest new session for clean context
486
+
487
+ ---
488
+
489
+ *Planning Protocol v0.1.4*
490
+ *"Every must-have traces to tasks."*