mustflow 1.15.97

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 (415) hide show
  1. package/LICENSE +16 -0
  2. package/README.md +422 -0
  3. package/dist/cli/commands/check.js +73 -0
  4. package/dist/cli/commands/classify.js +104 -0
  5. package/dist/cli/commands/context.js +95 -0
  6. package/dist/cli/commands/contract-lint.js +74 -0
  7. package/dist/cli/commands/dashboard.js +654 -0
  8. package/dist/cli/commands/docs.js +382 -0
  9. package/dist/cli/commands/doctor.js +232 -0
  10. package/dist/cli/commands/explain.js +293 -0
  11. package/dist/cli/commands/help.js +148 -0
  12. package/dist/cli/commands/impact.js +120 -0
  13. package/dist/cli/commands/index.js +70 -0
  14. package/dist/cli/commands/init.js +986 -0
  15. package/dist/cli/commands/line-endings.js +102 -0
  16. package/dist/cli/commands/map.js +95 -0
  17. package/dist/cli/commands/run.js +442 -0
  18. package/dist/cli/commands/search.js +166 -0
  19. package/dist/cli/commands/status.js +65 -0
  20. package/dist/cli/commands/update.js +443 -0
  21. package/dist/cli/commands/verify.js +448 -0
  22. package/dist/cli/commands/version-sources.js +79 -0
  23. package/dist/cli/commands/version.js +57 -0
  24. package/dist/cli/i18n/en.js +702 -0
  25. package/dist/cli/i18n/es.js +702 -0
  26. package/dist/cli/i18n/fr.js +702 -0
  27. package/dist/cli/i18n/hi.js +702 -0
  28. package/dist/cli/i18n/ko.js +702 -0
  29. package/dist/cli/i18n/zh.js +702 -0
  30. package/dist/cli/index.js +218 -0
  31. package/dist/cli/lib/agent-context.js +342 -0
  32. package/dist/cli/lib/browser-open.js +58 -0
  33. package/dist/cli/lib/cli-output.js +36 -0
  34. package/dist/cli/lib/command-contract.js +1 -0
  35. package/dist/cli/lib/command-registry.js +107 -0
  36. package/dist/cli/lib/dashboard-html.js +1866 -0
  37. package/dist/cli/lib/dashboard-locale.js +309 -0
  38. package/dist/cli/lib/dashboard-preferences.js +405 -0
  39. package/dist/cli/lib/doc-review-ledger.js +226 -0
  40. package/dist/cli/lib/filesystem.js +125 -0
  41. package/dist/cli/lib/git-changes.js +13 -0
  42. package/dist/cli/lib/i18n.js +55 -0
  43. package/dist/cli/lib/local-index.js +1014 -0
  44. package/dist/cli/lib/locale-tags.js +4 -0
  45. package/dist/cli/lib/manifest-lock.js +131 -0
  46. package/dist/cli/lib/npm-version-check.js +97 -0
  47. package/dist/cli/lib/package-info.js +13 -0
  48. package/dist/cli/lib/preferences-options.js +8 -0
  49. package/dist/cli/lib/project-root.js +23 -0
  50. package/dist/cli/lib/repo-map.js +635 -0
  51. package/dist/cli/lib/reporter.js +8 -0
  52. package/dist/cli/lib/run-receipt.js +1 -0
  53. package/dist/cli/lib/template-i18n.js +265 -0
  54. package/dist/cli/lib/templates.js +188 -0
  55. package/dist/cli/lib/toml.js +1 -0
  56. package/dist/cli/lib/validation.js +1639 -0
  57. package/dist/cli/lib/version-sources.js +1 -0
  58. package/dist/core/authority-resolution.js +155 -0
  59. package/dist/core/change-classification.js +122 -0
  60. package/dist/core/change-verification.js +80 -0
  61. package/dist/core/check-issues.js +67 -0
  62. package/dist/core/command-classification.js +22 -0
  63. package/dist/core/command-contract-rules.js +27 -0
  64. package/dist/core/command-contract-validation.js +197 -0
  65. package/dist/core/command-cwd.js +12 -0
  66. package/dist/core/command-effects.js +182 -0
  67. package/dist/core/command-explanation.js +135 -0
  68. package/dist/core/command-intent-eligibility.js +76 -0
  69. package/dist/core/config-loading.js +54 -0
  70. package/dist/core/contract-lint.js +110 -0
  71. package/dist/core/contract-models.js +53 -0
  72. package/dist/core/dashboard-verification.js +132 -0
  73. package/dist/core/doc-review-triage.js +92 -0
  74. package/dist/core/line-endings.js +144 -0
  75. package/dist/core/public-json-contracts.js +112 -0
  76. package/dist/core/public-surface-explanation.js +49 -0
  77. package/dist/core/release-version-validation.js +53 -0
  78. package/dist/core/retention-explanation.js +74 -0
  79. package/dist/core/retention-policy.js +57 -0
  80. package/dist/core/run-receipt.js +77 -0
  81. package/dist/core/skill-route-alignment.js +100 -0
  82. package/dist/core/skill-route-explanation.js +117 -0
  83. package/dist/core/source-anchor-explanation.js +33 -0
  84. package/dist/core/source-anchor-status.js +269 -0
  85. package/dist/core/source-anchor-symbols.js +181 -0
  86. package/dist/core/source-anchor-validation.js +158 -0
  87. package/dist/core/source-anchors.js +194 -0
  88. package/dist/core/surface-decision-model.js +18 -0
  89. package/dist/core/toml.js +11 -0
  90. package/dist/core/verification-plan.js +41 -0
  91. package/dist/core/verification-scheduler.js +92 -0
  92. package/dist/core/version-impact.js +54 -0
  93. package/dist/core/version-sources.js +235 -0
  94. package/dist/core/version-sync-policy.js +85 -0
  95. package/examples/README.md +13 -0
  96. package/examples/docs-only/README.md +72 -0
  97. package/examples/host-instruction-conflicts/README.md +47 -0
  98. package/examples/minimal-js/README.md +98 -0
  99. package/examples/missing-command-contracts/README.md +70 -0
  100. package/examples/nested-repos/README.md +62 -0
  101. package/package.json +80 -0
  102. package/schemas/README.md +32 -0
  103. package/schemas/change-verification-report.schema.json +319 -0
  104. package/schemas/classify-report.schema.json +113 -0
  105. package/schemas/commands.schema.json +116 -0
  106. package/schemas/context-report.schema.json +341 -0
  107. package/schemas/contract-lint-report.schema.json +61 -0
  108. package/schemas/docs-review-list.schema.json +72 -0
  109. package/schemas/doctor-report.schema.json +175 -0
  110. package/schemas/explain-report.schema.json +471 -0
  111. package/schemas/impact-report.schema.json +121 -0
  112. package/schemas/line-endings-report.schema.json +63 -0
  113. package/schemas/run-receipt.schema.json +75 -0
  114. package/schemas/verify-report.schema.json +67 -0
  115. package/schemas/version-sources-report.schema.json +42 -0
  116. package/templates/default/common/.mustflow/config/commands.toml +251 -0
  117. package/templates/default/common/.mustflow/config/mustflow.toml +424 -0
  118. package/templates/default/common/.mustflow/config/preferences.toml +125 -0
  119. package/templates/default/common/gitignore.mustflow +9 -0
  120. package/templates/default/i18n.toml +483 -0
  121. package/templates/default/locales/en/.mustflow/context/INDEX.md +39 -0
  122. package/templates/default/locales/en/.mustflow/context/PROJECT.md +66 -0
  123. package/templates/default/locales/en/.mustflow/docs/agent-workflow.md +345 -0
  124. package/templates/default/locales/en/.mustflow/skills/INDEX.md +78 -0
  125. package/templates/default/locales/en/.mustflow/skills/adapter-boundary/SKILL.md +193 -0
  126. package/templates/default/locales/en/.mustflow/skills/artifact-integrity-check/SKILL.md +121 -0
  127. package/templates/default/locales/en/.mustflow/skills/behavior-preserving-refactor/SKILL.md +182 -0
  128. package/templates/default/locales/en/.mustflow/skills/code-review/SKILL.md +115 -0
  129. package/templates/default/locales/en/.mustflow/skills/codebase-orientation/SKILL.md +115 -0
  130. package/templates/default/locales/en/.mustflow/skills/command-pattern/SKILL.md +247 -0
  131. package/templates/default/locales/en/.mustflow/skills/composition-over-inheritance/SKILL.md +176 -0
  132. package/templates/default/locales/en/.mustflow/skills/contract-sync-check/SKILL.md +116 -0
  133. package/templates/default/locales/en/.mustflow/skills/date-number-audit/SKILL.md +116 -0
  134. package/templates/default/locales/en/.mustflow/skills/dependency-injection/SKILL.md +161 -0
  135. package/templates/default/locales/en/.mustflow/skills/dependency-reality-check/SKILL.md +115 -0
  136. package/templates/default/locales/en/.mustflow/skills/diff-risk-review/SKILL.md +143 -0
  137. package/templates/default/locales/en/.mustflow/skills/docs-prose-review/SKILL.md +119 -0
  138. package/templates/default/locales/en/.mustflow/skills/docs-update/SKILL.md +100 -0
  139. package/templates/default/locales/en/.mustflow/skills/external-prompt-injection-defense/SKILL.md +124 -0
  140. package/templates/default/locales/en/.mustflow/skills/facade-pattern/SKILL.md +210 -0
  141. package/templates/default/locales/en/.mustflow/skills/failure-triage/SKILL.md +97 -0
  142. package/templates/default/locales/en/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +118 -0
  143. package/templates/default/locales/en/.mustflow/skills/line-ending-hygiene/SKILL.md +111 -0
  144. package/templates/default/locales/en/.mustflow/skills/migration-safety-check/SKILL.md +117 -0
  145. package/templates/default/locales/en/.mustflow/skills/multi-agent-work-coordination/SKILL.md +260 -0
  146. package/templates/default/locales/en/.mustflow/skills/null-object-pattern/SKILL.md +196 -0
  147. package/templates/default/locales/en/.mustflow/skills/pattern-scout/SKILL.md +110 -0
  148. package/templates/default/locales/en/.mustflow/skills/performance-budget-check/SKILL.md +121 -0
  149. package/templates/default/locales/en/.mustflow/skills/project-context-authoring/SKILL.md +107 -0
  150. package/templates/default/locales/en/.mustflow/skills/pure-core-imperative-shell/SKILL.md +212 -0
  151. package/templates/default/locales/en/.mustflow/skills/readme-authoring/SKILL.md +115 -0
  152. package/templates/default/locales/en/.mustflow/skills/repo-improvement-loop/SKILL.md +150 -0
  153. package/templates/default/locales/en/.mustflow/skills/repro-first-debug/SKILL.md +112 -0
  154. package/templates/default/locales/en/.mustflow/skills/requirement-regression-guard/SKILL.md +152 -0
  155. package/templates/default/locales/en/.mustflow/skills/result-option/SKILL.md +186 -0
  156. package/templates/default/locales/en/.mustflow/skills/security-privacy-review/SKILL.md +130 -0
  157. package/templates/default/locales/en/.mustflow/skills/security-regression-tests/SKILL.md +157 -0
  158. package/templates/default/locales/en/.mustflow/skills/skill-authoring/SKILL.md +110 -0
  159. package/templates/default/locales/en/.mustflow/skills/source-freshness-check/SKILL.md +111 -0
  160. package/templates/default/locales/en/.mustflow/skills/state-machine-pattern/SKILL.md +214 -0
  161. package/templates/default/locales/en/.mustflow/skills/strategy-pattern/SKILL.md +215 -0
  162. package/templates/default/locales/en/.mustflow/skills/structure-discovery-gate/SKILL.md +159 -0
  163. package/templates/default/locales/en/.mustflow/skills/test-maintenance/SKILL.md +122 -0
  164. package/templates/default/locales/en/.mustflow/skills/ui-quality-gate/SKILL.md +119 -0
  165. package/templates/default/locales/en/.mustflow/skills/visual-review-artifact/SKILL.md +127 -0
  166. package/templates/default/locales/en/.mustflow/skills/visual-review-artifact/assets/review-template.html +286 -0
  167. package/templates/default/locales/en/.mustflow/skills/visual-review-artifact/resources.toml +7 -0
  168. package/templates/default/locales/en/.mustflow/skills/web-asset-optimization/SKILL.md +108 -0
  169. package/templates/default/locales/en/AGENTS.md +114 -0
  170. package/templates/default/locales/es/.mustflow/context/INDEX.md +39 -0
  171. package/templates/default/locales/es/.mustflow/context/PROJECT.md +63 -0
  172. package/templates/default/locales/es/.mustflow/docs/agent-workflow.md +365 -0
  173. package/templates/default/locales/es/.mustflow/skills/INDEX.md +78 -0
  174. package/templates/default/locales/es/.mustflow/skills/adapter-boundary/SKILL.md +193 -0
  175. package/templates/default/locales/es/.mustflow/skills/artifact-integrity-check/SKILL.md +114 -0
  176. package/templates/default/locales/es/.mustflow/skills/behavior-preserving-refactor/SKILL.md +182 -0
  177. package/templates/default/locales/es/.mustflow/skills/code-review/SKILL.md +115 -0
  178. package/templates/default/locales/es/.mustflow/skills/codebase-orientation/SKILL.md +115 -0
  179. package/templates/default/locales/es/.mustflow/skills/command-pattern/SKILL.md +247 -0
  180. package/templates/default/locales/es/.mustflow/skills/composition-over-inheritance/SKILL.md +176 -0
  181. package/templates/default/locales/es/.mustflow/skills/contract-sync-check/SKILL.md +116 -0
  182. package/templates/default/locales/es/.mustflow/skills/date-number-audit/SKILL.md +116 -0
  183. package/templates/default/locales/es/.mustflow/skills/dependency-injection/SKILL.md +161 -0
  184. package/templates/default/locales/es/.mustflow/skills/dependency-reality-check/SKILL.md +115 -0
  185. package/templates/default/locales/es/.mustflow/skills/diff-risk-review/SKILL.md +136 -0
  186. package/templates/default/locales/es/.mustflow/skills/docs-prose-review/SKILL.md +119 -0
  187. package/templates/default/locales/es/.mustflow/skills/docs-update/SKILL.md +97 -0
  188. package/templates/default/locales/es/.mustflow/skills/external-prompt-injection-defense/SKILL.md +116 -0
  189. package/templates/default/locales/es/.mustflow/skills/facade-pattern/SKILL.md +210 -0
  190. package/templates/default/locales/es/.mustflow/skills/failure-triage/SKILL.md +97 -0
  191. package/templates/default/locales/es/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +118 -0
  192. package/templates/default/locales/es/.mustflow/skills/line-ending-hygiene/SKILL.md +111 -0
  193. package/templates/default/locales/es/.mustflow/skills/migration-safety-check/SKILL.md +117 -0
  194. package/templates/default/locales/es/.mustflow/skills/multi-agent-work-coordination/SKILL.md +260 -0
  195. package/templates/default/locales/es/.mustflow/skills/null-object-pattern/SKILL.md +196 -0
  196. package/templates/default/locales/es/.mustflow/skills/pattern-scout/SKILL.md +110 -0
  197. package/templates/default/locales/es/.mustflow/skills/performance-budget-check/SKILL.md +121 -0
  198. package/templates/default/locales/es/.mustflow/skills/project-context-authoring/SKILL.md +107 -0
  199. package/templates/default/locales/es/.mustflow/skills/pure-core-imperative-shell/SKILL.md +212 -0
  200. package/templates/default/locales/es/.mustflow/skills/readme-authoring/SKILL.md +115 -0
  201. package/templates/default/locales/es/.mustflow/skills/repo-improvement-loop/SKILL.md +150 -0
  202. package/templates/default/locales/es/.mustflow/skills/repro-first-debug/SKILL.md +112 -0
  203. package/templates/default/locales/es/.mustflow/skills/requirement-regression-guard/SKILL.md +152 -0
  204. package/templates/default/locales/es/.mustflow/skills/result-option/SKILL.md +186 -0
  205. package/templates/default/locales/es/.mustflow/skills/security-privacy-review/SKILL.md +116 -0
  206. package/templates/default/locales/es/.mustflow/skills/security-regression-tests/SKILL.md +131 -0
  207. package/templates/default/locales/es/.mustflow/skills/skill-authoring/SKILL.md +110 -0
  208. package/templates/default/locales/es/.mustflow/skills/source-freshness-check/SKILL.md +111 -0
  209. package/templates/default/locales/es/.mustflow/skills/state-machine-pattern/SKILL.md +214 -0
  210. package/templates/default/locales/es/.mustflow/skills/strategy-pattern/SKILL.md +215 -0
  211. package/templates/default/locales/es/.mustflow/skills/structure-discovery-gate/SKILL.md +159 -0
  212. package/templates/default/locales/es/.mustflow/skills/test-maintenance/SKILL.md +122 -0
  213. package/templates/default/locales/es/.mustflow/skills/ui-quality-gate/SKILL.md +117 -0
  214. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/SKILL.md +127 -0
  215. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/assets/review-template.html +286 -0
  216. package/templates/default/locales/es/.mustflow/skills/visual-review-artifact/resources.toml +7 -0
  217. package/templates/default/locales/es/.mustflow/skills/web-asset-optimization/SKILL.md +108 -0
  218. package/templates/default/locales/es/AGENTS.md +83 -0
  219. package/templates/default/locales/fr/.mustflow/context/INDEX.md +39 -0
  220. package/templates/default/locales/fr/.mustflow/context/PROJECT.md +63 -0
  221. package/templates/default/locales/fr/.mustflow/docs/agent-workflow.md +368 -0
  222. package/templates/default/locales/fr/.mustflow/skills/INDEX.md +78 -0
  223. package/templates/default/locales/fr/.mustflow/skills/adapter-boundary/SKILL.md +193 -0
  224. package/templates/default/locales/fr/.mustflow/skills/artifact-integrity-check/SKILL.md +114 -0
  225. package/templates/default/locales/fr/.mustflow/skills/behavior-preserving-refactor/SKILL.md +182 -0
  226. package/templates/default/locales/fr/.mustflow/skills/code-review/SKILL.md +115 -0
  227. package/templates/default/locales/fr/.mustflow/skills/codebase-orientation/SKILL.md +115 -0
  228. package/templates/default/locales/fr/.mustflow/skills/command-pattern/SKILL.md +247 -0
  229. package/templates/default/locales/fr/.mustflow/skills/composition-over-inheritance/SKILL.md +176 -0
  230. package/templates/default/locales/fr/.mustflow/skills/contract-sync-check/SKILL.md +116 -0
  231. package/templates/default/locales/fr/.mustflow/skills/date-number-audit/SKILL.md +116 -0
  232. package/templates/default/locales/fr/.mustflow/skills/dependency-injection/SKILL.md +161 -0
  233. package/templates/default/locales/fr/.mustflow/skills/dependency-reality-check/SKILL.md +115 -0
  234. package/templates/default/locales/fr/.mustflow/skills/diff-risk-review/SKILL.md +136 -0
  235. package/templates/default/locales/fr/.mustflow/skills/docs-prose-review/SKILL.md +119 -0
  236. package/templates/default/locales/fr/.mustflow/skills/docs-update/SKILL.md +97 -0
  237. package/templates/default/locales/fr/.mustflow/skills/external-prompt-injection-defense/SKILL.md +116 -0
  238. package/templates/default/locales/fr/.mustflow/skills/facade-pattern/SKILL.md +210 -0
  239. package/templates/default/locales/fr/.mustflow/skills/failure-triage/SKILL.md +97 -0
  240. package/templates/default/locales/fr/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +118 -0
  241. package/templates/default/locales/fr/.mustflow/skills/line-ending-hygiene/SKILL.md +111 -0
  242. package/templates/default/locales/fr/.mustflow/skills/migration-safety-check/SKILL.md +117 -0
  243. package/templates/default/locales/fr/.mustflow/skills/multi-agent-work-coordination/SKILL.md +260 -0
  244. package/templates/default/locales/fr/.mustflow/skills/null-object-pattern/SKILL.md +196 -0
  245. package/templates/default/locales/fr/.mustflow/skills/pattern-scout/SKILL.md +110 -0
  246. package/templates/default/locales/fr/.mustflow/skills/performance-budget-check/SKILL.md +121 -0
  247. package/templates/default/locales/fr/.mustflow/skills/project-context-authoring/SKILL.md +107 -0
  248. package/templates/default/locales/fr/.mustflow/skills/pure-core-imperative-shell/SKILL.md +212 -0
  249. package/templates/default/locales/fr/.mustflow/skills/readme-authoring/SKILL.md +115 -0
  250. package/templates/default/locales/fr/.mustflow/skills/repo-improvement-loop/SKILL.md +150 -0
  251. package/templates/default/locales/fr/.mustflow/skills/repro-first-debug/SKILL.md +112 -0
  252. package/templates/default/locales/fr/.mustflow/skills/requirement-regression-guard/SKILL.md +152 -0
  253. package/templates/default/locales/fr/.mustflow/skills/result-option/SKILL.md +186 -0
  254. package/templates/default/locales/fr/.mustflow/skills/security-privacy-review/SKILL.md +116 -0
  255. package/templates/default/locales/fr/.mustflow/skills/security-regression-tests/SKILL.md +131 -0
  256. package/templates/default/locales/fr/.mustflow/skills/skill-authoring/SKILL.md +110 -0
  257. package/templates/default/locales/fr/.mustflow/skills/source-freshness-check/SKILL.md +111 -0
  258. package/templates/default/locales/fr/.mustflow/skills/state-machine-pattern/SKILL.md +214 -0
  259. package/templates/default/locales/fr/.mustflow/skills/strategy-pattern/SKILL.md +215 -0
  260. package/templates/default/locales/fr/.mustflow/skills/structure-discovery-gate/SKILL.md +159 -0
  261. package/templates/default/locales/fr/.mustflow/skills/test-maintenance/SKILL.md +122 -0
  262. package/templates/default/locales/fr/.mustflow/skills/ui-quality-gate/SKILL.md +117 -0
  263. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/SKILL.md +127 -0
  264. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/assets/review-template.html +286 -0
  265. package/templates/default/locales/fr/.mustflow/skills/visual-review-artifact/resources.toml +7 -0
  266. package/templates/default/locales/fr/.mustflow/skills/web-asset-optimization/SKILL.md +108 -0
  267. package/templates/default/locales/fr/AGENTS.md +84 -0
  268. package/templates/default/locales/hi/.mustflow/context/INDEX.md +39 -0
  269. package/templates/default/locales/hi/.mustflow/context/PROJECT.md +65 -0
  270. package/templates/default/locales/hi/.mustflow/docs/agent-workflow.md +359 -0
  271. package/templates/default/locales/hi/.mustflow/skills/INDEX.md +78 -0
  272. package/templates/default/locales/hi/.mustflow/skills/adapter-boundary/SKILL.md +193 -0
  273. package/templates/default/locales/hi/.mustflow/skills/artifact-integrity-check/SKILL.md +114 -0
  274. package/templates/default/locales/hi/.mustflow/skills/behavior-preserving-refactor/SKILL.md +182 -0
  275. package/templates/default/locales/hi/.mustflow/skills/code-review/SKILL.md +115 -0
  276. package/templates/default/locales/hi/.mustflow/skills/codebase-orientation/SKILL.md +115 -0
  277. package/templates/default/locales/hi/.mustflow/skills/command-pattern/SKILL.md +247 -0
  278. package/templates/default/locales/hi/.mustflow/skills/composition-over-inheritance/SKILL.md +176 -0
  279. package/templates/default/locales/hi/.mustflow/skills/contract-sync-check/SKILL.md +116 -0
  280. package/templates/default/locales/hi/.mustflow/skills/date-number-audit/SKILL.md +116 -0
  281. package/templates/default/locales/hi/.mustflow/skills/dependency-injection/SKILL.md +161 -0
  282. package/templates/default/locales/hi/.mustflow/skills/dependency-reality-check/SKILL.md +115 -0
  283. package/templates/default/locales/hi/.mustflow/skills/diff-risk-review/SKILL.md +136 -0
  284. package/templates/default/locales/hi/.mustflow/skills/docs-prose-review/SKILL.md +119 -0
  285. package/templates/default/locales/hi/.mustflow/skills/docs-update/SKILL.md +97 -0
  286. package/templates/default/locales/hi/.mustflow/skills/external-prompt-injection-defense/SKILL.md +116 -0
  287. package/templates/default/locales/hi/.mustflow/skills/facade-pattern/SKILL.md +210 -0
  288. package/templates/default/locales/hi/.mustflow/skills/failure-triage/SKILL.md +97 -0
  289. package/templates/default/locales/hi/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +118 -0
  290. package/templates/default/locales/hi/.mustflow/skills/line-ending-hygiene/SKILL.md +111 -0
  291. package/templates/default/locales/hi/.mustflow/skills/migration-safety-check/SKILL.md +117 -0
  292. package/templates/default/locales/hi/.mustflow/skills/multi-agent-work-coordination/SKILL.md +260 -0
  293. package/templates/default/locales/hi/.mustflow/skills/null-object-pattern/SKILL.md +196 -0
  294. package/templates/default/locales/hi/.mustflow/skills/pattern-scout/SKILL.md +110 -0
  295. package/templates/default/locales/hi/.mustflow/skills/performance-budget-check/SKILL.md +121 -0
  296. package/templates/default/locales/hi/.mustflow/skills/project-context-authoring/SKILL.md +107 -0
  297. package/templates/default/locales/hi/.mustflow/skills/pure-core-imperative-shell/SKILL.md +212 -0
  298. package/templates/default/locales/hi/.mustflow/skills/readme-authoring/SKILL.md +115 -0
  299. package/templates/default/locales/hi/.mustflow/skills/repo-improvement-loop/SKILL.md +150 -0
  300. package/templates/default/locales/hi/.mustflow/skills/repro-first-debug/SKILL.md +112 -0
  301. package/templates/default/locales/hi/.mustflow/skills/requirement-regression-guard/SKILL.md +152 -0
  302. package/templates/default/locales/hi/.mustflow/skills/result-option/SKILL.md +186 -0
  303. package/templates/default/locales/hi/.mustflow/skills/security-privacy-review/SKILL.md +116 -0
  304. package/templates/default/locales/hi/.mustflow/skills/security-regression-tests/SKILL.md +131 -0
  305. package/templates/default/locales/hi/.mustflow/skills/skill-authoring/SKILL.md +110 -0
  306. package/templates/default/locales/hi/.mustflow/skills/source-freshness-check/SKILL.md +111 -0
  307. package/templates/default/locales/hi/.mustflow/skills/state-machine-pattern/SKILL.md +214 -0
  308. package/templates/default/locales/hi/.mustflow/skills/strategy-pattern/SKILL.md +215 -0
  309. package/templates/default/locales/hi/.mustflow/skills/structure-discovery-gate/SKILL.md +159 -0
  310. package/templates/default/locales/hi/.mustflow/skills/test-maintenance/SKILL.md +122 -0
  311. package/templates/default/locales/hi/.mustflow/skills/ui-quality-gate/SKILL.md +117 -0
  312. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/SKILL.md +127 -0
  313. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/assets/review-template.html +286 -0
  314. package/templates/default/locales/hi/.mustflow/skills/visual-review-artifact/resources.toml +7 -0
  315. package/templates/default/locales/hi/.mustflow/skills/web-asset-optimization/SKILL.md +108 -0
  316. package/templates/default/locales/hi/AGENTS.md +83 -0
  317. package/templates/default/locales/ko/.mustflow/context/INDEX.md +39 -0
  318. package/templates/default/locales/ko/.mustflow/context/PROJECT.md +66 -0
  319. package/templates/default/locales/ko/.mustflow/docs/agent-workflow.md +506 -0
  320. package/templates/default/locales/ko/.mustflow/skills/INDEX.md +78 -0
  321. package/templates/default/locales/ko/.mustflow/skills/adapter-boundary/SKILL.md +193 -0
  322. package/templates/default/locales/ko/.mustflow/skills/artifact-integrity-check/SKILL.md +114 -0
  323. package/templates/default/locales/ko/.mustflow/skills/behavior-preserving-refactor/SKILL.md +182 -0
  324. package/templates/default/locales/ko/.mustflow/skills/code-review/SKILL.md +118 -0
  325. package/templates/default/locales/ko/.mustflow/skills/codebase-orientation/SKILL.md +115 -0
  326. package/templates/default/locales/ko/.mustflow/skills/command-pattern/SKILL.md +247 -0
  327. package/templates/default/locales/ko/.mustflow/skills/composition-over-inheritance/SKILL.md +176 -0
  328. package/templates/default/locales/ko/.mustflow/skills/contract-sync-check/SKILL.md +116 -0
  329. package/templates/default/locales/ko/.mustflow/skills/date-number-audit/SKILL.md +116 -0
  330. package/templates/default/locales/ko/.mustflow/skills/dependency-injection/SKILL.md +161 -0
  331. package/templates/default/locales/ko/.mustflow/skills/dependency-reality-check/SKILL.md +115 -0
  332. package/templates/default/locales/ko/.mustflow/skills/diff-risk-review/SKILL.md +136 -0
  333. package/templates/default/locales/ko/.mustflow/skills/docs-prose-review/SKILL.md +119 -0
  334. package/templates/default/locales/ko/.mustflow/skills/docs-update/SKILL.md +107 -0
  335. package/templates/default/locales/ko/.mustflow/skills/external-prompt-injection-defense/SKILL.md +116 -0
  336. package/templates/default/locales/ko/.mustflow/skills/facade-pattern/SKILL.md +210 -0
  337. package/templates/default/locales/ko/.mustflow/skills/failure-triage/SKILL.md +119 -0
  338. package/templates/default/locales/ko/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +118 -0
  339. package/templates/default/locales/ko/.mustflow/skills/line-ending-hygiene/SKILL.md +111 -0
  340. package/templates/default/locales/ko/.mustflow/skills/migration-safety-check/SKILL.md +117 -0
  341. package/templates/default/locales/ko/.mustflow/skills/multi-agent-work-coordination/SKILL.md +259 -0
  342. package/templates/default/locales/ko/.mustflow/skills/null-object-pattern/SKILL.md +196 -0
  343. package/templates/default/locales/ko/.mustflow/skills/pattern-scout/SKILL.md +110 -0
  344. package/templates/default/locales/ko/.mustflow/skills/performance-budget-check/SKILL.md +121 -0
  345. package/templates/default/locales/ko/.mustflow/skills/project-context-authoring/SKILL.md +107 -0
  346. package/templates/default/locales/ko/.mustflow/skills/pure-core-imperative-shell/SKILL.md +212 -0
  347. package/templates/default/locales/ko/.mustflow/skills/readme-authoring/SKILL.md +115 -0
  348. package/templates/default/locales/ko/.mustflow/skills/repo-improvement-loop/SKILL.md +150 -0
  349. package/templates/default/locales/ko/.mustflow/skills/repro-first-debug/SKILL.md +112 -0
  350. package/templates/default/locales/ko/.mustflow/skills/requirement-regression-guard/SKILL.md +152 -0
  351. package/templates/default/locales/ko/.mustflow/skills/result-option/SKILL.md +186 -0
  352. package/templates/default/locales/ko/.mustflow/skills/security-privacy-review/SKILL.md +116 -0
  353. package/templates/default/locales/ko/.mustflow/skills/security-regression-tests/SKILL.md +131 -0
  354. package/templates/default/locales/ko/.mustflow/skills/skill-authoring/SKILL.md +110 -0
  355. package/templates/default/locales/ko/.mustflow/skills/source-freshness-check/SKILL.md +111 -0
  356. package/templates/default/locales/ko/.mustflow/skills/state-machine-pattern/SKILL.md +214 -0
  357. package/templates/default/locales/ko/.mustflow/skills/strategy-pattern/SKILL.md +215 -0
  358. package/templates/default/locales/ko/.mustflow/skills/structure-discovery-gate/SKILL.md +159 -0
  359. package/templates/default/locales/ko/.mustflow/skills/test-maintenance/SKILL.md +130 -0
  360. package/templates/default/locales/ko/.mustflow/skills/ui-quality-gate/SKILL.md +117 -0
  361. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/SKILL.md +127 -0
  362. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/assets/review-template.html +286 -0
  363. package/templates/default/locales/ko/.mustflow/skills/visual-review-artifact/resources.toml +7 -0
  364. package/templates/default/locales/ko/.mustflow/skills/web-asset-optimization/SKILL.md +108 -0
  365. package/templates/default/locales/ko/AGENTS.md +85 -0
  366. package/templates/default/locales/zh/.mustflow/context/INDEX.md +39 -0
  367. package/templates/default/locales/zh/.mustflow/context/PROJECT.md +64 -0
  368. package/templates/default/locales/zh/.mustflow/docs/agent-workflow.md +310 -0
  369. package/templates/default/locales/zh/.mustflow/skills/INDEX.md +78 -0
  370. package/templates/default/locales/zh/.mustflow/skills/adapter-boundary/SKILL.md +193 -0
  371. package/templates/default/locales/zh/.mustflow/skills/artifact-integrity-check/SKILL.md +114 -0
  372. package/templates/default/locales/zh/.mustflow/skills/behavior-preserving-refactor/SKILL.md +182 -0
  373. package/templates/default/locales/zh/.mustflow/skills/code-review/SKILL.md +115 -0
  374. package/templates/default/locales/zh/.mustflow/skills/codebase-orientation/SKILL.md +115 -0
  375. package/templates/default/locales/zh/.mustflow/skills/command-pattern/SKILL.md +247 -0
  376. package/templates/default/locales/zh/.mustflow/skills/composition-over-inheritance/SKILL.md +176 -0
  377. package/templates/default/locales/zh/.mustflow/skills/contract-sync-check/SKILL.md +116 -0
  378. package/templates/default/locales/zh/.mustflow/skills/date-number-audit/SKILL.md +116 -0
  379. package/templates/default/locales/zh/.mustflow/skills/dependency-injection/SKILL.md +161 -0
  380. package/templates/default/locales/zh/.mustflow/skills/dependency-reality-check/SKILL.md +115 -0
  381. package/templates/default/locales/zh/.mustflow/skills/diff-risk-review/SKILL.md +136 -0
  382. package/templates/default/locales/zh/.mustflow/skills/docs-prose-review/SKILL.md +119 -0
  383. package/templates/default/locales/zh/.mustflow/skills/docs-update/SKILL.md +97 -0
  384. package/templates/default/locales/zh/.mustflow/skills/external-prompt-injection-defense/SKILL.md +116 -0
  385. package/templates/default/locales/zh/.mustflow/skills/facade-pattern/SKILL.md +210 -0
  386. package/templates/default/locales/zh/.mustflow/skills/failure-triage/SKILL.md +96 -0
  387. package/templates/default/locales/zh/.mustflow/skills/instruction-conflict-scope-check/SKILL.md +118 -0
  388. package/templates/default/locales/zh/.mustflow/skills/line-ending-hygiene/SKILL.md +111 -0
  389. package/templates/default/locales/zh/.mustflow/skills/migration-safety-check/SKILL.md +117 -0
  390. package/templates/default/locales/zh/.mustflow/skills/multi-agent-work-coordination/SKILL.md +260 -0
  391. package/templates/default/locales/zh/.mustflow/skills/null-object-pattern/SKILL.md +196 -0
  392. package/templates/default/locales/zh/.mustflow/skills/pattern-scout/SKILL.md +110 -0
  393. package/templates/default/locales/zh/.mustflow/skills/performance-budget-check/SKILL.md +121 -0
  394. package/templates/default/locales/zh/.mustflow/skills/project-context-authoring/SKILL.md +107 -0
  395. package/templates/default/locales/zh/.mustflow/skills/pure-core-imperative-shell/SKILL.md +212 -0
  396. package/templates/default/locales/zh/.mustflow/skills/readme-authoring/SKILL.md +115 -0
  397. package/templates/default/locales/zh/.mustflow/skills/repo-improvement-loop/SKILL.md +150 -0
  398. package/templates/default/locales/zh/.mustflow/skills/repro-first-debug/SKILL.md +112 -0
  399. package/templates/default/locales/zh/.mustflow/skills/requirement-regression-guard/SKILL.md +152 -0
  400. package/templates/default/locales/zh/.mustflow/skills/result-option/SKILL.md +186 -0
  401. package/templates/default/locales/zh/.mustflow/skills/security-privacy-review/SKILL.md +116 -0
  402. package/templates/default/locales/zh/.mustflow/skills/security-regression-tests/SKILL.md +131 -0
  403. package/templates/default/locales/zh/.mustflow/skills/skill-authoring/SKILL.md +110 -0
  404. package/templates/default/locales/zh/.mustflow/skills/source-freshness-check/SKILL.md +111 -0
  405. package/templates/default/locales/zh/.mustflow/skills/state-machine-pattern/SKILL.md +214 -0
  406. package/templates/default/locales/zh/.mustflow/skills/strategy-pattern/SKILL.md +215 -0
  407. package/templates/default/locales/zh/.mustflow/skills/structure-discovery-gate/SKILL.md +159 -0
  408. package/templates/default/locales/zh/.mustflow/skills/test-maintenance/SKILL.md +122 -0
  409. package/templates/default/locales/zh/.mustflow/skills/ui-quality-gate/SKILL.md +117 -0
  410. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/SKILL.md +127 -0
  411. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/assets/review-template.html +286 -0
  412. package/templates/default/locales/zh/.mustflow/skills/visual-review-artifact/resources.toml +7 -0
  413. package/templates/default/locales/zh/.mustflow/skills/web-asset-optimization/SKILL.md +108 -0
  414. package/templates/default/locales/zh/AGENTS.md +86 -0
  415. package/templates/default/manifest.toml +339 -0
@@ -0,0 +1 @@
1
+ export { VERSIONING_CONFIG_PATH, VERSION_SOURCE_AUTHORITIES, VERSION_SOURCE_KINDS, detectVersionSourcePaths, detectVersionSources, readDeclaredVersionSources, releaseVersioningIsEnabled, } from '../../core/version-sources.js';
@@ -0,0 +1,155 @@
1
+ const STATIC_MANAGED_MARKDOWN_EXPECTATIONS = {
2
+ 'AGENTS.md': {
3
+ docId: 'agents.root',
4
+ authority: 'binding',
5
+ lifecycle: 'user-editable',
6
+ },
7
+ '.mustflow/skills/INDEX.md': {
8
+ docId: 'skills.index',
9
+ authority: 'router',
10
+ lifecycle: 'mustflow-owned',
11
+ },
12
+ };
13
+ function toPosixPath(value) {
14
+ return value.split('\\').join('/');
15
+ }
16
+ export function getManagedMarkdownExpectation(relativePath) {
17
+ const normalizedPath = toPosixPath(relativePath);
18
+ const staticExpectation = STATIC_MANAGED_MARKDOWN_EXPECTATIONS[normalizedPath];
19
+ if (staticExpectation) {
20
+ return staticExpectation;
21
+ }
22
+ const docsMatch = /^\.mustflow\/docs\/([^/]+)\.md$/u.exec(normalizedPath);
23
+ if (docsMatch) {
24
+ return {
25
+ docId: `docs.${docsMatch[1]}`,
26
+ authority: 'workflow-policy',
27
+ lifecycle: 'mustflow-owned',
28
+ };
29
+ }
30
+ const contextMatch = /^\.mustflow\/context\/([^/]+)\.md$/u.exec(normalizedPath);
31
+ if (contextMatch) {
32
+ const contextName = contextMatch[1].toLowerCase();
33
+ if (contextName === 'index') {
34
+ return {
35
+ docId: 'context.index',
36
+ authority: 'router',
37
+ lifecycle: 'mustflow-owned',
38
+ };
39
+ }
40
+ return {
41
+ docId: `context.${contextName}`,
42
+ authority: 'contextual',
43
+ lifecycle: 'user-editable',
44
+ };
45
+ }
46
+ const skillMatch = /^\.mustflow\/skills\/([^/]+)\/SKILL\.md$/u.exec(normalizedPath);
47
+ if (skillMatch) {
48
+ return {
49
+ docId: `skill.${skillMatch[1]}`,
50
+ authority: 'procedure',
51
+ lifecycle: 'mustflow-owned',
52
+ };
53
+ }
54
+ return undefined;
55
+ }
56
+ export function formatManagedMarkdownLabel(relativePath, expectation) {
57
+ return `${expectation.docId} (${toPosixPath(relativePath)})`;
58
+ }
59
+ function getAuthorityBoundary(authority) {
60
+ switch (authority) {
61
+ case 'binding':
62
+ return {
63
+ role: 'binding repository instruction entry point',
64
+ canDefine: ['repository-local work rules', 'read order', 'delegation to mustflow workflow files'],
65
+ cannotDefine: ['host safety overrides', 'command execution permission outside commands.toml', 'facts that contradict current files'],
66
+ };
67
+ case 'workflow-policy':
68
+ return {
69
+ role: 'shared agent workflow policy',
70
+ canDefine: ['agent operating loop', 'refresh checkpoints', 'verification and reporting policy'],
71
+ cannotDefine: ['executable command permission', 'project product facts', 'host safety overrides'],
72
+ };
73
+ case 'router':
74
+ return {
75
+ role: 'routing index',
76
+ canDefine: ['which context or skill document to read', 'compact routing metadata'],
77
+ cannotDefine: ['procedure steps', 'command permission', 'project policy not owned by the router'],
78
+ };
79
+ case 'contextual':
80
+ return {
81
+ role: 'low-authority project context',
82
+ canDefine: ['supported project facts', 'known unknowns', 'domain conventions'],
83
+ cannotDefine: ['command policy', 'file edit prohibitions', 'facts that override code tests or user instructions'],
84
+ };
85
+ case 'procedure':
86
+ return {
87
+ role: 'repeatable task procedure',
88
+ canDefine: ['task trigger', 'allowed edit scope', 'verification and reporting shape'],
89
+ cannotDefine: ['command execution permission', 'repository-wide binding rules', 'facts outside the procedure scope'],
90
+ };
91
+ default:
92
+ return getUnrecognizedBoundary();
93
+ }
94
+ }
95
+ function getOverviewBoundary() {
96
+ return {
97
+ role: 'managed Markdown authority model',
98
+ canDefine: ['document authority lanes', 'expected frontmatter identity', 'which source should answer which class of question'],
99
+ cannotDefine: ['runtime command permission outside commands.toml', 'host safety overrides', 'project facts unsupported by current files'],
100
+ };
101
+ }
102
+ function getUnrecognizedBoundary() {
103
+ return {
104
+ role: 'unclassified by mustflow managed Markdown authority',
105
+ canDefine: [],
106
+ cannotDefine: ['mustflow document authority', 'command execution permission', 'workflow policy by path alone'],
107
+ };
108
+ }
109
+ export function explainManagedMarkdownAuthority(relativePath) {
110
+ const sourceFiles = [
111
+ 'AGENTS.md',
112
+ '.mustflow/docs/agent-workflow.md',
113
+ '.mustflow/config/mustflow.toml',
114
+ '.mustflow/skills/INDEX.md',
115
+ ];
116
+ if (!relativePath) {
117
+ return {
118
+ kind: 'overview',
119
+ inputPath: null,
120
+ decision: 'managed Markdown authority is resolved from document path and expected frontmatter',
121
+ reason: 'mustflow keeps repository binding rules, workflow policy, context, and procedures in separate authority lanes.',
122
+ effectiveAction: 'Use the nearest managed document role before deciding whether a file can define rules, context, or procedure steps.',
123
+ countsAsMustflowVerification: false,
124
+ sourceFiles,
125
+ expectation: null,
126
+ boundary: getOverviewBoundary(),
127
+ };
128
+ }
129
+ const normalizedPath = toPosixPath(relativePath);
130
+ const expectation = getManagedMarkdownExpectation(normalizedPath);
131
+ if (!expectation) {
132
+ return {
133
+ kind: 'unrecognized',
134
+ inputPath: normalizedPath,
135
+ decision: 'no managed Markdown authority expectation applies to this path',
136
+ reason: 'only AGENTS.md and Markdown documents under .mustflow/docs, .mustflow/context, and .mustflow/skills are classified by this authority resolver.',
137
+ effectiveAction: 'Treat the file according to the nearest AGENTS.md and repository command contract instead of granting it mustflow document authority.',
138
+ countsAsMustflowVerification: false,
139
+ sourceFiles,
140
+ expectation: null,
141
+ boundary: getUnrecognizedBoundary(),
142
+ };
143
+ }
144
+ return {
145
+ kind: 'recognized',
146
+ inputPath: normalizedPath,
147
+ decision: `expected ${expectation.docId} with ${expectation.authority} authority`,
148
+ reason: 'the path matches a managed mustflow document role with a stable identity, authority, and lifecycle.',
149
+ effectiveAction: `Validate frontmatter mustflow_doc="${expectation.docId}", authority="${expectation.authority}", and lifecycle="${expectation.lifecycle}".`,
150
+ countsAsMustflowVerification: false,
151
+ sourceFiles,
152
+ expectation,
153
+ boundary: getAuthorityBoundary(expectation.authority),
154
+ };
155
+ }
@@ -0,0 +1,122 @@
1
+ function surface(kind, category, isPublicSurface, validationReasons, affectedContracts, updatePolicy, driftChecks) {
2
+ return {
3
+ kind,
4
+ category,
5
+ isPublicSurface,
6
+ validationReasons,
7
+ affectedContracts,
8
+ updatePolicy,
9
+ driftChecks,
10
+ };
11
+ }
12
+ const UNKNOWN_SURFACE = surface('unclassified_path', 'unknown', false, [], [], 'not_applicable', []);
13
+ const CHANGE_CLASSIFICATION_RULES = [
14
+ {
15
+ match: /^README\.md$/u,
16
+ changeKinds: ['documentation'],
17
+ surface: surface('readme_page', 'documentation', true, ['docs_change', 'copy_change'], ['public documentation', 'command examples'], 'update', ['link targets', 'command examples', 'package metadata references']),
18
+ },
19
+ {
20
+ match: /^docs-site\/src\/content\/docs\/(?!en\/)[^/]+\//u,
21
+ changeKinds: ['documentation', 'translation'],
22
+ surface: surface('docs_site_translation', 'documentation', true, ['docs_change', 'i18n_change'], ['documentation site', 'localized content', 'navigation links'], 'update_or_mark_stale', ['source page parity', 'navigation links', 'localized examples']),
23
+ },
24
+ {
25
+ match: /^docs-site\/src\/content\/docs\//u,
26
+ changeKinds: ['documentation'],
27
+ surface: surface('docs_site_page', 'documentation', true, ['docs_change'], ['documentation site', 'navigation links', 'localized content'], 'update', ['navigation links', 'localized copies', 'command examples']),
28
+ },
29
+ {
30
+ match: /^templates\/[^/]+\/locales\/[^/]+\//u,
31
+ changeKinds: ['installed_template', 'translation'],
32
+ surface: surface('installed_template_translation', 'installed-template', true, ['i18n_change', 'template_version_change'], ['installed template files', 'localized workflow documents', 'template i18n metadata'], 'update_or_mark_stale', ['template i18n metadata', 'localized frontmatter', 'source revision']),
33
+ },
34
+ {
35
+ match: /^templates\/[^/]+\//u,
36
+ changeKinds: ['installed_template'],
37
+ surface: surface('installed_template', 'installed-template', true, ['template_version_change', 'packaging_change'], ['installed template files', 'package contents', 'template manifest'], 'update', ['template manifest', 'package inventory', 'localized copies']),
38
+ },
39
+ {
40
+ match: /^(AGENTS\.md|\.mustflow\/(?:docs|context|skills|config)\/)/u,
41
+ changeKinds: ['workflow'],
42
+ surface: surface('workflow_root', 'workflow', true, ['mustflow_docs_change', 'mustflow_config_change'], ['agent workflow contract', 'command contract', 'installed workflow files'], 'update', ['strict workflow validation', 'installed template parity', 'skill route alignment']),
43
+ },
44
+ {
45
+ match: /^examples\//u,
46
+ changeKinds: ['example'],
47
+ surface: surface('example', 'example', true, ['docs_change', 'public_api_change'], ['generated examples', 'human-readable examples'], 'update', ['example commands', 'linked docs', 'public behavior claims']),
48
+ },
49
+ {
50
+ match: /^schemas\//u,
51
+ changeKinds: ['schema'],
52
+ surface: surface('schema_contract', 'contract', true, ['public_api_change', 'release_risk'], ['JSON schema', 'machine-readable output contract'], 'update', ['schema tests', 'documented JSON fields', 'package inventory']),
53
+ },
54
+ {
55
+ match: /^package\.json$/u,
56
+ changeKinds: ['package_metadata'],
57
+ surface: surface('package_metadata', 'release', true, ['package_metadata_change', 'release_risk'], ['npm package metadata', 'published package contents'], 'update', ['package metadata tests', 'version source discovery', 'published file inventory']),
58
+ },
59
+ {
60
+ match: /^tests\/fixtures\//u,
61
+ changeKinds: ['test_fixture'],
62
+ surface: surface('test_fixture', 'test', false, ['test_change'], ['regression fixture inputs'], 'not_applicable', ['fixture safety', 'test route coverage']),
63
+ },
64
+ {
65
+ match: /^tests\//u,
66
+ changeKinds: ['test'],
67
+ surface: surface('test_contract', 'test', false, ['test_change'], ['test behavior contract'], 'not_applicable', ['related test selection']),
68
+ },
69
+ {
70
+ match: /^(src|scripts)\//u,
71
+ changeKinds: ['implementation'],
72
+ surface: surface('implementation', 'code', false, ['code_change'], ['runtime behavior when exported through CLI or package output'], 'not_applicable', ['related tests', 'build output']),
73
+ },
74
+ ];
75
+ function uniqueSorted(values) {
76
+ return [...new Set(values)].sort((left, right) => left.localeCompare(right));
77
+ }
78
+ function toPosixPath(value) {
79
+ return value.trim().replaceAll('\\', '/');
80
+ }
81
+ export function normalizeStatusPath(value) {
82
+ const pathText = toPosixPath(value);
83
+ const renameTarget = pathText.includes(' -> ') ? (pathText.split(' -> ').pop() ?? pathText) : pathText;
84
+ return renameTarget.replace(/^"|"$/gu, '');
85
+ }
86
+ export function parseGitStatusOutput(output) {
87
+ const paths = output
88
+ .split(/\r?\n/u)
89
+ .map((line) => line.slice(3))
90
+ .map(normalizeStatusPath)
91
+ .filter((line) => line.length > 0);
92
+ return uniqueSorted(paths);
93
+ }
94
+ export function classifyChangePath(relativePath) {
95
+ const normalizedPath = normalizeStatusPath(relativePath);
96
+ const rule = CHANGE_CLASSIFICATION_RULES.find((candidate) => candidate.match.test(normalizedPath));
97
+ return {
98
+ path: normalizedPath,
99
+ changeKinds: rule?.changeKinds ?? ['unknown'],
100
+ surface: rule?.surface ?? UNKNOWN_SURFACE,
101
+ };
102
+ }
103
+ export function createChangeClassificationReport(source, relativePaths) {
104
+ const files = uniqueSorted(relativePaths.map(normalizeStatusPath).filter((filePath) => filePath.length > 0));
105
+ const classifications = files.map(classifyChangePath);
106
+ return {
107
+ source,
108
+ files,
109
+ classifications,
110
+ summary: {
111
+ fileCount: files.length,
112
+ publicSurfaceCount: classifications.filter((classification) => classification.surface.isPublicSurface).length,
113
+ changeKinds: uniqueSorted(classifications.flatMap((classification) => classification.changeKinds)),
114
+ validationReasons: uniqueSorted(classifications.flatMap((classification) => classification.surface.validationReasons)),
115
+ updatePolicies: uniqueSorted(classifications
116
+ .map((classification) => classification.surface.updatePolicy)
117
+ .filter((updatePolicy) => updatePolicy !== 'not_applicable')),
118
+ driftChecks: uniqueSorted(classifications.flatMap((classification) => classification.surface.driftChecks)),
119
+ affectedContracts: uniqueSorted(classifications.flatMap((classification) => classification.surface.affectedContracts)),
120
+ },
121
+ };
122
+ }
@@ -0,0 +1,80 @@
1
+ import { CHANGE_CLASSIFICATION_SURFACE_AUTHORITY, createPathTarget, } from './surface-decision-model.js';
2
+ import { createVerificationPlan, } from './verification-plan.js';
3
+ import { createVerificationSchedule, } from './verification-scheduler.js';
4
+ export const CHANGE_VERIFICATION_SCHEMA_VERSION = '1';
5
+ function uniqueSorted(values) {
6
+ return [...new Set(values)].sort((left, right) => left.localeCompare(right));
7
+ }
8
+ function uniqueUpdatePolicies(values) {
9
+ return uniqueSorted([...values].filter((value) => value !== 'not_applicable'));
10
+ }
11
+ function classificationsForReason(classificationReport, reason) {
12
+ return classificationReport.classifications.filter((classification) => classification.surface.validationReasons.includes(reason));
13
+ }
14
+ function toSurfaceDecision(classification) {
15
+ return {
16
+ target: createPathTarget(classification.path),
17
+ changeKinds: classification.changeKinds,
18
+ surface: {
19
+ kind: classification.surface.kind,
20
+ category: classification.surface.category,
21
+ isPublicSurface: classification.surface.isPublicSurface,
22
+ },
23
+ reasons: classification.surface.validationReasons,
24
+ affectedContracts: classification.surface.affectedContracts,
25
+ driftChecks: classification.surface.driftChecks,
26
+ authority: CHANGE_CLASSIFICATION_SURFACE_AUTHORITY,
27
+ };
28
+ }
29
+ function createVerificationRequirement(classificationReport, reason) {
30
+ const classifications = classificationsForReason(classificationReport, reason);
31
+ const decisions = classifications.map(toSurfaceDecision);
32
+ return {
33
+ reason,
34
+ files: uniqueSorted(decisions.flatMap((decision) => (decision.target.kind === 'path' ? [decision.target.path] : []))),
35
+ surfaces: uniqueSorted(decisions.flatMap((decision) => (decision.surface ? [decision.surface.kind] : []))),
36
+ affectedContracts: uniqueSorted(decisions.flatMap((decision) => decision.affectedContracts ?? [])),
37
+ driftChecks: uniqueSorted(decisions.flatMap((decision) => decision.driftChecks ?? [])),
38
+ updatePolicies: uniqueUpdatePolicies(classifications.map((classification) => classification.surface.updatePolicy)),
39
+ source: 'change_classification',
40
+ };
41
+ }
42
+ function toChangeVerificationCandidate(reason, candidate) {
43
+ return {
44
+ reason,
45
+ intent: candidate.intent.length > 0 ? candidate.intent : null,
46
+ status: candidate.status,
47
+ skipReason: candidate.reason,
48
+ detail: candidate.detail,
49
+ };
50
+ }
51
+ function gapForRequirement(requirement, candidates) {
52
+ const hasRunnableCandidate = candidates.some((candidate) => candidate.reason === requirement.reason && candidate.status === 'runnable');
53
+ if (hasRunnableCandidate) {
54
+ return null;
55
+ }
56
+ return {
57
+ reason: requirement.reason,
58
+ files: requirement.files,
59
+ surfaces: requirement.surfaces,
60
+ detail: `No runnable command intents cover required_after = "${requirement.reason}".`,
61
+ };
62
+ }
63
+ export function createChangeVerificationReport(classificationReport, commandContract, projectRoot) {
64
+ const requirements = classificationReport.summary.validationReasons.map((reason) => createVerificationRequirement(classificationReport, reason));
65
+ const candidatePlans = requirements.flatMap((requirement) => createVerificationPlan(commandContract, requirement.reason).candidates);
66
+ const candidates = requirements.flatMap((requirement) => createVerificationPlan(commandContract, requirement.reason).candidates.map((candidate) => toChangeVerificationCandidate(requirement.reason, candidate)));
67
+ const gaps = requirements
68
+ .map((requirement) => gapForRequirement(requirement, candidates))
69
+ .filter((gap) => gap !== null);
70
+ return {
71
+ schema_version: CHANGE_VERIFICATION_SCHEMA_VERSION,
72
+ source: classificationReport.source,
73
+ files: classificationReport.files,
74
+ classification_summary: classificationReport.summary,
75
+ requirements,
76
+ candidates,
77
+ gaps,
78
+ schedule: createVerificationSchedule(projectRoot, commandContract, candidatePlans),
79
+ };
80
+ }
@@ -0,0 +1,67 @@
1
+ const CHECK_ISSUE_ID_RULES = [
2
+ ['mustflow.command_contract.intent_table_missing', /^Missing \[intents\] table in \.mustflow\/config\/commands\.toml$/u],
3
+ ['mustflow.command_contract.intent_not_table', /^Intent [^\s]+ must be a TOML table$/u],
4
+ ['mustflow.command_contract.configured_missing_lifecycle', /^Configured intent [^\s]+ must define lifecycle$/u],
5
+ ['mustflow.command_contract.configured_missing_run_policy', /^Configured intent [^\s]+ must define run_policy$/u],
6
+ ['mustflow.command_contract.oneshot_missing_timeout', /^Oneshot intent [^\s]+ must define timeout_seconds$/u],
7
+ ['mustflow.command_contract.oneshot_stdin_not_closed', /^Oneshot intent [^\s]+ must set stdin = "closed"$/u],
8
+ ['mustflow.command_contract.long_running_agent_allowed', /^Long-running intent [^\s]+ must not use run_policy = "agent_allowed"$/u],
9
+ ['mustflow.command_contract.executable_source_missing', /^Configured intent [^\s]+ must define argv or mode = "shell" with cmd$/u],
10
+ ['mustflow.command_contract.shell_background_pattern', /^Shell intent [^\s]+ contains a blocked long-running or background pattern$/u],
11
+ ['mustflow.command_contract.success_exit_codes_invalid', /^\[commands\.intents\.[^\]]+\]\.success_exit_codes must be an integer array$/u],
12
+ ['mustflow.command_contract.effects_invalid', /^(?:Strict: )?(?:\[commands\.(?:resources|intents\.[^\]]+\.effects)[^\]]*\]|Command effect for intent [^\s]+ must define path, paths, or lock)/u],
13
+ ['mustflow.command_contract.effect_path_escape', /^Strict: Command effect path must stay inside the current root:/u],
14
+ ['mustflow.command_contract.shared_writes_without_effects', /^Strict warning: configured agent-runnable intents .+ share path:.+ through writes without explicit effects or resource locks$/u],
15
+ ['mustflow.prompt_cache.required', /^Strict: \[prompt_cache\] table is required$/u],
16
+ ['mustflow.prompt_cache.volatile_in_stable', /^Strict: \[prompt_cache\.layers\.stable\]\.read must not include volatile path /u],
17
+ ['mustflow.refresh.hash_method_required', /^Strict: \[refresh\]\.default_method should be "hash_check" for cache-friendly refresh$/u],
18
+ ['mustflow.release.template_version_mismatch', /^Strict: templates\/default\/manifest\.toml version "[^"]+" must match package\.json version "[^"]+" when \[release\.versioning\]\.sync_template_version is true$/u],
19
+ ['mustflow.release.template_version_ahead', /^Strict: templates\/default\/manifest\.toml version "[^"]+" must not be ahead of package\.json version "[^"]+"$/u],
20
+ ['mustflow.release.template_version_intentionally_unchanged', /^Strict warning: templates\/default\/manifest\.toml version "[^"]+" is older than package\.json version "[^"]+"; this is allowed only when the installed template surface is unchanged$/u],
21
+ ['mustflow.preferences.release_versioning_contract_authority', /^Strict: \[preferences\.release\.versioning\]\.[a-z_]+ cannot define version sources or release authority; use \.mustflow\/config\/versioning\.toml or \.mustflow\/config\/commands\.toml$/u],
22
+ ['mustflow.preferences.verification_selection_command_authority', /^Strict: \[preferences\.verification\.selection\]\.[a-z_]+ cannot define command authority; use \.mustflow\/config\/commands\.toml$/u],
23
+ ['mustflow.skill.procedure_only', /^Strict: \.mustflow\/skills\/[^/]+\/SKILL\.md metadata\.mustflow_kind must be "procedure"$/u],
24
+ ['mustflow.skill.raw_command_block', /^Strict: \.mustflow\/skills\/[^/]+\/SKILL\.md contains a raw shell command block; reference command intents instead$/u],
25
+ ['mustflow.skill.command_permission_claim', /^Strict: \.mustflow\/skills\/[^/]+\/SKILL\.md claims command execution permission; keep permissions in \.mustflow\/config\/commands\.toml$/u],
26
+ ['mustflow.skill.unknown_command_intent', /^Strict: \.mustflow\/skills\/[^/]+\/SKILL\.md metadata\.command_intents references unknown command intent "[^"]+"$/u],
27
+ ['mustflow.skill.index_route_unknown_command_intent', /^Strict: \.mustflow\/skills\/INDEX\.md route \.mustflow\/skills\/[^/]+\/SKILL\.md references command intent "[^"]+" not declared by the skill frontmatter$/u],
28
+ ['mustflow.skill.resource_unknown_command_intent', /^Strict: \.mustflow\/skills\/[^/]+\/resources\.toml script [^\s]+ references unknown command intent "[^"]+"$/u],
29
+ ['mustflow.source_anchor.invalid_format', /^Strict: source anchor .+ has invalid format:/u],
30
+ ['mustflow.source_anchor.duplicate_id', /^Strict: source anchor id "[^"]+" is duplicated:/u],
31
+ ['mustflow.source_anchor.forbidden_instruction', /^Strict: source anchor [^ ]+ in .+ contains agent command or policy instructions/u],
32
+ ['mustflow.source_anchor.secret_like', /^Strict: source anchor [^ ]+ in .+ contains secret-like text/u],
33
+ ['mustflow.source_anchor.generated_or_vendor_path', /^Strict: source anchor [^ ]+ is in generated or vendor path /u],
34
+ ['mustflow.source_anchor.unknown_risk', /^Strict: source anchor [^ ]+ in .+ uses unknown risk tag "[^"]+"$/u],
35
+ ['mustflow.source_anchor.long_purpose', /^Strict warning: source anchor [^ ]+ in .+ purpose is long/u],
36
+ ['mustflow.source_anchor.too_many_search_terms', /^Strict warning: source anchor [^ ]+ in .+ has too many search terms/u],
37
+ ['mustflow.source_anchor.high_density', /^Strict warning: .+ has high source anchor density/u],
38
+ ['mustflow.source_anchor.high_risk_review', /^Strict warning: source anchor [^ ]+ in .+ uses high-risk tags and needs review:/u],
39
+ ['mustflow.run_receipt.invalid_json', /^Strict: \.mustflow\/state\/runs\/latest\.json is not valid JSON:/u],
40
+ ['mustflow.run_receipt.invalid_shape', /^Strict: \.mustflow\/state\/runs\/latest\.json must contain a JSON object$/u],
41
+ ['mustflow.retention.run_receipt_size_limit', /^Strict: \.mustflow\/state\/runs\/latest\.json exceeds \[retention\.run_receipts\]\.max_file_kb/u],
42
+ ['mustflow.retention.raw_jsonl_under_mustflow', /^Strict: \.mustflow\/.*\.jsonl is a raw JSONL file under \.mustflow$/u],
43
+ ['mustflow.local_state.versioned_task_worklog', /^Strict: \.mustflow\/(?:worklogs|plans|tasks|work-items)\/.+ is per-task local state; keep plans and worklogs under ignored local state$/u],
44
+ ];
45
+ /**
46
+ * mf:anchor core.check-issues
47
+ * purpose: Map check messages to stable machine-readable issue ids and severity metadata.
48
+ * search: check issue ids, issueDetails, strict warnings
49
+ * invariant: JSON issue ids stay stable while check implementations move between CLI and core modules.
50
+ * risk: config
51
+ */
52
+ export function getCheckIssueId(message) {
53
+ for (const [id, pattern] of CHECK_ISSUE_ID_RULES) {
54
+ if (pattern.test(message)) {
55
+ return id;
56
+ }
57
+ }
58
+ return null;
59
+ }
60
+ export function describeCheckIssues(messages) {
61
+ return messages.map((message) => ({
62
+ id: getCheckIssueId(message),
63
+ severity: message.startsWith('Strict warning: ') ? 'warning' : 'error',
64
+ mode: message.startsWith('Strict') ? 'strict' : 'base',
65
+ message,
66
+ }));
67
+ }
@@ -0,0 +1,22 @@
1
+ const MUSTFLOW_BIN_NAMES = new Set(['mf', 'mustflow']);
2
+ const IN_PROCESS_MUSTFLOW_BUILTIN_COMMANDS = new Set([
3
+ 'check',
4
+ 'classify',
5
+ 'context',
6
+ 'doctor',
7
+ 'explain',
8
+ 'help',
9
+ 'impact',
10
+ 'line-endings',
11
+ 'map',
12
+ 'status',
13
+ 'update',
14
+ 'version-sources',
15
+ 'verify',
16
+ ]);
17
+ export function isMustflowBinName(command) {
18
+ return MUSTFLOW_BIN_NAMES.has(command.toLowerCase());
19
+ }
20
+ export function canRunMustflowBuiltinInProcess(command) {
21
+ return command !== undefined && IN_PROCESS_MUSTFLOW_BUILTIN_COMMANDS.has(command);
22
+ }
@@ -0,0 +1,27 @@
1
+ import { readString, readStringArray } from './config-loading.js';
2
+ const SAFE_COMMAND_INTENT_NAME_PATTERN = /^[A-Za-z0-9_-]+$/u;
3
+ export const BACKGROUND_SHELL_PATTERNS = [
4
+ /\s&\s*$/u,
5
+ /\bnohup\b/iu,
6
+ /\bdisown\b/iu,
7
+ /\bStart-Process\b/iu,
8
+ /\bstart\s+/iu,
9
+ /\bxdg-open\b/iu,
10
+ /\bopen\s+/iu,
11
+ /\bchrome(?:\.exe)?\b/iu,
12
+ /\bchromium(?:\.exe)?\b/iu,
13
+ ];
14
+ export function commandIntentNameIsSafe(intentName) {
15
+ return SAFE_COMMAND_INTENT_NAME_PATTERN.test(intentName);
16
+ }
17
+ export function commandIntentHasCommandSource(intent) {
18
+ const argv = readStringArray(intent, 'argv');
19
+ const shellCommand = intent.mode === 'shell' ? readString(intent, 'cmd') : undefined;
20
+ return Boolean((argv && argv.length > 0) || shellCommand);
21
+ }
22
+ export function shellCommandHasBlockedBackgroundPattern(command) {
23
+ return BACKGROUND_SHELL_PATTERNS.some((pattern) => pattern.test(command));
24
+ }
25
+ export function commandIntentHasBlockedShellBackgroundPattern(intent) {
26
+ return intent.mode === 'shell' && typeof intent.cmd === 'string' && shellCommandHasBlockedBackgroundPattern(intent.cmd);
27
+ }