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
@@ -13,6 +13,18 @@ description: Fast-track a small task
13
13
  /goop-quick [task description]
14
14
  ```
15
15
 
16
+ ## Tools Used
17
+
18
+ | Tool | Purpose in This Command |
19
+ |------|------------------------|
20
+ | `goop_status` | Check current state, skip heavy workflow |
21
+ | `memory_search` | Find relevant prior context |
22
+ | `memory_save` | Persist any discoveries |
23
+
24
+ **Hook Support:** Minimal - quick mode bypasses most phase enforcement.
25
+
26
+ ---
27
+
16
28
  ## How It Works
17
29
 
18
30
  Quick mode bypasses the formal Plan/Research/Specify phases while maintaining safety guarantees. Ideal for bug fixes, small refactors, or docs.
@@ -16,6 +16,17 @@ Search the persistent memory system for relevant context. Use this to:
16
16
  `/goop-recall recent` - Show recent memories
17
17
  `/goop-recall decisions` - Show recent architectural decisions
18
18
 
19
+ ## Tools Used
20
+
21
+ | Tool | Purpose in This Command |
22
+ |------|------------------------|
23
+ | `memory_search` | Search persistent memories |
24
+ | `session_search` | Search session history |
25
+
26
+ **Hook Support:** None specific - read-only query.
27
+
28
+ ---
29
+
19
30
  ## Instructions
20
31
 
21
32
  When this command is invoked:
@@ -17,6 +17,18 @@ Save important information to the persistent memory system for future sessions.
17
17
  `/goop-remember note: [content]` - Quick note
18
18
  `/goop-remember todo: [content]` - Create a durable task
19
19
 
20
+ ## Tools Used
21
+
22
+ | Tool | Purpose in This Command |
23
+ |------|------------------------|
24
+ | `memory_save` | Store structured memories |
25
+ | `memory_decision` | Record decisions with reasoning |
26
+ | `memory_note` | Quick note capture |
27
+
28
+ **Hook Support:** `system.transform` uses saved memories in future sessions.
29
+
30
+ ---
31
+
20
32
  ## Instructions
21
33
 
22
34
  When this command is invoked:
@@ -23,6 +23,19 @@ alternatives:
23
23
  /goop-research [topic or question]
24
24
  ```
25
25
 
26
+ ## Tools Used
27
+
28
+ | Tool | Purpose in This Command |
29
+ |------|------------------------|
30
+ | `goop_status` | Check current phase allows research |
31
+ | `memory_search` | Find prior research on same topic |
32
+ | `memory_save` | Persist research findings |
33
+ | `goop_skill` | Load specialized research skills |
34
+
35
+ **Hook Support:** `system.transform` injects prior research context.
36
+
37
+ ---
38
+
26
39
  ## How It Works
27
40
 
28
41
  Research is an **opt-in** phase used when the path forward isn't clear. It prevents "coding in the dark."
@@ -13,6 +13,18 @@ description: Resume from a saved checkpoint
13
13
  /goop-resume [checkpoint-id]
14
14
  ```
15
15
 
16
+ ## Tools Used
17
+
18
+ | Tool | Purpose in This Command |
19
+ |------|------------------------|
20
+ | `goop_checkpoint` | Load saved execution state |
21
+ | `goop_status` | Verify current state matches checkpoint |
22
+ | `memory_search` | Find context from when checkpoint was saved |
23
+
24
+ **Hook Support:** `system.transform` injects checkpoint context automatically.
25
+
26
+ ---
27
+
16
28
  ## How It Works
17
29
 
18
30
  Loads a saved state, restores the workflow context, and prepares the agent to continue exactly where it left off.
@@ -20,6 +20,16 @@ You are helping the user set up or modify their GoopSpec configuration. This wiz
20
20
  | `models` | Show model suggestions | Help choosing agent models |
21
21
  | `status` | Show current config | Quick overview of current state |
22
22
 
23
+ ## Tools Used
24
+
25
+ | Tool | Purpose in This Command |
26
+ |------|------------------------|
27
+ | `goop_setup` | Primary tool - all setup actions |
28
+
29
+ **Hook Support:** None specific - configuration tool.
30
+
31
+ ---
32
+
23
33
  ## First-Time Setup Flow
24
34
 
25
35
  For users who haven't set up GoopSpec yet, use the `init` action.
@@ -146,12 +156,12 @@ goop_setup(
146
156
  *Systematic debugging with hypothesis testing*
147
157
  1. openai/gpt-5.2-codex
148
158
  2. anthropic/claude-opus-4-5
149
- 3. opencode/kimi-k2.5-free
159
+ 3. kimi-for-coding/k2p5
150
160
 
151
161
  ### goop-designer
152
162
  *Visual design planning and UI/UX reasoning*
153
163
  1. anthropic/claude-opus-4-5
154
- 2. opencode/kimi-k2.5-free
164
+ 2. kimi-for-coding/k2p5
155
165
  3. google/antigravity-gemini-3-pro-high
156
166
 
157
167
  ### goop-executor
@@ -159,7 +169,7 @@ goop_setup(
159
169
  1. openai/gpt-5.2-codex
160
170
  2. anthropic/claude-opus-4-5
161
171
  3. anthropic/claude-sonnet-4-5
162
- 4. opencode/kimi-k2.5-free
172
+ 4. kimi-for-coding/k2p5
163
173
  5. google/antigravity-gemini-3-pro-high
164
174
  6. opencode/glm-4.7-free
165
175
 
@@ -179,26 +189,26 @@ goop_setup(
179
189
  *Primary orchestrator - spec clarity and wave execution*
180
190
  1. anthropic/claude-opus-4-5
181
191
  2. openai/gpt-5.2-codex
182
- 3. opencode/kimi-k2.5-free
192
+ 3. kimi-for-coding/k2p5
183
193
  4. anthropic/claude-sonnet-4-5
184
194
 
185
195
  ### goop-planner
186
196
  *Detailed execution plans with architectural precision*
187
197
  1. anthropic/claude-opus-4-5
188
198
  2. openai/gpt-5.2-codex
189
- 3. opencode/kimi-k2.5-free
199
+ 3. kimi-for-coding/k2p5
190
200
  4. anthropic/claude-sonnet-4-5
191
201
 
192
202
  ### goop-researcher
193
203
  *Comprehensive ecosystem research*
194
204
  1. openai/gpt-5.2
195
205
  2. anthropic/claude-sonnet-4-5
196
- 3. opencode/kimi-k2.5-free
206
+ 3. kimi-for-coding/k2p5
197
207
  4. opencode/glm-4.7-free
198
208
 
199
209
  ### goop-tester
200
210
  *Web frontend testing with Playwright*
201
- 1. opencode/kimi-k2.5-free
211
+ 1. kimi-for-coding/k2p5
202
212
  2. anthropic/claude-sonnet-4-5
203
213
  3. google/antigravity-gemini-3-flash
204
214
 
@@ -210,7 +220,7 @@ goop_setup(
210
220
  ### goop-writer
211
221
  *Comprehensive documentation generation*
212
222
  1. google/antigravity-gemini-3-pro-high
213
- 2. opencode/kimi-k2.5-free
223
+ 2. kimi-for-coding/k2p5
214
224
  3. anthropic/claude-sonnet-4-5
215
225
 
216
226
  ## Memory System Configuration
@@ -2,6 +2,7 @@
2
2
  name: goop-specify
3
3
  description: Lock the specification contract
4
4
  phase: specify
5
+ requires: planning_complete
5
6
  next-step: "Once the spec is locked and confirmed, begin implementation"
6
7
  next-command: /goop-execute
7
8
  alternatives:
@@ -21,49 +22,324 @@ alternatives:
21
22
  /goop-specify
22
23
  ```
23
24
 
24
- ## How It Works
25
+ ## Gate Requirement
25
26
 
26
- This command marks the transition from planning to commitment. It generates the `SPEC.md` and `BLUEPRINT.md` files and presents them for user confirmation.
27
+ ```
28
+ +================================================================+
29
+ | SPEC GATE: Planning must be complete before locking. |
30
+ | SPEC.md and BLUEPRINT.md must exist with full traceability. |
31
+ +================================================================+
32
+ ```
33
+
34
+ **Required before this command:**
35
+ - `.goopspec/SPEC.md` exists
36
+ - `.goopspec/BLUEPRINT.md` exists
37
+ - Traceability matrix shows 100% coverage
38
+
39
+ **If not satisfied:** Refuse and redirect to `/goop-plan`
40
+
41
+ ## Tools Used
42
+
43
+ | Tool | Purpose in This Command |
44
+ |------|------------------------|
45
+ | `goop_status` | Check current phase and readiness |
46
+ | `goop_state` | **Lock the specification** - NEVER edit state.json directly |
47
+ | `goop_spec` | Validate spec structure |
48
+ | `memory_search` | Find relevant prior context |
49
+ | `goop_adl` | Log the spec lock decision |
50
+
51
+ **CRITICAL: Never read or edit .goopspec/state.json directly. Always use `goop_state` tool.**
52
+
53
+ ---
54
+
55
+ ## Process
56
+
57
+ ### Phase 1: Gate Check
58
+
59
+ **Execute BEFORE anything else:**
60
+
61
+ ```
62
+ goop_status()
63
+ Read(".goopspec/SPEC.md")
64
+ Read(".goopspec/BLUEPRINT.md")
65
+ ```
66
+
67
+ **1.1 Check documents exist:**
68
+
69
+ ```
70
+ IF .goopspec/SPEC.md does not exist:
71
+ REFUSE with:
72
+
73
+ ## 🔮 GoopSpec · Gate Blocked
74
+
75
+ ✗ No specification found.
76
+
77
+ → Run: `/goop-plan`
78
+
79
+ ---
80
+ ```
81
+
82
+ **1.2 Check traceability:**
83
+
84
+ ```
85
+ IF traceability matrix shows < 100%:
86
+ REFUSE with:
87
+
88
+ ## 🔮 GoopSpec · Traceability Incomplete
89
+
90
+ ✗ Not all must-haves have mapped tasks.
91
+
92
+ → Update BLUEPRINT.md or re-run `/goop-plan`
93
+
94
+ ---
95
+ ```
96
+
97
+ ### Phase 2: Present Contract
98
+
99
+ **Display the contract for confirmation:**
100
+
101
+ ```
102
+ ## 🔮 GoopSpec · Contract Gate
103
+
104
+ 📜 Review and confirm the specification
105
+
106
+ ### SPECIFICATION: [Name]
27
107
 
28
- ### 1. Artifact Generation
29
- Based on the plan (and optional research), the agent generates:
30
- - **SPEC.md:** The requirements contract.
31
- - **BLUEPRINT.md:** The execution plan (Waves & Tasks).
108
+ #### Must-Haves (The Contract)
32
109
 
33
- ### 2. The Contract Gate
34
- The agent displays a summary of the contract:
35
- - **Must Haves:** Guaranteed deliverables.
36
- - **Nice to Haves:** Best-effort items.
37
- - **Out of Scope:** Explicit exclusions.
110
+ | ID | Requirement | Covered By |
111
+ |----|-------------|------------|
112
+ | MH1 | [Title] | Wave X, Tasks Y |
113
+ | MH2 | [Title] | Wave X, Tasks Y |
38
114
 
39
- ### 3. User Confirmation
40
- The user **MUST** type "confirm" to lock the spec.
41
- - If the user types "amend", the agent enters amendment mode to adjust requirements.
115
+ #### Out of Scope
116
+
117
+ - [Item 1]
118
+ - [Item 2]
119
+
120
+ #### Execution Plan
121
+
122
+ | Wave | Focus | Tasks |
123
+ |------|-------|-------|
124
+ | 1 | [Name] | [N] |
125
+ | 2 | [Name] | [M] |
126
+
127
+ ✓ Traceability: 100%
128
+
129
+ ---
130
+
131
+ ⚠️ **Action Required:**
132
+ - Type **"confirm"** to lock the specification
133
+ - Type **"amend"** to modify requirements
134
+ - Type **"cancel"** to return to planning
135
+ ```
136
+
137
+ ### Phase 3: Handle Response
138
+
139
+ **On "confirm":**
140
+
141
+ 1. Lock the spec using goop_state:
142
+ ```
143
+ goop_state({ action: "lock-spec" })
144
+ ```
145
+
146
+ This atomically updates the workflow state. **NEVER edit state.json directly.**
147
+
148
+ 2. Update SPEC.md:
149
+ ```markdown
150
+ **Status:** Locked
151
+ **Locked At:** [timestamp]
152
+ ```
153
+
154
+ 3. Save to memory:
155
+ ```
156
+ memory_decision({
157
+ decision: "Spec locked for [feature]",
158
+ reasoning: "User confirmed requirements after review",
159
+ impact: "high"
160
+ })
161
+ ```
162
+
163
+ 4. Generate HANDOFF.md:
164
+ ```
165
+ # Session Handoff
166
+
167
+ **Phase:** specify
168
+
169
+ ## Accomplished
170
+ - Spec locked with [N] must-haves
171
+ - Traceability verified at 100%
172
+
173
+ ## Next Session
174
+ Run: /goop-execute
175
+
176
+ ## Context
177
+ Specification locked. Ready for execution.
178
+ ```
179
+
180
+ 5. Display completion:
181
+ ```
182
+ ## 🔮 GoopSpec · Specification Locked
183
+
184
+ 🔒 The spec is now a binding contract
185
+
186
+ | Status | Value |
187
+ |--------|-------|
188
+ | Locked | ✓ Yes |
189
+ | Must-Haves | [N] |
190
+ | Waves | [M] |
191
+ | Tasks | [P] |
192
+
193
+ Changes now require `/goop-amend` with impact analysis.
194
+
195
+ ### Next Step
196
+
197
+ **Begin execution** — Implement the blueprint
198
+
199
+ → `/goop-execute`
200
+
201
+ ---
202
+
203
+ Start a **new session** for fresh context, then run the command.
204
+ ```
205
+
206
+ **On "amend":**
207
+
208
+ ```
209
+ ## 🔮 GoopSpec · Amendment Mode
210
+
211
+ What would you like to change?
212
+
213
+ 1. Add a must-have
214
+ 2. Remove a must-have
215
+ 3. Modify acceptance criteria
216
+ 4. Change out of scope
217
+ 5. Cancel
218
+
219
+ ---
220
+ ```
221
+
222
+ Use `question` tool to get choice, then process amendment.
223
+
224
+ **On "cancel":**
225
+
226
+ ```
227
+ Specification not locked. Returning to planning.
228
+ Run `/goop-plan` to modify or `/goop-discuss` to restart discovery.
229
+ ```
42
230
 
43
231
  ## Output
44
232
 
45
- - `.goopspec/SPEC.md` (Locked)
46
- - `.goopspec/BLUEPRINT.md` (Ready for execution)
47
- - **State Transition:** `plan` -> `execute`
48
-
49
- ## Example Interaction
50
-
51
- > **User:** `/goop-specify`
52
- > **Agent:**
53
- > ```
54
- > 🔒 CONTRACT GATE
55
- >
56
- > MUST HAVES:
57
- > Email/Password Login
58
- > • Session Persistence
59
- >
60
- > OUT OF SCOPE:
61
- > OAuth (Google/Github)
62
- >
63
- > Type "confirm" to lock, or "amend" to change.
64
- > ```
65
- > **User:** `confirm`
66
- > **Agent:** "Spec locked. Ready to execute."
67
-
68
- ## Quick Mode
69
- For `/goop-quick` tasks, this phase is skipped. The intent captured in the plan serves as the implicit spec.
233
+ | File | Change |
234
+ |------|--------|
235
+ | `.goopspec/SPEC.md` | Status updated to "Locked" |
236
+ | State (via goop_state) | `specLocked: true` |
237
+ | `.goopspec/HANDOFF.md` | Session handoff generated |
238
+
239
+ ## Transitions
240
+
241
+ | Outcome | Next Step |
242
+ |---------|-----------|
243
+ | Spec locked | `/goop-execute` to begin implementation |
244
+ | Amendments requested | Process changes, re-present contract |
245
+ | Cancelled | `/goop-plan` to modify planning |
246
+
247
+ ## Amendment Protocol (After Lock)
248
+
249
+ Once locked, changes require formal amendment:
250
+
251
+ 1. **Propose change:** User describes modification
252
+ 2. **Impact analysis:** Orchestrator assesses affected tasks
253
+ 3. **Blueprint update:** Modify BLUEPRINT.md if needed
254
+ 4. **Re-confirm:** User confirms amended spec
255
+ 5. **Log amendment:** Add to SPEC.md amendment history
256
+
257
+ ```markdown
258
+ ## Amendment History
259
+
260
+ | Version | Date | Change | Impact | Approved |
261
+ |---------|------|--------|--------|----------|
262
+ | 1.1 | [date] | Added MH3 | +1 task | User |
263
+ ```
264
+
265
+ ## Examples
266
+
267
+ **Successful Lock:**
268
+ ```
269
+ User: /goop-specify
270
+
271
+ Orchestrator:
272
+ +--------------------------------------------------------+
273
+ | GOOPSPEC > CONTRACT GATE |
274
+ +--------------------------------------------------------+
275
+
276
+ ## SPECIFICATION: Dark Mode Toggle
277
+
278
+ ### Must-Haves
279
+ | ID | Requirement | Covered By |
280
+ |----|-------------|------------|
281
+ | MH1 | Toggle UI | W1.T1 |
282
+ | MH2 | Theme switch | W1.T2, W2.T1 |
283
+ | MH3 | Persist preference | W2.T2 |
284
+
285
+ ### Out of Scope
286
+ - Multiple themes (beyond light/dark)
287
+ - Per-component theming
288
+
289
+ ### Traceability: 100%
290
+
291
+ Type "confirm" to lock.
292
+
293
+ User: confirm
294
+
295
+ Orchestrator:
296
+ +--------------------------------------------------------+
297
+ | GOOPSPEC > SPECIFICATION LOCKED |
298
+ +--------------------------------------------------------+
299
+
300
+ ## > Next Step
301
+ `/goop-execute`
302
+ ```
303
+
304
+ **Gate Blocked:**
305
+ ```
306
+ User: /goop-specify
307
+
308
+ Orchestrator:
309
+ +--------------------------------------------------------+
310
+ | GOOPSPEC > GATE BLOCKED |
311
+ +--------------------------------------------------------+
312
+ | No specification found. |
313
+ | Run: /goop-plan |
314
+ +--------------------------------------------------------+
315
+ ```
316
+
317
+ ## Success Criteria
318
+
319
+ - [ ] Gate check performed (SPEC.md + BLUEPRINT.md exist)
320
+ - [ ] Traceability verified at 100%
321
+ - [ ] Contract presented clearly with must-haves and out-of-scope
322
+ - [ ] User explicitly confirmed with "confirm"
323
+ - [ ] State updated via `goop_state({ action: "lock-spec" })`
324
+ - [ ] SPEC.md updated with Locked status
325
+ - [ ] HANDOFF.md generated
326
+ - [ ] User knows next step is `/goop-execute`
327
+
328
+ ## Anti-Patterns
329
+
330
+ **DON'T:**
331
+ - Skip the gate check
332
+ - Lock without user confirmation
333
+ - Proceed with incomplete traceability
334
+ - Skip handoff generation
335
+
336
+ **DO:**
337
+ - Verify 100% traceability before presenting
338
+ - Require explicit "confirm" keyword
339
+ - Log the lock to memory
340
+ - Generate clear handoff
341
+
342
+ ---
343
+
344
+ *Specification Lock Protocol v0.1.4*
345
+ *"The spec is a contract. Lock it before you build."*