mustflow 1.18.16 → 1.31.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 (314) hide show
  1. package/README.md +28 -8
  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 +302 -168
  10. package/dist/cli/commands/update.js +91 -61
  11. package/dist/cli/commands/upgrade.js +65 -0
  12. package/dist/cli/commands/verify.js +304 -139
  13. package/dist/cli/i18n/en.js +77 -4
  14. package/dist/cli/i18n/es.js +77 -4
  15. package/dist/cli/i18n/fr.js +77 -4
  16. package/dist/cli/i18n/hi.js +77 -4
  17. package/dist/cli/i18n/ko.js +77 -4
  18. package/dist/cli/i18n/zh.js +77 -4
  19. package/dist/cli/index.js +34 -42
  20. package/dist/cli/lib/command-registry.js +15 -0
  21. package/dist/cli/lib/dashboard-export.js +775 -0
  22. package/dist/cli/lib/dashboard-html.js +1 -1
  23. package/dist/cli/lib/local-index.js +33 -14
  24. package/dist/cli/lib/reporter.js +6 -0
  25. package/dist/cli/lib/run-plan.js +239 -0
  26. package/dist/cli/lib/templates.js +18 -3
  27. package/dist/cli/lib/update-diff-preview.js +163 -0
  28. package/dist/cli/lib/validation.js +132 -1
  29. package/dist/core/adapter-compatibility.js +235 -0
  30. package/dist/core/bounded-output.js +38 -0
  31. package/dist/core/change-classification.js +14 -1
  32. package/dist/core/change-verification.js +246 -5
  33. package/dist/core/check-issues.js +10 -0
  34. package/dist/core/command-contract-validation.js +34 -0
  35. package/dist/core/command-cwd.js +18 -6
  36. package/dist/core/command-effects.js +13 -0
  37. package/dist/core/command-env.js +91 -0
  38. package/dist/core/contract-lint.js +260 -4
  39. package/dist/core/contract-models.js +172 -0
  40. package/dist/core/dashboard-verification.js +10 -0
  41. package/dist/core/doc-review-triage.js +1 -0
  42. package/dist/core/handoff-record.js +376 -0
  43. package/dist/core/public-json-contracts.js +23 -0
  44. package/dist/core/run-performance-history.js +307 -0
  45. package/dist/core/run-profile.js +87 -0
  46. package/dist/core/run-receipt.js +217 -11
  47. package/dist/core/run-write-drift.js +196 -0
  48. package/dist/core/secret-redaction.js +39 -0
  49. package/dist/core/skill-route-alignment.js +90 -0
  50. package/dist/core/source-anchors.js +3 -5
  51. package/dist/core/test-selection.js +224 -0
  52. package/dist/core/verification-decision-graph.js +290 -0
  53. package/dist/core/verification-scheduler.js +96 -2
  54. package/package.json +3 -1
  55. package/schemas/README.md +15 -4
  56. package/schemas/adapter-compatibility-report.schema.json +184 -0
  57. package/schemas/change-verification-report.schema.json +286 -4
  58. package/schemas/commands.schema.json +55 -2
  59. package/schemas/contract-lint-report.schema.json +99 -0
  60. package/schemas/dashboard-export.schema.json +273 -0
  61. package/schemas/explain-report.schema.json +267 -2
  62. package/schemas/handoff-validation-report.schema.json +68 -0
  63. package/schemas/run-receipt.schema.json +183 -1
  64. package/templates/default/common/.mustflow/config/commands.toml +3 -1
  65. package/templates/default/i18n.toml +78 -234
  66. package/templates/default/locales/en/.mustflow/skills/INDEX.md +7 -3
  67. package/templates/default/locales/en/.mustflow/skills/architecture-deepening-review/SKILL.md +154 -0
  68. package/templates/default/locales/en/.mustflow/skills/behavior-preserving-refactor/SKILL.md +8 -3
  69. package/templates/default/locales/en/.mustflow/skills/code-review/SKILL.md +9 -4
  70. package/templates/default/locales/en/.mustflow/skills/date-number-audit/SKILL.md +19 -4
  71. package/templates/default/locales/en/.mustflow/skills/diff-risk-review/SKILL.md +4 -2
  72. package/templates/default/locales/en/.mustflow/skills/external-skill-intake/SKILL.md +141 -0
  73. package/templates/default/locales/en/.mustflow/skills/release-notes-authoring/SKILL.md +143 -0
  74. package/templates/default/locales/en/.mustflow/skills/repro-first-debug/SKILL.md +22 -8
  75. package/templates/default/locales/en/.mustflow/skills/skill-authoring/SKILL.md +3 -3
  76. package/templates/default/locales/en/.mustflow/skills/source-freshness-check/SKILL.md +22 -9
  77. package/templates/default/locales/en/.mustflow/skills/ui-quality-gate/SKILL.md +21 -13
  78. package/templates/default/locales/en/.mustflow/skills/vertical-slice-tdd/SKILL.md +167 -0
  79. package/templates/default/manifest.toml +16 -1
  80. package/templates/default/locales/es/.mustflow/skills/INDEX.md +0 -75
  81. package/templates/default/locales/es/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  82. package/templates/default/locales/es/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  83. package/templates/default/locales/es/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  84. package/templates/default/locales/es/.mustflow/skills/code-review/SKILL.md +0 -115
  85. package/templates/default/locales/es/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  86. package/templates/default/locales/es/.mustflow/skills/command-pattern/SKILL.md +0 -247
  87. package/templates/default/locales/es/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  88. package/templates/default/locales/es/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  89. package/templates/default/locales/es/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  90. package/templates/default/locales/es/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  91. package/templates/default/locales/es/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  92. package/templates/default/locales/es/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  93. package/templates/default/locales/es/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  94. package/templates/default/locales/es/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  95. package/templates/default/locales/es/.mustflow/skills/docs-update/SKILL.md +0 -97
  96. package/templates/default/locales/es/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  97. package/templates/default/locales/es/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  98. package/templates/default/locales/es/.mustflow/skills/failure-triage/SKILL.md +0 -97
  99. package/templates/default/locales/es/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  100. package/templates/default/locales/es/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  101. package/templates/default/locales/es/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  102. package/templates/default/locales/es/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
  103. package/templates/default/locales/es/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  104. package/templates/default/locales/es/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  105. package/templates/default/locales/es/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  106. package/templates/default/locales/es/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  107. package/templates/default/locales/es/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  108. package/templates/default/locales/es/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  109. package/templates/default/locales/es/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  110. package/templates/default/locales/es/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  111. package/templates/default/locales/es/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  112. package/templates/default/locales/es/.mustflow/skills/result-option/SKILL.md +0 -186
  113. package/templates/default/locales/es/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  114. package/templates/default/locales/es/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  115. package/templates/default/locales/es/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  116. package/templates/default/locales/es/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  117. package/templates/default/locales/es/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  118. package/templates/default/locales/es/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  119. package/templates/default/locales/es/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  120. package/templates/default/locales/es/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  121. package/templates/default/locales/es/.mustflow/skills/test-maintenance/SKILL.md +0 -122
  122. package/templates/default/locales/es/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  123. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  124. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  125. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  126. package/templates/default/locales/es/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
  127. package/templates/default/locales/fr/.mustflow/skills/INDEX.md +0 -75
  128. package/templates/default/locales/fr/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  129. package/templates/default/locales/fr/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  130. package/templates/default/locales/fr/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  131. package/templates/default/locales/fr/.mustflow/skills/code-review/SKILL.md +0 -115
  132. package/templates/default/locales/fr/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  133. package/templates/default/locales/fr/.mustflow/skills/command-pattern/SKILL.md +0 -247
  134. package/templates/default/locales/fr/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  135. package/templates/default/locales/fr/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  136. package/templates/default/locales/fr/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  137. package/templates/default/locales/fr/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  138. package/templates/default/locales/fr/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  139. package/templates/default/locales/fr/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  140. package/templates/default/locales/fr/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  141. package/templates/default/locales/fr/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  142. package/templates/default/locales/fr/.mustflow/skills/docs-update/SKILL.md +0 -97
  143. package/templates/default/locales/fr/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  144. package/templates/default/locales/fr/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  145. package/templates/default/locales/fr/.mustflow/skills/failure-triage/SKILL.md +0 -97
  146. package/templates/default/locales/fr/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  147. package/templates/default/locales/fr/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  148. package/templates/default/locales/fr/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  149. package/templates/default/locales/fr/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
  150. package/templates/default/locales/fr/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  151. package/templates/default/locales/fr/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  152. package/templates/default/locales/fr/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  153. package/templates/default/locales/fr/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  154. package/templates/default/locales/fr/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  155. package/templates/default/locales/fr/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  156. package/templates/default/locales/fr/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  157. package/templates/default/locales/fr/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  158. package/templates/default/locales/fr/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  159. package/templates/default/locales/fr/.mustflow/skills/result-option/SKILL.md +0 -186
  160. package/templates/default/locales/fr/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  161. package/templates/default/locales/fr/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  162. package/templates/default/locales/fr/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  163. package/templates/default/locales/fr/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  164. package/templates/default/locales/fr/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  165. package/templates/default/locales/fr/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  166. package/templates/default/locales/fr/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  167. package/templates/default/locales/fr/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  168. package/templates/default/locales/fr/.mustflow/skills/test-maintenance/SKILL.md +0 -122
  169. package/templates/default/locales/fr/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  170. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  171. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  172. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  173. package/templates/default/locales/fr/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
  174. package/templates/default/locales/hi/.mustflow/skills/INDEX.md +0 -75
  175. package/templates/default/locales/hi/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  176. package/templates/default/locales/hi/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  177. package/templates/default/locales/hi/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  178. package/templates/default/locales/hi/.mustflow/skills/code-review/SKILL.md +0 -115
  179. package/templates/default/locales/hi/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  180. package/templates/default/locales/hi/.mustflow/skills/command-pattern/SKILL.md +0 -247
  181. package/templates/default/locales/hi/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  182. package/templates/default/locales/hi/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  183. package/templates/default/locales/hi/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  184. package/templates/default/locales/hi/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  185. package/templates/default/locales/hi/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  186. package/templates/default/locales/hi/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  187. package/templates/default/locales/hi/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  188. package/templates/default/locales/hi/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  189. package/templates/default/locales/hi/.mustflow/skills/docs-update/SKILL.md +0 -97
  190. package/templates/default/locales/hi/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  191. package/templates/default/locales/hi/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  192. package/templates/default/locales/hi/.mustflow/skills/failure-triage/SKILL.md +0 -97
  193. package/templates/default/locales/hi/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  194. package/templates/default/locales/hi/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  195. package/templates/default/locales/hi/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  196. package/templates/default/locales/hi/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
  197. package/templates/default/locales/hi/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  198. package/templates/default/locales/hi/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  199. package/templates/default/locales/hi/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  200. package/templates/default/locales/hi/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  201. package/templates/default/locales/hi/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  202. package/templates/default/locales/hi/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  203. package/templates/default/locales/hi/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  204. package/templates/default/locales/hi/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  205. package/templates/default/locales/hi/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  206. package/templates/default/locales/hi/.mustflow/skills/result-option/SKILL.md +0 -186
  207. package/templates/default/locales/hi/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  208. package/templates/default/locales/hi/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  209. package/templates/default/locales/hi/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  210. package/templates/default/locales/hi/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  211. package/templates/default/locales/hi/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  212. package/templates/default/locales/hi/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  213. package/templates/default/locales/hi/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  214. package/templates/default/locales/hi/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  215. package/templates/default/locales/hi/.mustflow/skills/test-maintenance/SKILL.md +0 -122
  216. package/templates/default/locales/hi/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  217. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  218. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  219. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  220. package/templates/default/locales/hi/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
  221. package/templates/default/locales/ko/.mustflow/skills/INDEX.md +0 -80
  222. package/templates/default/locales/ko/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  223. package/templates/default/locales/ko/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  224. package/templates/default/locales/ko/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  225. package/templates/default/locales/ko/.mustflow/skills/code-review/SKILL.md +0 -118
  226. package/templates/default/locales/ko/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  227. package/templates/default/locales/ko/.mustflow/skills/command-pattern/SKILL.md +0 -247
  228. package/templates/default/locales/ko/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  229. package/templates/default/locales/ko/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  230. package/templates/default/locales/ko/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  231. package/templates/default/locales/ko/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  232. package/templates/default/locales/ko/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  233. package/templates/default/locales/ko/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  234. package/templates/default/locales/ko/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  235. package/templates/default/locales/ko/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  236. package/templates/default/locales/ko/.mustflow/skills/docs-update/SKILL.md +0 -107
  237. package/templates/default/locales/ko/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  238. package/templates/default/locales/ko/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  239. package/templates/default/locales/ko/.mustflow/skills/failure-triage/SKILL.md +0 -119
  240. package/templates/default/locales/ko/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  241. package/templates/default/locales/ko/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  242. package/templates/default/locales/ko/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  243. package/templates/default/locales/ko/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -259
  244. package/templates/default/locales/ko/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  245. package/templates/default/locales/ko/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  246. package/templates/default/locales/ko/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  247. package/templates/default/locales/ko/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  248. package/templates/default/locales/ko/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  249. package/templates/default/locales/ko/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  250. package/templates/default/locales/ko/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  251. package/templates/default/locales/ko/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  252. package/templates/default/locales/ko/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  253. package/templates/default/locales/ko/.mustflow/skills/result-option/SKILL.md +0 -186
  254. package/templates/default/locales/ko/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  255. package/templates/default/locales/ko/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  256. package/templates/default/locales/ko/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  257. package/templates/default/locales/ko/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  258. package/templates/default/locales/ko/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  259. package/templates/default/locales/ko/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  260. package/templates/default/locales/ko/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  261. package/templates/default/locales/ko/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  262. package/templates/default/locales/ko/.mustflow/skills/test-maintenance/SKILL.md +0 -130
  263. package/templates/default/locales/ko/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  264. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  265. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  266. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  267. package/templates/default/locales/ko/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
  268. package/templates/default/locales/zh/.mustflow/skills/INDEX.md +0 -74
  269. package/templates/default/locales/zh/.mustflow/skills/adapter-boundary/SKILL.md +0 -193
  270. package/templates/default/locales/zh/.mustflow/skills/artifact-integrity-check/SKILL.md +0 -114
  271. package/templates/default/locales/zh/.mustflow/skills/behavior-preserving-refactor/SKILL.md +0 -182
  272. package/templates/default/locales/zh/.mustflow/skills/code-review/SKILL.md +0 -115
  273. package/templates/default/locales/zh/.mustflow/skills/codebase-orientation/SKILL.md +0 -115
  274. package/templates/default/locales/zh/.mustflow/skills/command-pattern/SKILL.md +0 -247
  275. package/templates/default/locales/zh/.mustflow/skills/composition-over-inheritance/SKILL.md +0 -176
  276. package/templates/default/locales/zh/.mustflow/skills/contract-sync-check/SKILL.md +0 -116
  277. package/templates/default/locales/zh/.mustflow/skills/database-change-safety/SKILL.md +0 -155
  278. package/templates/default/locales/zh/.mustflow/skills/date-number-audit/SKILL.md +0 -116
  279. package/templates/default/locales/zh/.mustflow/skills/dependency-injection/SKILL.md +0 -161
  280. package/templates/default/locales/zh/.mustflow/skills/dependency-reality-check/SKILL.md +0 -115
  281. package/templates/default/locales/zh/.mustflow/skills/diff-risk-review/SKILL.md +0 -136
  282. package/templates/default/locales/zh/.mustflow/skills/docs-prose-review/SKILL.md +0 -119
  283. package/templates/default/locales/zh/.mustflow/skills/docs-update/SKILL.md +0 -97
  284. package/templates/default/locales/zh/.mustflow/skills/external-prompt-injection-defense/SKILL.md +0 -116
  285. package/templates/default/locales/zh/.mustflow/skills/facade-pattern/SKILL.md +0 -210
  286. package/templates/default/locales/zh/.mustflow/skills/failure-triage/SKILL.md +0 -96
  287. package/templates/default/locales/zh/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +0 -118
  288. package/templates/default/locales/zh/.mustflow/skills/line-ending-hygiene/SKILL.md +0 -111
  289. package/templates/default/locales/zh/.mustflow/skills/migration-safety-check/SKILL.md +0 -117
  290. package/templates/default/locales/zh/.mustflow/skills/multi-agent-work-coordination/SKILL.md +0 -260
  291. package/templates/default/locales/zh/.mustflow/skills/null-object-pattern/SKILL.md +0 -196
  292. package/templates/default/locales/zh/.mustflow/skills/pattern-scout/SKILL.md +0 -110
  293. package/templates/default/locales/zh/.mustflow/skills/performance-budget-check/SKILL.md +0 -121
  294. package/templates/default/locales/zh/.mustflow/skills/project-context-authoring/SKILL.md +0 -107
  295. package/templates/default/locales/zh/.mustflow/skills/pure-core-imperative-shell/SKILL.md +0 -212
  296. package/templates/default/locales/zh/.mustflow/skills/readme-authoring/SKILL.md +0 -115
  297. package/templates/default/locales/zh/.mustflow/skills/repo-improvement-loop/SKILL.md +0 -150
  298. package/templates/default/locales/zh/.mustflow/skills/repro-first-debug/SKILL.md +0 -112
  299. package/templates/default/locales/zh/.mustflow/skills/requirement-regression-guard/SKILL.md +0 -152
  300. package/templates/default/locales/zh/.mustflow/skills/result-option/SKILL.md +0 -186
  301. package/templates/default/locales/zh/.mustflow/skills/security-privacy-review/SKILL.md +0 -116
  302. package/templates/default/locales/zh/.mustflow/skills/security-regression-tests/SKILL.md +0 -131
  303. package/templates/default/locales/zh/.mustflow/skills/skill-authoring/SKILL.md +0 -110
  304. package/templates/default/locales/zh/.mustflow/skills/source-freshness-check/SKILL.md +0 -111
  305. package/templates/default/locales/zh/.mustflow/skills/state-machine-pattern/SKILL.md +0 -214
  306. package/templates/default/locales/zh/.mustflow/skills/strategy-pattern/SKILL.md +0 -215
  307. package/templates/default/locales/zh/.mustflow/skills/structure-discovery-gate/SKILL.md +0 -159
  308. package/templates/default/locales/zh/.mustflow/skills/test-design-guard/SKILL.md +0 -162
  309. package/templates/default/locales/zh/.mustflow/skills/test-maintenance/SKILL.md +0 -122
  310. package/templates/default/locales/zh/.mustflow/skills/ui-quality-gate/SKILL.md +0 -117
  311. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/SKILL.md +0 -127
  312. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/assets/review-template.html +0 -286
  313. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/resources.toml +0 -7
  314. package/templates/default/locales/zh/.mustflow/skills/web-asset-optimization/SKILL.md +0 -108
@@ -0,0 +1,290 @@
1
+ import { isRecord, readString, readStringArray, } from './config-loading.js';
2
+ export const VERIFICATION_DECISION_GRAPH_SCHEMA_VERSION = '1';
3
+ function stableIdPart(value) {
4
+ return value.trim().replace(/[^A-Za-z0-9_.-]+/gu, '_') || 'none';
5
+ }
6
+ function readBoolean(table, key) {
7
+ const value = table[key];
8
+ return typeof value === 'boolean' ? value : null;
9
+ }
10
+ function readTimeoutSeconds(table) {
11
+ const value = table.timeout_seconds;
12
+ return Number.isInteger(value) ? Number(value) : null;
13
+ }
14
+ function readCommandEffects(rawIntent) {
15
+ const effects = rawIntent.effects;
16
+ if (!Array.isArray(effects)) {
17
+ return [];
18
+ }
19
+ return effects.filter(isRecord).map((effect) => ({
20
+ type: readString(effect, 'type') ?? null,
21
+ mode: readString(effect, 'mode') ?? null,
22
+ path: readString(effect, 'path') ?? null,
23
+ paths: readStringArray(effect, 'paths') ?? [],
24
+ lock: readString(effect, 'lock') ?? null,
25
+ concurrency: readString(effect, 'concurrency') ?? null,
26
+ }));
27
+ }
28
+ function readNonNegativeNumber(table, key) {
29
+ const value = table[key];
30
+ return typeof value === 'number' && Number.isFinite(value) && value >= 0 ? value : null;
31
+ }
32
+ function readNonNegativeInteger(table, key) {
33
+ const value = table[key];
34
+ return Number.isInteger(value) && Number(value) >= 0 ? Number(value) : null;
35
+ }
36
+ function readCoverageHints(rawIntent) {
37
+ const covers = rawIntent.covers;
38
+ if (!isRecord(covers)) {
39
+ return null;
40
+ }
41
+ return {
42
+ reasons: readStringArray(covers, 'reasons') ?? [],
43
+ surfaces: readStringArray(covers, 'surfaces') ?? [],
44
+ paths: readStringArray(covers, 'paths') ?? [],
45
+ contracts: readStringArray(covers, 'contracts') ?? [],
46
+ };
47
+ }
48
+ function readSelectionHints(rawIntent) {
49
+ const selection = rawIntent.selection;
50
+ if (!isRecord(selection)) {
51
+ return null;
52
+ }
53
+ return {
54
+ coverage_level: readString(selection, 'coverage_level') ?? null,
55
+ coverage_confidence: readString(selection, 'coverage_confidence') ?? null,
56
+ accepts_changed_files: readString(selection, 'accepts_changed_files') ?? null,
57
+ fallback_intents: readStringArray(selection, 'fallback_intents') ?? [],
58
+ escalate_to: readStringArray(selection, 'escalate_to') ?? [],
59
+ };
60
+ }
61
+ function readCostHints(rawIntent) {
62
+ const cost = rawIntent.cost;
63
+ if (!isRecord(cost)) {
64
+ return null;
65
+ }
66
+ return {
67
+ expected_seconds: readNonNegativeInteger(cost, 'expected_seconds'),
68
+ cold_start_seconds: readNonNegativeInteger(cost, 'cold_start_seconds'),
69
+ timeout_ratio_expectation: readNonNegativeNumber(cost, 'timeout_ratio_expectation'),
70
+ cost_tier: readString(cost, 'cost_tier') ?? null,
71
+ };
72
+ }
73
+ function readRelationHints(rawIntent) {
74
+ const relations = rawIntent.relations;
75
+ if (!isRecord(relations)) {
76
+ return null;
77
+ }
78
+ return {
79
+ subsumes: readStringArray(relations, 'subsumes') ?? [],
80
+ subsumed_by: readStringArray(relations, 'subsumed_by') ?? [],
81
+ requires_with: readStringArray(relations, 'requires_with') ?? [],
82
+ escalate_to: readStringArray(relations, 'escalate_to') ?? [],
83
+ };
84
+ }
85
+ function readCommandMetadata(commandContract, intent) {
86
+ if (!intent) {
87
+ return null;
88
+ }
89
+ const rawIntent = commandContract.intents[intent];
90
+ if (!isRecord(rawIntent)) {
91
+ return null;
92
+ }
93
+ return {
94
+ status: readString(rawIntent, 'status') ?? null,
95
+ lifecycle: readString(rawIntent, 'lifecycle') ?? null,
96
+ run_policy: readString(rawIntent, 'run_policy') ?? null,
97
+ stdin: readString(rawIntent, 'stdin') ?? null,
98
+ timeout_seconds: readTimeoutSeconds(rawIntent),
99
+ writes: readStringArray(rawIntent, 'writes') ?? [],
100
+ effects: readCommandEffects(rawIntent),
101
+ required_after: readStringArray(rawIntent, 'required_after') ?? [],
102
+ network: readBoolean(rawIntent, 'network'),
103
+ destructive: readBoolean(rawIntent, 'destructive'),
104
+ covers: readCoverageHints(rawIntent),
105
+ selection: readSelectionHints(rawIntent),
106
+ cost: readCostHints(rawIntent),
107
+ relations: readRelationHints(rawIntent),
108
+ };
109
+ }
110
+ function candidateDecisionStatus(commandContract, candidate) {
111
+ if (candidate.status === 'runnable') {
112
+ return 'runnable';
113
+ }
114
+ if (!candidate.intent || candidate.skipReason === 'no_matching_intents') {
115
+ return 'unknown';
116
+ }
117
+ const rawIntent = commandContract.intents[candidate.intent];
118
+ if (!isRecord(rawIntent)) {
119
+ return 'blocked';
120
+ }
121
+ const status = readString(rawIntent, 'status') ?? 'unknown';
122
+ if (status === 'manual_only') {
123
+ return 'manual_only';
124
+ }
125
+ if (status === 'unknown') {
126
+ return 'unknown';
127
+ }
128
+ return candidate.skipReason ? 'blocked' : 'skipped';
129
+ }
130
+ function addNode(nodes, node) {
131
+ if (!nodes.has(node.id)) {
132
+ nodes.set(node.id, node);
133
+ }
134
+ }
135
+ function addEdge(edges, edge) {
136
+ if (!edges.some((item) => item.from === edge.from && item.to === edge.to && item.kind === edge.kind)) {
137
+ edges.push(edge);
138
+ }
139
+ }
140
+ function summarize(nodes, edgeCount) {
141
+ return {
142
+ nodeCount: nodes.length,
143
+ edgeCount,
144
+ runnable: nodes.filter((node) => node.status === 'runnable').length,
145
+ skipped: nodes.filter((node) => node.status === 'skipped').length,
146
+ blocked: nodes.filter((node) => node.status === 'blocked').length,
147
+ manual_only: nodes.filter((node) => node.status === 'manual_only').length,
148
+ unknown: nodes.filter((node) => node.status === 'unknown').length,
149
+ selected: nodes.filter((node) => node.kind === 'command_candidate' && node.data.selectionState === 'selected').length,
150
+ not_selected: nodes.filter((node) => node.kind === 'command_candidate' && node.data.selectionState === 'not_selected')
151
+ .length,
152
+ gapCount: nodes.filter((node) => node.kind === 'gap').length,
153
+ };
154
+ }
155
+ export function createVerificationDecisionGraph(commandContract, requirements, candidates, gaps, schedule) {
156
+ const nodes = new Map();
157
+ const edges = [];
158
+ const candidateNodeByReasonAndIntent = new Map();
159
+ for (const requirement of requirements) {
160
+ const reasonNodeId = `classification_reason:${stableIdPart(requirement.reason)}`;
161
+ addNode(nodes, {
162
+ id: reasonNodeId,
163
+ kind: 'classification_reason',
164
+ label: requirement.reason,
165
+ status: 'not_applicable',
166
+ reason: requirement.reason,
167
+ intent: null,
168
+ data: {
169
+ files: requirement.files,
170
+ surfaces: requirement.surfaces,
171
+ affectedContracts: requirement.affectedContracts,
172
+ driftChecks: requirement.driftChecks,
173
+ updatePolicies: requirement.updatePolicies,
174
+ source: requirement.source,
175
+ },
176
+ });
177
+ for (const surface of requirement.surfaces) {
178
+ const surfaceNodeId = `changed_surface:${stableIdPart(requirement.reason)}:${stableIdPart(surface)}`;
179
+ addNode(nodes, {
180
+ id: surfaceNodeId,
181
+ kind: 'changed_surface',
182
+ label: surface,
183
+ status: 'not_applicable',
184
+ reason: requirement.reason,
185
+ intent: null,
186
+ data: {
187
+ files: requirement.files,
188
+ },
189
+ });
190
+ addEdge(edges, { from: surfaceNodeId, to: reasonNodeId, kind: 'supports' });
191
+ }
192
+ }
193
+ for (const [index, candidate] of candidates.entries()) {
194
+ const reasonNodeId = `classification_reason:${stableIdPart(candidate.reason)}`;
195
+ const intentPart = stableIdPart(candidate.intent ?? 'missing_intent');
196
+ const candidateNodeId = `command_candidate:${stableIdPart(candidate.reason)}:${intentPart}:${index + 1}`;
197
+ const eligibilityNodeId = `eligibility:${stableIdPart(candidate.reason)}:${intentPart}:${index + 1}`;
198
+ const status = candidateDecisionStatus(commandContract, candidate);
199
+ const command = readCommandMetadata(commandContract, candidate.intent);
200
+ const key = `${candidate.reason}\0${candidate.intent ?? ''}`;
201
+ candidateNodeByReasonAndIntent.set(key, [...(candidateNodeByReasonAndIntent.get(key) ?? []), candidateNodeId]);
202
+ addNode(nodes, {
203
+ id: candidateNodeId,
204
+ kind: 'command_candidate',
205
+ label: candidate.intent ?? 'missing intent',
206
+ status,
207
+ reason: candidate.reason,
208
+ intent: candidate.intent,
209
+ data: {
210
+ candidateStatus: candidate.status,
211
+ skipReason: candidate.skipReason,
212
+ detail: candidate.detail,
213
+ candidateState: candidate.candidateState ?? null,
214
+ eligibilityState: candidate.eligibilityState ?? null,
215
+ selectionState: candidate.selectionState ?? null,
216
+ command,
217
+ },
218
+ });
219
+ addNode(nodes, {
220
+ id: eligibilityNodeId,
221
+ kind: 'eligibility',
222
+ label: candidate.skipReason ?? 'ok',
223
+ status,
224
+ reason: candidate.reason,
225
+ intent: candidate.intent,
226
+ data: {
227
+ code: candidate.skipReason ?? 'ok',
228
+ detail: candidate.detail,
229
+ },
230
+ });
231
+ addEdge(edges, { from: reasonNodeId, to: candidateNodeId, kind: 'requires' });
232
+ addEdge(edges, { from: candidateNodeId, to: eligibilityNodeId, kind: 'evaluates' });
233
+ }
234
+ for (const entry of schedule.entries) {
235
+ for (const [index, effect] of entry.effects.entries()) {
236
+ const effectNodeId = `effect:${stableIdPart(entry.intent)}:${index + 1}`;
237
+ addNode(nodes, {
238
+ id: effectNodeId,
239
+ kind: 'effect',
240
+ label: effect.lock,
241
+ status: 'runnable',
242
+ reason: null,
243
+ intent: entry.intent,
244
+ data: {
245
+ source: effect.source,
246
+ access: effect.access,
247
+ mode: effect.mode,
248
+ path: effect.path,
249
+ lock: effect.lock,
250
+ concurrency: effect.concurrency,
251
+ },
252
+ });
253
+ for (const [key, candidateNodeIds] of candidateNodeByReasonAndIntent.entries()) {
254
+ if (!key.endsWith(`\0${entry.intent}`)) {
255
+ continue;
256
+ }
257
+ for (const candidateNodeId of candidateNodeIds) {
258
+ addEdge(edges, { from: candidateNodeId, to: effectNodeId, kind: 'has_effect' });
259
+ }
260
+ }
261
+ }
262
+ }
263
+ for (const gap of gaps) {
264
+ const reasonNodeId = `classification_reason:${stableIdPart(gap.reason)}`;
265
+ const gapNodeId = `gap:${stableIdPart(gap.reason)}`;
266
+ addNode(nodes, {
267
+ id: gapNodeId,
268
+ kind: 'gap',
269
+ label: gap.reason,
270
+ status: 'unknown',
271
+ reason: gap.reason,
272
+ intent: null,
273
+ data: {
274
+ files: gap.files,
275
+ surfaces: gap.surfaces,
276
+ detail: gap.detail,
277
+ },
278
+ });
279
+ addEdge(edges, { from: reasonNodeId, to: gapNodeId, kind: 'has_gap' });
280
+ }
281
+ const sortedNodes = [...nodes.values()].sort((left, right) => left.id.localeCompare(right.id));
282
+ const sortedEdges = [...edges].sort((left, right) => left.from.localeCompare(right.from) || left.to.localeCompare(right.to) || left.kind.localeCompare(right.kind));
283
+ return {
284
+ schema_version: VERIFICATION_DECISION_GRAPH_SCHEMA_VERSION,
285
+ root: 'verification_decision',
286
+ summary: summarize(sortedNodes, sortedEdges.length),
287
+ nodes: sortedNodes,
288
+ edges: sortedEdges,
289
+ };
290
+ }
@@ -1,3 +1,5 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import path from 'node:path';
1
3
  import { commandEffectsConflict, normalizeCommandEffects, } from './command-effects.js';
2
4
  function uniqueSorted(values) {
3
5
  return [...new Set(values)].sort((left, right) => left.localeCompare(right));
@@ -13,6 +15,79 @@ function toScheduleEffect(effect) {
13
15
  concurrency: effect.concurrency,
14
16
  };
15
17
  }
18
+ function isObject(value) {
19
+ return !!value && typeof value === 'object';
20
+ }
21
+ function readJsonFile(filePath) {
22
+ try {
23
+ return JSON.parse(readFileSync(filePath, 'utf8'));
24
+ }
25
+ catch {
26
+ return null;
27
+ }
28
+ }
29
+ function getUndeclaredWriteIntent(value) {
30
+ if (!isObject(value) || typeof value.intent !== 'string') {
31
+ return null;
32
+ }
33
+ const writeDrift = value.write_drift;
34
+ if (!isObject(writeDrift) || writeDrift.has_undeclared_changes !== true) {
35
+ return null;
36
+ }
37
+ return value.intent;
38
+ }
39
+ function resolveStateRelativePath(projectRoot, relativePath) {
40
+ if (typeof relativePath !== 'string' || relativePath.length === 0 || path.isAbsolute(relativePath)) {
41
+ return null;
42
+ }
43
+ const normalized = relativePath.replaceAll('\\', '/');
44
+ if (!normalized.startsWith('.mustflow/state/runs/')) {
45
+ return null;
46
+ }
47
+ const resolved = path.resolve(projectRoot, normalized);
48
+ const relative = path.relative(projectRoot, resolved);
49
+ if (relative.startsWith('..') || path.isAbsolute(relative)) {
50
+ return null;
51
+ }
52
+ return resolved;
53
+ }
54
+ function readVerifyManifestUndeclaredWriteIntents(projectRoot, latest) {
55
+ const manifestPath = resolveStateRelativePath(projectRoot, latest.manifest_path);
56
+ if (!manifestPath) {
57
+ return new Set();
58
+ }
59
+ const manifest = readJsonFile(manifestPath);
60
+ if (!isObject(manifest) || manifest.command !== 'verify' || !Array.isArray(manifest.receipts)) {
61
+ return new Set();
62
+ }
63
+ const intents = new Set();
64
+ for (const entry of manifest.receipts) {
65
+ if (!isObject(entry)) {
66
+ continue;
67
+ }
68
+ const receiptPath = resolveStateRelativePath(projectRoot, entry.receipt_path);
69
+ if (!receiptPath) {
70
+ continue;
71
+ }
72
+ const intent = getUndeclaredWriteIntent(readJsonFile(receiptPath));
73
+ if (intent) {
74
+ intents.add(intent);
75
+ }
76
+ }
77
+ return intents;
78
+ }
79
+ function readLatestUndeclaredWriteIntents(projectRoot) {
80
+ const latestPath = path.join(projectRoot, '.mustflow', 'state', 'runs', 'latest.json');
81
+ const parsed = readJsonFile(latestPath);
82
+ const directIntent = getUndeclaredWriteIntent(parsed);
83
+ if (directIntent) {
84
+ return new Set([directIntent]);
85
+ }
86
+ if (!isObject(parsed) || parsed.command !== 'verify') {
87
+ return new Set();
88
+ }
89
+ return readVerifyManifestUndeclaredWriteIntents(projectRoot, parsed);
90
+ }
16
91
  function entriesConflict(left, right) {
17
92
  const conflicts = [];
18
93
  for (const leftEffect of left.effects) {
@@ -33,7 +108,8 @@ function entriesConflict(left, right) {
33
108
  function addEntryToBatches(batches, batchEntries, entry) {
34
109
  for (let batchIndex = 0; batchIndex < batchEntries.length; batchIndex += 1) {
35
110
  const existingEntries = batchEntries[batchIndex] ?? [];
36
- const hasConflict = existingEntries.some((existing) => entriesConflict(entry, existing).length > 0);
111
+ const hasConflict = !entry.parallelEligible ||
112
+ existingEntries.some((existing) => !existing.parallelEligible || entriesConflict(entry, existing).length > 0);
37
113
  if (hasConflict) {
38
114
  continue;
39
115
  }
@@ -55,14 +131,24 @@ function addEntryToBatches(batches, batchEntries, entry) {
55
131
  });
56
132
  }
57
133
  export function createVerificationSchedule(projectRoot, commandContract, candidates) {
134
+ const latestUndeclaredWriteIntents = readLatestUndeclaredWriteIntents(projectRoot);
58
135
  const runnableIntents = uniqueSorted(candidates
59
136
  .filter((candidate) => candidate.status === 'runnable' && candidate.intent.length > 0)
60
137
  .map((candidate) => candidate.intent));
61
138
  const baseEntries = runnableIntents.map((intent) => {
62
139
  const effects = normalizeCommandEffects(projectRoot, commandContract, intent).map(toScheduleEffect);
140
+ const hasExplicitEffects = effects.length > 0 && effects.every((effect) => effect.source === 'effects');
141
+ const hasUndeclaredWriteDrift = latestUndeclaredWriteIntents.has(intent);
142
+ const parallelEligible = hasExplicitEffects && !hasUndeclaredWriteDrift;
63
143
  return {
64
144
  intent,
65
145
  status: 'runnable',
146
+ parallelEligible,
147
+ parallelReason: hasUndeclaredWriteDrift
148
+ ? 'undeclared_write_drift'
149
+ : hasExplicitEffects
150
+ ? 'explicit_effects'
151
+ : 'missing_explicit_effects',
66
152
  effects,
67
153
  locks: uniqueSorted(effects.map((effect) => effect.lock)),
68
154
  conflicts: [],
@@ -82,11 +168,19 @@ export function createVerificationSchedule(projectRoot, commandContract, candida
82
168
  }
83
169
  return {
84
170
  runner: 'serial_mf_run_receipts',
171
+ failurePolicy: {
172
+ mode: 'batch_boundary',
173
+ startedBatch: 'wait_for_completion',
174
+ nextBatch: 'stop_on_failure',
175
+ },
85
176
  batches,
86
177
  entries,
87
178
  notes: [
88
179
  'Batches explain resource compatibility for planning only.',
89
- 'mf run still writes the latest receipt to a single path, so execute copied commands serially.',
180
+ 'Only entries backed by explicit effects are marked parallel eligible; writes fallback remains serial-only.',
181
+ ...uniqueSorted(latestUndeclaredWriteIntents).map((intent) => `Latest receipt for ${intent} reported undeclared writes; it is not parallel eligible.`),
182
+ 'If a future parallel batch has already started, let it finish and stop before the next batch on failure.',
183
+ 'mf verify still executes copied commands serially and writes the latest run summary after the batch completes.',
90
184
  ],
91
185
  };
92
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mustflow",
3
- "version": "1.18.16",
3
+ "version": "1.31.0",
4
4
  "description": "Agent workflow documents and CLI for mustflow repository roots.",
5
5
  "type": "module",
6
6
  "license": "MIT-0",
@@ -30,6 +30,8 @@
30
30
  "test": "bun run test:full",
31
31
  "test:fast": "bun run build && node scripts/run-cli-tests.mjs fast",
32
32
  "test:related": "bun run build && node scripts/run-cli-tests.mjs related",
33
+ "test:related:cached": "node scripts/run-cli-tests.mjs related-cached",
34
+ "test:related:profile": "bun run build && node scripts/run-cli-tests.mjs related-profile",
33
35
  "test:cli": "bun run build && node scripts/run-cli-tests.mjs cli",
34
36
  "test:coverage": "bun run build && node scripts/run-cli-tests.mjs coverage",
35
37
  "test:audit": "node scripts/audit-tests.mjs --json",
package/schemas/README.md CHANGED
@@ -6,27 +6,38 @@ mustflow files and command output.
6
6
  Current schemas:
7
7
 
8
8
  - `doctor-report.schema.json`: output of `mf doctor --json`
9
+ - `adapter-compatibility-report.schema.json`: output of `mf adapters status --json`
9
10
  - `context-report.schema.json`: output of `mf context --json`
10
- - `run-receipt.schema.json`: output of `mf run <intent> --json` and `.mustflow/state/runs/latest.json`
11
+ - `run-receipt.schema.json`: output of `mf run <intent> --json` and `.mustflow/state/runs/latest.json`,
12
+ including bounded declared-write drift metadata, a safe latest-run performance summary, and optional
13
+ structured phase timings and selection summaries
11
14
  - `commands.schema.json`: parsed `.mustflow/config/commands.toml`
12
15
  - `contract-lint-report.schema.json`: output of `mf contract-lint --json`
16
+ - `dashboard-export.schema.json`: bounded static export written by `mf dashboard --export-json <path>`,
17
+ including output policy, redaction and truncation metadata, and the dashboard harness report
13
18
  - `classify-report.schema.json`: output of `mf classify --changed --json` and
14
19
  `mf classify <path...> --json`
15
20
  - `impact-report.schema.json`: output of `mf impact --changed --json` and
16
21
  `mf impact <path...> --json`
17
22
  - `line-endings-report.schema.json`: output of `mf line-endings check --json` and
18
23
  `mf line-endings normalize --json`
24
+ - `handoff-validation-report.schema.json`: output of
25
+ `mf handoff validate <path> --json`
19
26
  - `version-sources-report.schema.json`: output of `mf version-sources --json`
20
27
  - `docs-review-list.schema.json`: output of `mf docs review list --json`
21
28
  - `explain-report.schema.json`: output of `mf explain authority --json`, `mf explain command --json`,
22
- `mf explain retention --json`, `mf explain skills --json`, and `mf explain surface --json`
29
+ `mf explain verify --reason <event> --json`, `mf explain retention --json`, `mf explain skills --json`,
30
+ and `mf explain surface --json`. Verify explanations include the shared `decisionGraph` evidence model.
23
31
  - `verify-report.schema.json`: output of `mf verify --reason <event> --json`
24
32
  - `change-verification-report.schema.json`: output of `mf verify --reason <event> --plan-only --json` and
25
- `mf verify --from-plan <path> --plan-only --json`
33
+ `mf verify --from-plan <classify-report.json> --plan-only --json`, including the `decision_graph` that links
34
+ changed surfaces, classification reasons, command candidates, eligibility, selected or not-selected state,
35
+ effects, and gaps.
36
+ Local-index command-effect graphs are explanation-only and cannot grant command authority.
26
37
 
27
38
  These schemas define stable, automation-facing fields. Human-readable command
28
39
  output is intentionally excluded.
29
40
 
30
41
  The published schema surface is tracked in `src/core/public-json-contracts.ts`.
31
42
  Release tests verify consistency between this manifest, `schemas/*.schema.json`,
32
- `npm pack --dry-run --json`, and the installed package’s JSON command output.
43
+ `npm pack --dry-run --json`, and the installed package’s JSON command output.
@@ -0,0 +1,184 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mustflow.github.io/schemas/adapter-compatibility-report.schema.json",
4
+ "title": "mustflow adapter compatibility report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "command",
10
+ "ok",
11
+ "mustflow_root",
12
+ "agents_file",
13
+ "summary",
14
+ "host_files",
15
+ "adapter_surfaces",
16
+ "findings",
17
+ "compatibility_notes",
18
+ "required_changes",
19
+ "runtime_policy",
20
+ "boundaries"
21
+ ],
22
+ "properties": {
23
+ "schema_version": { "const": "1" },
24
+ "command": { "const": "adapters_status" },
25
+ "ok": { "type": "boolean" },
26
+ "mustflow_root": { "type": "string" },
27
+ "agents_file": { "$ref": "#/$defs/agentsFile" },
28
+ "summary": { "$ref": "#/$defs/summary" },
29
+ "host_files": {
30
+ "type": "array",
31
+ "items": { "$ref": "#/$defs/hostFile" }
32
+ },
33
+ "adapter_surfaces": {
34
+ "type": "array",
35
+ "items": { "$ref": "#/$defs/adapterSurface" }
36
+ },
37
+ "findings": {
38
+ "type": "array",
39
+ "items": { "$ref": "#/$defs/finding" }
40
+ },
41
+ "compatibility_notes": {
42
+ "type": "array",
43
+ "items": { "$ref": "#/$defs/finding" }
44
+ },
45
+ "required_changes": {
46
+ "type": "array",
47
+ "items": { "$ref": "#/$defs/finding" }
48
+ },
49
+ "runtime_policy": { "$ref": "#/$defs/runtimePolicy" },
50
+ "boundaries": { "$ref": "#/$defs/boundaries" }
51
+ },
52
+ "$defs": {
53
+ "agentsFile": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["path", "present", "authority", "lifecycle", "generated_by_mustflow"],
57
+ "properties": {
58
+ "path": { "const": "AGENTS.md" },
59
+ "present": { "type": "boolean" },
60
+ "authority": { "const": "binding" },
61
+ "lifecycle": { "const": "user_editable" },
62
+ "generated_by_mustflow": { "type": "boolean" }
63
+ }
64
+ },
65
+ "summary": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": [
69
+ "host_instruction_files",
70
+ "adapter_surfaces_present",
71
+ "compatibility_notes",
72
+ "conflicts",
73
+ "required_changes"
74
+ ],
75
+ "properties": {
76
+ "host_instruction_files": { "type": "integer", "minimum": 0 },
77
+ "adapter_surfaces_present": { "type": "integer", "minimum": 0 },
78
+ "compatibility_notes": { "type": "integer", "minimum": 0 },
79
+ "conflicts": { "type": "integer", "minimum": 0 },
80
+ "required_changes": { "type": "integer", "minimum": 0 }
81
+ }
82
+ },
83
+ "hostFile": {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": [
87
+ "host",
88
+ "path",
89
+ "status",
90
+ "instruction_role",
91
+ "authority",
92
+ "mustflow_authority",
93
+ "lifecycle",
94
+ "generated_by_mustflow",
95
+ "binding_to_host",
96
+ "mustflow_command_authority"
97
+ ],
98
+ "properties": {
99
+ "host": { "enum": ["claude_code", "gemini_cli", "github_copilot", "cursor", "generic"] },
100
+ "path": { "type": "string" },
101
+ "status": { "enum": ["absent", "present", "unreadable", "symlink_not_read", "too_large_not_read"] },
102
+ "instruction_role": { "const": "host_instruction" },
103
+ "authority": { "const": "host_specific" },
104
+ "mustflow_authority": { "const": "advisory" },
105
+ "lifecycle": { "const": "user_editable" },
106
+ "generated_by_mustflow": { "const": false },
107
+ "binding_to_host": { "type": "boolean" },
108
+ "mustflow_command_authority": { "const": false }
109
+ }
110
+ },
111
+ "adapterSurface": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": [
115
+ "host",
116
+ "path",
117
+ "kind",
118
+ "present",
119
+ "generated_by_mustflow",
120
+ "generation_policy",
121
+ "mustflow_command_authority"
122
+ ],
123
+ "properties": {
124
+ "host": { "enum": ["claude_code", "gemini_cli", "github_copilot", "cursor", "generic"] },
125
+ "path": { "type": "string" },
126
+ "kind": {
127
+ "enum": [
128
+ "host_instruction_file",
129
+ "editor_settings",
130
+ "ci_configuration",
131
+ "command_adapter",
132
+ "package_manager_scripts"
133
+ ]
134
+ },
135
+ "present": { "type": "boolean" },
136
+ "generated_by_mustflow": { "const": false },
137
+ "generation_policy": { "const": "explicit_user_request_only" },
138
+ "mustflow_command_authority": { "const": false }
139
+ }
140
+ },
141
+ "finding": {
142
+ "type": "object",
143
+ "additionalProperties": false,
144
+ "required": ["severity", "code", "path", "message", "required_change"],
145
+ "properties": {
146
+ "severity": { "enum": ["info", "warning"] },
147
+ "code": { "type": "string" },
148
+ "path": { "type": ["string", "null"] },
149
+ "message": { "type": "string" },
150
+ "required_change": { "type": "boolean" }
151
+ }
152
+ },
153
+ "runtimePolicy": {
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": ["approval_policy", "sandbox_policy", "stricter_than_mustflow", "note"],
157
+ "properties": {
158
+ "approval_policy": { "const": "not_repo_visible" },
159
+ "sandbox_policy": { "const": "not_repo_visible" },
160
+ "stricter_than_mustflow": { "const": "unknown" },
161
+ "note": { "type": "string" }
162
+ }
163
+ },
164
+ "boundaries": {
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "required": [
168
+ "command_authority",
169
+ "host_files_are_command_authority",
170
+ "adapter_generation",
171
+ "does_not_generate"
172
+ ],
173
+ "properties": {
174
+ "command_authority": { "const": ".mustflow/config/commands.toml" },
175
+ "host_files_are_command_authority": { "const": false },
176
+ "adapter_generation": { "const": "explicit_user_request_only" },
177
+ "does_not_generate": {
178
+ "type": "array",
179
+ "items": { "type": "string" }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }