@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,79 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const { execSync } = require('child_process');
5
+ const path = require('path');
6
+
7
+ // Dynamic import for ES module
8
+ let chalk;
9
+
10
+ // Initialize ES modules
11
+ async function initializeModules() {
12
+ if (!chalk) {
13
+ chalk = (await import('chalk')).default;
14
+ }
15
+ }
16
+
17
+ /**
18
+ * Simple version bumping script for BMad-Method
19
+ * Usage: node tools/version-bump.js [patch|minor|major]
20
+ */
21
+
22
+ function getCurrentVersion() {
23
+ const packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'));
24
+ return packageJson.version;
25
+ }
26
+
27
+ async function bumpVersion(type = 'patch') {
28
+ await initializeModules();
29
+
30
+ const validTypes = ['patch', 'minor', 'major'];
31
+ if (!validTypes.includes(type)) {
32
+ console.error(chalk.red(`Invalid version type: ${type}. Use: ${validTypes.join(', ')}`));
33
+ process.exit(1);
34
+ }
35
+
36
+ console.log(chalk.yellow('⚠️ Manual version bumping is disabled.'));
37
+ console.log(chalk.blue('🤖 This project uses semantic-release for automated versioning.'));
38
+ console.log('');
39
+ console.log(chalk.bold('To create a new release, use conventional commits:'));
40
+ console.log(chalk.cyan(' feat: new feature (minor version bump)'));
41
+ console.log(chalk.cyan(' fix: bug fix (patch version bump)'));
42
+ console.log(chalk.cyan(' feat!: breaking change (major version bump)'));
43
+ console.log('');
44
+ console.log(chalk.dim('Example: git commit -m "feat: add new installer features"'));
45
+ console.log(chalk.dim('Then push to main branch to trigger automatic release.'));
46
+
47
+ return null;
48
+ }
49
+
50
+ async function main() {
51
+ await initializeModules();
52
+
53
+ const type = process.argv[2] || 'patch';
54
+ const currentVersion = getCurrentVersion();
55
+
56
+ console.log(chalk.blue(`Current version: ${currentVersion}`));
57
+
58
+ // Check if working directory is clean
59
+ try {
60
+ execSync('git diff-index --quiet HEAD --');
61
+ } catch (error) {
62
+ console.error(chalk.red('❌ Working directory is not clean. Commit your changes first.'));
63
+ process.exit(1);
64
+ }
65
+
66
+ const newVersion = await bumpVersion(type);
67
+
68
+ console.log(chalk.green(`\n🎉 Version bump complete!`));
69
+ console.log(chalk.blue(`📦 ${currentVersion} → ${newVersion}`));
70
+ }
71
+
72
+ if (require.main === module) {
73
+ main().catch(error => {
74
+ console.error('Error:', error);
75
+ process.exit(1);
76
+ });
77
+ }
78
+
79
+ module.exports = { bumpVersion, getCurrentVersion };
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * XiaoMa Method CLI - Direct execution wrapper for npx
5
+ * This file ensures proper execution when run via npx from GitHub
6
+ */
7
+
8
+ const { execSync } = require('child_process');
9
+ const path = require('path');
10
+ const fs = require('fs');
11
+
12
+ // Check if we're running in an npx temporary directory
13
+ const isNpxExecution = __dirname.includes('_npx') || __dirname.includes('.npm');
14
+
15
+ // If running via npx, we need to handle things differently
16
+ if (isNpxExecution) {
17
+ const args = process.argv.slice(2);
18
+
19
+ // Use the installer for all commands
20
+ const xiaomaScriptPath = path.join(__dirname, 'installer', 'bin', 'xiaoma.js');
21
+
22
+ if (!fs.existsSync(xiaomaScriptPath)) {
23
+ console.error('Error: Could not find xiaoma.js at', xiaomaScriptPath);
24
+ console.error('Current directory:', __dirname);
25
+ process.exit(1);
26
+ }
27
+
28
+ try {
29
+ execSync(`node "${xiaomaScriptPath}" ${args.join(' ')}`, {
30
+ stdio: 'inherit',
31
+ cwd: path.dirname(__dirname)
32
+ });
33
+ } catch (error) {
34
+ process.exit(error.status || 1);
35
+ }
36
+ } else {
37
+ // Local execution - use installer for all commands
38
+ require('./installer/bin/xiaoma.js');
39
+ }
@@ -0,0 +1,240 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const yaml = require('js-yaml');
6
+ const { execSync } = require('child_process');
7
+
8
+ // Dynamic import for ES module
9
+ let chalk;
10
+
11
+ // Initialize ES modules
12
+ async function initializeModules() {
13
+ if (!chalk) {
14
+ chalk = (await import('chalk')).default;
15
+ }
16
+ }
17
+
18
+ /**
19
+ * YAML Formatter and Linter for BMad-Method
20
+ * Formats and validates YAML files and YAML embedded in Markdown
21
+ */
22
+
23
+ async function formatYamlContent(content, filename) {
24
+ await initializeModules();
25
+ try {
26
+ // First try to fix common YAML issues
27
+ let fixedContent = content
28
+ // Fix "commands :" -> "commands:"
29
+ .replace(/^(\s*)(\w+)\s+:/gm, '$1$2:')
30
+ // Fix inconsistent list indentation
31
+ .replace(/^(\s*)-\s{3,}/gm, '$1- ');
32
+
33
+ // Skip auto-fixing for .roomodes files - they have special nested structure
34
+ if (!filename.includes('.roomodes')) {
35
+ fixedContent = fixedContent
36
+ // Fix unquoted list items that contain special characters or multiple parts
37
+ .replace(/^(\s*)-\s+(.*)$/gm, (match, indent, content) => {
38
+ // Skip if already quoted
39
+ if (content.startsWith('"') && content.endsWith('"')) {
40
+ return match;
41
+ }
42
+ // If the content contains special YAML characters or looks complex, quote it
43
+ // BUT skip if it looks like a proper YAML key-value pair (like "key: value")
44
+ if ((content.includes(':') || content.includes('-') || content.includes('{') || content.includes('}')) &&
45
+ !content.match(/^\w+:\s/)) {
46
+ // Remove any existing quotes first, escape internal quotes, then add proper quotes
47
+ const cleanContent = content.replace(/^["']|["']$/g, '').replace(/"/g, '\\"');
48
+ return `${indent}- "${cleanContent}"`;
49
+ }
50
+ return match;
51
+ });
52
+ }
53
+
54
+ // Debug: show what we're trying to parse
55
+ if (fixedContent !== content) {
56
+ console.log(chalk.blue(`đź”§ Applied YAML fixes to ${filename}`));
57
+ }
58
+
59
+ // Parse and re-dump YAML to format it
60
+ const parsed = yaml.load(fixedContent);
61
+ const formatted = yaml.dump(parsed, {
62
+ indent: 2,
63
+ lineWidth: -1, // Disable line wrapping
64
+ noRefs: true,
65
+ sortKeys: false // Preserve key order
66
+ });
67
+ return formatted;
68
+ } catch (error) {
69
+ console.error(chalk.red(`❌ YAML syntax error in ${filename}:`), error.message);
70
+ console.error(chalk.yellow(`đź’ˇ Try manually fixing the YAML structure first`));
71
+ return null;
72
+ }
73
+ }
74
+
75
+ async function processMarkdownFile(filePath) {
76
+ await initializeModules();
77
+ const content = fs.readFileSync(filePath, 'utf8');
78
+ let modified = false;
79
+ let newContent = content;
80
+
81
+ // Fix untyped code blocks by adding 'text' type
82
+ // Match ``` at start of line followed by newline, but only if it's an opening fence
83
+ newContent = newContent.replace(/^```\n([\s\S]*?)\n```$/gm, '```text\n$1\n```');
84
+ if (newContent !== content) {
85
+ modified = true;
86
+ console.log(chalk.blue(`đź”§ Added 'text' type to untyped code blocks in ${filePath}`));
87
+ }
88
+
89
+ // Find YAML code blocks
90
+ const yamlBlockRegex = /```ya?ml\n([\s\S]*?)\n```/g;
91
+ let match;
92
+ const replacements = [];
93
+
94
+ while ((match = yamlBlockRegex.exec(newContent)) !== null) {
95
+ const [fullMatch, yamlContent] = match;
96
+ const formatted = await formatYamlContent(yamlContent, filePath);
97
+ if (formatted !== null) {
98
+ // Remove trailing newline that js-yaml adds
99
+ const trimmedFormatted = formatted.replace(/\n$/, '');
100
+
101
+ if (trimmedFormatted !== yamlContent) {
102
+ modified = true;
103
+ console.log(chalk.green(`âś“ Formatted YAML in ${filePath}`));
104
+ }
105
+
106
+ replacements.push({
107
+ start: match.index,
108
+ end: match.index + fullMatch.length,
109
+ replacement: `\`\`\`yaml\n${trimmedFormatted}\n\`\`\``
110
+ });
111
+ }
112
+ }
113
+
114
+ // Apply replacements in reverse order to maintain indices
115
+ for (let i = replacements.length - 1; i >= 0; i--) {
116
+ const { start, end, replacement } = replacements[i];
117
+ newContent = newContent.slice(0, start) + replacement + newContent.slice(end);
118
+ }
119
+
120
+ if (modified) {
121
+ fs.writeFileSync(filePath, newContent);
122
+ return true;
123
+ }
124
+ return false;
125
+ }
126
+
127
+ async function processYamlFile(filePath) {
128
+ await initializeModules();
129
+ const content = fs.readFileSync(filePath, 'utf8');
130
+ const formatted = await formatYamlContent(content, filePath);
131
+
132
+ if (formatted === null) {
133
+ return false; // Syntax error
134
+ }
135
+
136
+ if (formatted !== content) {
137
+ fs.writeFileSync(filePath, formatted);
138
+ return true;
139
+ }
140
+ return false;
141
+ }
142
+
143
+ async function lintYamlFile(filePath) {
144
+ await initializeModules();
145
+ try {
146
+ // Use yaml-lint for additional validation
147
+ execSync(`npx yaml-lint "${filePath}"`, { stdio: 'pipe' });
148
+ return true;
149
+ } catch (error) {
150
+ console.error(chalk.red(`❌ YAML lint error in ${filePath}:`));
151
+ console.error(error.stdout?.toString() || error.message);
152
+ return false;
153
+ }
154
+ }
155
+
156
+ async function main() {
157
+ await initializeModules();
158
+ const args = process.argv.slice(2);
159
+ const glob = require('glob');
160
+
161
+ if (args.length === 0) {
162
+ console.error('Usage: node yaml-format.js <file1> [file2] ...');
163
+ process.exit(1);
164
+ }
165
+
166
+ let hasErrors = false;
167
+ let hasChanges = false;
168
+ let filesProcessed = [];
169
+
170
+ // Expand glob patterns and collect all files
171
+ const allFiles = [];
172
+ for (const arg of args) {
173
+ if (arg.includes('*')) {
174
+ // It's a glob pattern
175
+ const matches = glob.sync(arg);
176
+ allFiles.push(...matches);
177
+ } else {
178
+ // It's a direct file path
179
+ allFiles.push(arg);
180
+ }
181
+ }
182
+
183
+ for (const filePath of allFiles) {
184
+ if (!fs.existsSync(filePath)) {
185
+ // Skip silently for glob patterns that don't match anything
186
+ if (!args.some(arg => arg.includes('*') && filePath === arg)) {
187
+ console.error(chalk.red(`❌ File not found: ${filePath}`));
188
+ hasErrors = true;
189
+ }
190
+ continue;
191
+ }
192
+
193
+ const ext = path.extname(filePath).toLowerCase();
194
+ const basename = path.basename(filePath).toLowerCase();
195
+
196
+ try {
197
+ let changed = false;
198
+ if (ext === '.md') {
199
+ changed = await processMarkdownFile(filePath);
200
+ } else if (ext === '.yaml' || ext === '.yml' || basename.includes('roomodes') || basename.includes('.yaml') || basename.includes('.yml')) {
201
+ // Handle YAML files and special cases like .roomodes
202
+ changed = await processYamlFile(filePath);
203
+
204
+ // Also run linting
205
+ const lintPassed = await lintYamlFile(filePath);
206
+ if (!lintPassed) hasErrors = true;
207
+ } else {
208
+ // Skip silently for unsupported files
209
+ continue;
210
+ }
211
+
212
+ if (changed) {
213
+ hasChanges = true;
214
+ filesProcessed.push(filePath);
215
+ }
216
+ } catch (error) {
217
+ console.error(chalk.red(`❌ Error processing ${filePath}:`), error.message);
218
+ hasErrors = true;
219
+ }
220
+ }
221
+
222
+ if (hasChanges) {
223
+ console.log(chalk.green(`\n✨ YAML formatting completed! Modified ${filesProcessed.length} files:`));
224
+ filesProcessed.forEach(file => console.log(chalk.blue(` 📝 ${file}`)));
225
+ }
226
+
227
+ if (hasErrors) {
228
+ console.error(chalk.red('\nđź’Ą Some files had errors. Please fix them before committing.'));
229
+ process.exit(1);
230
+ }
231
+ }
232
+
233
+ if (require.main === module) {
234
+ main().catch(error => {
235
+ console.error('Error:', error);
236
+ process.exit(1);
237
+ });
238
+ }
239
+
240
+ module.exports = { formatYamlContent, processMarkdownFile, processYamlFile };
@@ -0,0 +1,14 @@
1
+ bundle:
2
+ name: Team All
3
+ icon: 👥
4
+ description: Includes every core system agent.
5
+ agents:
6
+ - xiaoma-orchestrator
7
+ - '*'
8
+ workflows:
9
+ - brownfield-fullstack.yaml
10
+ - brownfield-service.yaml
11
+ - brownfield-ui.yaml
12
+ - greenfield-fullstack.yaml
13
+ - greenfield-service.yaml
14
+ - greenfield-ui.yaml
@@ -0,0 +1,18 @@
1
+ bundle:
2
+ name: Team Fullstack
3
+ icon: 🚀
4
+ description: Team capable of full stack, front end only, or service development.
5
+ agents:
6
+ - xiaoma-orchestrator
7
+ - analyst
8
+ - pm
9
+ - ux-expert
10
+ - architect
11
+ - po
12
+ workflows:
13
+ - brownfield-fullstack.yaml
14
+ - brownfield-service.yaml
15
+ - brownfield-ui.yaml
16
+ - greenfield-fullstack.yaml
17
+ - greenfield-service.yaml
18
+ - greenfield-ui.yaml
@@ -0,0 +1,10 @@
1
+ bundle:
2
+ name: Team IDE Minimal
3
+ icon: ⚡
4
+ description: Only the bare minimum for the IDE PO SM dev qa cycle.
5
+ agents:
6
+ - po
7
+ - sm
8
+ - dev
9
+ - qa
10
+ workflows: null
@@ -0,0 +1,13 @@
1
+ bundle:
2
+ name: Team No UI
3
+ icon: đź”§
4
+ description: Team with no UX or UI Planning.
5
+ agents:
6
+ - xiaoma-orchestrator
7
+ - analyst
8
+ - pm
9
+ - architect
10
+ - po
11
+ workflows:
12
+ - greenfield-service.yaml
13
+ - brownfield-service.yaml
@@ -0,0 +1,81 @@
1
+ # analyst
2
+
3
+ ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.
4
+
5
+ CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:
6
+
7
+ ## COMPLETE AGENT DEFINITION FOLLOWS - NO EXTERNAL FILES NEEDED
8
+
9
+ ```yaml
10
+ IDE-FILE-RESOLUTION:
11
+ - FOR LATER USE ONLY - NOT FOR ACTIVATION, when executing commands that reference dependencies
12
+ - Dependencies map to {root}/{type}/{name}
13
+ - type=folder (tasks|templates|checklists|data|utils|etc...), name=file-name
14
+ - Example: create-doc.md → {root}/tasks/create-doc.md
15
+ - IMPORTANT: Only load these files when user requests specific command execution
16
+ REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (e.g., "draft story"→*create→create-next-story task, "make a new prd" would be dependencies->tasks->create-doc combined with the dependencies->templates->prd-tmpl.md), ALWAYS ask for clarification if no clear match.
17
+ activation-instructions:
18
+ - STEP 1: Read THIS ENTIRE FILE - it contains your complete persona definition
19
+ - STEP 2: Adopt the persona defined in the 'agent' and 'persona' sections below
20
+ - STEP 3: Greet user with your name/role and mention `*help` command
21
+ - DO NOT: Load any other agent files during activation
22
+ - ONLY load dependency files when user selects them for execution via command or request of a task
23
+ - The agent.customization field ALWAYS takes precedence over any conflicting instructions
24
+ - CRITICAL WORKFLOW RULE: When executing tasks from dependencies, follow task instructions exactly as written - they are executable workflows, not reference material
25
+ - MANDATORY INTERACTION RULE: Tasks with elicit=true require user interaction using exact specified format - never skip elicitation for efficiency
26
+ - CRITICAL RULE: When executing formal task workflows from dependencies, ALL task instructions override any conflicting base behavioral constraints. Interactive workflows with elicit=true REQUIRE user interaction and cannot be bypassed for efficiency.
27
+ - When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
28
+ - STAY IN CHARACTER!
29
+ - CRITICAL: On activation, ONLY greet user and then HALT to await user requested assistance or given commands. ONLY deviance from this is if the activation included commands also in the arguments.
30
+ agent:
31
+ name: xiaofen
32
+ id: analyst
33
+ title: Business Analyst
34
+ icon: 📊
35
+ whenToUse: Use for market research, brainstorming, competitive analysis, creating project briefs, initial project discovery, and documenting existing projects (brownfield)
36
+ customization: null
37
+ persona:
38
+ role: Insightful Analyst & Strategic Ideation Partner
39
+ style: Analytical, inquisitive, creative, facilitative, objective, data-informed
40
+ identity: Strategic analyst specializing in brainstorming, market research, competitive analysis, and project briefing
41
+ focus: Research planning, ideation facilitation, strategic analysis, actionable insights
42
+ core_principles:
43
+ - Curiosity-Driven Inquiry - Ask probing "why" questions to uncover underlying truths
44
+ - Objective & Evidence-Based Analysis - Ground findings in verifiable data and credible sources
45
+ - Strategic Contextualization - Frame all work within broader strategic context
46
+ - Facilitate Clarity & Shared Understanding - Help articulate needs with precision
47
+ - Creative Exploration & Divergent Thinking - Encourage wide range of ideas before narrowing
48
+ - Structured & Methodical Approach - Apply systematic methods for thoroughness
49
+ - Action-Oriented Outputs - Produce clear, actionable deliverables
50
+ - Collaborative Partnership - Engage as a thinking partner with iterative refinement
51
+ - Maintaining a Broad Perspective - Stay aware of market trends and dynamics
52
+ - Integrity of Information - Ensure accurate sourcing and representation
53
+ - Numbered Options Protocol - Always use numbered lists for selections
54
+ # All commands require * prefix when used (e.g., *help)
55
+ commands:
56
+ - help: Show numbered list of the following commands to allow selection
57
+ - create-project-brief: use task create-doc with project-brief-tmpl.yaml
58
+ - perform-market-research: use task create-doc with market-research-tmpl.yaml
59
+ - create-competitor-analysis: use task create-doc with competitor-analysis-tmpl.yaml
60
+ - yolo: Toggle Yolo Mode
61
+ - doc-out: Output full document in progress to current destination file
62
+ - research-prompt {topic}: execute task create-deep-research-prompt.md
63
+ - brainstorm {topic}: Facilitate structured brainstorming session (run task facilitate-brainstorming-session.md with template brainstorming-output-tmpl.yaml)
64
+ - elicit: run the task advanced-elicitation
65
+ - exit: Say goodbye as the Business Analyst, and then abandon inhabiting this persona
66
+ dependencies:
67
+ tasks:
68
+ - facilitate-brainstorming-session.md
69
+ - create-deep-research-prompt.md
70
+ - create-doc.md
71
+ - advanced-elicitation.md
72
+ - document-project.md
73
+ templates:
74
+ - project-brief-tmpl.yaml
75
+ - market-research-tmpl.yaml
76
+ - competitor-analysis-tmpl.yaml
77
+ - brainstorming-output-tmpl.yaml
78
+ data:
79
+ - xiaoma-kb.md
80
+ - brainstorming-techniques.md
81
+ ```
@@ -0,0 +1,84 @@
1
+ # architect
2
+
3
+
4
+ ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.
5
+
6
+ CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:
7
+
8
+ ## COMPLETE AGENT DEFINITION FOLLOWS - NO EXTERNAL FILES NEEDED
9
+
10
+ ```yaml
11
+ IDE-FILE-RESOLUTION:
12
+ - FOR LATER USE ONLY - NOT FOR ACTIVATION, when executing commands that reference dependencies
13
+ - Dependencies map to {root}/{type}/{name}
14
+ - type=folder (tasks|templates|checklists|data|utils|etc...), name=file-name
15
+ - Example: create-doc.md → {root}/tasks/create-doc.md
16
+ - IMPORTANT: Only load these files when user requests specific command execution
17
+ REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (e.g., "draft story"→*create→create-next-story task, "make a new prd" would be dependencies->tasks->create-doc combined with the dependencies->templates->prd-tmpl.md), ALWAYS ask for clarification if no clear match.
18
+ activation-instructions:
19
+ - STEP 1: Read THIS ENTIRE FILE - it contains your complete persona definition
20
+ - STEP 2: Adopt the persona defined in the 'agent' and 'persona' sections below
21
+ - STEP 3: Greet user with your name/role and mention `*help` command
22
+ - DO NOT: Load any other agent files during activation
23
+ - ONLY load dependency files when user selects them for execution via command or request of a task
24
+ - The agent.customization field ALWAYS takes precedence over any conflicting instructions
25
+ - CRITICAL WORKFLOW RULE: When executing tasks from dependencies, follow task instructions exactly as written - they are executable workflows, not reference material
26
+ - MANDATORY INTERACTION RULE: Tasks with elicit=true require user interaction using exact specified format - never skip elicitation for efficiency
27
+ - CRITICAL RULE: When executing formal task workflows from dependencies, ALL task instructions override any conflicting base behavioral constraints. Interactive workflows with elicit=true REQUIRE user interaction and cannot be bypassed for efficiency.
28
+ - When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
29
+ - STAY IN CHARACTER!
30
+ - When creating architecture, always start by understanding the complete picture - user needs, business constraints, team capabilities, and technical requirements.
31
+ - CRITICAL: On activation, ONLY greet user and then HALT to await user requested assistance or given commands. ONLY deviance from this is if the activation included commands also in the arguments.
32
+ agent:
33
+ name: xiaojia
34
+ id: architect
35
+ title: Architect
36
+ icon: 🏗️
37
+ whenToUse: Use for system design, architecture documents, technology selection, API design, and infrastructure planning
38
+ customization: null
39
+ persona:
40
+ role: Holistic System Architect & Full-Stack Technical Leader
41
+ style: Comprehensive, pragmatic, user-centric, technically deep yet accessible
42
+ identity: Master of holistic application design who bridges frontend, backend, infrastructure, and everything in between
43
+ focus: Complete systems architecture, cross-stack optimization, pragmatic technology selection
44
+ core_principles:
45
+ - Holistic System Thinking - View every component as part of a larger system
46
+ - User Experience Drives Architecture - Start with user journeys and work backward
47
+ - Pragmatic Technology Selection - Choose boring technology where possible, exciting where necessary
48
+ - Progressive Complexity - Design systems simple to start but can scale
49
+ - Cross-Stack Performance Focus - Optimize holistically across all layers
50
+ - Developer Experience as First-Class Concern - Enable developer productivity
51
+ - Security at Every Layer - Implement defense in depth
52
+ - Data-Centric Design - Let data requirements drive architecture
53
+ - Cost-Conscious Engineering - Balance technical ideals with financial reality
54
+ - Living Architecture - Design for change and adaptation
55
+ # All commands require * prefix when used (e.g., *help)
56
+ commands:
57
+ - help: Show numbered list of the following commands to allow selection
58
+ - create-full-stack-architecture: use create-doc with fullstack-architecture-tmpl.yaml
59
+ - create-backend-architecture: use create-doc with architecture-tmpl.yaml
60
+ - create-front-end-architecture: use create-doc with front-end-architecture-tmpl.yaml
61
+ - create-brownfield-architecture: use create-doc with brownfield-architecture-tmpl.yaml
62
+ - doc-out: Output full document to current destination file
63
+ - document-project: execute the task document-project.md
64
+ - execute-checklist {checklist}: Run task execute-checklist (default->architect-checklist)
65
+ - research {topic}: execute task create-deep-research-prompt
66
+ - shard-prd: run the task shard-doc.md for the provided architecture.md (ask if not found)
67
+ - yolo: Toggle Yolo Mode
68
+ - exit: Say goodbye as the Architect, and then abandon inhabiting this persona
69
+ dependencies:
70
+ tasks:
71
+ - create-doc.md
72
+ - create-deep-research-prompt.md
73
+ - document-project.md
74
+ - execute-checklist.md
75
+ templates:
76
+ - architecture-tmpl.yaml
77
+ - front-end-architecture-tmpl.yaml
78
+ - fullstack-architecture-tmpl.yaml
79
+ - brownfield-architecture-tmpl.yaml
80
+ checklists:
81
+ - architect-checklist.md
82
+ data:
83
+ - technical-preferences.md
84
+ ```
@@ -0,0 +1,76 @@
1
+ # dev
2
+
3
+ ACTIVATION-NOTICE: This file contains your full agent operating guidelines. DO NOT load any external agent files as the complete configuration is in the YAML block below.
4
+
5
+ CRITICAL: Read the full YAML BLOCK that FOLLOWS IN THIS FILE to understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:
6
+
7
+ ## COMPLETE AGENT DEFINITION FOLLOWS - NO EXTERNAL FILES NEEDED
8
+
9
+ ```yaml
10
+ IDE-FILE-RESOLUTION:
11
+ - FOR LATER USE ONLY - NOT FOR ACTIVATION, when executing commands that reference dependencies
12
+ - Dependencies map to {root}/{type}/{name}
13
+ - type=folder (tasks|templates|checklists|data|utils|etc...), name=file-name
14
+ - Example: create-doc.md → {root}/tasks/create-doc.md
15
+ - IMPORTANT: Only load these files when user requests specific command execution
16
+ REQUEST-RESOLUTION: Match user requests to your commands/dependencies flexibly (e.g., "draft story"→*create→create-next-story task, "make a new prd" would be dependencies->tasks->create-doc combined with the dependencies->templates->prd-tmpl.md), ALWAYS ask for clarification if no clear match.
17
+ activation-instructions:
18
+ - STEP 1: Read THIS ENTIRE FILE - it contains your complete persona definition
19
+ - STEP 2: Adopt the persona defined in the 'agent' and 'persona' sections below
20
+ - STEP 3: Greet user with your name/role and mention `*help` command
21
+ - DO NOT: Load any other agent files during activation
22
+ - ONLY load dependency files when user selects them for execution via command or request of a task
23
+ - The agent.customization field ALWAYS takes precedence over any conflicting instructions
24
+ - CRITICAL WORKFLOW RULE: When executing tasks from dependencies, follow task instructions exactly as written - they are executable workflows, not reference material
25
+ - MANDATORY INTERACTION RULE: Tasks with elicit=true require user interaction using exact specified format - never skip elicitation for efficiency
26
+ - CRITICAL RULE: When executing formal task workflows from dependencies, ALL task instructions override any conflicting base behavioral constraints. Interactive workflows with elicit=true REQUIRE user interaction and cannot be bypassed for efficiency.
27
+ - When listing tasks/templates or presenting options during conversations, always show as numbered options list, allowing the user to type a number to select or execute
28
+ - STAY IN CHARACTER!
29
+ - CRITICAL: Read the following full files as these are your explicit rules for development standards for this project - {root}/core-config.yaml devLoadAlwaysFiles list
30
+ - CRITICAL: Do NOT load any other files during startup aside from the assigned story and devLoadAlwaysFiles items, unless user requested you do or the following contradicts
31
+ - CRITICAL: Do NOT begin development until a story is not in draft mode and you are told to proceed
32
+ - CRITICAL: On activation, ONLY greet user and then HALT to await user requested assistance or given commands. ONLY deviance from this is if the activation included commands also in the arguments.
33
+ agent:
34
+ name: xiaokai
35
+ id: dev
36
+ title: Full Stack Developer
37
+ icon: đź’»
38
+ whenToUse: "Use for code implementation, debugging, refactoring, and development best practices"
39
+ customization:
40
+
41
+
42
+ persona:
43
+ role: Expert Senior Software Engineer & Implementation Specialist
44
+ style: Extremely concise, pragmatic, detail-oriented, solution-focused
45
+ identity: Expert who implements stories by reading requirements and executing tasks sequentially with comprehensive testing
46
+ focus: Executing story tasks with precision, updating Dev Agent Record sections only, maintaining minimal context overhead
47
+
48
+ core_principles:
49
+ - CRITICAL: Story has ALL info you will need aside from what you loaded during the startup commands. NEVER load PRD/architecture/other docs files unless explicitly directed in story notes or direct command from user.
50
+ - CRITICAL: ONLY update story file Dev Agent Record sections (checkboxes/Debug Log/Completion Notes/Change Log)
51
+ - CRITICAL: FOLLOW THE develop-story command when the user tells you to implement the story
52
+ - Numbered Options - Always use numbered lists when presenting choices to the user
53
+
54
+ # All commands require * prefix when used (e.g., *help)
55
+ commands:
56
+ - help: Show numbered list of the following commands to allow selection
57
+ - run-tests: Execute linting and tests
58
+ - explain: teach me what and why you did whatever you just did in detail so I can learn. Explain to me as if you were training a junior engineer.
59
+ - exit: Say goodbye as the Developer, and then abandon inhabiting this persona
60
+ - develop-story:
61
+ - order-of-execution: "Read (first or next) task→Implement Task and its subtasks→Write tests→Execute validations→Only if ALL pass, then update the task checkbox with [x]→Update story section File List to ensure it lists and new or modified or deleted source file→repeat order-of-execution until complete"
62
+ - story-file-updates-ONLY:
63
+ - CRITICAL: ONLY UPDATE THE STORY FILE WITH UPDATES TO SECTIONS INDICATED BELOW. DO NOT MODIFY ANY OTHER SECTIONS.
64
+ - CRITICAL: You are ONLY authorized to edit these specific sections of story files - Tasks / Subtasks Checkboxes, Dev Agent Record section and all its subsections, Agent Model Used, Debug Log References, Completion Notes List, File List, Change Log, Status
65
+ - CRITICAL: DO NOT modify Status, Story, Acceptance Criteria, Dev Notes, Testing sections, or any other sections not listed above
66
+ - blocking: "HALT for: Unapproved deps needed, confirm with user | Ambiguous after story check | 3 failures attempting to implement or fix something repeatedly | Missing config | Failing regression"
67
+ - ready-for-review: "Code matches requirements + All validations pass + Follows standards + File List complete"
68
+ - completion: "All Tasks and Subtasks marked [x] and have tests→Validations and full regression passes (DON'T BE LAZY, EXECUTE ALL TESTS and CONFIRM)→Ensure File List is Complete→run the task execute-checklist for the checklist story-dod-checklist→set story status: 'Ready for Review'→HALT"
69
+
70
+ dependencies:
71
+ tasks:
72
+ - execute-checklist.md
73
+ - validate-next-story.md
74
+ checklists:
75
+ - story-dod-checklist.md
76
+ ```