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,136 @@
1
+ const path = require('node:path');
2
+ const fs = require('fs-extra');
3
+ const yaml = require('yaml');
4
+ const { glob } = require('glob');
5
+ const { getSourcePath } = require('../../project-root');
6
+
7
+ async function loadModuleInjectionConfig(handler, moduleName) {
8
+ const sourceModulesPath = getSourcePath('modules');
9
+ const handlerBaseDir = path.join(sourceModulesPath, moduleName, 'sub-modules', handler);
10
+ const configPath = path.join(handlerBaseDir, 'injections.yaml');
11
+
12
+ if (!(await fs.pathExists(configPath))) {
13
+ return null;
14
+ }
15
+
16
+ const configContent = await fs.readFile(configPath, 'utf8');
17
+ const config = yaml.parse(configContent) || {};
18
+
19
+ return {
20
+ config,
21
+ handlerBaseDir,
22
+ configPath,
23
+ };
24
+ }
25
+
26
+ function shouldApplyInjection(injection, subagentChoices) {
27
+ if (!subagentChoices || subagentChoices.install === 'none') {
28
+ return false;
29
+ }
30
+
31
+ if (subagentChoices.install === 'all') {
32
+ return true;
33
+ }
34
+
35
+ if (subagentChoices.install === 'selective') {
36
+ const selected = subagentChoices.selected || [];
37
+
38
+ if (injection.requires === 'any' && selected.length > 0) {
39
+ return true;
40
+ }
41
+
42
+ if (injection.requires) {
43
+ const required = `${injection.requires}.md`;
44
+ return selected.includes(required);
45
+ }
46
+
47
+ if (injection.point) {
48
+ const selectedNames = selected.map((file) => file.replace('.md', ''));
49
+ return selectedNames.some((name) => injection.point.includes(name));
50
+ }
51
+ }
52
+
53
+ return false;
54
+ }
55
+
56
+ function filterAgentInstructions(content, selectedFiles) {
57
+ if (!selectedFiles || selectedFiles.length === 0) {
58
+ return '';
59
+ }
60
+
61
+ const selectedAgents = selectedFiles.map((file) => file.replace('.md', ''));
62
+ const lines = content.split('\n');
63
+ const filteredLines = [];
64
+
65
+ for (const line of lines) {
66
+ if (line.includes('<llm') || line.includes('</llm>')) {
67
+ filteredLines.push(line);
68
+ } else if (line.includes('subagent')) {
69
+ let shouldInclude = false;
70
+ for (const agent of selectedAgents) {
71
+ if (line.includes(agent)) {
72
+ shouldInclude = true;
73
+ break;
74
+ }
75
+ }
76
+
77
+ if (shouldInclude) {
78
+ filteredLines.push(line);
79
+ }
80
+ } else if (line.includes('When creating PRDs') || line.includes('ACTIVELY delegate')) {
81
+ filteredLines.push(line);
82
+ }
83
+ }
84
+
85
+ if (filteredLines.length > 2) {
86
+ return filteredLines.join('\n');
87
+ }
88
+
89
+ return '';
90
+ }
91
+
92
+ async function resolveSubagentFiles(handlerBaseDir, subagentConfig, subagentChoices) {
93
+ if (!subagentConfig || !subagentConfig.files) {
94
+ return [];
95
+ }
96
+
97
+ if (!subagentChoices || subagentChoices.install === 'none') {
98
+ return [];
99
+ }
100
+
101
+ let filesToCopy = subagentConfig.files;
102
+
103
+ if (subagentChoices.install === 'selective') {
104
+ filesToCopy = subagentChoices.selected || [];
105
+ }
106
+
107
+ const sourceDir = path.join(handlerBaseDir, subagentConfig.source || '');
108
+ const resolved = [];
109
+
110
+ for (const file of filesToCopy) {
111
+ // Use forward slashes for glob pattern (works on both Windows and Unix)
112
+ // Convert backslashes to forward slashes for glob compatibility
113
+ const normalizedSourceDir = sourceDir.replaceAll('\\', '/');
114
+ const pattern = `${normalizedSourceDir}/**/${file}`;
115
+ const matches = await glob(pattern);
116
+
117
+ if (matches.length > 0) {
118
+ const absolutePath = matches[0];
119
+ resolved.push({
120
+ file,
121
+ absolutePath,
122
+ relativePath: path.relative(sourceDir, absolutePath),
123
+ sourceDir,
124
+ });
125
+ }
126
+ }
127
+
128
+ return resolved;
129
+ }
130
+
131
+ module.exports = {
132
+ loadModuleInjectionConfig,
133
+ shouldApplyInjection,
134
+ filterAgentInstructions,
135
+ resolveSubagentFiles,
136
+ };
@@ -0,0 +1,364 @@
1
+ /**
2
+ * Path transformation utilities for IDE installer standardization
3
+ *
4
+ * Provides utilities to convert hierarchical paths to flat naming conventions.
5
+ *
6
+ * DASH-BASED NAMING (new standard):
7
+ * - Agents: scm-agent-module-name.md (with scm-agent- prefix)
8
+ * - Workflows/Tasks/Tools: scm-module-name.md
9
+ *
10
+ * Example outputs:
11
+ * - cis/agents/storymaster.md → scm-agent-cis-storymaster.md
12
+ * - bmm/workflows/plan-project.md → scm-bmm-plan-project.md
13
+ * - bmm/tasks/create-story.md → scm-bmm-create-story.md
14
+ * - core/agents/brainstorming.md → scm-agent-brainstorming.md (core agents skip module name)
15
+ * - standalone/agents/fred.md → scm-agent-standalone-fred.md
16
+ */
17
+
18
+ // Type segments - agents are included in naming, others are filtered out
19
+ const TYPE_SEGMENTS = ['workflows', 'tasks', 'tools'];
20
+ const AGENT_SEGMENT = 'agents';
21
+
22
+ // SCM installation folder name - centralized constant for all installers
23
+ const SCM_FOLDER_NAME = '_scm';
24
+
25
+ /**
26
+ * Convert hierarchical path to flat dash-separated name (NEW STANDARD)
27
+ * Converts: 'bmm', 'agents', 'pm' → 'scm-agent-bmm-pm.md'
28
+ * Converts: 'bmm', 'workflows', 'correct-course' → 'scm-bmm-correct-course.md'
29
+ * Converts: 'core', 'agents', 'brainstorming' → 'scm-agent-brainstorming.md' (core agents skip module name)
30
+ * Converts: 'standalone', 'agents', 'fred' → 'scm-agent-standalone-fred.md'
31
+ *
32
+ * @param {string} module - Module name (e.g., 'bmm', 'core', 'standalone')
33
+ * @param {string} type - Artifact type ('agents', 'workflows', 'tasks', 'tools')
34
+ * @param {string} name - Artifact name (e.g., 'pm', 'brainstorming')
35
+ * @returns {string} Flat filename like 'scm-agent-bmm-pm.md' or 'scm-bmm-correct-course.md'
36
+ */
37
+ function toDashName(module, type, name) {
38
+ const isAgent = type === AGENT_SEGMENT;
39
+
40
+ // For core module, skip the module name: use 'scm-agent-name.md' instead of 'scm-agent-core-name.md'
41
+ if (module === 'core') {
42
+ return isAgent ? `scm-agent-${name}.md` : `scm-${name}.md`;
43
+ }
44
+ // For standalone module, include 'standalone' in the name
45
+ if (module === 'standalone') {
46
+ return isAgent ? `scm-agent-standalone-${name}.md` : `scm-standalone-${name}.md`;
47
+ }
48
+
49
+ // Module artifacts: scm-module-name.md or scm-agent-module-name.md
50
+ // eslint-disable-next-line unicorn/prefer-string-replace-all -- regex replace is intentional here
51
+ const dashName = name.replace(/\//g, '-'); // Flatten nested paths
52
+ return isAgent ? `scm-agent-${module}-${dashName}.md` : `scm-${module}-${dashName}.md`;
53
+ }
54
+
55
+ /**
56
+ * Convert relative path to flat dash-separated name
57
+ * Converts: 'bmm/agents/pm.md' → 'scm-agent-bmm-pm.md'
58
+ * Converts: 'bmm/agents/tech-writer/tech-writer.md' → 'scm-agent-bmm-tech-writer.md' (uses folder name)
59
+ * Converts: 'bmm/workflows/correct-course.md' → 'scm-bmm-correct-course.md'
60
+ * Converts: 'core/agents/brainstorming.md' → 'scm-agent-brainstorming.md' (core agents skip module name)
61
+ *
62
+ * @param {string} relativePath - Path like 'bmm/agents/pm.md'
63
+ * @returns {string} Flat filename like 'scm-agent-bmm-pm.md' or 'scm-brainstorming.md'
64
+ */
65
+ function toDashPath(relativePath) {
66
+ if (!relativePath || typeof relativePath !== 'string') {
67
+ // Return a safe default for invalid input
68
+ return 'scm-unknown.md';
69
+ }
70
+
71
+ // Strip common file extensions to avoid double extensions in generated filenames
72
+ // e.g., 'create-story.xml' → 'create-story', 'workflow.md' → 'workflow'
73
+ const withoutExt = relativePath.replace(/\.(md|yaml|yml|json|xml|toml)$/i, '');
74
+ const parts = withoutExt.split(/[/\\]/);
75
+
76
+ const module = parts[0];
77
+ const type = parts[1];
78
+ let name;
79
+
80
+ // For agents, if nested in a folder (more than 3 parts), use the folder name only
81
+ // e.g., 'bmm/agents/tech-writer/tech-writer' → 'tech-writer' (not 'tech-writer-tech-writer')
82
+ if (type === 'agents' && parts.length > 3) {
83
+ // Use the folder name (parts[2]) as the name, ignore the file name
84
+ name = parts[2];
85
+ } else {
86
+ // For non-nested or non-agents, join all parts after type
87
+ name = parts.slice(2).join('-');
88
+ }
89
+
90
+ return toDashName(module, type, name);
91
+ }
92
+
93
+ /**
94
+ * Create custom agent dash name
95
+ * Creates: 'scm-custom-agent-fred-commit-poet.md'
96
+ *
97
+ * @param {string} agentName - Custom agent name
98
+ * @returns {string} Flat filename like 'scm-custom-agent-fred-commit-poet.md'
99
+ */
100
+ function customAgentDashName(agentName) {
101
+ return `scm-custom-agent-${agentName}.md`;
102
+ }
103
+
104
+ /**
105
+ * Check if a filename uses dash format
106
+ * @param {string} filename - Filename to check
107
+ * @returns {boolean} True if filename uses dash format
108
+ */
109
+ function isDashFormat(filename) {
110
+ return filename.startsWith('scm-') && filename.includes('-');
111
+ }
112
+
113
+ /**
114
+ * Extract parts from a dash-formatted filename
115
+ * Parses: 'scm-agent-bmm-pm.md' → { prefix: 'scm', module: 'bmm', type: 'agents', name: 'pm' }
116
+ * Parses: 'scm-bmm-correct-course.md' → { prefix: 'scm', module: 'bmm', type: 'workflows', name: 'correct-course' }
117
+ * Parses: 'scm-agent-brainstorming.md' → { prefix: 'scm', module: 'core', type: 'agents', name: 'brainstorming' } (core agents)
118
+ * Parses: 'scm-brainstorming.md' → { prefix: 'scm', module: 'core', type: 'workflows', name: 'brainstorming' } (core workflows)
119
+ * Parses: 'scm-agent-standalone-fred.md' → { prefix: 'scm', module: 'standalone', type: 'agents', name: 'fred' }
120
+ * Parses: 'scm-standalone-foo.md' → { prefix: 'scm', module: 'standalone', type: 'workflows', name: 'foo' }
121
+ *
122
+ * @param {string} filename - Dash-formatted filename
123
+ * @returns {Object|null} Parsed parts or null if invalid format
124
+ */
125
+ function parseDashName(filename) {
126
+ const withoutExt = filename.replace('.md', '');
127
+ const parts = withoutExt.split('-');
128
+
129
+ if (parts.length < 2 || parts[0] !== 'scm') {
130
+ return null;
131
+ }
132
+
133
+ // Check if this is an agent file (has 'agent' as second part)
134
+ const isAgent = parts[1] === 'agent';
135
+
136
+ if (isAgent) {
137
+ // This is an agent file
138
+ // Format: scm-agent-name (core) or scm-agent-standalone-name or scm-agent-module-name
139
+ if (parts.length >= 4 && parts[2] === 'standalone') {
140
+ // Standalone agent: scm-agent-standalone-name
141
+ return {
142
+ prefix: parts[0],
143
+ module: 'standalone',
144
+ type: 'agents',
145
+ name: parts.slice(3).join('-'),
146
+ };
147
+ }
148
+ if (parts.length === 3) {
149
+ // Core agent: scm-agent-name
150
+ return {
151
+ prefix: parts[0],
152
+ module: 'core',
153
+ type: 'agents',
154
+ name: parts[2],
155
+ };
156
+ } else {
157
+ // Module agent: scm-agent-module-name
158
+ return {
159
+ prefix: parts[0],
160
+ module: parts[2],
161
+ type: 'agents',
162
+ name: parts.slice(3).join('-'),
163
+ };
164
+ }
165
+ }
166
+
167
+ // Not an agent file - must be a workflow/tool/task
168
+ // If only 2 parts (scm-name), it's a core workflow/tool/task
169
+ if (parts.length === 2) {
170
+ return {
171
+ prefix: parts[0],
172
+ module: 'core',
173
+ type: 'workflows', // Default to workflows for non-agent core items
174
+ name: parts[1],
175
+ };
176
+ }
177
+
178
+ // Check for standalone non-agent: scm-standalone-name
179
+ if (parts[1] === 'standalone') {
180
+ return {
181
+ prefix: parts[0],
182
+ module: 'standalone',
183
+ type: 'workflows', // Default to workflows for non-agent standalone items
184
+ name: parts.slice(2).join('-'),
185
+ };
186
+ }
187
+
188
+ // Otherwise, it's a module workflow/tool/task (scm-module-name)
189
+ return {
190
+ prefix: parts[0],
191
+ module: parts[1],
192
+ type: 'workflows', // Default to workflows for non-agent module items
193
+ name: parts.slice(2).join('-'),
194
+ };
195
+ }
196
+
197
+ // ============================================================================
198
+ // LEGACY FUNCTIONS (underscore format) - kept for backward compatibility
199
+ // ============================================================================
200
+
201
+ /**
202
+ * Convert hierarchical path to flat underscore-separated name (LEGACY)
203
+ * @deprecated Use toDashName instead
204
+ */
205
+ function toUnderscoreName(module, type, name) {
206
+ const isAgent = type === AGENT_SEGMENT;
207
+ if (module === 'core') {
208
+ return isAgent ? `scm_agent_${name}.md` : `scm_${name}.md`;
209
+ }
210
+ if (module === 'standalone') {
211
+ return isAgent ? `scm_agent_standalone_${name}.md` : `scm_standalone_${name}.md`;
212
+ }
213
+ return isAgent ? `scm_${module}_agent_${name}.md` : `scm_${module}_${name}.md`;
214
+ }
215
+
216
+ /**
217
+ * Convert relative path to flat underscore-separated name (LEGACY)
218
+ * @deprecated Use toDashPath instead
219
+ */
220
+ function toUnderscorePath(relativePath) {
221
+ // Strip common file extensions (same as toDashPath for consistency)
222
+ const withoutExt = relativePath.replace(/\.(md|yaml|yml|json|xml|toml)$/i, '');
223
+ const parts = withoutExt.split(/[/\\]/);
224
+
225
+ const module = parts[0];
226
+ const type = parts[1];
227
+ const name = parts.slice(2).join('_');
228
+
229
+ return toUnderscoreName(module, type, name);
230
+ }
231
+
232
+ /**
233
+ * Create custom agent underscore name (LEGACY)
234
+ * @deprecated Use customAgentDashName instead
235
+ */
236
+ function customAgentUnderscoreName(agentName) {
237
+ return `scm_custom_${agentName}.md`;
238
+ }
239
+
240
+ /**
241
+ * Check if a filename uses underscore format (LEGACY)
242
+ * @deprecated Use isDashFormat instead
243
+ */
244
+ function isUnderscoreFormat(filename) {
245
+ return filename.startsWith('scm_') && filename.includes('_');
246
+ }
247
+
248
+ /**
249
+ * Extract parts from an underscore-formatted filename (LEGACY)
250
+ * @deprecated Use parseDashName instead
251
+ */
252
+ function parseUnderscoreName(filename) {
253
+ const withoutExt = filename.replace('.md', '');
254
+ const parts = withoutExt.split('_');
255
+
256
+ if (parts.length < 2 || parts[0] !== 'scm') {
257
+ return null;
258
+ }
259
+
260
+ const agentIndex = parts.indexOf('agent');
261
+
262
+ if (agentIndex !== -1) {
263
+ if (agentIndex === 1) {
264
+ // scm_agent_... - check for standalone
265
+ if (parts.length >= 4 && parts[2] === 'standalone') {
266
+ return {
267
+ prefix: parts[0],
268
+ module: 'standalone',
269
+ type: 'agents',
270
+ name: parts.slice(3).join('_'),
271
+ };
272
+ }
273
+ return {
274
+ prefix: parts[0],
275
+ module: 'core',
276
+ type: 'agents',
277
+ name: parts.slice(agentIndex + 1).join('_'),
278
+ };
279
+ } else {
280
+ return {
281
+ prefix: parts[0],
282
+ module: parts[1],
283
+ type: 'agents',
284
+ name: parts.slice(agentIndex + 1).join('_'),
285
+ };
286
+ }
287
+ }
288
+
289
+ if (parts.length === 2) {
290
+ return {
291
+ prefix: parts[0],
292
+ module: 'core',
293
+ type: 'workflows',
294
+ name: parts[1],
295
+ };
296
+ }
297
+
298
+ // Check for standalone non-agent: scm_standalone_name
299
+ if (parts[1] === 'standalone') {
300
+ return {
301
+ prefix: parts[0],
302
+ module: 'standalone',
303
+ type: 'workflows',
304
+ name: parts.slice(2).join('_'),
305
+ };
306
+ }
307
+
308
+ return {
309
+ prefix: parts[0],
310
+ module: parts[1],
311
+ type: 'workflows',
312
+ name: parts.slice(2).join('_'),
313
+ };
314
+ }
315
+
316
+ /**
317
+ * Resolve the skill name for an artifact.
318
+ * Prefers canonicalId from a scm-skill-manifest.yaml sidecar when available,
319
+ * falling back to the path-derived name from toDashPath().
320
+ *
321
+ * @param {Object} artifact - Artifact object (must have relativePath; may have canonicalId)
322
+ * @returns {string} Filename like 'scm-create-prd.md' or 'scm-agent-bmm-pm.md'
323
+ */
324
+ function resolveSkillName(artifact) {
325
+ if (artifact.canonicalId) {
326
+ return `${artifact.canonicalId}.md`;
327
+ }
328
+ return toDashPath(artifact.relativePath);
329
+ }
330
+
331
+ // Backward compatibility aliases (colon format was same as underscore)
332
+ const toColonName = toUnderscoreName;
333
+ const toColonPath = toUnderscorePath;
334
+ const customAgentColonName = customAgentUnderscoreName;
335
+ const isColonFormat = isUnderscoreFormat;
336
+ const parseColonName = parseUnderscoreName;
337
+
338
+ module.exports = {
339
+ // New standard (dash-based)
340
+ toDashName,
341
+ toDashPath,
342
+ resolveSkillName,
343
+ customAgentDashName,
344
+ isDashFormat,
345
+ parseDashName,
346
+
347
+ // Legacy (underscore-based) - kept for backward compatibility
348
+ toUnderscoreName,
349
+ toUnderscorePath,
350
+ customAgentUnderscoreName,
351
+ isUnderscoreFormat,
352
+ parseUnderscoreName,
353
+
354
+ // Backward compatibility aliases
355
+ toColonName,
356
+ toColonPath,
357
+ customAgentColonName,
358
+ isColonFormat,
359
+ parseColonName,
360
+
361
+ TYPE_SEGMENTS,
362
+ AGENT_SEGMENT,
363
+ SCM_FOLDER_NAME,
364
+ };
@@ -0,0 +1,208 @@
1
+ const path = require('node:path');
2
+ const fs = require('fs-extra');
3
+ const { loadSkillManifest, getCanonicalId } = require('./skill-manifest');
4
+
5
+ /**
6
+ * Helpers for gathering SCM agents/tasks from the installed tree.
7
+ * Shared by installers that need Claude-style exports.
8
+ *
9
+ * TODO: Dead code cleanup — compiled XML agents are retired.
10
+ *
11
+ * All agents now use the SKILL.md directory format with scm-skill-manifest.yaml
12
+ * (type: agent). The legacy pipeline below only discovers compiled .md files
13
+ * containing <agent> XML tags, which no longer exist. The following are dead:
14
+ *
15
+ * - getAgentsFromBmad() — scans {module}/agents/ for .md files with <agent> tags
16
+ * - getAgentsFromDir() — recursive helper for the above
17
+ * - AgentCommandGenerator — (agent-command-generator.js) generates launcher .md files
18
+ * that tell the LLM to load a compiled agent .md file
19
+ * - agent-command-template.md — (templates/) the launcher template with hardcoded
20
+ * {module}/agents/{{path}} reference
21
+ *
22
+ * Agent metadata for agent-manifest.csv is now handled entirely by
23
+ * ManifestGenerator.getAgentsFromDirRecursive() in manifest-generator.js,
24
+ * which walks the full module tree and finds type:agent directories.
25
+ *
26
+ * IDE installation of agents is handled by the native skill pipeline —
27
+ * each agent's SKILL.md directory is installed directly to the IDE's
28
+ * skills path, so no launcher intermediary is needed.
29
+ *
30
+ * Cleanup: remove getAgentsFromBmad, getAgentsFromDir, their exports,
31
+ * AgentCommandGenerator, agent-command-template.md, and all call sites
32
+ * in IDE installers that invoke collectAgentArtifacts / writeAgentLaunchers /
33
+ * writeColonArtifacts / writeDashArtifacts.
34
+ * getTasksFromBmad and getTasksFromDir may still be live — verify before removing.
35
+ */
36
+ async function getAgentsFromBmad(scmDir, selectedModules = []) {
37
+ const agents = [];
38
+
39
+ // Get core agents
40
+ if (await fs.pathExists(path.join(scmDir, 'core', 'agents'))) {
41
+ const coreAgents = await getAgentsFromDir(path.join(scmDir, 'core', 'agents'), 'core');
42
+ agents.push(...coreAgents);
43
+ }
44
+
45
+ // Get module agents
46
+ for (const moduleName of selectedModules) {
47
+ const agentsPath = path.join(scmDir, moduleName, 'agents');
48
+
49
+ if (await fs.pathExists(agentsPath)) {
50
+ const moduleAgents = await getAgentsFromDir(agentsPath, moduleName);
51
+ agents.push(...moduleAgents);
52
+ }
53
+ }
54
+
55
+ // Get standalone agents from scm/agents/ directory
56
+ const standaloneAgentsDir = path.join(scmDir, 'agents');
57
+ if (await fs.pathExists(standaloneAgentsDir)) {
58
+ const agentDirs = await fs.readdir(standaloneAgentsDir, { withFileTypes: true });
59
+
60
+ for (const agentDir of agentDirs) {
61
+ if (!agentDir.isDirectory()) continue;
62
+
63
+ const agentDirPath = path.join(standaloneAgentsDir, agentDir.name);
64
+ const agentFiles = await fs.readdir(agentDirPath);
65
+ const skillManifest = await loadSkillManifest(agentDirPath);
66
+
67
+ for (const file of agentFiles) {
68
+ if (!file.endsWith('.md')) continue;
69
+ if (file.includes('.customize.')) continue;
70
+
71
+ const filePath = path.join(agentDirPath, file);
72
+ const content = await fs.readFile(filePath, 'utf8');
73
+
74
+ if (content.includes('localskip="true"')) continue;
75
+
76
+ agents.push({
77
+ path: filePath,
78
+ name: file.replace('.md', ''),
79
+ module: 'standalone', // Mark as standalone agent
80
+ canonicalId: getCanonicalId(skillManifest, file),
81
+ });
82
+ }
83
+ }
84
+ }
85
+
86
+ return agents;
87
+ }
88
+
89
+ async function getTasksFromBmad(scmDir, selectedModules = []) {
90
+ const tasks = [];
91
+
92
+ if (await fs.pathExists(path.join(scmDir, 'core', 'tasks'))) {
93
+ const coreTasks = await getTasksFromDir(path.join(scmDir, 'core', 'tasks'), 'core');
94
+ tasks.push(...coreTasks);
95
+ }
96
+
97
+ for (const moduleName of selectedModules) {
98
+ const tasksPath = path.join(scmDir, moduleName, 'tasks');
99
+
100
+ if (await fs.pathExists(tasksPath)) {
101
+ const moduleTasks = await getTasksFromDir(tasksPath, moduleName);
102
+ tasks.push(...moduleTasks);
103
+ }
104
+ }
105
+
106
+ return tasks;
107
+ }
108
+
109
+ async function getAgentsFromDir(dirPath, moduleName, relativePath = '') {
110
+ const agents = [];
111
+
112
+ if (!(await fs.pathExists(dirPath))) {
113
+ return agents;
114
+ }
115
+
116
+ const entries = await fs.readdir(dirPath, { withFileTypes: true });
117
+ const skillManifest = await loadSkillManifest(dirPath);
118
+
119
+ for (const entry of entries) {
120
+ // Skip if entry.name is undefined or not a string
121
+ if (!entry.name || typeof entry.name !== 'string') {
122
+ continue;
123
+ }
124
+
125
+ const fullPath = path.join(dirPath, entry.name);
126
+ const newRelativePath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
127
+
128
+ if (entry.isDirectory()) {
129
+ // Recurse into subdirectories
130
+ const subDirAgents = await getAgentsFromDir(fullPath, moduleName, newRelativePath);
131
+ agents.push(...subDirAgents);
132
+ } else if (entry.name.endsWith('.md')) {
133
+ // Skip README files and other non-agent files
134
+ if (entry.name.toLowerCase() === 'readme.md' || entry.name.toLowerCase().startsWith('readme-')) {
135
+ continue;
136
+ }
137
+
138
+ if (entry.name.includes('.customize.')) {
139
+ continue;
140
+ }
141
+
142
+ const content = await fs.readFile(fullPath, 'utf8');
143
+
144
+ if (content.includes('localskip="true"')) {
145
+ continue;
146
+ }
147
+
148
+ // Only include files that have agent-specific content (compiled agents have <agent> tag)
149
+ if (!content.includes('<agent')) {
150
+ continue;
151
+ }
152
+
153
+ agents.push({
154
+ path: fullPath,
155
+ name: entry.name.replace('.md', ''),
156
+ module: moduleName,
157
+ relativePath: newRelativePath, // Keep the .md extension for the full path
158
+ canonicalId: getCanonicalId(skillManifest, entry.name),
159
+ });
160
+ }
161
+ }
162
+
163
+ return agents;
164
+ }
165
+
166
+ async function getTasksFromDir(dirPath, moduleName) {
167
+ const tasks = [];
168
+
169
+ if (!(await fs.pathExists(dirPath))) {
170
+ return tasks;
171
+ }
172
+
173
+ const files = await fs.readdir(dirPath);
174
+ const skillManifest = await loadSkillManifest(dirPath);
175
+
176
+ for (const file of files) {
177
+ // Include both .md and .xml task files
178
+ if (!file.endsWith('.md') && !file.endsWith('.xml')) {
179
+ continue;
180
+ }
181
+
182
+ const filePath = path.join(dirPath, file);
183
+ const content = await fs.readFile(filePath, 'utf8');
184
+
185
+ // Skip internal/engine files (not user-facing tasks)
186
+ if (content.includes('internal="true"')) {
187
+ continue;
188
+ }
189
+
190
+ // Remove extension to get task name
191
+ const ext = file.endsWith('.xml') ? '.xml' : '.md';
192
+ tasks.push({
193
+ path: filePath,
194
+ name: file.replace(ext, ''),
195
+ module: moduleName,
196
+ canonicalId: getCanonicalId(skillManifest, file),
197
+ });
198
+ }
199
+
200
+ return tasks;
201
+ }
202
+
203
+ module.exports = {
204
+ getAgentsFromBmad,
205
+ getTasksFromBmad,
206
+ getAgentsFromDir,
207
+ getTasksFromDir,
208
+ };