opencode-goopspec 0.1.3 → 0.1.5

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 (92) hide show
  1. package/README.md +252 -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 +374 -254
  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 +32 -268
  32. package/commands/goop-specify.md +315 -39
  33. package/commands/goop-status.md +276 -28
  34. package/dist/index.js +34564 -135
  35. package/dist/worker/index.js +35883 -0
  36. package/package.json +4 -2
  37. package/references/context-injection.md +307 -0
  38. package/references/discovery-interview.md +278 -0
  39. package/references/enforcement-system.md +213 -0
  40. package/references/handoff-protocol.md +290 -0
  41. package/references/model-profiles.md +1 -1
  42. package/references/orchestrator-philosophy.md +155 -223
  43. package/references/phase-gates.md +360 -0
  44. package/references/plugin-architecture.md +212 -0
  45. package/references/response-format.md +41 -9
  46. package/references/subagent-protocol.md +83 -33
  47. package/references/visual-style.md +199 -0
  48. package/references/xml-response-schema.md +236 -0
  49. package/skills/accessibility/skill.md +1 -1
  50. package/skills/accessibility-testing/skill.md +1 -1
  51. package/skills/api-docs/skill.md +1 -1
  52. package/skills/architecture-design/skill.md +1 -1
  53. package/skills/atomic-commits/skill.md +1 -1
  54. package/skills/code-review/skill.md +1 -1
  55. package/skills/codebase-mapping/skill.md +1 -1
  56. package/skills/convention-detection/skill.md +1 -1
  57. package/skills/debugging/skill.md +1 -1
  58. package/skills/deviation-handling/skill.md +1 -1
  59. package/skills/documentation/skill.md +1 -1
  60. package/skills/goop-core/skill.md +3 -3
  61. package/skills/memory-usage/skill.md +1 -1
  62. package/skills/parallel-planning/skill.md +1 -1
  63. package/skills/pattern-extraction/skill.md +1 -1
  64. package/skills/performance-optimization/skill.md +1 -1
  65. package/skills/playwright/skill.md +1 -1
  66. package/skills/playwright-testing/skill.md +1 -1
  67. package/skills/progress-tracking/skill.md +1 -1
  68. package/skills/readme-generation/skill.md +1 -1
  69. package/skills/research/skill.md +1 -1
  70. package/skills/responsive-design/skill.md +1 -1
  71. package/skills/scientific-method/skill.md +1 -1
  72. package/skills/security-audit/skill.md +1 -1
  73. package/skills/task-decomposition/skill.md +1 -1
  74. package/skills/task-delegation/skill.md +1 -1
  75. package/skills/technical-writing/skill.md +1 -1
  76. package/skills/testing/skill.md +1 -1
  77. package/skills/ui-design/skill.md +1 -1
  78. package/skills/ux-patterns/skill.md +1 -1
  79. package/skills/verification/skill.md +1 -1
  80. package/skills/visual-regression/skill.md +1 -1
  81. package/templates/blueprint.md +88 -41
  82. package/templates/chronicle.md +130 -16
  83. package/templates/handoff.md +140 -0
  84. package/templates/milestone.md +1 -1
  85. package/templates/project-knowledge-base.md +93 -0
  86. package/templates/project.md +114 -0
  87. package/templates/requirements.md +121 -0
  88. package/templates/research.md +1 -1
  89. package/templates/retrospective.md +1 -1
  90. package/templates/spec.md +85 -20
  91. package/templates/state.md +103 -0
  92. package/templates/summary.md +1 -1
package/README.md CHANGED
@@ -1,250 +1,197 @@
1
- # GoopSpec v0.1.3
1
+ # GoopSpec
2
2
 
3
- <div align="center">
4
-
5
- **Spec-Driven Development for AI-Assisted Coding**
6
-
7
- *The Orchestrator that turns vague ideas into shipped software*
3
+ <p align="center">
4
+ <img src=".github/assets/banner.png" alt="GoopSpec - Spec-Driven Development for AI" width="100%" />
5
+ </p>
8
6
 
9
- [![Version](https://img.shields.io/badge/version-0.1.3-blue.svg)](https://github.com/hffmnnj/opencode-goopspec)
10
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
11
- [![Tests](https://img.shields.io/badge/tests-936%20passing-green.svg)](./TEST-SUMMARY.md)
12
- [![License](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)
7
+ **Stop the AI chaos. Ship what you actually want.**
13
8
 
14
- </div>
9
+ [![Version](https://img.shields.io/badge/version-0.1.5-blue?style=for-the-badge)](https://github.com/hffmnnj/opencode-goopspec)
10
+ [![Bun](https://img.shields.io/badge/Bun-1.0+-f97316?style=for-the-badge&logo=bun&logoColor=white)](https://bun.sh)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.8-3178c6?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
12
+ [![Tests](https://img.shields.io/badge/tests-1056%20passing-22c55e?style=for-the-badge)](./TEST-SUMMARY.md)
13
+ [![License](https://img.shields.io/badge/license-MIT-22c55e?style=for-the-badge)](./LICENSE)
15
14
 
16
15
  ---
17
16
 
18
- ## What is GoopSpec?
17
+ You've been there. You ask an AI to build a feature. It starts coding immediately, misses half your requirements, forgets context mid-conversation, and delivers something that... works? But isn't what you wanted.
19
18
 
20
- GoopSpec is a plugin for [OpenCode](https://opencode.ai) that transforms how you work with AI coding assistants. Instead of chaotic back-and-forth, GoopSpec enforces a disciplined **spec-driven workflow** that captures your intent, creates binding specifications, and delivers verified results.
19
+ **GoopSpec fixes this.**
21
20
 
22
- **The Problem:** AI assistants are powerful but unpredictable. They start coding before understanding requirements, miss edge cases, forget context, and deliver work that doesn't match what you actually wanted.
21
+ It's a spec-driven workflow for [OpenCode](https://opencode.ai) that forces clarity *before* code. You describe what you want, GoopSpec interviews you to uncover the edge cases, locks a specification you both agree on, then executes against that contract.
23
22
 
24
- **The Solution:** GoopSpec introduces **interactive questioning**, **contracts**, and **verification gates** that ensure the AI understands what you want before it writes a single line of code.
23
+ No more "that's not what I meant." No more scope creep. No more AI amnesia.
25
24
 
26
25
  ```
27
- Your Idea Interactive Plan → Research (Opt-in) → SpecifyExecute Accept
26
+ Discuss → Plan → Specify (lock it) → ExecuteAccept (verify it)
28
27
  ```
29
28
 
30
29
  ---
31
30
 
32
- ## Core Philosophy
31
+ ## Philosophy
32
+
33
+ - **Ask, Don't Assume** — Interview first, code second
34
+ - **Spec as Contract** — Lock requirements before execution
35
+ - **Memory-First** — Learn from every project
36
+ - **Scale to the Task** — Quick fixes skip gates, big features get the full workflow
33
37
 
34
- ### "Ask, Don't Assume"
35
- GoopSpec is interactive by default. It interviews you to uncover hidden requirements and ambiguities. If something is unclear, it asks clarifying questions rather than guessing.
38
+ ---
36
39
 
37
- ### "Spec as Contract"
38
- The specification is a binding agreement. Once locked, both you and the AI know exactly what will be delivered. No scope creep. No surprises.
40
+ ## The Workflow
39
41
 
40
- ### "Memory-First"
41
- Every agent searches memory before starting work, saves decisions during work, and persists learnings after. GoopSpec gets smarter with every project you complete.
42
+ ```
43
+ DISCUSS PLAN EXECUTE AUDIT CONFIRM
44
+ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐
45
+ │ What │ │ How │ │ Build │ │ Verify │ │ Accept │
46
+ │ do │ ──▶ │ will │ ──▶ │ it │ ──▶ │ it │ ──▶ │ it │
47
+ │ you │ │ we │ │ │ │ │ │ │
48
+ │ want? │ │ do it?│ │ │ │ │ │ │
49
+ └────────┘ └────────┘ └────────┘ └────────┘ └────────┘
50
+ │ │ │ │ │
51
+ Interview Create Waves of Check vs. You sign
52
+ to uncover locked atomic the spec off on it
53
+ requirements spec commits
54
+ │ │
55
+ └─────── CONTRACT GATE ─────────────────────────┘
56
+ (You confirm before and after)
57
+ ```
42
58
 
43
- ### "Unified Experience"
44
- A consistent, rich terminal UI (powered by Clack) keeps you informed with clear status indicators, spinners for long tasks, and human-friendly prompts.
59
+ ### Phase 1: Discuss
60
+ GoopSpec interviews you like a product manager. It asks questions, uncovers edge cases, and makes sure it actually understands what you want before touching any code.
45
61
 
46
- ### "Scale to the Task"
47
- Quick bug fix? GoopSpec routes to a lightweight path. Major feature? Full 5-phase workflow. The system detects task complexity and adapts.
62
+ ### Phase 2: Plan
63
+ Your requirements become a locked specification (SPEC.md) and execution blueprint (BLUEPRINT.md). This is the contract both sides agree on what will be delivered.
48
64
 
49
- ---
65
+ ### Phase 3: Execute
66
+ Wave-based implementation. Tasks run in ordered waves, each with atomic commits. Progress tracked in real-time. Pause and resume anytime.
50
67
 
51
- ## The Workflow
68
+ ### Phase 4: Audit
69
+ The Verifier agent checks every requirement against the actual implementation. Did we build what we said we'd build? Tests run, code reviewed.
52
70
 
53
- ```
54
- ┌─────────────┐ ┌─────────────┐
55
- │ PLAN │ ◀──▶ │ RESEARCH │
56
- │ (Interview) │ │ (Opt-in) │
57
- └─────────────┘ └─────────────┘
58
-
59
-
60
- ┌─────────────┐ ┌─────────────┐
61
- │ SPECIFY │ ──▶ │ EXECUTE │ ──▶ │ ACCEPT │
62
- │ (Contract) │ │ (Build) │ │ (Verify) │
63
- └─────────────┘ └─────────────┘ └─────────────┘
64
- ```
65
-
66
- ### Phase 1: Plan (Interactive)
67
- Capture your intent. GoopSpec acts as a product manager, conducting an interview to:
68
- - Clarify ambiguous requirements
69
- - Identify edge cases
70
- - Suggest technical approaches
71
- - confirm the "Definition of Done"
72
-
73
- ### Phase 2: Research (Opt-in)
74
- Triggered only when needed or requested. Specialized agents explore:
75
- - **Researcher** - Deep domain knowledge & options
76
- - **Explorer** - Existing codebase patterns
77
- - **Librarian** - Documentation & APIs
78
-
79
- ### Phase 3: Specify (CONTRACT GATE)
80
- Lock the specification. This is the contract:
81
- - **Must-Haves** - Non-negotiable requirements
82
- - **Out of Scope** - Explicit exclusions
83
- - **You must confirm before execution begins.**
84
-
85
- ### Phase 4: Execute
86
- Wave-based implementation with atomic commits:
87
- - Tasks grouped into sequential waves
88
- - Real-time progress tracking via Unified UI
89
- - Checkpoints for pausing/resuming
90
-
91
- ### Phase 5: Accept (ACCEPTANCE GATE)
92
- Verify the implementation:
93
- - Automated tests run
94
- - Security audit performed
95
- - **You must confirm completion**
71
+ ### Phase 5: Confirm
72
+ You verify the results and accept the work. The AI can't declare itself done — you have to sign off.
96
73
 
97
74
  ---
98
75
 
99
76
  ## Quick Start
100
77
 
101
- ### Installation
78
+ **60 seconds to your first spec-driven feature.**
102
79
 
103
- Add `opencode-goopspec` to your OpenCode configuration (`opencode.json` in your project root or `~/.config/opencode/opencode.json`):
80
+ ### 1. Install
81
+
82
+ Add to your OpenCode config (`opencode.json`):
104
83
 
105
84
  ```json
106
- {
107
- "plugins": ["opencode-goopspec"]
108
- }
85
+ { "plugins": ["opencode-goopspec"] }
109
86
  ```
110
87
 
111
- ### Build From Source
88
+ Or build from source:
112
89
 
113
90
  ```bash
114
- # Clone the repository
115
91
  git clone https://github.com/hffmnnj/opencode-goopspec.git
116
- cd opencode-goopspec
117
-
118
- # Install dependencies
119
- bun install
120
-
121
- # Build
122
- bun run build
123
- ```
124
-
125
- Then add the local path to your OpenCode configuration:
126
-
127
- ```json
128
- {
129
- "plugins": ["./path/to/opencode-goopspec"]
130
- }
92
+ cd opencode-goopspec && bun install && bun run build
131
93
  ```
132
94
 
133
- ### First-Time Setup
95
+ ### 2. Setup
134
96
 
135
97
  ```
136
98
  /goop-setup
137
99
  ```
138
100
 
139
- This wizard configures:
140
- - Model preferences for orchestrator and agents
141
- - MCP server connections
142
- - Memory system settings
143
-
144
- ### Start Your First Project
101
+ ### 3. Start Building
145
102
 
146
103
  ```
147
- /goop-plan "Add user authentication with OAuth"
104
+ /goop-discuss "Add dark mode to the settings page"
148
105
  ```
149
106
 
150
- GoopSpec will guide you through the entire workflow.
107
+ GoopSpec interviews you, creates a locked spec, executes in waves, and asks you to verify. Done.
151
108
 
152
109
  ---
153
110
 
154
- ## Task Modes
155
-
156
- GoopSpec scales to any task size:
111
+ ## Commands Reference
157
112
 
158
- | Mode | When to Use | Workflow |
159
- |------|-------------|----------|
160
- | **Quick** | Bug fixes, typos, small tweaks | Plan → Execute → Accept |
161
- | **Standard** | Features, moderate complexity | Full 5-phase workflow |
162
- | **Comprehensive** | System redesigns, major refactors | Extended research + multiple waves |
163
- | **Milestone** | Major releases, multi-feature work | Multiple cycles + archive with learnings |
113
+ All 20 commands, organized by what you're doing.
164
114
 
165
- ### Quick Mode Example
166
- ```
167
- /goop-quick "Fix the typo in the login button"
168
- ```
169
- Skip Research and Specify phases. Ship fast.
115
+ ### Workflow Commands
170
116
 
171
- ### Milestone Mode Example
172
- ```
173
- /goop-milestone "v1.0 Authentication System"
174
- ```
175
- Groups related work, archives on completion, extracts learnings.
117
+ | Command | Description |
118
+ |---------|-------------|
119
+ | `/goop-discuss` | Start discussion — interview to gather requirements |
120
+ | `/goop-plan` | Create SPEC.md and BLUEPRINT.md from requirements |
121
+ | `/goop-specify` | Lock the specification (CONTRACT GATE) |
122
+ | `/goop-execute` | Begin wave-based implementation |
123
+ | `/goop-accept` | Verify and accept work (ACCEPTANCE GATE) |
176
124
 
177
- ---
125
+ ### Task Mode Commands
178
126
 
179
- ## Commands Reference
127
+ | Command | Description |
128
+ |---------|-------------|
129
+ | `/goop-quick [task]` | Fast-track a small task (skip gates) |
130
+ | `/goop-milestone [name]` | Start a versioned milestone |
131
+ | `/goop-complete` | Complete and archive current milestone |
180
132
 
181
- ### Workflow Commands
133
+ ### Research & Debug
182
134
 
183
135
  | Command | Description |
184
136
  |---------|-------------|
185
- | `/goop-plan [intent]` | Start Plan phase - capture intent and requirements |
186
- | `/goop-research` | Start Research phase - parallel exploration |
187
- | `/goop-specify` | Lock specification (CONTRACT GATE) |
188
- | `/goop-execute` | Start Execute phase - wave-based implementation |
189
- | `/goop-accept` | Verify and accept (ACCEPTANCE GATE) |
137
+ | `/goop-research` | Deep research on unknowns or risks |
138
+ | `/goop-debug` | Scientific debugging workflow |
139
+ | `/goop-map-codebase` | Analyze existing codebase structure |
190
140
 
191
- ### Task Mode Commands
141
+ ### Memory Commands
192
142
 
193
143
  | Command | Description |
194
144
  |---------|-------------|
195
- | `/goop-quick [task]` | Fast-track small tasks |
196
- | `/goop-milestone [name]` | Start versioned milestone |
197
- | `/goop-complete` | Complete and archive milestone |
145
+ | `/goop-recall [query]` | Search past work and memory |
146
+ | `/goop-remember [note]` | Save important context to memory |
147
+ | `/goop-memory` | View memory system status |
198
148
 
199
149
  ### Utility Commands
200
150
 
201
151
  | Command | Description |
202
152
  |---------|-------------|
203
- | `/goop-status` | Show comprehensive workflow status |
153
+ | `/goop-status` | Show current workflow state |
154
+ | `/goop-setup` | First-time setup wizard |
204
155
  | `/goop-amend [change]` | Propose spec changes after lock |
205
- | `/goop-pause` | Save checkpoint to pause work |
206
- | `/goop-resume [id]` | Resume from checkpoint |
207
- | `/goop-recall [query]` | Search past work and memory |
208
- | `/goop-debug` | Scientific debugging workflow |
209
- | `/goop-map-codebase` | Analyze existing codebase |
156
+ | `/goop-pause` | Save checkpoint and pause work |
157
+ | `/goop-resume [id]` | Resume from a checkpoint |
158
+ | `/goop-help` | Show help and available commands |
210
159
 
211
160
  ---
212
161
 
213
- ## The Orchestrator
162
+ ## The Agents
163
+
164
+ GoopSpec uses an orchestrator + specialist model. The Orchestrator (**The Conductor**) never writes code — it coordinates work by delegating to 11 specialized agents.
165
+
166
+ Each agent has a default model optimized for its task. **All models are configurable via `/goop-setup`.**
167
+
168
+ ### The Orchestrator
214
169
 
215
- The GoopSpec Orchestrator is your primary interface. It's a **conductor**, not a player:
170
+ **goop-orchestrator** *The Conductor* (`anthropic/claude-opus-4-5`)
216
171
 
217
- ### What It Does
218
172
  - Coordinates all work through delegation
219
- - Maintains clean context for consistent quality
220
- - Tracks progress via CHRONICLE.md
173
+ - Maintains clean context across tasks
174
+ - Tracks progress in CHRONICLE.md
221
175
  - Applies deviation rules automatically
222
- - Presents gates for user confirmation
223
-
224
- ### What It Never Does
225
- - Write implementation code directly
226
- - Make architectural decisions alone
227
- - "Quickly fix" things itself
228
- - Modify files outside spec scope
229
-
230
- ### Delegation to Specialists
231
-
232
- The Orchestrator delegates to 12 specialized agents:
233
-
234
- | Agent | Role | Use Case |
235
- |-------|------|----------|
236
- | `goop-executor` | The Builder | Implementation tasks |
237
- | `goop-planner` | The Architect | Creating blueprints |
238
- | `goop-researcher` | The Scholar | Deep domain research |
239
- | `goop-explorer` | The Scout | Fast codebase mapping |
240
- | `goop-librarian` | The Archivist | Documentation lookup |
241
- | `goop-verifier` | The Auditor | Spec compliance checking |
242
- | `goop-debugger` | The Detective | Scientific debugging |
243
- | `goop-designer` | The Artisan | UI/UX design |
244
- | `goop-tester` | The Guardian | Test writing |
245
- | `goop-writer` | The Scribe | Documentation |
246
- | `goop-librarian` | The Archivist | Code/doc search |
247
- | `memory-distiller` | The Curator | Knowledge extraction |
176
+ - Presents contract gates for your confirmation
177
+
178
+ The Conductor never writes implementation code. It directs specialists.
179
+
180
+ ### The Specialists
181
+
182
+ | Agent | Alias | Default Model | What They Do |
183
+ |-------|-------|---------------|--------------|
184
+ | `goop-executor` | The Builder | `openai/gpt-5.2-codex` | Writes implementation code |
185
+ | `goop-planner` | The Architect | `anthropic/claude-opus-4-5` | Creates specs and blueprints |
186
+ | `goop-researcher` | The Scholar | `openai/gpt-5.2` | Deep domain research |
187
+ | `goop-explorer` | The Scout | `google/gemini-3-flash` | Fast codebase mapping |
188
+ | `goop-verifier` | The Auditor | `openai/gpt-5.2-codex` | Verifies against spec |
189
+ | `goop-debugger` | The Detective | `openai/gpt-5.2-codex` | Scientific debugging |
190
+ | `goop-designer` | The Artisan | `anthropic/claude-opus-4-5` | UI/UX design |
191
+ | `goop-tester` | The Guardian | `kimi-for-coding/k2p5` | Test writing |
192
+ | `goop-writer` | The Scribe | `google/gemini-3-pro-high` | Documentation |
193
+ | `goop-librarian` | The Archivist | `openai/gpt-5.2` | Code and doc search |
194
+ | `memory-distiller` | The Curator | `zai-coding-plan/glm-4.7` | Extracts learnings to memory |
248
195
 
249
196
  ---
250
197
 
@@ -351,213 +298,186 @@ When milestones complete:
351
298
 
352
299
  ## Contract Gates
353
300
 
354
- Two mandatory confirmation points ensure alignment:
355
-
356
- ### Specify Gate (Pre-Execution)
357
- ```
358
- ╭─ ⬢ GoopSpec ───────────────────────────────────────╮
359
- │ │
360
- 🔒 CONTRACT GATE
361
- │ │
362
- MUST HAVES (I commit to delivering):
363
- User can log in with email/password
364
- • Session persists across refresh │
365
- • Error messages shown on failure │
366
- │ │
367
- OUT OF SCOPE: │
368
- │ • OAuth integration (future milestone) │
369
- │ │
370
- │ ───────────────────────────────────────────── │
371
- │ Type "confirm" to lock the specification.
372
- │ │
373
- ╰────────────────────────────────────────────────────╯
374
- ```
375
-
376
- ### Accept Gate (Post-Execution)
377
- ```
378
- ╭─ ⬢ GoopSpec ───────────────────────────────────────╮
379
- │ │
380
- ACCEPTANCE GATE │
381
- │ │
382
- VERIFICATION RESULTS: │
383
- │ ☑ User can log in - VERIFIED │
384
- │ (test: auth.test.ts:15) │
385
- │ ☑ Session persists - VERIFIED │
386
- │ (test: session.test.ts:42) │
387
- │ ☑ Error messages - VERIFIED (manual) │
388
- │ │
389
- │ Tests: 24/24 passing │
390
- │ Build: Successful │
391
- │ │
392
- │ ───────────────────────────────────────────── │
393
- │ Type "accept" to confirm completion. │
394
- │ │
395
- ╰────────────────────────────────────────────────────╯
301
+ Two points where you must confirm. This is what makes GoopSpec different — the AI can't just declare itself done.
302
+
303
+ ### Specify Gate (Before Execution)
304
+
305
+ ```
306
+ +-------------------------------------------------------+
307
+ | CONTRACT GATE |
308
+ +-------------------------------------------------------+
309
+ | MUST-HAVES: | OUT OF SCOPE: |
310
+ |Login with email | OAuth (future) |
311
+ | • Session persistence | • Password reset |
312
+ | • Error messages | |
313
+ +-------------------------------------------------------+
314
+ | Type "confirm" to lock. Changes require /goop-amend. |
315
+ +-------------------------------------------------------+
316
+ ```
317
+
318
+ Once locked, this is the contract. Both you and the AI know exactly what will be built.
319
+
320
+ ### Accept Gate (After Execution)
321
+
322
+ ```
323
+ +-------------------------------------------------------+
324
+ | ACCEPTANCE GATE |
325
+ +-------------------------------------------------------+
326
+ | VERIFIED: |
327
+ |Login with email (test: auth.test.ts:15) |
328
+ | ✓ Session persistence (test: session.test.ts:42) |
329
+ | Error messages (manual check) |
330
+ | |
331
+ | Tests: 24/24 | Build: OK |
332
+ +-------------------------------------------------------+
333
+ | Type "accept" to confirm completion. |
334
+ +-------------------------------------------------------+
396
335
  ```
397
336
 
337
+ The AI can't mark itself done. You verify, you accept.
338
+
398
339
  ---
399
340
 
400
- ## Use Cases
341
+ ## Example: Building a Feature
401
342
 
402
- ### 1. Building a New Feature
343
+ Here's what it actually looks like to build a feature with GoopSpec.
403
344
 
345
+ **You want:** Add user notifications to your app.
346
+
347
+ ### Step 1: Discuss
348
+
349
+ ```
350
+ /goop-discuss "Add user notifications"
404
351
  ```
405
- You: "I need to add a notification system to my app"
406
352
 
407
- GoopSpec: "Let me understand what you need..."
408
- → Asks about notification types, delivery methods, UI
409
- → Creates SPEC.md with must-haves
410
- → Researches best practices
411
- → Presents plan for approval
412
- → Implements in waves with atomic commits
413
- → Verifies against spec
414
- → You confirm completion
353
+ GoopSpec asks questions:
415
354
  ```
355
+ > What triggers notifications? (new messages, mentions, system alerts?)
356
+ > How should they be delivered? (in-app, email, push?)
357
+ > Do users need to configure notification preferences?
358
+ > What happens when a notification is clicked?
359
+ ```
360
+
361
+ You answer. GoopSpec builds understanding.
416
362
 
417
- ### 2. Quick Bug Fix
363
+ ### Step 2: Plan
418
364
 
419
365
  ```
420
- /goop-quick "Fix the date formatting bug in the dashboard"
366
+ /goop-plan
421
367
  ```
422
368
 
423
- Skips research/specify, ships the fix fast, still creates atomic commit.
369
+ GoopSpec creates:
370
+ - **SPEC.md** — Must-haves and out-of-scope
371
+ - **BLUEPRINT.md** — Waves of tasks with acceptance criteria
424
372
 
425
- ### 3. Major Refactor
373
+ ### Step 3: Specify (Contract Gate)
426
374
 
427
375
  ```
428
- /goop-milestone "v2.0 Database Migration"
429
-
430
- GoopSpec: Creates milestone tracking
431
- → Deep research on migration strategies
432
- Locked spec with rollback plan
433
- Multi-wave execution with checkpoints
434
- Comprehensive verification
435
- → Archives with extracted learnings
376
+ +--------------------------------------------------------+
377
+ | CONTRACT GATE |
378
+ +--------------------------------------------------------+
379
+ | MUST-HAVES: |
380
+ | • In-app notification badge on header |
381
+ | • Notification dropdown with mark-as-read |
382
+ | • User preferences page for notification types |
383
+ | |
384
+ | OUT OF SCOPE: Email notifications, push notifications |
385
+ +--------------------------------------------------------+
386
+ | Type "confirm" to lock this specification. |
387
+ +--------------------------------------------------------+
436
388
  ```
437
389
 
438
- ### 4. Brownfield Project
390
+ You type `confirm`. The spec is now locked.
391
+
392
+ ### Step 4: Execute
439
393
 
440
394
  ```
441
- /goop-map-codebase
395
+ /goop-execute
442
396
  ```
443
397
 
444
- Analyzes existing codebase:
445
- - Stack detection (frameworks, libraries)
446
- - Pattern discovery (conventions, architecture)
447
- - Integration point mapping
448
- - Technical debt identification
398
+ GoopSpec executes in waves:
399
+ ```
400
+ Wave 1: Foundation (DB schema, types)
401
+ Task 1.1: Create notifications table
402
+ Task 1.2: Add TypeScript interfaces
449
403
 
450
- ### 5. Systematic Debugging
404
+ Wave 2: Core (business logic)
405
+ ✓ Task 2.1: Notification service
406
+ ✓ Task 2.2: Mark-as-read endpoint
451
407
 
408
+ Wave 3: UI (components)
409
+ ✓ Task 3.1: NotificationBadge component
410
+ ✓ Task 3.2: NotificationDropdown component
411
+ ✓ Task 3.3: Preferences page
452
412
  ```
453
- /goop-debug "Users are getting logged out randomly"
413
+
414
+ Each task gets an atomic commit.
415
+
416
+ ### Step 5: Accept (Acceptance Gate)
417
+
418
+ ```
419
+ +--------------------------------------------------------+
420
+ | ACCEPTANCE GATE |
421
+ +--------------------------------------------------------+
422
+ | VERIFIED: |
423
+ | ✓ In-app notification badge — test: header.test.ts |
424
+ | ✓ Notification dropdown — test: dropdown.test.ts |
425
+ | ✓ User preferences page — manual verification |
426
+ | |
427
+ | Tests: 12/12 passing | Build: Successful |
428
+ +--------------------------------------------------------+
429
+ | Type "accept" to confirm completion. |
430
+ +--------------------------------------------------------+
454
431
  ```
455
432
 
456
- Scientific method approach:
457
- 1. Form hypothesis
458
- 2. Design experiment
459
- 3. Execute test
460
- 4. Analyze results
461
- 5. Iterate until root cause found
433
+ You type `accept`. Done.
462
434
 
463
435
  ---
464
436
 
465
- ## Configuration
437
+ ## Other Use Cases
466
438
 
467
- ### Project Configuration
439
+ ### Quick Bug Fix
468
440
 
469
- `.goopspec/config.json`:
441
+ ```
442
+ /goop-quick "Fix the date formatting bug in the dashboard"
443
+ ```
470
444
 
471
- ```json
472
- {
473
- "version": "0.1.0",
474
- "projectName": "my-project",
475
- "enforcement": "warn",
476
- "orchestrator": {
477
- "enableAsDefault": true,
478
- "model": "anthropic/claude-opus-4-5",
479
- "thinkingBudget": 32000,
480
- "phaseGates": "ask",
481
- "waveExecution": "sequential"
482
- },
483
- "memory": {
484
- "enabled": true,
485
- "capture": {
486
- "captureToolUse": true,
487
- "capturePhaseChanges": true
488
- }
489
- },
490
- "agents": {
491
- "goop-executor": { "model": "anthropic/claude-sonnet-4-5" },
492
- "goop-researcher": { "model": "anthropic/claude-sonnet-4-5" }
493
- }
494
- }
495
- ```
496
-
497
- ### Enforcement Levels
498
-
499
- | Level | Behavior |
500
- |-------|----------|
501
- | `assist` | Suggestions only |
502
- | `warn` | Warn on scope violations |
503
- | `strict` | Block modifications outside spec |
445
+ Skips gates, ships fast, still makes atomic commit.
504
446
 
505
- ---
447
+ ### Major Refactor
506
448
 
507
- ## Hooks & Tools
449
+ ```
450
+ /goop-milestone "v2.0 Database Migration"
451
+ ```
508
452
 
509
- ### Hooks
453
+ Full workflow with deep research, locked spec with rollback plan, multi-wave execution, and archived learnings.
510
454
 
511
- | Hook | Purpose |
512
- |------|---------|
513
- | `continuation-enforcer` | Prevents stopping with incomplete todos |
514
- | `comment-checker` | Detects excessive AI comments in code |
515
- | `system-transform` | Injects context into conversations |
516
- | `tool-lifecycle` | Tracks tool usage and modifications |
455
+ ### Brownfield Project
517
456
 
518
- ### Tools
519
-
520
- | Tool | Purpose |
521
- |------|---------|
522
- | `goop_status` | Show workflow state, phases, progress |
523
- | `goop_checkpoint` | Save/load/list execution checkpoints |
524
- | `task` | Delegate tasks to specialized subagents |
525
- | `goop_skill` | Load domain knowledge |
526
- | `goop_adl` | Read/append Automated Decision Log |
527
- | `goop_spec` | Read/validate spec and plan files |
528
- | `session_search` | Search past session history |
529
- | `memory_*` | Save, search, note, decision, forget |
457
+ ```
458
+ /goop-map-codebase
459
+ ```
530
460
 
531
- ---
461
+ Maps existing codebase: stack detection, pattern discovery, integration points.
532
462
 
533
- ## Best Practices
463
+ ### Systematic Debugging
534
464
 
535
- ### Do
536
- - Let GoopSpec ask clarifying questions
537
- - Define clear success criteria
538
- - Review the spec before confirming
539
- - Use checkpoints for long tasks
540
- - Let it learn from completed work
465
+ ```
466
+ /goop-debug "Users are getting logged out randomly"
467
+ ```
541
468
 
542
- ### Don't
543
- - Skip the Plan phase for non-trivial work
544
- - Approve specs you haven't read
545
- - Interrupt during wave execution
546
- - Ignore deviation warnings
547
- - Forget to confirm at gates
469
+ Scientific method: hypothesis → experiment → analyze → iterate.
548
470
 
549
471
  ---
550
472
 
551
- ## Comparison
473
+ ## Configuration
474
+
475
+ Configure via `.goopspec/config.json` after running `/goop-setup`. Key settings:
552
476
 
553
- | Feature | Traditional AI | GoopSpec |
554
- |---------|---------------|----------|
555
- | Requirements | Inferred/assumed | Explicitly captured |
556
- | Scope | Often creeps | Locked in spec |
557
- | Verification | Manual | Automated + gates |
558
- | Memory | Per-session | Persistent |
559
- | Context | Degrading | Fresh per agent |
560
- | Commits | Variable | Atomic per task |
477
+ - **orchestrator.model** Model for the Conductor (default: claude-opus-4-5)
478
+ - **agents.{name}.model** — Model for specific agents
479
+ - **enforcement** `assist`, `warn`, or `strict`
480
+ - **memory.enabled** Persistent memory on/off
561
481
 
562
482
  ---
563
483
 
@@ -595,6 +515,7 @@ opencode-goopspec/
595
515
  ├── core/ # Core types and config
596
516
  ├── features/ # Feature modules
597
517
  │ ├── archive/
518
+ │ ├── enforcement/
598
519
  │ ├── memory/
599
520
  │ ├── mode-detection/
600
521
  │ ├── parallel-research/