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,183 +1,457 @@
1
1
  ---
2
2
  name: goop-accept
3
- description: Verify and accept completion - the ACCEPTANCE GATE
3
+ description: Verify work and request acceptance
4
+ phase: accept
5
+ requires: execution_complete
6
+ next-step: "Once accepted, complete the milestone and archive"
7
+ next-command: /goop-complete
8
+ alternatives:
9
+ - command: /goop-execute
10
+ when: "If issues are found that need to be fixed"
11
+ - command: /goop-amend
12
+ when: "If spec needs modification before acceptance"
4
13
  ---
5
14
 
6
- # GoopSpec Accept
15
+ # /goop-accept
7
16
 
8
- Verify the implementation against the specification and obtain user sign-off.
17
+ **Verify and accept work.** The final gate before completion.
9
18
 
10
19
  ## Usage
11
20
 
12
- ```
21
+ ```bash
13
22
  /goop-accept
14
23
  ```
15
24
 
16
- ## Workflow Position
17
-
18
- ```
19
- ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
20
- │ PLAN │ ──▶ │ RESEARCH │ ──▶ │ SPECIFY │
21
- (Intent) │ │ (Explore) │ │ (Contract) │
22
- └─────────────┘ └─────────────┘ └─────────────┘
23
-
24
- ┌──────────────────────────────────────┘
25
-
26
- ┌─────────────┐ ┌─────────────┐
27
- │ EXECUTE │ ──▶ │ ACCEPT │
28
- │ (Build) │ │ (Verify) │
29
- └─────────────┘ └─────────────┘
30
-
31
- (You are here)
32
-
33
- ╔══════════════════════════════════════════════╗
34
- ║ ACCEPTANCE GATE ║
35
- ║ User MUST confirm completion ║
36
- ╚══════════════════════════════════════════════╝
37
- ```
38
-
39
- The Accept phase answers: **Did we deliver what we promised?**
40
-
41
- ## What Happens
42
-
43
- 1. **Spec Compliance Check** - Verify each must-have from SPEC.md:
44
- - Check observable behaviors
45
- - Confirm acceptance criteria met
46
- - Document evidence (tests, manual verification)
47
-
48
- 2. **Automated Verification** - Run all quality gates:
49
- - Type checking (`npm run typecheck`)
50
- - Linting (`npm run lint`)
51
- - Tests (`npm test`)
52
- - Build (`npm run build`)
53
-
54
- 3. **Manual Verification** - For behaviors that can't be automated:
55
- - End-to-end flows
56
- - UI/UX checks
57
- - Accessibility verification
58
- - Mobile responsiveness
59
-
60
- 4. **Security Audit** - For security-sensitive features:
61
- - Input validation present
62
- - No hardcoded secrets
63
- - Auth/authz properly enforced
64
- - No obvious vulnerabilities
65
-
66
- 5. **Verifier Agent** - Delegate comprehensive verification to goop-verifier
67
-
68
- 6. **Present Results** - Show verification report with must-haves status
69
-
70
- 7. **Wait for Acceptance** - User MUST type "accept" to confirm
71
-
72
- ## Acceptance Prompt
73
-
74
- ```
75
- ╭─ ⬢ GoopSpec ───────────────────────────────────────╮
76
- │ │
77
- │ ✓ ACCEPTANCE GATE │
78
- │ │
79
- │ Implementation complete. Verification results: │
80
- │ │
81
- │ MUST HAVES: │
82
- │ ☑ User can log in - VERIFIED │
83
- │ ☑ Session persists - VERIFIED │
84
- │ ☑ Errors displayed - VERIFIED │
85
- │ │
86
- │ AUTOMATED CHECKS: │
87
- │ ✓ TypeScript: No errors │
88
- │ ✓ Lint: No issues │
89
- │ ✓ Tests: 24/24 passing │
90
- │ ✓ Build: Successful │
91
- │ │
92
- │ NICE TO HAVES COMPLETED: │
93
- │ ☑ Remember me option │
94
- │ │
95
- │ ───────────────────────────────────────────── │
96
- │ Type "accept" to confirm completion. │
97
- │ Type "issues: [description]" to request fixes. │
98
- │ │
99
- ╰────────────────────────────────────────────────────╯
100
- ```
101
-
102
- ## User Responses
103
-
104
- | Response | Effect |
105
- |----------|--------|
106
- | `accept` | Work marked complete, proceed to archive |
107
- | `issues: [desc]` | Return to Execute phase for fixes |
108
- | `amend: [change]` | Modify spec, reassess what's needed |
109
-
110
- ## Post-Acceptance
111
-
112
- After user accepts:
113
-
114
- 1. **Generate Summary** - Create completion summary with:
115
- - Delivered features
116
- - Key decisions made
117
- - Files modified
118
- - Duration and task count
119
-
120
- 2. **Archive (Milestones)** - For milestone completion:
121
- - Move to archive/
122
- - Generate RETROSPECTIVE.md
123
- - Extract LEARNINGS.md
124
- - Persist learnings to memory
125
- - Tag git with version
126
-
127
- 3. **Clean Up** - Clear active workflow state, ready for next task
128
-
129
- ## Handling Issues
130
-
131
- ### Minor Issues
132
- Issues that don't fundamentally change the spec:
133
- - Note as fix task
134
- - Delegate quick fix
135
- - Re-verify affected area
136
- - Present for re-acceptance
25
+ ## Gate Requirement
26
+
27
+ ```
28
+ +================================================================+
29
+ | ACCEPTANCE GATE: All tasks must be complete before acceptance. |
30
+ | Verification must pass. User must explicitly accept. |
31
+ +================================================================+
32
+ ```
33
+
34
+ **Required before this command:**
35
+ - All waves complete in CHRONICLE.md
36
+ - No unresolved blockers
37
+ - Verification passing
38
+
39
+ **If not satisfied:** Refuse and show what's missing
40
+
41
+ ## Tools Used
42
+
43
+ | Tool | Purpose in This Command |
44
+ |------|------------------------|
45
+ | `goop_status` | Check execution complete status |
46
+ | `goop_spec` | Load must-haves for verification |
47
+ | `goop_reference` | Load security-checklist, verification protocols |
48
+ | `memory_search` | Find relevant prior issues |
49
+ | `memory_decision` | Record accept/reject decision with evidence |
50
+ | `goop_adl` | Log verification gaps |
137
51
 
138
- ### Major Issues
139
- Issues that reveal missing requirements:
140
- - Note as spec change
141
- - Prompt for `/goop-amend`
142
- - Update SPEC.md
143
- - Re-plan affected tasks
144
- - Execute additions
145
- - Re-verify
146
-
147
- ## Artifacts Created
148
-
149
- - Verification report in CHRONICLE.md
150
- - Summary document
151
- - RETROSPECTIVE.md (for milestones)
152
- - LEARNINGS.md (for milestones)
153
- - Memory entries for patterns and decisions
154
-
155
- ## Example
156
-
157
- After execution of authentication feature:
52
+ **Hook Support:** `tool.execute.after` may trigger archive phase on acceptance.
53
+
54
+ ---
55
+
56
+ ## Process
57
+
58
+ ### Phase 1: Gate Check
59
+
60
+ **Execute BEFORE anything else:**
158
61
 
159
62
  ```
160
- /goop-accept
63
+ goop_status()
64
+ Read(".goopspec/CHRONICLE.md")
65
+ Read(".goopspec/SPEC.md")
66
+ Read(".goopspec/BLUEPRINT.md")
67
+ ```
68
+
69
+ **1.1 Check execution complete:**
70
+
71
+ ```
72
+ IF CHRONICLE shows incomplete waves:
73
+ REFUSE with:
74
+
75
+ +--------------------------------------------------------+
76
+ | GOOPSPEC > GATE BLOCKED |
77
+ +--------------------------------------------------------+
78
+ | Execution incomplete. |
79
+ | |
80
+ | Remaining: |
81
+ | - Wave [N]: [X] tasks pending |
82
+ | |
83
+ | Run: /goop-execute |
84
+ +--------------------------------------------------------+
85
+ ```
86
+
87
+ **1.2 Check for blockers:**
88
+
89
+ ```
90
+ IF unresolved blockers exist:
91
+ REFUSE with:
92
+
93
+ +--------------------------------------------------------+
94
+ | GOOPSPEC > BLOCKERS UNRESOLVED |
95
+ +--------------------------------------------------------+
96
+ | Cannot accept with active blockers: |
97
+ | |
98
+ | - [Blocker 1] |
99
+ | - [Blocker 2] |
100
+ | |
101
+ | Resolve blockers, then retry. |
102
+ +--------------------------------------------------------+
103
+ ```
104
+
105
+ **1.3 Gate passed:**
106
+
107
+ ```
108
+ +--------------------------------------------------------+
109
+ | GOOPSPEC > ACCEPTANCE |
110
+ +--------------------------------------------------------+
111
+ | Execution gate: PASSED |
112
+ | Running verification... |
113
+ +--------------------------------------------------------+
114
+ ```
115
+
116
+ ### Phase 2: Run Verification
117
+
118
+ **Spawn goop-verifier:**
119
+
120
+ ```
121
+ task({
122
+ subagent_type: "goop-verifier",
123
+ description: "Verify against specification",
124
+ prompt: `
125
+ ## TASK
126
+ Verify implementation against SPEC.md
127
+
128
+ ## REQUIREMENTS
129
+ [Full SPEC.md content]
130
+
131
+ ## BLUEPRINT
132
+ [Full BLUEPRINT.md content - for traceability]
133
+
134
+ ## CHRONICLE
135
+ [Progress log - what was built]
136
+
137
+ ## INSTRUCTIONS
138
+ 1. Verify every must-have has:
139
+ - Implementation (code exists)
140
+ - Tests (coverage)
141
+ - Acceptance criteria met
142
+
143
+ 2. Build requirement matrix:
144
+ | Must-Have | Status | Evidence |
145
+
146
+ 3. Run security checklist
147
+
148
+ 4. Check for regressions
149
+
150
+ 5. Return XML with VERIFICATION PASSED/FAILED
151
+ `
152
+ })
153
+ ```
154
+
155
+ **Spawn goop-tester (parallel):**
156
+
157
+ ```
158
+ task({
159
+ subagent_type: "goop-tester",
160
+ description: "Run test suite",
161
+ prompt: `
162
+ ## TASK
163
+ Run complete test suite and report results
164
+
165
+ ## INSTRUCTIONS
166
+ 1. Run: bun test
167
+ 2. Run: bun run typecheck
168
+ 3. Report coverage
169
+ 4. Flag any failures
170
+ 5. Return XML with test results
171
+ `
172
+ })
173
+ ```
174
+
175
+ ### Phase 3: Present Verification Report
176
+
177
+ **Parse XML responses and present:**
178
+
179
+ ```
180
+ +--------------------------------------------------------+
181
+ | GOOPSPEC > VERIFICATION REPORT |
182
+ +--------------------------------------------------------+
183
+
184
+ ## Requirement Matrix
185
+
186
+ | Must-Have | Status | Evidence |
187
+ |-----------|--------|----------|
188
+ | MH1: [Title] | PASS | Tests: 5/5, Commit: abc123 |
189
+ | MH2: [Title] | PASS | Tests: 3/3, Commit: def456 |
190
+ | MH3: [Title] | PASS | Manual: UI verified |
191
+
192
+ ## Test Results
193
+
194
+ | Suite | Passed | Failed | Coverage |
195
+ |-------|--------|--------|----------|
196
+ | Unit | 42 | 0 | 87% |
197
+ | Integration | 8 | 0 | 92% |
198
+
199
+ ## Security Check
200
+
201
+ | Check | Status |
202
+ |-------|--------|
203
+ | No hardcoded secrets | PASS |
204
+ | Input validation | PASS |
205
+ | Auth on protected routes | PASS |
206
+
207
+ ## Overall: [PASSED/FAILED]
208
+
209
+ +--------------------------------------------------------+
210
+ ```
211
+
212
+ **If FAILED:**
213
+
214
+ ```
215
+ +--------------------------------------------------------+
216
+ | GOOPSPEC > VERIFICATION FAILED |
217
+ +--------------------------------------------------------+
218
+
219
+ **Failures:**
220
+
221
+ | Must-Have | Issue | Resolution |
222
+ |-----------|-------|------------|
223
+ | MH2 | Test failing | Fix auth edge case |
224
+ | MH3 | Missing feature | Implement retry logic |
225
+
226
+ +--------------------------------------------------------+
227
+
228
+ **Options:**
229
+ 1. Fix issues → /goop-execute to continue
230
+ 2. Amend spec → /goop-amend to change requirements
231
+ 3. Accept anyway → Type "accept-with-issues"
232
+
233
+ +--------------------------------------------------------+
234
+ ```
235
+
236
+ ### Phase 4: Request Acceptance
237
+
238
+ **If PASSED:**
239
+
240
+ ```
241
+ +--------------------------------------------------------+
242
+ | GOOPSPEC > ACCEPTANCE GATE |
243
+ +--------------------------------------------------------+
244
+
245
+ **Verification:** PASSED
246
+ **Must-Haves:** [N/N] complete
247
+ **Tests:** [X] passing
248
+
249
+ +--------------------------------------------------------+
250
+
251
+ Type **"accept"** to complete this milestone.
252
+ Type **"issues"** to report problems.
253
+ Type **"cancel"** to return to execution.
254
+
255
+ +--------------------------------------------------------+
256
+ ```
257
+
258
+ ### Phase 5: Handle Response
259
+
260
+ **On "accept":**
261
+
262
+ 1. Update state.json:
263
+ ```json
264
+ {
265
+ "phase": "accept",
266
+ "verification_passed": true,
267
+ "user_accepted": true,
268
+ "accepted_at": "[timestamp]"
269
+ }
270
+ ```
271
+
272
+ 2. Save to memory:
273
+ ```
274
+ memory_save({
275
+ type: "decision",
276
+ title: "Accepted: [Feature]",
277
+ content: "User accepted [feature] with [N] must-haves verified",
278
+ importance: 0.8
279
+ })
280
+ ```
281
+
282
+ 3. Generate HANDOFF.md:
283
+ ```markdown
284
+ # Session Handoff
285
+
286
+ **Phase:** accept
287
+
288
+ ## Accomplished
289
+ - All must-haves verified
290
+ - Tests passing
291
+ - User accepted
292
+
293
+ ## Next Session
294
+ Run: /goop-complete
295
+
296
+ ## Context
297
+ Verification passed. Ready to archive.
298
+ ```
299
+
300
+ 4. Display completion:
301
+ ```
302
+ +--------------------------------------------------------+
303
+ | GOOPSPEC > ACCEPTED |
304
+ +--------------------------------------------------------+
305
+
306
+ **Feature:** [Name]
307
+ **Status:** Accepted
308
+ **Verified:** [timestamp]
309
+
310
+ +--------------------------------------------------------+
311
+
312
+ ## > Next Step
313
+
314
+ **Complete the milestone** — Archive and extract learnings
315
+
316
+ `/goop-complete`
317
+
318
+ Start a new session for clean archive.
319
+
320
+ +--------------------------------------------------------+
321
+ ```
322
+
323
+ **On "issues":**
324
+
325
+ ```
326
+ What issues did you find?
327
+
328
+ [Use question tool or text input]
329
+ ```
330
+
331
+ Then:
332
+ 1. Log issues in CHRONICLE.md
333
+ 2. Return to execution phase
334
+ 3. Suggest `/goop-execute` to fix
335
+
336
+ **On "accept-with-issues":**
337
+
338
+ 1. Log that acceptance was with known issues
339
+ 2. Document issues in CHRONICLE.md
340
+ 3. Proceed to acceptance
341
+
342
+ ```
343
+ +--------------------------------------------------------+
344
+ | GOOPSPEC > ACCEPTED WITH ISSUES |
345
+ +--------------------------------------------------------+
346
+
347
+ **Known Issues:**
348
+ - [Issue 1]
349
+ - [Issue 2]
350
+
351
+ These will be documented in the retrospective.
352
+
353
+ ## > Next Step
354
+ `/goop-complete`
355
+ +--------------------------------------------------------+
356
+ ```
357
+
358
+ ## Output
359
+
360
+ | File | Purpose |
361
+ |------|---------|
362
+ | `.goopspec/state.json` | Updated with acceptance |
363
+ | `.goopspec/CHRONICLE.md` | Verification results |
364
+ | `.goopspec/HANDOFF.md` | Session handoff |
365
+
366
+ ## Transitions
367
+
368
+ | Outcome | Next Step |
369
+ |---------|-----------|
370
+ | Accepted | `/goop-complete` to archive |
371
+ | Verification failed | `/goop-execute` to fix |
372
+ | Issues reported | `/goop-execute` to address |
373
+ | Spec needs change | `/goop-amend` to modify |
374
+
375
+ ## Examples
376
+
377
+ **Successful Acceptance:**
378
+ ```
379
+ User: /goop-accept
380
+
381
+ Orchestrator:
382
+ +--------------------------------------------------------+
383
+ | GOOPSPEC > VERIFICATION REPORT |
384
+ +--------------------------------------------------------+
385
+
386
+ | Must-Have | Status | Evidence |
387
+ |-----------|--------|----------|
388
+ | MH1: Toggle UI | PASS | Tests: 3/3 |
389
+ | MH2: Theme switch | PASS | Tests: 5/5 |
390
+ | MH3: Persist pref | PASS | Tests: 2/2 |
391
+
392
+ ## Overall: PASSED
393
+
394
+ Type "accept" to complete.
395
+
396
+ User: accept
397
+
398
+ Orchestrator:
399
+ +--------------------------------------------------------+
400
+ | GOOPSPEC > ACCEPTED |
401
+ +--------------------------------------------------------+
402
+
403
+ ## > Next Step
404
+ `/goop-complete`
405
+ ```
406
+
407
+ **Verification Failed:**
408
+ ```
409
+ User: /goop-accept
410
+
411
+ Orchestrator:
412
+ +--------------------------------------------------------+
413
+ | GOOPSPEC > VERIFICATION FAILED |
414
+ +--------------------------------------------------------+
415
+
416
+ **Failures:**
417
+ | MH2 | Test failing | edge case in theme switch |
418
+
419
+ **Options:**
420
+ 1. Fix issues → /goop-execute
421
+ 2. Accept anyway → "accept-with-issues"
422
+
423
+ User: Let's fix it
424
+
425
+ Orchestrator: Run `/goop-execute` to continue.
161
426
  ```
162
427
 
163
- Verifier checks all must-haves, runs tests, presents results.
164
- User types "accept" to confirm completion.
428
+ ## Success Criteria
165
429
 
166
- ## Next Steps
430
+ - [ ] Gate check performed (execution complete, no blockers)
431
+ - [ ] goop-verifier spawned with full context
432
+ - [ ] goop-tester spawned for test suite
433
+ - [ ] Verification report presented clearly
434
+ - [ ] Requirement matrix shows all must-haves
435
+ - [ ] User explicitly typed "accept"
436
+ - [ ] state.json updated with acceptance
437
+ - [ ] HANDOFF.md generated
438
+ - [ ] User knows next step is `/goop-complete`
167
439
 
168
- After acceptance:
169
- - `/goop-complete` - Complete and archive milestone
170
- - `/goop-plan [next]` - Start next feature
171
- - `/goop-quick` - Handle quick task
440
+ ## Anti-Patterns
172
441
 
173
- ## Quick Mode Accept
442
+ **DON'T:**
443
+ - Skip the execution completion check
444
+ - Accept without running verification
445
+ - Auto-accept without user confirmation
446
+ - Skip handoff generation
174
447
 
175
- For Quick tasks:
176
- - Abbreviated verification
177
- - No formal report
178
- - Quick confirmation prompt
179
- - Direct archive to quick/
448
+ **DO:**
449
+ - Verify every must-have has evidence
450
+ - Present clear verification report
451
+ - Require explicit "accept" keyword
452
+ - Document any accepted issues
180
453
 
181
454
  ---
182
455
 
183
- **GoopSpec**: Verify rigorously, accept confidently.
456
+ *Acceptance Protocol v0.1.4*
457
+ *"Verify everything. Accept explicitly."*