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.
- package/README.md +255 -331
- package/agents/goop-debugger.md +175 -172
- package/agents/goop-designer.md +232 -160
- package/agents/goop-executor.md +197 -127
- package/agents/goop-explorer.md +148 -150
- package/agents/goop-librarian.md +218 -164
- package/agents/goop-orchestrator.md +392 -280
- package/agents/goop-planner.md +331 -153
- package/agents/goop-researcher.md +198 -126
- package/agents/goop-tester.md +277 -202
- package/agents/goop-verifier.md +191 -201
- package/agents/goop-writer.md +241 -133
- package/agents/memory-distiller.md +228 -136
- package/commands/goop-accept.md +434 -160
- package/commands/goop-amend.md +35 -151
- package/commands/goop-complete.md +39 -183
- package/commands/goop-debug.md +33 -298
- package/commands/goop-discuss.md +381 -85
- package/commands/goop-execute.md +391 -108
- package/commands/goop-help.md +11 -0
- package/commands/goop-map-codebase.md +16 -3
- package/commands/goop-memory.md +11 -0
- package/commands/goop-milestone.md +29 -192
- package/commands/goop-pause.md +31 -40
- package/commands/goop-plan.md +458 -46
- package/commands/goop-quick.md +38 -142
- package/commands/goop-recall.md +11 -0
- package/commands/goop-remember.md +12 -0
- package/commands/goop-research.md +52 -73
- package/commands/goop-resume.md +28 -37
- package/commands/goop-setup.md +225 -124
- package/commands/goop-specify.md +321 -121
- package/commands/goop-status.md +256 -110
- package/dist/index.js +6289 -2820
- package/package.json +1 -1
- package/references/context-injection.md +307 -0
- package/references/discovery-interview.md +278 -0
- package/references/enforcement-system.md +213 -0
- package/references/handoff-protocol.md +290 -0
- package/references/interactive-questioning.md +122 -0
- package/references/model-profiles.md +1 -1
- package/references/phase-gates.md +360 -0
- package/references/plugin-architecture.md +212 -0
- package/references/response-format.md +41 -9
- package/references/subagent-protocol.md +83 -33
- package/references/ui-interaction-patterns.md +133 -0
- package/references/visual-style.md +199 -0
- package/references/workflow-accept.md +60 -273
- package/references/workflow-execute.md +63 -274
- package/references/workflow-plan.md +86 -133
- package/references/workflow-research.md +78 -186
- package/references/workflow-specify.md +64 -221
- package/references/xml-response-schema.md +236 -0
- package/templates/blueprint.md +88 -41
- package/templates/chronicle.md +130 -16
- package/templates/handoff.md +140 -0
- package/templates/project.md +114 -0
- package/templates/requirements.md +121 -0
- package/templates/spec.md +85 -20
- package/templates/state.md +103 -0
package/commands/goop-specify.md
CHANGED
|
@@ -1,145 +1,345 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: goop-specify
|
|
3
|
-
description: Lock the specification
|
|
3
|
+
description: Lock the specification contract
|
|
4
|
+
phase: specify
|
|
5
|
+
requires: planning_complete
|
|
6
|
+
next-step: "Once the spec is locked and confirmed, begin implementation"
|
|
7
|
+
next-command: /goop-execute
|
|
8
|
+
alternatives:
|
|
9
|
+
- command: /goop-amend
|
|
10
|
+
when: "If you need to modify the locked specification"
|
|
11
|
+
- command: /goop-pause
|
|
12
|
+
when: "To save progress and continue later"
|
|
4
13
|
---
|
|
5
14
|
|
|
6
|
-
#
|
|
15
|
+
# /goop-specify
|
|
7
16
|
|
|
8
|
-
Lock the specification
|
|
17
|
+
**Lock the specification.** Create a binding contract between user and agent.
|
|
9
18
|
|
|
10
19
|
## Usage
|
|
11
20
|
|
|
12
|
-
```
|
|
21
|
+
```bash
|
|
13
22
|
/goop-specify
|
|
14
23
|
```
|
|
15
24
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
20
|
-
│ PLAN │ ──▶ │ RESEARCH │ ──▶ │ SPECIFY │
|
|
21
|
-
│ (Intent) │ │ (Explore) │ │ (Contract) │
|
|
22
|
-
└─────────────┘ └─────────────┘ └─────────────┘
|
|
23
|
-
↑
|
|
24
|
-
(You are here)
|
|
25
|
-
|
|
26
|
-
╔══════════════════════════════════════════════╗
|
|
27
|
-
║ CONTRACT GATE ║
|
|
28
|
-
║ User MUST confirm before execution begins ║
|
|
29
|
-
╚══════════════════════════════════════════════╝
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
The Specify phase answers: **What exactly will we deliver?**
|
|
33
|
-
|
|
34
|
-
## What Happens
|
|
35
|
-
|
|
36
|
-
1. **Synthesize Plan + Research** - Combine intent with technical approach
|
|
37
|
-
2. **Define Must-Haves** - Observable, achievable, specific deliverables (3-7 items)
|
|
38
|
-
3. **Set Boundaries** - Explicitly state what's out of scope
|
|
39
|
-
4. **Create SPEC.md** - The locked specification document
|
|
40
|
-
5. **Create BLUEPRINT.md** - Wave-based execution plan
|
|
41
|
-
6. **Present Contract** - Show must-haves, nice-to-haves, out-of-scope
|
|
42
|
-
7. **Wait for Confirmation** - User MUST type "confirm" to proceed
|
|
43
|
-
|
|
44
|
-
## The Contract Concept
|
|
45
|
-
|
|
46
|
-
Once locked, the specification becomes a binding agreement:
|
|
47
|
-
- **Agent commits** to delivering must-haves
|
|
48
|
-
- **User commits** to accepting if must-haves are met
|
|
49
|
-
- **Changes require** explicit amendment via `/goop-amend`
|
|
50
|
-
|
|
51
|
-
### Why Contracts Matter
|
|
52
|
-
|
|
53
|
-
**Without a locked spec:**
|
|
54
|
-
- Scope creeps silently
|
|
55
|
-
- "Almost done" never ends
|
|
56
|
-
- Success criteria shift
|
|
57
|
-
- Both parties frustrated
|
|
58
|
-
|
|
59
|
-
**With a locked spec:**
|
|
60
|
-
- Clear deliverables
|
|
61
|
-
- Measurable completion
|
|
62
|
-
- Explicit change process
|
|
63
|
-
- Satisfied expectations
|
|
64
|
-
|
|
65
|
-
## Artifacts Created
|
|
66
|
-
|
|
67
|
-
- `SPEC.md` - Locked specification with:
|
|
68
|
-
- Intent summary
|
|
69
|
-
- Must-haves (guaranteed)
|
|
70
|
-
- Nice-to-haves (best effort)
|
|
71
|
-
- Out-of-scope (explicitly excluded)
|
|
72
|
-
- Technical approach
|
|
73
|
-
- Target files
|
|
74
|
-
- Acceptance criteria
|
|
75
|
-
|
|
76
|
-
- `BLUEPRINT.md` - Wave-based execution plan with:
|
|
77
|
-
- Wave 1: Foundation tasks
|
|
78
|
-
- Wave 2: Core tasks
|
|
79
|
-
- Wave 3: Integration tasks
|
|
80
|
-
- Wave 4: Polish tasks
|
|
81
|
-
|
|
82
|
-
## Confirmation Prompt
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
╭─ ⬢ GoopSpec ───────────────────────────────────────╮
|
|
86
|
-
│ │
|
|
87
|
-
│ 🔒 CONTRACT GATE │
|
|
88
|
-
│ │
|
|
89
|
-
│ I'm ready to lock the specification. │
|
|
90
|
-
│ │
|
|
91
|
-
│ MUST HAVES (I commit to delivering): │
|
|
92
|
-
│ • User can log in with email/password │
|
|
93
|
-
│ • Session persists across refresh │
|
|
94
|
-
│ • Error messages displayed │
|
|
95
|
-
│ │
|
|
96
|
-
│ NICE TO HAVES (Best effort): │
|
|
97
|
-
│ • Remember me option │
|
|
98
|
-
│ │
|
|
99
|
-
│ OUT OF SCOPE: │
|
|
100
|
-
│ • OAuth providers (future enhancement) │
|
|
101
|
-
│ • Password reset (separate feature) │
|
|
102
|
-
│ │
|
|
103
|
-
│ ACCEPTANCE CRITERIA: │
|
|
104
|
-
│ 1. User can successfully log in │
|
|
105
|
-
│ 2. Tests pass for auth flow │
|
|
106
|
-
│ 3. Session management works │
|
|
107
|
-
│ │
|
|
108
|
-
│ ───────────────────────────────────────────── │
|
|
109
|
-
│ Type "confirm" to lock and proceed. │
|
|
110
|
-
│ Type "amend" to request changes. │
|
|
111
|
-
│ │
|
|
112
|
-
╰────────────────────────────────────────────────────╯
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Example
|
|
116
|
-
|
|
117
|
-
After research on authentication:
|
|
25
|
+
## Gate Requirement
|
|
118
26
|
|
|
119
27
|
```
|
|
120
|
-
|
|
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
|
+
|
|
121
101
|
```
|
|
102
|
+
## 🔮 GoopSpec · Contract Gate
|
|
103
|
+
|
|
104
|
+
📜 Review and confirm the specification
|
|
105
|
+
|
|
106
|
+
### SPECIFICATION: [Name]
|
|
107
|
+
|
|
108
|
+
#### Must-Haves (The Contract)
|
|
109
|
+
|
|
110
|
+
| ID | Requirement | Covered By |
|
|
111
|
+
|----|-------------|------------|
|
|
112
|
+
| MH1 | [Title] | Wave X, Tasks Y |
|
|
113
|
+
| MH2 | [Title] | Wave X, Tasks Y |
|
|
114
|
+
|
|
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
|
|
122
168
|
|
|
123
|
-
|
|
169
|
+
## Accomplished
|
|
170
|
+
- Spec locked with [N] must-haves
|
|
171
|
+
- Traceability verified at 100%
|
|
124
172
|
|
|
125
|
-
## Next
|
|
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
|
+
```
|
|
230
|
+
|
|
231
|
+
## Output
|
|
232
|
+
|
|
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
|
+
```
|
|
126
316
|
|
|
127
|
-
|
|
128
|
-
- `/goop-execute` - Start wave-based implementation
|
|
317
|
+
## Success Criteria
|
|
129
318
|
|
|
130
|
-
|
|
131
|
-
-
|
|
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`
|
|
132
327
|
|
|
133
|
-
|
|
134
|
-
- `/goop-amend [change]` - Propose changes to locked spec
|
|
328
|
+
## Anti-Patterns
|
|
135
329
|
|
|
136
|
-
|
|
330
|
+
**DON'T:**
|
|
331
|
+
- Skip the gate check
|
|
332
|
+
- Lock without user confirmation
|
|
333
|
+
- Proceed with incomplete traceability
|
|
334
|
+
- Skip handoff generation
|
|
137
335
|
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
336
|
+
**DO:**
|
|
337
|
+
- Verify 100% traceability before presenting
|
|
338
|
+
- Require explicit "confirm" keyword
|
|
339
|
+
- Log the lock to memory
|
|
340
|
+
- Generate clear handoff
|
|
142
341
|
|
|
143
342
|
---
|
|
144
343
|
|
|
145
|
-
|
|
344
|
+
*Specification Lock Protocol v0.1.4*
|
|
345
|
+
*"The spec is a contract. Lock it before you build."*
|