summaryrefslogtreecommitdiff
path: root/.opencode
AgeCommit message (Collapse)Author
2026-03-25fix(opencode): inject bootstrap as user message instead of system messageJesse Vincent
Move bootstrap injection from experimental.chat.system.transform to experimental.chat.messages.transform, prepending to the first user message instead of adding a system message. This avoids two issues: - System messages repeated every turn inflate token usage (#750) - Multiple system messages break Qwen and other models (#894) Tested on OpenCode 1.3.2 with Claude Sonnet 4.5 — brainstorming skill fires correctly on "Let's make a React to do list" prompt.
2026-03-25fix(opencode): align skills path across bootstrap, runtime, and testsJesse Vincent
The bootstrap text advertised a configDir-based skills path that didn't match the runtime path (resolved relative to the plugin file). Tests used yet another hardcoded path and referenced a nonexistent lib/ dir. - Remove misleading skills path from bootstrap text; the agent should use the native skill tool, not read files by path - Fix test setup to create a consistent layout matching the plugin's ../../skills resolution - Export SUPERPOWERS_SKILLS_DIR from setup.sh so tests use a single source of truth - Add regression test that bootstrap doesn't advertise the old path - Remove broken cp of nonexistent lib/ directory Fixes #847
2026-03-15Auto-register skills from plugin, simplify OpenCode install to one linejesse
The plugin's new `config` hook injects the skills directory into OpenCode's live config singleton, so skills are discovered automatically without symlinks or manual config edits. Installation is now just adding one line to opencode.json: "plugin": ["superpowers@git+https://github.com/obra/superpowers.git"] Rewrote docs/README.opencode.md and .opencode/INSTALL.md to reflect the new approach, removing ~200 lines of platform-specific symlink instructions. Added migration notes for existing users. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09fix(opencode): correct TodoWrite tool mapping to todowriteMatt Van Horn
TodoWrite maps to OpenCode's built-in `todowrite` tool, not `update_plan`. Verified against OpenCode source (packages/opencode/src/tool/todo.ts). Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
2026-01-23fix(opencode): standardize on plugins/ directory per official docsJesse Vincent
OpenCode officially documents ~/.config/opencode/plugins/ (plural) as the plugin directory. Our docs previously used plugin/ (singular), which also works but caused confusion. Changes: - Renamed .opencode/plugin/ to .opencode/plugins/ in repo structure - Updated INSTALL.md to use plugins/ everywhere - Updated README.opencode.md (all platforms: Linux, macOS, Windows CMD, PowerShell, Git Bash) to use plugins/ - Updated test scripts to match Tested: Both singular and plural forms work, but we now match official docs. Fixes #343 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23fix(opencode): update docs for native skills, fix symlink instructionsJesse Vincent
Issues addressed: - #342: INSTALL.md still referenced removed find_skills/use_skill tools - #339: Symlink instructions could fail if target already exists Changes: - INSTALL.md: Added missing skills symlink step, updated to native skill tool - INSTALL.md: Removed Node.js prerequisite (no longer needed) - README.opencode.md: Added explicit rm before ln -s (ln -sf doesn't remove dirs) - Both files: Use ln -s instead of ln -sf for clarity Note: #343 (plugin vs plugins folder name) not addressed in this commit Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23feat(opencode): use native skills and fix agent reset bug (#226) (#330)Jesse Vincent
* fix use_skill agent context (#290) * fix: respect OPENCODE_CONFIG_DIR for personal skills lookup (#297) * fix: respect OPENCODE_CONFIG_DIR for personal skills lookup The plugin was hardcoded to look for personal skills in ~/.config/opencode/skills, ignoring users who set OPENCODE_CONFIG_DIR to a custom path (e.g., for dotfiles management). Now uses OPENCODE_CONFIG_DIR if set, falling back to the default path. * fix: update help text to use dynamic paths Use configDir and personalSkillsDir variables in help text so paths are accurate when OPENCODE_CONFIG_DIR is set. * fix: normalize OPENCODE_CONFIG_DIR before use Handle edge cases where the env var might be: - Empty or whitespace-only - Using ~ for home directory (common in .env files) - A relative path Now trims, expands ~, and resolves to absolute path. * feat(opencode): use native skills and fix agent reset bug (#226) - Replace custom use_skill/find_skills tools with OpenCode's native skill tool - Use experimental.chat.system.transform hook instead of session.prompt (fixes #226 agent reset on first message) - Symlink skills directory into ~/.config/opencode/skills/superpowers/ - Update installation docs with comprehensive Windows support: - Command Prompt, PowerShell, and Git Bash instructions - Proper symlink vs junction handling - Reinstall safety with cleanup steps - Verification commands for each shell * Add OpenCode native skills changes to release notes Documents: - Breaking change: switch to native skill tool - Fix for agent reset bug (#226) - Fix for Windows installation (#232) --------- Co-authored-by: Vinicius da Motta <viniciusmotta8@gmail.com> Co-authored-by: oribi <oribarilan@gmail.com>
2026-01-19fix: respect OPENCODE_CONFIG_DIR for personal skills lookup (#297)oribi
* fix: respect OPENCODE_CONFIG_DIR for personal skills lookup The plugin was hardcoded to look for personal skills in ~/.config/opencode/skills, ignoring users who set OPENCODE_CONFIG_DIR to a custom path (e.g., for dotfiles management). Now uses OPENCODE_CONFIG_DIR if set, falling back to the default path. * fix: update help text to use dynamic paths Use configDir and personalSkillsDir variables in help text so paths are accurate when OPENCODE_CONFIG_DIR is set. * fix: normalize OPENCODE_CONFIG_DIR before use Handle edge cases where the env var might be: - Empty or whitespace-only - Using ~ for home directory (common in .env files) - A relative path Now trims, expands ~, and resolves to absolute path.
2026-01-18fix use_skill agent context (#290)Vinicius da Motta
2025-11-26fix(opencode): Use `synthetic: true` for invisible content injection (#122)Josh Thomas
The OpenCode plugin injects the bootstrap and skill content as visible user messages. While `noReply: true` prevents an AI response, the injected content still appears in the chat UI which makes it just a bit noisy. OpenCode's `TextPartInput` supports a `synthetic` Boolean property that hides parts from the UI while keeping them visible to the AI -- it's been available in the v2 message format since around the v1.0.0 version bump.
2025-11-24fix(opencode): use session.created event for bootstrap injectionJesse Vincent
Switch from chat.message hook to session.created event for injecting the using-superpowers skill content. The new approach: - Injects at session creation via session.prompt() with noReply: true - Explicitly tells model the skill is already loaded to prevent redundant use_skill calls - Consolidates bootstrap generation into getBootstrapContent() helper - Removes fallback pattern in favor of single implementation Tested with 10 consecutive test runs and manual skill trigger validation.
2025-11-24fix: cleanup remaining code review issuesClaude
- Remove unused destructured parameters (project, $, worktree) from plugin - Add test coverage for checkForUpdates function (error handling cases)
2025-11-23fix: address code review issues in opencode support branchClaude
- Fix test runner exiting early due to ((var++)) returning 1 with set -e - Remove duplicate frontmatter stripping in superpowers-codex, use shared skillsCore.stripFrontmatter() - Remove unused promptsDir/promptFile variables from opencode plugin - Derive superpowers skills path from __dirname for better install flexibility - Simplify test-skills-core.sh by removing failing ESM import attempt
2025-11-23docs: add project-local skills documentationJesse Vincent
2025-11-23feat: use message insertion pattern for persistence and add project skills ↵Jesse Vincent
support - Add project-local skills directory (.opencode/skills/) with highest priority - Use client.session.prompt() with noReply for skill loading to persist across compaction - Add session.compacted event handler to re-inject bootstrap after context compaction - Update find_skills to list skills from project > personal > superpowers directories - Support project: prefix for explicit project skill loading - Keep chat.message hook as fallback for initial context injection
2025-11-23refactor: remove prompt file, use automatic chat.message injectionJesse Vincent
- Delete .opencode/prompts/superpowers.txt (no longer needed) - Simplify INSTALL.md to remove prompt file copying and agent configuration steps - Installation now relies on plugin's chat.message hook for automatic context injection - Cleaner, simpler setup process with fewer manual configuration steps
2025-11-23feat: add chat.message hook to inject superpowers context automaticallyJesse Vincent
2025-11-22fix: use tool() helper function for proper OpenCode tool definitionsJesse Vincent
2025-11-22fix: use tool object instead of tools array per opencode apiJesse Vincent
2025-11-22refactor: use static prompt file instead of dynamic config hookJesse Vincent
2025-11-22fix: use agent prompts instead of event hooks for context injectionJesse Vincent
OpenCode doesn't support injecting context through event hooks. Instead, the plugin now generates a prompt file that agents can reference via {file:./prompts/superpowers.txt} in their configuration.
2025-11-22fix: use correct event subscription format for opencodeJesse Vincent
2025-11-22fix: use session.created hook instead of session.startedJesse Vincent
2025-11-22refactor: convert skills-core and plugin to pure ESM for module compatibilityJesse Vincent
2025-11-22fix: use require inside plugin function to load commonjs moduleJesse Vincent
2025-11-22fix: convert opencode plugin to ES module syntaxJesse Vincent
- Replace CommonJS require() with ES import statements - Use createRequire() for loading CommonJS skills-core module - Export plugin as 'SuperpowersPlugin' named export - Maintains compatibility with existing skills-core.js CommonJS module
2025-11-22docs: fix plugin installation instructions for opencodeJesse Vincent
2025-11-22refactor: extract frontmatter stripping to shared helper functionJesse Vincent
2025-11-22docs: add opencode installation guideJesse Vincent
2025-11-22feat: implement session.started hook for opencodeJesse Vincent
2025-11-22feat: implement find_skills tool for opencodeJesse Vincent
2025-11-22feat: implement use_skill tool for opencodeJesse Vincent
2025-11-22feat: create opencode plugin scaffoldJesse Vincent