summaryrefslogtreecommitdiff
path: root/.opencode/plugin/superpowers.js
AgeCommit message (Collapse)Author
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-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-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-22refactor: extract frontmatter stripping to shared helper functionJesse 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