Skip to content

feat(opencode): add Opencode plugin support#14

Open
Minoo7 wants to merge 6 commits intomylukin:mainfrom
Minoo7:feat/opencode-installer
Open

feat(opencode): add Opencode plugin support#14
Minoo7 wants to merge 6 commits intomylukin:mainfrom
Minoo7:feat/opencode-installer

Conversation

@Minoo7
Copy link
Copy Markdown
Contributor

@Minoo7 Minoo7 commented Dec 26, 2025

Adds agent-foreman install --opencode to easily install the plugin into OpenCode projects. Utilizes opencode plugin and tool setup to mimic claude code plugin functionality

@mylukin
Copy link
Copy Markdown
Owner

mylukin commented Dec 29, 2025

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Verify rules directory was created with all rule files
const rulesDir = path.join(testDir, ".claude", "rules");
const ruleFiles = await fs.readdir(rulesDir);
expect(ruleFiles.length).toBe(7);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix rule count assertion to match template list

The harness copies every entry in RULE_TEMPLATES, which currently contains 8 files (including 07-strict-enforcement.md), so the rules directory will have 8 entries. This toBe(7) assertion will fail (and the OpenCode test below makes the same assumption), breaking CI as soon as the harness writes all templates. Consider asserting against RULE_TEMPLATES.length or updating the expected count to 8.

Useful? React with 👍 / 👎.

- Fix invalid 'tools' configuration in agent markdown files for OpenCode compatibility
- Implement filesystem scanning in 'status' command to auto-discover new task files
- Update installer to correctly copy agent definitions
- Add 'spec' command support to OpenCode plugin
- Update SKILL files to use correct subagent naming conventions
Copy link
Copy Markdown
Owner

@mylukin mylukin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Changes Required Before Merge

Thanks for adding OpenCode plugin support! However, there are a few issues that need to be addressed before this PR can be merged.


1. ⚠️ Test Assertion Bug (P2)

As Codex correctly identified, the test at tests/init-helpers.test.ts:389 has an incorrect assertion:

expect(ruleFiles.length).toBe(7);  // ❌ Wrong

RULE_TEMPLATES contains 8 entries (indices 0-7, including 07-strict-enforcement.md), so this test will fail.

Fix:

// Option 1: Use the constant (recommended - future-proof)
expect(ruleFiles.length).toBe(RULE_TEMPLATES.length);

// Option 2: Update the hardcoded value
expect(ruleFiles.length).toBe(8);

2. 🚨 Critical: SKILL.md subagent_type Format Change Breaks Claude Code

The PR changes subagent_type format from colon to hyphen in shared SKILL.md files:

Original (Claude Code format) Changed to
agent-foreman:implementer agent-foreman-implementer
agent-foreman:pm agent-foreman-pm
agent-foreman:ux agent-foreman-ux
agent-foreman:tech agent-foreman-tech
agent-foreman:qa agent-foreman-qa
agent-foreman:breakdown-writer agent-foreman-breakdown-writer

This will break Claude Code plugin functionality. Claude Code uses the colon format (plugin:agent) to identify subagents. The SKILL.md files are shared between both platforms.

Affected files:

  • plugins/agent-foreman/skills/feature-run/SKILL.md
  • plugins/agent-foreman/skills/foreman-spec/SKILL.md

3. 🚨 Critical: Slash Command Format Change

The PR also changes slash command formats:

Original Changed to
/agent-foreman:run /agent-foreman-run

This is also incorrect for Claude Code compatibility.


Recommended Solution

If OpenCode requires a different format, please:

  1. Keep the original colon format in SKILL.md files - These are used by Claude Code
  2. Handle format conversion in OpenCode plugin code - Transform the format at runtime in opencode-plugin.js
  3. Or create separate OpenCode-specific skill files - e.g., skills/feature-run/SKILL_OPENCODE.md

The shared SKILL.md files should remain compatible with Claude Code's expected format.


Please address these issues and I'll be happy to re-review. Let me know if you have any questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants