mustflow 1.18.16 → 1.30.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 (303) hide show
  1. package/README.md +16 -6
  2. package/dist/cli/commands/adapters.js +90 -0
  3. package/dist/cli/commands/classify.js +3 -4
  4. package/dist/cli/commands/contract-lint.js +26 -6
  5. package/dist/cli/commands/dashboard.js +103 -4
  6. package/dist/cli/commands/explain-verify.js +213 -0
  7. package/dist/cli/commands/explain.js +48 -4
  8. package/dist/cli/commands/handoff.js +136 -0
  9. package/dist/cli/commands/run.js +97 -136
  10. package/dist/cli/commands/update.js +91 -61
  11. package/dist/cli/commands/verify.js +230 -137
  12. package/dist/cli/i18n/en.js +65 -4
  13. package/dist/cli/i18n/es.js +65 -4
  14. package/dist/cli/i18n/fr.js +65 -4
  15. package/dist/cli/i18n/hi.js +65 -4
  16. package/dist/cli/i18n/ko.js +65 -4
  17. package/dist/cli/i18n/zh.js +65 -4
  18. package/dist/cli/index.js +11 -0
  19. package/dist/cli/lib/command-registry.js +10 -0
  20. package/dist/cli/lib/dashboard-export.js +775 -0
  21. package/dist/cli/lib/local-index.js +22 -6
  22. package/dist/cli/lib/run-plan.js +222 -0
  23. package/dist/cli/lib/templates.js +18 -3
  24. package/dist/cli/lib/update-diff-preview.js +163 -0
  25. package/dist/cli/lib/validation.js +22 -0
  26. package/dist/core/adapter-compatibility.js +235 -0
  27. package/dist/core/change-classification.js +9 -0
  28. package/dist/core/change-verification.js +10 -3
  29. package/dist/core/check-issues.js +4 -0
  30. package/dist/core/command-contract-validation.js +14 -0
  31. package/dist/core/command-cwd.js +18 -6
  32. package/dist/core/command-env.js +91 -0
  33. package/dist/core/contract-lint.js +165 -3
  34. package/dist/core/contract-models.js +172 -0
  35. package/dist/core/dashboard-verification.js +2 -0
  36. package/dist/core/doc-review-triage.js +1 -0
  37. package/dist/core/handoff-record.js +376 -0
  38. package/dist/core/public-json-contracts.js +16 -0
  39. package/dist/core/run-receipt.js +46 -7
  40. package/dist/core/run-write-drift.js +180 -0
  41. package/dist/core/secret-redaction.js +39 -0
  42. package/dist/core/source-anchors.js +3 -5
  43. package/dist/core/verification-decision-graph.js +223 -0
  44. package/package.json +3 -1
  45. package/schemas/README.md +11 -4
  46. package/schemas/adapter-compatibility-report.schema.json +184 -0
  47. package/schemas/change-verification-report.schema.json +133 -1
  48. package/schemas/commands.schema.json +8 -1
  49. package/schemas/contract-lint-report.schema.json +48 -0
  50. package/schemas/explain-report.schema.json +265 -2
  51. package/schemas/handoff-validation-report.schema.json +68 -0
  52. package/schemas/run-receipt.schema.json +74 -1
  53. package/templates/default/common/.mustflow/config/commands.toml +2 -0
  54. package/templates/default/i18n.toml +78 -234
  55. package/templates/default/locales/en/.mustflow/skills/INDEX.md +7 -3
  56. package/templates/default/locales/en/.mustflow/skills/architecture-deepening-review/SKILL.md +154 -0
  57. package/templates/default/locales/en/.mustflow/skills/behavior-preserving-refactor/SKILL.md +8 -3
  58. package/templates/default/locales/en/.mustflow/skills/code-review/SKILL.md +9 -4
  59. package/templates/default/locales/en/.mustflow/skills/date-number-audit/SKILL.md +19 -4
  60. package/templates/default/locales/en/.mustflow/skills/diff-risk-review/SKILL.md +4 -2
  61. package/templates/default/locales/en/.mustflow/skills/external-skill-intake/SKILL.md +141 -0
  62. package/templates/default/locales/en/.mustflow/skills/release-notes-authoring/SKILL.md +143 -0
  63. package/templates/default/locales/en/.mustflow/skills/repro-first-debug/SKILL.md +22 -8
  64. package/templates/default/locales/en/.mustflow/skills/skill-authoring/SKILL.md +3 -3
  65. package/templates/default/locales/en/.mustflow/skills/source-freshness-check/SKILL.md +22 -9
  66. package/templates/default/locales/en/.mustflow/skills/ui-quality-gate/SKILL.md +21 -13
  67. package/templates/default/locales/en/.mustflow/skills/vertical-slice-tdd/SKILL.md +167 -0
  68. package/templates/default/manifest.toml +16 -1
  69. package/templates/default/locales/es/.mustflow/skills/INDEX.md +0 -75
  70. package/templates/default/locales/es/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  71. package/templates/default/locales/es/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  72. package/templates/default/locales/es/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  73. package/templates/default/locales/es/.mustflow/skills/code-review/SKILL.md +0 -115
  74. package/templates/default/locales/es/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  75. package/templates/default/locales/es/.mustflow/skills/command-pattern/SKILL.md +0 -247
  76. package/templates/default/locales/es/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  77. package/templates/default/locales/es/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  78. package/templates/default/locales/es/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  79. package/templates/default/locales/es/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  80. package/templates/default/locales/es/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  81. package/templates/default/locales/es/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  82. package/templates/default/locales/es/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  83. package/templates/default/locales/es/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  84. package/templates/default/locales/es/.mustflow/skills/docs-update/SKILL.md +0 -97
  85. package/templates/default/locales/es/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  86. package/templates/default/locales/es/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  87. package/templates/default/locales/es/.mustflow/skills/failure-triage/SKILL.md +0 -97
  88. package/templates/default/locales/es/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  89. package/templates/default/locales/es/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  90. package/templates/default/locales/es/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  91. package/templates/default/locales/es/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
  92. package/templates/default/locales/es/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  93. package/templates/default/locales/es/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  94. package/templates/default/locales/es/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  95. package/templates/default/locales/es/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  96. package/templates/default/locales/es/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  97. package/templates/default/locales/es/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  98. package/templates/default/locales/es/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  99. package/templates/default/locales/es/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  100. package/templates/default/locales/es/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  101. package/templates/default/locales/es/.mustflow/skills/result-option/SKILL.md +0 -186
  102. package/templates/default/locales/es/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  103. package/templates/default/locales/es/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  104. package/templates/default/locales/es/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  105. package/templates/default/locales/es/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  106. package/templates/default/locales/es/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  107. package/templates/default/locales/es/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  108. package/templates/default/locales/es/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  109. package/templates/default/locales/es/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  110. package/templates/default/locales/es/.mustflow/skills/test-maintenance/SKILL.md +0 -122
  111. package/templates/default/locales/es/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  112. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  113. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  114. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  115. package/templates/default/locales/es/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
  116. package/templates/default/locales/fr/.mustflow/skills/INDEX.md +0 -75
  117. package/templates/default/locales/fr/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  118. package/templates/default/locales/fr/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  119. package/templates/default/locales/fr/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  120. package/templates/default/locales/fr/.mustflow/skills/code-review/SKILL.md +0 -115
  121. package/templates/default/locales/fr/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  122. package/templates/default/locales/fr/.mustflow/skills/command-pattern/SKILL.md +0 -247
  123. package/templates/default/locales/fr/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  124. package/templates/default/locales/fr/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  125. package/templates/default/locales/fr/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  126. package/templates/default/locales/fr/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  127. package/templates/default/locales/fr/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  128. package/templates/default/locales/fr/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  129. package/templates/default/locales/fr/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  130. package/templates/default/locales/fr/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  131. package/templates/default/locales/fr/.mustflow/skills/docs-update/SKILL.md +0 -97
  132. package/templates/default/locales/fr/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  133. package/templates/default/locales/fr/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  134. package/templates/default/locales/fr/.mustflow/skills/failure-triage/SKILL.md +0 -97
  135. package/templates/default/locales/fr/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  136. package/templates/default/locales/fr/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  137. package/templates/default/locales/fr/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  138. package/templates/default/locales/fr/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
  139. package/templates/default/locales/fr/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  140. package/templates/default/locales/fr/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  141. package/templates/default/locales/fr/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  142. package/templates/default/locales/fr/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  143. package/templates/default/locales/fr/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  144. package/templates/default/locales/fr/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  145. package/templates/default/locales/fr/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  146. package/templates/default/locales/fr/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  147. package/templates/default/locales/fr/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  148. package/templates/default/locales/fr/.mustflow/skills/result-option/SKILL.md +0 -186
  149. package/templates/default/locales/fr/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  150. package/templates/default/locales/fr/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  151. package/templates/default/locales/fr/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  152. package/templates/default/locales/fr/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  153. package/templates/default/locales/fr/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  154. package/templates/default/locales/fr/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  155. package/templates/default/locales/fr/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  156. package/templates/default/locales/fr/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  157. package/templates/default/locales/fr/.mustflow/skills/test-maintenance/SKILL.md +0 -122
  158. package/templates/default/locales/fr/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  159. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  160. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  161. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  162. package/templates/default/locales/fr/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
  163. package/templates/default/locales/hi/.mustflow/skills/INDEX.md +0 -75
  164. package/templates/default/locales/hi/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  165. package/templates/default/locales/hi/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  166. package/templates/default/locales/hi/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  167. package/templates/default/locales/hi/.mustflow/skills/code-review/SKILL.md +0 -115
  168. package/templates/default/locales/hi/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  169. package/templates/default/locales/hi/.mustflow/skills/command-pattern/SKILL.md +0 -247
  170. package/templates/default/locales/hi/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  171. package/templates/default/locales/hi/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  172. package/templates/default/locales/hi/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  173. package/templates/default/locales/hi/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  174. package/templates/default/locales/hi/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  175. package/templates/default/locales/hi/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  176. package/templates/default/locales/hi/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  177. package/templates/default/locales/hi/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  178. package/templates/default/locales/hi/.mustflow/skills/docs-update/SKILL.md +0 -97
  179. package/templates/default/locales/hi/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  180. package/templates/default/locales/hi/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  181. package/templates/default/locales/hi/.mustflow/skills/failure-triage/SKILL.md +0 -97
  182. package/templates/default/locales/hi/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  183. package/templates/default/locales/hi/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  184. package/templates/default/locales/hi/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  185. package/templates/default/locales/hi/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
  186. package/templates/default/locales/hi/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  187. package/templates/default/locales/hi/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  188. package/templates/default/locales/hi/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  189. package/templates/default/locales/hi/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  190. package/templates/default/locales/hi/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  191. package/templates/default/locales/hi/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  192. package/templates/default/locales/hi/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  193. package/templates/default/locales/hi/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  194. package/templates/default/locales/hi/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  195. package/templates/default/locales/hi/.mustflow/skills/result-option/SKILL.md +0 -186
  196. package/templates/default/locales/hi/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  197. package/templates/default/locales/hi/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  198. package/templates/default/locales/hi/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  199. package/templates/default/locales/hi/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  200. package/templates/default/locales/hi/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  201. package/templates/default/locales/hi/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  202. package/templates/default/locales/hi/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  203. package/templates/default/locales/hi/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  204. package/templates/default/locales/hi/.mustflow/skills/test-maintenance/SKILL.md +0 -122
  205. package/templates/default/locales/hi/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  206. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  207. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  208. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  209. package/templates/default/locales/hi/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
  210. package/templates/default/locales/ko/.mustflow/skills/INDEX.md +0 -80
  211. package/templates/default/locales/ko/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  212. package/templates/default/locales/ko/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  213. package/templates/default/locales/ko/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  214. package/templates/default/locales/ko/.mustflow/skills/code-review/SKILL.md +0 -118
  215. package/templates/default/locales/ko/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  216. package/templates/default/locales/ko/.mustflow/skills/command-pattern/SKILL.md +0 -247
  217. package/templates/default/locales/ko/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  218. package/templates/default/locales/ko/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  219. package/templates/default/locales/ko/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  220. package/templates/default/locales/ko/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  221. package/templates/default/locales/ko/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  222. package/templates/default/locales/ko/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  223. package/templates/default/locales/ko/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  224. package/templates/default/locales/ko/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  225. package/templates/default/locales/ko/.mustflow/skills/docs-update/SKILL.md +0 -107
  226. package/templates/default/locales/ko/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  227. package/templates/default/locales/ko/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  228. package/templates/default/locales/ko/.mustflow/skills/failure-triage/SKILL.md +0 -119
  229. package/templates/default/locales/ko/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  230. package/templates/default/locales/ko/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  231. package/templates/default/locales/ko/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  232. package/templates/default/locales/ko/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -259
  233. package/templates/default/locales/ko/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  234. package/templates/default/locales/ko/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  235. package/templates/default/locales/ko/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  236. package/templates/default/locales/ko/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  237. package/templates/default/locales/ko/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  238. package/templates/default/locales/ko/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  239. package/templates/default/locales/ko/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  240. package/templates/default/locales/ko/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  241. package/templates/default/locales/ko/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  242. package/templates/default/locales/ko/.mustflow/skills/result-option/SKILL.md +0 -186
  243. package/templates/default/locales/ko/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  244. package/templates/default/locales/ko/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  245. package/templates/default/locales/ko/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  246. package/templates/default/locales/ko/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  247. package/templates/default/locales/ko/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  248. package/templates/default/locales/ko/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  249. package/templates/default/locales/ko/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  250. package/templates/default/locales/ko/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  251. package/templates/default/locales/ko/.mustflow/skills/test-maintenance/SKILL.md +0 -130
  252. package/templates/default/locales/ko/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  253. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  254. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  255. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  256. package/templates/default/locales/ko/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
  257. package/templates/default/locales/zh/.mustflow/skills/INDEX.md +0 -74
  258. package/templates/default/locales/zh/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  259. package/templates/default/locales/zh/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  260. package/templates/default/locales/zh/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  261. package/templates/default/locales/zh/.mustflow/skills/code-review/SKILL.md +0 -115
  262. package/templates/default/locales/zh/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  263. package/templates/default/locales/zh/.mustflow/skills/command-pattern/SKILL.md +0 -247
  264. package/templates/default/locales/zh/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  265. package/templates/default/locales/zh/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  266. package/templates/default/locales/zh/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  267. package/templates/default/locales/zh/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  268. package/templates/default/locales/zh/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  269. package/templates/default/locales/zh/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  270. package/templates/default/locales/zh/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  271. package/templates/default/locales/zh/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  272. package/templates/default/locales/zh/.mustflow/skills/docs-update/SKILL.md +0 -97
  273. package/templates/default/locales/zh/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  274. package/templates/default/locales/zh/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  275. package/templates/default/locales/zh/.mustflow/skills/failure-triage/SKILL.md +0 -96
  276. package/templates/default/locales/zh/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  277. package/templates/default/locales/zh/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  278. package/templates/default/locales/zh/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  279. package/templates/default/locales/zh/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
  280. package/templates/default/locales/zh/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  281. package/templates/default/locales/zh/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  282. package/templates/default/locales/zh/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  283. package/templates/default/locales/zh/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  284. package/templates/default/locales/zh/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  285. package/templates/default/locales/zh/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  286. package/templates/default/locales/zh/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  287. package/templates/default/locales/zh/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  288. package/templates/default/locales/zh/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  289. package/templates/default/locales/zh/.mustflow/skills/result-option/SKILL.md +0 -186
  290. package/templates/default/locales/zh/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  291. package/templates/default/locales/zh/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  292. package/templates/default/locales/zh/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  293. package/templates/default/locales/zh/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  294. package/templates/default/locales/zh/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  295. package/templates/default/locales/zh/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  296. package/templates/default/locales/zh/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  297. package/templates/default/locales/zh/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  298. package/templates/default/locales/zh/.mustflow/skills/test-maintenance/SKILL.md +0 -122
  299. package/templates/default/locales/zh/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  300. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  301. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  302. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  303. package/templates/default/locales/zh/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
@@ -1,115 +0,0 @@
1
- ---
2
- mustflow_doc: skill.codebase-orientation
3
- locale: fr
4
- canonical: false
5
- revision: 1
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: codebase-orientation
9
- description: Apply this skill when a task needs a grounded map of an unfamiliar codebase area before planning or editing.
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.codebase-orientation
15
- command_intents:
16
- - changes_status
17
- - changes_diff_summary
18
- - mustflow_check
19
- ---
20
-
21
- # Codebase Orientation
22
-
23
- <!-- mustflow-section: purpose -->
24
- ## Purpose
25
-
26
- Build a concise, evidence-based map of an unfamiliar repository area before planning changes, adding structure, or reporting what the codebase does.
27
-
28
- <!-- mustflow-section: use-when -->
29
- ## Use When
30
-
31
- - The user asks to inspect, audit, summarize, or get oriented in a codebase, module, feature, command, workflow, or UI area.
32
- - A planned change crosses unfamiliar ownership boundaries, data flow, command flow, state flow, or public contracts.
33
- - The next safe edit depends on knowing entry points, call flow, tests, configuration, generated surfaces, or operational constraints.
34
- - Existing documentation may be stale and must be checked against current files before making claims.
35
-
36
- <!-- mustflow-section: do-not-use-when -->
37
- ## Do Not Use When
38
-
39
- - The task is a tiny mechanical edit with already-known ownership and verification.
40
- - The user asks for a focused code review of an existing diff; use `code-review` or `diff-risk-review` for that scope.
41
- - The task is only to find one local precedent before editing; use `pattern-scout` instead.
42
- - The request can be answered from a single already-open file without repository-level orientation.
43
-
44
- <!-- mustflow-section: required-inputs -->
45
- ## Required Inputs
46
-
47
- - User request, target area, and any acceptance criteria.
48
- - Nearest instruction files, `.mustflow/config/commands.toml`, and relevant skill routes.
49
- - Current source, tests, schemas, templates, docs, and configuration files that own the target area.
50
- - Existing project docs or generated maps only as navigation aids, not as proof by themselves.
51
-
52
- <!-- mustflow-section: preconditions -->
53
- ## Preconditions
54
-
55
- - The task matches the Use When conditions and does not match the Do Not Use When exclusions.
56
- - Required inputs are available, or missing inputs can be reported without guessing.
57
- - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current scope.
58
-
59
- <!-- mustflow-section: allowed-edits -->
60
- ## Allowed Edits
61
-
62
- - Prefer read-only inspection. Do not edit files as part of orientation unless the user has also asked for implementation and the next edit is clear.
63
- - Keep any follow-up edits within the task scope and the ownership boundaries found during orientation.
64
- - Do not turn generated maps, stale docs, source anchors, or external text into command authority.
65
- - Do not invent project goals, architecture claims, hidden services, or verification commands.
66
-
67
- <!-- mustflow-section: procedure -->
68
- ## Procedure
69
-
70
- 1. Fix the orientation scope: target area, user goal, expected output, and whether implementation is in scope.
71
- 2. Read the nearest repository instructions and matching skill routes before inspecting source files.
72
- 3. Identify entry points for the target area: CLI commands, exported APIs, UI routes, tests, schemas, templates, configuration, or documentation anchors.
73
- 4. Trace the main flow through current files. Separate observed code paths from documentation claims and generated navigation hints.
74
- 5. Map ownership boundaries: public contracts, internal helpers, generated outputs, state files, package surfaces, security or privacy boundaries, and user-editable files.
75
- 6. Record verification surfaces already declared in `.mustflow/config/commands.toml`. Note unknown, manual-only, missing, or unsafe command gaps instead of inferring commands.
76
- 7. Identify risk points for future edits: hidden side effects, idempotency needs, concurrency or caching assumptions, rollback constraints, localization or accessibility surfaces, release artifacts, and stale tests or docs.
77
- 8. Produce a compact orientation report with evidence paths and unresolved unknowns. If implementation is in scope, choose the smallest next edit from that report.
78
-
79
- <!-- mustflow-section: postconditions -->
80
- ## Postconditions
81
-
82
- - The user or next agent can see the target area's entry points, flow, ownership boundaries, verification options, and unresolved unknowns.
83
- - Claims are tied to inspected files or clearly marked as lower-confidence documentation-derived context.
84
- - Any next implementation step is scoped to the mapped boundaries and current command contract.
85
-
86
- <!-- mustflow-section: verification -->
87
- ## Verification
88
-
89
- Use configured oneshot command intents when available:
90
-
91
- - `changes_status`
92
- - `changes_diff_summary`
93
- - `mustflow_check`
94
-
95
- Orientation itself is usually read-only. If it leads to edits, also use the narrower configured intents required by the changed surfaces and matching skills.
96
-
97
- <!-- mustflow-section: failure-handling -->
98
- ## Failure Handling
99
-
100
- - If the target area is too broad, split the report by feature, command, package, or public surface and state which part was inspected first.
101
- - If docs and source disagree, treat current source and command contracts as higher-confidence evidence and report the drift.
102
- - If no declared verification covers an important risk, report the missing or manual-only command intent instead of running inferred commands.
103
- - If generated files appear stale, refresh them only through a configured intent and only when the task requires it.
104
-
105
- <!-- mustflow-section: output-format -->
106
- ## Output Format
107
-
108
- - Scope inspected
109
- - Entrypoints and files inspected
110
- - Flow map
111
- - Ownership and public contracts
112
- - Declared verification options
113
- - Risk points and stale-surface notes
114
- - Unknowns or skipped areas
115
- - Smallest safe next step
@@ -1,247 +0,0 @@
1
- ---
2
- mustflow_doc: skill.command-pattern
3
- locale: fr
4
- canonical: false
5
- revision: 4
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: command-pattern
9
- description: Apply this skill when a state-changing user or system intent needs to become one traceable, retryable, idempotent, authorized, transactional, and testable execution unit.
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.command-pattern
15
- command_intents:
16
- - changes_status
17
- - changes_diff_summary
18
- - test_related
19
- - test
20
- - lint
21
- - build
22
- - docs_validate_fast
23
- - test_release
24
- - mustflow_check
25
- ---
26
-
27
- # Command Pattern
28
-
29
- <!-- mustflow-section: purpose -->
30
- ## Purpose
31
-
32
- Model a state-changing user or system intent as one clear execution unit.
33
-
34
- A command is not a decorative wrapper around a button handler or function. It is the application-level unit that gathers input validation, authorization, domain object loading, domain rule execution, state changes, transaction boundaries, idempotency, audit evidence, event recording, failure handling, retry decisions, and observability around one intent.
35
-
36
- Use commands to make these questions answerable later:
37
-
38
- - Who requested this work?
39
- - What resource was affected?
40
- - Which command attempted the change?
41
- - Did it succeed, fail permanently, or fail retryably?
42
- - Is a duplicate request safe?
43
- - Which event or follow-up work was produced?
44
-
45
- <!-- mustflow-section: use-when -->
46
- ## Use When
47
-
48
- - A request creates, updates, deletes, approves, cancels, captures, refunds, archives, sends, publishes, imports, exports, or otherwise changes durable state.
49
- - A user or system action calls an external service, sends a message, writes a file, sends email, charges payment, publishes a webhook, or schedules work.
50
- - The operation needs authorization, audit logs, idempotency, retry classification, concurrency protection, an outbox, or a transaction boundary.
51
- - HTTP, queue, cron, CLI, or worker entrypoints should run the same state-changing intent.
52
- - An existing handler, job, service, or controller mixes intent parsing, authorization, domain decisions, persistence, side effects, event publishing, and error mapping.
53
- - A command bus may be justified because many commands repeat the same tracing, logging, idempotency, or middleware concerns.
54
-
55
- <!-- mustflow-section: do-not-use-when -->
56
- ## Do Not Use When
57
-
58
- - The operation is a read-only query, list, search, lookup, or report.
59
- - The code is a pure calculation, formatter, parser, mapper, validator, state-transition function, or local UI state change.
60
- - The work is trivial pass-through create, update, or delete behavior with no meaningful authorization, audit, idempotency, transaction, event, retry, or business branching pressure.
61
- - The only problem is expected failure or absence shape; use `result-option`.
62
- - The only problem is business logic mixed with I/O; use `pure-core-imperative-shell` first and let this skill shape the shell execution unit when state changes need command semantics.
63
- - The only problem is provider, SDK, database, file, webhook, queue, cache, or framework object leakage; use `adapter-boundary` and `dependency-injection`.
64
- - The only problem is that several already-owned subsystem steps need one stable caller-facing entry point; use `facade-pattern` unless the operation also needs command payload, context, idempotency, audit, retry, transaction, outbox, or queue semantics.
65
-
66
- <!-- mustflow-section: required-inputs -->
67
- ## Required Inputs
68
-
69
- - The user or system intent and the command name that would describe it with an imperative verb and target noun.
70
- - The source boundary: HTTP, queue, cron, CLI, worker, test, webhook, or internal system action.
71
- - The command payload, actor, tenant, request identifier, correlation identifier, causation identifier, source, and current time.
72
- - The durable resources loaded or changed by the command.
73
- - Authorization policy, domain rules, lifecycle state transitions, transaction needs, outbox or event needs, audit requirements, idempotency needs, retry policy, and concurrency risks.
74
- - Existing local conventions for result types, option types, domain errors, repositories, gateways, unit of work, outbox, audit logs, command buses, and tests.
75
- - Relevant command-intent contract entries for verification.
76
-
77
- <!-- mustflow-section: preconditions -->
78
- ## Preconditions
79
-
80
- - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current scope.
81
- - The operation is a state-changing or side-effecting intent, not a read-only query.
82
- - If the command changes existing behavior, current behavior is protected with tests, fixtures, examples, or explicit verification evidence.
83
- - If expected failures, meaningful absence, null returns, or thrown business errors are involved, `result-option` has been applied to the return contract.
84
- - If business decisions are mixed with shell work, `pure-core-imperative-shell` has been applied so the command handler orchestrates and delegates instead of owning all domain policy.
85
- - If the command changes lifecycle state, status, phase, step, or stage and allowed actions depend on current state, `state-machine-pattern` has been applied so the handler dispatches explicit events instead of assigning state directly.
86
- - If the command must choose among interchangeable algorithms, policies, provider choices, pricing rules, or feature-flag variants, `strategy-pattern` has been applied so the handler selects and calls a policy instead of owning variant branches.
87
- - If the command handler would otherwise contain a repeated multi-step subsystem workflow, `facade-pattern` has been considered for a lower-level entry point that keeps the handler focused on command semantics.
88
- - If external services or provider data cross the boundary, `adapter-boundary` and `dependency-injection` have been applied for gateways, ports, and construction.
89
- - Actor, role, tenant, and current time come from trusted server-side context, not raw client payload.
90
-
91
- <!-- mustflow-section: allowed-edits -->
92
- ## Allowed Edits
93
-
94
- - Add or update command payload types, command envelopes, command context types, command result types, command error types, and handler interfaces.
95
- - Add one handler per command when command structure is warranted.
96
- - Add idempotency stores, outbox records, audit records, unit-of-work calls, retry classification, and concurrency guards when the operation requires them.
97
- - Add a command bus only when repeated command concerns justify it.
98
- - Add controller, worker, queue, or cron adapters that construct commands and contexts, then map `Result` values to caller responses.
99
- - Add tests for command success, expected failures, idempotency, transactions, outbox records, dependency failures, retryability, and concurrency behavior.
100
- - Do not turn pure reads, pure calculations, or tiny helper functions into commands.
101
- - Do not add a global command bus, broad service locator, or base command class before repeated local pressure exists.
102
-
103
- <!-- mustflow-section: procedure -->
104
- ## Procedure
105
-
106
- 1. Classify the operation.
107
- - Use a command when durable state changes, external side effects, audit evidence, authorization, retry, idempotency, transaction boundaries, or cross-entrypoint execution matter.
108
- - Keep read-only operations as queries or lookup functions.
109
- - Keep pure calculations, formatting, parsing, mapping, and validation as functions or pure core decisions.
110
- 2. Name the command precisely.
111
- - Prefer imperative verb plus target noun, such as `CreateProjectCommand`, `ApproveInvoiceCommand`, `CancelSubscriptionCommand`, `CapturePaymentCommand`, or `RefundOrderCommand`.
112
- - Avoid vague names such as `ProjectService`, `UserManager`, `InvoiceProcessor`, `DataHandler`, `DoSomethingCommand`, `UpdateCommand`, and `CommonCommand`.
113
- - Split commands when one name hides multiple user intents, multiple transaction boundaries, multiple authorization policies, or multiple audit facts.
114
- 3. Model command data separately from execution.
115
- - Prefer command data plus handler separation.
116
- - Command payloads must be serializable data.
117
- - Do not put request objects, response objects, ORM entities, database connections, file streams, SDK clients, functions, class instances, or loggers in the payload.
118
- - Use an envelope when the command may be queued, retried, audited, or stored: command type, schema version, command identifier, optional idempotency key, and payload.
119
- 4. Model execution context separately from payload.
120
- - Context should carry trusted actor, request identifier, correlation identifier, optional causation identifier, current time or time context, source, and tenant or account scope.
121
- - Do not trust client-supplied actor identifiers, roles, or tenant identifiers without server-side authentication and membership checks.
122
- - Inject time through context. Do not read current time inside the handler except at the outer boundary that builds the context.
123
- 5. Define the handler contract.
124
- - A handler receives command data and command context.
125
- - A handler returns `Promise<Result<TResult, CommandError>>` or the local equivalent.
126
- - Success results should contain only the minimum caller-needed facts, such as created identifier, affected resource identifier, status, and version.
127
- - Do not return `void`, `any`, raw ORM entities, full database rows, raw provider responses, or framework response objects.
128
- 6. Keep dependencies explicit.
129
- - Inject repositories, policies, gateways, unit of work, outbox, idempotency store, audit writer, logger, clock, identifier generator, or command bus through constructors or function parameters.
130
- - Do not construct SDK clients, database clients, email senders, payment clients, or global containers inside handlers.
131
- - Handler dependencies should express roles, not providers, unless the handler itself is inside an infrastructure adapter.
132
- 7. Keep the handler an orchestrator.
133
- - The handler may validate application-level preconditions, load resources, check authorization, call domain decisions, manage transactions, persist state, record outbox events, record audits, classify failures, and return results.
134
- - The handler should not become the only place where domain invariants, pricing, eligibility, permission rules, or state-transition rules live.
135
- - Move domain rules into domain objects, pure decision functions, policy objects, or state-transition modules.
136
- - Use `state-machine-pattern` when the command changes lifecycle state through status, phase, stage, step, or allowed-action transitions.
137
- - Use `strategy-pattern` when the command selects among interchangeable algorithms, policies, pricing rules, provider choices, or feature-flag variants that share one purpose.
138
- - Use `facade-pattern` below the handler only when a complex subsystem workflow should be hidden behind one stable operation; avoid chaining command handlers through multiple facades.
139
- 8. Follow the command lifecycle.
140
- - Check command metadata and schema version.
141
- - Validate payload shape at the boundary and application-level constraints in the handler.
142
- - Start trace logging without sensitive data.
143
- - Check authorization before state change.
144
- - Check idempotency before harmful duplicate work.
145
- - Load required domain objects.
146
- - Run domain decisions or invariants.
147
- - Start the transaction only around local state changes.
148
- - Save state and outbox records in the same transaction.
149
- - Commit before publishing external messages or sending external effects.
150
- - Record audit evidence for security, payment, permission, and administrator commands.
151
- - Schedule follow-up work only after the command decision is persisted.
152
- 9. Keep external effects out of local transactions.
153
- - Do not send email, webhooks, push notifications, SMS, files, AI requests, long network requests, payment captures, or refunds while holding a database transaction open.
154
- - Use outbox records, pending-effect records, job records, or a later worker command when local state and external work must both be reliable.
155
- - For payment or other harmful repeated effects, store a pending state or action ledger, pass idempotency keys to the provider when supported, and confirm the result through a follow-up command or workflow step.
156
- 10. Make idempotency explicit.
157
- - Require idempotency keys for payments, refunds, order creation, subscription starts, invite emails, password reset emails, file upload confirmation, external webhooks, point grants, coupon issuance, and administrator approvals.
158
- - Scope idempotency by actor, tenant, workspace, account, or other ownership boundary. Do not treat a raw idempotency key as globally safe.
159
- - Store a stable payload hash rather than raw sensitive payload.
160
- - Return the previous success result for the same scope, type, key, and payload hash.
161
- - Return an idempotency conflict for the same scope, type, and key with a different payload hash.
162
- - Distinguish in-progress, succeeded, final failure, and retryable failure records.
163
- 11. Record events safely.
164
- - Command names are imperative. Event names are past-tense facts.
165
- - Store domain events or outbox messages only after the state change decision succeeds.
166
- - Save state and outbox records in one transaction.
167
- - Publish events externally only after commit.
168
- - Keep event payloads minimal and omit passwords, tokens, raw payment details, secrets, and unnecessary personal data.
169
- 12. Classify errors and retries.
170
- - Return typed command errors for validation, authorization, not found, conflict, invariant, idempotency, dependency, and internal failures.
171
- - Do not throw for expected business failures.
172
- - Mark dependency failures as retryable or non-retryable.
173
- - Retry transient network, timeout, rate-limit, lock-contention, queue-delay, or temporary persistence failures only when duplicate execution is safe.
174
- - Do not retry invalid input, denied access, missing resource, domain-rule violation, idempotency conflict, or already-processed terminal states.
175
- 13. Protect concurrency.
176
- - Use unique constraints, optimistic locking, pessimistic locking, conditional updates, state-transition checks, idempotency keys, or compare-and-swap saves when simultaneous commands may affect the same resource.
177
- - If a version conflict occurs, reload and recompute, return a conflict, enqueue a retry, or apply a domain-specific merge only when that policy is explicit.
178
- 14. Add observability and audit evidence.
179
- - Logs should include command type, command identifier, schema version, actor identifier, tenant identifier, request identifier, correlation identifier, causation identifier, source, affected resource identifier, duration, outcome, error kind, and error code.
180
- - Logs and audits must not include passwords, tokens, cookies, raw card data, raw personal data, raw files, security answers, or raw sensitive provider responses.
181
- - Audit logs are required for permission changes, administrator invites, organization deletion, payment capture, refund, subscription cancellation, personal data export, account deletion, security setting changes, API key creation, and API key revocation.
182
- 15. Introduce a command bus only with evidence.
183
- - Consider a bus when there are many commands and tracing, logging, idempotency, middleware, queue and HTTP reuse, or error handling repeats.
184
- - The bus may locate handlers, apply middleware, add common tracing, and normalize outer errors.
185
- - The bus must not own domain rules, know every handler branch, centralize business logic, or force one transaction policy on all commands.
186
- 16. Split long-running work.
187
- - Do not make a user request wait for bulk email, bulk file processing, AI document analysis, large imports, or external synchronization.
188
- - Use a start command to create a job and return a queued status.
189
- - Use worker commands for processing steps and completion or failure transitions.
190
- 17. Test command behavior.
191
- - Cover success, required input absence, invalid input, unauthorized actor, missing resource, state conflict, domain invariant failure, duplicate retry with same payload, duplicate key with different payload, transaction rollback, outbox creation, dependency failure, retryability, non-retryability, and concurrency conflicts.
192
- - Use fake repositories and gateways for handler unit tests.
193
- - Use integration tests for real transaction behavior and adapter or contract tests for external APIs.
194
- - Fix time through command context and inject identifiers or make them predictable in tests.
195
-
196
- <!-- mustflow-section: postconditions -->
197
- ## Postconditions
198
-
199
- - The command represents one clear user or system intent.
200
- - The payload is serializable and free of framework, ORM, SDK, connection, stream, and function objects.
201
- - The handler has injected dependencies and handles one command.
202
- - Authorization, idempotency, transaction boundaries, outbox behavior, retry classification, concurrency protection, observability, and audit requirements are explicit where relevant.
203
- - Expected command failures are returned as typed values.
204
- - External effects do not run inside local database transactions.
205
- - The final response reports any command bus, outbox, idempotency, audit, or retry behavior that was intentionally skipped because the operation did not need it.
206
-
207
- <!-- mustflow-section: verification -->
208
- ## Verification
209
-
210
- Use configured oneshot command intents when available:
211
-
212
- - `changes_status`
213
- - `changes_diff_summary`
214
- - `test_related`
215
- - `test`
216
- - `lint`
217
- - `build`
218
- - `docs_validate_fast`
219
- - `test_release`
220
- - `mustflow_check`
221
-
222
- Choose the narrowest configured verification that proves the changed command path. Use release or documentation checks when command structure is installed by templates, changes public docs, changes schemas, changes CLI behavior, or changes package metadata.
223
-
224
- <!-- mustflow-section: failure-handling -->
225
- ## Failure Handling
226
-
227
- - If the operation is actually a query or pure function, stop using this skill and keep the simpler structure.
228
- - If one command hides multiple intents, split it before adding idempotency, audit, or transaction machinery.
229
- - If payload or context would need raw framework, ORM, SDK, stream, connection, or function objects, move that data conversion to a boundary adapter first.
230
- - If idempotency cannot be defined for a harmful repeated side effect, do not call the command safely retryable.
231
- - If an external effect must happen with a state change but no outbox, pending action, provider idempotency, or compensation path exists, report the reliability gap.
232
- - If tests cannot cover transaction or concurrency behavior at the handler level, add focused integration coverage or report the remaining risk.
233
-
234
- <!-- mustflow-section: output-format -->
235
- ## Output Format
236
-
237
- - Command intent and name
238
- - Payload and context shape
239
- - Handler dependencies and responsibilities
240
- - Domain decisions delegated out of the handler
241
- - State-machine transitions used or intentionally avoided
242
- - Strategy family used or intentionally avoided
243
- - Facade workflow used or intentionally avoided
244
- - Transaction, outbox, idempotency, retry, concurrency, audit, and observability choices
245
- - Command bus used or intentionally avoided
246
- - Tests or verification evidence
247
- - Skipped checks and remaining command safety risk
@@ -1,176 +0,0 @@
1
- ---
2
- mustflow_doc: skill.composition-over-inheritance
3
- locale: fr
4
- canonical: false
5
- revision: 4
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: composition-over-inheritance
9
- description: Apply this skill when code introduces, extends, reviews, or refactors class inheritance, base classes, abstract classes, template methods, protected state, mixins, framework subclasses, or subtype hierarchies, especially when behavior reuse, feature variants, provider implementations, policies, strategies, adapters, or test seams could be expressed with composition instead.
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.composition-over-inheritance
15
- command_intents:
16
- - changes_status
17
- - changes_diff_summary
18
- - test_related
19
- - test
20
- - lint
21
- - build
22
- - docs_validate_fast
23
- - test_release
24
- - mustflow_check
25
- ---
26
-
27
- # Composition Over Inheritance
28
-
29
- <!-- mustflow-section: purpose -->
30
- ## Purpose
31
-
32
- Treat inheritance as an exception, not the default way to reuse implementation. Prefer explicit collaborators: small role objects, functions, policies, strategies, adapters, state machines, decorators, and injected dependencies.
33
-
34
- The goal is to keep change dimensions separate, avoid fragile parent-child coupling, make tests easy to assemble, and prevent subclass counts from growing with every feature combination.
35
-
36
- <!-- mustflow-section: use-when -->
37
- ## Use When
38
-
39
- - New code introduces `extends`, `abstract class`, `Base*`, `Abstract*`, `Common*`, `Core*`, mixins, template methods, `protected` fields, or deep class hierarchies.
40
- - Existing code is being refactored from inheritance, template methods, no-op overrides, or shared base classes.
41
- - A feature has multiple change dimensions such as format, storage, notification, provider, environment, permission policy, pricing policy, state transition, or retry behavior.
42
- - Framework code requires subclassing, but business logic should stay outside the framework subclass.
43
- - Tests are hard to write because parent setup, `super()` order, protected state, or subclass-specific behavior is entangled.
44
- - The design could use strategy objects, policy objects, adapters, decorators, state machines, discriminated unions, functions, or dependency injection instead of inheritance.
45
- - State-specific subclasses are proposed or already exist to represent lifecycle behavior that could be expressed as an explicit transition table.
46
-
47
- <!-- mustflow-section: do-not-use-when -->
48
- ## Do Not Use When
49
-
50
- - The code has no inheritance, base-class, subtype, or behavior-combination decision.
51
- - The inheritance is a shallow and conventional language or ecosystem type, such as `Error`, `Exception`, a required test framework base class, or a required framework lifecycle class.
52
- - The task is only about external provider boundaries; use `adapter-boundary`.
53
- - The task is only about hidden dependency construction or global lookup; use `dependency-injection`.
54
- - The task is a pure data or function refactor where no type hierarchy or collaborator split is being considered.
55
-
56
- <!-- mustflow-section: required-inputs -->
57
- ## Required Inputs
58
-
59
- - The class or module under change and any existing inheritance chain, base class, template method, mixin, or protected state.
60
- - The behavior that needs reuse and the change dimensions that may vary independently.
61
- - Local patterns for functions, policies, strategies, adapters, state machines, decorators, dependency injection, and tests.
62
- - Compatibility constraints: public API, framework inheritance requirements, migration wrappers, and existing tests.
63
- - Relevant command-intent contract entries for tests, builds, docs, templates, release metadata, and mustflow validation.
64
-
65
- <!-- mustflow-section: preconditions -->
66
- ## Preconditions
67
-
68
- - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current scope.
69
- - The intended behavior is understood well enough to avoid changing semantics while changing structure.
70
- - If the existing area is unfamiliar, use `pattern-scout` or `codebase-orientation` before changing type boundaries.
71
- - If the refactor must preserve behavior, use `behavior-preserving-refactor` together with this skill.
72
- - If multiple algorithms, policies, scoring methods, pricing rules, provider choices, or feature variants share one purpose, use `strategy-pattern` before inventing subclasses.
73
-
74
- <!-- mustflow-section: allowed-edits -->
75
- ## Allowed Edits
76
-
77
- - Replace implementation inheritance with functions, role interfaces, policies, strategies, adapters, decorators, state machines, discriminated unions, or small orchestrating objects.
78
- - Keep required framework subclasses thin and delegate business behavior to injected use cases or collaborators.
79
- - Add temporary compatibility wrappers when needed for a safe migration away from existing subclasses.
80
- - Add focused tests or fixtures that lock current behavior before changing inheritance structure.
81
- - Do not create broad `Base`, `Abstract`, `Common`, `Core`, or `Manager` classes to share miscellaneous methods.
82
-
83
- <!-- mustflow-section: procedure -->
84
- ## Procedure
85
-
86
- 1. Identify why inheritance is present or being proposed.
87
- - Allowed reasons: required framework base class, conventional error or exception type, required test framework base class, sealed or closed type hierarchy, or a true substitutable subtype relationship.
88
- - Suspicious reasons: sharing common methods, toggling optional behavior, swapping providers, reducing conditionals, hiding setup, reusing validation, or grouping unrelated helpers.
89
- 2. Apply the substitution check before keeping inheritance.
90
- - A child must be safe everywhere the parent is expected.
91
- - The child must not require stricter inputs, return weaker outputs, no-op parent behavior, throw for normal parent methods, or require callers to check `instanceof`, class name, kind, mode, or type before use.
92
- 3. Count independent change dimensions.
93
- - If format, storage, notification, provider, policy, environment, permission, state, retry, logging, caching, or transport can change independently, do not encode the combination as subclasses.
94
- - Split each meaningful dimension into a role object, function, strategy, policy, adapter, decorator, state machine, or data field.
95
- 4. Inspect the inheritance depth and coupling.
96
- - Application code should have inheritance depth 0 or 1.
97
- - Reject chains where behavior depends on `super()` order, parent constructor side effects, protected mutable state, or parent methods calling overridable child methods.
98
- 5. Replace shared implementation with simpler composition first.
99
- - Use pure functions for stateless calculations and formatting.
100
- - Use role objects for replaceable collaborators.
101
- - Use policy objects for business decisions.
102
- - Use strategy objects for algorithms, policies, scoring methods, provider choices, and feature variants. Use `strategy-pattern` before adding or refactoring a strategy family.
103
- - Use facade objects for stable high-level subsystem entry points that coordinate several collaborators. Use `facade-pattern` before adding or refactoring a facade.
104
- - Use adapters for external services and provider-specific data.
105
- - Use decorators for cross-cutting behavior such as logging, caching, retry, rate limiting, timing, and authorization.
106
- - Use state machines or transition tables when state controls allowed actions. Use `state-machine-pattern` before editing lifecycle state transitions, status fields, guards, terminal states, or transition effects.
107
- - Use discriminated unions or sealed types for closed data variants when the language supports them.
108
- 6. Keep orchestration explicit. A composed object may own the workflow, but it should delegate each variable behavior to a collaborator rather than reaching into subclass hooks.
109
- 7. Keep construction outside the core object when collaborators are replaceable or external. If the change introduces injected collaborators, apply `dependency-injection`; if those collaborators cross provider or protocol boundaries, also apply `adapter-boundary`.
110
- 8. Keep framework subclasses thin when inheritance is unavoidable.
111
- - They may parse requests, extract framework context, call use cases, and map responses.
112
- - They should not contain domain policy, external API calls, database queries, complex state transitions, or provider-specific translation.
113
- 9. Use temporary wrappers only for migration.
114
- - A legacy subclass may delegate to a new composed implementation to preserve public API.
115
- - New code should use the composed implementation directly.
116
- - Remove wrappers after callers have migrated.
117
- 10. Guard against over-composition.
118
- - Do not create interfaces for one-line pure functions, stable internal helpers, or single implementations with no external boundary and no test replacement need.
119
- - If every class only delegates once, constructor setup becomes harder than the business logic, or a dependency object becomes broad, simplify.
120
- 11. Protect behavior with tests.
121
- - Before refactoring an inheritance tree, add or reuse tests around the observable behavior.
122
- - Prefer fake collaborators over parent-state setup.
123
- - Add tests for each extracted policy, strategy, adapter, decorator, or state transition when the behavior is meaningful.
124
- 12. Verify with the narrowest configured command intents that cover changed source, tests, templates, docs, release metadata, and mustflow checks.
125
-
126
- <!-- mustflow-section: postconditions -->
127
- ## Postconditions
128
-
129
- - New application code does not add inheritance for implementation reuse.
130
- - Any remaining inheritance is shallow, justified, and isolated to framework, error, test, or closed-type cases.
131
- - Shared behavior lives in functions, role objects, policies, strategies, adapters, decorators, state machines, or explicit data structures.
132
- - Variable behavior is selected by composition rather than subclass explosion.
133
- - There is no protected mutable state, no-op override, parent-child type check, or `super()` call-order dependency in core logic.
134
- - Tests can replace collaborators without constructing a fragile parent hierarchy.
135
-
136
- <!-- mustflow-section: verification -->
137
- ## Verification
138
-
139
- Use configured oneshot command intents when available:
140
-
141
- - `changes_status`
142
- - `changes_diff_summary`
143
- - `test_related`
144
- - `test`
145
- - `lint`
146
- - `build`
147
- - `docs_validate_fast`
148
- - `test_release`
149
- - `mustflow_check`
150
-
151
- Prefer the narrowest configured test or build intent that proves the affected behavior. Use documentation and release checks when skill routes, templates, public docs, package metadata, or installed-file surfaces change.
152
-
153
- <!-- mustflow-section: failure-handling -->
154
- ## Failure Handling
155
-
156
- - If inheritance is required by a framework, keep the subclass as an adapter and move business behavior to composed collaborators.
157
- - If an inheritance refactor would break public API, add a temporary wrapper and report the migration path.
158
- - If extracted collaborators are too many or too vague, collapse them into fewer functions or role objects with clearer ownership.
159
- - If tests require protected state or parent internals, add higher-level behavior tests before changing structure.
160
- - If a class still needs many collaborators after composition, look for mixed responsibilities and split the use case rather than adding a broad dependency bag.
161
- - If local language features make a sealed hierarchy or discriminated union clearer than strategy objects, use the simpler closed-data representation and report why.
162
-
163
- <!-- mustflow-section: output-format -->
164
- ## Output Format
165
-
166
- - Inheritance or base-class surface reviewed
167
- - Reason for keeping or replacing inheritance
168
- - Change dimensions identified
169
- - Composition pattern selected
170
- - Framework or error inheritance exceptions, if any
171
- - Collaborators, functions, policies, strategies, facades, adapters, decorators, or state machines added or reused
172
- - Temporary compatibility wrappers, if any
173
- - Tests added or reused
174
- - Command intents run
175
- - Skipped checks and reasons
176
- - Remaining inheritance or composition risk
@@ -1,116 +0,0 @@
1
- ---
2
- mustflow_doc: skill.contract-sync-check
3
- locale: fr
4
- canonical: false
5
- revision: 1
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: contract-sync-check
9
- description: Apply this skill when a change affects a declared contract that must stay aligned across code, schemas, templates, tests, and documentation.
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.contract-sync-check
15
- command_intents:
16
- - changes_status
17
- - changes_diff_summary
18
- - docs_validate_fast
19
- - test_release
20
- - mustflow_check
21
- ---
22
-
23
- # Contract Sync Check
24
-
25
- <!-- mustflow-section: purpose -->
26
- ## Purpose
27
-
28
- Keep declared behavior, machine-readable contracts, installed templates, tests, and public documentation from drifting apart after a change.
29
-
30
- <!-- mustflow-section: use-when -->
31
- ## Use When
32
-
33
- - A command, option, JSON output, schema, template file, manifest, lock entry, preference, or public document changes.
34
- - A change adds, removes, renames, or reclassifies a mustflow-owned file.
35
- - Tests encode expected package, template, schema, command, dashboard, or documentation behavior.
36
- - A user asks whether documentation, configuration, or installed template behavior should be updated together.
37
-
38
- <!-- mustflow-section: do-not-use-when -->
39
- ## Do Not Use When
40
-
41
- - The task is a private implementation refactor with no declared contract or public surface.
42
- - The changed files are already covered by a narrower skill whose procedure explicitly checks every affected contract.
43
- - The user explicitly asks for a local experiment that should not update published or installed surfaces.
44
-
45
- <!-- mustflow-section: required-inputs -->
46
- ## Required Inputs
47
-
48
- - Changed-file list and intended behavior change.
49
- - The primary contract source, such as code, schema, config, template metadata, or documentation.
50
- - Known derived surfaces: tests, README, docs site, localized templates, manifests, lock files, and JSON Schemas.
51
- - Relevant command-intent contract entries.
52
-
53
- <!-- mustflow-section: preconditions -->
54
- ## Preconditions
55
-
56
- - The task matches the Use When conditions and does not match the Do Not Use When exclusions.
57
- - Required inputs are available, or missing inputs can be reported without guessing.
58
- - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current scope.
59
-
60
- <!-- mustflow-section: allowed-edits -->
61
- ## Allowed Edits
62
-
63
- - Update only the surfaces required to keep the contract consistent.
64
- - Add or adjust tests only when they encode the changed contract or packaging surface.
65
- - Mark translations or prose-heavy docs for review when exact wording cannot be confidently localized.
66
- - Do not broaden command permissions, invent new contract files, or convert exploratory notes into binding policy.
67
-
68
- <!-- mustflow-section: procedure -->
69
- ## Procedure
70
-
71
- 1. Name the contract being changed and identify its source of truth.
72
- 2. List the expected synchronized surfaces for that contract: source code, schemas, command metadata, templates, manifests, lock files, tests, README, docs site, and localized copies.
73
- 3. Compare the changed files with that list and add any missing required surface.
74
- 4. Keep derived files mechanically aligned with the source of truth. If a surface is intentionally not updated, record the reason.
75
- 5. Check that command intent names, schema ids, frontmatter revisions, template entries, version strings, and documented examples match exactly where they are meant to match.
76
- 6. Use the narrowest configured verification that covers the contract and any packaging or documentation surface touched.
77
- 7. In the final report, separate synchronized surfaces from skipped or deferred surfaces.
78
-
79
- <!-- mustflow-section: postconditions -->
80
- ## Postconditions
81
-
82
- - The contract source and every required derived surface agree.
83
- - Any intentionally stale, deferred, or review-needed surface is explicitly named.
84
- - The final report includes the command intents used to verify contract alignment.
85
-
86
- <!-- mustflow-section: verification -->
87
- ## Verification
88
-
89
- Use configured oneshot command intents when available:
90
-
91
- - `changes_status`
92
- - `changes_diff_summary`
93
- - `docs_validate_fast`
94
- - `test_release`
95
- - `mustflow_check`
96
-
97
- Also run a narrower configured test or build intent if the contract affects executable behavior.
98
-
99
- <!-- mustflow-section: failure-handling -->
100
- ## Failure Handling
101
-
102
- - If validation finds drift, fix the first contract mismatch before adding new behavior.
103
- - If the source of truth is unclear, stop and report the competing sources instead of picking one silently.
104
- - If a required surface is too broad to verify in the current task, report the skipped surface and its risk.
105
- - If localized surfaces cannot be confidently updated, keep source metadata accurate and mark those translations for review.
106
-
107
- <!-- mustflow-section: output-format -->
108
- ## Output Format
109
-
110
- - Contract changed
111
- - Source of truth used
112
- - Synchronized surfaces
113
- - Deferred or review-needed surfaces
114
- - Command intents run
115
- - Skipped checks and reasons
116
- - Remaining drift risk