@zeyue0329/xiaoma-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/.releaserc.json +18 -0
  2. package/.vscode/settings.json +44 -0
  3. package/CONTRIBUTING.md +209 -0
  4. package/LICENSE +21 -0
  5. package/QUICK-START.md +173 -0
  6. package/README.md +532 -0
  7. package/common/tasks/create-doc.md +101 -0
  8. package/common/tasks/execute-checklist.md +93 -0
  9. package/common/utils/bmad-doc-template.md +325 -0
  10. package/common/utils/workflow-management.md +69 -0
  11. package/dist/agents/analyst.txt +2882 -0
  12. package/dist/agents/architect.txt +3543 -0
  13. package/dist/agents/dev.txt +428 -0
  14. package/dist/agents/pm.txt +2229 -0
  15. package/dist/agents/po.txt +1364 -0
  16. package/dist/agents/qa.txt +386 -0
  17. package/dist/agents/sm.txt +668 -0
  18. package/dist/agents/ux-expert.txt +701 -0
  19. package/dist/agents/xiaoma-master.txt +8756 -0
  20. package/dist/agents/xiaoma-orchestrator.txt +1490 -0
  21. package/dist/teams/team-all.txt +11062 -0
  22. package/dist/teams/team-fullstack.txt +10392 -0
  23. package/dist/teams/team-ide-minimal.txt +3507 -0
  24. package/dist/teams/team-no-ui.txt +8951 -0
  25. package/docs/GUIDING-PRINCIPLES.md +91 -0
  26. package/docs/core-architecture.md +219 -0
  27. package/docs/expansion-packs.md +280 -0
  28. package/docs/versioning-and-releases.md +77 -0
  29. package/docs/versions.md +48 -0
  30. package/expansion-packs/README.md +3 -0
  31. package/package.json +80 -0
  32. package/tools/bmad-npx-wrapper.js +39 -0
  33. package/tools/builders/web-builder.js +681 -0
  34. package/tools/bump-all-versions.js +106 -0
  35. package/tools/bump-expansion-version.js +83 -0
  36. package/tools/cli.js +152 -0
  37. package/tools/flattener/main.js +570 -0
  38. package/tools/installer/README.md +8 -0
  39. package/tools/installer/bin/xiaoma.js +326 -0
  40. package/tools/installer/config/ide-agent-config.yaml +58 -0
  41. package/tools/installer/config/install.config.yaml +113 -0
  42. package/tools/installer/lib/config-loader.js +253 -0
  43. package/tools/installer/lib/file-manager.js +411 -0
  44. package/tools/installer/lib/ide-base-setup.js +227 -0
  45. package/tools/installer/lib/ide-setup.js +1302 -0
  46. package/tools/installer/lib/installer.js +1772 -0
  47. package/tools/installer/lib/memory-profiler.js +224 -0
  48. package/tools/installer/lib/module-manager.js +110 -0
  49. package/tools/installer/lib/resource-locator.js +310 -0
  50. package/tools/installer/package-lock.json +906 -0
  51. package/tools/installer/package.json +43 -0
  52. package/tools/lib/dependency-resolver.js +179 -0
  53. package/tools/lib/yaml-utils.js +29 -0
  54. package/tools/md-assets/web-agent-startup-instructions.md +39 -0
  55. package/tools/semantic-release-sync-installer.js +30 -0
  56. package/tools/sync-installer-version.js +34 -0
  57. package/tools/update-expansion-version.js +54 -0
  58. package/tools/upgraders/v3-to-v4-upgrader.js +763 -0
  59. package/tools/version-bump.js +79 -0
  60. package/tools/xiaoma-npx-wrapper.js +39 -0
  61. package/tools/yaml-format.js +240 -0
  62. package/xiaoma-core/agent-teams/team-all.yaml +14 -0
  63. package/xiaoma-core/agent-teams/team-fullstack.yaml +18 -0
  64. package/xiaoma-core/agent-teams/team-ide-minimal.yaml +10 -0
  65. package/xiaoma-core/agent-teams/team-no-ui.yaml +13 -0
  66. package/xiaoma-core/agents/analyst.md +81 -0
  67. package/xiaoma-core/agents/architect.md +84 -0
  68. package/xiaoma-core/agents/dev.md +76 -0
  69. package/xiaoma-core/agents/pm.md +81 -0
  70. package/xiaoma-core/agents/po.md +76 -0
  71. package/xiaoma-core/agents/qa.md +69 -0
  72. package/xiaoma-core/agents/sm.md +62 -0
  73. package/xiaoma-core/agents/ux-expert.md +66 -0
  74. package/xiaoma-core/agents/xiaoma-master.md +108 -0
  75. package/xiaoma-core/agents/xiaoma-orchestrator.md +150 -0
  76. package/xiaoma-core/bmad-core/user-guide.md +0 -0
  77. package/xiaoma-core/checklists/architect-checklist.md +443 -0
  78. package/xiaoma-core/checklists/change-checklist.md +182 -0
  79. package/xiaoma-core/checklists/pm-checklist.md +375 -0
  80. package/xiaoma-core/checklists/po-master-checklist.md +441 -0
  81. package/xiaoma-core/checklists/story-dod-checklist.md +101 -0
  82. package/xiaoma-core/checklists/story-draft-checklist.md +156 -0
  83. package/xiaoma-core/core-config.yaml +20 -0
  84. package/xiaoma-core/data/brainstorming-techniques.md +36 -0
  85. package/xiaoma-core/data/elicitation-methods.md +134 -0
  86. package/xiaoma-core/data/technical-preferences.md +3 -0
  87. package/xiaoma-core/data/xiaoma-kb.md +803 -0
  88. package/xiaoma-core/enhanced-ide-development-workflow.md +43 -0
  89. package/xiaoma-core/tasks/advanced-elicitation.md +117 -0
  90. package/xiaoma-core/tasks/brownfield-create-epic.md +160 -0
  91. package/xiaoma-core/tasks/brownfield-create-story.md +147 -0
  92. package/xiaoma-core/tasks/correct-course.md +70 -0
  93. package/xiaoma-core/tasks/create-brownfield-story.md +304 -0
  94. package/xiaoma-core/tasks/create-deep-research-prompt.md +289 -0
  95. package/xiaoma-core/tasks/create-next-story.md +112 -0
  96. package/xiaoma-core/tasks/document-project.md +341 -0
  97. package/xiaoma-core/tasks/facilitate-brainstorming-session.md +136 -0
  98. package/xiaoma-core/tasks/generate-ai-frontend-prompt.md +51 -0
  99. package/xiaoma-core/tasks/index-docs.md +179 -0
  100. package/xiaoma-core/tasks/kb-mode-interaction.md +75 -0
  101. package/xiaoma-core/tasks/review-story.md +145 -0
  102. package/xiaoma-core/tasks/shard-doc.md +187 -0
  103. package/xiaoma-core/tasks/validate-next-story.md +134 -0
  104. package/xiaoma-core/templates/architecture-tmpl.yaml +650 -0
  105. package/xiaoma-core/templates/brainstorming-output-tmpl.yaml +156 -0
  106. package/xiaoma-core/templates/brownfield-architecture-tmpl.yaml +476 -0
  107. package/xiaoma-core/templates/brownfield-prd-tmpl.yaml +280 -0
  108. package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +293 -0
  109. package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +206 -0
  110. package/xiaoma-core/templates/front-end-spec-tmpl.yaml +349 -0
  111. package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +805 -0
  112. package/xiaoma-core/templates/market-research-tmpl.yaml +252 -0
  113. package/xiaoma-core/templates/prd-tmpl.yaml +202 -0
  114. package/xiaoma-core/templates/project-brief-tmpl.yaml +221 -0
  115. package/xiaoma-core/templates/story-tmpl.yaml +137 -0
  116. package/xiaoma-core/user-guide.md +251 -0
  117. package/xiaoma-core/workflows/brownfield-fullstack.yaml +297 -0
  118. package/xiaoma-core/workflows/brownfield-service.yaml +187 -0
  119. package/xiaoma-core/workflows/brownfield-ui.yaml +197 -0
  120. package/xiaoma-core/workflows/greenfield-fullstack.yaml +240 -0
  121. package/xiaoma-core/workflows/greenfield-service.yaml +206 -0
  122. package/xiaoma-core/workflows/greenfield-ui.yaml +235 -0
  123. package/xiaoma-core/working-in-the-brownfield.md +364 -0
@@ -0,0 +1,326 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { program } = require('commander');
4
+ const path = require('path');
5
+ const fs = require('fs').promises;
6
+ const yaml = require('js-yaml');
7
+ const chalk = require('chalk');
8
+ const inquirer = require('inquirer');
9
+
10
+ // Handle both execution contexts (from root via npx or from installer directory)
11
+ let version;
12
+ let installer;
13
+ try {
14
+ // Try installer context first (when run from tools/installer/)
15
+ version = require('../package.json').version;
16
+ installer = require('../lib/installer');
17
+ } catch (e) {
18
+ // Fall back to root context (when run via npx from GitHub)
19
+ console.log(`Installer context not found (${e.message}), trying root context...`);
20
+ try {
21
+ version = require('../../../package.json').version;
22
+ installer = require('../../../tools/installer/lib/installer');
23
+ } catch (e2) {
24
+ console.error('Error: Could not load required modules. Please ensure you are running from the correct directory.');
25
+ console.error('Debug info:', {
26
+ __dirname,
27
+ cwd: process.cwd(),
28
+ error: e2.message
29
+ });
30
+ process.exit(1);
31
+ }
32
+ }
33
+
34
+ program
35
+ .version(version)
36
+ .description('XiaoMa Web installer - Universal AI agent framework for any domain');
37
+
38
+ program
39
+ .command('install')
40
+ .description('Install XiaoMa Web agents and tools')
41
+ .option('-f, --full', 'Install complete XiaoMa Web')
42
+ .option('-x, --expansion-only', 'Install only expansion packs (no xiaoma-core)')
43
+ .option('-d, --directory <path>', 'Installation directory')
44
+ .option('-i, --ide <ide...>', 'Configure for specific IDE(s) - can specify multiple (cursor, claude-code, windsurf, trae, roo, kilo, cline, gemini, qwen-code, github-copilot, other)')
45
+ .option('-e, --expansion-packs <packs...>', 'Install specific expansion packs (can specify multiple)')
46
+ .action(async (options) => {
47
+ try {
48
+ if (!options.full && !options.expansionOnly) {
49
+ // Interactive mode
50
+ const answers = await promptInstallation();
51
+ if (!answers._alreadyInstalled) {
52
+ await installer.install(answers);
53
+ process.exit(0);
54
+ }
55
+ } else {
56
+ // Direct mode
57
+ let installType = 'full';
58
+ if (options.expansionOnly) installType = 'expansion-only';
59
+
60
+ const config = {
61
+ installType,
62
+ directory: options.directory || '.',
63
+ ides: (options.ide || []).filter(ide => ide !== 'other'),
64
+ expansionPacks: options.expansionPacks || [],
65
+ // Default web bundles configuration
66
+ includeWebBundles: true,
67
+ webBundleType: 'all',
68
+ webBundlesDirectory: `${options.directory || '.'}/web-bundles`
69
+ };
70
+ await installer.install(config);
71
+ process.exit(0);
72
+ }
73
+ } catch (error) {
74
+ console.error(chalk.red('Installation failed:'), error.message);
75
+ process.exit(1);
76
+ }
77
+ });
78
+
79
+ program
80
+ .command('update')
81
+ .description('Update existing XiaoMa Web installation')
82
+ .option('--force', 'Force update, overwriting modified files')
83
+ .option('--dry-run', 'Show what would be updated without making changes')
84
+ .action(async () => {
85
+ try {
86
+ await installer.update();
87
+ } catch (error) {
88
+ console.error(chalk.red('Update failed:'), error.message);
89
+ process.exit(1);
90
+ }
91
+ });
92
+
93
+ program
94
+ .command('list:expansions')
95
+ .description('List available expansion packs')
96
+ .action(async () => {
97
+ try {
98
+ await installer.listExpansionPacks();
99
+ } catch (error) {
100
+ console.error(chalk.red('Error:'), error.message);
101
+ process.exit(1);
102
+ }
103
+ });
104
+
105
+ program
106
+ .command('status')
107
+ .description('Show installation status')
108
+ .action(async () => {
109
+ try {
110
+ await installer.showStatus();
111
+ } catch (error) {
112
+ console.error(chalk.red('Error:'), error.message);
113
+ process.exit(1);
114
+ }
115
+ });
116
+
117
+ program
118
+ .command('flatten')
119
+ .description('Flatten codebase to XML format')
120
+ .option('-i, --input <path>', 'Input directory to flatten', process.cwd())
121
+ .option('-o, --output <path>', 'Output file path', 'flattened-codebase.xml')
122
+ .action(async (options) => {
123
+ try {
124
+ await installer.flatten(options);
125
+ } catch (error) {
126
+ console.error(chalk.red('Flatten failed:'), error.message);
127
+ process.exit(1);
128
+ }
129
+ });
130
+
131
+ async function promptInstallation() {
132
+
133
+ // Display ASCII logo
134
+ console.log(chalk.bold.cyan(`
135
+ ██╗ ██╗██╗ █████╗ ██████╗ ███╗ ███╗ █████╗ ██╗ ██╗███████╗██████╗
136
+ ╚██╗██╔╝██║██╔══██╗██╔═══██╗████╗ ████║██╔══██╗ ██║ ██║██╔════╝██╔══██╗
137
+ ╚███╔╝ ██║███████║██║ ██║██╔████╔██║███████║█████╗██║ █╗ ██║█████╗ ██████╔╝
138
+ ██╔██╗ ██║██╔══██║██║ ██║██║╚██╔╝██║██╔══██║╚════╝██║███╗██║██╔══╝ ██╔══██╗
139
+ ██╔╝ ██╗██║██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ██║ ╚███╔███╔╝███████╗██████╔╝
140
+ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚══════╝╚═════╝
141
+ `));
142
+
143
+ console.log(chalk.bold.magenta('🚀 Universal AI Agent Framework for Any Domain'));
144
+ console.log(chalk.bold.blue(`✨ Installer v${version}\n`));
145
+
146
+ const answers = {};
147
+
148
+ // Ask for installation directory first
149
+ const { directory } = await inquirer.prompt([
150
+ {
151
+ type: 'input',
152
+ name: 'directory',
153
+ message: 'Enter the full path to your project directory where XiaoMa Web should be installed:',
154
+ default: process.cwd(),
155
+ validate: (input) => {
156
+ if (!input.trim()) {
157
+ return 'Please enter a valid project path';
158
+ }
159
+ return true;
160
+ }
161
+ }
162
+ ]);
163
+ answers.directory = directory;
164
+
165
+ // Detect existing installations
166
+ const installDir = path.resolve(directory);
167
+ const state = await installer.detectInstallationState(installDir);
168
+
169
+ // Check for existing expansion packs
170
+ const existingExpansionPacks = state.expansionPacks || {};
171
+
172
+ // Get available expansion packs
173
+ const availableExpansionPacks = await installer.getAvailableExpansionPacks();
174
+
175
+ // Build choices list
176
+ const choices = [];
177
+
178
+ // Load core config to get short-title
179
+ const coreConfigPath = path.join(__dirname, '..', '..', '..', 'xiaoma-core', 'core-config.yaml');
180
+ const coreConfig = yaml.load(await fs.readFile(coreConfigPath, 'utf8'));
181
+ const coreShortTitle = coreConfig['short-title'] || 'XiaoMa Agile Core System';
182
+
183
+ // Add XiaoMa core option
184
+ let bmadOptionText;
185
+ if (state.type === 'v4_existing') {
186
+ const currentVersion = state.manifest?.version || 'unknown';
187
+ const newVersion = version; // Always use package.json version
188
+ const versionInfo = currentVersion === newVersion
189
+ ? `(v${currentVersion} - reinstall)`
190
+ : `(v${currentVersion} → v${newVersion})`;
191
+ bmadOptionText = `Update ${coreShortTitle} ${versionInfo} .xiaoma-core`;
192
+ } else {
193
+ bmadOptionText = `${coreShortTitle} (v${version}) .xiaoma-core`;
194
+ }
195
+
196
+ choices.push({
197
+ name: bmadOptionText,
198
+ value: 'xiaoma-core',
199
+ checked: true
200
+ });
201
+
202
+ // Add expansion pack options
203
+ for (const pack of availableExpansionPacks) {
204
+ const existing = existingExpansionPacks[pack.id];
205
+ let packOptionText;
206
+
207
+ if (existing) {
208
+ const currentVersion = existing.manifest?.version || 'unknown';
209
+ const newVersion = pack.version;
210
+ const versionInfo = currentVersion === newVersion
211
+ ? `(v${currentVersion} - reinstall)`
212
+ : `(v${currentVersion} → v${newVersion})`;
213
+ packOptionText = `Update ${pack.shortTitle} ${versionInfo} .${pack.id}`;
214
+ } else {
215
+ packOptionText = `${pack.shortTitle} (v${pack.version}) .${pack.id}`;
216
+ }
217
+
218
+ choices.push({
219
+ name: packOptionText,
220
+ value: pack.id,
221
+ checked: false
222
+ });
223
+ }
224
+
225
+ // Ask what to install
226
+ const { selectedItems } = await inquirer.prompt([
227
+ {
228
+ type: 'checkbox',
229
+ name: 'selectedItems',
230
+ message: 'Select what to install/update (use space to select, enter to continue):',
231
+ choices: choices,
232
+ validate: (selected) => {
233
+ if (selected.length === 0) {
234
+ return 'Please select at least one item to install';
235
+ }
236
+ return true;
237
+ }
238
+ }
239
+ ]);
240
+
241
+ // Process selections
242
+ answers.installType = selectedItems.includes('xiaoma-core') ? 'full' : 'expansion-only';
243
+ answers.expansionPacks = selectedItems.filter(item => item !== 'xiaoma-core');
244
+
245
+ // Set default sharding configuration if installing XiaoMa core
246
+ if (selectedItems.includes('xiaoma-core')) {
247
+ console.log(chalk.cyan('\n📋 Document Organization Settings'));
248
+ console.log(chalk.dim('Using recommended defaults: PRD and architecture will be sharded into multiple files.\n'));
249
+
250
+ // Use default values without prompting
251
+ answers.prdSharded = true;
252
+ answers.architectureSharded = true;
253
+ }
254
+
255
+ // Ask for IDE configuration
256
+ let ides = [];
257
+ let ideSelectionComplete = false;
258
+
259
+ while (!ideSelectionComplete) {
260
+ console.log(chalk.cyan('\n🛠️ IDE Configuration'));
261
+ console.log(chalk.bold.yellow.bgRed(' ⚠️ IMPORTANT: This is a MULTISELECT! Use SPACEBAR to toggle each IDE! '));
262
+ console.log(chalk.bold.magenta('🔸 Use arrow keys to navigate'));
263
+ console.log(chalk.bold.magenta('🔸 Use SPACEBAR to select/deselect IDEs'));
264
+ console.log(chalk.bold.magenta('🔸 Press ENTER when finished selecting\n'));
265
+
266
+ const ideResponse = await inquirer.prompt([
267
+ {
268
+ type: 'checkbox',
269
+ name: 'ides',
270
+ message: 'Which IDE(s) do you want to configure? (Select with SPACEBAR, confirm with ENTER):',
271
+ choices: [
272
+ { name: 'Cursor', value: 'cursor' },
273
+ { name: 'Claude Code', value: 'claude-code' },
274
+ { name: 'Trae', value: 'trae' }
275
+ ]
276
+ }
277
+ ]);
278
+
279
+ ides = ideResponse.ides;
280
+
281
+ // Confirm no IDE selection if none selected
282
+ if (ides.length === 0) {
283
+ const { confirmNoIde } = await inquirer.prompt([
284
+ {
285
+ type: 'confirm',
286
+ name: 'confirmNoIde',
287
+ message: chalk.red('⚠️ You have NOT selected any IDEs. This means NO IDE integration will be set up. Is this correct?'),
288
+ default: false
289
+ }
290
+ ]);
291
+
292
+ if (!confirmNoIde) {
293
+ console.log(chalk.bold.red('\n🔄 Returning to IDE selection. Remember to use SPACEBAR to select IDEs!\n'));
294
+ continue; // Go back to IDE selection only
295
+ }
296
+ }
297
+
298
+ ideSelectionComplete = true;
299
+ }
300
+
301
+ // Use selected IDEs directly
302
+ answers.ides = ides;
303
+
304
+
305
+ // Set default web bundles configuration
306
+ console.log(chalk.cyan('\n📦 Web Bundles Configuration'));
307
+ console.log(chalk.dim('Using recommended defaults: Including all available web bundles (agents, teams, expansion packs).\n'));
308
+
309
+ const includeWebBundles = true;
310
+ const webBundleType = 'all';
311
+ answers.webBundleType = webBundleType;
312
+
313
+ // Use default web bundles directory
314
+ const webBundlesDirectory = `${answers.directory}/web-bundles`;
315
+ answers.webBundlesDirectory = webBundlesDirectory;
316
+ answers.includeWebBundles = includeWebBundles;
317
+
318
+ return answers;
319
+ }
320
+
321
+ program.parse(process.argv);
322
+
323
+ // Show help if no command provided
324
+ if (!process.argv.slice(2).length) {
325
+ program.outputHelp();
326
+ }
@@ -0,0 +1,58 @@
1
+ # IDE-specific agent configurations
2
+ # This file defines agent-specific settings for different IDEs
3
+
4
+ # Roo Code file permissions
5
+ # Each agent can have restricted file access based on regex patterns
6
+ # If an agent is not listed here, it gets full edit access
7
+ roo-permissions:
8
+ # Core agents
9
+ analyst:
10
+ fileRegex: "\\.(md|txt)$"
11
+ description: "Documentation and text files"
12
+ pm:
13
+ fileRegex: "\\.(md|txt)$"
14
+ description: "Product documentation"
15
+ architect:
16
+ fileRegex: "\\.(md|txt|yml|yaml|json)$"
17
+ description: "Architecture docs and configs"
18
+ qa:
19
+ fileRegex: "\\.(test|spec)\\.(js|ts|jsx|tsx)$|\\.md$"
20
+ description: "Test files and documentation"
21
+ ux-expert:
22
+ fileRegex: "\\.(md|css|scss|html|jsx|tsx)$"
23
+ description: "Design-related files"
24
+ po:
25
+ fileRegex: "\\.(md|txt)$"
26
+ description: "Story and requirement docs"
27
+ sm:
28
+ fileRegex: "\\.(md|txt)$"
29
+ description: "Process and planning docs"
30
+ # Expansion pack agents
31
+ game-designer:
32
+ fileRegex: "\\.(md|txt|json|yaml|yml)$"
33
+ description: "Game design documents and configs"
34
+ game-sm:
35
+ fileRegex: "\\.(md|txt)$"
36
+ description: "Game project management docs"
37
+
38
+ # Cline agent ordering
39
+ # Lower numbers appear first in the list
40
+ # Agents not listed get order 99
41
+ cline-order:
42
+ # Core agents
43
+ bmad-master: 1
44
+ bmad-orchestrator: 2
45
+ pm: 3
46
+ analyst: 4
47
+ architect: 5
48
+ po: 6
49
+ sm: 7
50
+ dev: 8
51
+ qa: 9
52
+ ux-expert: 10
53
+ # Expansion pack agents
54
+ bmad-the-creator: 11
55
+ game-designer: 12
56
+ game-developer: 13
57
+ game-sm: 14
58
+ infra-devops-platform: 15
@@ -0,0 +1,113 @@
1
+ installation-options:
2
+ full:
3
+ name: Complete XiaoMa Core
4
+ description: Copy the entire .xiaoma-core folder with all agents, templates, and tools
5
+ action: copy-folder
6
+ source: xiaoma-core
7
+ single-agent:
8
+ name: Single Agent
9
+ description: Select and install a single agent with its dependencies
10
+ action: copy-agent
11
+ ide-configurations:
12
+ cursor:
13
+ name: Cursor
14
+ rule-dir: .cursor/rules/
15
+ format: multi-file
16
+ command-suffix: .mdc
17
+ instructions: |
18
+ # To use XiaoMa agents in Cursor:
19
+ # 1. Press Ctrl+L (Cmd+L on Mac) to open the chat
20
+ # 2. Type @agent-name (e.g., "@dev", "@pm", "@architect")
21
+ # 3. The agent will adopt that persona for the conversation
22
+ claude-code:
23
+ name: Claude Code
24
+ rule-dir: .claude/commands/XiaoMa/
25
+ format: multi-file
26
+ command-suffix: .md
27
+ instructions: |
28
+ # To use XiaoMa agents in Claude Code:
29
+ # 1. Type /agent-name (e.g., "/dev", "/pm", "/architect")
30
+ # 2. Claude will switch to that agent's persona
31
+ windsurf:
32
+ name: Windsurf
33
+ rule-dir: .windsurf/rules/
34
+ format: multi-file
35
+ command-suffix: .md
36
+ instructions: |
37
+ # To use XiaoMa agents in Windsurf:
38
+ # 1. Type @agent-name (e.g., "@dev", "@pm")
39
+ # 2. Windsurf will adopt that agent's persona
40
+ trae:
41
+ name: Trae
42
+ rule-dir: .trae/rules/
43
+ format: multi-file
44
+ command-suffix: .md
45
+ instructions: |
46
+ # To use XiaoMa agents in Trae:
47
+ # 1. Type @agent-name (e.g., "@dev", "@pm", "@architect")
48
+ # 2. Trae will adopt that agent's persona
49
+ roo:
50
+ name: Roo Code
51
+ format: custom-modes
52
+ file: .roomodes
53
+ instructions: |
54
+ # To use XiaoMa agents in Roo Code:
55
+ # 1. Open the mode selector (usually in the status bar)
56
+ # 2. Select any xiaoma-{agent} mode (e.g., "xiaoma-dev", "xiaoma-pm")
57
+ # 3. The AI will adopt that agent's full personality and capabilities
58
+ cline:
59
+ name: Cline
60
+ rule-dir: .clinerules/
61
+ format: multi-file
62
+ command-suffix: .md
63
+ instructions: |
64
+ # To use XiaoMa agents in Cline:
65
+ # 1. Open the Cline chat panel in VS Code
66
+ # 2. Type @agent-name (e.g., "@dev", "@pm", "@architect")
67
+ # 3. The agent will adopt that persona for the conversation
68
+ # 4. Rules are stored in .clinerules/ directory in your project
69
+ gemini:
70
+ name: Gemini CLI
71
+ rule-dir: .gemini/xiaoma-method/
72
+ format: single-file
73
+ command-suffix: .md
74
+ instructions: |
75
+ # To use XiaoMa agents with the Gemini CLI:
76
+ # 1. The installer creates a .gemini/xiaoma-method/ directory in your project.
77
+ # 2. It concatenates all agent files into a single GEMINI.md file.
78
+ # 3. Simply mention the agent in your prompt (e.g., "As *dev, ...").
79
+ # 4. The Gemini CLI will automatically have the context for that agent.
80
+ github-copilot:
81
+ name: Github Copilot
82
+ rule-dir: .github/chatmodes/
83
+ format: multi-file
84
+ command-suffix: .md
85
+ instructions: |
86
+ # To use XiaoMa agents with Github Copilot:
87
+ # 1. The installer creates a .github/chatmodes/ directory in your project
88
+ # 2. Open the Chat view (`⌃⌘I` on Mac, `Ctrl+Alt+I` on Windows/Linux) and select **Agent** from the chat mode selector.
89
+ # 3. The agent will adopt that persona for the conversation
90
+ # 4. Requires VS Code 1.101+ with `chat.agent.enabled: true` in settings
91
+ # 5. Agent files are stored in .github/chatmodes/
92
+ # 6. Use `*help` to see available commands and agents
93
+ kilo:
94
+ name: Kilo Code
95
+ format: custom-modes
96
+ file: .kilocodemodes
97
+ instructions: |
98
+ # To use XIAOMA agents in Kilo Code:
99
+ # 1. Open the mode selector in VSCode
100
+ # 2. Select a xiaoma-{agent} mode (e.g. "xiaoma-dev")
101
+ # 3. The AI adopts that agent's persona and capabilities
102
+
103
+ qwen-code:
104
+ name: Qwen Code
105
+ rule-dir: .qwen/xiaoma-method/
106
+ format: single-file
107
+ command-suffix: .md
108
+ instructions: |
109
+ # To use XiaoMa agents with Qwen Code:
110
+ # 1. The installer creates a .qwen/xiaoma-method/ directory in your project.
111
+ # 2. It concatenates all agent files into a single QWEN.md file.
112
+ # 3. Simply mention the agent in your prompt (e.g., "As *dev, ...").
113
+ # 4. The Qwen Code CLI will automatically have the context for that agent.