@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.
- package/package.json +24 -14
- package/src/core-skills/module-help.csv +13 -0
- package/src/{core → core-skills}/module.yaml +8 -0
- package/src/{core/skills/xiaoma-advanced-elicitation/workflow.md → core-skills/xiaoma-advanced-elicitation/SKILL.md} +10 -3
- package/src/core-skills/xiaoma-advanced-elicitation/methods.csv +70 -0
- package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-03-technique-execution.md +6 -4
- package/src/{core/skills → core-skills}/xiaoma-brainstorming/workflow.md +1 -1
- package/src/core-skills/xiaoma-customize/SKILL.md +111 -0
- package/src/core-skills/xiaoma-customize/scripts/list_customizable_skills.js +172 -0
- package/src/{core/skills → core-skills}/xiaoma-distillator/resources/distillate-format-reference.md +1 -1
- package/src/{core/skills → core-skills}/xiaoma-distillator/scripts/analyze_sources.py +2 -2
- package/src/{core/skills/xiaoma-editorial-review-prose/workflow.md → core-skills/xiaoma-editorial-review-prose/SKILL.md} +5 -0
- package/src/{core/skills/xiaoma-editorial-review-structure/workflow.md → core-skills/xiaoma-editorial-review-structure/SKILL.md} +5 -0
- package/src/core-skills/xiaoma-help/SKILL.md +75 -0
- package/src/{core/skills/xiaoma-index-docs/workflow.md → core-skills/xiaoma-index-docs/SKILL.md} +5 -0
- package/src/core-skills/xiaoma-party-mode/SKILL.md +128 -0
- package/src/{core/skills/xiaoma-review-adversarial-general/workflow.md → core-skills/xiaoma-review-adversarial-general/SKILL.md} +5 -0
- package/src/{core/skills/xiaoma-review-edge-case-hunter/workflow.md → core-skills/xiaoma-review-edge-case-hunter/SKILL.md} +5 -0
- package/src/{core/skills/xiaoma-shard-doc/workflow.md → core-skills/xiaoma-shard-doc/SKILL.md} +5 -0
- package/src/core-skills/xiaoma-spec/SKILL.md +129 -0
- package/src/core-skills/xiaoma-spec/assets/headless-schemas.md +33 -0
- package/src/core-skills/xiaoma-spec/assets/spec-template.md +49 -0
- package/src/core-skills/xiaoma-spec/customize.toml +53 -0
- package/src/scripts/resolve_config.js +163 -0
- package/src/scripts/resolve_customization.js +188 -0
- package/src/scripts/toml.js +338 -0
- package/src/xmc-skills/1-analysis/research/xiaoma-domain-research/SKILL.md +96 -0
- package/src/xmc-skills/1-analysis/research/xiaoma-domain-research/customize.toml +41 -0
- package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-06-research-synthesis.md +6 -0
- package/src/xmc-skills/1-analysis/research/xiaoma-market-research/SKILL.md +96 -0
- package/src/xmc-skills/1-analysis/research/xiaoma-market-research/customize.toml +41 -0
- package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-06-research-completion.md +6 -0
- package/src/xmc-skills/1-analysis/research/xiaoma-technical-research/SKILL.md +96 -0
- package/src/xmc-skills/1-analysis/research/xiaoma-technical-research/customize.toml +41 -0
- package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-06-research-synthesis.md +6 -0
- package/src/xmc-skills/1-analysis/xiaoma-agent-analyst/SKILL.md +76 -0
- package/src/xmc-skills/1-analysis/xiaoma-agent-analyst/customize.toml +90 -0
- package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/SKILL.md +76 -0
- package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/customize.toml +81 -0
- package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/explain-concept.md +20 -0
- package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/mermaid-gen.md +20 -0
- package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/validate-doc.md +19 -0
- package/src/xmc-skills/1-analysis/xiaoma-agent-tech-writer/write-document.md +20 -0
- package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/checklist.md +5 -2
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/src/xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline/steps/step-08-finalize.md +184 -0
- package/src/xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline/workflow.md +140 -0
- package/src/xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline/xiaoma-skill-manifest.yaml +24 -0
- package/src/xmc-skills/1-analysis/xiaoma-document-project/SKILL.md +62 -0
- package/src/xmc-skills/1-analysis/xiaoma-document-project/customize.toml +41 -0
- package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/workflows/deep-dive-instructions.md +1 -0
- package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/workflows/full-scan-instructions.md +1 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/SKILL.md +135 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/agents/artifact-analyzer.md +60 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/agents/web-researcher.md +49 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/assets/prfaq-template.md +62 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/customize.toml +41 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/references/customer-faq.md +55 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/references/internal-faq.md +51 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/references/press-release.md +60 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/references/verdict.md +83 -0
- package/src/xmc-skills/1-analysis/xiaoma-prfaq/xiaoma-manifest.json +16 -0
- package/src/xmc-skills/1-analysis/xiaoma-product-brief/SKILL.md +91 -0
- package/src/xmc-skills/1-analysis/xiaoma-product-brief/assets/brief-template.md +41 -0
- package/src/xmc-skills/1-analysis/xiaoma-product-brief/customize.toml +99 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-agent-pm/SKILL.md +76 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-agent-pm/customize.toml +75 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-agent-ux-designer/SKILL.md +76 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-agent-ux-designer/customize.toml +60 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-create-prd/SKILL.md +30 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-create-prd/customize.toml +41 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-edit-prd/SKILL.md +30 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-edit-prd/customize.toml +42 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-prd/SKILL.md +92 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-prd/assets/headless-schemas.md +76 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-prd/assets/prd-template.md +165 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-prd/assets/prd-validation-checklist.md +217 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-prd/assets/validation-report-template.html +325 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-prd/customize.toml +147 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-prd/references/headless.md +39 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-prd/references/validate.md +97 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/SKILL.md +90 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/color-themes.md +9 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/design-directions.md +9 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/design-example-editorial.md +158 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/design-example-mobile.md +93 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/design-example-shadcn.md +109 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/excalidraw-wireframe.md +19 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/experience-example-mobile.md +112 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/experience-example-shadcn.md +133 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/headless-schemas.md +84 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/key-screens.md +29 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/assets/validation-report-template.html +319 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/customize.toml +100 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/references/creative-tools.md +19 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/references/design-md-spec.md +50 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/references/headless.md +37 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-ux/references/validate.md +115 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-validate-prd/SKILL.md +30 -0
- package/src/xmc-skills/2-plan-workflows/xiaoma-validate-prd/customize.toml +31 -0
- package/src/xmc-skills/3-solutioning/xiaoma-agent-architect/SKILL.md +76 -0
- package/src/xmc-skills/3-solutioning/xiaoma-agent-architect/customize.toml +65 -0
- package/src/xmc-skills/3-solutioning/xiaoma-check-implementation-readiness/SKILL.md +91 -0
- package/src/xmc-skills/3-solutioning/xiaoma-check-implementation-readiness/customize.toml +41 -0
- package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-01-document-discovery.md +1 -1
- package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-02-prd-analysis.md +1 -1
- package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-03-epic-coverage-validation.md +1 -1
- package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-06-final-assessment.md +6 -0
- package/src/xmc-skills/3-solutioning/xiaoma-create-architecture/SKILL.md +74 -0
- package/src/xmc-skills/3-solutioning/xiaoma-create-architecture/customize.toml +41 -0
- package/src/xmc-skills/3-solutioning/xiaoma-create-architecture/references/headless.md +37 -0
- package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-07-validation.md +23 -21
- package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-08-complete.md +6 -0
- package/src/xmc-skills/3-solutioning/xiaoma-create-epics-and-stories/SKILL.md +93 -0
- package/src/xmc-skills/3-solutioning/xiaoma-create-epics-and-stories/customize.toml +41 -0
- package/src/xmc-skills/3-solutioning/xiaoma-create-epics-and-stories/references/headless.md +35 -0
- package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/steps/step-02-design-epics.md +34 -4
- package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/steps/step-04-final-validation.md +12 -0
- package/src/xmc-skills/3-solutioning/xiaoma-generate-project-context/SKILL.md +81 -0
- package/src/xmc-skills/3-solutioning/xiaoma-generate-project-context/customize.toml +41 -0
- package/src/{xmc/workflows → xmc-skills/3-solutioning}/xiaoma-generate-project-context/steps/step-03-complete.md +6 -0
- package/src/xmc-skills/4-implementation/xiaoma-agent-dev/SKILL.md +76 -0
- package/src/xmc-skills/4-implementation/xiaoma-agent-dev/customize.toml +131 -0
- package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/checklist.md +29 -0
- 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
- package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/steps/step-02-create-story.md +111 -0
- 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
- 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
- package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/steps/step-05-code-review.md +99 -0
- 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
- 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
- package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/steps/step-08-complete-story.md +174 -0
- package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/steps/step-09-finalize.md +145 -0
- package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/workflow.md +127 -0
- package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline/xiaoma-skill-manifest.yaml +27 -0
- package/src/{xmc/workflows/4-implementation/auto-story-pipeline-batch → xmc-skills/4-implementation/xiaoma-auto-story-pipeline-batch}/SKILL.md +2 -2
- package/src/xmc-skills/4-implementation/xiaoma-auto-story-pipeline-batch/checklist.md +45 -0
- package/src/{xmc/workflows/4-implementation/auto-story-pipeline-batch → xmc-skills/4-implementation/xiaoma-auto-story-pipeline-batch}/workflow.md +150 -7
- 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
- package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/SKILL.md +68 -0
- package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/customize.toml +41 -0
- package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/generate-trail.md +38 -0
- package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-01-orientation.md +105 -0
- package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-02-walkthrough.md +89 -0
- package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-03-detail-pass.md +106 -0
- package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-04-testing.md +74 -0
- package/src/xmc-skills/4-implementation/xiaoma-checkpoint-preview/step-05-wrapup.md +30 -0
- package/src/xmc-skills/4-implementation/xiaoma-code-review/SKILL.md +90 -0
- package/src/xmc-skills/4-implementation/xiaoma-code-review/customize.toml +41 -0
- package/src/xmc-skills/4-implementation/xiaoma-code-review/steps/step-01-gather-context.md +85 -0
- package/src/xmc-skills/4-implementation/xiaoma-code-review/steps/step-02-review.md +35 -0
- package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-code-review/steps/step-03-triage.md +7 -8
- package/src/xmc-skills/4-implementation/xiaoma-code-review/steps/step-04-present.md +132 -0
- package/src/{xmc/workflows/4-implementation/xiaoma-correct-course/workflow.md → xmc-skills/4-implementation/xiaoma-correct-course/SKILL.md} +65 -31
- package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-correct-course/checklist.md +2 -2
- package/src/xmc-skills/4-implementation/xiaoma-correct-course/customize.toml +41 -0
- package/src/{xmc/workflows/4-implementation/xiaoma-create-story/workflow.md → xmc-skills/4-implementation/xiaoma-create-story/SKILL.md} +60 -11
- package/src/xmc-skills/4-implementation/xiaoma-create-story/customize.toml +41 -0
- package/src/xmc-skills/4-implementation/xiaoma-create-story/references/headless.md +32 -0
- package/src/{xmc/workflows/4-implementation/xiaoma-dev-story/workflow.md → xmc-skills/4-implementation/xiaoma-dev-story/SKILL.md} +70 -20
- package/src/xmc-skills/4-implementation/xiaoma-dev-story/customize.toml +41 -0
- package/src/xmc-skills/4-implementation/xiaoma-investigate/SKILL.md +196 -0
- package/src/xmc-skills/4-implementation/xiaoma-investigate/customize.toml +62 -0
- package/src/xmc-skills/4-implementation/xiaoma-investigate/references/case-file-template.md +127 -0
- package/src/{xmc/workflows/xiaoma-qa-generate-e2e-tests/workflow.md → xmc-skills/4-implementation/xiaoma-qa-generate-e2e-tests/SKILL.md} +51 -23
- package/src/{xmc/workflows → xmc-skills/4-implementation}/xiaoma-qa-generate-e2e-tests/checklist.md +1 -5
- package/src/xmc-skills/4-implementation/xiaoma-qa-generate-e2e-tests/customize.toml +41 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/SKILL.md +111 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/compile-epic-context.md +62 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/customize.toml +41 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/spec-template.md +88 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-01-clarify-and-route.md +100 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-02-plan.md +47 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-03-implement.md +41 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-04-review.md +50 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-05-present.md +78 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/step-oneshot.md +71 -0
- package/src/xmc-skills/4-implementation/xiaoma-quick-dev/sync-sprint-status.md +19 -0
- package/src/{xmc/workflows/4-implementation/xiaoma-retrospective/workflow.md → xmc-skills/4-implementation/xiaoma-retrospective/SKILL.md} +185 -152
- package/src/xmc-skills/4-implementation/xiaoma-retrospective/customize.toml +41 -0
- package/src/{xmc/workflows/4-implementation/xiaoma-sprint-planning/workflow.md → xmc-skills/4-implementation/xiaoma-sprint-planning/SKILL.md} +59 -15
- package/src/xmc-skills/4-implementation/xiaoma-sprint-planning/customize.toml +41 -0
- package/src/xmc-skills/4-implementation/xiaoma-sprint-planning/references/headless.md +28 -0
- package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-sprint-planning/sprint-status-template.yaml +3 -3
- package/src/{xmc/workflows/4-implementation/xiaoma-sprint-status/workflow.md → xmc-skills/4-implementation/xiaoma-sprint-status/SKILL.md} +57 -20
- package/src/xmc-skills/4-implementation/xiaoma-sprint-status/customize.toml +41 -0
- package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/checklist.md +6 -0
- 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
- 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
- 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
- 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
- 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
- package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/workflow.md +7 -8
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/SKILL.md +6 -0
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/checklist.md +47 -0
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-01-init-and-validate.md +156 -0
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-02-create-epics.md +157 -0
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-03-bridge-sprint-planning.md +197 -0
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-04-batch-create-stories.md +310 -0
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/steps/step-05-finalize.md +351 -0
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/workflow.md +104 -0
- package/src/xmc-skills/5-full-pipeline/xiaoma-auto-prd-to-stories/xiaoma-skill-manifest.yaml +3 -0
- package/src/xmc-skills/module-help.csv +32 -0
- package/src/xmc-skills/module.yaml +95 -0
- package/src/xpm-skills/module-help.csv +3 -0
- package/src/xpm-skills/module.yaml +36 -0
- package/src/xpm-skills/xiaoma-agent-patent-advisor/SKILL.md +75 -0
- package/src/xpm-skills/xiaoma-agent-patent-advisor/customize.toml +46 -0
- package/src/xpm-skills/xiaoma-patent-mining/SKILL.md +6 -0
- package/src/xpm-skills/xiaoma-patent-mining/references/docx-format-spec.md +183 -0
- package/src/xpm-skills/xiaoma-patent-mining/scripts/md2docx.js +777 -0
- package/src/xpm-skills/xiaoma-patent-mining/steps/step-01-project-analysis.md +65 -0
- package/src/xpm-skills/xiaoma-patent-mining/steps/step-02-patent-mining.md +87 -0
- package/src/xpm-skills/xiaoma-patent-mining/steps/step-03-disclosure-writing.md +110 -0
- package/src/xpm-skills/xiaoma-patent-mining/steps/step-04-ai-taste-removal.md +85 -0
- package/src/xpm-skills/xiaoma-patent-mining/steps/step-05-docx-generation.md +111 -0
- package/src/xpm-skills/xiaoma-patent-mining/workflow.md +94 -0
- package/tools/format-workflow-md.js +263 -0
- package/tools/{cli → installer}/README.md +2 -2
- package/tools/installer/cli-utils.js +57 -0
- package/tools/installer/commands/install.js +146 -0
- package/tools/{cli → installer}/commands/status.js +15 -7
- package/tools/{cli → installer}/commands/uninstall.js +7 -7
- package/tools/installer/core/config.js +73 -0
- package/tools/installer/core/existing-install.js +121 -0
- package/tools/installer/core/install-paths.js +132 -0
- package/tools/installer/core/installer.js +1624 -0
- package/tools/installer/core/legacy-warnings.js +156 -0
- package/tools/installer/core/manifest-generator.js +859 -0
- package/tools/installer/core/manifest.js +434 -0
- package/tools/{cli/lib → installer}/file-ops.js +1 -1
- package/tools/installer/fs-native.js +116 -0
- package/tools/installer/ide/_config-driven.js +972 -0
- package/tools/{cli/installers/lib → installer}/ide/manager.js +82 -62
- package/tools/installer/ide/platform-codes.js +80 -0
- package/tools/installer/ide/platform-codes.yaml +322 -0
- package/tools/installer/ide/shared/installed-skills.js +50 -0
- package/tools/{cli/installers/lib → installer}/ide/shared/path-utils.js +0 -145
- package/tools/{cli/installers/lib → installer}/ide/shared/skill-manifest.js +3 -36
- package/tools/installer/list-options.js +210 -0
- package/tools/{cli/installers/lib → installer}/message-loader.js +3 -3
- package/tools/installer/modules/channel-plan.js +203 -0
- package/tools/installer/modules/channel-resolver.js +241 -0
- package/tools/installer/modules/custom-module-manager.js +912 -0
- package/tools/installer/modules/external-manager.js +533 -0
- package/tools/installer/modules/module-help-schema.js +13 -0
- package/tools/{cli/installers/lib/core/config-collector.js → installer/modules/official-modules.js} +1052 -110
- package/tools/installer/modules/plugin-resolver.js +398 -0
- package/tools/installer/modules/version-resolver.js +336 -0
- package/tools/installer/project-root.js +230 -0
- package/tools/{cli/lib → installer}/prompts.js +143 -100
- package/tools/installer/set-overrides.js +330 -0
- package/tools/installer/ui.js +2078 -0
- package/tools/{cli → installer}/xiaoma-cli.js +9 -10
- package/tools/{cli/lib → installer}/yaml-format.js +1 -1
- package/tools/migrate-custom-module-paths.js +124 -0
- package/tools/schema/step.js +855 -0
- package/tools/skill-validator.md +323 -0
- package/tools/validate-file-refs.js +566 -0
- package/tools/validate-frontmatter-prose-routing.js +334 -0
- package/tools/validate-skills.js +702 -0
- package/tools/validate-step-schemas.js +401 -0
- package/tools/validate-svg-changes.sh +1 -1
- package/tools/validate-trigger-column-vs-emits.js +375 -0
- package/tools/validate-warnings-samples.js +261 -0
- package/tools/xiaoma/rebrand.mjs +0 -0
- package/tools/xiaoma-npx-wrapper.js +2 -2
- package/CLAUDE.md +0 -110
- package/README.md +0 -128
- package/demo/xiaoma-bug-circle-resolve/SKILL.md +0 -6
- package/demo/xiaoma-bug-circle-resolve/workflow.md +0 -212
- package/demo/xiaoma-bug-resolve/SKILL.md +0 -6
- package/demo/xiaoma-bug-resolve/workflow.md +0 -269
- 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
- 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
- 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
- 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
- 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
- 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
- package/patent-disclosure-optimized/SKILL.md +0 -298
- package/src/core/module-help.csv +0 -11
- package/src/core/skills/xiaoma-advanced-elicitation/SKILL.md +0 -6
- package/src/core/skills/xiaoma-advanced-elicitation/methods.csv +0 -51
- package/src/core/skills/xiaoma-editorial-review-prose/SKILL.md +0 -6
- package/src/core/skills/xiaoma-editorial-review-structure/SKILL.md +0 -6
- package/src/core/skills/xiaoma-help/SKILL.md +0 -6
- package/src/core/skills/xiaoma-help/workflow.md +0 -88
- package/src/core/skills/xiaoma-help/xiaoma-skill-manifest.yaml +0 -1
- package/src/core/skills/xiaoma-index-docs/SKILL.md +0 -6
- package/src/core/skills/xiaoma-index-docs/xiaoma-skill-manifest.yaml +0 -1
- package/src/core/skills/xiaoma-party-mode/SKILL.md +0 -6
- package/src/core/skills/xiaoma-party-mode/steps/step-01-agent-loading.md +0 -138
- package/src/core/skills/xiaoma-party-mode/steps/step-02-discussion-orchestration.md +0 -187
- package/src/core/skills/xiaoma-party-mode/steps/step-03-graceful-exit.md +0 -167
- package/src/core/skills/xiaoma-party-mode/workflow.md +0 -190
- package/src/core/skills/xiaoma-party-mode/xiaoma-skill-manifest.yaml +0 -1
- package/src/core/skills/xiaoma-review-adversarial-general/SKILL.md +0 -6
- package/src/core/skills/xiaoma-review-adversarial-general/xiaoma-skill-manifest.yaml +0 -1
- package/src/core/skills/xiaoma-review-edge-case-hunter/SKILL.md +0 -6
- package/src/core/skills/xiaoma-review-edge-case-hunter/xiaoma-skill-manifest.yaml +0 -1
- package/src/core/skills/xiaoma-shard-doc/SKILL.md +0 -6
- package/src/core/skills/xiaoma-shard-doc/xiaoma-skill-manifest.yaml +0 -1
- package/src/core/tasks/xiaoma-create-prd/SKILL.md +0 -6
- package/src/core/tasks/xiaoma-create-prd/data/prd-purpose.md +0 -197
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-01-init.md +0 -178
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-01b-continue.md +0 -161
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-02-discovery.md +0 -208
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-02b-vision.md +0 -142
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-02c-executive-summary.md +0 -158
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-03-success.md +0 -214
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-04-journeys.md +0 -201
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-05-domain.md +0 -194
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-06-innovation.md +0 -211
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-07-project-type.md +0 -222
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-08-scoping.md +0 -216
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-09-functional.md +0 -219
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-10-nonfunctional.md +0 -230
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-11-polish.md +0 -221
- package/src/core/tasks/xiaoma-create-prd/steps-c/step-12-complete.md +0 -115
- package/src/core/tasks/xiaoma-create-prd/templates/prd-template.md +0 -10
- package/src/core/tasks/xiaoma-create-prd/workflow.md +0 -62
- package/src/core/tasks/xiaoma-create-prd/xiaoma-skill-manifest.yaml +0 -1
- package/src/utility/agent-components/activation-rules.txt +0 -6
- package/src/utility/agent-components/activation-steps.txt +0 -14
- package/src/utility/agent-components/agent-command-header.md +0 -1
- package/src/utility/agent-components/agent.customize.template.yaml +0 -41
- package/src/utility/agent-components/handler-action.txt +0 -4
- package/src/utility/agent-components/handler-data.txt +0 -5
- package/src/utility/agent-components/handler-exec.txt +0 -6
- package/src/utility/agent-components/handler-multi.txt +0 -13
- package/src/utility/agent-components/handler-tmpl.txt +0 -5
- package/src/utility/agent-components/menu-handlers.txt +0 -6
- package/src/xmc/agents/analyst.agent.yaml +0 -47
- package/src/xmc/agents/architect.agent.yaml +0 -29
- package/src/xmc/agents/dev.agent.yaml +0 -38
- package/src/xmc/agents/pm.agent.yaml +0 -44
- package/src/xmc/agents/qa.agent.yaml +0 -58
- package/src/xmc/agents/quick-flow-solo-dev.agent.yaml +0 -36
- package/src/xmc/agents/sm.agent.yaml +0 -49
- package/src/xmc/agents/tech-writer/tech-writer-sidecar/documentation-standards.md +0 -224
- package/src/xmc/agents/tech-writer/tech-writer.agent.yaml +0 -46
- package/src/xmc/agents/tech-writer/xiaoma-skill-manifest.yaml +0 -3
- package/src/xmc/agents/ux-designer.agent.yaml +0 -27
- package/src/xmc/agents/xiaoma-skill-manifest.yaml +0 -39
- package/src/xmc/data/project-context-template.md +0 -26
- package/src/xmc/module-help.csv +0 -32
- package/src/xmc/module.yaml +0 -50
- package/src/xmc/teams/default-party.csv +0 -20
- package/src/xmc/teams/team-fullstack.yaml +0 -12
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/steps/step-08-finalize.md +0 -124
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/workflow.md +0 -107
- package/src/xmc/workflows/1-analysis/auto-requirements-pipeline/xiaoma-skill-manifest.yaml +0 -3
- package/src/xmc/workflows/1-analysis/research/market-steps/step-01-init.md +0 -182
- package/src/xmc/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +0 -237
- package/src/xmc/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +0 -249
- package/src/xmc/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +0 -259
- package/src/xmc/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +0 -177
- package/src/xmc/workflows/1-analysis/research/market-steps/step-06-research-completion.md +0 -476
- package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/SKILL.md +0 -6
- package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/workflow.md +0 -49
- package/src/xmc/workflows/1-analysis/research/xiaoma-domain-research/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/SKILL.md +0 -6
- package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/workflow.md +0 -49
- package/src/xmc/workflows/1-analysis/research/xiaoma-market-research/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/SKILL.md +0 -6
- package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/research.template.md +0 -29
- package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/workflow.md +0 -50
- package/src/xmc/workflows/1-analysis/research/xiaoma-technical-research/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/SKILL.md +0 -6
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/product-brief.template.md +0 -10
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-01-init.md +0 -170
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-01b-continue.md +0 -158
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-02-vision.md +0 -193
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-03-users.md +0 -196
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-04-metrics.md +0 -199
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-05-scope.md +0 -213
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/steps/step-06-complete.md +0 -159
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/workflow.md +0 -55
- package/src/xmc/workflows/1-analysis/xiaoma-create-product-brief/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/1-analysis/xiaoma-product-brief-preview/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/2-plan-workflows/create-prd/data/domain-complexity.csv +0 -15
- package/src/xmc/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +0 -197
- package/src/xmc/workflows/2-plan-workflows/create-prd/data/project-types.csv +0 -11
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +0 -224
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +0 -191
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +0 -209
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +0 -174
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md +0 -214
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md +0 -228
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md +0 -217
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md +0 -205
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md +0 -243
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md +0 -263
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +0 -209
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +0 -264
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md +0 -242
- package/src/xmc/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +0 -232
- package/src/xmc/workflows/2-plan-workflows/create-prd/workflow-validate-prd.md +0 -65
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/SKILL.md +0 -6
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-01-init.md +0 -135
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-01b-continue.md +0 -127
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-02-discovery.md +0 -190
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-03-core-experience.md +0 -217
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-04-emotional-response.md +0 -220
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-05-inspiration.md +0 -235
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-06-design-system.md +0 -253
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-07-defining-experience.md +0 -255
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-08-visual-foundation.md +0 -225
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-09-design-directions.md +0 -225
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-10-user-journeys.md +0 -242
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-11-component-strategy.md +0 -249
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-12-ux-patterns.md +0 -238
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-13-responsive-accessibility.md +0 -265
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/steps/step-14-complete.md +0 -171
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/ux-design-template.md +0 -13
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/workflow.md +0 -36
- package/src/xmc/workflows/2-plan-workflows/xiaoma-create-ux-design/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/SKILL.md +0 -6
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-01-discovery.md +0 -242
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-01b-legacy-conversion.md +0 -204
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-02-review.md +0 -245
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-03-edit.md +0 -250
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/steps-e/step-e-04-complete.md +0 -165
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/workflow.md +0 -63
- package/src/xmc/workflows/2-plan-workflows/xiaoma-edit-prd/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/SKILL.md +0 -6
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/domain-complexity.csv +0 -15
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/prd-purpose.md +0 -197
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/data/project-types.csv +0 -11
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-01-discovery.md +0 -221
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-02-format-detection.md +0 -188
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-02b-parity-check.md +0 -206
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-03-density-validation.md +0 -171
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +0 -211
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-05-measurability-validation.md +0 -225
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-06-traceability-validation.md +0 -214
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +0 -202
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +0 -240
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-09-project-type-validation.md +0 -260
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-10-smart-validation.md +0 -206
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +0 -261
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-12-completeness-validation.md +0 -239
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/steps-v/step-v-13-report-complete.md +0 -229
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/workflow.md +0 -62
- package/src/xmc/workflows/2-plan-workflows/xiaoma-validate-prd/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/SKILL.md +0 -6
- package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/workflow.md +0 -49
- package/src/xmc/workflows/3-solutioning/xiaoma-check-implementation-readiness/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/SKILL.md +0 -6
- package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/workflow.md +0 -38
- package/src/xmc/workflows/3-solutioning/xiaoma-create-architecture/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/SKILL.md +0 -6
- package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/workflow.md +0 -53
- package/src/xmc/workflows/3-solutioning/xiaoma-create-epics-and-stories/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/checklist.md +0 -22
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-02-create-story.md +0 -102
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-05-code-review.md +0 -95
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-08-complete-story.md +0 -114
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/steps/step-09-finalize.md +0 -69
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/workflow.md +0 -89
- package/src/xmc/workflows/4-implementation/auto-story-pipeline/xiaoma-skill-manifest.yaml +0 -3
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/SKILL.md +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/checklist.md +0 -23
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-01-gather-context.md +0 -61
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-02-review.md +0 -41
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/steps/step-04-present.md +0 -38
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/workflow.md +0 -54
- package/src/xmc/workflows/4-implementation/xiaoma-code-review/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/4-implementation/xiaoma-correct-course/SKILL.md +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-correct-course/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/4-implementation/xiaoma-create-story/SKILL.md +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-create-story/discover-inputs.md +0 -88
- package/src/xmc/workflows/4-implementation/xiaoma-create-story/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/4-implementation/xiaoma-dev-story/SKILL.md +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-dev-story/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/4-implementation/xiaoma-retrospective/SKILL.md +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-retrospective/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/SKILL.md +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-planning/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/SKILL.md +0 -6
- package/src/xmc/workflows/4-implementation/xiaoma-sprint-status/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/xiaoma-document-project/SKILL.md +0 -6
- package/src/xmc/workflows/xiaoma-document-project/workflow.md +0 -27
- package/src/xmc/workflows/xiaoma-document-project/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/xiaoma-generate-project-context/SKILL.md +0 -6
- package/src/xmc/workflows/xiaoma-generate-project-context/workflow.md +0 -43
- package/src/xmc/workflows/xiaoma-generate-project-context/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/SKILL.md +0 -6
- package/src/xmc/workflows/xiaoma-qa-generate-e2e-tests/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/SKILL.md +0 -6
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-01-mode-detection.md +0 -169
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-02-context-gathering.md +0 -114
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-03-execute.md +0 -107
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-04-self-check.md +0 -107
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-05-adversarial-review.md +0 -94
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/steps/step-06-resolve-findings.md +0 -144
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/workflow.md +0 -38
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-dev-new-preview/xiaoma-skill-manifest.yaml +0 -1
- package/src/xmc/workflows/xiaoma-quick-flow/xiaoma-quick-spec/xiaoma-skill-manifest.yaml +0 -1
- package/tools/cli/commands/install.js +0 -87
- package/tools/cli/external-official-modules.yaml +0 -4
- package/tools/cli/installers/lib/core/custom-module-cache.js +0 -260
- package/tools/cli/installers/lib/core/dependency-resolver.js +0 -743
- package/tools/cli/installers/lib/core/detector.js +0 -223
- package/tools/cli/installers/lib/core/ide-config-manager.js +0 -157
- package/tools/cli/installers/lib/core/installer.js +0 -3212
- package/tools/cli/installers/lib/core/manifest-generator.js +0 -1374
- package/tools/cli/installers/lib/core/manifest.js +0 -1040
- package/tools/cli/installers/lib/custom/handler.js +0 -358
- package/tools/cli/installers/lib/ide/_base-ide.js +0 -673
- package/tools/cli/installers/lib/ide/_config-driven.js +0 -1058
- package/tools/cli/installers/lib/ide/platform-codes.js +0 -100
- package/tools/cli/installers/lib/ide/platform-codes.yaml +0 -321
- package/tools/cli/installers/lib/ide/shared/agent-command-generator.js +0 -181
- package/tools/cli/installers/lib/ide/shared/module-injections.js +0 -136
- package/tools/cli/installers/lib/ide/shared/task-tool-command-generator.js +0 -368
- package/tools/cli/installers/lib/ide/shared/workflow-command-generator.js +0 -179
- package/tools/cli/installers/lib/ide/shared/xiaoma-artifacts.js +0 -181
- package/tools/cli/installers/lib/ide/templates/agent-command-template.md +0 -14
- package/tools/cli/installers/lib/ide/templates/combined/antigravity.md +0 -8
- package/tools/cli/installers/lib/ide/templates/combined/default-agent.md +0 -15
- package/tools/cli/installers/lib/ide/templates/combined/default-task.md +0 -10
- package/tools/cli/installers/lib/ide/templates/combined/default-tool.md +0 -10
- package/tools/cli/installers/lib/ide/templates/combined/default-workflow.md +0 -6
- package/tools/cli/installers/lib/ide/templates/combined/gemini-agent.toml +0 -14
- package/tools/cli/installers/lib/ide/templates/combined/gemini-task.toml +0 -11
- package/tools/cli/installers/lib/ide/templates/combined/gemini-tool.toml +0 -11
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow-yaml.toml +0 -16
- package/tools/cli/installers/lib/ide/templates/combined/gemini-workflow.toml +0 -14
- package/tools/cli/installers/lib/ide/templates/combined/kiro-agent.md +0 -16
- package/tools/cli/installers/lib/ide/templates/combined/kiro-task.md +0 -9
- package/tools/cli/installers/lib/ide/templates/combined/kiro-tool.md +0 -9
- package/tools/cli/installers/lib/ide/templates/combined/kiro-workflow.md +0 -7
- package/tools/cli/installers/lib/ide/templates/combined/opencode-agent.md +0 -15
- package/tools/cli/installers/lib/ide/templates/combined/opencode-task.md +0 -13
- package/tools/cli/installers/lib/ide/templates/combined/opencode-tool.md +0 -13
- package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow-yaml.md +0 -16
- package/tools/cli/installers/lib/ide/templates/combined/opencode-workflow.md +0 -16
- package/tools/cli/installers/lib/ide/templates/combined/rovodev.md +0 -9
- package/tools/cli/installers/lib/ide/templates/combined/trae.md +0 -9
- package/tools/cli/installers/lib/ide/templates/combined/windsurf-workflow.md +0 -10
- package/tools/cli/installers/lib/ide/templates/split/.gitkeep +0 -0
- package/tools/cli/installers/lib/modules/external-manager.js +0 -136
- package/tools/cli/installers/lib/modules/manager.js +0 -1382
- package/tools/cli/lib/activation-builder.js +0 -165
- package/tools/cli/lib/agent/compiler.js +0 -516
- package/tools/cli/lib/agent/installer.js +0 -680
- package/tools/cli/lib/agent/template-engine.js +0 -152
- package/tools/cli/lib/agent-analyzer.js +0 -97
- package/tools/cli/lib/agent-party-generator.js +0 -194
- package/tools/cli/lib/cli-utils.js +0 -182
- package/tools/cli/lib/config.js +0 -213
- package/tools/cli/lib/platform-codes.js +0 -116
- package/tools/cli/lib/project-root.js +0 -77
- package/tools/cli/lib/ui.js +0 -1960
- package/tools/cli/lib/xml-handler.js +0 -177
- package/tools/cli/lib/xml-to-markdown.js +0 -82
- package/tools/cli/lib/yaml-xml-builder.js +0 -570
- package/tools/platform-codes.yaml +0 -157
- package/tools/schema/agent.js +0 -489
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/SKILL.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/brain-methods.csv +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-01-session-setup.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-01b-continue.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-02a-user-selected.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-02b-ai-recommended.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-02c-random-selection.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-02d-progressive-flow.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/steps/step-04-idea-organization.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-brainstorming/template.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-distillator/SKILL.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-distillator/agents/distillate-compressor.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-distillator/agents/round-trip-reconstructor.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-distillator/resources/compression-rules.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-distillator/resources/splitting-strategy.md +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-distillator/scripts/tests/test_analyze_sources.py +0 -0
- /package/src/{core/skills → core-skills}/xiaoma-distillator/xiaoma-skill-manifest.yaml +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-01-init.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-02-domain-analysis.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-03-competitive-landscape.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-04-regulatory-focus.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-domain-research/domain-steps/step-05-technical-trends.md +0 -0
- /package/src/{xmc/workflows/1-analysis/research → xmc-skills/1-analysis/research/xiaoma-domain-research}/research.template.md +0 -0
- /package/src/{xmc/workflows/1-analysis/research/xiaoma-domain-research → xmc-skills/1-analysis/research/xiaoma-market-research}/research.template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-01-init.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-02-customer-behavior.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-03-customer-pain-points.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-04-customer-decisions.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-market-research/steps/step-05-competitive-analysis.md +0 -0
- /package/src/{xmc/workflows/1-analysis/research/xiaoma-market-research → xmc-skills/1-analysis/research/xiaoma-technical-research}/research.template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-01-init.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-02-technical-overview.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-03-integration-patterns.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-04-architectural-patterns.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/research/xiaoma-technical-research/technical-steps/step-05-implementation-research.md +0 -0
- /package/src/{xmc/workflows/1-analysis/auto-requirements-pipeline → xmc-skills/1-analysis/xiaoma-auto-requirements-pipeline}/SKILL.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/checklist.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/documentation-requirements.csv +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/instructions.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/deep-dive-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/index-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/project-overview-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/project-scan-report-schema.json +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/templates/source-tree-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/workflows/deep-dive-workflow.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/1-analysis}/xiaoma-document-project/workflows/full-scan-workflow.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/SKILL.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/agents/artifact-analyzer.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/agents/opportunity-reviewer.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/agents/skeptic-reviewer.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/agents/web-researcher.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/prompts/contextual-discovery.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/prompts/draft-and-review.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/prompts/finalize.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/prompts/guided-elicitation.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/resources/brief-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/1-analysis/xiaoma-product-brief-preview/xiaoma-manifest.json +0 -0
- /package/src/{core/skills/xiaoma-advanced-elicitation → xmc-skills/1-analysis/xiaoma-product-brief-preview}/xiaoma-skill-manifest.yaml +0 -0
- /package/src/{core/tasks/xiaoma-create-prd/data → xmc-skills/2-plan-workflows/xiaoma-prd/assets}/domain-complexity.csv +0 -0
- /package/src/{core/tasks/xiaoma-create-prd/data → xmc-skills/2-plan-workflows/xiaoma-prd/assets}/project-types.csv +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-04-ux-alignment.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/steps/step-05-epic-quality-review.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-check-implementation-readiness/templates/readiness-report-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/architecture-decision-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/data/domain-complexity.csv +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/data/project-types.csv +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-01-init.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-01b-continue.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-02-context.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-03-starter.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-04-decisions.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-05-patterns.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-architecture/steps/step-06-structure.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/steps/step-01-validate-prerequisites.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/steps/step-03-create-stories.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/3-solutioning/xiaoma-create-epics-and-stories/templates/epics-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/3-solutioning}/xiaoma-generate-project-context/project-context-template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/3-solutioning}/xiaoma-generate-project-context/steps/step-01-discover.md +0 -0
- /package/src/{xmc/workflows → xmc-skills/3-solutioning}/xiaoma-generate-project-context/steps/step-02-generate.md +0 -0
- /package/src/{xmc/workflows/4-implementation/auto-story-pipeline → xmc-skills/4-implementation/xiaoma-auto-story-pipeline}/SKILL.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-create-story/checklist.md +0 -0
- /package/src/{xmc/workflows/4-implementation/xiaoma-code-review → xmc-skills/4-implementation/xiaoma-create-story}/discover-inputs.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-create-story/template.md +0 -0
- /package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-dev-story/checklist.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/SKILL.md +0 -0
- /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
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-02-plan.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-03-implement.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-04-review.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/steps/step-05-present.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/tech-spec-template.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-dev-new-preview/workflow.md +0 -0
- /package/src/{core/skills/xiaoma-brainstorming → xmc-skills/4-implementation/xiaoma-quick-dev-new-preview}/xiaoma-skill-manifest.yaml +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/SKILL.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/steps/step-01-understand.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/steps/step-02-investigate.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/steps/step-03-generate.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/steps/step-04-review.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/tech-spec-template.md +0 -0
- /package/src/{xmc/workflows/xiaoma-quick-flow → xmc-skills/4-implementation}/xiaoma-quick-spec/workflow.md +0 -0
- /package/src/{core/skills/xiaoma-editorial-review-prose → xmc-skills/4-implementation/xiaoma-quick-spec}/xiaoma-skill-manifest.yaml +0 -0
- /package/src/{xmc/workflows → xmc-skills}/4-implementation/xiaoma-sprint-planning/checklist.md +0 -0
- /package/src/{xmc/workflows/5-full-pipeline/auto-full-pipeline → xmc-skills/5-full-pipeline/xiaoma-auto-full-pipeline}/SKILL.md +0 -0
- /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
- /package/{patent-disclosure-optimized → src/xpm-skills/xiaoma-patent-mining}/references/disclosure-template.md +0 -0
- /package/{patent-disclosure-optimized → src/xpm-skills/xiaoma-patent-mining}/references/mining-principles.md +0 -0
- /package/src/{core/skills/xiaoma-editorial-review-structure → xpm-skills/xiaoma-patent-mining}/xiaoma-skill-manifest.yaml +0 -0
- /package/tools/{cli/installers → installer}/install-messages.yaml +0 -0
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
let _clack = null;
|
|
11
11
|
let _clackCore = null;
|
|
12
12
|
let _picocolors = null;
|
|
13
|
+
const fs = require('node:fs');
|
|
14
|
+
const os = require('node:os');
|
|
15
|
+
const path = require('node:path');
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
18
|
* Lazy-load @clack/prompts (ESM module)
|
|
@@ -498,26 +501,6 @@ async function password(options) {
|
|
|
498
501
|
return result;
|
|
499
502
|
}
|
|
500
503
|
|
|
501
|
-
/**
|
|
502
|
-
* Group multiple prompts together
|
|
503
|
-
* @param {Object} prompts - Object of prompt functions
|
|
504
|
-
* @param {Object} [options] - Group options
|
|
505
|
-
* @returns {Promise<Object>} Object with all answers
|
|
506
|
-
*/
|
|
507
|
-
async function group(prompts, options = {}) {
|
|
508
|
-
const clack = await getClack();
|
|
509
|
-
|
|
510
|
-
const result = await clack.group(prompts, {
|
|
511
|
-
onCancel: () => {
|
|
512
|
-
clack.cancel('Operation cancelled');
|
|
513
|
-
process.exit(0);
|
|
514
|
-
},
|
|
515
|
-
...options,
|
|
516
|
-
});
|
|
517
|
-
|
|
518
|
-
return result;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
504
|
/**
|
|
522
505
|
* Run tasks with spinner feedback
|
|
523
506
|
* @param {Array} tasks - Array of task objects [{title, task, enabled?}]
|
|
@@ -578,42 +561,6 @@ async function box(content, title, options) {
|
|
|
578
561
|
clack.box(content, title, options);
|
|
579
562
|
}
|
|
580
563
|
|
|
581
|
-
/**
|
|
582
|
-
* Create a progress bar for visualizing task completion
|
|
583
|
-
* @param {Object} [options] - Progress options (max, style, etc.)
|
|
584
|
-
* @returns {Promise<Object>} Progress controller with start, advance, stop methods
|
|
585
|
-
*/
|
|
586
|
-
async function progress(options) {
|
|
587
|
-
const clack = await getClack();
|
|
588
|
-
return clack.progress(options);
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* Create a task log for displaying scrolling subprocess output
|
|
593
|
-
* @param {Object} options - TaskLog options (title, limit, retainLog)
|
|
594
|
-
* @returns {Promise<Object>} TaskLog controller with message, success, error methods
|
|
595
|
-
*/
|
|
596
|
-
async function taskLog(options) {
|
|
597
|
-
const clack = await getClack();
|
|
598
|
-
return clack.taskLog(options);
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* File system path prompt with autocomplete
|
|
603
|
-
* @param {Object} options - Path options
|
|
604
|
-
* @param {string} options.message - The prompt message
|
|
605
|
-
* @param {string} [options.initialValue] - Initial path value
|
|
606
|
-
* @param {boolean} [options.directory=false] - Only allow directories
|
|
607
|
-
* @param {Function} [options.validate] - Validation function
|
|
608
|
-
* @returns {Promise<string>} Selected path
|
|
609
|
-
*/
|
|
610
|
-
async function pathPrompt(options) {
|
|
611
|
-
const clack = await getClack();
|
|
612
|
-
const result = await clack.path(options);
|
|
613
|
-
await handleCancel(result);
|
|
614
|
-
return result;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
564
|
/**
|
|
618
565
|
* Autocomplete single-select prompt with type-ahead filtering
|
|
619
566
|
* @param {Object} options - Autocomplete options
|
|
@@ -631,50 +578,151 @@ async function autocomplete(options) {
|
|
|
631
578
|
return result;
|
|
632
579
|
}
|
|
633
580
|
|
|
581
|
+
function hasPathSeparator(value) {
|
|
582
|
+
return value.endsWith('/') || value.endsWith('\\');
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
function expandHome(input) {
|
|
586
|
+
if (!input) return input;
|
|
587
|
+
if (input === '~') return os.homedir();
|
|
588
|
+
if (input.startsWith('~/') || input.startsWith('~\\')) {
|
|
589
|
+
return path.join(os.homedir(), input.slice(2));
|
|
590
|
+
}
|
|
591
|
+
return input;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
function toDirectoryOption(value, label = value, synthetic = false) {
|
|
595
|
+
return { value, label, synthetic };
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
function isExistingDirectory(value) {
|
|
599
|
+
try {
|
|
600
|
+
return fs.existsSync(value) && fs.statSync(value).isDirectory();
|
|
601
|
+
} catch {
|
|
602
|
+
return false;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
function listDirectoryOptions(input, options) {
|
|
607
|
+
const cwd = options.cwd || process.cwd();
|
|
608
|
+
const rawInput = input.trim();
|
|
609
|
+
const expandedInput = expandHome(rawInput);
|
|
610
|
+
const trailingSep = hasPathSeparator(rawInput) || hasPathSeparator(expandedInput);
|
|
611
|
+
const resolvedInput = expandedInput ? path.resolve(cwd, expandedInput) : cwd;
|
|
612
|
+
const browseDir = expandedInput && !trailingSep && !isExistingDirectory(resolvedInput) ? path.dirname(resolvedInput) : resolvedInput;
|
|
613
|
+
const prefix = expandedInput && browseDir !== resolvedInput ? path.basename(resolvedInput).toLowerCase() : '';
|
|
614
|
+
const results = [];
|
|
615
|
+
|
|
616
|
+
if (!trailingSep && isExistingDirectory(resolvedInput)) {
|
|
617
|
+
results.push(toDirectoryOption(resolvedInput, `. (use this directory)`));
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
if (isExistingDirectory(browseDir)) {
|
|
621
|
+
try {
|
|
622
|
+
for (const entry of fs.readdirSync(browseDir, { withFileTypes: true })) {
|
|
623
|
+
if (!entry.isDirectory()) continue;
|
|
624
|
+
if (prefix && !entry.name.toLowerCase().startsWith(prefix)) continue;
|
|
625
|
+
const fullPath = path.join(browseDir, entry.name);
|
|
626
|
+
if (!results.some((option) => option.value === fullPath)) {
|
|
627
|
+
results.push(toDirectoryOption(fullPath));
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
} catch {
|
|
631
|
+
// Skip unreadable directories; validation still reports path issues.
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
const validation = options.validate?.(rawInput);
|
|
636
|
+
const hasMatchingOption = results.some((option) => option.value === resolvedInput);
|
|
637
|
+
if (expandedInput && !validation && !hasMatchingOption) {
|
|
638
|
+
results.unshift(toDirectoryOption(resolvedInput, `Create/use: ${resolvedInput}`, true));
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
return results;
|
|
642
|
+
}
|
|
643
|
+
|
|
634
644
|
/**
|
|
635
|
-
*
|
|
636
|
-
* @
|
|
637
|
-
*
|
|
638
|
-
* @param {
|
|
639
|
-
* @
|
|
645
|
+
* Directory prompt with autocomplete candidates and create-directory support.
|
|
646
|
+
* Uses @clack/core directly so typed paths that do not exist yet can still be
|
|
647
|
+
* submitted when validation allows creating them.
|
|
648
|
+
* @param {Object} options - Prompt options
|
|
649
|
+
* @param {string} options.message - Prompt message
|
|
650
|
+
* @param {string} [options.default] - Default directory
|
|
651
|
+
* @param {string} [options.placeholder] - Placeholder text
|
|
652
|
+
* @param {Function} [options.validate] - Sync validation function
|
|
653
|
+
* @returns {Promise<string>} Selected or typed directory path
|
|
640
654
|
*/
|
|
641
|
-
async function
|
|
642
|
-
const
|
|
643
|
-
const
|
|
655
|
+
async function directory(options) {
|
|
656
|
+
const core = await getClackCore();
|
|
657
|
+
const color = await getPicocolors();
|
|
658
|
+
const tabCompletion = {
|
|
659
|
+
prefix: '',
|
|
660
|
+
index: -1,
|
|
661
|
+
options: [],
|
|
662
|
+
lastValue: '',
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
let prompt;
|
|
666
|
+
prompt = new core.AutocompletePrompt({
|
|
667
|
+
initialValue: options.default,
|
|
668
|
+
options: () => listDirectoryOptions(prompt?.userInput || '', options),
|
|
669
|
+
filter: () => true,
|
|
670
|
+
validate: (value) => options.validate?.(value ?? prompt.userInput),
|
|
671
|
+
render() {
|
|
672
|
+
const title = `${color.gray('◆')} ${options.message}`;
|
|
673
|
+
const bar = color.gray('│');
|
|
674
|
+
const barEnd = color.gray('└');
|
|
675
|
+
const userInput = this.userInput;
|
|
676
|
+
const placeholder = options.placeholder || options.default;
|
|
677
|
+
const inputDisplay = userInput ? this.userInputWithCursor : `${color.inverse(color.hidden('_'))}${color.dim(placeholder || '')}`;
|
|
678
|
+
const errorLine = this.state === 'error' ? [`${color.yellow('│')} ${color.yellow(this.error)}`] : [];
|
|
679
|
+
|
|
680
|
+
switch (this.state) {
|
|
681
|
+
case 'submit': {
|
|
682
|
+
return `${color.gray('◇')} ${options.message}\n${bar} ${color.dim(this.value || '')}`;
|
|
683
|
+
}
|
|
684
|
+
case 'cancel': {
|
|
685
|
+
return `${color.gray('◇')} ${options.message}\n${bar} ${color.strikethrough(color.dim(userInput || ''))}`;
|
|
686
|
+
}
|
|
687
|
+
default: {
|
|
688
|
+
return [title, `${bar} ${inputDisplay}`, ...errorLine, barEnd].join('\n');
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
const hasSetUserInput = typeof prompt._setUserInput === 'function';
|
|
695
|
+
const hasClearUserInput = typeof prompt._clearUserInput === 'function';
|
|
696
|
+
|
|
697
|
+
prompt.on('key', (_, key) => {
|
|
698
|
+
if (key?.name !== 'tab') return;
|
|
699
|
+
if (!hasSetUserInput) return; // @clack/core API surface changed — skip Tab silently.
|
|
700
|
+
const currentInput = prompt.userInput;
|
|
701
|
+
const isContinuingCycle = tabCompletion.lastValue && currentInput === tabCompletion.lastValue;
|
|
702
|
+
const completionOptions = isContinuingCycle ? tabCompletion.options : prompt.filteredOptions.filter((option) => !option.synthetic);
|
|
703
|
+
if (completionOptions.length === 0) return;
|
|
704
|
+
|
|
705
|
+
if (isContinuingCycle) {
|
|
706
|
+
tabCompletion.index = (tabCompletion.index + 1) % completionOptions.length;
|
|
707
|
+
} else {
|
|
708
|
+
tabCompletion.prefix = currentInput;
|
|
709
|
+
tabCompletion.options = completionOptions;
|
|
710
|
+
tabCompletion.index = 0;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
const focusedOption = completionOptions[tabCompletion.index];
|
|
714
|
+
if (!focusedOption) return;
|
|
715
|
+
const completedValue = focusedOption.value;
|
|
716
|
+
tabCompletion.lastValue = completedValue;
|
|
717
|
+
if (hasClearUserInput) prompt._clearUserInput();
|
|
718
|
+
prompt._setUserInput(completedValue, true);
|
|
719
|
+
});
|
|
720
|
+
|
|
721
|
+
const result = await prompt.prompt();
|
|
644
722
|
await handleCancel(result);
|
|
645
723
|
return result;
|
|
646
724
|
}
|
|
647
725
|
|
|
648
|
-
/**
|
|
649
|
-
* Stream messages with dynamic content (for LLMs, generators, etc.)
|
|
650
|
-
*/
|
|
651
|
-
const stream = {
|
|
652
|
-
async info(generator) {
|
|
653
|
-
const clack = await getClack();
|
|
654
|
-
return clack.stream.info(generator);
|
|
655
|
-
},
|
|
656
|
-
async success(generator) {
|
|
657
|
-
const clack = await getClack();
|
|
658
|
-
return clack.stream.success(generator);
|
|
659
|
-
},
|
|
660
|
-
async step(generator) {
|
|
661
|
-
const clack = await getClack();
|
|
662
|
-
return clack.stream.step(generator);
|
|
663
|
-
},
|
|
664
|
-
async warn(generator) {
|
|
665
|
-
const clack = await getClack();
|
|
666
|
-
return clack.stream.warn(generator);
|
|
667
|
-
},
|
|
668
|
-
async error(generator) {
|
|
669
|
-
const clack = await getClack();
|
|
670
|
-
return clack.stream.error(generator);
|
|
671
|
-
},
|
|
672
|
-
async message(generator, options) {
|
|
673
|
-
const clack = await getClack();
|
|
674
|
-
return clack.stream.message(generator, options);
|
|
675
|
-
},
|
|
676
|
-
};
|
|
677
|
-
|
|
678
726
|
/**
|
|
679
727
|
* Get the color utility (picocolors instance from @clack/prompts)
|
|
680
728
|
* @returns {Promise<Object>} The color utility (picocolors)
|
|
@@ -790,20 +838,15 @@ module.exports = {
|
|
|
790
838
|
note,
|
|
791
839
|
box,
|
|
792
840
|
spinner,
|
|
793
|
-
progress,
|
|
794
|
-
taskLog,
|
|
795
841
|
select,
|
|
796
842
|
multiselect,
|
|
797
843
|
autocompleteMultiselect,
|
|
798
844
|
autocomplete,
|
|
799
|
-
|
|
845
|
+
directory,
|
|
800
846
|
confirm,
|
|
801
847
|
text,
|
|
802
|
-
path: pathPrompt,
|
|
803
848
|
password,
|
|
804
|
-
group,
|
|
805
849
|
tasks,
|
|
806
850
|
log,
|
|
807
|
-
stream,
|
|
808
851
|
prompt,
|
|
809
852
|
};
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
// `--set <module>.<key>=<value>` is a post-install patch. The installer runs
|
|
2
|
+
// its normal flow and writes `_xiaoma/config.toml`, `_xiaoma/config.user.toml`,
|
|
3
|
+
// and `_xiaoma/<module>/config.yaml`; afterwards `applySetOverrides` upserts
|
|
4
|
+
// each override into those files.
|
|
5
|
+
//
|
|
6
|
+
// This is intentionally NOT integrated with the prompt/template/schema
|
|
7
|
+
// system. Tradeoffs:
|
|
8
|
+
// - No `result:` template rendering: `--set xmc.project_knowledge=research`
|
|
9
|
+
// writes "research" verbatim. Pass `--set xmc.project_knowledge='{project-root}/research'`
|
|
10
|
+
// if you want the rendered form.
|
|
11
|
+
// - Carry-forward across installs is best-effort: declared schema keys
|
|
12
|
+
// persist via the existingValue path on the next interactive run; values
|
|
13
|
+
// for keys outside any module's schema may need to be re-passed on each
|
|
14
|
+
// install (or edited directly in `_xiaoma/config.toml`).
|
|
15
|
+
// - No "key not in schema" validation: whatever you assert, we write.
|
|
16
|
+
//
|
|
17
|
+
// Names that, when used as object keys, can mutate `Object.prototype` and
|
|
18
|
+
// cascade into every plain-object lookup in the process. The `--set` pipeline
|
|
19
|
+
// assigns into plain `{}` maps keyed by user input, so `--set __proto__.x=1`
|
|
20
|
+
// would otherwise reach `overrides.__proto__[x] = 1` and pollute every plain
|
|
21
|
+
// object. We reject the names at parse time and harden the maps in
|
|
22
|
+
// `parseSetEntries` with `Object.create(null)` for defense-in-depth.
|
|
23
|
+
const PROTOTYPE_POLLUTING_NAMES = new Set(['__proto__', 'prototype', 'constructor']);
|
|
24
|
+
|
|
25
|
+
const path = require('node:path');
|
|
26
|
+
const fs = require('./fs-native');
|
|
27
|
+
const yaml = require('yaml');
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Parse a single `--set <module>.<key>=<value>` entry.
|
|
31
|
+
* @param {string} entry - raw flag value
|
|
32
|
+
* @returns {{module: string, key: string, value: string}}
|
|
33
|
+
* @throws {Error} on malformed input
|
|
34
|
+
*/
|
|
35
|
+
function parseSetEntry(entry) {
|
|
36
|
+
if (typeof entry !== 'string' || entry.length === 0) {
|
|
37
|
+
throw new Error('--set: empty entry. Expected <module>.<key>=<value>');
|
|
38
|
+
}
|
|
39
|
+
const eq = entry.indexOf('=');
|
|
40
|
+
if (eq === -1) {
|
|
41
|
+
throw new Error(`--set "${entry}": missing '='. Expected <module>.<key>=<value>`);
|
|
42
|
+
}
|
|
43
|
+
const lhs = entry.slice(0, eq);
|
|
44
|
+
// Note: only the LHS is trimmed. Values may legitimately contain leading
|
|
45
|
+
// or trailing whitespace (paths with spaces, quoted strings); module / key
|
|
46
|
+
// names cannot, so it's safe to be strict on the left.
|
|
47
|
+
const value = entry.slice(eq + 1);
|
|
48
|
+
const dot = lhs.indexOf('.');
|
|
49
|
+
if (dot === -1) {
|
|
50
|
+
throw new Error(`--set "${entry}": missing '.'. Expected <module>.<key>=<value>`);
|
|
51
|
+
}
|
|
52
|
+
const moduleCode = lhs.slice(0, dot).trim();
|
|
53
|
+
const key = lhs.slice(dot + 1).trim();
|
|
54
|
+
if (!moduleCode || !key) {
|
|
55
|
+
throw new Error(`--set "${entry}": empty module or key. Expected <module>.<key>=<value>`);
|
|
56
|
+
}
|
|
57
|
+
if (PROTOTYPE_POLLUTING_NAMES.has(moduleCode) || PROTOTYPE_POLLUTING_NAMES.has(key)) {
|
|
58
|
+
throw new Error(
|
|
59
|
+
`--set "${entry}": '__proto__', 'prototype', and 'constructor' are reserved and cannot be used as a module or key name.`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
return { module: moduleCode, key, value };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Parse repeated `--set` entries into a `{ module: { key: value } }` map.
|
|
67
|
+
* Later entries overwrite earlier ones for the same key. Both the outer
|
|
68
|
+
* map and the per-module inner maps are `Object.create(null)` so callers
|
|
69
|
+
* that bypass `parseSetEntry`'s name check still can't pollute prototypes.
|
|
70
|
+
*
|
|
71
|
+
* @param {string[]} entries
|
|
72
|
+
* @returns {Object<string, Object<string, string>>}
|
|
73
|
+
*/
|
|
74
|
+
function parseSetEntries(entries) {
|
|
75
|
+
const overrides = Object.create(null);
|
|
76
|
+
if (!Array.isArray(entries)) return overrides;
|
|
77
|
+
for (const entry of entries) {
|
|
78
|
+
const { module: moduleCode, key, value } = parseSetEntry(entry);
|
|
79
|
+
if (!overrides[moduleCode]) overrides[moduleCode] = Object.create(null);
|
|
80
|
+
overrides[moduleCode][key] = value;
|
|
81
|
+
}
|
|
82
|
+
return overrides;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Encode a JS string as a TOML basic string (double-quoted with escapes).
|
|
87
|
+
* @param {string} value
|
|
88
|
+
*/
|
|
89
|
+
function tomlString(value) {
|
|
90
|
+
const s = String(value);
|
|
91
|
+
// Per the TOML spec, basic strings escape `\`, `"`, and control characters.
|
|
92
|
+
return (
|
|
93
|
+
'"' +
|
|
94
|
+
s
|
|
95
|
+
.replaceAll('\\', '\\\\')
|
|
96
|
+
.replaceAll('"', String.raw`\"`)
|
|
97
|
+
.replaceAll('\b', String.raw`\b`)
|
|
98
|
+
.replaceAll('\f', String.raw`\f`)
|
|
99
|
+
.replaceAll('\n', String.raw`\n`)
|
|
100
|
+
.replaceAll('\r', String.raw`\r`)
|
|
101
|
+
.replaceAll('\t', String.raw`\t`) +
|
|
102
|
+
'"'
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Section header for a given module code.
|
|
108
|
+
* - `core` → `[core]`
|
|
109
|
+
* - `<other>` → `[modules.<other>]`
|
|
110
|
+
*
|
|
111
|
+
* Mirrors the layout `manifest-generator.writeCentralConfig` produces.
|
|
112
|
+
*/
|
|
113
|
+
function sectionHeader(moduleCode) {
|
|
114
|
+
return moduleCode === 'core' ? '[core]' : `[modules.${moduleCode}]`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Insert or update `key = value` inside a TOML section, returning the new
|
|
119
|
+
* file content. The format produced by the installer is regular and small
|
|
120
|
+
* enough that a line scanner is more reliable than pulling in a TOML
|
|
121
|
+
* round-tripper that would normalize the file's existing whitespace and
|
|
122
|
+
* comment structure.
|
|
123
|
+
*
|
|
124
|
+
* - If `[section]` exists and contains `key`, replace the value on that
|
|
125
|
+
* line (preserving any inline comment after the value).
|
|
126
|
+
* - If `[section]` exists but `key` doesn't, append `key = value` at the
|
|
127
|
+
* end of the section (before the next `[...]` header or EOF, skipping
|
|
128
|
+
* trailing blank lines so the section stays tidy).
|
|
129
|
+
* - If `[section]` doesn't exist, append a new section block at EOF.
|
|
130
|
+
*
|
|
131
|
+
* @param {string} content existing file content (may be empty)
|
|
132
|
+
* @param {string} section exact `[section]` header to target
|
|
133
|
+
* @param {string} key
|
|
134
|
+
* @param {string} valueToml already TOML-encoded value (e.g. `"foo"`)
|
|
135
|
+
* @returns {string} new content
|
|
136
|
+
*/
|
|
137
|
+
function upsertTomlKey(content, section, key, valueToml) {
|
|
138
|
+
const lines = content.split('\n');
|
|
139
|
+
// Track whether the file already ended with a newline so we can preserve
|
|
140
|
+
// that. `split('\n')` on `"a\n"` yields `['a', '']`, which gives us the
|
|
141
|
+
// marker we need.
|
|
142
|
+
const hadTrailingNewline = lines.length > 0 && lines.at(-1) === '';
|
|
143
|
+
if (hadTrailingNewline) lines.pop();
|
|
144
|
+
|
|
145
|
+
// Locate the target section.
|
|
146
|
+
const sectionStart = lines.findIndex((line) => line.trim() === section);
|
|
147
|
+
if (sectionStart === -1) {
|
|
148
|
+
// Section doesn't exist — append a new block. Pad with a blank line if
|
|
149
|
+
// the file is non-empty so sections stay visually separated.
|
|
150
|
+
if (lines.length > 0 && lines.at(-1).trim() !== '') lines.push('');
|
|
151
|
+
lines.push(section, `${key} = ${valueToml}`);
|
|
152
|
+
return lines.join('\n') + (hadTrailingNewline ? '\n' : '');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Find the section's end (next `[...]` header or EOF).
|
|
156
|
+
let sectionEnd = lines.length;
|
|
157
|
+
for (let i = sectionStart + 1; i < lines.length; i++) {
|
|
158
|
+
if (/^\s*\[/.test(lines[i])) {
|
|
159
|
+
sectionEnd = i;
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Look for the key inside the section. Match `<key> = ...` allowing
|
|
165
|
+
// optional leading whitespace; preserve the comment tail (`# ...`) if any.
|
|
166
|
+
const keyPattern = new RegExp(`^(\\s*)${escapeRegExp(key)}\\s*=\\s*(.*)$`);
|
|
167
|
+
for (let i = sectionStart + 1; i < sectionEnd; i++) {
|
|
168
|
+
const match = lines[i].match(keyPattern);
|
|
169
|
+
if (match) {
|
|
170
|
+
const indent = match[1];
|
|
171
|
+
// Preserve trailing comment if present. We split on the first `#` that
|
|
172
|
+
// is preceded by whitespace — TOML strings can't contain unescaped `#`
|
|
173
|
+
// in basic-string form so this is safe for the values we emit.
|
|
174
|
+
const tail = match[2];
|
|
175
|
+
const commentIdx = tail.search(/\s+#/);
|
|
176
|
+
const commentSuffix = commentIdx === -1 ? '' : tail.slice(commentIdx);
|
|
177
|
+
lines[i] = `${indent}${key} = ${valueToml}${commentSuffix}`;
|
|
178
|
+
return lines.join('\n') + (hadTrailingNewline ? '\n' : '');
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Section exists but key doesn't. Insert before the next section header,
|
|
183
|
+
// skipping trailing blank lines inside the current section so the new
|
|
184
|
+
// entry sits with its siblings.
|
|
185
|
+
let insertAt = sectionEnd;
|
|
186
|
+
while (insertAt > sectionStart + 1 && lines[insertAt - 1].trim() === '') {
|
|
187
|
+
insertAt--;
|
|
188
|
+
}
|
|
189
|
+
lines.splice(insertAt, 0, `${key} = ${valueToml}`);
|
|
190
|
+
return lines.join('\n') + (hadTrailingNewline ? '\n' : '');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function escapeRegExp(s) {
|
|
194
|
+
return s.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Look up `[section] key` in a TOML file. Returns true if the file exists,
|
|
199
|
+
* the section is present, and `key` is set within it. Used by
|
|
200
|
+
* `applySetOverrides` to route an override to the file that already owns
|
|
201
|
+
* the key (so user-scope keys land in `config.user.toml`, team-scope keys
|
|
202
|
+
* land in `config.toml`).
|
|
203
|
+
*/
|
|
204
|
+
async function tomlHasKey(filePath, section, key) {
|
|
205
|
+
if (!(await fs.pathExists(filePath))) return false;
|
|
206
|
+
const content = await fs.readFile(filePath, 'utf8');
|
|
207
|
+
const lines = content.split('\n');
|
|
208
|
+
const sectionStart = lines.findIndex((line) => line.trim() === section);
|
|
209
|
+
if (sectionStart === -1) return false;
|
|
210
|
+
const keyPattern = new RegExp(`^\\s*${escapeRegExp(key)}\\s*=`);
|
|
211
|
+
for (let i = sectionStart + 1; i < lines.length; i++) {
|
|
212
|
+
if (/^\s*\[/.test(lines[i])) return false;
|
|
213
|
+
if (keyPattern.test(lines[i])) return true;
|
|
214
|
+
}
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Apply parsed `--set` overrides to the central TOML files written by the
|
|
220
|
+
* installer. Called at the end of an install / quick-update.
|
|
221
|
+
*
|
|
222
|
+
* Routing per (module, key):
|
|
223
|
+
* 1. If `_xiaoma/config.user.toml` already has `[section] key`, update there
|
|
224
|
+
* (user-scope key like `core.user_name`, `xmc.user_skill_level`).
|
|
225
|
+
* 2. Otherwise update `_xiaoma/config.toml` (team scope, the default).
|
|
226
|
+
*
|
|
227
|
+
* The schema-correct user/team partition lives in `manifest-generator`. We
|
|
228
|
+
* intentionally don't re-read module schemas here — the only goal is to
|
|
229
|
+
* match the file the installer just wrote the key to. For brand-new keys
|
|
230
|
+
* (not in either file yet), team scope is the safe default.
|
|
231
|
+
*
|
|
232
|
+
* @param {Object<string, Object<string, string>>} overrides
|
|
233
|
+
* @param {string} xiaomaDir absolute path to `_xiaoma/`
|
|
234
|
+
* @returns {Promise<Array<{module:string,key:string,scope:'team'|'user',file:string}>>}
|
|
235
|
+
* a list of applied entries (for caller logging)
|
|
236
|
+
*/
|
|
237
|
+
async function applySetOverrides(overrides, xiaomaDir) {
|
|
238
|
+
const applied = [];
|
|
239
|
+
if (!overrides || typeof overrides !== 'object') return applied;
|
|
240
|
+
|
|
241
|
+
const teamPath = path.join(xiaomaDir, 'config.toml');
|
|
242
|
+
const userPath = path.join(xiaomaDir, 'config.user.toml');
|
|
243
|
+
|
|
244
|
+
for (const moduleCode of Object.keys(overrides)) {
|
|
245
|
+
// Skip overrides for modules not actually installed. The installer writes
|
|
246
|
+
// `_xiaoma/<module>/config.yaml` for every installed module (including core),
|
|
247
|
+
// so its presence is a reliable "is this module here?" signal that works
|
|
248
|
+
// for both fresh installs and quick-updates without coupling to caller-
|
|
249
|
+
// supplied module lists.
|
|
250
|
+
const moduleConfigYaml = path.join(xiaomaDir, moduleCode, 'config.yaml');
|
|
251
|
+
if (!(await fs.pathExists(moduleConfigYaml))) {
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const section = sectionHeader(moduleCode);
|
|
256
|
+
const moduleOverrides = overrides[moduleCode] || {};
|
|
257
|
+
for (const key of Object.keys(moduleOverrides)) {
|
|
258
|
+
const value = moduleOverrides[key];
|
|
259
|
+
const valueToml = tomlString(value);
|
|
260
|
+
|
|
261
|
+
const userOwnsIt = await tomlHasKey(userPath, section, key);
|
|
262
|
+
const targetPath = userOwnsIt ? userPath : teamPath;
|
|
263
|
+
|
|
264
|
+
// The team file always exists post-install; the user file only exists
|
|
265
|
+
// if the install wrote at least one user-scope key. If we're routing to
|
|
266
|
+
// it but it doesn't exist yet, create it with a minimal header so it
|
|
267
|
+
// has the same shape as installer-written user toml.
|
|
268
|
+
let content = '';
|
|
269
|
+
if (await fs.pathExists(targetPath)) {
|
|
270
|
+
content = await fs.readFile(targetPath, 'utf8');
|
|
271
|
+
} else {
|
|
272
|
+
content = '# Personal overrides for _xiaoma/config.toml.\n';
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const next = upsertTomlKey(content, section, key, valueToml);
|
|
276
|
+
await fs.writeFile(targetPath, next, 'utf8');
|
|
277
|
+
applied.push({
|
|
278
|
+
module: moduleCode,
|
|
279
|
+
key,
|
|
280
|
+
scope: userOwnsIt ? 'user' : 'team',
|
|
281
|
+
file: path.basename(targetPath),
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// Also patch the per-module yaml (`_xiaoma/<module>/config.yaml`). The
|
|
286
|
+
// installer reads this file as `_existingConfig` on subsequent runs and
|
|
287
|
+
// surfaces declared values as prompt defaults — under `--yes` those
|
|
288
|
+
// defaults are accepted, so patching here gives `--set` natural
|
|
289
|
+
// carry-forward for declared keys without needing schema-strict
|
|
290
|
+
// partition exemptions in the manifest writer. For undeclared keys the
|
|
291
|
+
// value lives in the per-module yaml but won't be re-emitted into
|
|
292
|
+
// config.toml on the next install (the schema-strict partition drops
|
|
293
|
+
// it); re-pass `--set` if you need it sticky.
|
|
294
|
+
const moduleYamlPath = path.join(xiaomaDir, moduleCode, 'config.yaml');
|
|
295
|
+
if (await fs.pathExists(moduleYamlPath)) {
|
|
296
|
+
try {
|
|
297
|
+
const text = await fs.readFile(moduleYamlPath, 'utf8');
|
|
298
|
+
const parsed = yaml.parse(text);
|
|
299
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
300
|
+
// Preserve the installer's banner header (everything up to the
|
|
301
|
+
// first non-comment line) so `_xiaoma/<module>/config.yaml` keeps
|
|
302
|
+
// its provenance comments after we round-trip it.
|
|
303
|
+
const headerLines = [];
|
|
304
|
+
for (const line of text.split('\n')) {
|
|
305
|
+
if (line.startsWith('#') || line.trim() === '') {
|
|
306
|
+
headerLines.push(line);
|
|
307
|
+
} else {
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
for (const key of Object.keys(moduleOverrides)) {
|
|
312
|
+
parsed[key] = moduleOverrides[key];
|
|
313
|
+
}
|
|
314
|
+
const body = yaml.stringify(parsed, { indent: 2, lineWidth: 0, minContentWidth: 0 });
|
|
315
|
+
const header = headerLines.length > 0 ? headerLines.join('\n') + '\n' : '';
|
|
316
|
+
await fs.writeFile(moduleYamlPath, header + body, 'utf8');
|
|
317
|
+
}
|
|
318
|
+
} catch {
|
|
319
|
+
// Per-module yaml unparseable — skip silently. The central toml was
|
|
320
|
+
// already patched above, which is the user-visible state for the
|
|
321
|
+
// current install. Carry-forward will fail next install but the
|
|
322
|
+
// current install reflects the override.
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
return applied;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
module.exports = { parseSetEntry, parseSetEntries, applySetOverrides, upsertTomlKey, tomlString };
|