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,210 +0,0 @@
1
- ---
2
- mustflow_doc: skill.facade-pattern
3
- locale: zh
4
- canonical: false
5
- revision: 1
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: facade-pattern
9
- description: Apply this skill when a controller, handler, command, service, or UI event needs a stable high-level entry point over a complex subsystem, repeated multi-step workflow, multiple dependencies, external services, repositories, queues, caches, file storage, transactions, idempotency, retries, logging, or normalized results, without turning that entry point into a god service or hiding domain rules.
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.facade-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
- # Facade Pattern
28
-
29
- <!-- mustflow-section: purpose -->
30
- ## Purpose
31
-
32
- Provide one simple, stable public entry point in front of a complex subsystem or repeated workflow.
33
-
34
- A facade is not a convenient name for a large service class. It is a thin application-level coordinator that hides internal ordering, external provider details, retries, transactions, logging, idempotency, and result normalization from callers while keeping domain decisions visible in domain objects, pure functions, policies, strategies, commands, or state machines.
35
-
36
- Use this skill to make callers say what they want done while the facade controls where the subsystem complexity lives.
37
-
38
- <!-- mustflow-section: use-when -->
39
- ## Use When
40
-
41
- - One user or system action requires three or more internal steps.
42
- - One operation coordinates two or more dependencies such as repositories, gateways, storage, queues, caches, validators, scanners, compressors, event publishers, or external services.
43
- - The same internal sequence is repeated across controllers, handlers, workers, UI event handlers, or services.
44
- - Callers know too much about implementation order, provider SDKs, database records, file storage, cache keys, queues, or external response shapes.
45
- - Failure handling, retry, timeout, logging, transactions, idempotency, cache invalidation, or event publishing differs between call sites for the same operation.
46
- - A controller, route, job, command handler, or UI event handler directly performs subsystem orchestration instead of delegating to a stable entry point.
47
- - The internal implementation is likely to change while the caller-facing operation should remain stable.
48
-
49
- <!-- mustflow-section: do-not-use-when -->
50
- ## Do Not Use When
51
-
52
- - The facade would only call one method with a different name.
53
- - The caller is already simple and does not know internal subsystem details.
54
- - The intent is to hide messy code without clarifying ownership, tests, or boundaries.
55
- - Domain rules, pricing, permissions, eligibility, validation policy, or state transitions are the main problem; use `pure-core-imperative-shell`, `strategy-pattern`, or `state-machine-pattern` as appropriate.
56
- - Several interchangeable algorithms or policies are the main problem; use `strategy-pattern`.
57
- - A single external API or protocol needs translation into an internal shape; use `adapter-boundary`.
58
- - One state-changing intent needs payload, context, transaction, idempotency, audit, retry, outbox, and traceability semantics; use `command-pattern`, and place a facade below it only when there is a real subsystem workflow to simplify.
59
- - The proposed facade would become `AppFacade`, `SystemFacade`, `CommonService`, `Manager`, `Helper`, or another catch-all container.
60
-
61
- <!-- mustflow-section: required-inputs -->
62
- ## Required Inputs
63
-
64
- - The caller surface that should become simpler: controller, router, UI handler, command handler, worker, job, or service.
65
- - The high-level operation name and the user or system purpose it represents.
66
- - The current internal sequence, repeated call sites, or leaked subsystem details.
67
- - Dependencies involved and whether each is a domain service, pure policy, repository port, gateway port, adapter, queue, cache, transaction manager, idempotency store, logger, or event publisher.
68
- - Expected success response and expected failure cases.
69
- - Authorization, idempotency, retry, transaction, observability, security, and performance requirements.
70
- - Local conventions for request objects, context objects, `Result` values, ports, adapters, dependency injection, commands, events, and tests.
71
- - Relevant command-intent contract entries for verification.
72
-
73
- <!-- mustflow-section: preconditions -->
74
- ## Preconditions
75
-
76
- - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current scope.
77
- - The operation has enough real subsystem complexity to justify a facade.
78
- - The facade boundary is a feature area or workflow boundary, not a whole application boundary.
79
- - If preserving existing behavior, `behavior-preserving-refactor` has been applied before moving orchestration.
80
- - If external systems cross the boundary, `adapter-boundary` and `dependency-injection` have been applied so the facade depends on internal ports rather than SDK clients.
81
- - If expected failure or absence is part of the contract, `result-option` has been applied to the return shape.
82
- - If the operation is a traceable state-changing intent, `command-pattern` has been considered so the facade does not replace command semantics.
83
-
84
- <!-- mustflow-section: allowed-edits -->
85
- ## Allowed Edits
86
-
87
- - Add or update a narrow facade in an application or feature boundary.
88
- - Add request, response, context, and facade error types.
89
- - Add or update ports, injected collaborators, mapper functions, error normalizers, idempotency handling, transaction orchestration, retry policy calls, event publishing, cache invalidation, and logging directly needed by the facade.
90
- - Move repeated subsystem ordering out of controllers, handlers, workers, command handlers, or UI event handlers into the facade.
91
- - Add tests with fake dependencies for success, validation, permission, dependency failure, error normalization, idempotency, event publishing, transaction behavior, and sensitive-log protection.
92
- - Do not move domain rules into the facade just because the facade coordinates the operation.
93
- - Do not expose private subsystem steps as public facade methods.
94
-
95
- <!-- mustflow-section: procedure -->
96
- ## Procedure
97
-
98
- 1. Classify the need.
99
- - Use a facade when the caller needs one stable high-level operation but currently knows internal ordering or multiple subsystem details.
100
- - Do not use a facade for a one-line wrapper, a pure policy, a provider translation, a lifecycle transition table, or a command execution unit by itself.
101
- 2. Name the facade by feature area or workflow.
102
- - Prefer names such as `FileUploadFacade`, `CheckoutFacade`, `BillingFacade`, `ReportExportFacade`, or `SignupFacade`.
103
- - Avoid broad names such as `AppFacade`, `SystemFacade`, `CommonService`, `Manager`, `Helper`, and `Util`.
104
- 3. Name public methods by caller intent.
105
- - Use names such as `uploadImage`, `checkout`, `createInvoice`, `refundPayment`, `exportReport`, or `sendWelcomeNotification`.
106
- - Avoid public methods named after internal steps such as `compress`, `scan`, `saveMetadata`, `publishEvent`, or `invalidateCache`.
107
- - Keep public methods few. A facade with many public methods probably owns more than one workflow.
108
- 4. Define request and context shapes.
109
- - Accept one request object for operation data.
110
- - Accept a separate context object for actor, request identifier, correlation identifier, tenant or account scope, idempotency key, source, and trusted server-side execution facts.
111
- - Do not pass long primitive parameter lists, framework request objects, response objects, ORM entities, SDK clients, database connections, file streams, or loggers as request payload.
112
- 5. Define normalized response and failure shapes.
113
- - Return the minimum caller-needed success facts.
114
- - Return expected failures as `Result` values or the local equivalent.
115
- - Do not return provider SDK responses, ORM models, full database rows, internal domain entities, raw exception objects, secrets, internal file paths, or unnecessary metadata.
116
- 6. Keep dependencies explicit and replaceable.
117
- - Inject collaborators through constructors or function parameters.
118
- - Depend on role interfaces or ports, not concrete SDK clients or framework objects.
119
- - Wrap external SDKs in adapters before they reach the facade.
120
- - Avoid facade-to-facade dependency chains. If two facades need the same lower-level behavior, extract a shared lower-level service, port, or pure function.
121
- 7. Keep the facade stateless per request.
122
- - Store injected dependencies, immutable configuration, and read-only policy objects only.
123
- - Do not store current user, current request, current file, current transaction, intermediate result, last response, or mutable request-specific collections in facade fields.
124
- 8. Delegate domain decisions.
125
- - The facade may perform basic input checks, call validators, pass context, check permissions through a policy, coordinate dependencies, normalize errors, and return results.
126
- - It must not become the home for pricing formulas, eligibility rules, permission policy, lifecycle transitions, state mutation rules, or complex calculations.
127
- - Use pure core functions, policies, strategies, commands, or state machines for domain decisions and have the facade call them.
128
- 9. Control transactions carefully.
129
- - Use transactions for fast local persistence that must commit together.
130
- - Do not hold a database transaction open while calling slow external APIs, email, webhooks, file uploads, payment providers, AI calls, or other long network work.
131
- - When local state and external work must coordinate, use idempotency keys, pending states, action ledgers, outbox records, sagas, compensation commands, or worker jobs.
132
- 10. Make harmful duplicate execution safe.
133
- - Require idempotency for payments, refunds, order creation, account creation, file uploads, email sends, coupon use, point grants, external sync, and webhook handling.
134
- - Scope idempotency by actor, tenant, workspace, account, owner, or other trust boundary.
135
- - Store stable payload hashes rather than raw sensitive payloads.
136
- - Return existing results for the same key and same payload hash, and return conflicts for the same key with different payload.
137
- 11. Apply retry only when safe.
138
- - Retry transient network, timeout, rate-limit, provider outage, and read operations when the operation is safe or idempotent.
139
- - Do not retry invalid input, denied access, unsupported formats, domain-rule failures, terminal state transitions, or unsafe writes without idempotency.
140
- - Return retryability in failure results when callers or workers need it.
141
- 12. Add safe observability.
142
- - Log high-level operation start, success, failure, duration, request identifier, actor identifier, resource identifier, error code, retry count, and idempotency-key presence when useful.
143
- - Do not log passwords, tokens, cookies, API keys, raw card data, raw personal data, raw file content, full provider responses, full request bodies, or raw external exceptions.
144
- - Use consistent event names such as `<domain>.<operation>.started`, `<domain>.<operation>.succeeded`, and `<domain>.<operation>.failed`.
145
- 13. Keep performance visible.
146
- - If the operation is expensive or long-running, name it with words such as `request`, `schedule`, `enqueue`, or `start`, then return a job identifier or queued status.
147
- - Add timeouts to external calls.
148
- - Avoid hidden N+1 behavior behind a simple facade method.
149
- - Limit response data to what the caller needs.
150
- 14. Document the public facade contract when the method is new or changed.
151
- - Include purpose, input, output, failure codes, side effects, idempotency, transaction behavior, external dependencies, synchronous or asynchronous behavior, and security requirements.
152
- - Keep comments concise and attached to public API surfaces rather than private implementation details.
153
- 15. Test at the facade boundary.
154
- - Use fake repositories, gateways, storage, scanners, event publishers, idempotency stores, transaction runners, and loggers.
155
- - Cover success, validation failure, permission denial, missing resource, dependency failure, error normalization, event or outbox creation, idempotency hit, idempotency conflict, dangerous missing key, transaction rollback when relevant, and no sensitive logging.
156
- - Do not call real external APIs, real payments, real email, real large uploads, or private methods directly in facade unit tests.
157
-
158
- <!-- mustflow-section: postconditions -->
159
- ## Postconditions
160
-
161
- - Callers invoke a high-level operation and no longer know internal subsystem order.
162
- - Public facade methods express caller intent, not internal steps.
163
- - Request data and execution context are separated.
164
- - Success responses and expected failures are normalized.
165
- - External SDK types, provider errors, ORM models, framework objects, and internal paths do not cross the facade boundary.
166
- - Dependencies are injected and test-replaceable.
167
- - Domain decisions remain outside the facade.
168
- - Transactions, idempotency, retry, logging, security, and performance behavior are explicit where the operation needs them.
169
- - Tests cover the facade's observable result and side effects through fake dependencies.
170
-
171
- <!-- mustflow-section: verification -->
172
- ## Verification
173
-
174
- Use configured oneshot command intents when available:
175
-
176
- - `changes_status`
177
- - `changes_diff_summary`
178
- - `test_related`
179
- - `test`
180
- - `lint`
181
- - `build`
182
- - `docs_validate_fast`
183
- - `test_release`
184
- - `mustflow_check`
185
-
186
- Choose the narrowest configured verification that covers changed facade code, dependencies, tests, templates, docs, release metadata, and mustflow routing.
187
-
188
- <!-- mustflow-section: failure-handling -->
189
- ## Failure Handling
190
-
191
- - If the facade is a one-method pass-through wrapper, remove it or merge it back into the caller.
192
- - If the facade grows into a god service, split it by workflow or feature area.
193
- - If the facade hides domain rules, extract those rules into pure functions, policy objects, strategies, state machines, or domain services.
194
- - If public methods expose internal steps, make them private or move them to lower-level collaborators.
195
- - If provider objects or errors leak through the facade result, add adapters and error mappers.
196
- - If the facade must call another facade, check for a lower-level shared dependency before accepting the coupling.
197
- - If idempotency or retry cannot be made safe for a harmful side effect, fail closed and report the manual or workflow gap.
198
-
199
- <!-- mustflow-section: output-format -->
200
- ## Output Format
201
-
202
- - Facade need and selected workflow boundary
203
- - Caller surface simplified
204
- - Request, context, response, and failure shapes
205
- - Dependencies injected and lower-level collaborators used
206
- - Domain decisions delegated out of the facade
207
- - Adapter, command, strategy, state-machine, or pure-core boundaries used with this skill
208
- - Transaction, idempotency, retry, logging, security, and performance choices
209
- - Tests or verification evidence
210
- - Skipped checks and remaining facade risk
@@ -1,96 +0,0 @@
1
- ---
2
- mustflow_doc: skill.failure-triage
3
- locale: zh
4
- canonical: false
5
- revision: 2
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: failure-triage
9
- description: 当已配置 command intent 或验证步骤失败时应用本 skill。
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.failure-triage
15
- command_intents:
16
- - mustflow_check
17
- ---
18
-
19
- # 失败排查
20
-
21
- <!-- mustflow-section: purpose -->
22
- ## 目标
23
-
24
- 在修改文件前识别失败命令或验证步骤最可能的根因。
25
-
26
- <!-- mustflow-section: use-when -->
27
- ## 使用时机
28
-
29
- - 已配置的 command intent 返回非零退出码。
30
- - 验证、构建、测试或文档检查失败。
31
- - 失败根因尚不明确。
32
-
33
- <!-- mustflow-section: do-not-use-when -->
34
- ## 不适用时机
35
-
36
- - 失败原因已完全明确,且已有针对性修复方案。
37
- - 用户仅要求高层摘要。
38
-
39
- <!-- mustflow-section: required-inputs -->
40
- ## 必要输入
41
-
42
- - 原始 command intent
43
- - 退出码
44
- - 截断后的 stdout 与 stderr 输出
45
- - 最近修改的文件
46
- - 相关命令合同条目
47
-
48
- <!-- mustflow-section: preconditions -->
49
- ## 前置条件
50
-
51
- - 任务符合使用时机,且不符合不适用时机中的排除条件。
52
- - 所需输入已经可用,或可以报告缺失输入而不进行猜测。
53
- - 已针对当前范围检查更高优先级的指令和 `.mustflow/config/commands.toml`。
54
-
55
- <!-- mustflow-section: allowed-edits -->
56
- ## 允许编辑范围
57
-
58
- - 编辑必须限制在此技能、用户请求以及 `.mustflow/skills/INDEX.md` 中匹配路由描述的范围内。
59
- - 不要扩大命令权限、编造项目事实或更改无关的工作流文件。
60
-
61
- <!-- mustflow-section: procedure -->
62
- ## 流程
63
-
64
- 1. 保留原始失败 intent 名称。
65
- 2. 分析第一条可执行错误。
66
- 3. 判断失败源自代码、测试、配置、文档还是环境。
67
- 4. 检查最相关文件。
68
- 5. 提出单一假设,并用最有针对性的已配置 intent 验证。
69
-
70
- <!-- mustflow-section: postconditions -->
71
- ## 后置条件
72
-
73
- - 可以用清晰证据、已执行的命令意图、跳过的检查和剩余风险产出预期输出。
74
- - 任何缺失的命令意图、未知输入或权限冲突都会被报告,而不是被隐藏。
75
-
76
- <!-- mustflow-section: verification -->
77
- ## 验证
78
-
79
- 尽可能重跑原始失败 intent。若范围过大,则运行能够隔离同一失败区域的最有针对性已配置 intent。
80
-
81
- <!-- mustflow-section: failure-handling -->
82
- ## 失败处理
83
-
84
- - 不要将无关修复打包在一起。
85
- - 若失败由缺失工具导致,应报告缺失工具及触发问题的命令。
86
- - 若输出中出现敏感数据,停止复制原始输出并进行安全摘要。
87
-
88
- <!-- mustflow-section: output-format -->
89
- ## 输出格式
90
-
91
- - 失败 intent
92
- - 可能的根因
93
- - 证据
94
- - 已应用或建议的修复
95
- - 已执行的验证
96
- - 剩余风险
@@ -1,118 +0,0 @@
1
- ---
2
- mustflow_doc: skill.instruction-conflict-scope-check
3
- locale: zh
4
- canonical: false
5
- revision: 1
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: instruction-conflict-scope-check
9
- description: Apply this skill when repository, host, user, nested-project, command-contract, preference, or generated instruction sources conflict or make the safe edit, command, verification, commit, push, deletion, migration, or reporting scope unclear.
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.instruction-conflict-scope-check
15
- command_intents:
16
- - changes_status
17
- - changes_diff_summary
18
- - docs_validate_fast
19
- - test_release
20
- - mustflow_check
21
- ---
22
-
23
- # Instruction Conflict Scope Check
24
-
25
- <!-- mustflow-section: purpose -->
26
- ## Purpose
27
-
28
- Resolve conflicting instructions by narrowing authority, edit scope, command scope, and reporting boundaries before work proceeds.
29
-
30
- <!-- mustflow-section: use-when -->
31
- ## Use When
32
-
33
- - User instructions, host rules, `AGENTS.md`, nested repository instructions, `.mustflow/config/*.toml`, preferences, skills, generated files, or roadmap text point in different directions.
34
- - It is unclear whether to edit the parent repository or a nested child repository.
35
- - It is unclear whether a command, commit, push, delete, migration, background process, browser launch, or long-running task is allowed.
36
- - A lower-priority document appears to authorize behavior that a higher-priority rule blocks.
37
- - A final report needs to explain why part of a request was skipped, narrowed, or deferred.
38
-
39
- <!-- mustflow-section: do-not-use-when -->
40
- ## Do Not Use When
41
-
42
- - The instruction order is clear and only a normal task-specific skill applies.
43
- - The problem is untrusted pasted text trying to override rules; use `external-prompt-injection-defense` for that part.
44
- - The task is only a documentation wording change and makes no authority, scope, or command claim.
45
-
46
- <!-- mustflow-section: required-inputs -->
47
- ## Required Inputs
48
-
49
- - The conflicting instruction sources and the exact behavior they appear to require or forbid.
50
- - The affected scope: repository root, nested project, file paths, command intents, verification, Git operation, migration, or report.
51
- - The user's direct request and any newer clarifying message.
52
- - Relevant command-intent contract entries and nearest `AGENTS.md` files for the affected paths.
53
-
54
- <!-- mustflow-section: preconditions -->
55
- ## Preconditions
56
-
57
- - The task matches the Use When conditions and does not match the Do Not Use When exclusions.
58
- - Required inputs are available, or missing inputs can be reported without guessing.
59
- - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current scope.
60
-
61
- <!-- mustflow-section: allowed-edits -->
62
- ## Allowed Edits
63
-
64
- - Clarify workflow docs, skills, templates, tests, or reports that caused the conflict.
65
- - Narrow edits to the nearest applicable repository and the smallest safe surface.
66
- - Record skipped or deferred work when authority is missing.
67
- - Do not broaden command permission, override host safety rules, edit outside the selected repository, or treat preferences as higher priority than direct user instructions.
68
-
69
- <!-- mustflow-section: procedure -->
70
- ## Procedure
71
-
72
- 1. List the conflicting sources in priority order: direct user request, host safety rules, nearest repository instructions, mustflow config, skills, preferences, generated state, and lower-priority docs.
73
- 2. Identify the affected action: edit, read, verify, command run, commit, push, delete, migration, background process, browser launch, or final report.
74
- 3. Select the nearest applicable repository root and path scope. If a nested repository is involved, reread that repository's instructions before editing there.
75
- 4. Apply the stricter safe rule when safety, secrets, destructive actions, command permission, or repository boundaries conflict.
76
- 5. Treat preferences as defaults only. Do not let preferences authorize commands, commits, pushes, migrations, or edits that higher-priority rules block.
77
- 6. If command authority is unclear, use configured command intents only or report the missing command rather than inferring a raw command.
78
- 7. If the conflict can be resolved by a small documentation or template clarification, update the source that caused confusion and keep the wording subordinate to the canonical contract.
79
- 8. Report the chosen scope, skipped scope, and reason when part of the request cannot be completed safely.
80
-
81
- <!-- mustflow-section: postconditions -->
82
- ## Postconditions
83
-
84
- - The active instruction source, repository root, edit scope, command scope, and skipped scope are clear.
85
- - Any changed docs or templates do not create a new self-authorizing policy source.
86
- - The final report distinguishes completed work from blocked, deferred, or intentionally skipped work.
87
-
88
- <!-- mustflow-section: verification -->
89
- ## Verification
90
-
91
- Use configured oneshot command intents when available:
92
-
93
- - `changes_status`
94
- - `changes_diff_summary`
95
- - `docs_validate_fast`
96
- - `test_release`
97
- - `mustflow_check`
98
-
99
- Use a narrower configured test or docs intent when it better proves the clarified instruction or template surface.
100
-
101
- <!-- mustflow-section: failure-handling -->
102
- ## Failure Handling
103
-
104
- - If two high-priority instructions cannot be reconciled, stop and report the conflict instead of guessing.
105
- - If the nearest repository root is unclear, inspect read-only status and instruction files before editing.
106
- - If a command, Git operation, migration, or destructive action lacks authority, do not run it. Report the missing approval or command contract.
107
- - If validation finds command-permission or authority drift, fix that drift before adding unrelated behavior.
108
-
109
- <!-- mustflow-section: output-format -->
110
- ## Output Format
111
-
112
- - Conflicting instruction sources
113
- - Chosen priority rule and repository scope
114
- - Actions allowed, narrowed, skipped, or deferred
115
- - Documentation or template clarifications made
116
- - Command intents run
117
- - Skipped checks and reasons
118
- - Remaining authority or scope risk
@@ -1,111 +0,0 @@
1
- ---
2
- mustflow_doc: skill.line-ending-hygiene
3
- locale: zh
4
- canonical: false
5
- revision: 1
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: line-ending-hygiene
9
- description: Apply this skill when Git reports CRLF/LF warnings or when tracked text files may need repository line-ending normalization.
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.line-ending-hygiene
15
- command_intents:
16
- - line_endings_check
17
- - changes_status
18
- - mustflow_check
19
- ---
20
-
21
- # Line Ending Hygiene
22
-
23
- <!-- mustflow-section: purpose -->
24
- ## Purpose
25
-
26
- Detect line-ending drift without silently rewriting a repository, and normalize only when a repository policy and explicit user request make it safe.
27
-
28
- <!-- mustflow-section: use-when -->
29
- ## Use When
30
-
31
- - Git reports CRLF, LF, or line-ending replacement warnings.
32
- - A diff or formatter appears to rewrite files only because of line endings.
33
- - A user asks why line-ending warnings appear.
34
- - A user asks to normalize tracked files to the repository line-ending policy.
35
-
36
- <!-- mustflow-section: do-not-use-when -->
37
- ## Do Not Use When
38
-
39
- - The task is unrelated to Git, text files, formatting, or command-output warnings.
40
- - The repository has no line-ending policy and the user has not asked to create one.
41
- - The only affected files are generated artifacts, package archives, images, databases, or other binary files.
42
-
43
- <!-- mustflow-section: required-inputs -->
44
- ## Required Inputs
45
-
46
- - The warning text or changed-file evidence.
47
- - Current `.gitattributes` or equivalent repository line-ending policy.
48
- - Current changed-file status.
49
- - The configured command intents for line-ending checks and manual normalization.
50
-
51
- <!-- mustflow-section: preconditions -->
52
- ## Preconditions
53
-
54
- - The task matches the Use When conditions and does not match the Do Not Use When exclusions.
55
- - Required inputs are available, or missing inputs can be reported without guessing.
56
- - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current scope.
57
-
58
- <!-- mustflow-section: allowed-edits -->
59
- ## Allowed Edits
60
-
61
- - Update line-ending policy files only when the user asks for a repository policy change.
62
- - Normalize tracked text files only when the user explicitly requests normalization and the repository declares an LF policy.
63
- - Do not rewrite binary files, generated archives, dependency folders, or unrelated source files.
64
- - Do not change formatting, indentation, or content while handling line endings.
65
-
66
- <!-- mustflow-section: procedure -->
67
- ## Procedure
68
-
69
- 1. Inspect the changed-file status before deciding whether line endings are the actual issue.
70
- 2. Use the `line_endings_check` intent when it is configured and agent-runnable.
71
- 3. If no LF policy is declared, report the missing policy instead of normalizing files.
72
- 4. If drift is found, report the affected tracked files and whether normalization was only previewed.
73
- 5. Use normalization only after an explicit user request, and treat `line_endings_normalize` as manual-only unless the repository declares otherwise.
74
- 6. After any normalization, re-run the line-ending check and a relevant validation intent for the touched scope.
75
- 7. Keep the final report focused on policy, files changed, checks run, and remaining risk.
76
-
77
- <!-- mustflow-section: postconditions -->
78
- ## Postconditions
79
-
80
- - The agent has not silently rewritten the working tree.
81
- - Any normalization is tied to a declared repository policy.
82
- - Remaining CRLF, mixed line endings, missing policy, or manual-only command gaps are reported.
83
-
84
- <!-- mustflow-section: verification -->
85
- ## Verification
86
-
87
- Use configured oneshot command intents when available:
88
-
89
- - `line_endings_check`
90
- - `changes_status`
91
- - `mustflow_check`
92
-
93
- If normalization touched code, documentation, templates, or release surfaces, also run the narrowest configured verification that covers those changed files.
94
-
95
- <!-- mustflow-section: failure-handling -->
96
- ## Failure Handling
97
-
98
- - If Git is unavailable or the repository is not a Git working tree, report that tracked-file inspection is unavailable.
99
- - If a line-ending check fails because drift exists, do not treat it as a tool failure; report the affected files and next safe action.
100
- - If normalization fails, stop after the first relevant error and do not attempt broader formatting.
101
- - If the repository policy conflicts with user intent, ask for an explicit policy decision before editing.
102
-
103
- <!-- mustflow-section: output-format -->
104
- ## Output Format
105
-
106
- - Line-ending policy found
107
- - Files with CRLF or mixed line endings
108
- - Files normalized
109
- - Command intents run
110
- - Command intents skipped with reasons
111
- - Remaining line-ending risk
@@ -1,117 +0,0 @@
1
- ---
2
- mustflow_doc: skill.migration-safety-check
3
- locale: zh
4
- canonical: false
5
- revision: 1
6
- lifecycle: mustflow-owned
7
- authority: procedure
8
- name: migration-safety-check
9
- description: Apply this skill when code, data, schema, configuration, file layout, template, or generated-state migrations are planned, edited, documented, or reported.
10
- metadata:
11
- mustflow_schema: "1"
12
- mustflow_kind: procedure
13
- pack_id: mustflow.core
14
- skill_id: mustflow.core.migration-safety-check
15
- command_intents:
16
- - changes_status
17
- - changes_diff_summary
18
- - docs_validate_fast
19
- - test_release
20
- - mustflow_check
21
- ---
22
-
23
- # Migration Safety Check
24
-
25
- <!-- mustflow-section: purpose -->
26
- ## Purpose
27
-
28
- Keep migrations reversible, scoped, and verified before they affect data, schemas, configuration, templates, generated state, or file layout.
29
-
30
- <!-- mustflow-section: use-when -->
31
- ## Use When
32
-
33
- - A change moves, renames, deletes, transforms, backfills, or rewrites files, data, schemas, configuration, template state, generated state, or persisted metadata.
34
- - A task mentions migration, upgrade, conversion, import, export, reindexing, backfill, cleanup, lock refresh, or baseline regeneration.
35
- - Documentation or final reports claim that a migration is safe, complete, reversible, idempotent, or already applied.
36
- - A change could make older installed projects, existing lock files, generated files, caches, or user-edited documents incompatible.
37
-
38
- <!-- mustflow-section: do-not-use-when -->
39
- ## Do Not Use When
40
-
41
- - The change is a small local refactor with no persisted, generated, installed, or user data surface.
42
- - The task only edits inert documentation and makes no claim about applying or validating a migration.
43
- - The migration would require live production access, destructive actions, or manual operator approval that is outside the current command contract.
44
-
45
- <!-- mustflow-section: required-inputs -->
46
- ## Required Inputs
47
-
48
- - The source state, target state, and the files or data that would change.
49
- - The owner of the migration surface: code, schema, template, lock file, generated state, cache, package, or docs.
50
- - Idempotency, rollback, backup, dry-run, compatibility, and failure behavior expectations.
51
- - Relevant command-intent contract entries for status, diff, docs, release, build, or mustflow validation.
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
- - Add or tighten migration plans, compatibility notes, dry-run behavior, validation checks, lock metadata, tests, and docs tied to the changed surface.
64
- - Prefer idempotent, explicit, and inspectable migration behavior over implicit one-way rewrites.
65
- - Mark rollback, backup, or compatibility gaps as unverified when they cannot be proven.
66
- - Do not run destructive migrations, delete user data, rewrite generated state broadly, or claim live migration success without configured evidence.
67
-
68
- <!-- mustflow-section: procedure -->
69
- ## Procedure
70
-
71
- 1. Identify the migration surface and classify it as code, schema, data, configuration, template, generated state, cache, package metadata, or documentation.
72
- 2. Record the source state, target state, expected affected paths, and whether the change must support old and new states during transition.
73
- 3. Check whether the migration is idempotent: a second run should either do nothing or report an already-applied state without extra diffs.
74
- 4. Check rollback or recovery expectations: backup, restore path, manual fallback, or explicit "not reversible" report.
75
- 5. Prefer dry-run or read-only inspection before apply behavior when a command or workflow exists for it.
76
- 6. Keep compatibility claims tied to fixtures, lock metadata, tests, generated output, or documented command results.
77
- 7. If the migration changes public docs, installed templates, package contents, or lock files, synchronize the related metadata and version surfaces.
78
- 8. Run the narrowest configured verification that proves the migrated surface and its metadata still agree.
79
-
80
- <!-- mustflow-section: postconditions -->
81
- ## Postconditions
82
-
83
- - The migration surface, source state, target state, and compatibility boundary are named.
84
- - Idempotency, rollback, backup, dry-run, and verification status are either proven or explicitly left as remaining risk.
85
- - Final reports do not imply that a live or destructive migration ran unless configured evidence proves it.
86
-
87
- <!-- mustflow-section: verification -->
88
- ## Verification
89
-
90
- Use configured oneshot command intents when available:
91
-
92
- - `changes_status`
93
- - `changes_diff_summary`
94
- - `docs_validate_fast`
95
- - `test_release`
96
- - `mustflow_check`
97
-
98
- Use a narrower configured test, build, migration dry-run, or documentation intent when it better proves the changed migration surface.
99
-
100
- <!-- mustflow-section: failure-handling -->
101
- ## Failure Handling
102
-
103
- - If the migration has no rollback or dry-run path, report that risk before applying broader changes.
104
- - If a migration check fails, stop at the first affected surface and avoid cascading rewrites.
105
- - If old and new states conflict, preserve user data and lock metadata before updating generated or derived files.
106
- - If verification requires live data, operator approval, or destructive access, stop at that boundary and report the skipped check.
107
-
108
- <!-- mustflow-section: output-format -->
109
- ## Output Format
110
-
111
- - Migration surface reviewed
112
- - Source and target state
113
- - Idempotency and rollback status
114
- - Compatibility or lock metadata updated
115
- - Command intents run
116
- - Skipped checks and reasons
117
- - Remaining migration risk