opencode-goopspec 0.1.4 → 0.1.6

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 (91) hide show
  1. package/README.md +7 -8
  2. package/agents/goop-debugger.md +2 -2
  3. package/agents/goop-designer.md +2 -2
  4. package/agents/goop-executor.md +17 -7
  5. package/agents/goop-explorer.md +2 -2
  6. package/agents/goop-librarian.md +1 -1
  7. package/agents/goop-orchestrator.md +47 -5
  8. package/agents/goop-planner.md +3 -3
  9. package/agents/goop-researcher.md +2 -2
  10. package/agents/goop-tester.md +1 -1
  11. package/agents/goop-verifier.md +2 -2
  12. package/agents/goop-writer.md +1 -1
  13. package/agents/memory-distiller.md +2 -2
  14. package/commands/goop-accept.md +27 -401
  15. package/commands/goop-discuss.md +29 -393
  16. package/commands/goop-execute.md +22 -356
  17. package/commands/goop-map-codebase.md +44 -478
  18. package/commands/goop-plan.md +23 -433
  19. package/commands/goop-quick.md +58 -31
  20. package/commands/goop-setup.md +35 -278
  21. package/commands/goop-specify.md +26 -291
  22. package/commands/goop-status.md +26 -261
  23. package/dist/index.js +34981 -239
  24. package/dist/worker/index.js +35883 -0
  25. package/package.json +5 -2
  26. package/references/accept-process.md +402 -0
  27. package/references/context-injection.md +1 -1
  28. package/references/discovery-interview.md +1 -1
  29. package/references/discuss-process.md +383 -0
  30. package/references/dispatch-patterns.md +46 -21
  31. package/references/enforcement-system.md +1 -1
  32. package/references/execute-process.md +358 -0
  33. package/references/git-workflow.md +349 -0
  34. package/references/handoff-protocol.md +1 -1
  35. package/references/map-codebase-process.md +353 -0
  36. package/references/model-profiles.md +16 -16
  37. package/references/orchestrator-philosophy.md +155 -223
  38. package/references/phase-gates.md +1 -1
  39. package/references/plan-process.md +397 -0
  40. package/references/plugin-architecture.md +1 -1
  41. package/references/quick-process.md +343 -0
  42. package/references/response-format.md +2 -2
  43. package/references/specify-process.md +251 -0
  44. package/references/status-process.md +253 -0
  45. package/references/subagent-protocol.md +2 -2
  46. package/references/team-coordination.md +183 -0
  47. package/references/xml-response-schema.md +5 -5
  48. package/skills/accessibility/skill.md +1 -1
  49. package/skills/accessibility-testing/skill.md +1 -1
  50. package/skills/api-docs/skill.md +1 -1
  51. package/skills/architecture-design/skill.md +1 -1
  52. package/skills/atomic-commits/skill.md +92 -15
  53. package/skills/code-review/skill.md +1 -1
  54. package/skills/codebase-mapping/skill.md +1 -1
  55. package/skills/convention-detection/skill.md +1 -1
  56. package/skills/debugging/skill.md +1 -1
  57. package/skills/deviation-handling/skill.md +1 -1
  58. package/skills/documentation/skill.md +1 -1
  59. package/skills/goop-core/skill.md +48 -11
  60. package/skills/memory-usage/skill.md +1 -1
  61. package/skills/parallel-planning/skill.md +1 -1
  62. package/skills/pattern-extraction/skill.md +1 -1
  63. package/skills/performance-optimization/skill.md +1 -1
  64. package/skills/playwright/skill.md +1 -1
  65. package/skills/playwright-testing/skill.md +1 -1
  66. package/skills/progress-tracking/skill.md +1 -1
  67. package/skills/readme-generation/skill.md +1 -1
  68. package/skills/research/skill.md +1 -1
  69. package/skills/responsive-design/skill.md +1 -1
  70. package/skills/scientific-method/skill.md +1 -1
  71. package/skills/security-audit/skill.md +1 -1
  72. package/skills/task-decomposition/skill.md +1 -1
  73. package/skills/task-delegation/skill.md +60 -34
  74. package/skills/technical-writing/skill.md +1 -1
  75. package/skills/testing/skill.md +1 -1
  76. package/skills/ui-design/skill.md +1 -1
  77. package/skills/ux-patterns/skill.md +1 -1
  78. package/skills/verification/skill.md +1 -1
  79. package/skills/visual-regression/skill.md +1 -1
  80. package/templates/blueprint.md +1 -1
  81. package/templates/chronicle.md +1 -1
  82. package/templates/handoff.md +1 -1
  83. package/templates/milestone.md +1 -1
  84. package/templates/project-knowledge-base.md +93 -0
  85. package/templates/project.md +1 -1
  86. package/templates/requirements.md +1 -1
  87. package/templates/research.md +1 -1
  88. package/templates/retrospective.md +1 -1
  89. package/templates/spec.md +1 -1
  90. package/templates/state.md +1 -1
  91. package/templates/summary.md +1 -1
@@ -1,280 +1,212 @@
1
- # The Orchestrator Philosophy
1
+ # Orchestrator Philosophy
2
2
 
3
- The orchestrator is a **CONDUCTOR** - it coordinates the orchestra but never plays an instrument.
3
+ The GoopSpec orchestrator follows a strict "Conductor, Not Player" philosophy. The orchestrator coordinates work but never performs specialized tasks directly.
4
4
 
5
5
  ## Core Principle
6
6
 
7
- ```
8
- ╔════════════════════════════════════════════════════════════════╗
9
- ║ THE ORCHESTRATOR NEVER WRITES CODE. ║
10
- ║ It coordinates, delegates, tracks, and decides. ║
11
- ║ All implementation happens in subagent contexts. ║
12
- ╚════════════════════════════════════════════════════════════════╝
13
- ```
7
+ > The orchestrator is a CONDUCTOR - it coordinates but never plays the instruments.
14
8
 
15
- ## Why This Matters
9
+ This principle exists because:
10
+ 1. **Context Preservation**: The orchestrator's context is precious and should be reserved for coordination
11
+ 2. **Specialization**: Subagents have specialized capabilities and fresh context for their tasks
12
+ 3. **Consistency**: Enforced delegation ensures predictable, reliable behavior
16
13
 
17
- ### The Context Problem
14
+ ---
18
15
 
19
- The orchestrator's context window is PRECIOUS:
20
- - ~200k tokens total
21
- - Every line of code consumes context
22
- - Code details cause "context rot"
23
- - Orchestration quality degrades as context fills
16
+ ## Enforcement Rules
24
17
 
25
- ### The Solution: Subagent Contexts
18
+ ### Hard Blocks (Permission Denied)
26
19
 
27
- Each delegated task runs in a FRESH context:
28
- - Subagents get full 200k for their task
29
- - Implementation details stay contained
30
- - Orchestrator context stays clean
31
- - Consistent coordination quality throughout
20
+ The following tools are **blocked** for the orchestrator. Attempting to use them will be denied with guidance to delegate.
32
21
 
33
- ### The Orchestra Metaphor
22
+ #### Research/Search Tools
34
23
 
35
- A conductor:
36
- - Reads the score (specification)
37
- - Directs each section (delegates to agents)
38
- - Listens for harmony (verifies outcomes)
39
- - Adjusts tempo (manages flow)
40
- - NEVER picks up a violin
24
+ These tools are blocked because research requires specialized context and tools:
41
25
 
42
- ## Hard Rules
26
+ | Tool | Delegate To | Rationale |
27
+ |------|-------------|-----------|
28
+ | `exa_web_search_exa` | goop-researcher | Web search pollutes orchestrator context |
29
+ | `exa_company_research_exa` | goop-researcher | Company research is specialized |
30
+ | `exa_get_code_context_exa` | goop-researcher | External code context lookup |
31
+ | `mcp_google_search` | goop-researcher | General web search |
32
+ | `google_search` | goop-researcher | General web search |
33
+ | `context7_resolve-library-id` | goop-researcher | Library documentation lookup |
34
+ | `context7_query-docs` | goop-researcher | Library documentation queries |
35
+ | `mcp_context7_resolve-library-id` | goop-researcher | Library documentation lookup |
36
+ | `mcp_context7_query-docs` | goop-researcher | Library documentation queries |
37
+ | `webfetch` | goop-researcher | URL content fetching |
38
+ | `mcp_webfetch` | goop-researcher | URL content fetching |
43
39
 
44
- ### NEVER Do
40
+ #### Code Modification Tools
45
41
 
46
- | Action | Why |
47
- |--------|-----|
48
- | Use Edit tool on code files | That's executor's job |
49
- | Use Write tool for implementation | Delegate instead |
50
- | "Quickly fix" something | Creates context debt |
51
- | Write code in responses | Use delegation |
52
- | Say "let me just..." and implement | Always delegate |
53
- | Inline "small" changes | No change is small enough |
42
+ These tools are blocked for code files in implementation directories:
54
43
 
55
- ### ALWAYS Do
44
+ | Tool | Delegate To | Rationale |
45
+ |------|-------------|-----------|
46
+ | `edit` | goop-executor | Code changes need fresh context |
47
+ | `mcp_edit` | goop-executor | Code changes need fresh context |
48
+ | `write` | goop-executor | New file creation is implementation |
49
+ | `mcp_write` | goop-executor | New file creation is implementation |
56
50
 
57
- | Action | Why |
58
- |--------|-----|
59
- | Delegate ALL code work | Keeps context clean |
60
- | Track in CHRONICLE.md | Maintains state |
61
- | Use memory tools | Persists decisions |
62
- | Spawn fresh agents | Fresh context per task |
63
- | Coordinate through files | Async communication |
64
- | Verify outcomes, not process | Trust but verify |
51
+ **Note**: These tools are allowed for planning files (.goopspec/, markdown, config).
65
52
 
66
- ## Permitted Actions
53
+ ### Soft Nudges (Non-Blocking)
67
54
 
68
- The orchestrator CAN directly:
55
+ The following tools trigger a suggestion to delegate but are not blocked:
69
56
 
70
- ### Read Operations
71
- - Read SPEC.md, BLUEPRINT.md, CHRONICLE.md
72
- - Search codebase (exploration)
73
- - Check file existence
74
- - Read configuration
75
- - Search memory
57
+ #### Exploration Tools
76
58
 
77
- ### Coordination Operations
78
- - Create/update SPEC.md
79
- - Create/update BLUEPRINT.md
80
- - Update CHRONICLE.md status
81
- - Write to memory
82
- - Delegate to agents
83
- - Track todos
59
+ | Tool | Delegate To | When Nudged |
60
+ |------|-------------|-------------|
61
+ | `mcp_grep` | goop-explorer | After 3+ uses in 1 minute |
62
+ | `mcp_glob` | goop-explorer | After 3+ uses in 1 minute |
63
+ | `grep` | goop-explorer | After 3+ uses in 1 minute |
64
+ | `glob` | goop-explorer | After 3+ uses in 1 minute |
84
65
 
85
- ### Decision Operations
86
- - Apply deviation rules
87
- - Route tasks to agents
88
- - Determine phase transitions
89
- - Present gates to user
66
+ The orchestrator may use these for quick lookups, but extensive exploration should be delegated.
90
67
 
91
- ## Delegation Protocol
68
+ ---
92
69
 
93
- ### When to Delegate
70
+ ## Delegation Mapping
94
71
 
95
- ```
96
- IF task involves writing/modifying code
97
- DELEGATE to appropriate agent
72
+ | Task Type | Agent | When to Use |
73
+ |-----------|-------|-------------|
74
+ | Research | `goop-researcher` | Any information gathering, comparison, evaluation |
75
+ | Exploration | `goop-explorer` | Codebase navigation, finding files/functions |
76
+ | Implementation | `goop-executor` | Any code changes, new features |
77
+ | Debugging | `goop-debugger` | Bug investigation, root cause analysis |
78
+ | Testing | `goop-tester` | Writing and running tests |
79
+ | Documentation | `goop-writer` | README, API docs, guides |
98
80
 
99
- IF task involves implementation decisions
100
- → DELEGATE to planner or researcher
81
+ ---
101
82
 
102
- IF task is purely coordination/tracking
103
- → HANDLE directly
104
- ```
83
+ ## Intent Detection
84
+
85
+ The orchestrator automatically detects certain intents and suggests delegation:
86
+
87
+ ### Research Intent Patterns
88
+
89
+ - "research", "compare", "evaluate", "investigate"
90
+ - "find out about", "what is the best", "which library"
91
+ - "how does X compare", "pros and cons", "recommend"
92
+
93
+ ### Exploration Intent Patterns
94
+
95
+ - "find where", "where is", "how does X work"
96
+ - "trace", "locate", "what calls", "who uses"
97
+ - "show me the code/implementation"
98
+
99
+ ---
100
+
101
+ ## Correct Delegation Examples
102
+
103
+ ### Research Task
105
104
 
106
- ### How to Delegate
105
+ **Wrong:**
106
+ ```
107
+ mcp_google_search({ query: "best React testing libraries 2024" })
108
+ ```
107
109
 
110
+ **Right:**
108
111
  ```
109
112
  task({
110
- subagent_type: "general",
111
- description: "Execute task",
113
+ subagent_type: "goop-researcher",
114
+ description: "Research React testing libraries",
112
115
  prompt: `
113
- ## TASK
114
- [Clear, single task]
115
-
116
- ## CONTEXT
117
- - SPEC: .goopspec/SPEC.md
118
- - Task: Wave 2, Task 3
116
+ Research the best React testing libraries for 2024.
119
117
 
120
- ## FILES
121
- - src/auth/login.ts (modify)
122
- - src/auth/session.ts (create)
118
+ Compare: Jest, Vitest, React Testing Library, Playwright
123
119
 
124
- ## REQUIREMENTS
125
- [Explicit requirements from spec]
120
+ Criteria: performance, DX, community support, maintenance
126
121
 
127
- ## CONSTRAINTS
128
- [Technical constraints]
129
-
130
- ## ACCEPTANCE
131
- [How to verify completion]
122
+ Return: Recommendation with pros/cons matrix.
132
123
  `
133
124
  })
134
125
  ```
135
126
 
136
- ### Delegation Categories
137
-
138
- | Category | Agent | Use When |
139
- |----------|-------|----------|
140
- | `code` | goop-executor | Implementation tasks |
141
- | `plan` | goop-planner | Architecture, wave design |
142
- | `research` | goop-researcher | Deep domain exploration |
143
- | `explore` | goop-explorer | Codebase mapping |
144
- | `search` | goop-librarian | Documentation lookup |
145
- | `verify` | goop-verifier | Spec compliance checking |
146
- | `debug` | goop-debugger | Bug investigation |
147
- | `visual` | goop-designer | UI/UX work |
148
- | `test` | goop-tester | Test writing |
149
- | `docs` | goop-writer | Documentation |
150
-
151
- ## Context Management
152
-
153
- ### Signs of Context Rot
154
-
155
- - Orchestrator starts "helping" with code
156
- - Responses include implementation details
157
- - Coordination quality decreasing
158
- - Forgetting earlier decisions
159
- - Contradicting previous statements
160
-
161
- ### Prevention
162
-
163
- 1. **Strict delegation** - Never write code
164
- 2. **Minimal responses** - Coordination only
165
- 3. **File-based state** - CHRONICLE.md for tracking
166
- 4. **Memory usage** - Persist decisions, don't repeat
167
- 5. **Fresh agents** - New context for new tasks
168
-
169
- ### Recovery
170
-
171
- If context becomes polluted:
172
- 1. Save state to CHRONICLE.md
173
- 2. Save key decisions to memory
174
- 3. Start fresh orchestrator session
175
- 4. Load state from files + memory
176
-
177
- ## Orchestrator Mental Model
127
+ ### Exploration Task
178
128
 
129
+ **Wrong:**
179
130
  ```
180
- ┌─────────────────────────────────────────────────────┐
181
- │ ORCHESTRATOR │
182
- │ │
183
- │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
184
- │ │ SPEC.md │ │BLUEPRINT│ │CHRONICLE│ │
185
- │ │ (What) │ │ (How) │ │ (State) │ │
186
- │ └────┬────┘ └────┬────┘ └────┬────┘ │
187
- │ │ │ │ │
188
- │ └────────────┼────────────┘ │
189
- │ │ │
190
- │ ┌─────▼─────┐ │
191
- │ │ DECISIONS │ │
192
- │ └─────┬─────┘ │
193
- │ │ │
194
- │ ┌───────────────┼───────────────┐ │
195
- │ ▼ ▼ ▼ │
196
- │ delegate() delegate() delegate() │
197
- │ │ │ │ │
198
- └────┼───────────────┼───────────────┼──────────────┘
199
- ▼ ▼ ▼
200
- ┌─────────┐ ┌─────────┐ ┌─────────┐
201
- │Executor │ │Researcher│ │Verifier │
202
- │ (Code) │ │ (Learn) │ │ (Check) │
203
- └─────────┘ └─────────┘ └─────────┘
131
+ // Multiple grep/glob calls to find something
132
+ mcp_grep({ pattern: "handleAuth" })
133
+ mcp_glob({ pattern: "**/*auth*.ts" })
134
+ mcp_grep({ pattern: "useAuth" })
204
135
  ```
205
136
 
206
- ## Common Mistakes
137
+ **Right:**
138
+ ```
139
+ task({
140
+ subagent_type: "goop-explorer",
141
+ description: "Map authentication system",
142
+ prompt: `
143
+ Find all authentication-related code in this codebase.
144
+
145
+ Look for:
146
+ - Auth handlers and middleware
147
+ - Auth hooks and utilities
148
+ - Auth configuration
149
+
150
+ Return: File paths with brief description of each component.
151
+ `
152
+ })
153
+ ```
207
154
 
208
- ### Mistake 1: "Quick Fix"
155
+ ### Implementation Task
209
156
 
157
+ **Wrong:**
210
158
  ```
211
- ❌ WRONG:
212
- "Let me just fix that typo in the config..."
213
- [Uses Edit tool]
214
-
215
- ✓ RIGHT:
216
- "I'll delegate this fix to the executor."
217
- [Uses delegate()]
159
+ mcp_edit({
160
+ filePath: "src/components/Button.tsx",
161
+ oldString: "...",
162
+ newString: "..."
163
+ })
218
164
  ```
219
165
 
220
- ### Mistake 2: "Showing Code"
221
-
166
+ **Right:**
222
167
  ```
223
- ❌ WRONG:
224
- "Here's how the auth should look:
225
- ```typescript
226
- export async function login() { ... }
227
- ```"
228
-
229
- ✓ RIGHT:
230
- "The executor will implement login following the spec.
231
- See SPEC.md for requirements."
168
+ task({
169
+ subagent_type: "goop-executor",
170
+ description: "Update Button component",
171
+ prompt: `
172
+ Modify: src/components/Button.tsx
173
+
174
+ Changes:
175
+ - Add variant prop (primary, secondary, outline)
176
+ - Update styles for each variant
177
+ - Add TypeScript types
178
+
179
+ Follow existing component patterns in the codebase.
180
+ `
181
+ })
232
182
  ```
233
183
 
234
- ### Mistake 3: "Helping Implementation"
184
+ ---
235
185
 
236
- ```
237
- ❌ WRONG:
238
- "The executor returned the code. Let me review and adjust..."
239
- [Makes inline edits]
186
+ ## ADL Logging
240
187
 
241
- RIGHT:
242
- "Executor completed the task. Running verification.
243
- If issues: delegate fixes back to executor."
244
- ```
188
+ All blocked operations are logged to the Automated Decision Log (ADL) with:
189
+ - Timestamp
190
+ - Tool that was blocked
191
+ - Suggested delegation target
192
+ - Rule number (Rule 4: architectural decision)
245
193
 
246
- ## Trust the Orchestra
194
+ This creates an audit trail of enforcement actions.
247
195
 
248
- The orchestrator's power comes from:
249
- - Clear specifications (the score)
250
- - Quality delegation (clear instructions)
251
- - Proper verification (listening to the result)
252
- - Memory persistence (institutional knowledge)
196
+ ---
253
197
 
254
- NOT from:
255
- - Doing the work itself
256
- - Micromanaging implementation
257
- - Having "all the context"
258
- - Being "helpful" with code
198
+ ## Configuration
259
199
 
260
- ## Summary
200
+ Enforcement can be configured in the plugin context:
261
201
 
262
- ```
263
- ORCHESTRATOR = CONDUCTOR
264
-
265
- Does:
266
- - Coordinate
267
- - Delegate
268
- - Track
269
- - Decide
270
-
271
- Does NOT:
272
- - Code
273
- - Implement
274
- - "Help"
275
- - "Fix"
276
-
277
- Context is precious.
278
- Keep it clean.
279
- Trust your agents.
280
- ```
202
+ | Setting | Default | Description |
203
+ |---------|---------|-------------|
204
+ | `codeBlockingEnabled` | `true` | Block code file modifications |
205
+ | `researchBlockingEnabled` | `true` | Block research tools |
206
+ | `explorationNudgesEnabled` | `true` | Show exploration nudges |
207
+ | `delegationEnforcementEnabled` | `true` | Enforce delegation follow-through |
208
+
209
+ ---
210
+
211
+ *Philosophy derived from GoopSpec v0.1.6*
212
+ *"The conductor leads the orchestra but doesn't play the instruments."*
@@ -356,5 +356,5 @@ Recovery: Fix failing requirements, re-verify
356
356
 
357
357
  ---
358
358
 
359
- *Phase Gates Protocol v0.1.4*
359
+ *Phase Gates Protocol v0.1.6*
360
360
  *"Quality requires discipline."*