fix(installer): convert general-purpose subagent to OpenCode's "general"

OpenCode uses "general" as its built-in general-purpose subagent type,
while Claude Code uses "general-purpose". This caused "Unknown agent type:
general-purpose is not a valid agent type" errors in OpenCode when running
workflows that spawn subagents (plan-phase, new-project, debug, etc.).

Fixes #411

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-02-15 15:44:04 -06:00
parent 99c5c41067
commit 474b75ea97

View File

@@ -469,6 +469,8 @@ function convertClaudeToOpencodeFrontmatter(content) {
convertedContent = convertedContent.replace(/\/gsd:/g, '/gsd-');
// Replace ~/.claude with ~/.config/opencode (OpenCode's correct config location)
convertedContent = convertedContent.replace(/~\/\.claude\b/g, '~/.config/opencode');
// Replace general-purpose subagent type with OpenCode's equivalent "general"
convertedContent = convertedContent.replace(/subagent_type="general-purpose"/g, 'subagent_type="general"');
// Check if content has frontmatter
if (!convertedContent.startsWith('---')) {