opencode-goopspec 0.1.5 → 0.1.6

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 (90) hide show
  1. package/README.md +7 -7
  2. package/agents/goop-debugger.md +2 -2
  3. package/agents/goop-designer.md +2 -2
  4. package/agents/goop-executor.md +17 -7
  5. package/agents/goop-explorer.md +2 -2
  6. package/agents/goop-librarian.md +1 -1
  7. package/agents/goop-orchestrator.md +47 -5
  8. package/agents/goop-planner.md +3 -3
  9. package/agents/goop-researcher.md +2 -2
  10. package/agents/goop-tester.md +1 -1
  11. package/agents/goop-verifier.md +2 -2
  12. package/agents/goop-writer.md +1 -1
  13. package/agents/memory-distiller.md +2 -2
  14. package/commands/goop-accept.md +27 -401
  15. package/commands/goop-discuss.md +29 -393
  16. package/commands/goop-execute.md +22 -356
  17. package/commands/goop-map-codebase.md +44 -478
  18. package/commands/goop-plan.md +23 -499
  19. package/commands/goop-quick.md +58 -31
  20. package/commands/goop-setup.md +7 -4
  21. package/commands/goop-specify.md +26 -291
  22. package/commands/goop-status.md +26 -261
  23. package/dist/index.js +808 -182
  24. package/dist/worker/index.js +1 -1
  25. package/package.json +2 -1
  26. package/references/accept-process.md +402 -0
  27. package/references/context-injection.md +1 -1
  28. package/references/discovery-interview.md +1 -1
  29. package/references/discuss-process.md +383 -0
  30. package/references/dispatch-patterns.md +46 -21
  31. package/references/enforcement-system.md +1 -1
  32. package/references/execute-process.md +358 -0
  33. package/references/git-workflow.md +349 -0
  34. package/references/handoff-protocol.md +1 -1
  35. package/references/map-codebase-process.md +353 -0
  36. package/references/model-profiles.md +16 -16
  37. package/references/orchestrator-philosophy.md +1 -1
  38. package/references/phase-gates.md +1 -1
  39. package/references/plan-process.md +397 -0
  40. package/references/plugin-architecture.md +1 -1
  41. package/references/quick-process.md +343 -0
  42. package/references/response-format.md +2 -2
  43. package/references/specify-process.md +251 -0
  44. package/references/status-process.md +253 -0
  45. package/references/subagent-protocol.md +2 -2
  46. package/references/team-coordination.md +183 -0
  47. package/references/xml-response-schema.md +5 -5
  48. package/skills/accessibility/skill.md +1 -1
  49. package/skills/accessibility-testing/skill.md +1 -1
  50. package/skills/api-docs/skill.md +1 -1
  51. package/skills/architecture-design/skill.md +1 -1
  52. package/skills/atomic-commits/skill.md +92 -15
  53. package/skills/code-review/skill.md +1 -1
  54. package/skills/codebase-mapping/skill.md +1 -1
  55. package/skills/convention-detection/skill.md +1 -1
  56. package/skills/debugging/skill.md +1 -1
  57. package/skills/deviation-handling/skill.md +1 -1
  58. package/skills/documentation/skill.md +1 -1
  59. package/skills/goop-core/skill.md +48 -11
  60. package/skills/memory-usage/skill.md +1 -1
  61. package/skills/parallel-planning/skill.md +1 -1
  62. package/skills/pattern-extraction/skill.md +1 -1
  63. package/skills/performance-optimization/skill.md +1 -1
  64. package/skills/playwright/skill.md +1 -1
  65. package/skills/playwright-testing/skill.md +1 -1
  66. package/skills/progress-tracking/skill.md +1 -1
  67. package/skills/readme-generation/skill.md +1 -1
  68. package/skills/research/skill.md +1 -1
  69. package/skills/responsive-design/skill.md +1 -1
  70. package/skills/scientific-method/skill.md +1 -1
  71. package/skills/security-audit/skill.md +1 -1
  72. package/skills/task-decomposition/skill.md +1 -1
  73. package/skills/task-delegation/skill.md +60 -34
  74. package/skills/technical-writing/skill.md +1 -1
  75. package/skills/testing/skill.md +1 -1
  76. package/skills/ui-design/skill.md +1 -1
  77. package/skills/ux-patterns/skill.md +1 -1
  78. package/skills/verification/skill.md +1 -1
  79. package/skills/visual-regression/skill.md +1 -1
  80. package/templates/blueprint.md +1 -1
  81. package/templates/chronicle.md +1 -1
  82. package/templates/handoff.md +1 -1
  83. package/templates/milestone.md +1 -1
  84. package/templates/project.md +1 -1
  85. package/templates/requirements.md +1 -1
  86. package/templates/research.md +1 -1
  87. package/templates/retrospective.md +1 -1
  88. package/templates/spec.md +1 -1
  89. package/templates/state.md +1 -1
  90. package/templates/summary.md +1 -1
@@ -0,0 +1,383 @@
1
+ # Discovery Interview Process
2
+
3
+ Detailed process for conducting the `/goop-discuss` discovery interview.
4
+
5
+ ## Phase 1: Setup
6
+
7
+ **Execute these checks BEFORE any user interaction:**
8
+
9
+ ### 1.1 Check current state
10
+
11
+ ```
12
+ goop_status()
13
+ goop_state({ action: "get" }) # NEVER read state.json directly
14
+ ```
15
+
16
+ **CRITICAL: Never read or edit .goopspec/state.json directly. Always use `goop_state` tool.**
17
+
18
+ ### 1.2 Git branch check (Session Start)
19
+
20
+ Check current branch and offer to create a new one for this work:
21
+
22
+ ```bash
23
+ git branch --show-current
24
+ git status
25
+ ```
26
+
27
+ Use `question` tool:
28
+ - header: "Git Branch"
29
+ - question: "You're on branch `[current-branch]`. How would you like to proceed?"
30
+ - options:
31
+ - "Create new feature branch (Recommended)" — Create a clean branch for this work
32
+ - "Stay on current branch" — Continue on [current-branch]
33
+
34
+ **On "Create new feature branch":**
35
+
36
+ Ask for branch name context (or infer from topic):
37
+ ```
38
+ Branch name will be: feat/[short-description]
39
+ ```
40
+
41
+ Then create branch:
42
+ ```bash
43
+ git checkout -b feat/[short-description]
44
+ ```
45
+
46
+ **Branch naming rules:**
47
+ - Format: `type/short-description`
48
+ - Types: `feat/`, `fix/`, `refactor/`, `chore/`
49
+ - Keep descriptions short and kebab-case
50
+ - Check existing branches first: `git branch --list`
51
+
52
+ ### 1.3 Check for existing project documents
53
+
54
+ ```
55
+ Read(".goopspec/SPEC.md")
56
+ Read(".goopspec/BLUEPRINT.md")
57
+ ```
58
+
59
+ **If SPEC.md or BLUEPRINT.md exist**, the user may have completed work that needs archiving.
60
+
61
+ Use `question` tool:
62
+ - header: "Existing Project"
63
+ - question: "I found existing project documents. How would you like to proceed?"
64
+ - options:
65
+ - "Archive and start fresh (Recommended)" — Move current docs to archive, create new
66
+ - "Continue existing project" — Resume work (exit, run /goop-status)
67
+ - "Overwrite without archiving" — Replace documents (loses history)
68
+
69
+ **On "Archive":**
70
+ ```
71
+ task({
72
+ subagent_type: "goop-writer",
73
+ description: "Archive milestone",
74
+ prompt: "Archive the current milestone. Move SPEC.md, BLUEPRINT.md, CHRONICLE.md to .goopspec/archive/[milestone-slug]/"
75
+ })
76
+ ```
77
+ Then continue with discovery.
78
+
79
+ **On "Continue":** Exit and suggest `/goop-status`.
80
+ **On "Overwrite":** Warn about losing history, then continue.
81
+
82
+ ### 1.4 Check for existing REQUIREMENTS.md
83
+
84
+ ```
85
+ Read(".goopspec/REQUIREMENTS.md") # If exists, interview was done
86
+ ```
87
+
88
+ ### 1.5 If REQUIREMENTS.md exists
89
+
90
+ Use `question` tool:
91
+ - header: "Existing Discovery"
92
+ - question: "I found an existing discovery interview. How would you like to proceed?"
93
+ - options:
94
+ - "Start fresh (Recommended)" — Clear previous discovery, start new interview
95
+ - "Review and update" — Load previous answers, modify as needed
96
+ - "Use existing" — Skip interview, go straight to /goop-plan
97
+
98
+ ### 1.6 Initialize if needed
99
+
100
+ ```bash
101
+ mkdir -p .goopspec
102
+ ```
103
+
104
+ ### 1.7 Search memory for context
105
+
106
+ ```
107
+ memory_search({ query: "project preferences architecture [user's topic]", limit: 5 })
108
+ ```
109
+
110
+ Store relevant findings - use them to skip questions you already know answers to.
111
+
112
+ ---
113
+
114
+ ## Phase 2: Discovery Interview
115
+
116
+ **Display stage banner:**
117
+ ```
118
+ ## 🔮 GoopSpec · Discovery Interview
119
+
120
+ Let's nail down the requirements before planning.
121
+ I'll ask six key questions to understand your needs.
122
+
123
+ ---
124
+ ```
125
+
126
+ ### 2.1 Open the conversation
127
+
128
+ If `$ARGUMENTS` provided:
129
+ > "You want to **[argument]**. Let me understand this better."
130
+
131
+ Otherwise:
132
+ > "What do you want to build?"
133
+
134
+ ### 2.2 Work through the six questions
135
+
136
+ Ask naturally, not as a checklist. Weave questions based on their responses.
137
+
138
+ **Memory-first protocol:**
139
+ Before asking ANYTHING:
140
+ 1. Check memory: `memory_search({ query: "[topic] preference" })`
141
+ 2. If found: "I recall you prefer X for this. Still true? [Y/n]"
142
+ 3. If not found: Ask, then SAVE the answer with `memory_note`
143
+
144
+ ### 2.3 Probe for specifics
145
+
146
+ | Vague Answer | Follow-up |
147
+ |--------------|-----------|
148
+ | "It should be fast" | "What's the target? Sub-100ms? Sub-1s?" |
149
+ | "Standard auth" | "JWT? Sessions? OAuth? What's the token TTL?" |
150
+ | "Good UX" | "What does that mean for this feature? Animations? Accessibility level?" |
151
+
152
+ ### 2.4 Checklist tracker (internal)
153
+
154
+ Track progress through the six questions:
155
+ - [ ] Vision defined (goal, problem, users)
156
+ - [ ] Must-haves listed (at least 1)
157
+ - [ ] Constraints documented (stack, performance)
158
+ - [ ] Out of scope defined (at least 1 item)
159
+ - [ ] Assumptions listed
160
+ - [ ] Risks identified (at least 1 with mitigation)
161
+
162
+ ### 2.5 Completion check
163
+
164
+ When all six questions are answered, confirm:
165
+
166
+ Use `question` tool:
167
+ - header: "Discovery Check"
168
+ - question: "I think I have what I need. Let me summarize..."
169
+ - options:
170
+ - "Looks good, proceed" — Generate REQUIREMENTS.md
171
+ - "I want to add more" — Continue discussion
172
+ - "Start over" — Clear and restart interview
173
+
174
+ ---
175
+
176
+ ## Phase 3: Generate REQUIREMENTS.md
177
+
178
+ **Display stage banner:**
179
+ ```
180
+ ## 🔮 GoopSpec · Saving Discovery
181
+
182
+ ⏳ Generating REQUIREMENTS.md...
183
+
184
+ ---
185
+ ```
186
+
187
+ ### 3.1 Create REQUIREMENTS.md
188
+
189
+ Write directly (orchestrator can write planning docs):
190
+
191
+ ```markdown
192
+ # REQUIREMENTS: [Feature Name]
193
+
194
+ **Generated:** [timestamp]
195
+ **Interview Status:** Complete
196
+ **Ready for Planning:** Yes
197
+
198
+ ---
199
+
200
+ ## Vision
201
+
202
+ [Vision statement from interview]
203
+
204
+ **Problem Solved:** [From interview]
205
+
206
+ **Why Now:** [From interview]
207
+
208
+ ---
209
+
210
+ ## Must-Haves (The Contract)
211
+
212
+ - [ ] **MH1**: [Title]
213
+ - [Description]
214
+ - **Acceptance:** [Criteria]
215
+
216
+ - [ ] **MH2**: [Title]
217
+ - [Description]
218
+ - **Acceptance:** [Criteria]
219
+
220
+ ---
221
+
222
+ ## Out of Scope
223
+
224
+ - **[Item]** — [Reason]
225
+ - **[Item]** — [Reason]
226
+
227
+ ---
228
+
229
+ ## Constraints
230
+
231
+ ### Technical Constraints
232
+ - [Stack, frameworks, versions]
233
+
234
+ ### Practical Constraints
235
+ - [Timeline, resources]
236
+
237
+ ---
238
+
239
+ ## Assumptions
240
+
241
+ - **[Assumption]** — If false: [Impact]
242
+
243
+ ---
244
+
245
+ ## Risks & Mitigations
246
+
247
+ | Risk | Impact | Likelihood | Mitigation |
248
+ |------|--------|------------|------------|
249
+ | [Risk] | [H/M/L] | [H/M/L] | [Plan] |
250
+
251
+ ---
252
+
253
+ *Discovery interview completed. Ready for /goop-plan.*
254
+ ```
255
+
256
+ ### 3.2 Mark interview complete
257
+
258
+ ```
259
+ goop_state({ action: "complete-interview" })
260
+ ```
261
+
262
+ This atomically updates the workflow state. **NEVER edit state.json directly.**
263
+
264
+ ### 3.3 Save to memory
265
+
266
+ ```
267
+ memory_save({
268
+ type: "note",
269
+ title: "Discovery: [Feature Name]",
270
+ content: "[Summary of key requirements and constraints]",
271
+ concepts: ["discovery", "requirements", "[domain]"],
272
+ importance: 0.7
273
+ })
274
+ ```
275
+
276
+ ---
277
+
278
+ ## Phase 4: Completion
279
+
280
+ **Display completion banner:**
281
+
282
+ ```
283
+ ## 🔮 GoopSpec · Discovery Complete
284
+
285
+ ✨ Requirements captured successfully
286
+
287
+ **Feature:** [Name]
288
+
289
+ | Question | Status |
290
+ |----------|--------|
291
+ | Vision | ✓ Defined |
292
+ | Must-Haves | ✓ [N] items |
293
+ | Constraints | ✓ Documented |
294
+ | Out of Scope | ✓ [M] items |
295
+ | Assumptions | ✓ Listed |
296
+ | Risks | ✓ [P] identified |
297
+
298
+ ### Next Step
299
+
300
+ **Create the blueprint** — Transform requirements into an execution plan
301
+
302
+ → `/goop-plan`
303
+
304
+ ---
305
+
306
+ **Also available:**
307
+ - `cat .goopspec/REQUIREMENTS.md` — Review discovery output
308
+ - `/goop-research [topic]` — Investigate unknowns first
309
+ ```
310
+
311
+ ---
312
+
313
+ ## Examples
314
+
315
+ ### Simple Feature
316
+
317
+ ```
318
+ User: /goop-discuss add dark mode toggle
319
+
320
+ Orchestrator: "Dark mode toggle. Let me understand what you need.
321
+
322
+ **Vision:** What's the goal here?
323
+ - Toggle in settings that switches the app theme
324
+ - Persist preference across sessions
325
+ - Respect system preference as default
326
+
327
+ **Must-haves:** What MUST work?
328
+ - Toggle UI in settings
329
+ - Theme actually changes
330
+ - Persists to localStorage
331
+
332
+ **Out of scope?**
333
+ - Per-component theme overrides
334
+ - Multiple theme options beyond light/dark
335
+
336
+ **Constraints?**
337
+ - Using existing Tailwind dark: classes
338
+ - No new dependencies
339
+
340
+ **Assumptions?**
341
+ - CSS already has dark variants (will verify)
342
+
343
+ **Risks?**
344
+ - Some components may not have dark styles → will audit first
345
+
346
+ Great, I have what I need. Creating REQUIREMENTS.md..."
347
+ ```
348
+
349
+ ### Complex Feature
350
+
351
+ ```
352
+ User: /goop-discuss rebuild the payment system
353
+
354
+ Orchestrator: "Payment system rebuild - that's significant.
355
+ Let me understand the scope.
356
+
357
+ **Vision:** What's driving this?
358
+ - Current system uses deprecated Stripe API
359
+ - Need to add PayPal as alternative
360
+ - Improve error handling and retry logic
361
+
362
+ **Must-haves:**
363
+ - Migrate to Stripe v2 API
364
+ - Add PayPal integration
365
+ - Unified payment interface
366
+ - Retry with exponential backoff
367
+ - Webhook handling for async payments
368
+
369
+ **Out of scope:**
370
+ - Cryptocurrency payments (future)
371
+ - Subscription management (separate project)
372
+
373
+ **Risks:**
374
+ - Stripe migration may have breaking changes → research first
375
+ - PayPal integration complexity unknown → estimate 2x buffer
376
+
377
+ I'd recommend running `/goop-research stripe v2 migration` before
378
+ planning. Want to do that first?"
379
+ ```
380
+
381
+ ---
382
+
383
+ *Discovery Interview Process v0.1.6*
@@ -2,40 +2,65 @@
2
2
 
3
3
  GoopSpec supports multiple patterns for spawning and coordinating specialized agents. Choose the right pattern based on task characteristics.
4
4
 
5
- ## The Dispatch Tool (CRITICAL)
5
+ ## Two-Step Delegation System
6
6
 
7
- **ALWAYS use the native `task` tool to dispatch agents.**
7
+ GoopSpec uses two tools for delegation, each with a distinct purpose:
8
+
9
+ | Tool | Purpose | Required? |
10
+ |------|---------|-----------|
11
+ | `goop_delegate` | **Prompt Engineering** - prepares rich prompts with skills, references, team context | Optional but recommended |
12
+ | `task` | **Agent Execution** - spawns the subagent and runs the work | **Always required** |
13
+
14
+ ### Full Delegation Pattern (Complex Tasks)
15
+
16
+ For complex tasks that benefit from skills, references, and team awareness:
8
17
 
9
18
  ```typescript
10
- // Correct: Use task tool directly
19
+ // Step 1: Engineer the prompt
20
+ goop_delegate({
21
+ agent: "goop-executor",
22
+ prompt: "Implement user authentication",
23
+ context: "Stack: Next.js + NextAuth, Wave 2 Task 3"
24
+ })
25
+ // Output: Rich prompt with skills, refs, memory protocol, team context
26
+
27
+ // Step 2: Execute (REQUIRED - copy from goop_delegate output)
11
28
  task({
12
- subagent_type: "goop-executor", // Agent to spawn
13
- description: "Implement auth", // 3-5 word summary
14
- prompt: `[Detailed task...]` // Full context and instructions
29
+ subagent_type: "goop-executor",
30
+ description: "Implement auth",
31
+ prompt: `[The composedPrompt from goop_delegate output]`
15
32
  })
16
33
  ```
17
34
 
18
- ### Do NOT Use
35
+ ### Direct Delegation Pattern (Simple Tasks)
19
36
 
20
- | Tool | Why Not |
21
- |------|---------|
22
- | `delegate` | Different system (async delegation), not GoopSpec |
23
- | `goop_delegate` alone | Only composes prompts, doesn't execute |
37
+ For simple, well-defined tasks:
24
38
 
25
- ### Optional: goop_delegate for Prompt Composition
39
+ ```typescript
40
+ task({
41
+ subagent_type: "goop-executor",
42
+ description: "Implement auth",
43
+ prompt: `[Your own prompt with context]`
44
+ })
45
+ ```
26
46
 
27
- If you need help composing a rich prompt with skills/references injected:
47
+ ### When to Use Each Pattern
28
48
 
29
- ```typescript
30
- // Step 1: Compose prompt (optional)
31
- goop_delegate({ agent: "goop-executor", prompt: "..." })
32
- // Returns: <goop_delegation> with composedPrompt
49
+ | Situation | Pattern | Why |
50
+ |-----------|---------|-----|
51
+ | Task needs agent's skills | `goop_delegate` → `task` | Skills are auto-injected |
52
+ | Task needs team awareness | `goop_delegate` → `task` | Avoids file conflicts |
53
+ | Complex multi-file work | `goop_delegate` → `task` | Full context package |
54
+ | Quick exploration | `task` directly | Faster, less overhead |
55
+ | Simple single-file fix | `task` directly | Sufficient context |
33
56
 
34
- // Step 2: Execute with task (REQUIRED)
35
- task({ subagent_type: "goop-executor", prompt: composedPrompt })
36
- ```
57
+ ### Common Mistakes
37
58
 
38
- **Most cases: Just use `task` directly.**
59
+ | Mistake | Symptom | Fix |
60
+ |---------|---------|-----|
61
+ | `goop_delegate` without `task` | Prompt prepared but agent never runs | Always follow with `task` |
62
+ | Using `delegate` tool | Different async system | Use `task` for GoopSpec |
63
+ | Skipping `goop_delegate` for complex work | Missing skills/team context | Use full two-step |
39
64
 
40
65
  ## Dispatch Modes
41
66
 
@@ -210,4 +210,4 @@ Ensure memory injection is enabled in config:
210
210
 
211
211
  ---
212
212
 
213
- *GoopSpec v0.1.5 - Enforcement System Documentation*
213
+ *GoopSpec v0.1.6 - Enforcement System Documentation*