fix: spelling errors in documentation. (#297)
* fix: correct typos in documentation and agent files Fix multiple instances of "assest" typo to "assets" in documentation Correct "quetsions" typo to "questions" in repository structure sections Add new words to cSpell dictionary in VS Code settings * feat(trae): add support for trae ide integration - Add trae guide documentation - Update installer to support trae configuration - Include trae in ide options and documentation references - Fix typo in architect agent documentation --------- Co-authored-by: Devin Stagner <devin@blackstag.family>
This commit is contained in:
@@ -50,7 +50,7 @@ program
|
||||
.option('-f, --full', 'Install complete BMad Method')
|
||||
.option('-x, --expansion-only', 'Install only expansion packs (no bmad-core)')
|
||||
.option('-d, --directory <path>', 'Installation directory')
|
||||
.option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, roo, cline, gemini, github-copilot, other)')
|
||||
.option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, trae, roo, cline, gemini, github-copilot, other)')
|
||||
.option('-e, --expansion-packs <packs...>', 'Install specific expansion packs (can specify multiple)')
|
||||
.action(async (options) => {
|
||||
try {
|
||||
@@ -234,6 +234,7 @@ async function promptInstallation() {
|
||||
{ name: 'Cursor', value: 'cursor' },
|
||||
{ name: 'Claude Code', value: 'claude-code' },
|
||||
{ name: 'Windsurf', value: 'windsurf' },
|
||||
{ name: 'Trae', value: 'trae' }, // { name: 'Trae', value: 'trae'}
|
||||
{ name: 'Roo Code', value: 'roo' },
|
||||
{ name: 'Cline', value: 'cline' },
|
||||
{ name: 'Gemini CLI', value: 'gemini' },
|
||||
|
||||
@@ -37,6 +37,15 @@ ide-configurations:
|
||||
# To use BMad agents in Windsurf:
|
||||
# 1. Type @agent-name (e.g., "@dev", "@pm")
|
||||
# 2. Windsurf will adopt that agent's persona
|
||||
trae:
|
||||
name: Trae
|
||||
rule-dir: .trae/rules/
|
||||
format: multi-file
|
||||
command-suffix: .md
|
||||
instructions: |
|
||||
# To use BMad agents in Trae:
|
||||
# 1. Type @agent-name (e.g., "@dev", "@pm", "@architect")
|
||||
# 2. Trae will adopt that agent's persona
|
||||
roo:
|
||||
name: Roo Code
|
||||
format: custom-modes
|
||||
|
||||
@@ -57,6 +57,8 @@ class IdeSetup {
|
||||
return this.setupClaudeCode(installDir, selectedAgent);
|
||||
case "windsurf":
|
||||
return this.setupWindsurf(installDir, selectedAgent);
|
||||
case "trae":
|
||||
return this.setupTrae(installDir, selectedAgent);
|
||||
case "roo":
|
||||
return this.setupRoo(installDir, selectedAgent);
|
||||
case "cline":
|
||||
@@ -210,6 +212,55 @@ class IdeSetup {
|
||||
return true;
|
||||
}
|
||||
|
||||
async setupTrae(installDir, selectedAgent) {
|
||||
const traeRulesDir = path.join(installDir, ".trae", "rules");
|
||||
const agents = selectedAgent? [selectedAgent] : await this.getAllAgentIds(installDir);
|
||||
|
||||
await fileManager.ensureDirectory(traeRulesDir);
|
||||
|
||||
for (const agentId of agents) {
|
||||
// Find the agent file
|
||||
const agentPath = await this.findAgentPath(agentId, installDir);
|
||||
|
||||
if (agentPath) {
|
||||
const agentContent = await fileManager.readFile(agentPath);
|
||||
const mdPath = path.join(traeRulesDir, `${agentId}.md`);
|
||||
|
||||
// Create MD content (similar to Cursor but without frontmatter)
|
||||
let mdContent = `# ${agentId.toUpperCase()} Agent Rule\n\n`;
|
||||
mdContent += `This rule is triggered when the user types \`@${agentId}\` and activates the ${await this.getAgentTitle(
|
||||
agentId,
|
||||
installDir
|
||||
)} agent persona.\n\n`;
|
||||
mdContent += "## Agent Activation\n\n";
|
||||
mdContent +=
|
||||
"CRITICAL: Read the full YAML, start activation to alter your state of being, follow startup section instructions, stay in this being until told to exit this mode:\n\n";
|
||||
mdContent += "```yaml\n";
|
||||
// Extract just the YAML content from the agent file
|
||||
const yamlContent = extractYamlFromAgent(agentContent);
|
||||
if (yamlContent) {
|
||||
mdContent += yamlContent;
|
||||
}
|
||||
else {
|
||||
// If no YAML found, include the whole content minus the header
|
||||
mdContent += agentContent.replace(/^#.*$/m, "").trim();
|
||||
}
|
||||
mdContent += "\n```\n\n";
|
||||
mdContent += "## File Reference\n\n";
|
||||
const relativePath = path.relative(installDir, agentPath).replace(/\\/g, '/');
|
||||
mdContent += `The complete agent definition is available in [${relativePath}](${relativePath}).\n\n`;
|
||||
mdContent += "## Usage\n\n";
|
||||
mdContent += `When the user types \`@${agentId}\`, activate this ${await this.getAgentTitle(
|
||||
agentId,
|
||||
installDir
|
||||
)} persona and follow all instructions defined in the YAML configuration above.\n`;
|
||||
|
||||
await fileManager.writeFile(mdPath, mdContent);
|
||||
console.log(chalk.green(`✓ Created rule: ${agentId}.md`));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async findAgentPath(agentId, installDir) {
|
||||
// Try to find the agent file in various locations
|
||||
const possiblePaths = [
|
||||
|
||||
Reference in New Issue
Block a user