Revert changes that moved agents to the command directory in the opencode installer

This commit is contained in:
cpitt 2025-10-28 12:33:17 -07:00
parent ed3603f7b2
commit 01b1ce7b1e
2 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@
## Activating Agents
BMAD agents are installed as OpenCode agents in `.opencode/agent/BMAD/{module_name}` and workflow commands in `.opencode/command/BMAD/{module_name}`.
BMAD agents are installed as OpenCode agents in `.opencode/agent/{module_name}` and workflow commands in `.opencode/command/{module_name}`.
### How to Use

View File

@ -25,12 +25,13 @@ class OpenCodeSetup extends BaseIdeSetup {
const baseDir = path.join(projectDir, this.configDir);
const commandsBaseDir = path.join(baseDir, this.commandsDir);
const agentsBaseDir = path.join(baseDir, this.agentsDir);
await this.ensureDir(agentsBaseDir);
await this.ensureDir(commandsBaseDir);
// Install primary agents with flat naming: bmad-agent-{module}-{name}.md
// OpenCode puts agents in the command folder, not a separate agent folder
const agents = await getAgentsFromBmad(bmadDir, options.selectedModules || []);
const agents = await getAgentsFromBmad(agentsBaseDir, options.selectedModules || []);
let agentCount = 0;
for (const agent of agents) {
@ -41,7 +42,7 @@ class OpenCodeSetup extends BaseIdeSetup {
const agentContent = this.createAgentContent(processed, agent);
// Flat structure in command folder: bmad-agent-{module}-{name}.md
const targetPath = path.join(commandsBaseDir, `bmad-agent-${agent.module}-${agent.name}.md`);
const targetPath = path.join(agentsDir, `bmad-agent-${agent.module}-${agent.name}.md`);
await this.writeFile(targetPath, agentContent);
agentCount++;
}