@zeyue0329/xiaoma-cli 1.7.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/XiaoMa-Cli.iml +9 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +1 -1
- package/CLAUDE.md +93 -0
- package/README.md +33 -33
- package/TECH-STACK.md +62 -0
- package/package.json +3 -8
- package/pipeline-optimization-report.md +390 -570
- package/run-5-analysis-report.md +436 -0
- package/src/core/module-help.csv +10 -10
- package/src/core/skills/xiaoma-advanced-elicitation/SKILL.md +2 -2
- package/src/core/skills/xiaoma-advanced-elicitation/workflow.md +2 -2
- package/src/core/skills/xiaoma-brainstorming/SKILL.md +1 -1
- package/src/core/skills/xiaoma-brainstorming/steps/step-01-session-setup.md +4 -0
- package/src/core/skills/xiaoma-brainstorming/steps/step-01b-continue.md +3 -1
- package/src/core/skills/xiaoma-brainstorming/steps/step-02a-user-selected.md +5 -1
- package/src/core/skills/xiaoma-brainstorming/steps/step-02b-ai-recommended.md +3 -1
- package/src/core/skills/xiaoma-brainstorming/steps/step-02c-random-selection.md +3 -1
- package/src/core/skills/xiaoma-brainstorming/steps/step-02d-progressive-flow.md +3 -1
- package/src/core/skills/xiaoma-brainstorming/steps/step-03-technique-execution.md +2 -0
- package/src/core/skills/xiaoma-brainstorming/steps/step-04-idea-organization.md +2 -0
- package/src/core/skills/xiaoma-brainstorming/workflow.md +1 -2
- package/src/core/skills/xiaoma-distillator/SKILL.md +1 -1
- package/src/core/skills/xiaoma-distillator/agents/distillate-compressor.md +4 -4
- package/src/core/skills/xiaoma-distillator/resources/distillate-format-reference.md +34 -34
- package/src/core/skills/xiaoma-distillator/xiaoma-skill-manifest.yaml +1 -1
- package/src/core/skills/xiaoma-editorial-review-prose/SKILL.md +1 -1
- package/src/core/skills/xiaoma-editorial-review-structure/SKILL.md +1 -1
- package/src/core/skills/xiaoma-editorial-review-structure/workflow.md +1 -1
- package/src/core/skills/xiaoma-help/SKILL.md +2 -2
- package/src/core/skills/xiaoma-index-docs/SKILL.md +1 -1
- package/src/core/skills/xiaoma-party-mode/SKILL.md +2 -2
- package/src/core/skills/xiaoma-party-mode/steps/step-01-agent-loading.md +3 -3
- package/src/core/skills/xiaoma-party-mode/steps/step-02-discussion-orchestration.md +2 -2
- package/src/core/skills/xiaoma-party-mode/steps/step-03-graceful-exit.md +5 -5
- package/src/core/skills/xiaoma-party-mode/workflow.md +4 -4
- package/src/core/skills/xiaoma-review-adversarial-general/SKILL.md +1 -1
- package/src/core/skills/xiaoma-review-edge-case-hunter/SKILL.md +2 -2
- package/src/core/skills/xiaoma-shard-doc/SKILL.md +1 -1
- package/src/core/tasks/xiaoma-create-prd/SKILL.md +1 -1
- package/src/core/tasks/xiaoma-create-prd/data/prd-purpose.md +4 -4
- package/src/core/tasks/xiaoma-create-prd/data/project-types.csv +1 -1
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-11-polish.md +1 -1
- package/src/xmc/agents/analyst.agent.yaml +3 -3
- package/src/xmc/agents/qa.agent.yaml +1 -1
- package/src/xmc/agents/sm.agent.yaml +3 -3
- package/src/xmc/agents/tech-writer/tech-writer-sidecar/documentation-standards.md +2 -2
- package/src/xmc/agents/tech-writer/xiaoma-skill-manifest.yaml +1 -1
- package/src/xmc/agents/xiaoma-skill-manifest.yaml +8 -8
- package/src/xmc/module-help.csv +31 -31
- package/src/xmc/module.yaml +2 -2
- package/src/xmc/teams/default-party.csv +14 -14
- package/src/xmc/teams/team-fullstack.yaml +1 -1
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-04-create-prd.md +2 -1
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-05-validate-prd.md +56 -2
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-06-create-epics.md +14 -5
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-08-finalize.md +3 -3
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/workflow.md +1 -0
- package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/SKILL.md +1 -1
- package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/SKILL.md +1 -1
- package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/SKILL.md +1 -1
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/SKILL.md +1 -1
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-02-vision.md +1 -0
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-03-users.md +1 -0
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-04-metrics.md +1 -0
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-05-scope.md +1 -0
- package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/SKILL.md +1 -1
- package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/prompts/contextual-discovery.md +7 -7
- package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/prompts/draft-and-review.md +5 -5
- package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/prompts/finalize.md +1 -1
- package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/prompts/guided-elicitation.md +2 -2
- package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/xiaoma-manifest.json +2 -2
- package/src/xmc/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +4 -4
- package/src/xmc/workflows/2-plan-workflows/create-prd/data/project-types.csv +1 -1
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +1 -1
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +16 -16
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +9 -9
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +1 -1
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +8 -8
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +1 -1
- package/src/xmc/workflows/2-plan-workflows/create-prd/workflow-validate-prd.md +2 -2
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/SKILL.md +1 -1
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/SKILL.md +1 -1
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-01-discovery.md +13 -17
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-01b-legacy-conversion.md +9 -13
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-02-review.md +4 -8
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-03-edit.md +9 -13
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-04-complete.md +2 -5
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/workflow.md +1 -2
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/SKILL.md +1 -1
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/prd-purpose.md +4 -4
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/project-types.csv +1 -1
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-01-discovery.md +1 -4
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-02-format-detection.md +16 -19
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-02b-parity-check.md +8 -11
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-03-density-validation.md +1 -4
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +0 -3
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-05-measurability-validation.md +0 -3
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-06-traceability-validation.md +0 -3
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +0 -3
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +0 -3
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-09-project-type-validation.md +0 -3
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-10-smart-validation.md +0 -3
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +8 -11
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-12-completeness-validation.md +0 -3
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-13-report-complete.md +2 -5
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/workflow.md +2 -2
- package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/SKILL.md +1 -1
- package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/SKILL.md +1 -1
- package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/SKILL.md +1 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-01-init-and-validate.md +12 -4
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-02-create-story.md +13 -2
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-03-validate-story.md +3 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-04-develop-story.md +14 -7
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-05-code-review.md +7 -8
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-06-test-story.md +111 -2
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-07-fix-and-retest.md +123 -7
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-08-complete-story.md +2 -2
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-09-cycle-check.md +14 -2
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/workflow.md +12 -9
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/SKILL.md +2 -2
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-01-gather-context.md +61 -0
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-02-review.md +41 -0
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-03-triage.md +50 -0
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-04-present.md +38 -0
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/workflow.md +33 -240
- package/src/xmc/workflows/4-implementation/xiaoma-correct-course/SKILL.md +1 -1
- package/src/xmc/workflows/4-implementation/xiaoma-correct-course/workflow.md +1 -1
- package/src/xmc/workflows/4-implementation/xiaoma-create-story/SKILL.md +1 -1
- package/src/xmc/workflows/4-implementation/xiaoma-create-story/workflow.md +3 -3
- package/src/xmc/workflows/4-implementation/xiaoma-dev-story/SKILL.md +1 -1
- package/src/xmc/workflows/4-implementation/xiaoma-dev-story/workflow.md +1 -1
- package/src/xmc/workflows/4-implementation/xiaoma-retrospective/SKILL.md +1 -1
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/SKILL.md +1 -1
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/workflow.md +2 -2
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/SKILL.md +1 -1
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/workflow.md +5 -5
- package/src/xmc/workflows/xiaoma-document-project/SKILL.md +1 -1
- package/src/xmc/workflows/xiaoma-document-project/templates/index-template.md +1 -1
- package/src/xmc/workflows/xiaoma-document-project/templates/project-overview-template.md +1 -1
- package/src/xmc/workflows/xiaoma-document-project/templates/source-tree-template.md +1 -1
- package/src/xmc/workflows/xiaoma-generate-project-context/SKILL.md +1 -1
- package/src/xmc/workflows/xiaoma-generate-project-context/steps/step-01-discover.md +3 -1
- package/src/xmc/workflows/xiaoma-generate-project-context/steps/step-02-generate.md +2 -0
- package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/SKILL.md +1 -1
- package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/checklist.md +1 -1
- package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/workflow.md +2 -2
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/SKILL.md +1 -1
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-01-mode-detection.md +2 -2
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev-new-preview/SKILL.md +1 -1
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-spec/SKILL.md +1 -1
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-spec/workflow.md +1 -0
- package/tools/cli/README.md +4 -4
- package/tools/cli/commands/install.js +1 -1
- package/tools/cli/commands/status.js +4 -4
- package/tools/cli/commands/uninstall.js +9 -9
- package/tools/cli/external-official-modules.yaml +2 -54
- package/tools/cli/installers/install-messages.yaml +5 -5
- package/tools/cli/installers/lib/core/config-collector.js +2 -2
- package/tools/cli/installers/lib/core/dependency-resolver.js +2 -2
- package/tools/cli/installers/lib/core/detector.js +9 -9
- package/tools/cli/installers/lib/core/ide-config-manager.js +7 -7
- package/tools/cli/installers/lib/core/installer.js +51 -51
- package/tools/cli/installers/lib/core/manifest-generator.js +6 -6
- package/tools/cli/installers/lib/core/manifest.js +3 -3
- package/tools/cli/installers/lib/custom/handler.js +5 -5
- package/tools/cli/installers/lib/ide/_base-ide.js +15 -15
- package/tools/cli/installers/lib/ide/_config-driven.js +31 -31
- package/tools/cli/installers/lib/ide/manager.js +8 -8
- package/tools/cli/installers/lib/ide/platform-codes.yaml +3 -3
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +3 -3
- package/tools/cli/installers/lib/ide/shared/path-utils.js +3 -3
- package/tools/cli/installers/lib/ide/shared/skill-manifest.js +2 -2
- package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +13 -13
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +2 -2
- package/tools/cli/installers/lib/ide/shared/xiaoma-artifacts.js +1 -1
- package/tools/cli/installers/lib/ide/templates/agent-command-template.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/antigravity.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/default-agent.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/default-task.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/default-tool.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/gemini-task.toml +2 -2
- package/tools/cli/installers/lib/ide/templates/combined/gemini-tool.toml +2 -2
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/kiro-agent.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/kiro-task.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/kiro-tool.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/opencode-agent.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/opencode-task.md +3 -3
- package/tools/cli/installers/lib/ide/templates/combined/opencode-tool.md +3 -3
- package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.md +3 -3
- package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow.md +3 -3
- package/tools/cli/installers/lib/ide/templates/combined/rovodev.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/trae.md +1 -1
- package/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md +1 -1
- package/tools/cli/installers/lib/modules/manager.js +22 -22
- package/tools/cli/lib/agent/compiler.js +3 -3
- package/tools/cli/lib/agent/installer.js +9 -9
- package/tools/cli/lib/agent/template-engine.js +1 -1
- package/tools/cli/lib/agent-party-generator.js +3 -3
- package/tools/cli/lib/cli-utils.js +8 -8
- package/tools/cli/lib/project-root.js +5 -5
- package/tools/cli/lib/prompts.js +1 -1
- package/tools/cli/lib/ui.js +27 -27
- package/tools/cli/lib/xml-handler.js +1 -1
- package/tools/cli/lib/yaml-format.js +1 -1
- package/tools/cli/lib/yaml-xml-builder.js +2 -2
- package/tools/cli/xiaoma-cli.js +3 -3
- package/tools/platform-codes.yaml +2 -2
- package/tools/schema/agent.js +1 -1
- package/tools/xiaoma-npx-wrapper.js +1 -1
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_1_/351/235/242/345/220/221AI/346/231/272/350/203/275/344/275/223/345/210/266/345/223/201/347/232/204/345/244/232/351/200/232/351/201/223/344/276/235/350/265/226_20260318.docx +0 -0
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_2_/345/237/272/344/272/216/351/205/215/347/275/256/351/251/261/345/212/250/347/232/204/350/267/250/345/271/263/345/217/260IDE/346/231/272/350/203/275_20260318.docx +0 -0
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_3_AI/346/231/272/350/203/275/344/275/223/345/243/260/346/230/216/345/274/217/345/256/232/344/271/211/347/232/204/347/274/226/350/257/221/346/265/201/346/260/264_20260318.docx +0 -0
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_4_/345/237/272/344/272/216/345/223/210/345/270/214/346/214/207/347/272/271/347/232/204/346/231/272/350/203/275/344/275/223/351/231/204/345/261/236/350/265/204/346/272/220/351/200/211_20260318.docx +0 -0
- package//344/270/223/345/210/251/344/272/244/345/272/225/344/271/246_5_AI/346/231/272/350/203/275/344/275/223/350/247/246/345/217/221/346/214/207/344/273/244/347/232/204/345/244/215/345/220/210/346/240/274/345/274/217/346/240/241_20260318.docx +0 -0
- package/.idea/codeStyles/Project.xml +0 -60
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/jsLibraryMappings.xml +0 -6
- package/.idea/workspace.xml +0 -146
- package/AGENTS.md +0 -9
- package/README_CN.md +0 -121
- package/XIAOMA-CLI-GUIDE.md +0 -512
- package/src/core/skills/xiaoma-advanced-elicitation/SKILL.md.bak +0 -6
- package/src/core/skills/xiaoma-brainstorming/SKILL.md.bak +0 -6
- package/src/core/skills/xiaoma-distillator/SKILL.md.bak +0 -178
- package/src/core/skills/xiaoma-editorial-review-prose/SKILL.md.bak +0 -6
- package/src/core/skills/xiaoma-editorial-review-structure/SKILL.md.bak +0 -6
- package/src/core/skills/xiaoma-index-docs/SKILL.md.bak +0 -6
- package/src/core/skills/xiaoma-party-mode/SKILL.md.bak +0 -6
- package/src/core/skills/xiaoma-review-adversarial-general/SKILL.md.bak +0 -6
- package/src/core/skills/xiaoma-review-edge-case-hunter/SKILL.md.bak +0 -6
- package/src/core/skills/xiaoma-shard-doc/SKILL.md.bak +0 -6
- package/src/core/tasks/xiaoma-create-prd/SKILL.md.bak +0 -6
- package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/SKILL.md.bak +0 -6
- package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/SKILL.md.bak +0 -6
- package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/SKILL.md.bak +0 -6
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/SKILL.md.bak +0 -6
- package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/SKILL.md.bak +0 -88
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/SKILL.md.bak +0 -6
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/SKILL.md.bak +0 -6
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/SKILL.md.bak +0 -6
- package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/SKILL.md.bak +0 -6
- package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/SKILL.md.bak +0 -6
- package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/SKILL.md.bak +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/SKILL.md.bak +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-correct-course/SKILL.md.bak +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-create-story/SKILL.md.bak +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-dev-story/SKILL.md.bak +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-retrospective/SKILL.md.bak +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/SKILL.md.bak +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/SKILL.md.bak +0 -6
- package/src/xmc/workflows/xiaoma-document-project/SKILL.md.bak +0 -6
- package/src/xmc/workflows/xiaoma-generate-project-context/SKILL.md.bak +0 -6
- package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/SKILL.md.bak +0 -6
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/SKILL.md.bak +0 -6
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev-new-preview/SKILL.md.bak +0 -6
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-spec/SKILL.md.bak +0 -6
- package/tools/format-workflow-md.js +0 -263
- package/tools/migrate-custom-module-paths.js +0 -124
- package/tools/skill-validator.md +0 -322
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
description: '{{description}}'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Execute the
|
|
5
|
+
Execute the XiaoMa '{{name}}' tool.
|
|
6
6
|
|
|
7
7
|
TOOL INSTRUCTIONS:
|
|
8
8
|
|
|
9
|
-
1. LOAD the tool file from {project-root}/{{
|
|
9
|
+
1. LOAD the tool file from {project-root}/{{xiaomaFolderName}}/{{path}}
|
|
10
10
|
2. READ its entire contents
|
|
11
11
|
3. FOLLOW every instruction precisely as specified
|
|
12
12
|
|
|
13
|
-
TOOL FILE: {project-root}/{{
|
|
13
|
+
TOOL FILE: {project-root}/{{xiaomaFolderName}}/{{path}}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
description: '{{description}}'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Execute the
|
|
5
|
+
Execute the XiaoMa '{{name}}' workflow.
|
|
6
6
|
|
|
7
7
|
CRITICAL: You must load and follow the workflow definition exactly.
|
|
8
8
|
|
|
9
9
|
WORKFLOW INSTRUCTIONS:
|
|
10
10
|
|
|
11
|
-
1. LOAD the workflow file from {project-root}/{{
|
|
11
|
+
1. LOAD the workflow file from {project-root}/{{xiaomaFolderName}}/{{path}}
|
|
12
12
|
2. READ its entire contents
|
|
13
13
|
3. FOLLOW every step precisely as specified
|
|
14
14
|
4. DO NOT skip or modify any steps
|
|
15
15
|
|
|
16
|
-
WORKFLOW FILE: {project-root}/{{
|
|
16
|
+
WORKFLOW FILE: {project-root}/{{xiaomaFolderName}}/{{path}}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
description: '{{description}}'
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Execute the
|
|
5
|
+
Execute the XiaoMa '{{name}}' workflow.
|
|
6
6
|
|
|
7
7
|
CRITICAL: You must load and follow the workflow definition exactly.
|
|
8
8
|
|
|
9
9
|
WORKFLOW INSTRUCTIONS:
|
|
10
10
|
|
|
11
|
-
1. LOAD the workflow file from {project-root}/{{
|
|
11
|
+
1. LOAD the workflow file from {project-root}/{{xiaomaFolderName}}/{{path}}
|
|
12
12
|
2. READ its entire contents
|
|
13
13
|
3. FOLLOW every step precisely as specified
|
|
14
14
|
4. DO NOT skip or modify any steps
|
|
15
15
|
|
|
16
|
-
WORKFLOW FILE: {project-root}/{{
|
|
16
|
+
WORKFLOW FILE: {project-root}/{{xiaomaFolderName}}/{{path}}
|
|
@@ -6,10 +6,10 @@ const { XmlHandler } = require('../../../lib/xml-handler');
|
|
|
6
6
|
const { getProjectRoot, getSourcePath, getModulePath } = require('../../../lib/project-root');
|
|
7
7
|
const { filterCustomizationData } = require('../../../lib/agent/compiler');
|
|
8
8
|
const { ExternalModuleManager } = require('./external-manager');
|
|
9
|
-
const {
|
|
9
|
+
const { XiaoMa_FOLDER_NAME } = require('../ide/shared/path-utils');
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Manages the installation, updating, and removal of
|
|
12
|
+
* Manages the installation, updating, and removal of XiaoMa modules.
|
|
13
13
|
* Handles module discovery, dependency resolution, configuration processing,
|
|
14
14
|
* and agent file management including XML activation block injection.
|
|
15
15
|
*
|
|
@@ -27,7 +27,7 @@ const { BMAD_FOLDER_NAME } = require('../ide/shared/path-utils');
|
|
|
27
27
|
class ModuleManager {
|
|
28
28
|
constructor(options = {}) {
|
|
29
29
|
this.xmlHandler = new XmlHandler();
|
|
30
|
-
this.xiaomaFolderName =
|
|
30
|
+
this.xiaomaFolderName = XiaoMa_FOLDER_NAME; // Default, can be overridden
|
|
31
31
|
this.customModulePaths = new Map(); // Initialize custom module paths
|
|
32
32
|
this.externalModuleManager = new ExternalModuleManager(); // For external official modules
|
|
33
33
|
}
|
|
@@ -36,7 +36,7 @@ class ModuleManager {
|
|
|
36
36
|
* Set the xiaoma folder name for placeholder replacement
|
|
37
37
|
* @param {string} xiaomaFolderName - The xiaoma folder name
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
setXiaomaFolderName(xiaomaFolderName) {
|
|
40
40
|
this.xiaomaFolderName = xiaomaFolderName;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -94,7 +94,7 @@ class ModuleManager {
|
|
|
94
94
|
* @param {string} agentName - Name of the agent (for naming)
|
|
95
95
|
* @param {string} xiaomaMemoryPath - This should ALWAYS be _xiaoma/_memory
|
|
96
96
|
* @param {boolean} isUpdate - Whether this is an update (default: false)
|
|
97
|
-
* @param {string} xiaomaDir -
|
|
97
|
+
* @param {string} xiaomaDir - XiaoMa installation directory
|
|
98
98
|
* @param {Object} installer - Installer instance for file tracking
|
|
99
99
|
*/
|
|
100
100
|
async copySidecarToMemory(sourceSidecarPath, agentName, xiaomaMemoryPath, isUpdate = false, xiaomaDir = null, installer = null) {
|
|
@@ -133,7 +133,7 @@ class ModuleManager {
|
|
|
133
133
|
.digest('hex');
|
|
134
134
|
|
|
135
135
|
// Path relative to xiaoma directory
|
|
136
|
-
const
|
|
136
|
+
const relativeToXiaoma = path.join('_memory', `${agentName}-sidecar`, file);
|
|
137
137
|
|
|
138
138
|
if (isUpdate && (await fs.pathExists(targetFilePath))) {
|
|
139
139
|
// Calculate current target file hash
|
|
@@ -143,34 +143,34 @@ class ModuleManager {
|
|
|
143
143
|
.digest('hex');
|
|
144
144
|
|
|
145
145
|
// Get the last known hash from files-manifest
|
|
146
|
-
const lastKnownHash = existingSidecarFiles.get(
|
|
146
|
+
const lastKnownHash = existingSidecarFiles.get(relativeToXiaoma);
|
|
147
147
|
|
|
148
148
|
if (lastKnownHash) {
|
|
149
149
|
// We have a record of this file
|
|
150
150
|
if (currentTargetHash === lastKnownHash) {
|
|
151
151
|
// File hasn't been modified by user, safe to update
|
|
152
152
|
await this.copyFileWithPlaceholderReplacement(sourceFilePath, targetFilePath, true);
|
|
153
|
-
if (process.env.
|
|
154
|
-
await prompts.log.message(` Updated sidecar file: ${
|
|
153
|
+
if (process.env.XiaoMa_VERBOSE_INSTALL === 'true') {
|
|
154
|
+
await prompts.log.message(` Updated sidecar file: ${relativeToXiaoma}`);
|
|
155
155
|
}
|
|
156
156
|
} else {
|
|
157
157
|
// User has modified the file, preserve it
|
|
158
|
-
if (process.env.
|
|
159
|
-
await prompts.log.message(` Preserving user-modified file: ${
|
|
158
|
+
if (process.env.XiaoMa_VERBOSE_INSTALL === 'true') {
|
|
159
|
+
await prompts.log.message(` Preserving user-modified file: ${relativeToXiaoma}`);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
} else {
|
|
163
163
|
// First time seeing this file in manifest, copy it
|
|
164
164
|
await this.copyFileWithPlaceholderReplacement(sourceFilePath, targetFilePath, true);
|
|
165
|
-
if (process.env.
|
|
166
|
-
await prompts.log.message(` Added new sidecar file: ${
|
|
165
|
+
if (process.env.XiaoMa_VERBOSE_INSTALL === 'true') {
|
|
166
|
+
await prompts.log.message(` Added new sidecar file: ${relativeToXiaoma}`);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
} else {
|
|
170
170
|
// New installation
|
|
171
171
|
await this.copyFileWithPlaceholderReplacement(sourceFilePath, targetFilePath, true);
|
|
172
|
-
if (process.env.
|
|
173
|
-
await prompts.log.message(` Copied sidecar file: ${
|
|
172
|
+
if (process.env.XiaoMa_VERBOSE_INSTALL === 'true') {
|
|
173
|
+
await prompts.log.message(` Copied sidecar file: ${relativeToXiaoma}`);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
@@ -259,7 +259,7 @@ class ModuleManager {
|
|
|
259
259
|
.split('-')
|
|
260
260
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
261
261
|
.join(' '),
|
|
262
|
-
description: '
|
|
262
|
+
description: 'XiaoMa Module',
|
|
263
263
|
version: '5.0.0',
|
|
264
264
|
source: sourceDescription,
|
|
265
265
|
isCustom: configPath === rootCustomConfigPath || isCustomSource,
|
|
@@ -777,7 +777,7 @@ class ModuleManager {
|
|
|
777
777
|
* @param {string} sourcePath - Source module path
|
|
778
778
|
* @param {string} targetPath - Target module path
|
|
779
779
|
* @param {string} moduleName - Module name
|
|
780
|
-
* @param {string} xiaomaDir -
|
|
780
|
+
* @param {string} xiaomaDir - XiaoMa installation directory
|
|
781
781
|
* @param {Object} installer - Installer instance for file tracking
|
|
782
782
|
*/
|
|
783
783
|
async compileModuleAgents(sourcePath, targetPath, moduleName, xiaomaDir, installer = null) {
|
|
@@ -818,7 +818,7 @@ class ModuleManager {
|
|
|
818
818
|
if (await fs.pathExists(genericTemplatePath)) {
|
|
819
819
|
await this.copyFileWithPlaceholderReplacement(genericTemplatePath, customizePath);
|
|
820
820
|
// Only show customize creation in verbose mode
|
|
821
|
-
if (process.env.
|
|
821
|
+
if (process.env.XiaoMa_VERBOSE_INSTALL === 'true') {
|
|
822
822
|
await prompts.log.message(` Created customize: ${moduleName}-${agentName}.customize.yaml`);
|
|
823
823
|
}
|
|
824
824
|
|
|
@@ -925,10 +925,10 @@ class ModuleManager {
|
|
|
925
925
|
installer,
|
|
926
926
|
);
|
|
927
927
|
|
|
928
|
-
if (process.env.
|
|
928
|
+
if (process.env.XiaoMa_VERBOSE_INSTALL === 'true' && copiedFiles.length > 0) {
|
|
929
929
|
await prompts.log.message(` Sidecar files processed: ${copiedFiles.length} files`);
|
|
930
930
|
}
|
|
931
|
-
} else if (process.env.
|
|
931
|
+
} else if (process.env.XiaoMa_VERBOSE_INSTALL === 'true') {
|
|
932
932
|
await prompts.log.warn(` Agent marked as having sidecar but ${sidecarDirName} directory not found`);
|
|
933
933
|
}
|
|
934
934
|
}
|
|
@@ -947,7 +947,7 @@ class ModuleManager {
|
|
|
947
947
|
}
|
|
948
948
|
|
|
949
949
|
// Only show compilation details in verbose mode
|
|
950
|
-
if (process.env.
|
|
950
|
+
if (process.env.XiaoMa_VERBOSE_INSTALL === 'true') {
|
|
951
951
|
await prompts.log.message(
|
|
952
952
|
` Compiled agent: ${agentName} -> ${path.relative(targetPath, targetMdPath)}${hasSidecar ? ' (with sidecar)' : ''}`,
|
|
953
953
|
);
|
|
@@ -1084,7 +1084,7 @@ class ModuleManager {
|
|
|
1084
1084
|
const installWorkflowPath = item['workflow-install']; // Where to copy TO
|
|
1085
1085
|
|
|
1086
1086
|
// Parse SOURCE workflow path
|
|
1087
|
-
// Example: {project-root}/_xiaoma/
|
|
1087
|
+
// Example: {project-root}/_xiaoma/xmc/workflows/4-implementation/xiaoma-create-story/workflow.md
|
|
1088
1088
|
const sourceMatch = sourceWorkflowPath.match(/\{project-root\}\/(?:_xiaoma)\/([^/]+)\/workflows\/(.+)/);
|
|
1089
1089
|
if (!sourceMatch) {
|
|
1090
1090
|
await prompts.log.warn(` Could not parse workflow path: ${sourceWorkflowPath}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* XiaoMa Agent Compiler
|
|
3
3
|
* Transforms agent YAML to compiled XML (.md) format
|
|
4
|
-
* Uses the existing
|
|
4
|
+
* Uses the existing XiaoMa builder infrastructure for proper formatting
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
const yaml = require('yaml');
|
|
@@ -20,7 +20,7 @@ const { AgentAnalyzer } = require('../agent-analyzer');
|
|
|
20
20
|
*/
|
|
21
21
|
function buildFrontmatter(metadata, agentName) {
|
|
22
22
|
const nameFromFile = agentName.replaceAll('-', ' ');
|
|
23
|
-
const description = metadata.title || '
|
|
23
|
+
const description = metadata.title || 'XiaoMa Agent';
|
|
24
24
|
|
|
25
25
|
return `---
|
|
26
26
|
name: "${nameFromFile}"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* XiaoMa Agent Installer
|
|
3
3
|
* Discovers, prompts, compiles, and installs agents
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -11,12 +11,12 @@ const { compileAgent, compileAgentFile } = require('./compiler');
|
|
|
11
11
|
const { extractInstallConfig, getDefaultValues } = require('./template-engine');
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Find
|
|
14
|
+
* Find XiaoMa config file in project
|
|
15
15
|
* @param {string} startPath - Starting directory to search from
|
|
16
16
|
* @returns {Object|null} Config data or null
|
|
17
17
|
*/
|
|
18
|
-
function
|
|
19
|
-
// Look for common
|
|
18
|
+
function findXiaomaConfig(startPath = process.cwd()) {
|
|
19
|
+
// Look for common XiaoMa folder names
|
|
20
20
|
const possibleNames = ['_xiaoma'];
|
|
21
21
|
|
|
22
22
|
for (const name of possibleNames) {
|
|
@@ -243,15 +243,15 @@ function updateAgentId(compiledContent, targetPath) {
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
/**
|
|
246
|
-
* Detect if a path is within a
|
|
246
|
+
* Detect if a path is within a XiaoMa project
|
|
247
247
|
* @param {string} targetPath - Path to check
|
|
248
248
|
* @returns {Object|null} Project info with xiaomaFolder and cfgFolder
|
|
249
249
|
*/
|
|
250
|
-
function
|
|
250
|
+
function detectXiaomaProject(targetPath) {
|
|
251
251
|
let checkPath = path.resolve(targetPath);
|
|
252
252
|
const root = path.parse(checkPath).root;
|
|
253
253
|
|
|
254
|
-
// Walk up directory tree looking for
|
|
254
|
+
// Walk up directory tree looking for XiaoMa installation
|
|
255
255
|
while (checkPath !== root) {
|
|
256
256
|
const possibleNames = ['_xiaoma'];
|
|
257
257
|
for (const name of possibleNames) {
|
|
@@ -660,14 +660,14 @@ function extractManifestData(xmlContent, metadata, agentPath, moduleName = 'cust
|
|
|
660
660
|
}
|
|
661
661
|
|
|
662
662
|
module.exports = {
|
|
663
|
-
|
|
663
|
+
findXiaomaConfig,
|
|
664
664
|
resolvePath,
|
|
665
665
|
discoverAgents,
|
|
666
666
|
loadAgentConfig,
|
|
667
667
|
promptInstallQuestions,
|
|
668
668
|
installAgent,
|
|
669
669
|
updateAgentId,
|
|
670
|
-
|
|
670
|
+
detectXiaomaProject,
|
|
671
671
|
addToManifest,
|
|
672
672
|
extractManifestData,
|
|
673
673
|
escapeCsvField,
|
|
@@ -26,12 +26,12 @@ const AgentPartyGenerator = {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// Build XML content
|
|
29
|
-
let xmlContent = `<!-- Powered by
|
|
30
|
-
<!-- Agent Manifest - Generated during
|
|
29
|
+
let xmlContent = `<!-- Powered by XiaoMa-CORE™ -->
|
|
30
|
+
<!-- Agent Manifest - Generated during XiaoMa ${forWeb ? 'bundling' : 'installation'} -->
|
|
31
31
|
<!-- This file contains a summary of all ${forWeb ? 'bundled' : 'installed'} agents for quick reference -->
|
|
32
32
|
<manifest id="xiaoma/_config/agent-manifest.csv" version="1.0" generated="${new Date().toISOString()}">
|
|
33
33
|
<description>
|
|
34
|
-
Complete roster of ${forWeb ? 'bundled' : 'installed'}
|
|
34
|
+
Complete roster of ${forWeb ? 'bundled' : 'installed'} XiaoMa agents with summarized personas for efficient multi-agent orchestration.
|
|
35
35
|
Used by party-mode and other multi-agent coordination features.
|
|
36
36
|
</description>
|
|
37
37
|
`;
|
|
@@ -16,7 +16,7 @@ const CLIUtils = {
|
|
|
16
16
|
},
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Display
|
|
19
|
+
* Display XiaoMa logo using @clack intro + box
|
|
20
20
|
* @param {boolean} _clearScreen - Deprecated, ignored (no longer clears screen)
|
|
21
21
|
*/
|
|
22
22
|
async displayLogo(_clearScreen = true) {
|
|
@@ -25,17 +25,17 @@ const CLIUtils = {
|
|
|
25
25
|
|
|
26
26
|
// ASCII art logo
|
|
27
27
|
const logo = [
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
28
|
+
' ██╗ ██╗██╗ █████╗ ██████╗ ███╗ ███╗ █████╗',
|
|
29
|
+
' ╚██╗██╔╝██║██╔══██╗██╔═══██╗████╗ ████║██╔══██╗',
|
|
30
|
+
' ╚███╔╝ ██║███████║██║ ██║██╔████╔██║███████║',
|
|
31
|
+
' ██╔██╗ ██║██╔══██║██║ ██║██║╚██╔╝██║██╔══██║',
|
|
32
|
+
' ██╔╝ ██╗██║██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ██║',
|
|
33
|
+
' ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝',
|
|
34
34
|
]
|
|
35
35
|
.map((line) => color.yellow(line))
|
|
36
36
|
.join('\n');
|
|
37
37
|
|
|
38
|
-
const tagline = '
|
|
38
|
+
const tagline = ' AI-Driven Agile Development';
|
|
39
39
|
|
|
40
40
|
await prompts.box(`${logo}\n${tagline}`, `v${version}`, {
|
|
41
41
|
contentAlign: 'center',
|
|
@@ -2,21 +2,21 @@ const path = require('node:path');
|
|
|
2
2
|
const fs = require('fs-extra');
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Find the
|
|
6
|
-
* or specific
|
|
5
|
+
* Find the XiaoMa project root directory by looking for package.json
|
|
6
|
+
* or specific XiaoMa markers
|
|
7
7
|
*/
|
|
8
8
|
function findProjectRoot(startPath = __dirname) {
|
|
9
9
|
let currentPath = path.resolve(startPath);
|
|
10
10
|
|
|
11
|
-
// Keep going up until we find package.json with
|
|
11
|
+
// Keep going up until we find package.json with xiaoma-cli
|
|
12
12
|
while (currentPath !== path.dirname(currentPath)) {
|
|
13
13
|
const packagePath = path.join(currentPath, 'package.json');
|
|
14
14
|
|
|
15
15
|
if (fs.existsSync(packagePath)) {
|
|
16
16
|
try {
|
|
17
17
|
const pkg = fs.readJsonSync(packagePath);
|
|
18
|
-
// Check if this is the
|
|
19
|
-
if (pkg.name === '
|
|
18
|
+
// Check if this is the XiaoMa project
|
|
19
|
+
if (pkg.name === 'xiaoma-cli' || fs.existsSync(path.join(currentPath, 'src', 'core'))) {
|
|
20
20
|
return currentPath;
|
|
21
21
|
}
|
|
22
22
|
} catch {
|
package/tools/cli/lib/prompts.js
CHANGED
package/tools/cli/lib/ui.js
CHANGED
|
@@ -51,7 +51,7 @@ class UI {
|
|
|
51
51
|
confirmedDirectory = await this.getConfirmedDirectory();
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
// Preflight: Check for legacy
|
|
54
|
+
// Preflight: Check for legacy XiaoMa v4 footprints immediately after getting directory
|
|
55
55
|
const { Detector } = require('../installers/lib/core/detector');
|
|
56
56
|
const { Installer } = require('../installers/lib/core/installer');
|
|
57
57
|
const detector = new Detector();
|
|
@@ -63,9 +63,9 @@ class UI {
|
|
|
63
63
|
|
|
64
64
|
// Check for legacy folders and prompt for rename before showing any menus
|
|
65
65
|
let hasLegacyCfg = false;
|
|
66
|
-
let
|
|
66
|
+
let hasLegacyXiaomaFolder = false;
|
|
67
67
|
let xiaomaDir = null;
|
|
68
|
-
let
|
|
68
|
+
let legacyXiaomaPath = null;
|
|
69
69
|
|
|
70
70
|
// First check for legacy .xiaoma folder (instead of _xiaoma)
|
|
71
71
|
// Only check if directory exists
|
|
@@ -73,12 +73,12 @@ class UI {
|
|
|
73
73
|
const entries = await fs.readdir(confirmedDirectory, { withFileTypes: true });
|
|
74
74
|
for (const entry of entries) {
|
|
75
75
|
if (entry.isDirectory() && (entry.name === '.xiaoma' || entry.name === 'xiaoma')) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
xiaomaDir =
|
|
76
|
+
hasLegacyXiaomaFolder = true;
|
|
77
|
+
legacyXiaomaPath = path.join(confirmedDirectory, entry.name);
|
|
78
|
+
xiaomaDir = legacyXiaomaPath;
|
|
79
79
|
|
|
80
80
|
// Check if it has _cfg folder
|
|
81
|
-
const cfgPath = path.join(
|
|
81
|
+
const cfgPath = path.join(legacyXiaomaPath, '_cfg');
|
|
82
82
|
if (await fs.pathExists(cfgPath)) {
|
|
83
83
|
hasLegacyCfg = true;
|
|
84
84
|
}
|
|
@@ -88,7 +88,7 @@ class UI {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// If no .xiaoma or xiaoma found, check for current installations _xiaoma
|
|
91
|
-
if (!
|
|
91
|
+
if (!hasLegacyXiaomaFolder) {
|
|
92
92
|
const xiaomaResult = await installer.findXiaomaDir(confirmedDirectory);
|
|
93
93
|
xiaomaDir = xiaomaResult.xiaomaDir;
|
|
94
94
|
hasLegacyCfg = xiaomaResult.hasLegacyCfg;
|
|
@@ -96,7 +96,7 @@ class UI {
|
|
|
96
96
|
|
|
97
97
|
// Handle legacy .xiaoma or _cfg folder - these are very old (v4 or alpha)
|
|
98
98
|
// Show version warning instead of offering conversion
|
|
99
|
-
if (
|
|
99
|
+
if (hasLegacyXiaomaFolder || hasLegacyCfg) {
|
|
100
100
|
await prompts.log.warn('LEGACY INSTALLATION DETECTED');
|
|
101
101
|
await prompts.note(
|
|
102
102
|
'Found a ".xiaoma"/"xiaoma" folder, or a legacy "_cfg" folder under the xiaoma folder -\n' +
|
|
@@ -150,11 +150,11 @@ class UI {
|
|
|
150
150
|
s.start('Updating folder structure...');
|
|
151
151
|
try {
|
|
152
152
|
// Handle .xiaoma folder
|
|
153
|
-
if (
|
|
153
|
+
if (hasLegacyXiaomaFolder) {
|
|
154
154
|
const newXiaomaPath = path.join(confirmedDirectory, '_xiaoma');
|
|
155
|
-
await fs.move(
|
|
155
|
+
await fs.move(legacyXiaomaPath, newXiaomaPath);
|
|
156
156
|
xiaomaDir = newXiaomaPath;
|
|
157
|
-
s.stop(`Renamed "${path.basename(
|
|
157
|
+
s.stop(`Renamed "${path.basename(legacyXiaomaPath)}" to "_xiaoma"`);
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
// Handle _cfg folder (either from .xiaoma or standalone)
|
|
@@ -220,7 +220,7 @@ class UI {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
// Common actions
|
|
223
|
-
choices.push({ name: 'Modify
|
|
223
|
+
choices.push({ name: 'Modify XiaoMa Installation', value: 'update' });
|
|
224
224
|
|
|
225
225
|
// Check if action is provided via command-line
|
|
226
226
|
if (options.action) {
|
|
@@ -426,9 +426,9 @@ class UI {
|
|
|
426
426
|
// Preserve existing custom modules if user doesn't want to modify them
|
|
427
427
|
const { Installer } = require('../installers/lib/core/installer');
|
|
428
428
|
const installer = new Installer();
|
|
429
|
-
const { xiaomaDir
|
|
429
|
+
const { xiaomaDir } = await installer.findXiaomaDir(confirmedDirectory);
|
|
430
430
|
|
|
431
|
-
const cacheDir = path.join(
|
|
431
|
+
const cacheDir = path.join(xiaomaDir, '_config', 'custom');
|
|
432
432
|
if (await fs.pathExists(cacheDir)) {
|
|
433
433
|
const entries = await fs.readdir(cacheDir, { withFileTypes: true });
|
|
434
434
|
for (const entry of entries) {
|
|
@@ -837,8 +837,8 @@ class UI {
|
|
|
837
837
|
const { Installer } = require('../installers/lib/core/installer');
|
|
838
838
|
const detector = new Detector();
|
|
839
839
|
const installer = new Installer();
|
|
840
|
-
const
|
|
841
|
-
const xiaomaDir =
|
|
840
|
+
const xiaomaDirResult = await installer.findXiaomaDir(directory);
|
|
841
|
+
const xiaomaDir = xiaomaDirResult.xiaomaDir;
|
|
842
842
|
const existingInstall = await detector.detect(xiaomaDir);
|
|
843
843
|
const installedModuleIds = new Set(existingInstall.modules.map((mod) => mod.id));
|
|
844
844
|
|
|
@@ -1048,7 +1048,7 @@ class UI {
|
|
|
1048
1048
|
const lockedValues = ['core'];
|
|
1049
1049
|
|
|
1050
1050
|
// Core module is always installed — show it locked at the top
|
|
1051
|
-
allOptions.push({ label: '
|
|
1051
|
+
allOptions.push({ label: 'XiaoMa Core Module', value: 'core', hint: 'Core configuration and shared resources' });
|
|
1052
1052
|
initialValues.push('core');
|
|
1053
1053
|
|
|
1054
1054
|
// Helper to build module entry with proper sorting and selection
|
|
@@ -1063,7 +1063,7 @@ class UI {
|
|
|
1063
1063
|
};
|
|
1064
1064
|
};
|
|
1065
1065
|
|
|
1066
|
-
// Local modules (
|
|
1066
|
+
// Local modules (XMC, BMB, etc.)
|
|
1067
1067
|
const localEntries = [];
|
|
1068
1068
|
for (const mod of localModules) {
|
|
1069
1069
|
if (!mod.isCustom && mod.id !== 'core') {
|
|
@@ -1137,7 +1137,7 @@ class UI {
|
|
|
1137
1137
|
|
|
1138
1138
|
const defaultModules = [];
|
|
1139
1139
|
|
|
1140
|
-
// Add default-selected local modules (typically
|
|
1140
|
+
// Add default-selected local modules (typically XMC)
|
|
1141
1141
|
for (const mod of localModules) {
|
|
1142
1142
|
if (mod.defaultSelected === true || installedModuleIds.has(mod.id)) {
|
|
1143
1143
|
defaultModules.push(mod.id);
|
|
@@ -1767,17 +1767,17 @@ class UI {
|
|
|
1767
1767
|
* Show warning for legacy version (v4 or alpha) and ask if user wants to proceed
|
|
1768
1768
|
* @param {string} installedVersion - The installed version
|
|
1769
1769
|
* @param {string} currentVersion - The current version
|
|
1770
|
-
* @param {string}
|
|
1770
|
+
* @param {string} xiaomaFolderName - Name of the XiaoMa folder
|
|
1771
1771
|
* @returns {Promise<boolean>} True if user wants to proceed, false if they cancel
|
|
1772
1772
|
*/
|
|
1773
|
-
async showLegacyVersionWarning(installedVersion, currentVersion,
|
|
1773
|
+
async showLegacyVersionWarning(installedVersion, currentVersion, xiaomaFolderName, options = {}) {
|
|
1774
1774
|
if (!this.isLegacyVersion(installedVersion)) {
|
|
1775
1775
|
return true; // Not legacy, proceed
|
|
1776
1776
|
}
|
|
1777
1777
|
|
|
1778
1778
|
let warningContent;
|
|
1779
1779
|
if (installedVersion === 'unknown') {
|
|
1780
|
-
warningContent = 'Unable to detect your installed
|
|
1780
|
+
warningContent = 'Unable to detect your installed XiaoMa version.\n' + 'This appears to be a legacy or unsupported installation.';
|
|
1781
1781
|
} else {
|
|
1782
1782
|
warningContent =
|
|
1783
1783
|
`You are updating from ${installedVersion} to ${currentVersion}.\n` + 'You have a legacy version installed (v4 or alpha).';
|
|
@@ -1785,8 +1785,8 @@ class UI {
|
|
|
1785
1785
|
|
|
1786
1786
|
warningContent +=
|
|
1787
1787
|
'\n\nFor the best experience, we recommend:\n' +
|
|
1788
|
-
' 1. Delete your current
|
|
1789
|
-
` (the "${
|
|
1788
|
+
' 1. Delete your current XiaoMa installation folder\n' +
|
|
1789
|
+
` (the "${xiaomaFolderName}/" folder in your project)\n` +
|
|
1790
1790
|
' 2. Run a fresh installation\n\n' +
|
|
1791
1791
|
'Benefits of a fresh install:\n' +
|
|
1792
1792
|
' \u2022 Cleaner configuration without legacy artifacts\n' +
|
|
@@ -1818,7 +1818,7 @@ class UI {
|
|
|
1818
1818
|
|
|
1819
1819
|
if (proceed === 'cancel') {
|
|
1820
1820
|
await prompts.note(
|
|
1821
|
-
`1. Delete the "${
|
|
1821
|
+
`1. Delete the "${xiaomaFolderName}/" folder in your project\n` + "2. Run 'xiaoma install' again",
|
|
1822
1822
|
'To do a fresh install',
|
|
1823
1823
|
);
|
|
1824
1824
|
}
|
|
@@ -1923,7 +1923,7 @@ class UI {
|
|
|
1923
1923
|
`Last Updated: ${installation.lastUpdated ? new Date(installation.lastUpdated).toLocaleDateString() : 'unknown'}`,
|
|
1924
1924
|
];
|
|
1925
1925
|
|
|
1926
|
-
await prompts.note(infoLines.join('\n'), '
|
|
1926
|
+
await prompts.note(infoLines.join('\n'), 'XiaoMa Status');
|
|
1927
1927
|
|
|
1928
1928
|
// Module versions
|
|
1929
1929
|
await this.displayModuleVersions(modules, availableUpdates);
|
|
@@ -5,7 +5,7 @@ const { getProjectRoot, getSourcePath } = require('./project-root');
|
|
|
5
5
|
const { YamlXmlBuilder } = require('./yaml-xml-builder');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* XML utility functions for
|
|
8
|
+
* XML utility functions for XiaoMa installer
|
|
9
9
|
* Now supports both legacy XML agents and new YAML-based agents
|
|
10
10
|
*/
|
|
11
11
|
class XmlHandler {
|
|
@@ -170,7 +170,7 @@ class YamlXmlBuilder {
|
|
|
170
170
|
|
|
171
171
|
if (buildMetadata.forWebBundle) {
|
|
172
172
|
// Web bundle: keep existing format
|
|
173
|
-
xml += '<!-- Powered by
|
|
173
|
+
xml += '<!-- Powered by XiaoMa-CORE™ -->\n\n';
|
|
174
174
|
xml += `# ${metadata.title || 'Agent'}\n\n`;
|
|
175
175
|
} else {
|
|
176
176
|
// Installation: use YAML frontmatter + instruction
|
|
@@ -182,7 +182,7 @@ class YamlXmlBuilder {
|
|
|
182
182
|
|
|
183
183
|
xml += '---\n';
|
|
184
184
|
xml += `name: "${nameFromFile}"\n`;
|
|
185
|
-
xml += `description: "${metadata.title || '
|
|
185
|
+
xml += `description: "${metadata.title || 'XiaoMa Agent'}"\n`;
|
|
186
186
|
xml += '---\n\n';
|
|
187
187
|
xml +=
|
|
188
188
|
"You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.\n\n";
|
package/tools/cli/xiaoma-cli.js
CHANGED
|
@@ -14,7 +14,7 @@ if (process.stdin?.setMaxListeners) {
|
|
|
14
14
|
|
|
15
15
|
// Check for updates - do this asynchronously so it doesn't block startup
|
|
16
16
|
const packageJson = require('../../package.json');
|
|
17
|
-
const packageName = '
|
|
17
|
+
const packageName = 'xiaoma-cli';
|
|
18
18
|
checkForUpdate().catch(() => {
|
|
19
19
|
// Silently ignore errors - version check is best-effort
|
|
20
20
|
});
|
|
@@ -41,7 +41,7 @@ async function checkForUpdate() {
|
|
|
41
41
|
`You are using version ${packageJson.version} but ${result} is available.`,
|
|
42
42
|
'',
|
|
43
43
|
'To update, exit and first run:',
|
|
44
|
-
` npm cache clean --force && npx
|
|
44
|
+
` npm cache clean --force && npx xiaoma-cli@${tag} install`,
|
|
45
45
|
].join('\n');
|
|
46
46
|
await prompts.box(updateMsg, 'Update Available', {
|
|
47
47
|
rounded: true,
|
|
@@ -82,7 +82,7 @@ for (const file of commandFiles) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
// Set up main program
|
|
85
|
-
program.version(packageJson.version).description('
|
|
85
|
+
program.version(packageJson.version).description('XiaoMa Core CLI - Universal AI agent framework');
|
|
86
86
|
|
|
87
87
|
// Register all commands
|
|
88
88
|
for (const [name, cmd] of Object.entries(commands)) {
|