@zeyue0329/xiaoma-cli 1.0.37 → 1.0.39
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.
- package/.idea/workspace.xml +27 -26
- package/JAVA-BACKEND-COMMANDS-REFERENCE.md +62 -52
- package/JAVA-BACKEND-ITERATION-GUIDE.md +125 -18
- package/README.md +1 -1
- package/common/utils/bmad-doc-template.md +5 -5
- package/dist/agents/analyst.txt +35 -5
- package/dist/agents/architect.txt +217 -31
- package/dist/agents/automation-orchestrator.txt +4 -4
- package/dist/agents/dev.txt +3 -3
- package/dist/agents/full-requirement-orchestrator.txt +11 -11
- package/dist/agents/qa.txt +102 -102
- package/dist/agents/sm.txt +6 -6
- package/dist/agents/ux-expert.txt +6 -1
- package/dist/agents/workflow-executor.txt +879 -0
- package/dist/agents/xiaoma-master.txt +258 -37
- package/dist/teams/team-all.txt +1223 -445
- package/dist/teams/team-fullstack-with-database.txt +384 -446
- package/dist/teams/team-fullstack.txt +258 -37
- package/dist/teams/team-ide-minimal.txt +111 -111
- package/dist/teams/team-no-ui.txt +252 -36
- package/docs/architecture-sharding-modification.md +623 -0
- package/docs/automated-requirements-analysis-outputs.md +896 -0
- package/package.json +1 -1
- package/tools/builders/web-builder.js +292 -142
- package/tools/bump-all-versions.js +50 -32
- package/tools/cli.js +52 -47
- package/tools/flattener/aggregate.js +30 -12
- package/tools/flattener/binary.js +46 -43
- package/tools/flattener/discovery.js +23 -15
- package/tools/flattener/files.js +6 -6
- package/tools/flattener/ignoreRules.js +122 -121
- package/tools/flattener/main.js +249 -144
- package/tools/flattener/projectRoot.js +74 -69
- package/tools/flattener/prompts.js +12 -10
- package/tools/flattener/stats.helpers.js +90 -61
- package/tools/flattener/stats.js +1 -1
- package/tools/flattener/test-matrix.js +225 -170
- package/tools/flattener/xml.js +31 -23
- package/tools/installer/bin/xiaoma.js +199 -153
- package/tools/installer/lib/config-loader.js +76 -47
- package/tools/installer/lib/file-manager.js +101 -44
- package/tools/installer/lib/ide-base-setup.js +49 -39
- package/tools/installer/lib/ide-setup.js +694 -380
- package/tools/installer/lib/installer.js +802 -469
- package/tools/installer/lib/memory-profiler.js +22 -12
- package/tools/installer/lib/module-manager.js +16 -14
- package/tools/installer/lib/resource-locator.js +61 -35
- package/tools/lib/dependency-resolver.js +34 -23
- package/tools/lib/yaml-utils.js +7 -2
- package/tools/preview-release-notes.js +33 -25
- package/tools/shared/bannerArt.js +3 -3
- package/tools/sync-installer-version.js +16 -7
- package/tools/upgraders/v3-to-v4-upgrader.js +244 -163
- package/tools/version-bump.js +24 -18
- package/tools/xiaoma-npx-wrapper.js +15 -10
- package/tools/yaml-format.js +60 -36
- package/xiaoma-core/agent-teams/team-fullstack-with-database.yaml +0 -1
- package/xiaoma-core/agents/automated-fix-validator.yaml +2 -1
- package/xiaoma-core/agents/automated-quality-validator.yaml +10 -5
- package/xiaoma-core/agents/automation-orchestrator.md +4 -4
- package/xiaoma-core/agents/dev.md +4 -4
- package/xiaoma-core/agents/enhanced-workflow-orchestrator.yaml +2 -1
- package/xiaoma-core/agents/full-requirement-orchestrator.md +11 -11
- package/xiaoma-core/agents/global-requirements-auditor.yaml +11 -3
- package/xiaoma-core/agents/intelligent-template-adapter.yaml +19 -5
- package/xiaoma-core/agents/master-execution-engine.yaml +19 -5
- package/xiaoma-core/agents/workflow-executor.md +8 -4
- package/xiaoma-core/agents/xiaoma-master.md +1 -1
- package/xiaoma-core/data/test-levels-framework.md +12 -12
- package/xiaoma-core/tasks/analyze-existing-database.md +1 -1
- package/xiaoma-core/tasks/apply-qa-fixes.md +3 -3
- package/xiaoma-core/tasks/batch-story-generation.md +22 -22
- package/xiaoma-core/tasks/create-enhanced-story-with-database.md +6 -6
- package/xiaoma-core/tasks/nfr-assess.md +6 -6
- package/xiaoma-core/tasks/project-integration-testing.md +42 -42
- package/xiaoma-core/tasks/qa-gate.md +23 -23
- package/xiaoma-core/tasks/review-story.md +18 -18
- package/xiaoma-core/tasks/risk-profile.md +25 -25
- package/xiaoma-core/tasks/serial-development-orchestration.md +51 -51
- package/xiaoma-core/tasks/test-design.md +9 -9
- package/xiaoma-core/tasks/trace-requirements.md +21 -21
- package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +35 -5
- package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +77 -11
- package/xiaoma-core/templates/front-end-spec-tmpl.yaml +6 -1
- package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +140 -20
- package/xiaoma-core/templates/global-qa-monitoring-tmpl.yaml +2 -1
- package/xiaoma-core/templates/requirements-coverage-audit.yaml +2 -1
- package/xiaoma-core/workflows/automated-requirements-analysis.yaml +283 -6
- package/dist/agents/database-architect.txt +0 -322
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Reduces duplication and provides shared methods
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
const path = require(
|
|
7
|
-
const fs = require(
|
|
8
|
-
const yaml = require(
|
|
9
|
-
const chalk = require(
|
|
10
|
-
const fileManager = require(
|
|
11
|
-
const resourceLocator = require(
|
|
12
|
-
const { extractYamlFromAgent } = require(
|
|
6
|
+
const path = require("node:path");
|
|
7
|
+
const fs = require("fs-extra");
|
|
8
|
+
const yaml = require("js-yaml");
|
|
9
|
+
const chalk = require("chalk").default || require("chalk");
|
|
10
|
+
const fileManager = require("./file-manager");
|
|
11
|
+
const resourceLocator = require("./resource-locator");
|
|
12
|
+
const { extractYamlFromAgent } = require("../../lib/yaml-utils");
|
|
13
13
|
|
|
14
14
|
class BaseIdeSetup {
|
|
15
15
|
constructor() {
|
|
@@ -50,14 +50,16 @@ class BaseIdeSetup {
|
|
|
50
50
|
async getCoreAgentIds(installDir) {
|
|
51
51
|
const coreAgents = [];
|
|
52
52
|
const corePaths = [
|
|
53
|
-
path.join(installDir,
|
|
54
|
-
path.join(installDir,
|
|
53
|
+
path.join(installDir, ".xiaoma-core", "agents"),
|
|
54
|
+
path.join(installDir, "xiaoma-core", "agents"),
|
|
55
55
|
];
|
|
56
56
|
|
|
57
57
|
for (const agentsDir of corePaths) {
|
|
58
58
|
if (await fileManager.pathExists(agentsDir)) {
|
|
59
|
-
const files = await resourceLocator.findFiles(
|
|
60
|
-
|
|
59
|
+
const files = await resourceLocator.findFiles("*.md", {
|
|
60
|
+
cwd: agentsDir,
|
|
61
|
+
});
|
|
62
|
+
coreAgents.push(...files.map((file) => path.basename(file, ".md")));
|
|
61
63
|
break; // Use first found
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -80,9 +82,9 @@ class BaseIdeSetup {
|
|
|
80
82
|
if (!agentPath) {
|
|
81
83
|
// Check installation-specific paths
|
|
82
84
|
const possiblePaths = [
|
|
83
|
-
path.join(installDir,
|
|
84
|
-
path.join(installDir,
|
|
85
|
-
path.join(installDir,
|
|
85
|
+
path.join(installDir, ".xiaoma-core", "agents", `${agentId}.md`),
|
|
86
|
+
path.join(installDir, "xiaoma-core", "agents", `${agentId}.md`),
|
|
87
|
+
path.join(installDir, "common", "agents", `${agentId}.md`),
|
|
86
88
|
];
|
|
87
89
|
|
|
88
90
|
for (const testPath of possiblePaths) {
|
|
@@ -131,10 +133,12 @@ class BaseIdeSetup {
|
|
|
131
133
|
const expansionPacks = [];
|
|
132
134
|
|
|
133
135
|
// Check for dot-prefixed expansion packs
|
|
134
|
-
const dotExpansions = await resourceLocator.findFiles(
|
|
136
|
+
const dotExpansions = await resourceLocator.findFiles(".bmad-*", {
|
|
137
|
+
cwd: installDir,
|
|
138
|
+
});
|
|
135
139
|
|
|
136
140
|
for (const dotExpansion of dotExpansions) {
|
|
137
|
-
if (dotExpansion !==
|
|
141
|
+
if (dotExpansion !== ".xiaoma-core") {
|
|
138
142
|
const packPath = path.join(installDir, dotExpansion);
|
|
139
143
|
const packName = dotExpansion.slice(1); // remove the dot
|
|
140
144
|
expansionPacks.push({
|
|
@@ -145,11 +149,13 @@ class BaseIdeSetup {
|
|
|
145
149
|
}
|
|
146
150
|
|
|
147
151
|
// Check other dot folders that have config.yaml
|
|
148
|
-
const allDotFolders = await resourceLocator.findFiles(
|
|
152
|
+
const allDotFolders = await resourceLocator.findFiles(".*", {
|
|
153
|
+
cwd: installDir,
|
|
154
|
+
});
|
|
149
155
|
for (const folder of allDotFolders) {
|
|
150
|
-
if (!folder.startsWith(
|
|
156
|
+
if (!folder.startsWith(".bmad-") && folder !== ".xiaoma-core") {
|
|
151
157
|
const packPath = path.join(installDir, folder);
|
|
152
|
-
const configPath = path.join(packPath,
|
|
158
|
+
const configPath = path.join(packPath, "config.yaml");
|
|
153
159
|
if (await fileManager.pathExists(configPath)) {
|
|
154
160
|
expansionPacks.push({
|
|
155
161
|
name: folder.slice(1), // remove the dot
|
|
@@ -167,46 +173,50 @@ class BaseIdeSetup {
|
|
|
167
173
|
* Get expansion pack agents
|
|
168
174
|
*/
|
|
169
175
|
async getExpansionPackAgents(packPath) {
|
|
170
|
-
const agentsDir = path.join(packPath,
|
|
176
|
+
const agentsDir = path.join(packPath, "agents");
|
|
171
177
|
if (!(await fileManager.pathExists(agentsDir))) {
|
|
172
178
|
return [];
|
|
173
179
|
}
|
|
174
180
|
|
|
175
|
-
const agentFiles = await resourceLocator.findFiles(
|
|
176
|
-
|
|
181
|
+
const agentFiles = await resourceLocator.findFiles("*.md", {
|
|
182
|
+
cwd: agentsDir,
|
|
183
|
+
});
|
|
184
|
+
return agentFiles.map((file) => path.basename(file, ".md"));
|
|
177
185
|
}
|
|
178
186
|
|
|
179
187
|
/**
|
|
180
188
|
* Create agent rule content (shared logic)
|
|
181
189
|
*/
|
|
182
|
-
async createAgentRuleContent(agentId, agentPath, installDir, format =
|
|
190
|
+
async createAgentRuleContent(agentId, agentPath, installDir, format = "mdc") {
|
|
183
191
|
const agentContent = await fileManager.readFile(agentPath);
|
|
184
192
|
const agentTitle = await this.getAgentTitle(agentId, installDir);
|
|
185
193
|
const yamlContent = extractYamlFromAgent(agentContent);
|
|
186
194
|
|
|
187
|
-
let content =
|
|
195
|
+
let content = "";
|
|
188
196
|
|
|
189
|
-
if (format ===
|
|
197
|
+
if (format === "mdc") {
|
|
190
198
|
// MDC format for Cursor
|
|
191
|
-
content =
|
|
192
|
-
content +=
|
|
193
|
-
content +=
|
|
194
|
-
content +=
|
|
195
|
-
content +=
|
|
199
|
+
content = "---\n";
|
|
200
|
+
content += "description: \n";
|
|
201
|
+
content += "globs: []\n";
|
|
202
|
+
content += "alwaysApply: false\n";
|
|
203
|
+
content += "---\n\n";
|
|
196
204
|
content += `# ${agentId.toUpperCase()} Agent Rule\n\n`;
|
|
197
205
|
content += `This rule is triggered when the user types \`@${agentId}\` and activates the ${agentTitle} agent persona.\n\n`;
|
|
198
|
-
content +=
|
|
206
|
+
content += "## Agent Activation\n\n";
|
|
199
207
|
content +=
|
|
200
|
-
|
|
201
|
-
content +=
|
|
202
|
-
content += yamlContent || agentContent.replace(/^#.*$/m,
|
|
203
|
-
content +=
|
|
204
|
-
content +=
|
|
205
|
-
const relativePath = path
|
|
208
|
+
"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";
|
|
209
|
+
content += "```yaml\n";
|
|
210
|
+
content += yamlContent || agentContent.replace(/^#.*$/m, "").trim();
|
|
211
|
+
content += "\n```\n\n";
|
|
212
|
+
content += "## File Reference\n\n";
|
|
213
|
+
const relativePath = path
|
|
214
|
+
.relative(installDir, agentPath)
|
|
215
|
+
.replaceAll("\\", "/");
|
|
206
216
|
content += `The complete agent definition is available in [${relativePath}](mdc:${relativePath}).\n\n`;
|
|
207
|
-
content +=
|
|
217
|
+
content += "## Usage\n\n";
|
|
208
218
|
content += `When the user types \`@${agentId}\`, activate this ${agentTitle} persona and follow all instructions defined in the YAML configuration above.\n`;
|
|
209
|
-
} else if (format ===
|
|
219
|
+
} else if (format === "claude") {
|
|
210
220
|
// Claude Code format
|
|
211
221
|
content = `# /${agentId} Command\n\n`;
|
|
212
222
|
content += `When this command is used, adopt the following agent persona:\n\n`;
|