refactor: consolidate OpenCode templates and add support for tasks, tools, and workflows#1556
Merged
bmadcode merged 1 commit intobmad-code-org:mainfrom Feb 6, 2026
Merged
Conversation
…ools, and workflows
- Move opencode/body.md to combined/opencode-agent.md with frontmatter
- Add combined templates for tasks, tools, and workflows (both .md and .yaml)
- Replace hardcoded _bmad path with {{bmadFolderName}} variable
- Remove split/opencode/ templates (header.md, body.md)
- Add .gitkeep to preserve empty split/ directory
📝 WalkthroughWalkthroughThe PR updates IDE templates for OpenCode integration by modifying the agent template to use a configurable folder name placeholder instead of hardcoded Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
dickymoore
pushed a commit
to dickymoore/BMAD-METHOD
that referenced
this pull request
Feb 6, 2026
…ools, and workflows (bmad-code-org#1556) - Move opencode/body.md to combined/opencode-agent.md with frontmatter - Add combined templates for tasks, tools, and workflows (both .md and .yaml) - Replace hardcoded _bmad path with {{bmadFolderName}} variable - Remove split/opencode/ templates (header.md, body.md) - Add .gitkeep to preserve empty split/ directory
4 tasks
This was referenced Feb 11, 2026
adambiggs
added a commit
to adambiggs/BMAD-METHOD
that referenced
this pull request
Feb 13, 2026
…in templates Remove hallucinated mode: primary from opencode-agent template - OpenCode defaults to mode: all and mode: primary does not enable Tab-switching as the original PR bmad-code-org#1556 claimed. Restore the name frontmatter field across all OpenCode templates to match the standard pattern used by other IDEs.
bmadcode
pushed a commit
that referenced
this pull request
Feb 13, 2026
…in templates (#1644) Remove hallucinated mode: primary from opencode-agent template - OpenCode defaults to mode: all and mode: primary does not enable Tab-switching as the original PR #1556 claimed. Restore the name frontmatter field across all OpenCode templates to match the standard pattern used by other IDEs.
This was referenced Feb 24, 2026
This was referenced Mar 4, 2026
This was referenced Mar 11, 2026
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix OpenCode Agent Discovery
Summary
BMAD agents weren't appearing in OpenCode's Tab-switchable agent list after installation. This PR adds proper OpenCode-specific templates with the required
mode: primaryfrontmatter field.Problem
After running
npx bmad-method installand selecting OpenCode:/bmad-mastercommand loaded agents but they weren't discoverable via TabRoot Cause
The template loading flow was broken:
platform-codes.yamlsetstemplate_type: opencodebut no header/body overrides_config-driven.js:loadTemplate()skipped split templates (none configured)combined/opencode-agent.md- file didn't existcombined/default-agent.mdwhich containsdisable-model-invocation: truedisable-model-invocationand requiresmode: primaryfor Tab-switchingSolution
Created OpenCode-specific combined templates with proper frontmatter:
opencode-agent.mdmode: primary(enables Tab-switching)opencode-workflow.mddescriptiononlyopencode-workflow-yaml.mddescriptiononlyopencode-task.mddescriptiononlyopencode-tool.mddescriptiononlyKey Differences from Default Template
modeprimarynamedisable-model-invocationtrue_bmad{{bmadFolderName}}Changes
Added
tools/cli/installers/lib/ide/templates/combined/opencode-agent.mdtools/cli/installers/lib/ide/templates/combined/opencode-workflow.mdtools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.mdtools/cli/installers/lib/ide/templates/combined/opencode-task.mdtools/cli/installers/lib/ide/templates/combined/opencode-tool.mdRemoved (orphaned files, never used)
tools/cli/installers/lib/ide/templates/split/opencode/header.mdtools/cli/installers/lib/ide/templates/split/opencode/body.mdtools/cli/installers/lib/ide/templates/split/opencode/directoryTesting
npx bmad-method installand select OpenCode.opencode/agent/havemode: primaryin frontmatterdisable-model-invocationRisk Assessment