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
@@ -2,14 +2,26 @@
2
2
 
3
3
  All GoopSpec subagents follow a standardized protocol for memory usage, planning file access, and communication with the orchestrator.
4
4
 
5
- ## Core Principle
5
+ ## Core Principles
6
6
 
7
7
  ```
8
- ╔════════════════════════════════════════════════════════════════╗
9
- SUBAGENTS ARE MEMORY-FIRST.
10
- Search before starting. Save during work. Persist after.
11
- Decisions and learnings flow through memory.
12
- ╚════════════════════════════════════════════════════════════════╝
8
+ +================================================================+
9
+ | SUBAGENTS ARE MEMORY-FIRST. |
10
+ | Search before starting. Save during work. Persist after. |
11
+ | Decisions and learnings flow through memory. |
12
+ +================================================================+
13
+
14
+ +================================================================+
15
+ | SUBAGENTS USE XML RESPONSE ENVELOPES. |
16
+ | Every response ends with a <goop_report> XML block. |
17
+ | See references/xml-response-schema.md for full format. |
18
+ +================================================================+
19
+
20
+ +================================================================+
21
+ | SUBAGENTS LOAD PROJECT CONTEXT. |
22
+ | Read PROJECT_KNOWLEDGE_BASE.md for conventions. |
23
+ | Align work with spec must-haves. |
24
+ +================================================================+
13
25
  ```
14
26
 
15
27
  ## The Memory-First Protocol
@@ -19,20 +31,26 @@ All GoopSpec subagents follow a standardized protocol for memory usage, planning
19
31
  Every subagent MUST:
20
32
 
21
33
  ```typescript
22
- // 1. Search for relevant past decisions
34
+ // 1. Read project state
35
+ Read(".goopspec/state.json")
36
+
37
+ // 2. Read project knowledge base
38
+ Read(".goopspec/PROJECT_KNOWLEDGE_BASE.md") // If exists
39
+
40
+ // 3. Search for relevant past decisions
23
41
  memory_search({
24
42
  query: "[task-specific query]",
25
43
  concepts: ["relevant", "concepts"],
26
44
  types: ["decision", "observation"]
27
45
  })
28
46
 
29
- // 2. Read the specification
47
+ // 4. Read the specification
30
48
  Read(".goopspec/SPEC.md")
31
49
 
32
- // 3. Read current state
50
+ // 5. Read current state
33
51
  Read(".goopspec/CHRONICLE.md")
34
52
 
35
- // 4. Read the task details
53
+ // 6. Read the task details
36
54
  Read(".goopspec/BLUEPRINT.md")
37
55
  ```
38
56
 
@@ -164,31 +182,55 @@ Research findings. Research agents:
164
182
 
165
183
  ## Communication with Orchestrator
166
184
 
167
- ### Response Format
168
-
169
- Subagents return structured results:
170
-
171
- ```typescript
172
- interface SubagentResponse {
173
- status: "complete" | "partial" | "blocked" | "failed";
174
- summary: string; // What was accomplished
175
- files_modified?: string[]; // Changed files
176
- files_created?: string[]; // New files
177
- commit?: string; // Commit hash if applicable
178
- notes?: string[]; // Observations for orchestrator
179
- blockers?: string[]; // If blocked/failed, why
180
- next_steps?: string[]; // Suggestions if incomplete
181
- }
185
+ ### XML Response Envelope (MANDATORY)
186
+
187
+ All subagent responses MUST end with an XML envelope. See `references/xml-response-schema.md` for the full specification.
188
+
189
+ **Basic structure:**
190
+
191
+ ```xml
192
+ <goop_report version="0.1.4">
193
+ <status>COMPLETE|PARTIAL|BLOCKED|CHECKPOINT</status>
194
+ <agent>goop-[type]</agent>
195
+ <task_name>Task description</task_name>
196
+
197
+ <state>
198
+ <phase>plan|specify|execute|accept</phase>
199
+ <spec_locked>true|false</spec_locked>
200
+ </state>
201
+
202
+ <summary>1-2 sentence summary</summary>
203
+
204
+ <artifacts>
205
+ <files>
206
+ <file path="path/to/file" action="created|modified">reason</file>
207
+ </files>
208
+ <commits>
209
+ <commit sha="abc123">type(scope): message</commit>
210
+ </commits>
211
+ </artifacts>
212
+
213
+ <memory>
214
+ <saved type="decision" importance="0.7">Memory title</saved>
215
+ </memory>
216
+
217
+ <handoff>
218
+ <ready>true|false</ready>
219
+ <next_action agent="goop-[type]">Next task description</next_action>
220
+ <suggest_new_session>true|false</suggest_new_session>
221
+ <next_command>/goop-[command]</next_command>
222
+ </handoff>
223
+ </goop_report>
182
224
  ```
183
225
 
184
226
  ### Status Meanings
185
227
 
186
228
  | Status | Meaning | Orchestrator Action |
187
229
  |--------|---------|---------------------|
188
- | `complete` | Task fully done | Move to next task |
189
- | `partial` | Some progress, more needed | Continue same task |
190
- | `blocked` | Cannot proceed | Assess and unblock |
191
- | `failed` | Task cannot be done | Apply deviation rules |
230
+ | `COMPLETE` | Task fully done | Move to next task |
231
+ | `PARTIAL` | Some progress, more needed | Continue same task |
232
+ | `BLOCKED` | Cannot proceed | Assess blocker, may need user |
233
+ | `CHECKPOINT` | Natural stopping point | Generate handoff, suggest new session |
192
234
 
193
235
  ### Raising Issues
194
236
 
@@ -379,15 +421,23 @@ memory_save({
379
421
 
380
422
  Every subagent execution:
381
423
 
424
+ - [ ] Read state.json for current phase
425
+ - [ ] Read PROJECT_KNOWLEDGE_BASE.md for conventions
382
426
  - [ ] Searched memory for relevant context
383
427
  - [ ] Read SPEC.md for requirements
384
428
  - [ ] Read CHRONICLE.md for current state
385
429
  - [ ] Read BLUEPRINT.md for task details
430
+ - [ ] Aligned work with spec must-haves
386
431
  - [ ] Updated CHRONICLE.md with progress
387
432
  - [ ] Persisted learnings to memory
388
- - [ ] Returned structured response with:
389
- - [ ] Clear status
433
+ - [ ] Returned XML response envelope with:
434
+ - [ ] Status (COMPLETE/PARTIAL/BLOCKED/CHECKPOINT)
390
435
  - [ ] Summary of work
391
- - [ ] Files modified
436
+ - [ ] Files modified with artifacts section
392
437
  - [ ] Commit hash (if applicable)
393
- - [ ] Any notes/blockers
438
+ - [ ] Memory persisted section
439
+ - [ ] Handoff with next_action and suggest_new_session
440
+
441
+ ---
442
+
443
+ *Subagent Protocol v0.1.4*
@@ -0,0 +1,133 @@
1
+ # UI Interaction Patterns
2
+
3
+ **GoopSpec Voice:** Clean, Consistent, Terminal-First.
4
+
5
+ Our UI communicates reliability and structured thinking. It distinguishes between *information*, *questions*, and *gates*.
6
+
7
+ ## Visual Language
8
+
9
+ * **Hexagon (`⬢`):** The GoopSpec anchor. Use for system messages and prompts.
10
+ * **Borders:** Use for Gates and Checkpoints to arrest attention.
11
+ * **Indentation:** Hierarchy is meaning.
12
+ * **Colors:** (Implicit)
13
+ * **Blue/Cyan:** Info & Progress
14
+ * **Green:** Success & Memory Recall
15
+ * **Yellow:** Warning & Checkpoints
16
+ * **Red:** Errors & Blockers
17
+
18
+ ---
19
+
20
+ ## Interaction Primitives
21
+
22
+ ### 1. The Inline Notice
23
+ *For status updates, memory recalls, and skill activations.*
24
+
25
+ **Format:** `⬢ [Category] Message`
26
+
27
+ ```text
28
+ ⬢ Memory: Using preference "TypeScript Strict Mode"
29
+ ⬢ Skill: Loading "octocode-research"...
30
+ ⬢ Status: Analyzing dependency tree...
31
+ ```
32
+
33
+ ### 2. The Structured Prompt
34
+ *For standard questions and choices.*
35
+
36
+ **Format:** Question followed by clear options.
37
+
38
+ ```text
39
+ ⬢ Decision Required: Database Selection
40
+
41
+ 1. PostgreSQL (Recommended based on project)
42
+ 2. SQLite (Simpler setup)
43
+
44
+ ► Select [1-2]:
45
+ ```
46
+
47
+ ### 3. The Gate (Boxed)
48
+ *For critical stops: Contract, Checkpoint, Acceptance.*
49
+
50
+ **Format:** ASCII Box with Title and Action.
51
+
52
+ ```text
53
+ ╭─ ⬢ GoopSpec ───────────────────────────────────────╮
54
+ │ │
55
+ │ 🔒 CONTRACT GATE │
56
+ │ │
57
+ │ Summary: Login Feature │
58
+ │ • Auth Provider: Auth0 │
59
+ │ • MFA: Required │
60
+ │ │
61
+ │ ► Type "confirm" to Lock Spec and Plan. │
62
+ │ │
63
+ ╰────────────────────────────────────────────────────╯
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Patterns
69
+
70
+ ### The "Recall & Confirm"
71
+ *Don't just apply memory silently; validate it lightly.*
72
+
73
+ ```text
74
+ ⬢ Memory: I see you use Tailwind in other projects.
75
+ Apply Tailwind to this project too? [Y/n]
76
+ ```
77
+
78
+ ### The "Skill Injection"
79
+ *Show that an agent is doing deep work.*
80
+
81
+ ```text
82
+ ⬢ Researching: "Best state management for Svelte 5"
83
+ └─ ⚡ Found 3 relevant libraries
84
+ └─ ⚡ Analyzed GitHub stars & issues
85
+
86
+ Recommendation: Runes (Native)
87
+ ```
88
+
89
+ ### The "Progressive Drill-Down"
90
+ *Handle complexity without overwhelm.*
91
+
92
+ **Step 1 (High Level):**
93
+ ```text
94
+ ⬢ Strategy: I recommend a "Feature Folder" structure.
95
+ Proceed? [Y/n/details]
96
+ ```
97
+
98
+ **Step 2 (If 'details' selected):**
99
+ ```text
100
+ ⬢ Feature Folder Structure:
101
+ src/features/auth/
102
+ ├── components/
103
+ ├── api/
104
+ └── types.ts
105
+
106
+ Pros: Scalable, self-contained.
107
+ Cons: More initial boilerplate.
108
+
109
+ ► Confirm structure? [Y/n]
110
+ ```
111
+
112
+ ---
113
+
114
+ ## Anti-Patterns (Don't Do This)
115
+
116
+ * **The Wall of Text:** unstructured paragraphs mixing info and questions.
117
+ * **The Hidden Question:** burying a question in the middle of a log.
118
+ * **The "Double Ask":** asking for info, then asking for confirmation of the info in the same turn.
119
+ * **The "Fake Choice":** offering options that are clearly bad/wrong.
120
+
121
+ ---
122
+
123
+ ## Checklist: UI Audit
124
+
125
+ - [ ] **Is the Hexagon present?** (Brand anchor)
126
+ - [ ] **Is the hierarchy clear?** (Indentation)
127
+ - [ ] **Are options numbered or binary?** (Ease of input)
128
+ - [ ] **Is the critical info boxed?** (Gates)
129
+ - [ ] **Did I acknowledge memory/skills?** (Show intelligence)
130
+
131
+ ---
132
+
133
+ **Goal:** The user should be able to scan the output and know exactly *where they are* and *what they need to do*.
@@ -0,0 +1,199 @@
1
+ # GoopSpec Visual Style Guide
2
+
3
+ A distinctive, minimal visual language for GoopSpec messages.
4
+
5
+ ## Brand Identity
6
+
7
+ **Primary Icon:** 🔮 (Crystal Ball - represents foresight, planning, specification)
8
+
9
+ **Philosophy:** Clean, minimal, precise. GoopSpec is about careful planning and clear contracts - the visual style should feel refined without being cluttered.
10
+
11
+ ## Header Styles
12
+
13
+ ### Primary Phase Header
14
+ ```
15
+ ## 🔮 GoopSpec · [Phase/Context]
16
+
17
+ [Content here]
18
+
19
+ ---
20
+ ```
21
+
22
+ ### Success Header
23
+ ```
24
+ ## 🔮 GoopSpec · Phase Complete
25
+
26
+ ✨ [Success message]
27
+
28
+ ---
29
+ ```
30
+
31
+ ### Warning/Blocked Header
32
+ ```
33
+ ## 🔮 GoopSpec · Gate Blocked
34
+
35
+ ⚠️ [Warning message]
36
+
37
+ → Run: `/goop-[command]`
38
+
39
+ ---
40
+ ```
41
+
42
+ ## Phase Icons
43
+
44
+ | Phase | Icon | Usage |
45
+ |-------|------|-------|
46
+ | Discuss | 💬 | Discovery interview |
47
+ | Plan | 📋 | Blueprint creation |
48
+ | Research | 🔬 | Investigation |
49
+ | Specify | 📜 | Locking the contract |
50
+ | Execute | ⚡ | Wave-based implementation |
51
+ | Accept | ✅ | Verification & approval |
52
+ | Idle | 🔮 | Ready state |
53
+
54
+ ## Status Indicators
55
+
56
+ | Status | Icon | Meaning |
57
+ |--------|------|---------|
58
+ | Complete | ✓ | Task/phase done |
59
+ | Pending | ⏳ | In progress or waiting |
60
+ | Blocked | ✗ | Cannot proceed |
61
+ | Locked | 🔒 | Spec is locked |
62
+ | Unlocked | 🔓 | Spec can be modified |
63
+ | Warning | ⚠️ | Attention needed |
64
+ | Success | ✨ | Milestone achieved |
65
+ | Error | ❌ | Something failed |
66
+
67
+ ## Message Templates
68
+
69
+ ### Phase Start
70
+ ```markdown
71
+ ## 🔮 GoopSpec · [Phase Name]
72
+
73
+ [Phase description and context]
74
+
75
+ ---
76
+ ```
77
+
78
+ ### Gate Check - Pass
79
+ ```markdown
80
+ ## 🔮 GoopSpec · Gate Check
81
+
82
+ ✓ Gate passed. Proceeding...
83
+
84
+ ---
85
+ ```
86
+
87
+ ### Gate Check - Blocked
88
+ ```markdown
89
+ ## 🔮 GoopSpec · Gate Blocked
90
+
91
+ ✗ [Reason for block]
92
+
93
+ → Run: `/goop-[command]`
94
+
95
+ ---
96
+ ```
97
+
98
+ ### Progress Update
99
+ ```markdown
100
+ ## 🔮 GoopSpec · Progress
101
+
102
+ **Phase:** ⚡ Execute | **Wave:** 2/3 | **Task:** 4/6
103
+
104
+ ### Completed
105
+ - ✓ Task 2.1: [description]
106
+ - ✓ Task 2.2: [description]
107
+
108
+ ### In Progress
109
+ - ⏳ Task 2.3: [description]
110
+
111
+ ---
112
+ ```
113
+
114
+ ### Phase Complete
115
+ ```markdown
116
+ ## 🔮 GoopSpec · Phase Complete
117
+
118
+ ✨ [Phase Name] finished successfully
119
+
120
+ ### Summary
121
+ [Summary content]
122
+
123
+ ### Next Step
124
+ → `/goop-[next-command]`
125
+
126
+ ---
127
+ ```
128
+
129
+ ### Decision Required
130
+ ```markdown
131
+ ## 🔮 GoopSpec · Decision Required
132
+
133
+ ⚠️ [Context about the decision]
134
+
135
+ **Options:**
136
+ - **A)** [Option A description]
137
+ - **B)** [Option B description]
138
+
139
+ Which option?
140
+
141
+ ---
142
+ ```
143
+
144
+ ### Handoff
145
+ ```markdown
146
+ ## 🔮 GoopSpec · Session Handoff
147
+
148
+ ### Accomplished
149
+ - ✓ [Item 1]
150
+ - ✓ [Item 2]
151
+
152
+ ### Current State
153
+ **Phase:** [phase] | **Spec:** [locked/unlocked] | **Wave:** [N/M]
154
+
155
+ ### To Continue
156
+ Start a new session, then run: `/goop-[command]`
157
+
158
+ ---
159
+ ```
160
+
161
+ ### Status Display
162
+ ```markdown
163
+ ## 🔮 GoopSpec · Status
164
+
165
+ **Project:** [name]
166
+
167
+ | Gate | Status |
168
+ |------|--------|
169
+ | Interview | ✓ Complete |
170
+ | Spec Lock | 🔒 Locked |
171
+ | Acceptance | ⏳ Pending |
172
+
173
+ ### Next Step
174
+ → `/goop-[command]`
175
+
176
+ ---
177
+ ```
178
+
179
+ ## Comparison: GoopSpec vs GSD
180
+
181
+ | Element | GSD (Industrial) | GoopSpec (Minimal) |
182
+ |---------|------------------|-------------------|
183
+ | Primary icon | None | 🔮 |
184
+ | Headers | `+====+ GOOPSPEC > PHASE` | `## 🔮 GoopSpec · Phase` |
185
+ | Separators | `+----+` boxes | `---` dividers |
186
+ | Feel | Industrial, rigid | Clean, minimal |
187
+
188
+ ## Usage Guidelines
189
+
190
+ 1. **Consistency:** Always use `## 🔮 GoopSpec · [Context]` for main headers
191
+ 2. **Dividers:** Use `---` to separate sections
192
+ 3. **Breathing room:** Include blank lines between sections
193
+ 4. **Bullet indicators:** Use ✓ ✗ ⏳ for status
194
+ 5. **Actions:** Use → for "next step" callouts
195
+ 6. **Phase awareness:** Use phase-specific icons (💬 📋 🔬 📜 ⚡ ✅) when relevant
196
+
197
+ ---
198
+
199
+ *GoopSpec Visual Style v0.2.0*