opencode-goopspec 0.1.5 → 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 (90) hide show
  1. package/README.md +7 -7
  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 -499
  19. package/commands/goop-quick.md +58 -31
  20. package/commands/goop-setup.md +7 -4
  21. package/commands/goop-specify.md +26 -291
  22. package/commands/goop-status.md +26 -261
  23. package/dist/index.js +808 -182
  24. package/dist/worker/index.js +1 -1
  25. package/package.json +2 -1
  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 +1 -1
  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.md +1 -1
  85. package/templates/requirements.md +1 -1
  86. package/templates/research.md +1 -1
  87. package/templates/retrospective.md +1 -1
  88. package/templates/spec.md +1 -1
  89. package/templates/state.md +1 -1
  90. package/templates/summary.md +1 -1
@@ -10,505 +10,71 @@ tools:
10
10
  grep: true
11
11
  ---
12
12
 
13
- <objective>
14
- Map an existing codebase for brownfield projects.
13
+ # /goop-map-codebase
15
14
 
16
- Analyzes codebase with parallel Explore agents. Creates `.goopspec/codebase/` with 7 focused documents covering stack, architecture, structure, conventions, testing, integrations, and concerns.
15
+ **Map an existing codebase.** Analyze architecture, stack, and conventions for brownfield projects.
17
16
 
18
- Use before `/goop-setup` on existing codebases. Provides the context needed to extend rather than replace.
17
+ ## Immediate Action
19
18
 
20
- **Creates:**
21
- - `.goopspec/codebase/STACK.md` - Technology stack
22
- - `.goopspec/codebase/ARCHITECTURE.md` - Architecture overview
23
- - `.goopspec/codebase/STRUCTURE.md` - Directory structure
24
- - `.goopspec/codebase/CONVENTIONS.md` - Code conventions
25
- - `.goopspec/codebase/TESTING.md` - Testing approach
26
- - `.goopspec/codebase/INTEGRATIONS.md` - External integrations
27
- - `.goopspec/codebase/CONCERNS.md` - Known issues and tech debt
28
- </objective>
29
-
30
- <execution_context>
31
- @/home/james/Documents/opencode-goopspec/templates/codebase/stack.md
32
- @/home/james/Documents/opencode-goopspec/templates/codebase/architecture.md
33
- @/home/james/Documents/opencode-goopspec/templates/codebase/conventions.md
34
- </execution_context>
35
-
36
- <tools_used>
37
- ## Tools Used
38
-
39
- | Tool | Purpose in This Command |
40
- |------|------------------------|
41
- | `goop_status` | Check if mapping already exists |
42
- | `memory_search` | Find prior codebase insights |
43
- | `memory_save` | Persist discovered patterns |
44
- | `memory_note` | Quick capture during exploration |
45
-
46
- **Hook Support:** `system.transform` injects patterns for future sessions.
47
- </tools_used>
48
-
49
- <process>
50
- ## Phase 1: Setup
51
-
52
- 1. **Check for existing codebase map**
53
- ```bash
54
- [ -d .goopspec/codebase ] && echo "Codebase map already exists"
55
- ```
56
-
57
- 2. **Initialize .goopspec if needed**
58
- ```bash
59
- mkdir -p .goopspec/codebase
60
- ```
61
-
62
- 3. **Detect project type**
63
- ```bash
64
- # Check for common project indicators
65
- [ -f package.json ] && echo "Node.js project"
66
- [ -f requirements.txt ] && echo "Python project"
67
- [ -f Cargo.toml ] && echo "Rust project"
68
- [ -f go.mod ] && echo "Go project"
69
- [ -f pom.xml ] && echo "Java/Maven project"
70
- [ -f build.gradle ] && echo "Java/Gradle project"
71
- ls -la
72
- ```
73
-
74
- ## Phase 2: Parallel Exploration
75
-
76
- Spawn 7 parallel explore agents via `task` tool:
77
-
78
- ### Explorer 1: Stack Detection
79
- ```
80
- Analyze the technology stack of this codebase.
81
- - Programming languages
82
- - Frameworks and libraries
83
- - Build tools
84
- - Database
85
- - Testing frameworks
86
- - Dev tools (linting, formatting, etc.)
87
-
88
- Create .goopspec/codebase/STACK.md
89
- ```
90
-
91
- ### Explorer 2: Architecture Analysis
92
- ```
93
- Analyze the architecture of this codebase.
94
- - Overall pattern (MVC, layered, hexagonal, etc.)
95
- - Component relationships
96
- - Data flow
97
- - Key abstractions
98
- - Design patterns used
99
-
100
- Create .goopspec/codebase/ARCHITECTURE.md
101
- ```
102
-
103
- ### Explorer 3: Structure Mapping
104
- ```
105
- Map the directory and file structure.
106
- - Top-level organization
107
- - Module/package boundaries
108
- - Where different types of code live
109
- - Configuration locations
110
- - Asset locations
111
-
112
- Create .goopspec/codebase/STRUCTURE.md
113
- ```
114
-
115
- ### Explorer 4: Conventions Discovery
116
- ```
117
- Identify code conventions and patterns.
118
- - Naming conventions
119
- - File organization
120
- - Code style
121
- - Import patterns
122
- - Error handling patterns
123
- - Documentation style
124
-
125
- Create .goopspec/codebase/CONVENTIONS.md
126
- ```
127
-
128
- ### Explorer 5: Testing Analysis
129
- ```
130
- Analyze the testing approach.
131
- - Testing frameworks used
132
- - Test organization
133
- - Coverage patterns
134
- - Test types (unit, integration, e2e)
135
- - Testing gaps
136
-
137
- Create .goopspec/codebase/TESTING.md
138
- ```
139
-
140
- ### Explorer 6: Integrations Inventory
141
- ```
142
- Identify external integrations.
143
- - APIs consumed
144
- - Services used
145
- - Third-party dependencies
146
- - Environment requirements
147
- - Secrets/configuration needed
148
-
149
- Create .goopspec/codebase/INTEGRATIONS.md
150
- ```
151
-
152
- ### Explorer 7: Concerns & Debt
153
- ```
154
- Identify issues, concerns, and tech debt.
155
- - Code smells
156
- - Security concerns
157
- - Performance issues
158
- - Outdated dependencies
159
- - Known bugs or limitations
160
- - Areas needing attention
161
-
162
- Create .goopspec/codebase/CONCERNS.md
163
- ```
164
-
165
- Wait for all explorers to complete.
166
-
167
- ## Phase 3: Synthesize Findings
168
-
169
- Collect and organize findings from all 7 explorers:
170
-
171
- 1. Check for conflicts between explorers
172
- 2. Identify the most critical insights
173
- 3. Summarize for quick reference
174
- 4. Flag areas needing clarification
175
-
176
- ## Phase 4: Write Codebase Documents
177
-
178
- ### STACK.md
179
- ```markdown
180
- # Technology Stack
181
-
182
- **Analyzed:** [Date]
183
- **Project Type:** [Detected type]
184
-
185
- ## Languages
186
- - [Language] [version] - [Primary use]
187
-
188
- ## Frameworks & Libraries
189
- ### Core
190
- - [Framework] [version] - [Purpose]
191
-
192
- ### Supporting
193
- - [Library] [version] - [Purpose]
194
-
195
- ## Build & Dev Tools
196
- - [Tool] - [Purpose]
197
-
198
- ## Database
199
- - [Database] [version] - [Usage pattern]
200
-
201
- ## Testing
202
- - [Framework] - [Test types]
203
-
204
- ## Key Dependencies
205
- ```json
206
- {
207
- "critical": ["dep1", "dep2"],
208
- "utility": ["dep3", "dep4"]
209
- }
210
- ```
211
-
212
- ## Version Info
213
- - Node/Python/Rust/etc: [version]
214
- - Package manager: [npm/pip/cargo/etc]
215
- ```
216
-
217
- ### ARCHITECTURE.md
218
- ```markdown
219
- # Architecture Overview
220
-
221
- **Pattern:** [MVC/Layered/Hexagonal/etc]
222
- **Complexity:** [Simple/Moderate/Complex]
223
-
224
- ## High-Level Structure
225
-
226
- [Diagram or description of major components]
227
-
228
- ## Component Relationships
229
-
230
- ### [Component A]
231
- - **Responsibility:** [What it does]
232
- - **Depends on:** [Other components]
233
- - **Used by:** [Other components]
234
-
235
- ### [Component B]
236
- - **Responsibility:** [What it does]
237
- - **Depends on:** [Other components]
238
- - **Used by:** [Other components]
239
-
240
- ## Data Flow
241
-
242
- [Description of how data moves through the system]
243
-
244
- ## Key Abstractions
245
-
246
- 1. **[Abstraction]** - [Purpose and usage]
247
- 2. **[Abstraction]** - [Purpose and usage]
248
-
249
- ## Design Patterns
250
-
251
- - **[Pattern]** - [Where used and why]
252
-
253
- ## Entry Points
254
-
255
- - [Entry 1] - [Purpose]
256
- - [Entry 2] - [Purpose]
257
- ```
258
-
259
- ### STRUCTURE.md
260
- ```markdown
261
- # Directory Structure
262
-
263
- ```
264
- project/
265
- ├── [dir]/ # [Purpose]
266
- │ ├── [subdir]/ # [Purpose]
267
- │ └── ...
268
- ├── [dir]/ # [Purpose]
269
- └── ...
270
- ```
271
-
272
- ## Directory Purposes
273
-
274
- ### /[directory]
275
- - **Contains:** [What lives here]
276
- - **Convention:** [How files organized]
277
- - **Examples:** [Key files]
278
-
279
- ## File Organization Patterns
280
-
281
- - [Pattern 1]
282
- - [Pattern 2]
283
-
284
- ## Configuration Locations
285
-
286
- - [Config 1] - [Purpose]
287
- - [Config 2] - [Purpose]
288
- ```
289
-
290
- ### CONVENTIONS.md
291
- ```markdown
292
- # Code Conventions
293
-
294
- ## Naming
295
- - **Variables:** [convention]
296
- - **Functions:** [convention]
297
- - **Classes:** [convention]
298
- - **Files:** [convention]
299
-
300
- ## Code Style
301
- - **Indentation:** [spaces/tabs, count]
302
- - **Line length:** [max]
303
- - **Quotes:** [single/double]
304
- - **Semicolons:** [required/optional]
305
-
306
- ## Organization
307
- - **Imports:** [order and style]
308
- - **Exports:** [pattern]
309
- - **File length:** [typical max]
310
-
311
- ## Patterns
312
- - **Error handling:** [pattern]
313
- - **Async:** [pattern - callbacks/promises/async-await]
314
- - **Null checking:** [pattern]
315
- - **Comments:** [style and when used]
316
-
317
- ## Documentation
318
- - **Required:** [what must be documented]
319
- - **Style:** [JSDoc/TSDoc/etc]
320
-
321
- ## Anti-Patterns Present
322
- - [Anti-pattern] - [Where found]
323
- ```
324
-
325
- ### TESTING.md
326
- ```markdown
327
- # Testing Approach
328
-
329
- ## Frameworks
330
- - **[Framework]** - [Unit/Integration/E2E]
331
-
332
- ## Test Organization
333
- - **Location:** [Where tests live]
334
- - **Naming:** [Test file naming]
335
- - **Structure:** [Describe/It blocks, etc.]
336
-
337
- ## Coverage
338
- - **Current:** [Estimated % or "unknown"]
339
- - **Gaps:** [Areas lacking tests]
340
-
341
- ## Test Types
342
- - **Unit:** [What gets unit tested]
343
- - **Integration:** [What gets integration tested]
344
- - **E2E:** [What gets E2E tested]
345
-
346
- ## Running Tests
347
- ```bash
348
- [Command to run tests]
349
- ```
350
-
351
- ## Testing Gaps
352
- - [Gap 1] - [Impact]
353
- - [Gap 2] - [Impact]
354
- ```
355
-
356
- ### INTEGRATIONS.md
357
- ```markdown
358
- # External Integrations
359
-
360
- ## APIs Consumed
361
-
362
- ### [API Name]
363
- - **Endpoint:** [URL]
364
- - **Auth:** [Method]
365
- - **Usage:** [How used in codebase]
366
- - **Env vars:** [Required variables]
367
-
368
- ## Services
369
-
370
- ### [Service Name]
371
- - **Type:** [Database/Cache/Queue/etc]
372
- - **Provider:** [AWS/Railway/etc]
373
- - **Connection:** [How connected]
374
-
375
- ## Third-Party Libraries
376
-
377
- ### Critical
378
- - [Library] - [Purpose] - [Version constraint]
379
-
380
- ### Nice-to-Have
381
- - [Library] - [Purpose]
382
-
383
- ## Environment Requirements
384
-
385
- ### Required Variables
386
- ```
387
- VARIABLE_NAME=[description]
388
- ```
389
-
390
- ### Optional Variables
391
- ```
392
- OPTIONAL_VAR=[description]
19
+ **STOP. Execute this tool call NOW before reading anything else:**
393
20
  ```
394
-
395
- ## Secrets Management
396
- - **Approach:** [How secrets handled]
397
- - **Location:** [Where stored]
398
- ```
399
-
400
- ### CONCERNS.md
401
- ```markdown
402
- # Known Issues & Concerns
403
-
404
- ## Code Smells
405
-
406
- ### [Concern 1]
407
- - **Location:** [Files affected]
408
- - **Issue:** [Description]
409
- - **Impact:** [Severity]
410
- - **Recommendation:** [What to do]
411
-
412
- ## Security Concerns
413
-
414
- ### [Security Issue]
415
- - **Risk:** [Description]
416
- - **Severity:** [Critical/High/Medium/Low]
417
- - **Mitigation:** [If any]
418
-
419
- ## Performance Issues
420
-
421
- ### [Performance Issue]
422
- - **Symptom:** [What happens]
423
- - **Cause:** [Root cause]
424
- - **Impact:** [How bad]
425
-
426
- ## Outdated Dependencies
427
-
428
- - **[Dependency]** [current] -> [latest] - [Risk level]
429
-
430
- ## Tech Debt
431
-
432
- ### [Debt Item]
433
- - **Description:** [What needs refactoring]
434
- - **Effort:** [Estimated]
435
- - **Priority:** [When to address]
436
-
437
- ## Recommended Priorities
438
-
439
- 1. **[Priority 1]** - [Why urgent]
440
- 2. **[Priority 2]** - [Why important]
21
+ goop_reference({ name: "map-codebase-process" })
441
22
  ```
442
23
 
443
- ## Phase 5: Update State
444
-
445
- Update `.goopspec/state.json`:
446
- - Mark codebase as mapped
447
- - Add timestamp
448
- - Link to codebase docs
449
-
450
- ## Phase 6: Offer Next Steps
451
-
452
- ```
453
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
454
- GOOPSPEC > CODEBASE MAPPED
455
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
24
+ **Then follow the process from that reference.** Do not process user messages until you have loaded and understood the protocol.
456
25
 
457
- **Codebase Analysis Complete**
26
+ ## Quick Summary
458
27
 
459
- 7 explorers analyzed your codebase:
460
- - Stack identified
461
- - Architecture mapped
462
- - Structure documented
463
- - Conventions discovered
464
- - Testing analyzed
465
- - Integrations inventoried
466
- - Concerns flagged
28
+ Spawns 7 parallel explore agents to analyze the codebase. Creates `.goopspec/codebase/` with focused analysis documents.
467
29
 
468
- Created in .goopspec/codebase/:
469
- - STACK.md
470
- - ARCHITECTURE.md
471
- - STRUCTURE.md
472
- - CONVENTIONS.md
473
- - TESTING.md
474
- - INTEGRATIONS.md
475
- - CONCERNS.md
30
+ ### Tools Used
476
31
 
477
- ───────────────────────────────────────────────────────────────
32
+ | Tool | Purpose |
33
+ |------|---------|
34
+ | `goop_status` | Check if mapping already exists |
35
+ | `memory_search` | Find prior codebase insights |
36
+ | `memory_save` | Persist discovered patterns |
37
+ | `memory_note` | Quick capture during exploration |
38
+ | `goop_reference` | Load detailed process |
478
39
 
479
- ## Next Up
40
+ ### Process Overview
480
41
 
481
- **Initialize GoopSpec project** with brownfield context
42
+ 1. **Setup** Check existing map, init .goopspec/codebase
43
+ 2. **Parallel Exploration** — Spawn 7 explore agents
44
+ 3. **Synthesize** — Collect and organize findings
45
+ 4. **Write Documents** — Create 7 analysis files
46
+ 5. **Completion** — Show next steps
482
47
 
483
- /goop-setup
48
+ ### 7 Analysis Documents
484
49
 
485
- <sub>Will use codebase map to understand existing code</sub>
50
+ | Document | Contents |
51
+ |----------|----------|
52
+ | `STACK.md` | Languages, frameworks, build tools, database |
53
+ | `ARCHITECTURE.md` | Patterns, components, data flow |
54
+ | `STRUCTURE.md` | Directory organization, file patterns |
55
+ | `CONVENTIONS.md` | Naming, code style, imports |
56
+ | `TESTING.md` | Frameworks, coverage, gaps |
57
+ | `INTEGRATIONS.md` | APIs, services, env vars |
58
+ | `CONCERNS.md` | Code smells, security, tech debt |
486
59
 
487
- ───────────────────────────────────────────────────────────────
60
+ ## Output
488
61
 
489
- **Also available:**
490
- - cat .goopspec/codebase/CONCERNS.md - Review issues first
491
- - cat .goopspec/codebase/ARCHITECTURE.md - Understand structure
62
+ Creates `.goopspec/codebase/` with 7 markdown analysis files.
492
63
 
493
- ───────────────────────────────────────────────────────────────
494
- ```
495
- </process>
64
+ ## When to Use
496
65
 
497
- <notes>
498
- **When to map codebase:**
499
66
  - Joining an existing project
500
67
  - Before extending unfamiliar code
501
68
  - When inheriting a codebase
502
69
  - Before major refactoring
503
70
 
504
- **What to do with concerns:**
505
- - Review CONCERNS.md before planning
506
- - Address critical security issues first
507
- - Factor tech debt into phase planning
508
- - Use as context for estimates
71
+ ## Success Criteria
72
+
73
+ - [ ] All 7 documents created
74
+ - [ ] Critical concerns identified
75
+ - [ ] Tech debt documented
76
+ - [ ] User knows next step is `/goop-setup`
77
+
78
+ ---
509
79
 
510
- **Updating the map:**
511
- - Re-run `/goop-map-codebase` periodically
512
- - Update after major refactors
513
- - Keep as living documentation
514
- </notes>
80
+ *Load `goop_reference({ name: "map-codebase-process" })` for full process details.*