opencodekit 0.6.0 → 0.6.2

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 (79) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +4 -1
  3. package/dist/template/.opencode/command/skill-create.md +3 -3
  4. package/dist/template/.opencode/command/skill-optimize.md +1 -1
  5. package/dist/template/.opencode/dcp.jsonc +63 -41
  6. package/dist/template/.opencode/opencode.json +5 -4
  7. package/dist/template/.opencode/package.json +2 -2
  8. package/dist/template/.opencode/pickle-thinker.jsonc +11 -0
  9. package/dist/template/.opencode/plugin/skill.ts +275 -0
  10. package/dist/template/.opencode/{skills → skill}/accessibility-audit/SKILL.md +5 -0
  11. package/dist/template/.opencode/{skills → skill}/brainstorming/SKILL.md +2 -2
  12. package/dist/template/.opencode/{skills → skill}/design-system-audit/SKILL.md +5 -0
  13. package/dist/template/.opencode/{skills → skill}/executing-plans/SKILL.md +13 -2
  14. package/dist/template/.opencode/{skills → skill}/frontend-aesthetics/SKILL.md +5 -0
  15. package/dist/template/.opencode/{skills → skill}/mockup-to-code/SKILL.md +5 -0
  16. package/dist/template/.opencode/{skills → skill}/requesting-code-review/SKILL.md +16 -6
  17. package/dist/template/.opencode/{skills → skill}/subagent-driven-development/SKILL.md +38 -17
  18. package/dist/template/.opencode/{skills → skill}/systematic-debugging/SKILL.md +28 -18
  19. package/dist/template/.opencode/{skills → skill}/testing-skills-with-subagents/SKILL.md +1 -1
  20. package/dist/template/.opencode/{skills → skill}/ui-ux-research/SKILL.md +5 -0
  21. package/dist/template/.opencode/{skills → skill}/visual-analysis/SKILL.md +5 -0
  22. package/dist/template/.opencode/{skills → skill}/writing-plans/SKILL.md +3 -3
  23. package/dist/template/.opencode/{skills → skill}/writing-skills/SKILL.md +101 -41
  24. package/package.json +1 -1
  25. package/dist/template/.opencode/plugin/superpowers.ts +0 -271
  26. package/dist/template/.opencode/superpowers/.claude/settings.local.json +0 -141
  27. package/dist/template/.opencode/superpowers/.claude-plugin/marketplace.json +0 -20
  28. package/dist/template/.opencode/superpowers/.claude-plugin/plugin.json +0 -13
  29. package/dist/template/.opencode/superpowers/.codex/INSTALL.md +0 -35
  30. package/dist/template/.opencode/superpowers/.codex/superpowers-bootstrap.md +0 -33
  31. package/dist/template/.opencode/superpowers/.codex/superpowers-codex +0 -267
  32. package/dist/template/.opencode/superpowers/.github/FUNDING.yml +0 -3
  33. package/dist/template/.opencode/superpowers/.opencode/INSTALL.md +0 -135
  34. package/dist/template/.opencode/superpowers/.opencode/plugin/superpowers.js +0 -215
  35. package/dist/template/.opencode/superpowers/LICENSE +0 -21
  36. package/dist/template/.opencode/superpowers/README.md +0 -165
  37. package/dist/template/.opencode/superpowers/RELEASE-NOTES.md +0 -493
  38. package/dist/template/.opencode/superpowers/agents/code-reviewer.md +0 -48
  39. package/dist/template/.opencode/superpowers/commands/brainstorm.md +0 -5
  40. package/dist/template/.opencode/superpowers/commands/execute-plan.md +0 -5
  41. package/dist/template/.opencode/superpowers/commands/write-plan.md +0 -5
  42. package/dist/template/.opencode/superpowers/docs/README.codex.md +0 -153
  43. package/dist/template/.opencode/superpowers/docs/README.opencode.md +0 -234
  44. package/dist/template/.opencode/superpowers/docs/plans/2025-11-22-opencode-support-design.md +0 -294
  45. package/dist/template/.opencode/superpowers/docs/plans/2025-11-22-opencode-support-implementation.md +0 -1095
  46. package/dist/template/.opencode/superpowers/hooks/hooks.json +0 -15
  47. package/dist/template/.opencode/superpowers/hooks/session-start.sh +0 -34
  48. package/dist/template/.opencode/superpowers/lib/skills-core.js +0 -208
  49. package/dist/template/.opencode/superpowers/tests/opencode/run-tests.sh +0 -165
  50. package/dist/template/.opencode/superpowers/tests/opencode/setup.sh +0 -73
  51. package/dist/template/.opencode/superpowers/tests/opencode/test-plugin-loading.sh +0 -81
  52. package/dist/template/.opencode/superpowers/tests/opencode/test-priority.sh +0 -198
  53. package/dist/template/.opencode/superpowers/tests/opencode/test-skills-core.sh +0 -440
  54. package/dist/template/.opencode/superpowers/tests/opencode/test-tools.sh +0 -104
  55. /package/dist/template/.opencode/{skills → skill}/condition-based-waiting/SKILL.md +0 -0
  56. /package/dist/template/.opencode/{skills → skill}/condition-based-waiting/example.ts +0 -0
  57. /package/dist/template/.opencode/{skills → skill}/defense-in-depth/SKILL.md +0 -0
  58. /package/dist/template/.opencode/{skills → skill}/dispatching-parallel-agents/SKILL.md +0 -0
  59. /package/dist/template/.opencode/{skills → skill}/finishing-a-development-branch/SKILL.md +0 -0
  60. /package/dist/template/.opencode/{skills → skill}/gemini-large-context/SKILL.md +0 -0
  61. /package/dist/template/.opencode/{skills → skill}/receiving-code-review/SKILL.md +0 -0
  62. /package/dist/template/.opencode/{skills/requesting-code-review/code-reviewer.md → skill/requesting-code-review/review.md} +0 -0
  63. /package/dist/template/.opencode/{skills → skill}/root-cause-tracing/SKILL.md +0 -0
  64. /package/dist/template/.opencode/{skills → skill}/root-cause-tracing/find-polluter.sh +0 -0
  65. /package/dist/template/.opencode/{skills → skill}/sharing-skills/SKILL.md +0 -0
  66. /package/dist/template/.opencode/{skills → skill}/systematic-debugging/CREATION-LOG.md +0 -0
  67. /package/dist/template/.opencode/{skills → skill}/systematic-debugging/test-academic.md +0 -0
  68. /package/dist/template/.opencode/{skills → skill}/systematic-debugging/test-pressure-1.md +0 -0
  69. /package/dist/template/.opencode/{skills → skill}/systematic-debugging/test-pressure-2.md +0 -0
  70. /package/dist/template/.opencode/{skills → skill}/systematic-debugging/test-pressure-3.md +0 -0
  71. /package/dist/template/.opencode/{skills → skill}/test-driven-development/SKILL.md +0 -0
  72. /package/dist/template/.opencode/{skills → skill}/testing-anti-patterns/SKILL.md +0 -0
  73. /package/dist/template/.opencode/{skills → skill}/testing-skills-with-subagents/examples/CLAUDE_MD_TESTING.md +0 -0
  74. /package/dist/template/.opencode/{skills → skill}/using-git-worktrees/SKILL.md +0 -0
  75. /package/dist/template/.opencode/{skills → skill}/using-superpowers/SKILL.md +0 -0
  76. /package/dist/template/.opencode/{skills → skill}/verification-before-completion/SKILL.md +0 -0
  77. /package/dist/template/.opencode/{skills → skill}/writing-skills/anthropic-best-practices.md +0 -0
  78. /package/dist/template/.opencode/{skills → skill}/writing-skills/graphviz-conventions.dot +0 -0
  79. /package/dist/template/.opencode/{skills → skill}/writing-skills/persuasion-principles.md +0 -0
@@ -1,294 +0,0 @@
1
- # OpenCode Support Design
2
-
3
- **Date:** 2025-11-22
4
- **Author:** Bot & Jesse
5
- **Status:** Design Complete, Awaiting Implementation
6
-
7
- ## Overview
8
-
9
- Add full superpowers support for OpenCode.ai using a native OpenCode plugin architecture that shares core functionality with the existing Codex implementation.
10
-
11
- ## Background
12
-
13
- OpenCode.ai is a coding agent similar to Claude Code and Codex. Previous attempts to port superpowers to OpenCode (PR #93, PR #116) used file-copying approaches. This design takes a different approach: building a native OpenCode plugin using their JavaScript/TypeScript plugin system while sharing code with the Codex implementation.
14
-
15
- ### Key Differences Between Platforms
16
-
17
- - **Claude Code**: Native Anthropic plugin system + file-based skills
18
- - **Codex**: No plugin system → bootstrap markdown + CLI script
19
- - **OpenCode**: JavaScript/TypeScript plugins with event hooks and custom tools API
20
-
21
- ### OpenCode's Agent System
22
-
23
- - **Primary agents**: Build (default, full access) and Plan (restricted, read-only)
24
- - **Subagents**: General (research, searching, multi-step tasks)
25
- - **Invocation**: Automatic dispatch by primary agents OR manual `@mention` syntax
26
- - **Configuration**: Custom agents in `opencode.json` or `~/.config/opencode/agent/`
27
-
28
- ## Architecture
29
-
30
- ### High-Level Structure
31
-
32
- 1. **Shared Core Module** (`lib/skills-core.js`)
33
- - Common skill discovery and parsing logic
34
- - Used by both Codex and OpenCode implementations
35
-
36
- 2. **Platform-Specific Wrappers**
37
- - Codex: CLI script (`.codex/superpowers-codex`)
38
- - OpenCode: Plugin module (`.opencode/plugin/superpowers.js`)
39
-
40
- 3. **Skill Directories**
41
- - Core: `~/.config/opencode/superpowers/skills/` (or installed location)
42
- - Personal: `~/.config/opencode/skills/` (shadows core skills)
43
-
44
- ### Code Reuse Strategy
45
-
46
- Extract common functionality from `.codex/superpowers-codex` into shared module:
47
-
48
- ```javascript
49
- // lib/skills-core.js
50
- module.exports = {
51
- extractFrontmatter(filePath), // Parse name + description from YAML
52
- findSkillsInDir(dir, maxDepth), // Recursive SKILL.md discovery
53
- findAllSkills(dirs), // Scan multiple directories
54
- resolveSkillPath(skillName, dirs), // Handle shadowing (personal > core)
55
- checkForUpdates(repoDir) // Git fetch/status check
56
- };
57
- ```
58
-
59
- ### Skill Frontmatter Format
60
-
61
- Current format (no `when_to_use` field):
62
-
63
- ```yaml
64
- ---
65
- name: skill-name
66
- description: Use when [condition] - [what it does]; [additional context]
67
- ---
68
- ```
69
-
70
- ## OpenCode Plugin Implementation
71
-
72
- ### Custom Tools
73
-
74
- **Tool 1: `use_skill`**
75
-
76
- Loads a specific skill's content into the conversation (equivalent to Claude's Skill tool).
77
-
78
- ```javascript
79
- {
80
- name: 'use_skill',
81
- description: 'Load and read a specific skill to guide your work',
82
- schema: z.object({
83
- skill_name: z.string().describe('Name of skill (e.g., "superpowers:brainstorming")')
84
- }),
85
- execute: async ({ skill_name }) => {
86
- const { skillPath, content, frontmatter } = resolveAndReadSkill(skill_name);
87
- const skillDir = path.dirname(skillPath);
88
-
89
- return `# ${frontmatter.name}
90
- # ${frontmatter.description}
91
- # Supporting tools and docs are in ${skillDir}
92
- # ============================================
93
-
94
- ${content}`;
95
- }
96
- }
97
- ```
98
-
99
- **Tool 2: `find_skills`**
100
-
101
- Lists all available skills with metadata.
102
-
103
- ```javascript
104
- {
105
- name: 'find_skills',
106
- description: 'List all available skills',
107
- schema: z.object({}),
108
- execute: async () => {
109
- const skills = discoverAllSkills();
110
- return skills.map(s =>
111
- `${s.namespace}:${s.name}
112
- ${s.description}
113
- Directory: ${s.directory}
114
- `).join('\n');
115
- }
116
- }
117
- ```
118
-
119
- ### Session Startup Hook
120
-
121
- When a new session starts (`session.started` event):
122
-
123
- 1. **Inject using-superpowers content**
124
- - Full content of the using-superpowers skill
125
- - Establishes mandatory workflows
126
-
127
- 2. **Run find_skills automatically**
128
- - Display full list of available skills upfront
129
- - Include skill directories for each
130
-
131
- 3. **Inject tool mapping instructions**
132
- ```markdown
133
- **Tool Mapping for OpenCode:**
134
- When skills reference tools you don't have, substitute:
135
- - `TodoWrite` → `update_plan`
136
- - `Task` with subagents → Use OpenCode subagent system (@mention)
137
- - `Skill` tool → `use_skill` custom tool
138
- - Read, Write, Edit, Bash → Your native equivalents
139
-
140
- **Skill directories contain:**
141
- - Supporting scripts (run with bash)
142
- - Additional documentation (read with read tool)
143
- - Utilities specific to that skill
144
- ```
145
-
146
- 4. **Check for updates** (non-blocking)
147
- - Quick git fetch with timeout
148
- - Notify if updates available
149
-
150
- ### Plugin Structure
151
-
152
- ```javascript
153
- // .opencode/plugin/superpowers.js
154
- const skillsCore = require('../../lib/skills-core');
155
- const path = require('path');
156
- const fs = require('fs');
157
- const { z } = require('zod');
158
-
159
- export const SuperpowersPlugin = async ({ client, directory, $ }) => {
160
- const superpowersDir = path.join(process.env.HOME, '.config/opencode/superpowers');
161
- const personalDir = path.join(process.env.HOME, '.config/opencode/skills');
162
-
163
- return {
164
- 'session.started': async () => {
165
- const usingSuperpowers = await readSkill('using-superpowers');
166
- const skillsList = await findAllSkills();
167
- const toolMapping = getToolMappingInstructions();
168
-
169
- return {
170
- context: `${usingSuperpowers}\n\n${skillsList}\n\n${toolMapping}`
171
- };
172
- },
173
-
174
- tools: [
175
- {
176
- name: 'use_skill',
177
- description: 'Load and read a specific skill',
178
- schema: z.object({
179
- skill_name: z.string()
180
- }),
181
- execute: async ({ skill_name }) => {
182
- // Implementation using skillsCore
183
- }
184
- },
185
- {
186
- name: 'find_skills',
187
- description: 'List all available skills',
188
- schema: z.object({}),
189
- execute: async () => {
190
- // Implementation using skillsCore
191
- }
192
- }
193
- ]
194
- };
195
- };
196
- ```
197
-
198
- ## File Structure
199
-
200
- ```
201
- superpowers/
202
- ├── lib/
203
- │ └── skills-core.js # NEW: Shared skill logic
204
- ├── .codex/
205
- │ ├── superpowers-codex # UPDATED: Use skills-core
206
- │ ├── superpowers-bootstrap.md
207
- │ └── INSTALL.md
208
- ├── .opencode/
209
- │ ├── plugin/
210
- │ │ └── superpowers.js # NEW: OpenCode plugin
211
- │ └── INSTALL.md # NEW: Installation guide
212
- └── skills/ # Unchanged
213
- ```
214
-
215
- ## Implementation Plan
216
-
217
- ### Phase 1: Refactor Shared Core
218
-
219
- 1. Create `lib/skills-core.js`
220
- - Extract frontmatter parsing from `.codex/superpowers-codex`
221
- - Extract skill discovery logic
222
- - Extract path resolution (with shadowing)
223
- - Update to use only `name` and `description` (no `when_to_use`)
224
-
225
- 2. Update `.codex/superpowers-codex` to use shared core
226
- - Import from `../lib/skills-core.js`
227
- - Remove duplicated code
228
- - Keep CLI wrapper logic
229
-
230
- 3. Test Codex implementation still works
231
- - Verify bootstrap command
232
- - Verify use-skill command
233
- - Verify find-skills command
234
-
235
- ### Phase 2: Build OpenCode Plugin
236
-
237
- 1. Create `.opencode/plugin/superpowers.js`
238
- - Import shared core from `../../lib/skills-core.js`
239
- - Implement plugin function
240
- - Define custom tools (use_skill, find_skills)
241
- - Implement session.started hook
242
-
243
- 2. Create `.opencode/INSTALL.md`
244
- - Installation instructions
245
- - Directory setup
246
- - Configuration guidance
247
-
248
- 3. Test OpenCode implementation
249
- - Verify session startup bootstrap
250
- - Verify use_skill tool works
251
- - Verify find_skills tool works
252
- - Verify skill directories are accessible
253
-
254
- ### Phase 3: Documentation & Polish
255
-
256
- 1. Update README with OpenCode support
257
- 2. Add OpenCode installation to main docs
258
- 3. Update RELEASE-NOTES
259
- 4. Test both Codex and OpenCode work correctly
260
-
261
- ## Next Steps
262
-
263
- 1. **Create isolated workspace** (using git worktrees)
264
- - Branch: `feature/opencode-support`
265
-
266
- 2. **Follow TDD where applicable**
267
- - Test shared core functions
268
- - Test skill discovery and parsing
269
- - Integration tests for both platforms
270
-
271
- 3. **Incremental implementation**
272
- - Phase 1: Refactor shared core + update Codex
273
- - Verify Codex still works before moving on
274
- - Phase 2: Build OpenCode plugin
275
- - Phase 3: Documentation and polish
276
-
277
- 4. **Testing strategy**
278
- - Manual testing with real OpenCode installation
279
- - Verify skill loading, directories, scripts work
280
- - Test both Codex and OpenCode side-by-side
281
- - Verify tool mappings work correctly
282
-
283
- 5. **PR and merge**
284
- - Create PR with complete implementation
285
- - Test in clean environment
286
- - Merge to main
287
-
288
- ## Benefits
289
-
290
- - **Code reuse**: Single source of truth for skill discovery/parsing
291
- - **Maintainability**: Bug fixes apply to both platforms
292
- - **Extensibility**: Easy to add future platforms (Cursor, Windsurf, etc.)
293
- - **Native integration**: Uses OpenCode's plugin system properly
294
- - **Consistency**: Same skill experience across all platforms