scm-method 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/.claude-plugin/marketplace.json +77 -0
  2. package/AGENTS.md +12 -0
  3. package/LICENSE +30 -0
  4. package/README.md +109 -0
  5. package/README_CN.md +108 -0
  6. package/package.json +110 -0
  7. package/src/bmm-skills/1-analysis/research/scm-domain-research/SKILL.md +6 -0
  8. package/src/bmm-skills/1-analysis/research/scm-domain-research/domain-steps/step-01-init.md +137 -0
  9. package/src/bmm-skills/1-analysis/research/scm-domain-research/domain-steps/step-02-domain-analysis.md +229 -0
  10. package/src/bmm-skills/1-analysis/research/scm-domain-research/domain-steps/step-03-competitive-landscape.md +238 -0
  11. package/src/bmm-skills/1-analysis/research/scm-domain-research/domain-steps/step-04-regulatory-focus.md +206 -0
  12. package/src/bmm-skills/1-analysis/research/scm-domain-research/domain-steps/step-05-technical-trends.md +234 -0
  13. package/src/bmm-skills/1-analysis/research/scm-domain-research/domain-steps/step-06-research-synthesis.md +444 -0
  14. package/src/bmm-skills/1-analysis/research/scm-domain-research/research.template.md +29 -0
  15. package/src/bmm-skills/1-analysis/research/scm-domain-research/workflow.md +51 -0
  16. package/src/bmm-skills/1-analysis/research/scm-market-research/SKILL.md +6 -0
  17. package/src/bmm-skills/1-analysis/research/scm-market-research/research.template.md +29 -0
  18. package/src/bmm-skills/1-analysis/research/scm-market-research/steps/step-01-init.md +184 -0
  19. package/src/bmm-skills/1-analysis/research/scm-market-research/steps/step-02-customer-behavior.md +239 -0
  20. package/src/bmm-skills/1-analysis/research/scm-market-research/steps/step-03-customer-pain-points.md +251 -0
  21. package/src/bmm-skills/1-analysis/research/scm-market-research/steps/step-04-customer-decisions.md +261 -0
  22. package/src/bmm-skills/1-analysis/research/scm-market-research/steps/step-05-competitive-analysis.md +173 -0
  23. package/src/bmm-skills/1-analysis/research/scm-market-research/steps/step-06-research-completion.md +478 -0
  24. package/src/bmm-skills/1-analysis/research/scm-market-research/workflow.md +51 -0
  25. package/src/bmm-skills/1-analysis/research/scm-technical-research/SKILL.md +6 -0
  26. package/src/bmm-skills/1-analysis/research/scm-technical-research/research.template.md +29 -0
  27. package/src/bmm-skills/1-analysis/research/scm-technical-research/technical-steps/step-01-init.md +137 -0
  28. package/src/bmm-skills/1-analysis/research/scm-technical-research/technical-steps/step-02-technical-overview.md +239 -0
  29. package/src/bmm-skills/1-analysis/research/scm-technical-research/technical-steps/step-03-integration-patterns.md +248 -0
  30. package/src/bmm-skills/1-analysis/research/scm-technical-research/technical-steps/step-04-architectural-patterns.md +202 -0
  31. package/src/bmm-skills/1-analysis/research/scm-technical-research/technical-steps/step-05-implementation-research.md +233 -0
  32. package/src/bmm-skills/1-analysis/research/scm-technical-research/technical-steps/step-06-research-synthesis.md +487 -0
  33. package/src/bmm-skills/1-analysis/research/scm-technical-research/workflow.md +52 -0
  34. package/src/bmm-skills/1-analysis/scm-agent-analyst/SKILL.md +59 -0
  35. package/src/bmm-skills/1-analysis/scm-agent-analyst/scm-skill-manifest.yaml +11 -0
  36. package/src/bmm-skills/1-analysis/scm-agent-tech-writer/SKILL.md +57 -0
  37. package/src/bmm-skills/1-analysis/scm-agent-tech-writer/explain-concept.md +20 -0
  38. package/src/bmm-skills/1-analysis/scm-agent-tech-writer/mermaid-gen.md +20 -0
  39. package/src/bmm-skills/1-analysis/scm-agent-tech-writer/scm-skill-manifest.yaml +11 -0
  40. package/src/bmm-skills/1-analysis/scm-agent-tech-writer/validate-doc.md +19 -0
  41. package/src/bmm-skills/1-analysis/scm-agent-tech-writer/write-document.md +20 -0
  42. package/src/bmm-skills/1-analysis/scm-document-project/SKILL.md +6 -0
  43. package/src/bmm-skills/1-analysis/scm-document-project/checklist.md +245 -0
  44. package/src/bmm-skills/1-analysis/scm-document-project/documentation-requirements.csv +12 -0
  45. package/src/bmm-skills/1-analysis/scm-document-project/instructions.md +128 -0
  46. package/src/bmm-skills/1-analysis/scm-document-project/templates/deep-dive-template.md +345 -0
  47. package/src/bmm-skills/1-analysis/scm-document-project/templates/index-template.md +169 -0
  48. package/src/bmm-skills/1-analysis/scm-document-project/templates/project-overview-template.md +103 -0
  49. package/src/bmm-skills/1-analysis/scm-document-project/templates/project-scan-report-schema.json +160 -0
  50. package/src/bmm-skills/1-analysis/scm-document-project/templates/source-tree-template.md +135 -0
  51. package/src/bmm-skills/1-analysis/scm-document-project/workflow.md +25 -0
  52. package/src/bmm-skills/1-analysis/scm-document-project/workflows/deep-dive-instructions.md +299 -0
  53. package/src/bmm-skills/1-analysis/scm-document-project/workflows/deep-dive-workflow.md +34 -0
  54. package/src/bmm-skills/1-analysis/scm-document-project/workflows/full-scan-instructions.md +1107 -0
  55. package/src/bmm-skills/1-analysis/scm-document-project/workflows/full-scan-workflow.md +34 -0
  56. package/src/bmm-skills/1-analysis/scm-prfaq/SKILL.md +96 -0
  57. package/src/bmm-skills/1-analysis/scm-prfaq/agents/artifact-analyzer.md +60 -0
  58. package/src/bmm-skills/1-analysis/scm-prfaq/agents/web-researcher.md +49 -0
  59. package/src/bmm-skills/1-analysis/scm-prfaq/assets/prfaq-template.md +62 -0
  60. package/src/bmm-skills/1-analysis/scm-prfaq/references/customer-faq.md +55 -0
  61. package/src/bmm-skills/1-analysis/scm-prfaq/references/internal-faq.md +51 -0
  62. package/src/bmm-skills/1-analysis/scm-prfaq/references/press-release.md +60 -0
  63. package/src/bmm-skills/1-analysis/scm-prfaq/references/verdict.md +79 -0
  64. package/src/bmm-skills/1-analysis/scm-prfaq/scm-manifest.json +16 -0
  65. package/src/bmm-skills/1-analysis/scm-product-brief/SKILL.md +82 -0
  66. package/src/bmm-skills/1-analysis/scm-product-brief/agents/artifact-analyzer.md +60 -0
  67. package/src/bmm-skills/1-analysis/scm-product-brief/agents/opportunity-reviewer.md +44 -0
  68. package/src/bmm-skills/1-analysis/scm-product-brief/agents/skeptic-reviewer.md +44 -0
  69. package/src/bmm-skills/1-analysis/scm-product-brief/agents/web-researcher.md +49 -0
  70. package/src/bmm-skills/1-analysis/scm-product-brief/prompts/contextual-discovery.md +57 -0
  71. package/src/bmm-skills/1-analysis/scm-product-brief/prompts/draft-and-review.md +86 -0
  72. package/src/bmm-skills/1-analysis/scm-product-brief/prompts/finalize.md +75 -0
  73. package/src/bmm-skills/1-analysis/scm-product-brief/prompts/guided-elicitation.md +70 -0
  74. package/src/bmm-skills/1-analysis/scm-product-brief/resources/brief-template.md +60 -0
  75. package/src/bmm-skills/1-analysis/scm-product-brief/scm-manifest.json +17 -0
  76. package/src/bmm-skills/2-plan-workflows/scm-agent-pm/SKILL.md +59 -0
  77. package/src/bmm-skills/2-plan-workflows/scm-agent-pm/scm-skill-manifest.yaml +11 -0
  78. package/src/bmm-skills/2-plan-workflows/scm-agent-ux-designer/SKILL.md +55 -0
  79. package/src/bmm-skills/2-plan-workflows/scm-agent-ux-designer/scm-skill-manifest.yaml +11 -0
  80. package/src/bmm-skills/2-plan-workflows/scm-create-prd/SKILL.md +6 -0
  81. package/src/bmm-skills/2-plan-workflows/scm-create-prd/data/domain-complexity.csv +15 -0
  82. package/src/bmm-skills/2-plan-workflows/scm-create-prd/data/prd-purpose.md +197 -0
  83. package/src/bmm-skills/2-plan-workflows/scm-create-prd/data/project-types.csv +11 -0
  84. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-01-init.md +178 -0
  85. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-01b-continue.md +161 -0
  86. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-02-discovery.md +208 -0
  87. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-02b-vision.md +142 -0
  88. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-02c-executive-summary.md +158 -0
  89. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-03-success.md +214 -0
  90. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-04-journeys.md +201 -0
  91. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-05-domain.md +194 -0
  92. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-06-innovation.md +211 -0
  93. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-07-project-type.md +222 -0
  94. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-08-scoping.md +216 -0
  95. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-09-functional.md +219 -0
  96. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-10-nonfunctional.md +230 -0
  97. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-11-polish.md +221 -0
  98. package/src/bmm-skills/2-plan-workflows/scm-create-prd/steps-c/step-12-complete.md +115 -0
  99. package/src/bmm-skills/2-plan-workflows/scm-create-prd/templates/prd-template.md +10 -0
  100. package/src/bmm-skills/2-plan-workflows/scm-create-prd/workflow.md +61 -0
  101. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/SKILL.md +6 -0
  102. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-01-init.md +135 -0
  103. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-01b-continue.md +127 -0
  104. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-02-discovery.md +190 -0
  105. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-03-core-experience.md +217 -0
  106. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-04-emotional-response.md +220 -0
  107. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-05-inspiration.md +235 -0
  108. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-06-design-system.md +253 -0
  109. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-07-defining-experience.md +255 -0
  110. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-08-visual-foundation.md +225 -0
  111. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-09-design-directions.md +225 -0
  112. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-10-user-journeys.md +242 -0
  113. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-11-component-strategy.md +249 -0
  114. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-12-ux-patterns.md +238 -0
  115. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-13-responsive-accessibility.md +265 -0
  116. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/steps/step-14-complete.md +171 -0
  117. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/ux-design-template.md +13 -0
  118. package/src/bmm-skills/2-plan-workflows/scm-create-ux-design/workflow.md +35 -0
  119. package/src/bmm-skills/2-plan-workflows/scm-edit-prd/SKILL.md +6 -0
  120. package/src/bmm-skills/2-plan-workflows/scm-edit-prd/steps-e/step-e-01-discovery.md +242 -0
  121. package/src/bmm-skills/2-plan-workflows/scm-edit-prd/steps-e/step-e-01b-legacy-conversion.md +204 -0
  122. package/src/bmm-skills/2-plan-workflows/scm-edit-prd/steps-e/step-e-02-review.md +245 -0
  123. package/src/bmm-skills/2-plan-workflows/scm-edit-prd/steps-e/step-e-03-edit.md +250 -0
  124. package/src/bmm-skills/2-plan-workflows/scm-edit-prd/steps-e/step-e-04-complete.md +165 -0
  125. package/src/bmm-skills/2-plan-workflows/scm-edit-prd/workflow.md +62 -0
  126. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/SKILL.md +6 -0
  127. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/data/domain-complexity.csv +15 -0
  128. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/data/prd-purpose.md +197 -0
  129. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/data/project-types.csv +11 -0
  130. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-01-discovery.md +221 -0
  131. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-02-format-detection.md +188 -0
  132. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-02b-parity-check.md +206 -0
  133. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-03-density-validation.md +171 -0
  134. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +211 -0
  135. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-05-measurability-validation.md +225 -0
  136. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-06-traceability-validation.md +214 -0
  137. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +202 -0
  138. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +240 -0
  139. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-09-project-type-validation.md +260 -0
  140. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-10-smart-validation.md +206 -0
  141. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +261 -0
  142. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-12-completeness-validation.md +239 -0
  143. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/steps-v/step-v-13-report-complete.md +229 -0
  144. package/src/bmm-skills/2-plan-workflows/scm-validate-prd/workflow.md +61 -0
  145. package/src/bmm-skills/3-solutioning/scm-agent-architect/SKILL.md +54 -0
  146. package/src/bmm-skills/3-solutioning/scm-agent-architect/scm-skill-manifest.yaml +11 -0
  147. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/SKILL.md +6 -0
  148. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/steps/step-01-document-discovery.md +179 -0
  149. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/steps/step-02-prd-analysis.md +168 -0
  150. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/steps/step-03-epic-coverage-validation.md +169 -0
  151. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/steps/step-04-ux-alignment.md +129 -0
  152. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/steps/step-05-epic-quality-review.md +241 -0
  153. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/steps/step-06-final-assessment.md +126 -0
  154. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/templates/readiness-report-template.md +4 -0
  155. package/src/bmm-skills/3-solutioning/scm-check-implementation-readiness/workflow.md +47 -0
  156. package/src/bmm-skills/3-solutioning/scm-create-architecture/SKILL.md +6 -0
  157. package/src/bmm-skills/3-solutioning/scm-create-architecture/architecture-decision-template.md +12 -0
  158. package/src/bmm-skills/3-solutioning/scm-create-architecture/data/domain-complexity.csv +13 -0
  159. package/src/bmm-skills/3-solutioning/scm-create-architecture/data/project-types.csv +7 -0
  160. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-01-init.md +153 -0
  161. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-01b-continue.md +173 -0
  162. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-02-context.md +224 -0
  163. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-03-starter.md +329 -0
  164. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-04-decisions.md +318 -0
  165. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-05-patterns.md +359 -0
  166. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-06-structure.md +379 -0
  167. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-07-validation.md +359 -0
  168. package/src/bmm-skills/3-solutioning/scm-create-architecture/steps/step-08-complete.md +76 -0
  169. package/src/bmm-skills/3-solutioning/scm-create-architecture/workflow.md +32 -0
  170. package/src/bmm-skills/3-solutioning/scm-create-epics-and-stories/SKILL.md +6 -0
  171. package/src/bmm-skills/3-solutioning/scm-create-epics-and-stories/steps/step-01-validate-prerequisites.md +255 -0
  172. package/src/bmm-skills/3-solutioning/scm-create-epics-and-stories/steps/step-02-design-epics.md +212 -0
  173. package/src/bmm-skills/3-solutioning/scm-create-epics-and-stories/steps/step-03-create-stories.md +255 -0
  174. package/src/bmm-skills/3-solutioning/scm-create-epics-and-stories/steps/step-04-final-validation.md +131 -0
  175. package/src/bmm-skills/3-solutioning/scm-create-epics-and-stories/templates/epics-template.md +61 -0
  176. package/src/bmm-skills/3-solutioning/scm-create-epics-and-stories/workflow.md +51 -0
  177. package/src/bmm-skills/3-solutioning/scm-generate-project-context/SKILL.md +6 -0
  178. package/src/bmm-skills/3-solutioning/scm-generate-project-context/project-context-template.md +21 -0
  179. package/src/bmm-skills/3-solutioning/scm-generate-project-context/steps/step-01-discover.md +186 -0
  180. package/src/bmm-skills/3-solutioning/scm-generate-project-context/steps/step-02-generate.md +321 -0
  181. package/src/bmm-skills/3-solutioning/scm-generate-project-context/steps/step-03-complete.md +278 -0
  182. package/src/bmm-skills/3-solutioning/scm-generate-project-context/workflow.md +39 -0
  183. package/src/bmm-skills/4-implementation/scm-agent-dev/SKILL.md +64 -0
  184. package/src/bmm-skills/4-implementation/scm-agent-dev/scm-skill-manifest.yaml +11 -0
  185. package/src/bmm-skills/4-implementation/scm-agent-qa/SKILL.md +61 -0
  186. package/src/bmm-skills/4-implementation/scm-agent-qa/scm-skill-manifest.yaml +11 -0
  187. package/src/bmm-skills/4-implementation/scm-agent-quick-flow-solo-dev/SKILL.md +53 -0
  188. package/src/bmm-skills/4-implementation/scm-agent-quick-flow-solo-dev/scm-skill-manifest.yaml +11 -0
  189. package/src/bmm-skills/4-implementation/scm-agent-sm/SKILL.md +55 -0
  190. package/src/bmm-skills/4-implementation/scm-agent-sm/scm-skill-manifest.yaml +11 -0
  191. package/src/bmm-skills/4-implementation/scm-code-review/SKILL.md +6 -0
  192. package/src/bmm-skills/4-implementation/scm-code-review/steps/step-01-gather-context.md +62 -0
  193. package/src/bmm-skills/4-implementation/scm-code-review/steps/step-02-review.md +34 -0
  194. package/src/bmm-skills/4-implementation/scm-code-review/steps/step-03-triage.md +49 -0
  195. package/src/bmm-skills/4-implementation/scm-code-review/steps/step-04-present.md +129 -0
  196. package/src/bmm-skills/4-implementation/scm-code-review/workflow.md +55 -0
  197. package/src/bmm-skills/4-implementation/scm-correct-course/SKILL.md +6 -0
  198. package/src/bmm-skills/4-implementation/scm-correct-course/checklist.md +288 -0
  199. package/src/bmm-skills/4-implementation/scm-correct-course/workflow.md +267 -0
  200. package/src/bmm-skills/4-implementation/scm-create-story/SKILL.md +6 -0
  201. package/src/bmm-skills/4-implementation/scm-create-story/checklist.md +357 -0
  202. package/src/bmm-skills/4-implementation/scm-create-story/discover-inputs.md +88 -0
  203. package/src/bmm-skills/4-implementation/scm-create-story/template.md +49 -0
  204. package/src/bmm-skills/4-implementation/scm-create-story/workflow.md +380 -0
  205. package/src/bmm-skills/4-implementation/scm-dev-story/SKILL.md +6 -0
  206. package/src/bmm-skills/4-implementation/scm-dev-story/checklist.md +80 -0
  207. package/src/bmm-skills/4-implementation/scm-dev-story/workflow.md +450 -0
  208. package/src/bmm-skills/4-implementation/scm-qa-generate-e2e-tests/SKILL.md +6 -0
  209. package/src/bmm-skills/4-implementation/scm-qa-generate-e2e-tests/checklist.md +33 -0
  210. package/src/bmm-skills/4-implementation/scm-qa-generate-e2e-tests/workflow.md +136 -0
  211. package/src/bmm-skills/4-implementation/scm-quick-dev/SKILL.md +6 -0
  212. package/src/bmm-skills/4-implementation/scm-quick-dev/spec-template.md +88 -0
  213. package/src/bmm-skills/4-implementation/scm-quick-dev/step-01-clarify-and-route.md +66 -0
  214. package/src/bmm-skills/4-implementation/scm-quick-dev/step-02-plan.md +35 -0
  215. package/src/bmm-skills/4-implementation/scm-quick-dev/step-03-implement.md +37 -0
  216. package/src/bmm-skills/4-implementation/scm-quick-dev/step-04-review.md +49 -0
  217. package/src/bmm-skills/4-implementation/scm-quick-dev/step-05-present.md +63 -0
  218. package/src/bmm-skills/4-implementation/scm-quick-dev/step-oneshot.md +62 -0
  219. package/src/bmm-skills/4-implementation/scm-quick-dev/workflow.md +79 -0
  220. package/src/bmm-skills/4-implementation/scm-retrospective/SKILL.md +6 -0
  221. package/src/bmm-skills/4-implementation/scm-retrospective/workflow.md +1479 -0
  222. package/src/bmm-skills/4-implementation/scm-sprint-planning/SKILL.md +6 -0
  223. package/src/bmm-skills/4-implementation/scm-sprint-planning/checklist.md +33 -0
  224. package/src/bmm-skills/4-implementation/scm-sprint-planning/sprint-status-template.yaml +56 -0
  225. package/src/bmm-skills/4-implementation/scm-sprint-planning/workflow.md +263 -0
  226. package/src/bmm-skills/4-implementation/scm-sprint-status/SKILL.md +6 -0
  227. package/src/bmm-skills/4-implementation/scm-sprint-status/workflow.md +261 -0
  228. package/src/bmm-skills/module-help.csv +31 -0
  229. package/src/bmm-skills/module.yaml +50 -0
  230. package/src/core-skills/module-help.csv +11 -0
  231. package/src/core-skills/module.yaml +25 -0
  232. package/src/core-skills/scm-advanced-elicitation/SKILL.md +136 -0
  233. package/src/core-skills/scm-advanced-elicitation/methods.csv +51 -0
  234. package/src/core-skills/scm-brainstorming/SKILL.md +6 -0
  235. package/src/core-skills/scm-brainstorming/brain-methods.csv +62 -0
  236. package/src/core-skills/scm-brainstorming/steps/step-01-session-setup.md +214 -0
  237. package/src/core-skills/scm-brainstorming/steps/step-01b-continue.md +124 -0
  238. package/src/core-skills/scm-brainstorming/steps/step-02a-user-selected.md +229 -0
  239. package/src/core-skills/scm-brainstorming/steps/step-02b-ai-recommended.md +239 -0
  240. package/src/core-skills/scm-brainstorming/steps/step-02c-random-selection.md +211 -0
  241. package/src/core-skills/scm-brainstorming/steps/step-02d-progressive-flow.md +266 -0
  242. package/src/core-skills/scm-brainstorming/steps/step-03-technique-execution.md +401 -0
  243. package/src/core-skills/scm-brainstorming/steps/step-04-idea-organization.md +305 -0
  244. package/src/core-skills/scm-brainstorming/template.md +15 -0
  245. package/src/core-skills/scm-brainstorming/workflow.md +53 -0
  246. package/src/core-skills/scm-distillator/SKILL.md +177 -0
  247. package/src/core-skills/scm-distillator/agents/distillate-compressor.md +116 -0
  248. package/src/core-skills/scm-distillator/agents/round-trip-reconstructor.md +68 -0
  249. package/src/core-skills/scm-distillator/resources/compression-rules.md +51 -0
  250. package/src/core-skills/scm-distillator/resources/distillate-format-reference.md +227 -0
  251. package/src/core-skills/scm-distillator/resources/splitting-strategy.md +78 -0
  252. package/src/core-skills/scm-distillator/scripts/analyze_sources.py +300 -0
  253. package/src/core-skills/scm-distillator/scripts/tests/test_analyze_sources.py +204 -0
  254. package/src/core-skills/scm-editorial-review-prose/SKILL.md +86 -0
  255. package/src/core-skills/scm-editorial-review-structure/SKILL.md +179 -0
  256. package/src/core-skills/scm-help/SKILL.md +73 -0
  257. package/src/core-skills/scm-index-docs/SKILL.md +66 -0
  258. package/src/core-skills/scm-party-mode/SKILL.md +125 -0
  259. package/src/core-skills/scm-review-adversarial-general/SKILL.md +37 -0
  260. package/src/core-skills/scm-review-edge-case-hunter/SKILL.md +67 -0
  261. package/src/core-skills/scm-shard-doc/SKILL.md +105 -0
  262. package/tools/format-workflow-md.js +263 -0
  263. package/tools/installer/README.md +60 -0
  264. package/tools/installer/cli-utils.js +181 -0
  265. package/tools/installer/commands/install.js +80 -0
  266. package/tools/installer/commands/status.js +65 -0
  267. package/tools/installer/commands/uninstall.js +167 -0
  268. package/tools/installer/core/config.js +52 -0
  269. package/tools/installer/core/custom-module-cache.js +260 -0
  270. package/tools/installer/core/existing-install.js +127 -0
  271. package/tools/installer/core/install-paths.js +129 -0
  272. package/tools/installer/core/installer.js +1790 -0
  273. package/tools/installer/core/manifest-generator.js +701 -0
  274. package/tools/installer/core/manifest.js +1040 -0
  275. package/tools/installer/custom-handler.js +112 -0
  276. package/tools/installer/external-official-modules.yaml +63 -0
  277. package/tools/installer/file-ops.js +204 -0
  278. package/tools/installer/ide/_config-driven.js +536 -0
  279. package/tools/installer/ide/manager.js +247 -0
  280. package/tools/installer/ide/platform-codes.js +37 -0
  281. package/tools/installer/ide/platform-codes.yaml +192 -0
  282. package/tools/installer/ide/shared/agent-command-generator.js +180 -0
  283. package/tools/installer/ide/shared/module-injections.js +136 -0
  284. package/tools/installer/ide/shared/path-utils.js +364 -0
  285. package/tools/installer/ide/shared/scm-artifacts.js +208 -0
  286. package/tools/installer/ide/shared/skill-manifest.js +72 -0
  287. package/tools/installer/ide/templates/agent-command-template.md +14 -0
  288. package/tools/installer/ide/templates/combined/antigravity.md +8 -0
  289. package/tools/installer/ide/templates/combined/default-agent.md +15 -0
  290. package/tools/installer/ide/templates/combined/default-task.md +10 -0
  291. package/tools/installer/ide/templates/combined/default-tool.md +10 -0
  292. package/tools/installer/ide/templates/combined/default-workflow.md +6 -0
  293. package/tools/installer/ide/templates/combined/gemini-agent.toml +14 -0
  294. package/tools/installer/ide/templates/combined/gemini-task.toml +11 -0
  295. package/tools/installer/ide/templates/combined/gemini-tool.toml +11 -0
  296. package/tools/installer/ide/templates/combined/gemini-workflow-yaml.toml +16 -0
  297. package/tools/installer/ide/templates/combined/gemini-workflow.toml +14 -0
  298. package/tools/installer/ide/templates/combined/kiro-agent.md +16 -0
  299. package/tools/installer/ide/templates/combined/kiro-task.md +9 -0
  300. package/tools/installer/ide/templates/combined/kiro-tool.md +9 -0
  301. package/tools/installer/ide/templates/combined/kiro-workflow.md +7 -0
  302. package/tools/installer/ide/templates/combined/opencode-agent.md +15 -0
  303. package/tools/installer/ide/templates/combined/opencode-task.md +13 -0
  304. package/tools/installer/ide/templates/combined/opencode-tool.md +13 -0
  305. package/tools/installer/ide/templates/combined/opencode-workflow-yaml.md +16 -0
  306. package/tools/installer/ide/templates/combined/opencode-workflow.md +16 -0
  307. package/tools/installer/ide/templates/combined/rovodev.md +9 -0
  308. package/tools/installer/ide/templates/combined/trae.md +9 -0
  309. package/tools/installer/ide/templates/combined/windsurf-workflow.md +10 -0
  310. package/tools/installer/ide/templates/split/.gitkeep +0 -0
  311. package/tools/installer/install-messages.yaml +35 -0
  312. package/tools/installer/message-loader.js +83 -0
  313. package/tools/installer/modules/custom-modules.js +197 -0
  314. package/tools/installer/modules/external-manager.js +354 -0
  315. package/tools/installer/modules/official-modules.js +2043 -0
  316. package/tools/installer/project-root.js +77 -0
  317. package/tools/installer/prompts.js +809 -0
  318. package/tools/installer/scm-cli.js +108 -0
  319. package/tools/installer/ui.js +1683 -0
  320. package/tools/installer/yaml-format.js +245 -0
  321. package/tools/javascript-conventions.md +5 -0
  322. package/tools/migrate-custom-module-paths.js +124 -0
  323. package/tools/platform-codes.yaml +169 -0
  324. package/tools/validate-skills.js +736 -0
@@ -0,0 +1,263 @@
1
+ /**
2
+ * SCM Workflow Markdown Formatter
3
+ *
4
+ * Formats mixed markdown + XML workflow instruction files with:
5
+ * - 2-space XML indentation
6
+ * - Preserved markdown content
7
+ * - Proper tag nesting
8
+ * - Consistent formatting
9
+ */
10
+
11
+ const fs = require('node:fs');
12
+ const path = require('node:path');
13
+
14
+ class WorkflowFormatter {
15
+ constructor(options = {}) {
16
+ this.indentSize = options.indentSize || 2;
17
+ this.preserveMarkdown = options.preserveMarkdown !== false;
18
+ this.verbose = options.verbose || false;
19
+ }
20
+
21
+ /**
22
+ * Format a workflow markdown file
23
+ */
24
+ format(filePath) {
25
+ if (this.verbose) {
26
+ console.log(`Formatting: ${filePath}`);
27
+ }
28
+
29
+ const content = fs.readFileSync(filePath, 'utf8');
30
+ const formatted = this.formatContent(content);
31
+
32
+ // Only write if content changed
33
+ if (content === formatted) {
34
+ if (this.verbose) {
35
+ console.log(`- No changes: ${filePath}`);
36
+ }
37
+ return false;
38
+ } else {
39
+ fs.writeFileSync(filePath, formatted, 'utf8');
40
+ if (this.verbose) {
41
+ console.log(`✓ Formatted: ${filePath}`);
42
+ }
43
+ return true;
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Format content string with stateful indentation tracking
49
+ */
50
+ formatContent(content) {
51
+ const lines = content.split('\n');
52
+ const formatted = [];
53
+ let indentLevel = 0;
54
+ let inCodeBlock = false;
55
+ let checkBlockDepth = 0; // Track nested check blocks
56
+
57
+ for (let i = 0; i < lines.length; i++) {
58
+ const line = lines[i];
59
+ const trimmed = line.trim();
60
+
61
+ // Track code blocks (don't format inside them)
62
+ if (trimmed.startsWith('```')) {
63
+ if (inCodeBlock) {
64
+ inCodeBlock = false;
65
+ } else {
66
+ inCodeBlock = true;
67
+ }
68
+ formatted.push(line);
69
+ continue;
70
+ }
71
+
72
+ // Don't format inside code blocks
73
+ if (inCodeBlock) {
74
+ formatted.push(line);
75
+ continue;
76
+ }
77
+
78
+ // Handle XML tags
79
+ if (this.isXMLLine(trimmed)) {
80
+ const result = this.formatXMLLine(trimmed, indentLevel, checkBlockDepth, i, lines);
81
+ formatted.push(result.line);
82
+ indentLevel = result.nextIndent;
83
+ checkBlockDepth = result.nextCheckDepth;
84
+ } else if (trimmed === '') {
85
+ // Preserve blank lines
86
+ formatted.push('');
87
+ } else {
88
+ // Markdown content - preserve as-is but maintain current indent if inside XML
89
+ formatted.push(line);
90
+ }
91
+ }
92
+
93
+ return formatted.join('\n');
94
+ }
95
+
96
+ /**
97
+ * Check if line contains XML tag
98
+ */
99
+ isXMLLine(line) {
100
+ return /^<[a-zA-Z-]+(\s|>|\/)/.test(line) || /^<\/[a-zA-Z-]+>/.test(line);
101
+ }
102
+
103
+ /**
104
+ * Format a single XML line with context awareness
105
+ */
106
+ formatXMLLine(line, currentIndent, checkDepth, lineIndex, allLines) {
107
+ const trimmed = line.trim();
108
+ let indent = currentIndent;
109
+ let nextIndent = currentIndent;
110
+ let nextCheckDepth = checkDepth;
111
+
112
+ // Get the tag name
113
+ const tagMatch = trimmed.match(/^<\/?([a-zA-Z-]+)/);
114
+ const tagName = tagMatch ? tagMatch[1] : '';
115
+
116
+ // Closing tag - decrease indent before this line
117
+ if (trimmed.startsWith('</')) {
118
+ indent = Math.max(0, currentIndent - 1);
119
+ nextIndent = indent;
120
+
121
+ // If closing a step, reset check depth
122
+ if (tagName === 'step' || tagName === 'workflow') {
123
+ nextCheckDepth = 0;
124
+ }
125
+ }
126
+ // Self-closing tags (opens and closes on same line)
127
+ // EXCEPT <check> tags which create logical blocks
128
+ else if (this.isSelfClosingTag(trimmed) && tagName !== 'check') {
129
+ // These don't change indent level
130
+ indent = currentIndent;
131
+ nextIndent = currentIndent;
132
+ }
133
+ // Opening tags
134
+ else if (trimmed.startsWith('<')) {
135
+ // Check if this is a <check> tag - these create logical blocks
136
+ if (tagName === 'check') {
137
+ indent = currentIndent;
138
+ // Check tags increase indent for following content
139
+ nextIndent = currentIndent + 1;
140
+ nextCheckDepth = checkDepth + 1;
141
+ }
142
+ // <action> tags inside check blocks stay at current indent
143
+ else if (tagName === 'action' && checkDepth > 0) {
144
+ indent = currentIndent;
145
+ nextIndent = currentIndent; // Don't increase further
146
+ }
147
+ // Other tags close check blocks and return to structural level
148
+ else if (checkDepth > 0) {
149
+ // Close all check blocks - return to base structural level
150
+ indent = Math.max(0, currentIndent - checkDepth);
151
+ nextIndent = indent + 1;
152
+ nextCheckDepth = 0;
153
+ }
154
+ // Regular opening tags (no check blocks active)
155
+ else {
156
+ indent = currentIndent;
157
+ nextIndent = currentIndent + 1;
158
+ }
159
+ }
160
+
161
+ const indentStr = ' '.repeat(indent * this.indentSize);
162
+ return {
163
+ line: indentStr + trimmed,
164
+ nextIndent: nextIndent,
165
+ nextCheckDepth: nextCheckDepth,
166
+ };
167
+ }
168
+
169
+ /**
170
+ * Check if tag opens and closes on same line
171
+ */
172
+ isSelfClosingTag(line) {
173
+ // Self-closing with />
174
+ if (line.endsWith('/>')) {
175
+ return true;
176
+ }
177
+ // Opens and closes on same line: <tag>content</tag>
178
+ const match = line.match(/^<([a-zA-Z-]+)(\s[^>]*)?>.*<\/\1>$/);
179
+ return match !== null;
180
+ }
181
+
182
+ /**
183
+ * Check if tag is a block-level structural tag
184
+ */
185
+ isBlockLevelTag(tagName) {
186
+ return ['step', 'workflow', 'check'].includes(tagName);
187
+ }
188
+ }
189
+
190
+ /**
191
+ * CLI Entry Point
192
+ */
193
+ function main() {
194
+ const args = process.argv.slice(2);
195
+
196
+ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
197
+ console.log(`
198
+ SCM Workflow Markdown Formatter
199
+
200
+ Usage:
201
+ node format-workflow-md.js <file-pattern> [options]
202
+
203
+ Options:
204
+ --verbose, -v Verbose output
205
+ --check, -c Check formatting without writing (exit 1 if changes needed)
206
+ --help, -h Show this help
207
+
208
+ Examples:
209
+ node format-workflow-md.js src/**/instructions.md
210
+ node format-workflow-md.js "src/modules/bmb/**/*.md" --verbose
211
+ node format-workflow-md.js file.md --check
212
+ `);
213
+ process.exit(0);
214
+ }
215
+
216
+ const verbose = args.includes('--verbose') || args.includes('-v');
217
+ const check = args.includes('--check') || args.includes('-c');
218
+
219
+ // Remove flags from args
220
+ const files = args.filter((arg) => !arg.startsWith('-'));
221
+
222
+ const formatter = new WorkflowFormatter({ verbose });
223
+ let hasChanges = false;
224
+ let formattedCount = 0;
225
+
226
+ // Process files
227
+ for (const pattern of files) {
228
+ // For now, treat as direct file path
229
+ // TODO: Add glob support for patterns
230
+ if (fs.existsSync(pattern)) {
231
+ const stat = fs.statSync(pattern);
232
+ if (stat.isFile()) {
233
+ const changed = formatter.format(pattern);
234
+ if (changed) {
235
+ hasChanges = true;
236
+ formattedCount++;
237
+ }
238
+ } else if (stat.isDirectory()) {
239
+ console.error(`Error: ${pattern} is a directory. Please specify file paths.`);
240
+ }
241
+ } else {
242
+ console.error(`Error: File not found: ${pattern}`);
243
+ }
244
+ }
245
+
246
+ if (verbose || formattedCount > 0) {
247
+ console.log(`\nFormatted ${formattedCount} file(s)`);
248
+ }
249
+
250
+ if (check && hasChanges) {
251
+ console.error('\n❌ Some files need formatting. Run without --check to format.');
252
+ process.exit(1);
253
+ }
254
+
255
+ process.exit(0);
256
+ }
257
+
258
+ // Run if called directly
259
+ if (require.main === module) {
260
+ main();
261
+ }
262
+
263
+ module.exports = { WorkflowFormatter };
@@ -0,0 +1,60 @@
1
+ # SCM CLI Tool
2
+
3
+ ## Installing external repo SCM official modules
4
+
5
+ For external official modules to be discoverable during install, ensure an entry for the external repo is added to external-official-modules.yaml.
6
+
7
+ For community modules - this will be handled in a different way. This file is only for registration of modules under the scm-code-org.
8
+
9
+ ## Post-Install Notes
10
+
11
+ Modules can display setup guidance to users after configuration is collected during `npx scm-method install`. Notes are defined in the module's own `module.yaml` — no changes to the installer are needed.
12
+
13
+ ### Simple Format
14
+
15
+ Always displayed after the module is configured:
16
+
17
+ ```yaml
18
+ post-install-notes: |
19
+ Thank you for choosing the XYZ Cool Module
20
+ For Support about this Module call 555-1212
21
+ ```
22
+
23
+ ### Conditional Format
24
+
25
+ Display different messages based on a config question's answer:
26
+
27
+ ```yaml
28
+ post-install-notes:
29
+ config_key_name:
30
+ value1: |
31
+ Instructions for value1...
32
+ value2: |
33
+ Instructions for value2...
34
+ ```
35
+
36
+ Values without an entry (e.g., `none`) display nothing. Multiple config keys can each have their own conditional notes.
37
+
38
+ ### Example: TEA Module
39
+
40
+ The TEA module uses the conditional format keyed on `tea_browser_automation`:
41
+
42
+ ```yaml
43
+ post-install-notes:
44
+ tea_browser_automation:
45
+ cli: |
46
+ Playwright CLI Setup:
47
+ npm install -g @playwright/cli@latest
48
+ playwright-cli install --skills
49
+ mcp: |
50
+ Playwright MCP Setup (two servers):
51
+ 1. playwright — npx @playwright/mcp@latest
52
+ 2. playwright-test — npx playwright run-test-mcp-server
53
+ auto: |
54
+ Playwright CLI Setup:
55
+ ...
56
+ Playwright MCP Setup (two servers):
57
+ ...
58
+ ```
59
+
60
+ When a user selects `auto`, they see both CLI and MCP instructions. When they select `none`, nothing is shown.
@@ -0,0 +1,181 @@
1
+ const path = require('node:path');
2
+ const os = require('node:os');
3
+ const prompts = require('./prompts');
4
+
5
+ const CLIUtils = {
6
+ /**
7
+ * Get version from package.json
8
+ */
9
+ getVersion() {
10
+ try {
11
+ const packageJson = require(path.join(__dirname, '..', '..', 'package.json'));
12
+ return packageJson.version || 'Unknown';
13
+ } catch {
14
+ return 'Unknown';
15
+ }
16
+ },
17
+
18
+ /**
19
+ * Display SCM logo and version using @clack intro + box
20
+ */
21
+ async displayLogo() {
22
+ const version = this.getVersion();
23
+ const color = await prompts.getColor();
24
+
25
+ // ASCII art logo
26
+ const logo = [
27
+ ` ███████╗ ██████╗███╗ ███╗`
28
+ ` ██╔════╝██╔════╝████╗ ████║`
29
+ ` ███████╗██║ ██╔████╔██║`
30
+ ` ╚════██║██║ ██║╚██╔╝██║`
31
+ ` ███████║╚██████╗██║ ╚═╝ ██║`
32
+ ` ╚══════╝ ╚═════╝╚═╝ ╚═╝`
33
+ ]
34
+ .map((line) => color.yellow(line))
35
+ .join('\n');
36
+
37
+ const tagline = ' Build a Great product';
38
+
39
+ await prompts.box(`${logo}\n${tagline}`, `v${version}`, {
40
+ contentAlign: 'center',
41
+ rounded: true,
42
+ formatBorder: color.blue,
43
+ });
44
+ },
45
+
46
+ /**
47
+ * Display section header
48
+ * @param {string} title - Section title
49
+ * @param {string} subtitle - Optional subtitle
50
+ */
51
+ async displaySection(title, subtitle = null) {
52
+ await prompts.note(subtitle || '', title);
53
+ },
54
+
55
+ /**
56
+ * Display info box
57
+ * @param {string|Array} content - Content to display
58
+ * @param {Object} options - Box options
59
+ */
60
+ async displayBox(content, options = {}) {
61
+ let text = content;
62
+ if (Array.isArray(content)) {
63
+ text = content.join('\n\n');
64
+ }
65
+
66
+ const color = await prompts.getColor();
67
+ const borderColor = options.borderColor || 'cyan';
68
+ const colorMap = { green: color.green, red: color.red, yellow: color.yellow, cyan: color.cyan, blue: color.blue };
69
+ const formatBorder = colorMap[borderColor] || color.cyan;
70
+
71
+ await prompts.box(text, options.title, {
72
+ rounded: options.borderStyle === 'round' || options.borderStyle === undefined,
73
+ formatBorder,
74
+ });
75
+ },
76
+
77
+ /**
78
+ * Display module configuration header
79
+ * @param {string} moduleName - Module name (fallback if no custom header)
80
+ * @param {string} header - Custom header from module.yaml
81
+ * @param {string} subheader - Custom subheader from module.yaml
82
+ */
83
+ async displayModuleConfigHeader(moduleName, header = null, subheader = null) {
84
+ const title = header || `Configuring ${moduleName.toUpperCase()} Module`;
85
+ await prompts.note(subheader || '', title);
86
+ },
87
+
88
+ /**
89
+ * Display module with no custom configuration
90
+ * @param {string} moduleName - Module name (fallback if no custom header)
91
+ * @param {string} header - Custom header from module.yaml
92
+ * @param {string} subheader - Custom subheader from module.yaml
93
+ */
94
+ async displayModuleNoConfig(moduleName, header = null, subheader = null) {
95
+ const title = header || `${moduleName.toUpperCase()} Module - No Custom Configuration`;
96
+ await prompts.note(subheader || '', title);
97
+ },
98
+
99
+ /**
100
+ * Display step indicator
101
+ * @param {number} current - Current step
102
+ * @param {number} total - Total steps
103
+ * @param {string} description - Step description
104
+ */
105
+ async displayStep(current, total, description) {
106
+ const progress = `[${current}/${total}]`;
107
+ await prompts.log.step(`${progress} ${description}`);
108
+ },
109
+
110
+ /**
111
+ * Display completion message
112
+ * @param {string} message - Completion message
113
+ */
114
+ async displayComplete(message) {
115
+ const color = await prompts.getColor();
116
+ await prompts.box(`\u2728 ${message}`, 'Complete', {
117
+ rounded: true,
118
+ formatBorder: color.green,
119
+ });
120
+ },
121
+
122
+ /**
123
+ * Display error message
124
+ * @param {string} message - Error message
125
+ */
126
+ async displayError(message) {
127
+ const color = await prompts.getColor();
128
+ await prompts.box(`\u2717 ${message}`, 'Error', {
129
+ rounded: true,
130
+ formatBorder: color.red,
131
+ });
132
+ },
133
+
134
+ /**
135
+ * Format list for display
136
+ * @param {Array} items - Items to display
137
+ * @param {string} prefix - Item prefix
138
+ */
139
+ formatList(items, prefix = '\u2022') {
140
+ return items.map((item) => ` ${prefix} ${item}`).join('\n');
141
+ },
142
+
143
+ /**
144
+ * Clear previous lines
145
+ * @param {number} lines - Number of lines to clear
146
+ */
147
+ clearLines(lines) {
148
+ for (let i = 0; i < lines; i++) {
149
+ process.stdout.moveCursor(0, -1);
150
+ process.stdout.clearLine(1);
151
+ }
152
+ },
153
+
154
+ /**
155
+ * Display module completion message
156
+ * @param {string} moduleName - Name of the completed module
157
+ * @param {boolean} clearScreen - Whether to clear the screen first (deprecated, always false now)
158
+ */
159
+ displayModuleComplete(moduleName, clearScreen = false) {
160
+ // No longer clear screen or show boxes - just a simple completion message
161
+ // This is deprecated but kept for backwards compatibility
162
+ },
163
+
164
+ /**
165
+ * Expand path with ~ expansion
166
+ * @param {string} inputPath - Path to expand
167
+ * @returns {string} Expanded path
168
+ */
169
+ expandPath(inputPath) {
170
+ if (!inputPath) return inputPath;
171
+
172
+ // Expand ~ to home directory
173
+ if (inputPath.startsWith('~')) {
174
+ return path.join(os.homedir(), inputPath.slice(1));
175
+ }
176
+
177
+ return inputPath;
178
+ },
179
+ };
180
+
181
+ module.exports = { CLIUtils };
@@ -0,0 +1,80 @@
1
+ const path = require('node:path');
2
+ const prompts = require('../prompts');
3
+ const { Installer } = require('../core/installer');
4
+ const { UI } = require('../ui');
5
+
6
+ const installer = new Installer();
7
+ const ui = new UI();
8
+
9
+ module.exports = {
10
+ command: 'install',
11
+ description: 'Install scm Core agents and tools',
12
+ options: [
13
+ ['-d, --debug', 'Enable debug output for manifest generation'],
14
+ ['--directory <path>', 'Installation directory (default: current directory)'],
15
+ ['--modules <modules>', 'Comma-separated list of module IDs to install (e.g., "bmm,bmb")'],
16
+ [
17
+ '--tools <tools>',
18
+ 'Comma-separated list of tool/IDE IDs to configure (e.g., "claude-code,cursor"). Use "none" to skip tool configuration.',
19
+ ],
20
+ ['--custom-content <paths>', 'Comma-separated list of paths to custom modules/agents/workflows'],
21
+ ['--action <type>', 'Action type for existing installations: install, update, or quick-update'],
22
+ ['--user-name <name>', 'Name for agents to use (default: system username)'],
23
+ ['--communication-language <lang>', 'Language for agent communication (default: English)'],
24
+ ['--document-output-language <lang>', 'Language for document output (default: English)'],
25
+ ['--output-folder <path>', 'Output folder path relative to project root (default: _scm-output)'],
26
+ ['-y, --yes', 'Accept all defaults and skip prompts where possible'],
27
+ ],
28
+ action: async (options) => {
29
+ try {
30
+ // Set debug flag as environment variable for all components
31
+ if (options.debug) {
32
+ process.env.SCM_DEBUG_MANIFEST = 'true';
33
+ await prompts.log.info('Debug mode enabled');
34
+ }
35
+
36
+ const config = await ui.promptInstall(options);
37
+
38
+ // Handle cancel
39
+ if (config.actionType === 'cancel') {
40
+ await prompts.log.warn('Installation cancelled.');
41
+ process.exit(0);
42
+ }
43
+
44
+ // Handle quick update separately
45
+ if (config.actionType === 'quick-update') {
46
+ const result = await installer.quickUpdate(config);
47
+ await prompts.log.success('Quick update complete!');
48
+ await prompts.log.info(`Updated ${result.moduleCount} modules with preserved settings (${result.modules.join(', ')})`);
49
+ process.exit(0);
50
+ }
51
+
52
+ // Regular install/update flow
53
+ const result = await installer.install(config);
54
+
55
+ // Check if installation was cancelled
56
+ if (result && result.cancelled) {
57
+ process.exit(0);
58
+ }
59
+
60
+ // Check if installation succeeded
61
+ if (result && result.success) {
62
+ process.exit(0);
63
+ }
64
+ } catch (error) {
65
+ try {
66
+ if (error.fullMessage) {
67
+ await prompts.log.error(error.fullMessage);
68
+ } else {
69
+ await prompts.log.error(`Installation failed: ${error.message}`);
70
+ }
71
+ if (error.stack) {
72
+ await prompts.log.message(error.stack);
73
+ }
74
+ } catch {
75
+ console.error(error.fullMessage || error.message || error);
76
+ }
77
+ process.exit(1);
78
+ }
79
+ },
80
+ };
@@ -0,0 +1,65 @@
1
+ const path = require('node:path');
2
+ const prompts = require('../prompts');
3
+ const { Installer } = require('../core/installer');
4
+ const { Manifest } = require('../core/manifest');
5
+ const { UI } = require('../ui');
6
+
7
+ const installer = new Installer();
8
+ const manifest = new Manifest();
9
+ const ui = new UI();
10
+
11
+ module.exports = {
12
+ command: 'status',
13
+ description: 'Display scm installation status and module versions',
14
+ options: [],
15
+ action: async (options) => {
16
+ try {
17
+ // Find the scm directory
18
+ const projectDir = process.cwd();
19
+ const { scmDir } = await installer.findBmadDir(projectDir);
20
+
21
+ // Check if scm directory exists
22
+ const fs = require('fs-extra');
23
+ if (!(await fs.pathExists(scmDir))) {
24
+ await prompts.log.warn('No SCM installation found in the current directory.');
25
+ await prompts.log.message(`Expected location: ${scmDir}`);
26
+ await prompts.log.message('Run "scm install" to set up a new installation.');
27
+ process.exit(0);
28
+ return;
29
+ }
30
+
31
+ // Read manifest
32
+ const manifestData = await manifest._readRaw(scmDir);
33
+
34
+ if (!manifestData) {
35
+ await prompts.log.warn('No SCM installation manifest found.');
36
+ await prompts.log.message('Run "scm install" to set up a new installation.');
37
+ process.exit(0);
38
+ return;
39
+ }
40
+
41
+ // Get installation info
42
+ const installation = manifestData.installation || {};
43
+ const modules = manifestData.modules || [];
44
+
45
+ // Check for available updates (only for external modules)
46
+ const availableUpdates = await manifest.checkForUpdates(scmDir);
47
+
48
+ // Display status
49
+ await ui.displayStatus({
50
+ installation,
51
+ modules,
52
+ availableUpdates,
53
+ scmDir,
54
+ });
55
+
56
+ process.exit(0);
57
+ } catch (error) {
58
+ await prompts.log.error(`Status check failed: ${error.message}`);
59
+ if (process.env.SCM_DEBUG) {
60
+ await prompts.log.message(error.stack);
61
+ }
62
+ process.exit(1);
63
+ }
64
+ },
65
+ };