@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.
Files changed (89) hide show
  1. package/.idea/workspace.xml +27 -26
  2. package/JAVA-BACKEND-COMMANDS-REFERENCE.md +62 -52
  3. package/JAVA-BACKEND-ITERATION-GUIDE.md +125 -18
  4. package/README.md +1 -1
  5. package/common/utils/bmad-doc-template.md +5 -5
  6. package/dist/agents/analyst.txt +35 -5
  7. package/dist/agents/architect.txt +217 -31
  8. package/dist/agents/automation-orchestrator.txt +4 -4
  9. package/dist/agents/dev.txt +3 -3
  10. package/dist/agents/full-requirement-orchestrator.txt +11 -11
  11. package/dist/agents/qa.txt +102 -102
  12. package/dist/agents/sm.txt +6 -6
  13. package/dist/agents/ux-expert.txt +6 -1
  14. package/dist/agents/workflow-executor.txt +879 -0
  15. package/dist/agents/xiaoma-master.txt +258 -37
  16. package/dist/teams/team-all.txt +1223 -445
  17. package/dist/teams/team-fullstack-with-database.txt +384 -446
  18. package/dist/teams/team-fullstack.txt +258 -37
  19. package/dist/teams/team-ide-minimal.txt +111 -111
  20. package/dist/teams/team-no-ui.txt +252 -36
  21. package/docs/architecture-sharding-modification.md +623 -0
  22. package/docs/automated-requirements-analysis-outputs.md +896 -0
  23. package/package.json +1 -1
  24. package/tools/builders/web-builder.js +292 -142
  25. package/tools/bump-all-versions.js +50 -32
  26. package/tools/cli.js +52 -47
  27. package/tools/flattener/aggregate.js +30 -12
  28. package/tools/flattener/binary.js +46 -43
  29. package/tools/flattener/discovery.js +23 -15
  30. package/tools/flattener/files.js +6 -6
  31. package/tools/flattener/ignoreRules.js +122 -121
  32. package/tools/flattener/main.js +249 -144
  33. package/tools/flattener/projectRoot.js +74 -69
  34. package/tools/flattener/prompts.js +12 -10
  35. package/tools/flattener/stats.helpers.js +90 -61
  36. package/tools/flattener/stats.js +1 -1
  37. package/tools/flattener/test-matrix.js +225 -170
  38. package/tools/flattener/xml.js +31 -23
  39. package/tools/installer/bin/xiaoma.js +199 -153
  40. package/tools/installer/lib/config-loader.js +76 -47
  41. package/tools/installer/lib/file-manager.js +101 -44
  42. package/tools/installer/lib/ide-base-setup.js +49 -39
  43. package/tools/installer/lib/ide-setup.js +694 -380
  44. package/tools/installer/lib/installer.js +802 -469
  45. package/tools/installer/lib/memory-profiler.js +22 -12
  46. package/tools/installer/lib/module-manager.js +16 -14
  47. package/tools/installer/lib/resource-locator.js +61 -35
  48. package/tools/lib/dependency-resolver.js +34 -23
  49. package/tools/lib/yaml-utils.js +7 -2
  50. package/tools/preview-release-notes.js +33 -25
  51. package/tools/shared/bannerArt.js +3 -3
  52. package/tools/sync-installer-version.js +16 -7
  53. package/tools/upgraders/v3-to-v4-upgrader.js +244 -163
  54. package/tools/version-bump.js +24 -18
  55. package/tools/xiaoma-npx-wrapper.js +15 -10
  56. package/tools/yaml-format.js +60 -36
  57. package/xiaoma-core/agent-teams/team-fullstack-with-database.yaml +0 -1
  58. package/xiaoma-core/agents/automated-fix-validator.yaml +2 -1
  59. package/xiaoma-core/agents/automated-quality-validator.yaml +10 -5
  60. package/xiaoma-core/agents/automation-orchestrator.md +4 -4
  61. package/xiaoma-core/agents/dev.md +4 -4
  62. package/xiaoma-core/agents/enhanced-workflow-orchestrator.yaml +2 -1
  63. package/xiaoma-core/agents/full-requirement-orchestrator.md +11 -11
  64. package/xiaoma-core/agents/global-requirements-auditor.yaml +11 -3
  65. package/xiaoma-core/agents/intelligent-template-adapter.yaml +19 -5
  66. package/xiaoma-core/agents/master-execution-engine.yaml +19 -5
  67. package/xiaoma-core/agents/workflow-executor.md +8 -4
  68. package/xiaoma-core/agents/xiaoma-master.md +1 -1
  69. package/xiaoma-core/data/test-levels-framework.md +12 -12
  70. package/xiaoma-core/tasks/analyze-existing-database.md +1 -1
  71. package/xiaoma-core/tasks/apply-qa-fixes.md +3 -3
  72. package/xiaoma-core/tasks/batch-story-generation.md +22 -22
  73. package/xiaoma-core/tasks/create-enhanced-story-with-database.md +6 -6
  74. package/xiaoma-core/tasks/nfr-assess.md +6 -6
  75. package/xiaoma-core/tasks/project-integration-testing.md +42 -42
  76. package/xiaoma-core/tasks/qa-gate.md +23 -23
  77. package/xiaoma-core/tasks/review-story.md +18 -18
  78. package/xiaoma-core/tasks/risk-profile.md +25 -25
  79. package/xiaoma-core/tasks/serial-development-orchestration.md +51 -51
  80. package/xiaoma-core/tasks/test-design.md +9 -9
  81. package/xiaoma-core/tasks/trace-requirements.md +21 -21
  82. package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +35 -5
  83. package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +77 -11
  84. package/xiaoma-core/templates/front-end-spec-tmpl.yaml +6 -1
  85. package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +140 -20
  86. package/xiaoma-core/templates/global-qa-monitoring-tmpl.yaml +2 -1
  87. package/xiaoma-core/templates/requirements-coverage-audit.yaml +2 -1
  88. package/xiaoma-core/workflows/automated-requirements-analysis.yaml +283 -6
  89. package/dist/agents/database-architect.txt +0 -322
@@ -1,44 +1,49 @@
1
- const fs = require('fs-extra');
1
+ const fs = require("fs-extra");
2
2
 
3
3
  function escapeXml(string_) {
4
- if (typeof string_ !== 'string') {
4
+ if (typeof string_ !== "string") {
5
5
  return String(string_);
6
6
  }
7
- return string_.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll("'", '&apos;');
7
+ return string_
8
+ .replaceAll("&", "&amp;")
9
+ .replaceAll("<", "&lt;")
10
+ .replaceAll("'", "&apos;");
8
11
  }
9
12
 
10
13
  function indentFileContent(content) {
11
- if (typeof content !== 'string') {
14
+ if (typeof content !== "string") {
12
15
  return String(content);
13
16
  }
14
- return content.split('\n').map((line) => ` ${line}`);
17
+ return content.split("\n").map((line) => ` ${line}`);
15
18
  }
16
19
 
17
20
  function generateXMLOutput(aggregatedContent, outputPath) {
18
21
  const { textFiles } = aggregatedContent;
19
- const writeStream = fs.createWriteStream(outputPath, { encoding: 'utf8' });
22
+ const writeStream = fs.createWriteStream(outputPath, { encoding: "utf8" });
20
23
 
21
24
  return new Promise((resolve, reject) => {
22
- writeStream.on('error', reject);
23
- writeStream.on('finish', resolve);
25
+ writeStream.on("error", reject);
26
+ writeStream.on("finish", resolve);
24
27
 
25
28
  writeStream.write('<?xml version="1.0" encoding="UTF-8"?>\n');
26
- writeStream.write('<files>\n');
29
+ writeStream.write("<files>\n");
27
30
 
28
31
  // Sort files by path for deterministic order
29
- const filesSorted = [...textFiles].sort((a, b) => a.path.localeCompare(b.path));
32
+ const filesSorted = [...textFiles].sort((a, b) =>
33
+ a.path.localeCompare(b.path),
34
+ );
30
35
  let index = 0;
31
36
 
32
37
  const writeNext = () => {
33
38
  if (index >= filesSorted.length) {
34
- writeStream.write('</files>\n');
39
+ writeStream.write("</files>\n");
35
40
  writeStream.end();
36
41
  return;
37
42
  }
38
43
 
39
44
  const file = filesSorted[index++];
40
45
  const p = escapeXml(file.path);
41
- const content = typeof file.content === 'string' ? file.content : '';
46
+ const content = typeof file.content === "string" ? file.content : "";
42
47
 
43
48
  if (content.length === 0) {
44
49
  writeStream.write(`\t<file path='${p}'/>\n`);
@@ -46,34 +51,37 @@ function generateXMLOutput(aggregatedContent, outputPath) {
46
51
  return;
47
52
  }
48
53
 
49
- const needsCdata = content.includes('<') || content.includes('&') || content.includes(']]>');
54
+ const needsCdata =
55
+ content.includes("<") ||
56
+ content.includes("&") ||
57
+ content.includes("]]>");
50
58
  if (needsCdata) {
51
59
  // Open tag and CDATA on their own line with tab indent; content lines indented with two tabs
52
60
  writeStream.write(`\t<file path='${p}'><![CDATA[\n`);
53
61
  // Safely split any occurrences of "]]>" inside content, trim trailing newlines, indent each line with two tabs
54
- const safe = content.replaceAll(']]>', ']]]]><![CDATA[>');
55
- const trimmed = safe.replace(/[\r\n]+$/, '');
62
+ const safe = content.replaceAll("]]>", "]]]]><![CDATA[>");
63
+ const trimmed = safe.replace(/[\r\n]+$/, "");
56
64
  const indented =
57
65
  trimmed.length > 0
58
66
  ? trimmed
59
- .split('\n')
67
+ .split("\n")
60
68
  .map((line) => `\t\t${line}`)
61
- .join('\n')
62
- : '';
69
+ .join("\n")
70
+ : "";
63
71
  writeStream.write(indented);
64
72
  // Close CDATA and attach closing tag directly after the last content line
65
- writeStream.write(']]></file>\n');
73
+ writeStream.write("]]></file>\n");
66
74
  } else {
67
75
  // Write opening tag then newline; indent content with two tabs; attach closing tag directly after last content char
68
76
  writeStream.write(`\t<file path='${p}'>\n`);
69
- const trimmed = content.replace(/[\r\n]+$/, '');
77
+ const trimmed = content.replace(/[\r\n]+$/, "");
70
78
  const indented =
71
79
  trimmed.length > 0
72
80
  ? trimmed
73
- .split('\n')
81
+ .split("\n")
74
82
  .map((line) => `\t\t${line}`)
75
- .join('\n')
76
- : '';
83
+ .join("\n")
84
+ : "";
77
85
  writeStream.write(indented);
78
86
  writeStream.write(`</file>\n`);
79
87
  }