@zeyue0329/xiaoma-cli 1.12.0 → 1.15.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 (675) hide show
  1. package/package.json +24 -14
  2. package/src/core-skills/module-help.csv +13 -0
  3. package/src/{core → core-skills}/module.yaml +8 -0
  4. package/src/{core/skills/xiaoma-advanced-elicitation/workflow.md → core-skills/xiaoma-advanced-elicitation/SKILL.md} +10 -3
  5. package/src/core-skills/xiaoma-advanced-elicitation/methods.csv +70 -0
  6. package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-03-technique-execution.md +6 -4
  7. package/src/{core/skills → core-skills}/xiaoma-brainstorming/workflow.md +1 -1
  8. package/src/core-skills/xiaoma-customize/SKILL.md +111 -0
  9. package/src/core-skills/xiaoma-customize/scripts/list_customizable_skills.js +172 -0
  10. package/src/{core/skills → core-skills}/xiaoma-distillator/resources/distillate-format-reference.md +1 -1
  11. package/src/{core/skills → core-skills}/xiaoma-distillator/scripts/analyze_sources.py +2 -2
  12. package/src/{core/skills/xiaoma-editorial-review-prose/workflow.md → core-skills/xiaoma-editorial-review-prose/SKILL.md} +5 -0
  13. package/src/{core/skills/xiaoma-editorial-review-structure/workflow.md → core-skills/xiaoma-editorial-review-structure/SKILL.md} +5 -0
  14. package/src/core-skills/xiaoma-help/SKILL.md +75 -0
  15. package/src/{core/skills/xiaoma-index-docs/workflow.md → core-skills/xiaoma-index-docs/SKILL.md} +5 -0
  16. package/src/core-skills/xiaoma-party-mode/SKILL.md +128 -0
  17. package/src/{core/skills/xiaoma-review-adversarial-general/workflow.md → core-skills/xiaoma-review-adversarial-general/SKILL.md} +5 -0
  18. package/src/{core/skills/xiaoma-review-edge-case-hunter/workflow.md → core-skills/xiaoma-review-edge-case-hunter/SKILL.md} +5 -0
  19. package/src/{core/skills/xiaoma-shard-doc/workflow.md → core-skills/xiaoma-shard-doc/SKILL.md} +5 -0
  20. package/src/core-skills/xiaoma-spec/SKILL.md +129 -0
  21. package/src/core-skills/xiaoma-spec/assets/headless-schemas.md +33 -0
  22. package/src/core-skills/xiaoma-spec/assets/spec-template.md +49 -0
  23. package/src/core-skills/xiaoma-spec/customize.toml +53 -0
  24. package/src/scripts/resolve_config.js +163 -0
  25. package/src/scripts/resolve_customization.js +188 -0
  26. package/src/scripts/toml.js +338 -0
  27. package/src/xmc-skills/1-analysis/research/xiaoma-domain-research/SKILL.md +96 -0
  28. package/src/xmc-skills/1-analysis/research/xiaoma-domain-research/customize.toml +41 -0
  29. package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-06-research-synthesis.md +6 -0
  30. package/src/xmc-skills/1-analysis/research/xiaoma-market-research/SKILL.md +96 -0
  31. package/src/xmc-skills/1-analysis/research/xiaoma-market-research/customize.toml +41 -0
  32. package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-06-research-completion.md +6 -0
  33. package/src/xmc-skills/1-analysis/research/xiaoma-technical-research/SKILL.md +96 -0
  34. package/src/xmc-skills/1-analysis/research/xiaoma-technical-research/customize.toml +41 -0
  35. package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-06-research-synthesis.md +6 -0
  36. package/src/xmc-skills/1-analysis/xiaoma-agent-analyst/SKILL.md +76 -0
  37. package/src/xmc-skills/1-analysis/xiaoma-agent-analyst/customize.toml +90 -0
  38. package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/SKILL.md +76 -0
  39. package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/customize.toml +81 -0
  40. package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/explain-concept.md +20 -0
  41. package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/mermaid-gen.md +20 -0
  42. package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/validate-doc.md +19 -0
  43. package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/write-document.md +20 -0
  44. package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/checklist.md +5 -2
  45. package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/steps/step-01-init-and-validate.md +18 -1
  46. package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/steps/step-02-requirements-analysis.md +3 -1
  47. package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/steps/step-03-architecture-analysis.md +5 -3
  48. package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/steps/step-04-create-prd.md +12 -14
  49. package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/steps/step-05-validate-prd.md +18 -15
  50. package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/steps/step-06-create-epics.md +9 -5
  51. package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/steps/step-07-create-architecture.md +10 -7
  52. package/src/xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline/steps/step-08-finalize.md +184 -0
  53. package/src/xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline/workflow.md +140 -0
  54. package/src/xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline/xiaoma-skill-manifest.yaml +24 -0
  55. package/src/xmc-skills/1-analysis/xiaoma-document-project/SKILL.md +62 -0
  56. package/src/xmc-skills/1-analysis/xiaoma-document-project/customize.toml +41 -0
  57. package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/workflows/deep-dive-instructions.md +1 -0
  58. package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/workflows/full-scan-instructions.md +1 -0
  59. package/src/xmc-skills/1-analysis/xiaoma-prfaq/SKILL.md +135 -0
  60. package/src/xmc-skills/1-analysis/xiaoma-prfaq/agents/artifact-analyzer.md +60 -0
  61. package/src/xmc-skills/1-analysis/xiaoma-prfaq/agents/web-researcher.md +49 -0
  62. package/src/xmc-skills/1-analysis/xiaoma-prfaq/assets/prfaq-template.md +62 -0
  63. package/src/xmc-skills/1-analysis/xiaoma-prfaq/customize.toml +41 -0
  64. package/src/xmc-skills/1-analysis/xiaoma-prfaq/references/customer-faq.md +55 -0
  65. package/src/xmc-skills/1-analysis/xiaoma-prfaq/references/internal-faq.md +51 -0
  66. package/src/xmc-skills/1-analysis/xiaoma-prfaq/references/press-release.md +60 -0
  67. package/src/xmc-skills/1-analysis/xiaoma-prfaq/references/verdict.md +83 -0
  68. package/src/xmc-skills/1-analysis/xiaoma-prfaq/xiaoma-manifest.json +16 -0
  69. package/src/xmc-skills/1-analysis/xiaoma-product-brief/SKILL.md +91 -0
  70. package/src/xmc-skills/1-analysis/xiaoma-product-brief/assets/brief-template.md +41 -0
  71. package/src/xmc-skills/1-analysis/xiaoma-product-brief/customize.toml +99 -0
  72. package/src/xmc-skills/2-plan-workflows/xiaoma-agent-pm/SKILL.md +76 -0
  73. package/src/xmc-skills/2-plan-workflows/xiaoma-agent-pm/customize.toml +75 -0
  74. package/src/xmc-skills/2-plan-workflows/xiaoma-agent-ux-designer/SKILL.md +76 -0
  75. package/src/xmc-skills/2-plan-workflows/xiaoma-agent-ux-designer/customize.toml +60 -0
  76. package/src/xmc-skills/2-plan-workflows/xiaoma-create-prd/SKILL.md +30 -0
  77. package/src/xmc-skills/2-plan-workflows/xiaoma-create-prd/customize.toml +41 -0
  78. package/src/xmc-skills/2-plan-workflows/xiaoma-edit-prd/SKILL.md +30 -0
  79. package/src/xmc-skills/2-plan-workflows/xiaoma-edit-prd/customize.toml +42 -0
  80. package/src/xmc-skills/2-plan-workflows/xiaoma-prd/SKILL.md +92 -0
  81. package/src/xmc-skills/2-plan-workflows/xiaoma-prd/assets/headless-schemas.md +76 -0
  82. package/src/xmc-skills/2-plan-workflows/xiaoma-prd/assets/prd-template.md +165 -0
  83. package/src/xmc-skills/2-plan-workflows/xiaoma-prd/assets/prd-validation-checklist.md +217 -0
  84. package/src/xmc-skills/2-plan-workflows/xiaoma-prd/assets/validation-report-template.html +325 -0
  85. package/src/xmc-skills/2-plan-workflows/xiaoma-prd/customize.toml +147 -0
  86. package/src/xmc-skills/2-plan-workflows/xiaoma-prd/references/headless.md +39 -0
  87. package/src/xmc-skills/2-plan-workflows/xiaoma-prd/references/validate.md +97 -0
  88. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/SKILL.md +90 -0
  89. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/color-themes.md +9 -0
  90. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/design-directions.md +9 -0
  91. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/design-example-editorial.md +158 -0
  92. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/design-example-mobile.md +93 -0
  93. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/design-example-shadcn.md +109 -0
  94. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/excalidraw-wireframe.md +19 -0
  95. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/experience-example-mobile.md +112 -0
  96. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/experience-example-shadcn.md +133 -0
  97. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/headless-schemas.md +84 -0
  98. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/key-screens.md +29 -0
  99. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/validation-report-template.html +319 -0
  100. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/customize.toml +100 -0
  101. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/references/creative-tools.md +19 -0
  102. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/references/design-md-spec.md +50 -0
  103. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/references/headless.md +37 -0
  104. package/src/xmc-skills/2-plan-workflows/xiaoma-ux/references/validate.md +115 -0
  105. package/src/xmc-skills/2-plan-workflows/xiaoma-validate-prd/SKILL.md +30 -0
  106. package/src/xmc-skills/2-plan-workflows/xiaoma-validate-prd/customize.toml +31 -0
  107. package/src/xmc-skills/3-solutioning/xiaoma-agent-architect/SKILL.md +76 -0
  108. package/src/xmc-skills/3-solutioning/xiaoma-agent-architect/customize.toml +65 -0
  109. package/src/xmc-skills/3-solutioning/xiaoma-check-implementation-readiness/SKILL.md +91 -0
  110. package/src/xmc-skills/3-solutioning/xiaoma-check-implementation-readiness/customize.toml +41 -0
  111. package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-01-document-discovery.md +1 -1
  112. package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-02-prd-analysis.md +1 -1
  113. package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-03-epic-coverage-validation.md +1 -1
  114. package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-06-final-assessment.md +6 -0
  115. package/src/xmc-skills/3-solutioning/xiaoma-create-architecture/SKILL.md +74 -0
  116. package/src/xmc-skills/3-solutioning/xiaoma-create-architecture/customize.toml +41 -0
  117. package/src/xmc-skills/3-solutioning/xiaoma-create-architecture/references/headless.md +37 -0
  118. package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-07-validation.md +23 -21
  119. package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-08-complete.md +6 -0
  120. package/src/xmc-skills/3-solutioning/xiaoma-create-epics-and-stories/SKILL.md +93 -0
  121. package/src/xmc-skills/3-solutioning/xiaoma-create-epics-and-stories/customize.toml +41 -0
  122. package/src/xmc-skills/3-solutioning/xiaoma-create-epics-and-stories/references/headless.md +35 -0
  123. package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/steps/step-02-design-epics.md +34 -4
  124. package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/steps/step-04-final-validation.md +12 -0
  125. package/src/xmc-skills/3-solutioning/xiaoma-generate-project-context/SKILL.md +81 -0
  126. package/src/xmc-skills/3-solutioning/xiaoma-generate-project-context/customize.toml +41 -0
  127. package/src/{xmc/workflows → xmc-skills/3-solutioning}/xiaoma-generate-project-context/steps/step-03-complete.md +6 -0
  128. package/src/xmc-skills/4-implementation/xiaoma-agent-dev/SKILL.md +76 -0
  129. package/src/xmc-skills/4-implementation/xiaoma-agent-dev/customize.toml +131 -0
  130. package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/checklist.md +29 -0
  131. package/src/{xmc/workflows/4-implementation/auto-story-pipeline → xmc-skills/4-implementation/xiaoma-auto-story-pipeline}/steps/step-01-init-and-validate.md +16 -8
  132. package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/steps/step-02-create-story.md +111 -0
  133. package/src/{xmc/workflows/4-implementation/auto-story-pipeline → xmc-skills/4-implementation/xiaoma-auto-story-pipeline}/steps/step-03-validate-story.md +4 -2
  134. package/src/{xmc/workflows/4-implementation/auto-story-pipeline → xmc-skills/4-implementation/xiaoma-auto-story-pipeline}/steps/step-04-develop-story.md +10 -6
  135. package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/steps/step-05-code-review.md +99 -0
  136. package/src/{xmc/workflows/4-implementation/auto-story-pipeline → xmc-skills/4-implementation/xiaoma-auto-story-pipeline}/steps/step-06-test-story.md +25 -12
  137. package/src/{xmc/workflows/4-implementation/auto-story-pipeline → xmc-skills/4-implementation/xiaoma-auto-story-pipeline}/steps/step-07-fix-and-retest.md +28 -13
  138. package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/steps/step-08-complete-story.md +174 -0
  139. package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/steps/step-09-finalize.md +145 -0
  140. package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/workflow.md +127 -0
  141. package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/xiaoma-skill-manifest.yaml +27 -0
  142. package/src/{xmc/workflows/4-implementation/auto-story-pipeline-batch → xmc-skills/4-implementation/xiaoma-auto-story-pipeline-batch}/SKILL.md +2 -2
  143. package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline-batch/checklist.md +45 -0
  144. package/src/{xmc/workflows/4-implementation/auto-story-pipeline-batch → xmc-skills/4-implementation/xiaoma-auto-story-pipeline-batch}/workflow.md +150 -7
  145. package/src/{xmc/workflows/4-implementation/auto-story-pipeline-batch → xmc-skills/4-implementation/xiaoma-auto-story-pipeline-batch}/xiaoma-skill-manifest.yaml +2 -2
  146. package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/SKILL.md +68 -0
  147. package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/customize.toml +41 -0
  148. package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/generate-trail.md +38 -0
  149. package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-01-orientation.md +105 -0
  150. package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-02-walkthrough.md +89 -0
  151. package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-03-detail-pass.md +106 -0
  152. package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-04-testing.md +74 -0
  153. package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-05-wrapup.md +30 -0
  154. package/src/xmc-skills/4-implementation/xiaoma-code-review/SKILL.md +90 -0
  155. package/src/xmc-skills/4-implementation/xiaoma-code-review/customize.toml +41 -0
  156. package/src/xmc-skills/4-implementation/xiaoma-code-review/steps/step-01-gather-context.md +85 -0
  157. package/src/xmc-skills/4-implementation/xiaoma-code-review/steps/step-02-review.md +35 -0
  158. package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-code-review/steps/step-03-triage.md +7 -8
  159. package/src/xmc-skills/4-implementation/xiaoma-code-review/steps/step-04-present.md +132 -0
  160. package/src/{xmc/workflows/4-implementation/xiaoma-correct-course/workflow.md → xmc-skills/4-implementation/xiaoma-correct-course/SKILL.md} +65 -31
  161. package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-correct-course/checklist.md +2 -2
  162. package/src/xmc-skills/4-implementation/xiaoma-correct-course/customize.toml +41 -0
  163. package/src/{xmc/workflows/4-implementation/xiaoma-create-story/workflow.md → xmc-skills/4-implementation/xiaoma-create-story/SKILL.md} +60 -11
  164. package/src/xmc-skills/4-implementation/xiaoma-create-story/customize.toml +41 -0
  165. package/src/xmc-skills/4-implementation/xiaoma-create-story/references/headless.md +32 -0
  166. package/src/{xmc/workflows/4-implementation/xiaoma-dev-story/workflow.md → xmc-skills/4-implementation/xiaoma-dev-story/SKILL.md} +70 -20
  167. package/src/xmc-skills/4-implementation/xiaoma-dev-story/customize.toml +41 -0
  168. package/src/xmc-skills/4-implementation/xiaoma-investigate/SKILL.md +196 -0
  169. package/src/xmc-skills/4-implementation/xiaoma-investigate/customize.toml +62 -0
  170. package/src/xmc-skills/4-implementation/xiaoma-investigate/references/case-file-template.md +127 -0
  171. package/src/{xmc/workflows/xiaoma-qa-generate-e2e-tests/workflow.md → xmc-skills/4-implementation/xiaoma-qa-generate-e2e-tests/SKILL.md} +51 -23
  172. package/src/{xmc/workflows → xmc-skills/4-implementation}/xiaoma-qa-generate-e2e-tests/checklist.md +1 -5
  173. package/src/xmc-skills/4-implementation/xiaoma-qa-generate-e2e-tests/customize.toml +41 -0
  174. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/SKILL.md +111 -0
  175. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/compile-epic-context.md +62 -0
  176. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/customize.toml +41 -0
  177. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/spec-template.md +88 -0
  178. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-01-clarify-and-route.md +100 -0
  179. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-02-plan.md +47 -0
  180. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-03-implement.md +41 -0
  181. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-04-review.md +50 -0
  182. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-05-present.md +78 -0
  183. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-oneshot.md +71 -0
  184. package/src/xmc-skills/4-implementation/xiaoma-quick-dev/sync-sprint-status.md +19 -0
  185. package/src/{xmc/workflows/4-implementation/xiaoma-retrospective/workflow.md → xmc-skills/4-implementation/xiaoma-retrospective/SKILL.md} +185 -152
  186. package/src/xmc-skills/4-implementation/xiaoma-retrospective/customize.toml +41 -0
  187. package/src/{xmc/workflows/4-implementation/xiaoma-sprint-planning/workflow.md → xmc-skills/4-implementation/xiaoma-sprint-planning/SKILL.md} +59 -15
  188. package/src/xmc-skills/4-implementation/xiaoma-sprint-planning/customize.toml +41 -0
  189. package/src/xmc-skills/4-implementation/xiaoma-sprint-planning/references/headless.md +28 -0
  190. package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-sprint-planning/sprint-status-template.yaml +3 -3
  191. package/src/{xmc/workflows/4-implementation/xiaoma-sprint-status/workflow.md → xmc-skills/4-implementation/xiaoma-sprint-status/SKILL.md} +57 -20
  192. package/src/xmc-skills/4-implementation/xiaoma-sprint-status/customize.toml +41 -0
  193. package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/checklist.md +6 -0
  194. package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/steps/step-01-init-and-validate.md +28 -4
  195. package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/steps/step-02-run-requirements-pipeline.md +2 -1
  196. package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/steps/step-03-bridge-sprint-planning.md +63 -9
  197. package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/steps/step-04-run-story-pipeline.md +2 -1
  198. package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/steps/step-05-finalize.md +30 -3
  199. package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/workflow.md +7 -8
  200. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/SKILL.md +6 -0
  201. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/checklist.md +47 -0
  202. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-01-init-and-validate.md +156 -0
  203. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-02-create-epics.md +157 -0
  204. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-03-bridge-sprint-planning.md +197 -0
  205. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-04-batch-create-stories.md +310 -0
  206. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-05-finalize.md +351 -0
  207. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/workflow.md +104 -0
  208. package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/xiaoma-skill-manifest.yaml +3 -0
  209. package/src/xmc-skills/module-help.csv +32 -0
  210. package/src/xmc-skills/module.yaml +95 -0
  211. package/src/xpm-skills/module-help.csv +3 -0
  212. package/src/xpm-skills/module.yaml +36 -0
  213. package/src/xpm-skills/xiaoma-agent-patent-advisor/SKILL.md +75 -0
  214. package/src/xpm-skills/xiaoma-agent-patent-advisor/customize.toml +46 -0
  215. package/src/xpm-skills/xiaoma-patent-mining/SKILL.md +6 -0
  216. package/src/xpm-skills/xiaoma-patent-mining/references/docx-format-spec.md +183 -0
  217. package/src/xpm-skills/xiaoma-patent-mining/scripts/md2docx.js +777 -0
  218. package/src/xpm-skills/xiaoma-patent-mining/steps/step-01-project-analysis.md +65 -0
  219. package/src/xpm-skills/xiaoma-patent-mining/steps/step-02-patent-mining.md +87 -0
  220. package/src/xpm-skills/xiaoma-patent-mining/steps/step-03-disclosure-writing.md +110 -0
  221. package/src/xpm-skills/xiaoma-patent-mining/steps/step-04-ai-taste-removal.md +85 -0
  222. package/src/xpm-skills/xiaoma-patent-mining/steps/step-05-docx-generation.md +111 -0
  223. package/src/xpm-skills/xiaoma-patent-mining/workflow.md +94 -0
  224. package/tools/format-workflow-md.js +263 -0
  225. package/tools/{cli → installer}/README.md +2 -2
  226. package/tools/installer/cli-utils.js +57 -0
  227. package/tools/installer/commands/install.js +146 -0
  228. package/tools/{cli → installer}/commands/status.js +15 -7
  229. package/tools/{cli → installer}/commands/uninstall.js +7 -7
  230. package/tools/installer/core/config.js +73 -0
  231. package/tools/installer/core/existing-install.js +121 -0
  232. package/tools/installer/core/install-paths.js +132 -0
  233. package/tools/installer/core/installer.js +1624 -0
  234. package/tools/installer/core/legacy-warnings.js +156 -0
  235. package/tools/installer/core/manifest-generator.js +859 -0
  236. package/tools/installer/core/manifest.js +434 -0
  237. package/tools/{cli/lib → installer}/file-ops.js +1 -1
  238. package/tools/installer/fs-native.js +116 -0
  239. package/tools/installer/ide/_config-driven.js +972 -0
  240. package/tools/{cli/installers/lib → installer}/ide/manager.js +82 -62
  241. package/tools/installer/ide/platform-codes.js +80 -0
  242. package/tools/installer/ide/platform-codes.yaml +322 -0
  243. package/tools/installer/ide/shared/installed-skills.js +50 -0
  244. package/tools/{cli/installers/lib → installer}/ide/shared/path-utils.js +0 -145
  245. package/tools/{cli/installers/lib → installer}/ide/shared/skill-manifest.js +3 -36
  246. package/tools/installer/list-options.js +210 -0
  247. package/tools/{cli/installers/lib → installer}/message-loader.js +3 -3
  248. package/tools/installer/modules/channel-plan.js +203 -0
  249. package/tools/installer/modules/channel-resolver.js +241 -0
  250. package/tools/installer/modules/custom-module-manager.js +912 -0
  251. package/tools/installer/modules/external-manager.js +533 -0
  252. package/tools/installer/modules/module-help-schema.js +13 -0
  253. package/tools/{cli/installers/lib/core/config-collector.js → installer/modules/official-modules.js} +1052 -110
  254. package/tools/installer/modules/plugin-resolver.js +398 -0
  255. package/tools/installer/modules/version-resolver.js +336 -0
  256. package/tools/installer/project-root.js +230 -0
  257. package/tools/{cli/lib → installer}/prompts.js +143 -100
  258. package/tools/installer/set-overrides.js +330 -0
  259. package/tools/installer/ui.js +2078 -0
  260. package/tools/{cli → installer}/xiaoma-cli.js +9 -10
  261. package/tools/{cli/lib → installer}/yaml-format.js +1 -1
  262. package/tools/migrate-custom-module-paths.js +124 -0
  263. package/tools/schema/step.js +855 -0
  264. package/tools/skill-validator.md +323 -0
  265. package/tools/validate-file-refs.js +566 -0
  266. package/tools/validate-frontmatter-prose-routing.js +334 -0
  267. package/tools/validate-skills.js +702 -0
  268. package/tools/validate-step-schemas.js +401 -0
  269. package/tools/validate-svg-changes.sh +1 -1
  270. package/tools/validate-trigger-column-vs-emits.js +375 -0
  271. package/tools/validate-warnings-samples.js +261 -0
  272. package/tools/xiaoma/rebrand.mjs +0 -0
  273. package/tools/xiaoma-npx-wrapper.js +2 -2
  274. package/CLAUDE.md +0 -110
  275. package/README.md +0 -128
  276. package/demo/xiaoma-bug-circle-resolve/SKILL.md +0 -6
  277. package/demo/xiaoma-bug-circle-resolve/workflow.md +0 -212
  278. package/demo/xiaoma-bug-resolve/SKILL.md +0 -6
  279. package/demo/xiaoma-bug-resolve/workflow.md +0 -269
  280. package/docs/roadshow/01-/351/241/271/347/233/256/346/246/202/350/247/210/344/270/216/346/236/266/346/236/204.md +0 -189
  281. package/docs/roadshow/02-/346/231/272/350/203/275/344/275/223/347/263/273/347/273/237/350/257/246/350/247/243.md +0 -464
  282. package/docs/roadshow/03-/346/231/272/350/203/275/344/275/223/344/272/244/344/272/222/346/265/201/347/250/213/345/233/276.md +0 -334
  283. package/docs/roadshow/04-/345/267/245/344/275/234/346/265/201/346/211/247/350/241/214/350/257/246/350/247/243.md +0 -1038
  284. package/docs/roadshow/05-/346/212/200/346/234/257/345/256/236/347/216/260/344/270/216/345/210/233/346/226/260/344/272/256/347/202/271.md +0 -205
  285. package/docs/roadshow/06-/350/267/257/346/274/224/346/200/273/347/273/223/344/270/216/346/274/224/347/244/272/345/273/272/350/256/256.md +0 -167
  286. package/patent-disclosure-optimized/SKILL.md +0 -298
  287. package/src/core/module-help.csv +0 -11
  288. package/src/core/skills/xiaoma-advanced-elicitation/SKILL.md +0 -6
  289. package/src/core/skills/xiaoma-advanced-elicitation/methods.csv +0 -51
  290. package/src/core/skills/xiaoma-editorial-review-prose/SKILL.md +0 -6
  291. package/src/core/skills/xiaoma-editorial-review-structure/SKILL.md +0 -6
  292. package/src/core/skills/xiaoma-help/SKILL.md +0 -6
  293. package/src/core/skills/xiaoma-help/workflow.md +0 -88
  294. package/src/core/skills/xiaoma-help/xiaoma-skill-manifest.yaml +0 -1
  295. package/src/core/skills/xiaoma-index-docs/SKILL.md +0 -6
  296. package/src/core/skills/xiaoma-index-docs/xiaoma-skill-manifest.yaml +0 -1
  297. package/src/core/skills/xiaoma-party-mode/SKILL.md +0 -6
  298. package/src/core/skills/xiaoma-party-mode/steps/step-01-agent-loading.md +0 -138
  299. package/src/core/skills/xiaoma-party-mode/steps/step-02-discussion-orchestration.md +0 -187
  300. package/src/core/skills/xiaoma-party-mode/steps/step-03-graceful-exit.md +0 -167
  301. package/src/core/skills/xiaoma-party-mode/workflow.md +0 -190
  302. package/src/core/skills/xiaoma-party-mode/xiaoma-skill-manifest.yaml +0 -1
  303. package/src/core/skills/xiaoma-review-adversarial-general/SKILL.md +0 -6
  304. package/src/core/skills/xiaoma-review-adversarial-general/xiaoma-skill-manifest.yaml +0 -1
  305. package/src/core/skills/xiaoma-review-edge-case-hunter/SKILL.md +0 -6
  306. package/src/core/skills/xiaoma-review-edge-case-hunter/xiaoma-skill-manifest.yaml +0 -1
  307. package/src/core/skills/xiaoma-shard-doc/SKILL.md +0 -6
  308. package/src/core/skills/xiaoma-shard-doc/xiaoma-skill-manifest.yaml +0 -1
  309. package/src/core/tasks/xiaoma-create-prd/SKILL.md +0 -6
  310. package/src/core/tasks/xiaoma-create-prd/data/prd-purpose.md +0 -197
  311. package/src/core/tasks/xiaoma-create-prd/steps-c/step-01-init.md +0 -178
  312. package/src/core/tasks/xiaoma-create-prd/steps-c/step-01b-continue.md +0 -161
  313. package/src/core/tasks/xiaoma-create-prd/steps-c/step-02-discovery.md +0 -208
  314. package/src/core/tasks/xiaoma-create-prd/steps-c/step-02b-vision.md +0 -142
  315. package/src/core/tasks/xiaoma-create-prd/steps-c/step-02c-executive-summary.md +0 -158
  316. package/src/core/tasks/xiaoma-create-prd/steps-c/step-03-success.md +0 -214
  317. package/src/core/tasks/xiaoma-create-prd/steps-c/step-04-journeys.md +0 -201
  318. package/src/core/tasks/xiaoma-create-prd/steps-c/step-05-domain.md +0 -194
  319. package/src/core/tasks/xiaoma-create-prd/steps-c/step-06-innovation.md +0 -211
  320. package/src/core/tasks/xiaoma-create-prd/steps-c/step-07-project-type.md +0 -222
  321. package/src/core/tasks/xiaoma-create-prd/steps-c/step-08-scoping.md +0 -216
  322. package/src/core/tasks/xiaoma-create-prd/steps-c/step-09-functional.md +0 -219
  323. package/src/core/tasks/xiaoma-create-prd/steps-c/step-10-nonfunctional.md +0 -230
  324. package/src/core/tasks/xiaoma-create-prd/steps-c/step-11-polish.md +0 -221
  325. package/src/core/tasks/xiaoma-create-prd/steps-c/step-12-complete.md +0 -115
  326. package/src/core/tasks/xiaoma-create-prd/templates/prd-template.md +0 -10
  327. package/src/core/tasks/xiaoma-create-prd/workflow.md +0 -62
  328. package/src/core/tasks/xiaoma-create-prd/xiaoma-skill-manifest.yaml +0 -1
  329. package/src/utility/agent-components/activation-rules.txt +0 -6
  330. package/src/utility/agent-components/activation-steps.txt +0 -14
  331. package/src/utility/agent-components/agent-command-header.md +0 -1
  332. package/src/utility/agent-components/agent.customize.template.yaml +0 -41
  333. package/src/utility/agent-components/handler-action.txt +0 -4
  334. package/src/utility/agent-components/handler-data.txt +0 -5
  335. package/src/utility/agent-components/handler-exec.txt +0 -6
  336. package/src/utility/agent-components/handler-multi.txt +0 -13
  337. package/src/utility/agent-components/handler-tmpl.txt +0 -5
  338. package/src/utility/agent-components/menu-handlers.txt +0 -6
  339. package/src/xmc/agents/analyst.agent.yaml +0 -47
  340. package/src/xmc/agents/architect.agent.yaml +0 -29
  341. package/src/xmc/agents/dev.agent.yaml +0 -38
  342. package/src/xmc/agents/pm.agent.yaml +0 -44
  343. package/src/xmc/agents/qa.agent.yaml +0 -58
  344. package/src/xmc/agents/quick-flow-solo-dev.agent.yaml +0 -36
  345. package/src/xmc/agents/sm.agent.yaml +0 -49
  346. package/src/xmc/agents/tech-writer/tech-writer-sidecar/documentation-standards.md +0 -224
  347. package/src/xmc/agents/tech-writer/tech-writer.agent.yaml +0 -46
  348. package/src/xmc/agents/tech-writer/xiaoma-skill-manifest.yaml +0 -3
  349. package/src/xmc/agents/ux-designer.agent.yaml +0 -27
  350. package/src/xmc/agents/xiaoma-skill-manifest.yaml +0 -39
  351. package/src/xmc/data/project-context-template.md +0 -26
  352. package/src/xmc/module-help.csv +0 -32
  353. package/src/xmc/module.yaml +0 -50
  354. package/src/xmc/teams/default-party.csv +0 -20
  355. package/src/xmc/teams/team-fullstack.yaml +0 -12
  356. package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-08-finalize.md +0 -124
  357. package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/workflow.md +0 -107
  358. package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/xiaoma-skill-manifest.yaml +0 -3
  359. package/src/xmc/workflows/1-analysis/research/market-steps/step-01-init.md +0 -182
  360. package/src/xmc/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +0 -237
  361. package/src/xmc/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +0 -249
  362. package/src/xmc/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +0 -259
  363. package/src/xmc/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +0 -177
  364. package/src/xmc/workflows/1-analysis/research/market-steps/step-06-research-completion.md +0 -476
  365. package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/SKILL.md +0 -6
  366. package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/workflow.md +0 -49
  367. package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/xiaoma-skill-manifest.yaml +0 -1
  368. package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/SKILL.md +0 -6
  369. package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/workflow.md +0 -49
  370. package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/xiaoma-skill-manifest.yaml +0 -1
  371. package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/SKILL.md +0 -6
  372. package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/research.template.md +0 -29
  373. package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/workflow.md +0 -50
  374. package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/xiaoma-skill-manifest.yaml +0 -1
  375. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/SKILL.md +0 -6
  376. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/product-brief.template.md +0 -10
  377. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-01-init.md +0 -170
  378. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-01b-continue.md +0 -158
  379. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-02-vision.md +0 -193
  380. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-03-users.md +0 -196
  381. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-04-metrics.md +0 -199
  382. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-05-scope.md +0 -213
  383. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-06-complete.md +0 -159
  384. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/workflow.md +0 -55
  385. package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/xiaoma-skill-manifest.yaml +0 -1
  386. package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/xiaoma-skill-manifest.yaml +0 -1
  387. package/src/xmc/workflows/2-plan-workflows/create-prd/data/domain-complexity.csv +0 -15
  388. package/src/xmc/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +0 -197
  389. package/src/xmc/workflows/2-plan-workflows/create-prd/data/project-types.csv +0 -11
  390. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +0 -224
  391. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +0 -191
  392. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +0 -209
  393. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +0 -174
  394. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md +0 -214
  395. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md +0 -228
  396. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md +0 -217
  397. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md +0 -205
  398. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md +0 -243
  399. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md +0 -263
  400. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +0 -209
  401. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +0 -264
  402. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md +0 -242
  403. package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +0 -232
  404. package/src/xmc/workflows/2-plan-workflows/create-prd/workflow-validate-prd.md +0 -65
  405. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/SKILL.md +0 -6
  406. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-01-init.md +0 -135
  407. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-01b-continue.md +0 -127
  408. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-02-discovery.md +0 -190
  409. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-03-core-experience.md +0 -217
  410. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-04-emotional-response.md +0 -220
  411. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-05-inspiration.md +0 -235
  412. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-06-design-system.md +0 -253
  413. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-07-defining-experience.md +0 -255
  414. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-08-visual-foundation.md +0 -225
  415. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-09-design-directions.md +0 -225
  416. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-10-user-journeys.md +0 -242
  417. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-11-component-strategy.md +0 -249
  418. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-12-ux-patterns.md +0 -238
  419. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-13-responsive-accessibility.md +0 -265
  420. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-14-complete.md +0 -171
  421. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/ux-design-template.md +0 -13
  422. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/workflow.md +0 -36
  423. package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/xiaoma-skill-manifest.yaml +0 -1
  424. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/SKILL.md +0 -6
  425. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-01-discovery.md +0 -242
  426. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-01b-legacy-conversion.md +0 -204
  427. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-02-review.md +0 -245
  428. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-03-edit.md +0 -250
  429. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-04-complete.md +0 -165
  430. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/workflow.md +0 -63
  431. package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/xiaoma-skill-manifest.yaml +0 -1
  432. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/SKILL.md +0 -6
  433. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/domain-complexity.csv +0 -15
  434. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/prd-purpose.md +0 -197
  435. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/project-types.csv +0 -11
  436. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-01-discovery.md +0 -221
  437. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-02-format-detection.md +0 -188
  438. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-02b-parity-check.md +0 -206
  439. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-03-density-validation.md +0 -171
  440. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +0 -211
  441. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-05-measurability-validation.md +0 -225
  442. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-06-traceability-validation.md +0 -214
  443. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +0 -202
  444. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +0 -240
  445. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-09-project-type-validation.md +0 -260
  446. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-10-smart-validation.md +0 -206
  447. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +0 -261
  448. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-12-completeness-validation.md +0 -239
  449. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-13-report-complete.md +0 -229
  450. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/workflow.md +0 -62
  451. package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/xiaoma-skill-manifest.yaml +0 -1
  452. package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/SKILL.md +0 -6
  453. package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/workflow.md +0 -49
  454. package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/xiaoma-skill-manifest.yaml +0 -1
  455. package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/SKILL.md +0 -6
  456. package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/workflow.md +0 -38
  457. package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/xiaoma-skill-manifest.yaml +0 -1
  458. package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/SKILL.md +0 -6
  459. package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/workflow.md +0 -53
  460. package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/xiaoma-skill-manifest.yaml +0 -1
  461. package/src/xmc/workflows/4-implementation/auto-story-pipeline/checklist.md +0 -22
  462. package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-02-create-story.md +0 -102
  463. package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-05-code-review.md +0 -95
  464. package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-08-complete-story.md +0 -114
  465. package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-09-finalize.md +0 -69
  466. package/src/xmc/workflows/4-implementation/auto-story-pipeline/workflow.md +0 -89
  467. package/src/xmc/workflows/4-implementation/auto-story-pipeline/xiaoma-skill-manifest.yaml +0 -3
  468. package/src/xmc/workflows/4-implementation/xiaoma-code-review/SKILL.md +0 -6
  469. package/src/xmc/workflows/4-implementation/xiaoma-code-review/checklist.md +0 -23
  470. package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-01-gather-context.md +0 -61
  471. package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-02-review.md +0 -41
  472. package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-04-present.md +0 -38
  473. package/src/xmc/workflows/4-implementation/xiaoma-code-review/workflow.md +0 -54
  474. package/src/xmc/workflows/4-implementation/xiaoma-code-review/xiaoma-skill-manifest.yaml +0 -1
  475. package/src/xmc/workflows/4-implementation/xiaoma-correct-course/SKILL.md +0 -6
  476. package/src/xmc/workflows/4-implementation/xiaoma-correct-course/xiaoma-skill-manifest.yaml +0 -1
  477. package/src/xmc/workflows/4-implementation/xiaoma-create-story/SKILL.md +0 -6
  478. package/src/xmc/workflows/4-implementation/xiaoma-create-story/discover-inputs.md +0 -88
  479. package/src/xmc/workflows/4-implementation/xiaoma-create-story/xiaoma-skill-manifest.yaml +0 -1
  480. package/src/xmc/workflows/4-implementation/xiaoma-dev-story/SKILL.md +0 -6
  481. package/src/xmc/workflows/4-implementation/xiaoma-dev-story/xiaoma-skill-manifest.yaml +0 -1
  482. package/src/xmc/workflows/4-implementation/xiaoma-retrospective/SKILL.md +0 -6
  483. package/src/xmc/workflows/4-implementation/xiaoma-retrospective/xiaoma-skill-manifest.yaml +0 -1
  484. package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/SKILL.md +0 -6
  485. package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/xiaoma-skill-manifest.yaml +0 -1
  486. package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/SKILL.md +0 -6
  487. package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/xiaoma-skill-manifest.yaml +0 -1
  488. package/src/xmc/workflows/xiaoma-document-project/SKILL.md +0 -6
  489. package/src/xmc/workflows/xiaoma-document-project/workflow.md +0 -27
  490. package/src/xmc/workflows/xiaoma-document-project/xiaoma-skill-manifest.yaml +0 -1
  491. package/src/xmc/workflows/xiaoma-generate-project-context/SKILL.md +0 -6
  492. package/src/xmc/workflows/xiaoma-generate-project-context/workflow.md +0 -43
  493. package/src/xmc/workflows/xiaoma-generate-project-context/xiaoma-skill-manifest.yaml +0 -1
  494. package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/SKILL.md +0 -6
  495. package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/xiaoma-skill-manifest.yaml +0 -1
  496. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/SKILL.md +0 -6
  497. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-01-mode-detection.md +0 -169
  498. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-02-context-gathering.md +0 -114
  499. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-03-execute.md +0 -107
  500. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-04-self-check.md +0 -107
  501. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-05-adversarial-review.md +0 -94
  502. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-06-resolve-findings.md +0 -144
  503. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/workflow.md +0 -38
  504. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/xiaoma-skill-manifest.yaml +0 -1
  505. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev-new-preview/xiaoma-skill-manifest.yaml +0 -1
  506. package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-spec/xiaoma-skill-manifest.yaml +0 -1
  507. package/tools/cli/commands/install.js +0 -87
  508. package/tools/cli/external-official-modules.yaml +0 -4
  509. package/tools/cli/installers/lib/core/custom-module-cache.js +0 -260
  510. package/tools/cli/installers/lib/core/dependency-resolver.js +0 -743
  511. package/tools/cli/installers/lib/core/detector.js +0 -223
  512. package/tools/cli/installers/lib/core/ide-config-manager.js +0 -157
  513. package/tools/cli/installers/lib/core/installer.js +0 -3212
  514. package/tools/cli/installers/lib/core/manifest-generator.js +0 -1374
  515. package/tools/cli/installers/lib/core/manifest.js +0 -1040
  516. package/tools/cli/installers/lib/custom/handler.js +0 -358
  517. package/tools/cli/installers/lib/ide/_base-ide.js +0 -673
  518. package/tools/cli/installers/lib/ide/_config-driven.js +0 -1058
  519. package/tools/cli/installers/lib/ide/platform-codes.js +0 -100
  520. package/tools/cli/installers/lib/ide/platform-codes.yaml +0 -321
  521. package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +0 -181
  522. package/tools/cli/installers/lib/ide/shared/module-injections.js +0 -136
  523. package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +0 -368
  524. package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +0 -179
  525. package/tools/cli/installers/lib/ide/shared/xiaoma-artifacts.js +0 -181
  526. package/tools/cli/installers/lib/ide/templates/agent-command-template.md +0 -14
  527. package/tools/cli/installers/lib/ide/templates/combined/antigravity.md +0 -8
  528. package/tools/cli/installers/lib/ide/templates/combined/default-agent.md +0 -15
  529. package/tools/cli/installers/lib/ide/templates/combined/default-task.md +0 -10
  530. package/tools/cli/installers/lib/ide/templates/combined/default-tool.md +0 -10
  531. package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +0 -6
  532. package/tools/cli/installers/lib/ide/templates/combined/gemini-agent.toml +0 -14
  533. package/tools/cli/installers/lib/ide/templates/combined/gemini-task.toml +0 -11
  534. package/tools/cli/installers/lib/ide/templates/combined/gemini-tool.toml +0 -11
  535. package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml +0 -16
  536. package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml +0 -14
  537. package/tools/cli/installers/lib/ide/templates/combined/kiro-agent.md +0 -16
  538. package/tools/cli/installers/lib/ide/templates/combined/kiro-task.md +0 -9
  539. package/tools/cli/installers/lib/ide/templates/combined/kiro-tool.md +0 -9
  540. package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow.md +0 -7
  541. package/tools/cli/installers/lib/ide/templates/combined/opencode-agent.md +0 -15
  542. package/tools/cli/installers/lib/ide/templates/combined/opencode-task.md +0 -13
  543. package/tools/cli/installers/lib/ide/templates/combined/opencode-tool.md +0 -13
  544. package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.md +0 -16
  545. package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow.md +0 -16
  546. package/tools/cli/installers/lib/ide/templates/combined/rovodev.md +0 -9
  547. package/tools/cli/installers/lib/ide/templates/combined/trae.md +0 -9
  548. package/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md +0 -10
  549. package/tools/cli/installers/lib/ide/templates/split/.gitkeep +0 -0
  550. package/tools/cli/installers/lib/modules/external-manager.js +0 -136
  551. package/tools/cli/installers/lib/modules/manager.js +0 -1382
  552. package/tools/cli/lib/activation-builder.js +0 -165
  553. package/tools/cli/lib/agent/compiler.js +0 -516
  554. package/tools/cli/lib/agent/installer.js +0 -680
  555. package/tools/cli/lib/agent/template-engine.js +0 -152
  556. package/tools/cli/lib/agent-analyzer.js +0 -97
  557. package/tools/cli/lib/agent-party-generator.js +0 -194
  558. package/tools/cli/lib/cli-utils.js +0 -182
  559. package/tools/cli/lib/config.js +0 -213
  560. package/tools/cli/lib/platform-codes.js +0 -116
  561. package/tools/cli/lib/project-root.js +0 -77
  562. package/tools/cli/lib/ui.js +0 -1960
  563. package/tools/cli/lib/xml-handler.js +0 -177
  564. package/tools/cli/lib/xml-to-markdown.js +0 -82
  565. package/tools/cli/lib/yaml-xml-builder.js +0 -570
  566. package/tools/platform-codes.yaml +0 -157
  567. package/tools/schema/agent.js +0 -489
  568. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/SKILL.md +0 -0
  569. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/brain-methods.csv +0 -0
  570. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-01-session-setup.md +0 -0
  571. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-01b-continue.md +0 -0
  572. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-02a-user-selected.md +0 -0
  573. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-02b-ai-recommended.md +0 -0
  574. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-02c-random-selection.md +0 -0
  575. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-02d-progressive-flow.md +0 -0
  576. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-04-idea-organization.md +0 -0
  577. /package/src/{core/skills → core-skills}/xiaoma-brainstorming/template.md +0 -0
  578. /package/src/{core/skills → core-skills}/xiaoma-distillator/SKILL.md +0 -0
  579. /package/src/{core/skills → core-skills}/xiaoma-distillator/agents/distillate-compressor.md +0 -0
  580. /package/src/{core/skills → core-skills}/xiaoma-distillator/agents/round-trip-reconstructor.md +0 -0
  581. /package/src/{core/skills → core-skills}/xiaoma-distillator/resources/compression-rules.md +0 -0
  582. /package/src/{core/skills → core-skills}/xiaoma-distillator/resources/splitting-strategy.md +0 -0
  583. /package/src/{core/skills → core-skills}/xiaoma-distillator/scripts/tests/test_analyze_sources.py +0 -0
  584. /package/src/{core/skills → core-skills}/xiaoma-distillator/xiaoma-skill-manifest.yaml +0 -0
  585. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-01-init.md +0 -0
  586. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-02-domain-analysis.md +0 -0
  587. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-03-competitive-landscape.md +0 -0
  588. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-04-regulatory-focus.md +0 -0
  589. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-05-technical-trends.md +0 -0
  590. /package/src/{xmc/workflows/1-analysis/research → xmc-skills/1-analysis/research/xiaoma-domain-research}/research.template.md +0 -0
  591. /package/src/{xmc/workflows/1-analysis/research/xiaoma-domain-research → xmc-skills/1-analysis/research/xiaoma-market-research}/research.template.md +0 -0
  592. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-01-init.md +0 -0
  593. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-02-customer-behavior.md +0 -0
  594. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-03-customer-pain-points.md +0 -0
  595. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-04-customer-decisions.md +0 -0
  596. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-05-competitive-analysis.md +0 -0
  597. /package/src/{xmc/workflows/1-analysis/research/xiaoma-market-research → xmc-skills/1-analysis/research/xiaoma-technical-research}/research.template.md +0 -0
  598. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-01-init.md +0 -0
  599. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-02-technical-overview.md +0 -0
  600. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-03-integration-patterns.md +0 -0
  601. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-04-architectural-patterns.md +0 -0
  602. /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-05-implementation-research.md +0 -0
  603. /package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/SKILL.md +0 -0
  604. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/checklist.md +0 -0
  605. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/documentation-requirements.csv +0 -0
  606. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/instructions.md +0 -0
  607. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/deep-dive-template.md +0 -0
  608. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/index-template.md +0 -0
  609. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/project-overview-template.md +0 -0
  610. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/project-scan-report-schema.json +0 -0
  611. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/source-tree-template.md +0 -0
  612. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/workflows/deep-dive-workflow.md +0 -0
  613. /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/workflows/full-scan-workflow.md +0 -0
  614. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/SKILL.md +0 -0
  615. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/agents/artifact-analyzer.md +0 -0
  616. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/agents/opportunity-reviewer.md +0 -0
  617. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/agents/skeptic-reviewer.md +0 -0
  618. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/agents/web-researcher.md +0 -0
  619. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/prompts/contextual-discovery.md +0 -0
  620. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/prompts/draft-and-review.md +0 -0
  621. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/prompts/finalize.md +0 -0
  622. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/prompts/guided-elicitation.md +0 -0
  623. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/resources/brief-template.md +0 -0
  624. /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/xiaoma-manifest.json +0 -0
  625. /package/src/{core/skills/xiaoma-advanced-elicitation → xmc-skills/1-analysis/xiaoma-product-brief-preview}/xiaoma-skill-manifest.yaml +0 -0
  626. /package/src/{core/tasks/xiaoma-create-prd/data → xmc-skills/2-plan-workflows/xiaoma-prd/assets}/domain-complexity.csv +0 -0
  627. /package/src/{core/tasks/xiaoma-create-prd/data → xmc-skills/2-plan-workflows/xiaoma-prd/assets}/project-types.csv +0 -0
  628. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-04-ux-alignment.md +0 -0
  629. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-05-epic-quality-review.md +0 -0
  630. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/templates/readiness-report-template.md +0 -0
  631. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/architecture-decision-template.md +0 -0
  632. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/data/domain-complexity.csv +0 -0
  633. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/data/project-types.csv +0 -0
  634. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-01-init.md +0 -0
  635. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-01b-continue.md +0 -0
  636. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-02-context.md +0 -0
  637. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-03-starter.md +0 -0
  638. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-04-decisions.md +0 -0
  639. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-05-patterns.md +0 -0
  640. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-06-structure.md +0 -0
  641. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/steps/step-01-validate-prerequisites.md +0 -0
  642. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/steps/step-03-create-stories.md +0 -0
  643. /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/templates/epics-template.md +0 -0
  644. /package/src/{xmc/workflows → xmc-skills/3-solutioning}/xiaoma-generate-project-context/project-context-template.md +0 -0
  645. /package/src/{xmc/workflows → xmc-skills/3-solutioning}/xiaoma-generate-project-context/steps/step-01-discover.md +0 -0
  646. /package/src/{xmc/workflows → xmc-skills/3-solutioning}/xiaoma-generate-project-context/steps/step-02-generate.md +0 -0
  647. /package/src/{xmc/workflows/4-implementation/auto-story-pipeline → xmc-skills/4-implementation/xiaoma-auto-story-pipeline}/SKILL.md +0 -0
  648. /package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-create-story/checklist.md +0 -0
  649. /package/src/{xmc/workflows/4-implementation/xiaoma-code-review → xmc-skills/4-implementation/xiaoma-create-story}/discover-inputs.md +0 -0
  650. /package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-create-story/template.md +0 -0
  651. /package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-dev-story/checklist.md +0 -0
  652. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/SKILL.md +0 -0
  653. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-01-clarify-and-route.md +0 -0
  654. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-02-plan.md +0 -0
  655. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-03-implement.md +0 -0
  656. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-04-review.md +0 -0
  657. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-05-present.md +0 -0
  658. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/tech-spec-template.md +0 -0
  659. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/workflow.md +0 -0
  660. /package/src/{core/skills/xiaoma-brainstorming → xmc-skills/4-implementation/xiaoma-quick-dev-new-preview}/xiaoma-skill-manifest.yaml +0 -0
  661. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/SKILL.md +0 -0
  662. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/steps/step-01-understand.md +0 -0
  663. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/steps/step-02-investigate.md +0 -0
  664. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/steps/step-03-generate.md +0 -0
  665. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/steps/step-04-review.md +0 -0
  666. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/tech-spec-template.md +0 -0
  667. /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/workflow.md +0 -0
  668. /package/src/{core/skills/xiaoma-editorial-review-prose → xmc-skills/4-implementation/xiaoma-quick-spec}/xiaoma-skill-manifest.yaml +0 -0
  669. /package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-sprint-planning/checklist.md +0 -0
  670. /package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/SKILL.md +0 -0
  671. /package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/xiaoma-skill-manifest.yaml +0 -0
  672. /package/{patent-disclosure-optimized → src/xpm-skills/xiaoma-patent-mining}/references/disclosure-template.md +0 -0
  673. /package/{patent-disclosure-optimized → src/xpm-skills/xiaoma-patent-mining}/references/mining-principles.md +0 -0
  674. /package/src/{core/skills/xiaoma-editorial-review-structure → xpm-skills/xiaoma-patent-mining}/xiaoma-skill-manifest.yaml +0 -0
  675. /package/tools/{cli/installers → installer}/install-messages.yaml +0 -0
@@ -1,1040 +0,0 @@
1
- const path = require('node:path');
2
- const fs = require('fs-extra');
3
- const crypto = require('node:crypto');
4
- const { getProjectRoot } = require('../../../lib/project-root');
5
- const prompts = require('../../../lib/prompts');
6
-
7
- class Manifest {
8
- /**
9
- * Create a new manifest
10
- * @param {string} xiaomaDir - Path to xiaoma directory
11
- * @param {Object} data - Manifest data
12
- * @param {Array} installedFiles - List of installed files (no longer used, files tracked in files-manifest.csv)
13
- */
14
- async create(xiaomaDir, data, installedFiles = []) {
15
- const manifestPath = path.join(xiaomaDir, '_config', 'manifest.yaml');
16
- const yaml = require('yaml');
17
-
18
- // Ensure _config directory exists
19
- await fs.ensureDir(path.dirname(manifestPath));
20
-
21
- // Get the XiaoMa version from package.json
22
- const xiaomaVersion = data.version || require(path.join(process.cwd(), 'package.json')).version;
23
-
24
- // Convert module list to new detailed format
25
- const moduleDetails = [];
26
- if (data.modules && Array.isArray(data.modules)) {
27
- for (const moduleName of data.modules) {
28
- // Core and XMC modules use the XiaoMa version
29
- const moduleVersion = moduleName === 'core' || moduleName === 'xmc' ? xiaomaVersion : null;
30
- const now = data.installDate || new Date().toISOString();
31
-
32
- moduleDetails.push({
33
- name: moduleName,
34
- version: moduleVersion,
35
- installDate: now,
36
- lastUpdated: now,
37
- source: moduleName === 'core' || moduleName === 'xmc' ? 'built-in' : 'unknown',
38
- });
39
- }
40
- }
41
-
42
- // Structure the manifest data
43
- const manifestData = {
44
- installation: {
45
- version: xiaomaVersion,
46
- installDate: data.installDate || new Date().toISOString(),
47
- lastUpdated: data.lastUpdated || new Date().toISOString(),
48
- },
49
- modules: moduleDetails,
50
- ides: data.ides || [],
51
- };
52
-
53
- // Write YAML manifest
54
- // Clean the manifest data to remove any non-serializable values
55
- const cleanManifestData = structuredClone(manifestData);
56
-
57
- const yamlContent = yaml.stringify(cleanManifestData, {
58
- indent: 2,
59
- lineWidth: 0,
60
- sortKeys: false,
61
- });
62
-
63
- // Ensure POSIX-compliant final newline
64
- const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
65
- await fs.writeFile(manifestPath, content, 'utf8');
66
- return { success: true, path: manifestPath, filesTracked: 0 };
67
- }
68
-
69
- /**
70
- * Read existing manifest
71
- * @param {string} xiaomaDir - Path to xiaoma directory
72
- * @returns {Object|null} Manifest data or null if not found
73
- */
74
- async read(xiaomaDir) {
75
- const yamlPath = path.join(xiaomaDir, '_config', 'manifest.yaml');
76
- const yaml = require('yaml');
77
-
78
- if (await fs.pathExists(yamlPath)) {
79
- try {
80
- const content = await fs.readFile(yamlPath, 'utf8');
81
- const manifestData = yaml.parse(content);
82
-
83
- // Handle new detailed module format
84
- const modules = manifestData.modules || [];
85
-
86
- // For backward compatibility: if modules is an array of strings (old format),
87
- // the calling code may need the array of names
88
- const moduleNames = modules.map((m) => (typeof m === 'string' ? m : m.name));
89
-
90
- // Check if we have the new detailed format
91
- const hasDetailedModules = modules.length > 0 && typeof modules[0] === 'object';
92
-
93
- // Flatten the structure for compatibility with existing code
94
- return {
95
- version: manifestData.installation?.version,
96
- installDate: manifestData.installation?.installDate,
97
- lastUpdated: manifestData.installation?.lastUpdated,
98
- modules: moduleNames, // Simple array of module names for backward compatibility
99
- modulesDetailed: hasDetailedModules ? modules : null, // New detailed format
100
- customModules: manifestData.customModules || [], // Keep for backward compatibility
101
- ides: manifestData.ides || [],
102
- };
103
- } catch (error) {
104
- await prompts.log.error(`Failed to read YAML manifest: ${error.message}`);
105
- }
106
- }
107
-
108
- return null;
109
- }
110
-
111
- /**
112
- * Update existing manifest
113
- * @param {string} xiaomaDir - Path to xiaoma directory
114
- * @param {Object} updates - Fields to update
115
- * @param {Array} installedFiles - Updated list of installed files
116
- */
117
- async update(xiaomaDir, updates, installedFiles = null) {
118
- const yaml = require('yaml');
119
- const manifest = (await this._readRaw(xiaomaDir)) || {
120
- installation: {},
121
- modules: [],
122
- ides: [],
123
- };
124
-
125
- // Handle module updates
126
- if (updates.modules) {
127
- // If modules is being updated, we need to preserve detailed module info
128
- const existingDetailed = manifest.modules || [];
129
- const incomingNames = updates.modules;
130
-
131
- // Build updated modules array
132
- const updatedModules = [];
133
- for (const name of incomingNames) {
134
- const existing = existingDetailed.find((m) => m.name === name);
135
- if (existing) {
136
- // Preserve existing details, update lastUpdated if this module is being updated
137
- updatedModules.push({
138
- ...existing,
139
- lastUpdated: new Date().toISOString(),
140
- });
141
- } else {
142
- // New module - add with minimal details
143
- updatedModules.push({
144
- name,
145
- version: null,
146
- installDate: new Date().toISOString(),
147
- lastUpdated: new Date().toISOString(),
148
- source: 'unknown',
149
- });
150
- }
151
- }
152
-
153
- manifest.modules = updatedModules;
154
- }
155
-
156
- // Merge other updates
157
- if (updates.version) {
158
- manifest.installation.version = updates.version;
159
- }
160
- if (updates.installDate) {
161
- manifest.installation.installDate = updates.installDate;
162
- }
163
- manifest.installation.lastUpdated = new Date().toISOString();
164
-
165
- if (updates.ides) {
166
- manifest.ides = updates.ides;
167
- }
168
-
169
- // Handle per-module version updates
170
- if (updates.moduleVersions) {
171
- for (const [moduleName, versionInfo] of Object.entries(updates.moduleVersions)) {
172
- const moduleIndex = manifest.modules.findIndex((m) => m.name === moduleName);
173
- if (moduleIndex !== -1) {
174
- manifest.modules[moduleIndex] = {
175
- ...manifest.modules[moduleIndex],
176
- ...versionInfo,
177
- lastUpdated: new Date().toISOString(),
178
- };
179
- }
180
- }
181
- }
182
-
183
- // Handle adding a new module with version info
184
- if (updates.addModule) {
185
- const { name, version, source, npmPackage, repoUrl } = updates.addModule;
186
- const existing = manifest.modules.find((m) => m.name === name);
187
- if (!existing) {
188
- manifest.modules.push({
189
- name,
190
- version: version || null,
191
- installDate: new Date().toISOString(),
192
- lastUpdated: new Date().toISOString(),
193
- source: source || 'external',
194
- npmPackage: npmPackage || null,
195
- repoUrl: repoUrl || null,
196
- });
197
- }
198
- }
199
-
200
- const manifestPath = path.join(xiaomaDir, '_config', 'manifest.yaml');
201
- await fs.ensureDir(path.dirname(manifestPath));
202
-
203
- // Clean the manifest data to remove any non-serializable values
204
- const cleanManifestData = structuredClone(manifest);
205
-
206
- const yamlContent = yaml.stringify(cleanManifestData, {
207
- indent: 2,
208
- lineWidth: 0,
209
- sortKeys: false,
210
- });
211
-
212
- // Ensure POSIX-compliant final newline
213
- const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
214
- await fs.writeFile(manifestPath, content, 'utf8');
215
-
216
- // Return the flattened format for compatibility
217
- return this._flattenManifest(manifest);
218
- }
219
-
220
- /**
221
- * Read raw manifest data without flattening
222
- * @param {string} xiaomaDir - Path to xiaoma directory
223
- * @returns {Object|null} Raw manifest data or null if not found
224
- */
225
- async _readRaw(xiaomaDir) {
226
- const yamlPath = path.join(xiaomaDir, '_config', 'manifest.yaml');
227
- const yaml = require('yaml');
228
-
229
- if (await fs.pathExists(yamlPath)) {
230
- try {
231
- const content = await fs.readFile(yamlPath, 'utf8');
232
- return yaml.parse(content);
233
- } catch (error) {
234
- await prompts.log.error(`Failed to read YAML manifest: ${error.message}`);
235
- }
236
- }
237
-
238
- return null;
239
- }
240
-
241
- /**
242
- * Flatten manifest for backward compatibility
243
- * @param {Object} manifest - Raw manifest data
244
- * @returns {Object} Flattened manifest
245
- */
246
- _flattenManifest(manifest) {
247
- const modules = manifest.modules || [];
248
- const moduleNames = modules.map((m) => (typeof m === 'string' ? m : m.name));
249
- const hasDetailedModules = modules.length > 0 && typeof modules[0] === 'object';
250
-
251
- return {
252
- version: manifest.installation?.version,
253
- installDate: manifest.installation?.installDate,
254
- lastUpdated: manifest.installation?.lastUpdated,
255
- modules: moduleNames,
256
- modulesDetailed: hasDetailedModules ? modules : null,
257
- customModules: manifest.customModules || [],
258
- ides: manifest.ides || [],
259
- };
260
- }
261
-
262
- /**
263
- * Add a module to the manifest with optional version info
264
- * If module already exists, update its version info
265
- * @param {string} xiaomaDir - Path to xiaoma directory
266
- * @param {string} moduleName - Module name to add
267
- * @param {Object} options - Optional version info
268
- */
269
- async addModule(xiaomaDir, moduleName, options = {}) {
270
- let manifest = await this._readRaw(xiaomaDir);
271
- if (!manifest) {
272
- // Bootstrap a minimal manifest if it doesn't exist yet
273
- // (e.g., skill-only modules with no agents to compile)
274
- manifest = { modules: [] };
275
- }
276
-
277
- if (!manifest.modules) {
278
- manifest.modules = [];
279
- }
280
-
281
- const existingIndex = manifest.modules.findIndex((m) => m.name === moduleName);
282
-
283
- if (existingIndex === -1) {
284
- // Module doesn't exist, add it
285
- manifest.modules.push({
286
- name: moduleName,
287
- version: options.version || null,
288
- installDate: new Date().toISOString(),
289
- lastUpdated: new Date().toISOString(),
290
- source: options.source || 'unknown',
291
- npmPackage: options.npmPackage || null,
292
- repoUrl: options.repoUrl || null,
293
- });
294
- } else {
295
- // Module exists, update its version info
296
- const existing = manifest.modules[existingIndex];
297
- manifest.modules[existingIndex] = {
298
- ...existing,
299
- version: options.version === undefined ? existing.version : options.version,
300
- source: options.source || existing.source,
301
- npmPackage: options.npmPackage === undefined ? existing.npmPackage : options.npmPackage,
302
- repoUrl: options.repoUrl === undefined ? existing.repoUrl : options.repoUrl,
303
- lastUpdated: new Date().toISOString(),
304
- };
305
- }
306
-
307
- await this._writeRaw(xiaomaDir, manifest);
308
- }
309
-
310
- /**
311
- * Remove a module from the manifest
312
- * @param {string} xiaomaDir - Path to xiaoma directory
313
- * @param {string} moduleName - Module name to remove
314
- */
315
- async removeModule(xiaomaDir, moduleName) {
316
- const manifest = await this._readRaw(xiaomaDir);
317
- if (!manifest || !manifest.modules) {
318
- return;
319
- }
320
-
321
- const index = manifest.modules.findIndex((m) => m.name === moduleName);
322
- if (index !== -1) {
323
- manifest.modules.splice(index, 1);
324
- await this._writeRaw(xiaomaDir, manifest);
325
- }
326
- }
327
-
328
- /**
329
- * Update a single module's version info
330
- * @param {string} xiaomaDir - Path to xiaoma directory
331
- * @param {string} moduleName - Module name
332
- * @param {Object} versionInfo - Version info to update
333
- */
334
- async updateModuleVersion(xiaomaDir, moduleName, versionInfo) {
335
- const manifest = await this._readRaw(xiaomaDir);
336
- if (!manifest || !manifest.modules) {
337
- return;
338
- }
339
-
340
- const index = manifest.modules.findIndex((m) => m.name === moduleName);
341
- if (index !== -1) {
342
- manifest.modules[index] = {
343
- ...manifest.modules[index],
344
- ...versionInfo,
345
- lastUpdated: new Date().toISOString(),
346
- };
347
- await this._writeRaw(xiaomaDir, manifest);
348
- }
349
- }
350
-
351
- /**
352
- * Get version info for a specific module
353
- * @param {string} xiaomaDir - Path to xiaoma directory
354
- * @param {string} moduleName - Module name
355
- * @returns {Object|null} Module version info or null
356
- */
357
- async getModuleVersion(xiaomaDir, moduleName) {
358
- const manifest = await this._readRaw(xiaomaDir);
359
- if (!manifest || !manifest.modules) {
360
- return null;
361
- }
362
-
363
- return manifest.modules.find((m) => m.name === moduleName) || null;
364
- }
365
-
366
- /**
367
- * Get all modules with their version info
368
- * @param {string} xiaomaDir - Path to xiaoma directory
369
- * @returns {Array} Array of module info objects
370
- */
371
- async getAllModuleVersions(xiaomaDir) {
372
- const manifest = await this._readRaw(xiaomaDir);
373
- if (!manifest || !manifest.modules) {
374
- return [];
375
- }
376
-
377
- return manifest.modules;
378
- }
379
-
380
- /**
381
- * Write raw manifest data to file
382
- * @param {string} xiaomaDir - Path to xiaoma directory
383
- * @param {Object} manifestData - Raw manifest data to write
384
- */
385
- async _writeRaw(xiaomaDir, manifestData) {
386
- const yaml = require('yaml');
387
- const manifestPath = path.join(xiaomaDir, '_config', 'manifest.yaml');
388
-
389
- await fs.ensureDir(path.dirname(manifestPath));
390
-
391
- const cleanManifestData = structuredClone(manifestData);
392
-
393
- const yamlContent = yaml.stringify(cleanManifestData, {
394
- indent: 2,
395
- lineWidth: 0,
396
- sortKeys: false,
397
- });
398
-
399
- const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
400
- await fs.writeFile(manifestPath, content, 'utf8');
401
- }
402
-
403
- /**
404
- * Add an IDE configuration to the manifest
405
- * @param {string} xiaomaDir - Path to xiaoma directory
406
- * @param {string} ideName - IDE name to add
407
- */
408
- async addIde(xiaomaDir, ideName) {
409
- const manifest = await this.read(xiaomaDir);
410
- if (!manifest) {
411
- throw new Error('No manifest found');
412
- }
413
-
414
- if (!manifest.ides) {
415
- manifest.ides = [];
416
- }
417
-
418
- if (!manifest.ides.includes(ideName)) {
419
- manifest.ides.push(ideName);
420
- await this.update(xiaomaDir, { ides: manifest.ides });
421
- }
422
- }
423
-
424
- /**
425
- * Calculate SHA256 hash of a file
426
- * @param {string} filePath - Path to file
427
- * @returns {string} SHA256 hash
428
- */
429
- async calculateFileHash(filePath) {
430
- try {
431
- const content = await fs.readFile(filePath);
432
- return crypto.createHash('sha256').update(content).digest('hex');
433
- } catch {
434
- return null;
435
- }
436
- }
437
-
438
- /**
439
- * Parse installed files to extract metadata
440
- * @param {Array} installedFiles - List of installed file paths
441
- * @param {string} xiaomaDir - Path to xiaoma directory for relative paths
442
- * @returns {Array} Array of file metadata objects
443
- */
444
- async parseInstalledFiles(installedFiles, xiaomaDir) {
445
- const fileMetadata = [];
446
-
447
- for (const filePath of installedFiles) {
448
- const fileExt = path.extname(filePath).toLowerCase();
449
- // Make path relative to parent of xiaoma directory, starting with 'xiaoma/'
450
- const relativePath = 'xiaoma' + filePath.replace(xiaomaDir, '').replaceAll('\\', '/');
451
-
452
- // Calculate file hash
453
- const hash = await this.calculateFileHash(filePath);
454
-
455
- // Handle markdown files - extract XML metadata if present
456
- if (fileExt === '.md') {
457
- try {
458
- if (await fs.pathExists(filePath)) {
459
- const content = await fs.readFile(filePath, 'utf8');
460
- const metadata = this.extractXmlNodeAttributes(content, filePath, relativePath);
461
-
462
- if (metadata) {
463
- // Has XML metadata
464
- metadata.hash = hash;
465
- fileMetadata.push(metadata);
466
- } else {
467
- // No XML metadata - still track the file
468
- fileMetadata.push({
469
- file: relativePath,
470
- type: 'md',
471
- name: path.basename(filePath, fileExt),
472
- title: null,
473
- hash: hash,
474
- });
475
- }
476
- }
477
- } catch (error) {
478
- await prompts.log.warn(`Could not parse ${filePath}: ${error.message}`);
479
- }
480
- }
481
- // Handle other file types (CSV, JSON, YAML, etc.)
482
- else {
483
- fileMetadata.push({
484
- file: relativePath,
485
- type: fileExt.slice(1), // Remove the dot
486
- name: path.basename(filePath, fileExt),
487
- title: null,
488
- hash: hash,
489
- });
490
- }
491
- }
492
-
493
- return fileMetadata;
494
- }
495
-
496
- /**
497
- * Extract XML node attributes from MD file content
498
- * @param {string} content - File content
499
- * @param {string} filePath - File path for context
500
- * @param {string} relativePath - Relative path starting with 'xiaoma/'
501
- * @returns {Object|null} Extracted metadata or null
502
- */
503
- extractXmlNodeAttributes(content, filePath, relativePath) {
504
- // Look for XML blocks in code fences
505
- const xmlBlockMatch = content.match(/```xml\s*([\s\S]*?)```/);
506
- if (!xmlBlockMatch) {
507
- return null;
508
- }
509
-
510
- const xmlContent = xmlBlockMatch[1];
511
-
512
- // Extract root XML node (agent, task, template, etc.)
513
- const rootNodeMatch = xmlContent.match(/<(\w+)([^>]*)>/);
514
- if (!rootNodeMatch) {
515
- return null;
516
- }
517
-
518
- const nodeType = rootNodeMatch[1];
519
- const attributes = rootNodeMatch[2];
520
-
521
- // Extract name and title attributes (id not needed since we have path)
522
- const nameMatch = attributes.match(/name="([^"]*)"/);
523
- const titleMatch = attributes.match(/title="([^"]*)"/);
524
-
525
- return {
526
- file: relativePath,
527
- type: nodeType,
528
- name: nameMatch ? nameMatch[1] : null,
529
- title: titleMatch ? titleMatch[1] : null,
530
- };
531
- }
532
-
533
- /**
534
- * Generate CSV manifest content
535
- * @param {Object} data - Manifest data
536
- * @param {Array} fileMetadata - File metadata array
537
- * @param {Object} moduleConfigs - Module configuration data
538
- * @returns {string} CSV content
539
- */
540
- generateManifestCsv(data, fileMetadata, moduleConfigs = {}) {
541
- const timestamp = new Date().toISOString();
542
- let csv = [];
543
-
544
- // Header section
545
- csv.push(
546
- '# XiaoMa Manifest',
547
- `# Generated: ${timestamp}`,
548
- '',
549
- '## Installation Info',
550
- 'Property,Value',
551
- `Version,${data.version}`,
552
- `InstallDate,${data.installDate || timestamp}`,
553
- `LastUpdated,${data.lastUpdated || timestamp}`,
554
- );
555
- if (data.language) {
556
- csv.push(`Language,${data.language}`);
557
- }
558
- csv.push('');
559
-
560
- // Modules section
561
- if (data.modules && data.modules.length > 0) {
562
- csv.push('## Modules', 'Name,Version,ShortTitle');
563
- for (const moduleName of data.modules) {
564
- const config = moduleConfigs[moduleName] || {};
565
- csv.push([moduleName, config.version || '', config['short-title'] || ''].map((v) => this.escapeCsv(v)).join(','));
566
- }
567
- csv.push('');
568
- }
569
-
570
- // IDEs section
571
- if (data.ides && data.ides.length > 0) {
572
- csv.push('## IDEs', 'IDE');
573
- for (const ide of data.ides) {
574
- csv.push(this.escapeCsv(ide));
575
- }
576
- csv.push('');
577
- }
578
-
579
- // Files section - NO LONGER USED
580
- // Files are now tracked in files-manifest.csv by ManifestGenerator
581
-
582
- return csv.join('\n');
583
- }
584
-
585
- /**
586
- * Parse CSV manifest content back to object
587
- * @param {string} csvContent - CSV content to parse
588
- * @returns {Object} Parsed manifest data
589
- */
590
- parseManifestCsv(csvContent) {
591
- const result = {
592
- modules: [],
593
- ides: [],
594
- files: [],
595
- };
596
-
597
- const lines = csvContent.split('\n');
598
- let section = '';
599
-
600
- for (const line_ of lines) {
601
- const line = line_.trim();
602
-
603
- // Skip empty lines and comments
604
- if (!line || line.startsWith('#')) {
605
- // Check for section headers
606
- if (line.startsWith('## ')) {
607
- section = line.slice(3).toLowerCase();
608
- }
609
- continue;
610
- }
611
-
612
- // Parse based on current section
613
- switch (section) {
614
- case 'installation info': {
615
- // Skip header row
616
- if (line === 'Property,Value') continue;
617
-
618
- const [property, ...valueParts] = line.split(',');
619
- const value = this.unescapeCsv(valueParts.join(','));
620
-
621
- switch (property) {
622
- // Path no longer stored in manifest
623
- case 'Version': {
624
- result.version = value;
625
- break;
626
- }
627
- case 'InstallDate': {
628
- result.installDate = value;
629
- break;
630
- }
631
- case 'LastUpdated': {
632
- result.lastUpdated = value;
633
- break;
634
- }
635
- case 'Language': {
636
- result.language = value;
637
- break;
638
- }
639
- }
640
-
641
- break;
642
- }
643
- case 'modules': {
644
- // Skip header row
645
- if (line === 'Name,Version,ShortTitle') continue;
646
-
647
- const parts = this.parseCsvLine(line);
648
- if (parts[0]) {
649
- result.modules.push(parts[0]);
650
- }
651
-
652
- break;
653
- }
654
- case 'ides': {
655
- // Skip header row
656
- if (line === 'IDE') continue;
657
-
658
- result.ides.push(this.unescapeCsv(line));
659
-
660
- break;
661
- }
662
- case 'files': {
663
- // Skip header rows (support both old and new format)
664
- if (line === 'Type,Path,Name,Title' || line === 'Type,Path,Name,Title,Hash') continue;
665
-
666
- const parts = this.parseCsvLine(line);
667
- if (parts.length >= 2) {
668
- result.files.push({
669
- type: parts[0] || '',
670
- file: parts[1] || '',
671
- name: parts[2] || null,
672
- title: parts[3] || null,
673
- hash: parts[4] || null, // Hash column (may not exist in old manifests)
674
- });
675
- }
676
-
677
- break;
678
- }
679
- // No default
680
- }
681
- }
682
-
683
- return result;
684
- }
685
-
686
- /**
687
- * Parse a CSV line handling quotes and commas
688
- * @param {string} line - CSV line to parse
689
- * @returns {Array} Array of values
690
- */
691
- parseCsvLine(line) {
692
- const result = [];
693
- let current = '';
694
- let inQuotes = false;
695
-
696
- for (let i = 0; i < line.length; i++) {
697
- const char = line[i];
698
-
699
- if (char === '"') {
700
- if (inQuotes && line[i + 1] === '"') {
701
- // Escaped quote
702
- current += '"';
703
- i++;
704
- } else {
705
- // Toggle quote state
706
- inQuotes = !inQuotes;
707
- }
708
- } else if (char === ',' && !inQuotes) {
709
- // Field separator
710
- result.push(this.unescapeCsv(current));
711
- current = '';
712
- } else {
713
- current += char;
714
- }
715
- }
716
-
717
- // Add the last field
718
- result.push(this.unescapeCsv(current));
719
-
720
- return result;
721
- }
722
-
723
- /**
724
- * Escape CSV special characters
725
- * @param {string} text - Text to escape
726
- * @returns {string} Escaped text
727
- */
728
- escapeCsv(text) {
729
- if (!text) return '';
730
- const str = String(text);
731
-
732
- // If contains comma, newline, or quote, wrap in quotes and escape quotes
733
- if (str.includes(',') || str.includes('\n') || str.includes('"')) {
734
- return '"' + str.replaceAll('"', '""') + '"';
735
- }
736
-
737
- return str;
738
- }
739
-
740
- /**
741
- * Unescape CSV field
742
- * @param {string} text - Text to unescape
743
- * @returns {string} Unescaped text
744
- */
745
- unescapeCsv(text) {
746
- if (!text) return '';
747
-
748
- // Remove surrounding quotes if present
749
- if (text.startsWith('"') && text.endsWith('"')) {
750
- text = text.slice(1, -1);
751
- // Unescape doubled quotes
752
- text = text.replaceAll('""', '"');
753
- }
754
-
755
- return text;
756
- }
757
-
758
- /**
759
- * Load module configuration files
760
- * @param {Array} modules - List of module names
761
- * @returns {Object} Module configurations indexed by name
762
- */
763
- async loadModuleConfigs(modules) {
764
- const configs = {};
765
-
766
- for (const moduleName of modules) {
767
- // Handle core module differently - it's in src/core not src/modules/core
768
- const configPath =
769
- moduleName === 'core'
770
- ? path.join(process.cwd(), 'src', 'core', 'config.yaml')
771
- : path.join(process.cwd(), 'src', 'modules', moduleName, 'config.yaml');
772
-
773
- try {
774
- if (await fs.pathExists(configPath)) {
775
- const yaml = require('yaml');
776
- const content = await fs.readFile(configPath, 'utf8');
777
- configs[moduleName] = yaml.parse(content);
778
- }
779
- } catch (error) {
780
- await prompts.log.warn(`Could not load config for module ${moduleName}: ${error.message}`);
781
- }
782
- }
783
-
784
- return configs;
785
- }
786
- /**
787
- * Add a custom module to the manifest with its source path
788
- * @param {string} xiaomaDir - Path to xiaoma directory
789
- * @param {Object} customModule - Custom module info
790
- */
791
- async addCustomModule(xiaomaDir, customModule) {
792
- const manifest = await this.read(xiaomaDir);
793
- if (!manifest) {
794
- throw new Error('No manifest found');
795
- }
796
-
797
- if (!manifest.customModules) {
798
- manifest.customModules = [];
799
- }
800
-
801
- // Check if custom module already exists
802
- const existingIndex = manifest.customModules.findIndex((m) => m.id === customModule.id);
803
- if (existingIndex === -1) {
804
- // Add new entry
805
- manifest.customModules.push(customModule);
806
- } else {
807
- // Update existing entry
808
- manifest.customModules[existingIndex] = customModule;
809
- }
810
-
811
- await this.update(xiaomaDir, { customModules: manifest.customModules });
812
- }
813
-
814
- /**
815
- * Remove a custom module from the manifest
816
- * @param {string} xiaomaDir - Path to xiaoma directory
817
- * @param {string} moduleId - Module ID to remove
818
- */
819
- async removeCustomModule(xiaomaDir, moduleId) {
820
- const manifest = await this.read(xiaomaDir);
821
- if (!manifest || !manifest.customModules) {
822
- return;
823
- }
824
-
825
- const index = manifest.customModules.findIndex((m) => m.id === moduleId);
826
- if (index !== -1) {
827
- manifest.customModules.splice(index, 1);
828
- await this.update(xiaomaDir, { customModules: manifest.customModules });
829
- }
830
- }
831
-
832
- /**
833
- * Get module version info from source
834
- * @param {string} moduleName - Module name/code
835
- * @param {string} xiaomaDir - Path to xiaoma directory
836
- * @param {string} moduleSourcePath - Optional source path for custom modules
837
- * @returns {Object} Version info object with version, source, npmPackage, repoUrl
838
- */
839
- async getModuleVersionInfo(moduleName, xiaomaDir, moduleSourcePath = null) {
840
- const os = require('node:os');
841
- const yaml = require('yaml');
842
-
843
- // Built-in modules use XiaoMa version (only core and xmc are in XiaoMa-CLI repo)
844
- if (['core', 'xmc'].includes(moduleName)) {
845
- const xiaomaVersion = require(path.join(getProjectRoot(), 'package.json')).version;
846
- return {
847
- version: xiaomaVersion,
848
- source: 'built-in',
849
- npmPackage: null,
850
- repoUrl: null,
851
- };
852
- }
853
-
854
- // Check if this is an external official module
855
- const { ExternalModuleManager } = require('../modules/external-manager');
856
- const extMgr = new ExternalModuleManager();
857
- const moduleInfo = await extMgr.getModuleByCode(moduleName);
858
-
859
- if (moduleInfo) {
860
- // External module - try to get version from npm registry first, then fall back to cache
861
- let version = null;
862
-
863
- if (moduleInfo.npmPackage) {
864
- // Fetch version from npm registry
865
- try {
866
- version = await this.fetchNpmVersion(moduleInfo.npmPackage);
867
- } catch {
868
- // npm fetch failed, try cache as fallback
869
- }
870
- }
871
-
872
- // If npm didn't work, try reading from cached repo's package.json
873
- if (!version) {
874
- const cacheDir = path.join(os.homedir(), '.xiaoma', 'cache', 'external-modules', moduleName);
875
- const packageJsonPath = path.join(cacheDir, 'package.json');
876
-
877
- if (await fs.pathExists(packageJsonPath)) {
878
- try {
879
- const pkg = require(packageJsonPath);
880
- version = pkg.version;
881
- } catch (error) {
882
- await prompts.log.warn(`Failed to read package.json for ${moduleName}: ${error.message}`);
883
- }
884
- }
885
- }
886
-
887
- return {
888
- version: version,
889
- source: 'external',
890
- npmPackage: moduleInfo.npmPackage || null,
891
- repoUrl: moduleInfo.url || null,
892
- };
893
- }
894
-
895
- // Custom module - check cache directory
896
- const cacheDir = path.join(xiaomaDir, '_config', 'custom', moduleName);
897
- const moduleYamlPath = path.join(cacheDir, 'module.yaml');
898
-
899
- if (await fs.pathExists(moduleYamlPath)) {
900
- try {
901
- const yamlContent = await fs.readFile(moduleYamlPath, 'utf8');
902
- const moduleConfig = yaml.parse(yamlContent);
903
- return {
904
- version: moduleConfig.version || null,
905
- source: 'custom',
906
- npmPackage: moduleConfig.npmPackage || null,
907
- repoUrl: moduleConfig.repoUrl || null,
908
- };
909
- } catch (error) {
910
- await prompts.log.warn(`Failed to read module.yaml for ${moduleName}: ${error.message}`);
911
- }
912
- }
913
-
914
- // Unknown module
915
- return {
916
- version: null,
917
- source: 'unknown',
918
- npmPackage: null,
919
- repoUrl: null,
920
- };
921
- }
922
-
923
- /**
924
- * Fetch latest version from npm for a package
925
- * @param {string} packageName - npm package name
926
- * @returns {string|null} Latest version or null
927
- */
928
- async fetchNpmVersion(packageName) {
929
- try {
930
- const https = require('node:https');
931
- const { execSync } = require('node:child_process');
932
-
933
- // Try using npm view first (more reliable)
934
- try {
935
- const result = execSync(`npm view ${packageName} version`, {
936
- encoding: 'utf8',
937
- stdio: 'pipe',
938
- timeout: 10_000,
939
- });
940
- return result.trim();
941
- } catch {
942
- // Fallback to npm registry API
943
- return new Promise((resolve, reject) => {
944
- https
945
- .get(`https://registry.npmjs.org/${packageName}`, (res) => {
946
- let data = '';
947
- res.on('data', (chunk) => (data += chunk));
948
- res.on('end', () => {
949
- try {
950
- const pkg = JSON.parse(data);
951
- resolve(pkg['dist-tags']?.latest || pkg.version || null);
952
- } catch {
953
- resolve(null);
954
- }
955
- });
956
- })
957
- .on('error', () => resolve(null));
958
- });
959
- }
960
- } catch {
961
- return null;
962
- }
963
- }
964
-
965
- /**
966
- * Check for available updates for installed modules
967
- * @param {string} xiaomaDir - Path to xiaoma directory
968
- * @returns {Array} Array of update info objects
969
- */
970
- async checkForUpdates(xiaomaDir) {
971
- const modules = await this.getAllModuleVersions(xiaomaDir);
972
- const updates = [];
973
-
974
- for (const module of modules) {
975
- if (!module.npmPackage) {
976
- continue; // Skip modules without npm package (built-in)
977
- }
978
-
979
- const latestVersion = await this.fetchNpmVersion(module.npmPackage);
980
- if (!latestVersion) {
981
- continue;
982
- }
983
-
984
- if (module.version !== latestVersion) {
985
- updates.push({
986
- name: module.name,
987
- installedVersion: module.version,
988
- latestVersion: latestVersion,
989
- npmPackage: module.npmPackage,
990
- updateAvailable: true,
991
- });
992
- }
993
- }
994
-
995
- return updates;
996
- }
997
-
998
- /**
999
- * Compare two semantic versions
1000
- * @param {string} v1 - First version
1001
- * @param {string} v2 - Second version
1002
- * @returns {number} -1 if v1 < v2, 0 if v1 == v2, 1 if v1 > v2
1003
- */
1004
- compareVersions(v1, v2) {
1005
- if (!v1 || !v2) return 0;
1006
-
1007
- const normalize = (v) => {
1008
- // Remove leading 'v' if present
1009
- v = v.replace(/^v/, '');
1010
- // Handle prerelease tags
1011
- const parts = v.split('-');
1012
- const main = parts[0].split('.');
1013
- const prerelease = parts[1];
1014
- return { main, prerelease };
1015
- };
1016
-
1017
- const n1 = normalize(v1);
1018
- const n2 = normalize(v2);
1019
-
1020
- // Compare main version parts
1021
- for (let i = 0; i < 3; i++) {
1022
- const num1 = parseInt(n1.main[i] || '0', 10);
1023
- const num2 = parseInt(n2.main[i] || '0', 10);
1024
- if (num1 !== num2) {
1025
- return num1 < num2 ? -1 : 1;
1026
- }
1027
- }
1028
-
1029
- // If main versions are equal, compare prerelease
1030
- if (n1.prerelease && n2.prerelease) {
1031
- return n1.prerelease < n2.prerelease ? -1 : n1.prerelease > n2.prerelease ? 1 : 0;
1032
- }
1033
- if (n1.prerelease) return -1; // Prerelease is older than stable
1034
- if (n2.prerelease) return 1; // Stable is newer than prerelease
1035
-
1036
- return 0;
1037
- }
1038
- }
1039
-
1040
- module.exports = { Manifest };