opencode-goopspec 0.1.2 → 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 (60) hide show
  1. package/README.md +255 -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 +392 -280
  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 +434 -160
  15. package/commands/goop-amend.md +35 -151
  16. package/commands/goop-complete.md +39 -183
  17. package/commands/goop-debug.md +33 -298
  18. package/commands/goop-discuss.md +381 -85
  19. package/commands/goop-execute.md +391 -108
  20. package/commands/goop-help.md +11 -0
  21. package/commands/goop-map-codebase.md +16 -3
  22. package/commands/goop-memory.md +11 -0
  23. package/commands/goop-milestone.md +29 -192
  24. package/commands/goop-pause.md +31 -40
  25. package/commands/goop-plan.md +458 -46
  26. package/commands/goop-quick.md +38 -142
  27. package/commands/goop-recall.md +11 -0
  28. package/commands/goop-remember.md +12 -0
  29. package/commands/goop-research.md +52 -73
  30. package/commands/goop-resume.md +28 -37
  31. package/commands/goop-setup.md +225 -124
  32. package/commands/goop-specify.md +321 -121
  33. package/commands/goop-status.md +256 -110
  34. package/dist/index.js +6289 -2820
  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/interactive-questioning.md +122 -0
  41. package/references/model-profiles.md +1 -1
  42. package/references/phase-gates.md +360 -0
  43. package/references/plugin-architecture.md +212 -0
  44. package/references/response-format.md +41 -9
  45. package/references/subagent-protocol.md +83 -33
  46. package/references/ui-interaction-patterns.md +133 -0
  47. package/references/visual-style.md +199 -0
  48. package/references/workflow-accept.md +60 -273
  49. package/references/workflow-execute.md +63 -274
  50. package/references/workflow-plan.md +86 -133
  51. package/references/workflow-research.md +78 -186
  52. package/references/workflow-specify.md +64 -221
  53. package/references/xml-response-schema.md +236 -0
  54. package/templates/blueprint.md +88 -41
  55. package/templates/chronicle.md +130 -16
  56. package/templates/handoff.md +140 -0
  57. package/templates/project.md +114 -0
  58. package/templates/requirements.md +121 -0
  59. package/templates/spec.md +85 -20
  60. package/templates/state.md +103 -0
@@ -1,318 +1,53 @@
1
1
  ---
2
2
  name: goop-debug
3
- description: Systematic debugging using scientific method - investigate bugs with hypothesis testing
4
- tools:
5
- read: true
6
- write: true
7
- edit: true
8
- bash: true
9
- grep: true
10
- glob: true
3
+ description: Debug with a systematic workflow
11
4
  ---
12
5
 
13
- <objective>
14
- Systematic debugging using the scientific method.
6
+ # /goop-debug
15
7
 
16
- Investigates bugs through hypothesis testing, manages persistent debug sessions, and handles checkpoints when user input is needed.
8
+ **Systematic debugging.** Solve hard bugs using the scientific method.
17
9
 
18
- **Key principles:**
19
- - User = Reporter (knows symptoms), Claude = Investigator (finds cause)
20
- - Hypothesis testing with falsifiable predictions
21
- - Change one variable at a time
22
- - Document everything in DEBUG.md
23
-
24
- **Creates:**
25
- - `.goopspec/debug/DEBUG-{id}.md` - Debug session record
26
- </objective>
27
-
28
- <execution_context>
29
- <!-- Debug template is embedded in the process section above -->
30
- </execution_context>
31
-
32
- <context>
33
- @.goopspec/PROJECT.md
34
- @.goopspec/STATE.md
35
- </context>
36
-
37
- <process>
38
- ## Phase 1: Gather Evidence
39
-
40
- **Opening questions:**
41
-
42
- "Tell me about the bug. What did you expect to happen, and what actually happened?"
43
-
44
- Listen for:
45
- - Expected behavior
46
- - Actual behavior
47
- - Error messages
48
- - When it started
49
- - Reproduction steps
50
- - Environment details
51
-
52
- **Do NOT ask:**
53
- - "What's causing it?" (User doesn't know)
54
- - "Which file has the bug?" (That's your job)
55
- - "How should we fix it?" (Investigate first)
56
-
57
- **DO ask about:**
58
- - "What were you doing when it happened?"
59
- - "Does it happen every time?"
60
- - "When did you first notice it?"
61
- - "What error messages did you see?"
62
-
63
- ## Phase 2: Initialize Debug Session
64
-
65
- Create debug session file:
10
+ ## Usage
66
11
 
67
12
  ```bash
68
- DEBUG_ID=$(date +%Y%m%d-%H%M%S)
69
- mkdir -p .goopspec/debug
70
- ```
71
-
72
- Create `.goopspec/debug/DEBUG-$DEBUG_ID.md`:
73
-
74
- ```markdown
75
- # Debug Session: $DEBUG_ID
76
-
77
- **Started:** [Timestamp]
78
- **Status:** In Progress
79
- **Severity:** [Critical/Major/Minor]
80
-
81
- ## Problem Statement
82
-
83
- **Expected:** [What should happen]
84
- **Actual:** [What actually happens]
85
- **Impact:** [Who/what is affected]
86
-
87
- ## Evidence Gathered
88
-
89
- ### Error Messages
13
+ /goop-debug [symptom description]
90
14
  ```
91
- [Paste error messages]
92
- ```
93
-
94
- ### Reproduction Steps
95
- 1. [Step 1]
96
- 2. [Step 2]
97
- 3. [Step 3]
98
-
99
- ### Environment
100
- - [OS/Version]
101
- - [Runtime version]
102
- - [Relevant env vars]
103
-
104
- ## Investigation Log
105
-
106
- ### Hypothesis 1: [Brief description]
107
- **Prediction:** If true, [observable outcome]
108
- **Test:** [What to do]
109
- **Result:** [Pending/Confirmed/Refuted]
110
- **Conclusion:** [What we learned]
111
15
 
112
- ---
113
-
114
- ## Current Status
115
-
116
- **Active Hypothesis:** [Which one we're testing]
117
- **Next Step:** [What to do next]
16
+ ## Tools Used
118
17
 
119
- ## Resolution
18
+ | Tool | Purpose in This Command |
19
+ |------|------------------------|
20
+ | `goop_status` | Check current execution context |
21
+ | `goop_checkpoint` | Save state before risky fixes |
22
+ | `memory_search` | Find prior bugs, similar issues |
23
+ | `memory_decision` | Record fix decisions with evidence |
120
24
 
121
- **Root Cause:** [What was actually wrong]
122
- **Fix Applied:** [What was changed]
123
- **Verification:** [How we confirmed it's fixed]
124
- **Committed:** [Commit hash]
25
+ **Hook Support:** `system.transform` injects prior debugging context.
125
26
 
126
27
  ---
127
- *Debug session following scientific method*
128
- ```
129
-
130
- ## Phase 3: Form Hypotheses
131
-
132
- Based on evidence, generate 3+ independent hypotheses:
133
-
134
- **Good hypotheses (falsifiable):**
135
- - "User state resets because component remounts on route change"
136
- - "API returns 404 because URL construction is wrong"
137
- - "Race condition between async operations"
138
-
139
- **Bad hypotheses (unfalsifiable):**
140
- - "Something is wrong with the state"
141
- - "The timing is off"
142
- - "There's a bug somewhere"
143
-
144
- For each hypothesis, design an experiment:
145
-
146
- ```markdown
147
- ### Hypothesis N: [Description]
148
- **Prediction:** If this hypothesis is true, I will observe [specific outcome]
149
- **Test:** [Exact steps to test]
150
- **Measurement:** [What to measure]
151
- **Success criteria:** [What confirms/refutes]
152
- ```
153
-
154
- ## Phase 4: Test Hypotheses
155
-
156
- **Rule: Change ONE variable at a time**
157
-
158
- For each hypothesis:
159
- 1. Run the test
160
- 2. Record the exact outcome
161
- 3. Compare to prediction
162
- 4. Document in DEBUG.md
163
-
164
- **If hypothesis confirmed:**
165
- - Move to Phase 5 (Action)
166
- - Update DEBUG.md with conclusion
167
-
168
- **If hypothesis refuted:**
169
- - Document what we learned (rules something out)
170
- - Form new hypothesis based on new information
171
- - Continue testing
172
-
173
- ## Phase 5: Take Action
174
-
175
- **Only act when ALL are true:**
176
- 1. Understand the mechanism (not just "what fails" but "why")
177
- 2. Can reproduce reliably
178
- 3. Have evidence, not just theory
179
- 4. Ruled out alternatives
180
-
181
- **Action types:**
182
-
183
- ### Fix the bug
184
- - Make minimal, targeted change
185
- - Update tests to prevent regression
186
- - Verify fix works
187
- - Document in DEBUG.md
188
-
189
- ### Checkpoint (if blocked)
190
- If you need user input:
191
- ```
192
- <task type="checkpoint:decision" gate="blocking">
193
- <decision>[What needs deciding]</decision>
194
- <context>[Why this matters]</context>
195
- <options>[Available options]</options>
196
- </task>
197
- ```
198
-
199
- ## Phase 6: Document Resolution
200
-
201
- Update DEBUG.md:
202
-
203
- ```markdown
204
- ## Resolution
205
-
206
- **Root Cause:** [Clear explanation]
207
- **Fix Applied:** [What was changed]
208
- ```diff
209
- - [Old code]
210
- + [New code]
211
- ```
212
-
213
- **Verification:** [How confirmed]
214
- - [ ] Test passes
215
- - [ ] Manual verification
216
- - [ ] No regressions
217
-
218
- **Committed:** [Hash]
219
- **Duration:** [How long it took]
220
- **Status:** RESOLVED
221
- ```
222
-
223
- ## Phase 7: Offer Next Steps
224
-
225
- ```
226
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
227
- GOOPSPEC > DEBUG COMPLETE
228
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
229
-
230
- **Bug Resolved**
231
-
232
- Root Cause: [Brief description]
233
- Fix: [What was changed]
234
- Commit: [Hash]
235
-
236
- Debug record: .goopspec/debug/DEBUG-{id}.md
237
-
238
- ───────────────────────────────────────────────────────────────
239
-
240
- ## Lessons Learned
241
-
242
- [Key insight from this debug session]
243
-
244
- ───────────────────────────────────────────────────────────────
245
-
246
- **Next steps:**
247
- - Continue with current work
248
- - /goop-status - Check overall progress
249
- - /goop-pause - Save checkpoint
250
-
251
- ───────────────────────────────────────────────────────────────
252
- ```
253
- </process>
254
-
255
- <methodology>
256
- **Scientific Method Steps:**
257
-
258
- 1. **Observe precisely**
259
- - Not "it's broken" but "counter shows 3 when clicking once, should show 1"
260
-
261
- 2. **Form falsifiable hypotheses**
262
- - Must be provable wrong
263
- - Make specific, testable claims
264
-
265
- 3. **Design experiments**
266
- - One variable at a time
267
- - Clear prediction
268
- - Unambiguous outcome
269
-
270
- 4. **Run experiments**
271
- - Document exact results
272
- - No interpretation yet
273
-
274
- 5. **Conclude based on evidence**
275
- - Update mental model
276
- - Form new hypotheses if needed
277
-
278
- **Cognitive Biases to Avoid:**
279
-
280
- | Bias | Trap | Antidote |
281
- |------|------|----------|
282
- | Confirmation | Only look for supporting evidence | Actively seek disproof |
283
- | Anchoring | First explanation becomes anchor | Generate 3+ hypotheses |
284
- | Availability | Recent bugs -> similar cause | Treat each bug as novel |
285
- | Sunk Cost | Keep going despite evidence | "If I started fresh...?" |
286
28
 
287
- **When to Restart:**
288
- - 2+ hours with no progress
289
- - 3+ "fixes" that didn't work
290
- - Can't explain current behavior
291
- - Debugging the debugger
29
+ ## How It Works
292
30
 
293
- **Restart protocol:**
294
- 1. Close all files
295
- 2. Write what you know for certain
296
- 3. Write what you've ruled out
297
- 4. List new hypotheses
298
- 5. Begin again
299
- </methodology>
31
+ Enters a specialized debugging mode that enforces scientific rigor to prevent "flailing."
300
32
 
301
- <checkpoint_types>
302
- **When to use checkpoints in debugging:**
33
+ ### The Protocol
34
+ 1. **Observation:** "What exactly is happening?" (Gather evidence).
35
+ 2. **Hypothesis:** "Why might this be happening?" (List possible causes).
36
+ 3. **Experiment:** "How can we test that?" (Design falsifiable tests).
37
+ 4. **Deduction:** "What does the result tell us?" (Eliminate possibilities).
303
38
 
304
- **checkpoint:human-verify**
305
- - After implementing fix, need user to test
306
- - Can't reproduce in your environment
307
- - Needs specific hardware/data
39
+ ### Features
40
+ - **Debug Session Log:** Creates `.goopspec/debug/SESSION-<id>.md`.
41
+ - **Constraint:** Forces changing *one variable at a time*.
42
+ - **Memory:** searches for similar past bugs.
308
43
 
309
- **checkpoint:decision**
310
- - Multiple possible fixes, user must choose
311
- - Fix has tradeoffs (performance vs simplicity)
312
- - Requires architectural change
44
+ ### Output
45
+ - A resolution report with Root Cause and Fix.
46
+ - Updates persistent memory with the solution to prevent recurrence.
313
47
 
314
- **checkpoint:human-action**
315
- - Needs user to provide data/credentials
316
- - Requires access to external system
317
- - Needs deployment to test environment
318
- </checkpoint_types>
48
+ ## Example
49
+ > **User:** `/goop-debug Login fails with 500 error only on production`
50
+ > **Agent:** "Starting debug session.
51
+ > Hypothesis 1: Env vars missing.
52
+ > Hypothesis 2: Database connection timeout.
53
+ > Let's test Hypothesis 1 first..."