mustflow 2.22.12 → 2.22.14

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 (34) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/commands/explain-verify.js +8 -1
  3. package/dist/cli/commands/explain.js +269 -2
  4. package/dist/cli/commands/run.js +109 -77
  5. package/dist/cli/commands/verify.js +16 -1
  6. package/dist/cli/lib/run-plan.js +31 -5
  7. package/dist/core/active-run-locks.js +294 -0
  8. package/dist/core/check-issues.js +8 -0
  9. package/dist/core/command-contract-validation.js +179 -2
  10. package/dist/core/command-explanation.js +5 -3
  11. package/dist/core/command-preconditions.js +261 -0
  12. package/dist/core/skill-route-explanation.js +115 -9
  13. package/package.json +13 -12
  14. package/schemas/README.md +6 -3
  15. package/schemas/change-verification-report.schema.json +52 -0
  16. package/schemas/commands.schema.json +41 -0
  17. package/schemas/explain-report.schema.json +152 -4
  18. package/templates/default/i18n.toml +14 -14
  19. package/templates/default/locales/en/.mustflow/skills/INDEX.md +1 -1
  20. package/templates/default/locales/en/.mustflow/skills/codebase-orientation/SKILL.md +18 -7
  21. package/templates/default/locales/en/.mustflow/skills/contract-sync-check/SKILL.md +14 -7
  22. package/templates/default/locales/en/.mustflow/skills/diff-risk-review/SKILL.md +10 -5
  23. package/templates/default/locales/en/.mustflow/skills/docs-update/SKILL.md +12 -5
  24. package/templates/default/locales/en/.mustflow/skills/failure-triage/SKILL.md +26 -5
  25. package/templates/default/locales/en/.mustflow/skills/pattern-scout/SKILL.md +13 -7
  26. package/templates/default/locales/en/.mustflow/skills/performance-budget-check/SKILL.md +53 -181
  27. package/templates/default/locales/en/.mustflow/skills/readme-authoring/SKILL.md +8 -2
  28. package/templates/default/locales/en/.mustflow/skills/release-notes-authoring/SKILL.md +4 -1
  29. package/templates/default/locales/en/.mustflow/skills/repro-first-debug/SKILL.md +15 -8
  30. package/templates/default/locales/en/.mustflow/skills/requirement-regression-guard/SKILL.md +10 -5
  31. package/templates/default/locales/en/.mustflow/skills/source-freshness-check/SKILL.md +5 -1
  32. package/templates/default/locales/en/.mustflow/skills/structure-discovery-gate/SKILL.md +2 -2
  33. package/templates/default/locales/en/.mustflow/skills/test-maintenance/SKILL.md +17 -4
  34. package/templates/default/manifest.toml +1 -1
@@ -100,6 +100,29 @@
100
100
  "escalate_to": { "$ref": "#/$defs/stringArray" }
101
101
  }
102
102
  },
103
+ "intentInputs": {
104
+ "type": "object",
105
+ "propertyNames": { "pattern": "^[a-z][a-z0-9_]*$" },
106
+ "additionalProperties": { "$ref": "#/$defs/intentInput" }
107
+ },
108
+ "intentInput": {
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": ["type"],
112
+ "properties": {
113
+ "type": { "enum": ["path", "enum", "boolean", "integer", "literal"] },
114
+ "description": { "type": "string" },
115
+ "required": { "type": "boolean" },
116
+ "placeholder": { "type": "string" },
117
+ "secret": { "type": "boolean" },
118
+ "allowed_roots": { "$ref": "#/$defs/stringArray" },
119
+ "allowed_extensions": { "$ref": "#/$defs/stringArray" },
120
+ "allowed_values": { "$ref": "#/$defs/stringArray" },
121
+ "value": { "type": ["string", "number", "boolean"] },
122
+ "min": { "type": "integer" },
123
+ "max": { "type": "integer" }
124
+ }
125
+ },
103
126
  "costHints": {
104
127
  "type": "object",
105
128
  "additionalProperties": false,
@@ -110,6 +133,19 @@
110
133
  "cost_tier": { "type": "string" }
111
134
  }
112
135
  },
136
+ "intentPrecondition": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": ["kind"],
140
+ "properties": {
141
+ "kind": { "enum": ["path_exists", "artifact_freshness"] },
142
+ "label": { "type": "string" },
143
+ "path": { "type": "string" },
144
+ "artifact": { "type": "string" },
145
+ "sources": { "$ref": "#/$defs/stringArray" },
146
+ "satisfy_intent": { "type": "string" }
147
+ }
148
+ },
113
149
  "relationHints": {
114
150
  "type": "object",
115
151
  "additionalProperties": false,
@@ -165,6 +201,11 @@
165
201
  },
166
202
  "covers": { "$ref": "#/$defs/coverageHints" },
167
203
  "selection": { "$ref": "#/$defs/selectionHints" },
204
+ "inputs": { "$ref": "#/$defs/intentInputs" },
205
+ "preconditions": {
206
+ "type": "array",
207
+ "items": { "$ref": "#/$defs/intentPrecondition" }
208
+ },
168
209
  "cost": { "$ref": "#/$defs/costHints" },
169
210
  "relations": { "$ref": "#/$defs/relationHints" },
170
211
  "reason": { "type": "string" },
@@ -14,7 +14,7 @@
14
14
  "properties": {
15
15
  "schema_version": { "const": "1" },
16
16
  "command": { "const": "explain" },
17
- "topic": { "enum": ["anchor", "asset-optimization", "authority", "command", "retention", "skill", "skills", "surface", "verify"] },
17
+ "topic": { "enum": ["anchor", "asset-optimization", "authority", "command", "retention", "skill", "skills", "surface", "verify", "why"] },
18
18
  "mustflow_root": { "type": "string" },
19
19
  "decision": {
20
20
  "oneOf": [
@@ -25,7 +25,8 @@
25
25
  { "$ref": "#/$defs/skillRouteAlignmentDecision" },
26
26
  { "$ref": "#/$defs/publicSurfaceDecision" },
27
27
  { "$ref": "#/$defs/sourceAnchorDecision" },
28
- { "$ref": "#/$defs/verificationDecision" }
28
+ { "$ref": "#/$defs/verificationDecision" },
29
+ { "$ref": "#/$defs/latestFailureDecision" }
29
30
  ]
30
31
  }
31
32
  },
@@ -350,6 +351,10 @@
350
351
  "requiredAfter": {
351
352
  "type": "array",
352
353
  "items": { "type": "string" }
354
+ },
355
+ "preconditions": {
356
+ "type": "array",
357
+ "items": { "$ref": "#/$defs/commandPrecondition" }
353
358
  }
354
359
  }
355
360
  },
@@ -869,7 +874,7 @@
869
874
  "destructive",
870
875
  "successExitCodes",
871
876
  "requiredAfter"
872
- ],
877
+ ],
873
878
  "properties": {
874
879
  "name": { "type": "string" },
875
880
  "status": { "type": ["string", "null"] },
@@ -892,6 +897,110 @@
892
897
  "requiredAfter": {
893
898
  "type": "array",
894
899
  "items": { "type": "string" }
900
+ },
901
+ "preconditions": {
902
+ "type": "array",
903
+ "items": { "$ref": "#/$defs/commandPrecondition" }
904
+ }
905
+ }
906
+ },
907
+ "commandPrecondition": {
908
+ "type": "object",
909
+ "additionalProperties": false,
910
+ "required": [
911
+ "kind",
912
+ "label",
913
+ "status",
914
+ "detail",
915
+ "path",
916
+ "artifact",
917
+ "sources",
918
+ "newestSource",
919
+ "satisfyIntent"
920
+ ],
921
+ "properties": {
922
+ "kind": { "type": "string" },
923
+ "label": { "type": ["string", "null"] },
924
+ "status": { "enum": ["satisfied", "missing", "stale", "unknown", "invalid"] },
925
+ "detail": { "type": "string" },
926
+ "path": { "type": ["string", "null"] },
927
+ "artifact": { "type": ["string", "null"] },
928
+ "sources": {
929
+ "type": "array",
930
+ "items": { "type": "string" }
931
+ },
932
+ "newestSource": { "type": ["string", "null"] },
933
+ "satisfyIntent": {
934
+ "anyOf": [
935
+ { "type": "null" },
936
+ { "$ref": "#/$defs/preconditionSatisfyIntent" }
937
+ ]
938
+ }
939
+ }
940
+ },
941
+ "preconditionSatisfyIntent": {
942
+ "type": "object",
943
+ "additionalProperties": false,
944
+ "required": ["intent", "declared", "runnable", "status", "lifecycle", "runPolicy", "detail"],
945
+ "properties": {
946
+ "intent": { "type": "string" },
947
+ "declared": { "type": "boolean" },
948
+ "runnable": { "type": "boolean" },
949
+ "status": { "type": ["string", "null"] },
950
+ "lifecycle": { "type": ["string", "null"] },
951
+ "runPolicy": { "type": ["string", "null"] },
952
+ "detail": { "type": ["string", "null"] }
953
+ }
954
+ },
955
+ "latestFailureDecision": {
956
+ "type": "object",
957
+ "additionalProperties": false,
958
+ "required": [
959
+ "kind",
960
+ "decision",
961
+ "reason",
962
+ "effectiveAction",
963
+ "countsAsMustflowVerification",
964
+ "sourceFiles",
965
+ "latestFailure"
966
+ ],
967
+ "properties": {
968
+ "kind": { "const": "latest_failure" },
969
+ "decision": { "type": "string" },
970
+ "reason": { "type": "string" },
971
+ "effectiveAction": { "type": "string" },
972
+ "countsAsMustflowVerification": { "const": false },
973
+ "sourceFiles": {
974
+ "type": "array",
975
+ "items": { "type": "string" }
976
+ },
977
+ "latestFailure": {
978
+ "type": "object",
979
+ "additionalProperties": false,
980
+ "required": [
981
+ "path",
982
+ "present",
983
+ "valid",
984
+ "failed",
985
+ "status",
986
+ "intent",
987
+ "exitCode",
988
+ "errorKind",
989
+ "durationMs",
990
+ "summary"
991
+ ],
992
+ "properties": {
993
+ "path": { "const": ".mustflow/state/runs/latest.json" },
994
+ "present": { "type": "boolean" },
995
+ "valid": { "type": "boolean" },
996
+ "failed": { "type": "boolean" },
997
+ "status": { "type": ["string", "null"] },
998
+ "intent": { "type": ["string", "null"] },
999
+ "exitCode": { "type": ["integer", "null"] },
1000
+ "errorKind": { "type": ["string", "null"] },
1001
+ "durationMs": { "type": ["integer", "null"] },
1002
+ "summary": { "type": "string" }
1003
+ }
895
1004
  }
896
1005
  }
897
1006
  },
@@ -950,7 +1059,8 @@
950
1059
  "effectiveAction",
951
1060
  "countsAsMustflowVerification",
952
1061
  "sourceFiles",
953
- "route"
1062
+ "route",
1063
+ "selectionEvidence"
954
1064
  ],
955
1065
  "properties": {
956
1066
  "kind": { "const": "skill_route" },
@@ -994,6 +1104,44 @@
994
1104
  "items": { "type": "string" }
995
1105
  }
996
1106
  }
1107
+ },
1108
+ "selectionEvidence": {
1109
+ "type": "object",
1110
+ "additionalProperties": false,
1111
+ "required": [
1112
+ "matchedBy",
1113
+ "requiredInputs",
1114
+ "missingInputs",
1115
+ "candidateAdjuncts",
1116
+ "unmatchedPaths",
1117
+ "gapNotes"
1118
+ ],
1119
+ "properties": {
1120
+ "matchedBy": {
1121
+ "type": "array",
1122
+ "items": { "type": "string" }
1123
+ },
1124
+ "requiredInputs": {
1125
+ "type": "array",
1126
+ "items": { "type": "string" }
1127
+ },
1128
+ "missingInputs": {
1129
+ "type": "array",
1130
+ "items": { "type": "string" }
1131
+ },
1132
+ "candidateAdjuncts": {
1133
+ "type": "array",
1134
+ "items": { "type": "string" }
1135
+ },
1136
+ "unmatchedPaths": {
1137
+ "type": "array",
1138
+ "items": { "type": "string" }
1139
+ },
1140
+ "gapNotes": {
1141
+ "type": "array",
1142
+ "items": { "type": "string" }
1143
+ }
1144
+ }
997
1145
  }
998
1146
  }
999
1147
  },
@@ -92,7 +92,7 @@ translations = {}
92
92
  [documents."skill.contract-sync-check"]
93
93
  source = "locales/en/.mustflow/skills/contract-sync-check/SKILL.md"
94
94
  source_locale = "en"
95
- revision = 1
95
+ revision = 2
96
96
  translations = {}
97
97
 
98
98
  [documents."skill.date-number-audit"]
@@ -128,13 +128,13 @@ translations = {}
128
128
  [documents."skill.diff-risk-review"]
129
129
  source = "locales/en/.mustflow/skills/diff-risk-review/SKILL.md"
130
130
  source_locale = "en"
131
- revision = 3
131
+ revision = 4
132
132
  translations = {}
133
133
 
134
134
  [documents."skill.codebase-orientation"]
135
135
  source = "locales/en/.mustflow/skills/codebase-orientation/SKILL.md"
136
136
  source_locale = "en"
137
- revision = 1
137
+ revision = 2
138
138
  translations = {}
139
139
 
140
140
  [documents."skill.cli-output-contract-review"]
@@ -182,7 +182,7 @@ translations = {}
182
182
  [documents."skill.docs-update"]
183
183
  source = "locales/en/.mustflow/skills/docs-update/SKILL.md"
184
184
  source_locale = "en"
185
- revision = 4
185
+ revision = 5
186
186
  translations = {}
187
187
 
188
188
  [documents."skill.docs-prose-review"]
@@ -194,7 +194,7 @@ translations = {}
194
194
  [documents."skill.failure-triage"]
195
195
  source = "locales/en/.mustflow/skills/failure-triage/SKILL.md"
196
196
  source_locale = "en"
197
- revision = 3
197
+ revision = 5
198
198
  translations = {}
199
199
 
200
200
  [documents."skill.external-prompt-injection-defense"]
@@ -241,13 +241,13 @@ translations = {}
241
241
  [documents."skill.performance-budget-check"]
242
242
  source = "locales/en/.mustflow/skills/performance-budget-check/SKILL.md"
243
243
  source_locale = "en"
244
- revision = 12
244
+ revision = 15
245
245
  translations = {}
246
246
 
247
247
  [documents."skill.pattern-scout"]
248
248
  source = "locales/en/.mustflow/skills/pattern-scout/SKILL.md"
249
249
  source_locale = "en"
250
- revision = 1
250
+ revision = 2
251
251
  translations = {}
252
252
 
253
253
  [documents."skill.process-execution-safety"]
@@ -265,13 +265,13 @@ translations = {}
265
265
  [documents."skill.requirement-regression-guard"]
266
266
  source = "locales/en/.mustflow/skills/requirement-regression-guard/SKILL.md"
267
267
  source_locale = "en"
268
- revision = 1
268
+ revision = 2
269
269
  translations = {}
270
270
 
271
271
  [documents."skill.structure-discovery-gate"]
272
272
  source = "locales/en/.mustflow/skills/structure-discovery-gate/SKILL.md"
273
273
  source_locale = "en"
274
- revision = 26
274
+ revision = 27
275
275
  translations = {}
276
276
 
277
277
  [documents."skill.state-machine-pattern"]
@@ -289,13 +289,13 @@ translations = {}
289
289
  [documents."skill.repro-first-debug"]
290
290
  source = "locales/en/.mustflow/skills/repro-first-debug/SKILL.md"
291
291
  source_locale = "en"
292
- revision = 2
292
+ revision = 3
293
293
  translations = {}
294
294
 
295
295
  [documents."skill.source-freshness-check"]
296
296
  source = "locales/en/.mustflow/skills/source-freshness-check/SKILL.md"
297
297
  source_locale = "en"
298
- revision = 2
298
+ revision = 3
299
299
  translations = {}
300
300
 
301
301
  [documents."skill.source-anchor-authoring"]
@@ -313,13 +313,13 @@ translations = {}
313
313
  [documents."skill.readme-authoring"]
314
314
  source = "locales/en/.mustflow/skills/readme-authoring/SKILL.md"
315
315
  source_locale = "en"
316
- revision = 1
316
+ revision = 2
317
317
  translations = {}
318
318
 
319
319
  [documents."skill.release-notes-authoring"]
320
320
  source = "locales/en/.mustflow/skills/release-notes-authoring/SKILL.md"
321
321
  source_locale = "en"
322
- revision = 1
322
+ revision = 2
323
323
  translations = {}
324
324
 
325
325
  [documents."skill.security-privacy-review"]
@@ -355,7 +355,7 @@ translations = {}
355
355
  [documents."skill.test-maintenance"]
356
356
  source = "locales/en/.mustflow/skills/test-maintenance/SKILL.md"
357
357
  source_locale = "en"
358
- revision = 3
358
+ revision = 5
359
359
  translations = {}
360
360
 
361
361
  [documents."skill.vertical-slice-tdd"]
@@ -100,7 +100,7 @@ routes. Event routes stay inactive until their event occurs.
100
100
  | An unfamiliar codebase area needs an evidence-based map before planning, implementation, or reporting | `.mustflow/skills/codebase-orientation/SKILL.md` | User request, target area, relevant instructions, and current source, test, schema, template, configuration, or documentation files | Read-only orientation notes and any smallest follow-up edit chosen from inspected evidence | stale documentation, wrong ownership boundary, or invented architecture claim | `changes_status`, `changes_diff_summary`, `mustflow_check` | Scope inspected, entrypoints, flow map, ownership boundaries, verification options, risks, unknowns, and smallest safe next step |
101
101
  | Source anchors are added, revised, reviewed, or used to mark a module boundary | `.mustflow/skills/source-anchor-authoring/SKILL.md` | Target files, anchor reason, nearby anchors, source-anchor policy, and validation surface | Source anchors and directly related workflow docs or comments | comment bloat, authority drift, false verification claims, or hidden module pressure | `mustflow_check`, `docs_validate_fast` | Anchor placement decision, field choices, module-boundary handoff, and verification |
102
102
  | Changed files need risk classification and verification selection | `.mustflow/skills/diff-risk-review/SKILL.md` | Changed-file list, diff summary, and task goal | Changed surfaces and verification report | under- or over-verification | `changes_status`, `changes_diff_summary`, `test`, `test_related`, `test_audit`, `lint`, `build`, `docs_validate`, `mustflow_check` | Risk level, verification choice, rollback notes |
103
- | Performance budgets, query-count budgets, N+1 risk, read/write workload shape, database concurrency pressure, app-server scaling, vertical versus horizontal scaling, process count, connection-pool pressure, read-model cost, operational database reporting load, analytics-query isolation, cache strategy, cache keys, cache invalidation, cache stampede, hot keys, stale fallback, ranking snapshots, search API cost, search index rebuild cost, search quality set, log or analytics volume, file upload bandwidth, external-dependency timeout cost, retry storms, worker queue starvation, queue backlog, dead-letter growth, provider rate limits, vendor pricing-growth cost, free-tier limits, pricing value unit, internal cost unit, hybrid plan limit, credit or quota policy, tenant usage metering, user-action fan-out, contribution margin, P50/P90/P99 heavy-user cost, AI usage cost budgets, AI gateway hard limits, provider budget guardrails, agent loop caps, model-call retries, token-cost tracking, bundle size, page weight, startup time, command duration, memory use, asset size, throughput, latency, benchmark output, or performance claims are planned, edited, reviewed, or reported | `.mustflow/skills/performance-budget-check/SKILL.md` | Performance surface, budget source, measurement method, read/write workload profile, operational versus analytics query boundary, query-count or read-model boundary, cache layer, cache key source, freshness rule, invalidation path, hot-key or stampede risk, search rebuild or quality boundary, log or analytics volume boundary, file upload or download path, scaling bottleneck, process and connection boundary, external-dependency timeout, retry, fallback, worker, queue, rate-limit, vendor cost unit, value-pricing unit, tenant limit, fan-out factor, free-tier cliff, AI cost, AI gateway policy, provider budget role, agent cap, token, cache-hit, pricing-snapshot, or dead-letter rule, environment boundary, and command contract entries | Budget checks, thresholds, query-count and N+1 notes, read/write workload notes, analytics-query boundaries, cache boundaries, key and invalidation notes, hot-key and stampede notes, search rebuild and quality notes, log and analytics volume notes, file-transfer boundary notes, scaling bottleneck notes, dependency timeout and worker-capacity notes, vendor cost and free-tier notes, pricing-unit and margin notes, AI gateway, AI cost and provider-usage notes, measurements, dependency tradeoff notes, tests, docs, package metadata, and reports | invented budgets, stale measurements, hidden performance cost, value/cost unit mismatch, pricing cliff, unbounded free-plan loss, untracked heavy-user cost, untracked AI cost, provider-budget-only protection, unbounded agent loop, cache disclosure, stale-cache claim, N+1 query growth, write-contention blind spot, reporting query overload, app-server upload bottleneck, app-server scaling that worsens database or provider pressure, unbounded search rebuild, anecdotal search-quality claim, log-volume blind spot, cache stampede, retry storm, worker starvation, unwatched dead-letter queue, unbounded external wait, or unverified speed claim | `changes_status`, `changes_diff_summary`, `build`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Performance surface, budget source, measurement, query-count, read/write model, analytics-query, cache, search, log-volume, file-transfer, scaling bottleneck, worker, queue, external-dependency, vendor cost, value/cost pricing, margin, tenant-limit, AI gateway, and AI cost boundary, synchronized claims, skipped measurements, and remaining performance risk |
103
+ | CLI execution duration, build time, bundle size, test scheduling logic, process spawning, or CLI performance claims are planned, edited, or reported | `.mustflow/skills/performance-budget-check/SKILL.md` | Performance surface, budget source, measurement method, and baseline metrics | Budget checks, CLI duration, bundle weight, scheduling optimization notes, measurements, and tests | invented budgets, stale measurements, child-process bottlenecks, or unverified speed claims | `changes_status`, `changes_diff_summary`, `build`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Performance surface, budget source, measurements, execution duration, bundle size, and remaining risks |
104
104
  | New feature, module, folder layout, architecture, scaffold, refactor, routing, data model, frontend/backend/database/infrastructure choice, database engine choice, managed database extension choice, auth identity ownership, public URL contract, data residency policy, runtime patchability, runtime portability, global-ready locale/country/currency/timezone/money model, server-side authorization boundary, file upload or storage strategy, API response contract, content-heavy product, semantic content blocks, filter URL policy, admin operation model, cache strategy, content lifecycle, asset strategy, claim or fact registry, content graph, source collection flow, user-state layer, core/application/delivery/infra boundary, framework-magic boundary, core versus auxiliary path boundary, operational versus analytics boundary, HTTP-to-worker boundary, job or outbox model, backup/restore assumption, vendor or platform exit path, external-service truth ownership, search/queue/log/analytics portability, operational reproducibility, observability identifier flow, deployment-state portability, CI/CD dashboard dependency, ecosystem or maintainer-risk placement, multi-server state boundary, vertical-to-horizontal scaling boundary, AI usage cost boundary, AI gateway hard-limit boundary, pricing-growth boundary, failure-isolation boundary, or external service integration may require hidden structure decisions before coding | `.mustflow/skills/structure-discovery-gate/SKILL.md` | User request, intended capability, hidden assumptions, named technologies or services, future content/API/rendering/data assumptions, database operating-shape assumptions, managed database feature assumptions, identity and provider-id assumptions, public URL assumptions, data location assumptions, runtime patch and portability assumptions, delivery/application/core/infra assumptions, global data assumptions, authorization assumptions, file-storage assumptions, source/provenance assumptions, lifecycle/asset/claim assumptions, user-state assumptions, admin/cache assumptions, core path and auxiliary path assumptions, async work assumptions, restore assumptions, vendor exit and replacement assumptions, external-service source-of-truth assumptions, search/queue/log/analytics reconstruction assumptions, operating-state reproduction assumptions, observability identifier assumptions, CI/CD reproducibility assumptions, dependency ecosystem and maintainer assumptions, pricing value/cost unit assumptions, failure-policy assumptions, AI gateway or cost assumptions, and relevant local patterns | Questions, assumptions, proposed file boundaries, and the smallest resulting implementation | brittle structure, vendor-name leakage, migration debt, lock-in debt, provider-id leakage, raw storage URL leakage, weak data location proof, unpatchable runtime, runtime-specific core logic, framework business-rule coupling, SaaS-only core state, weak search or queue reconstruction, weak global data model, weak server authorization, process-memory state leak, untracked AI cost, provider-budget-only AI protection, value/cost pricing mismatch, hidden dashboard deployment state, fragile single-maintainer core dependency, hidden operating state, broken traceability, file/storage drift, screen-shaped API coupling, core-path coupling, retry or worker coupling, unbounded failure radius, over-questioning, or speculative abstraction | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Blocking questions, assumptions, proposed files and responsibilities, upfront versus deferred structure decisions, borrowed service versus owned contract boundary, dependency direction, database, identity, public URL, data residency, runtime patchability and portability, global data, authorization, file-storage, API, vendor exit, external-service truth ownership, search/queue/log/analytics portability, operational reproducibility, CI/CD reproducibility, dependency risk, observability identity flow, pricing value/cost boundary, AI gateway boundary, core/application/delivery/infra boundaries, core and auxiliary boundaries, async work boundary, local pattern, verification, and remaining structure risk |
105
105
 
106
106
  ### Tests and Regression
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.codebase-orientation
3
3
  locale: en
4
4
  canonical: true
5
- revision: 1
5
+ revision: 2
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: codebase-orientation
@@ -69,12 +69,23 @@ Build a concise, evidence-based map of an unfamiliar repository area before plan
69
69
 
70
70
  1. Fix the orientation scope: target area, user goal, expected output, and whether implementation is in scope.
71
71
  2. Read the nearest repository instructions and matching skill routes before inspecting source files.
72
- 3. Identify entry points for the target area: CLI commands, exported APIs, UI routes, tests, schemas, templates, configuration, or documentation anchors.
73
- 4. Trace the main flow through current files. Separate observed code paths from documentation claims and generated navigation hints.
74
- 5. Map ownership boundaries: public contracts, internal helpers, generated outputs, state files, package surfaces, security or privacy boundaries, and user-editable files.
75
- 6. Record verification surfaces already declared in `.mustflow/config/commands.toml`. Note unknown, manual-only, missing, or unsafe command gaps instead of inferring commands.
76
- 7. Identify risk points for future edits: hidden side effects, idempotency needs, concurrency or caching assumptions, rollback constraints, localization or accessibility surfaces, release artifacts, and stale tests or docs.
77
- 8. Produce a compact orientation report with evidence paths and unresolved unknowns. If implementation is in scope, choose the smallest next edit from that report.
72
+ 3. Use navigation aids in order:
73
+ - current changed files or user-named paths;
74
+ - `REPO_MAP.md` only when broader repository navigation is needed;
75
+ - file search for names, exported symbols, command ids, schema ids, route ids, and test names.
76
+ Treat generated maps and docs as pointers, not proof.
77
+ 4. Identify entry points for the target area: CLI command registry entry, command runner, exported API, UI route, worker, schema, template, configuration, or documentation anchor.
78
+ 5. Trace one main flow through current files in this order when applicable: entry point, orchestration function, core decision module, adapters or side effects, state writer or generated output, schema or public contract, then the nearest test.
79
+ 6. Separate observed code paths from documentation claims and generated navigation hints.
80
+ 7. Map ownership boundaries:
81
+ - public CLI, JSON, schema, template, package, or docs contract;
82
+ - core decision logic versus shell/adapters;
83
+ - user-editable files versus mustflow-owned files;
84
+ - generated output, cache, local state, and lock files;
85
+ - security, privacy, filesystem, process, localization, release, or compatibility boundaries.
86
+ 8. Record verification surfaces already declared in `.mustflow/config/commands.toml`. Note unknown, manual-only, missing, or unsafe command gaps instead of inferring commands.
87
+ 9. Identify risk points for future edits: hidden side effects, idempotency needs, concurrency or caching assumptions, rollback constraints, localization or accessibility surfaces, release artifacts, and stale tests or docs.
88
+ 10. Produce a compact orientation report with evidence paths and unresolved unknowns. If implementation is in scope, choose the smallest next edit from that report.
78
89
 
79
90
  <!-- mustflow-section: postconditions -->
80
91
  ## Postconditions
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.contract-sync-check
3
3
  locale: en
4
4
  canonical: true
5
- revision: 1
5
+ revision: 2
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: contract-sync-check
@@ -69,12 +69,19 @@ Keep declared behavior, machine-readable contracts, installed templates, tests,
69
69
  ## Procedure
70
70
 
71
71
  1. Name the contract being changed and identify its source of truth.
72
- 2. List the expected synchronized surfaces for that contract: source code, schemas, command metadata, templates, manifests, lock files, tests, README, docs site, and localized copies.
73
- 3. Compare the changed files with that list and add any missing required surface.
74
- 4. Keep derived files mechanically aligned with the source of truth. If a surface is intentionally not updated, record the reason.
75
- 5. Check that command intent names, schema ids, frontmatter revisions, template entries, version strings, and documented examples match exactly where they are meant to match.
76
- 6. Use the narrowest configured verification that covers the contract and any packaging or documentation surface touched.
77
- 7. In the final report, separate synchronized surfaces from skipped or deferred surfaces.
72
+ 2. If multiple files appear to define the contract, resolve source authority before editing:
73
+ - command behavior: current code and command contract first, then schemas, tests, and docs;
74
+ - JSON or package contract: schema and package metadata first, then code, tests, and docs;
75
+ - installed template contract: template manifest and template source files first, then lock files, i18n metadata, tests, and docs;
76
+ - workflow authority: nearest `AGENTS.md`, `.mustflow/config/*.toml`, and skill/index metadata before explanatory docs;
77
+ - prose examples: executable behavior and maintained docs before README snippets or fixtures.
78
+ If no authority is clear, stop and report the competing sources instead of choosing silently.
79
+ 3. List the expected synchronized surfaces for that contract: source code, schemas, command metadata, templates, manifests, lock files, tests, README, docs site, and localized copies.
80
+ 4. Compare the changed files with that list and add any missing required surface.
81
+ 5. Keep derived files mechanically aligned with the source of truth. If a surface is intentionally not updated, record the reason.
82
+ 6. Check that command intent names, schema ids, frontmatter revisions, template entries, version strings, and documented examples match exactly where they are meant to match.
83
+ 7. Use the narrowest configured verification that covers the contract and any packaging or documentation surface touched.
84
+ 8. In the final report, separate synchronized surfaces from skipped or deferred surfaces.
78
85
 
79
86
  <!-- mustflow-section: postconditions -->
80
87
  ## Postconditions
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.diff-risk-review
3
3
  locale: en
4
4
  canonical: true
5
- revision: 3
5
+ revision: 4
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: diff-risk-review
@@ -94,10 +94,15 @@ Classify the risk of a completed change, choose the smallest relevant configured
94
94
  - `medium`: templates, tests, package metadata, generated maps, or workflow docs without runtime behavior changes
95
95
  - `high`: runtime behavior, command execution, security, privacy, data handling, migrations, release behavior, or multi-surface changes
96
96
  5. Identify the minimum relevant configured verification intents. Prefer the narrowest configured intents that cover the changed surfaces, but do not hide missing, unknown, manual-only, or skipped intents.
97
- 6. Record rollback notes for any changed installed template, command contract, package version, generated file, migration-like change, or public behavior change.
98
- 7. Check for scope drift: unrelated files, invented facts, unnecessary abstractions, weakened validation, or unreported generated-file refreshes.
99
- 8. If external PR or bot review exists, classify each suggestion as behavior risk, maintainability polish, contract drift, or not applicable. Adapt high-confidence repeatable lessons into the relevant skill instead of leaving them only in the current patch.
100
- 9. Produce a concise risk and verification summary. Use `code-review` only if findings require a full review-style report.
97
+ 6. Use this verification floor unless a narrower skill gives a stricter rule:
98
+ - `low`: docs validation or `mustflow_check` for mustflow-owned prose and metadata.
99
+ - `medium`: `test_related` when tests, templates, package metadata, or workflow behavior changed, plus `mustflow_check` for mustflow-owned surfaces.
100
+ - `high`: `test_related`, `lint` or `build` when executable code changed, and `mustflow_check`; add `test_audit` when validation quality or test selection changed.
101
+ - `release_sensitive`: add `test_release` when package metadata, schema packaging, installed templates, public docs, or version metadata changed.
102
+ 7. Record rollback notes for any changed installed template, command contract, package version, generated file, migration-like change, or public behavior change.
103
+ 8. Check for scope drift: unrelated files, invented facts, unnecessary abstractions, weakened validation, or unreported generated-file refreshes.
104
+ 9. If external PR or bot review exists, classify each suggestion as behavior risk, maintainability polish, contract drift, or not applicable. Adapt high-confidence repeatable lessons into the relevant skill instead of leaving them only in the current patch.
105
+ 10. Produce a concise risk and verification summary. Use `code-review` only if findings require a full review-style report.
101
106
 
102
107
  <!-- mustflow-section: postconditions -->
103
108
  ## Postconditions
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.docs-update
3
3
  locale: en
4
4
  canonical: true
5
- revision: 4
5
+ revision: 5
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: docs-update
@@ -45,6 +45,7 @@ Ensure documentation accurately reflects the current workflow, commands, and use
45
45
  - Relevant source or template file
46
46
  - Current documentation page or Markdown file
47
47
  - `.mustflow/config/commands.toml`
48
+ - Localization or template metadata that owns the document when the edited page is installed or translated
48
49
 
49
50
  <!-- mustflow-section: preconditions -->
50
51
  ## Preconditions
@@ -63,10 +64,16 @@ Ensure documentation accurately reflects the current workflow, commands, and use
63
64
  ## Procedure
64
65
 
65
66
  1. Locate the document responsible for the explanation.
66
- 2. Update only the most relevant sections.
67
- 3. Ensure command names and paths are exact.
68
- 4. Avoid adding marketing language or tutorial filler.
69
- 5. Do not manually modify generated files.
67
+ 2. Decide section relevance before writing:
68
+ - update the page that owns the contract before summary or index pages;
69
+ - update README only when the first-screen claim changes;
70
+ - update localized or template metadata only when the source document is installed or translated;
71
+ - avoid duplicating long procedures across multiple docs.
72
+ 3. Update only the most relevant sections.
73
+ 4. Ensure command names, paths, field names, option names, and frontmatter are exact.
74
+ 5. If localization exists and translation confidence is low, update source metadata and mark follow-up instead of guessing translated wording.
75
+ 6. Avoid adding marketing language or tutorial filler.
76
+ 7. Do not manually modify generated files.
70
77
 
71
78
  <!-- mustflow-section: postconditions -->
72
79
  ## Postconditions
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.failure-triage
3
3
  locale: en
4
4
  canonical: true
5
- revision: 3
5
+ revision: 5
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: failure-triage
@@ -29,12 +29,15 @@ Identify the most probable root cause of a failed command or verification step b
29
29
  - A configured command intent returns a non-zero exit code.
30
30
  - Validation, build, test, or documentation checks fail.
31
31
  - The root cause of the failure is not yet apparent.
32
+ - A test or build failure may have been caused by an overlapping run, orphaned process, stale lock, or deleted build output.
33
+ - Several failures appear together and the first root cause needs to be separated from follow-on noise.
32
34
 
33
35
  <!-- mustflow-section: do-not-use-when -->
34
36
  ## Do Not Use When
35
37
 
36
- - The failure is fully understood and a targeted fix is available.
38
+ - The failure is fully understood and a targeted fix is available; apply the relevant implementation or test skill instead.
37
39
  - The user has requested only a high-level summary.
40
+ - A bug or runtime symptom is not yet reproducible; use `repro-first-debug` first unless the command failure itself is the reproduction.
38
41
 
39
42
  <!-- mustflow-section: required-inputs -->
40
43
  ## Required Inputs
@@ -44,6 +47,7 @@ Identify the most probable root cause of a failed command or verification step b
44
47
  - Truncated stdout and stderr output
45
48
  - Recently modified files
46
49
  - Relevant command contract entry
50
+ - Active or recently active build/test/profile processes when the failure mentions missing compiled files, stale output, port/resource conflicts, or unexpected file deletion
47
51
 
48
52
  <!-- mustflow-section: preconditions -->
49
53
  ## Preconditions
@@ -63,9 +67,24 @@ Identify the most probable root cause of a failed command or verification step b
63
67
 
64
68
  1. Preserve the original failing intent name.
65
69
  2. Analyze the first actionable error.
66
- 3. Determine if the failure originates from code, tests, configuration, documentation, or the environment.
67
- 4. Examine the most relevant files.
68
- 5. Develop a single hypothesis and verify it using the most targeted configured intent.
70
+ 3. Classify the probable failure domain before editing:
71
+ - `code`: implementation behavior, public output, or data transformation changed.
72
+ - `test`: assertion, fixture, helper, scheduler grouping, or test isolation changed.
73
+ - `configuration`: command contract, schema, template metadata, preferences, or package metadata drifted.
74
+ - `documentation`: docs navigation, frontmatter, generated content, or localized metadata drifted.
75
+ - `environment`: missing tool, platform difference, path, permission, lock, stale build output, or orphaned process.
76
+ - `tool_runner`: the verification runner, scheduler, cache, or build wrapper failed independently from the code under test.
77
+ 4. If several failures appear, triage in this order: environment and overlapping processes, build or generated output, configuration/schema drift, fixture setup, then behavior logic.
78
+ 5. For failures involving `dist/`, generated output, temporary files, ports, databases, or abrupt test termination, check whether another build/test/profile process for the same repository is still running.
79
+ 6. If an orphaned or overlapping process is found, stop or wait for it before changing source files, then rerun the narrowest failing intent to confirm the failure is reproducible.
80
+ 7. Pick one rerun target:
81
+ - the original failing intent when it is narrow enough;
82
+ - `test_related` when changed files map to a focused suite;
83
+ - `docs_validate_fast` for docs navigation or content-only failures;
84
+ - `test_release` for package, template, schema, or release metadata drift;
85
+ - `mustflow_check` for workflow, skill, command-contract, or manifest-lock failures.
86
+ 8. Examine the most relevant files.
87
+ 9. Develop a single hypothesis and verify it using the most targeted configured intent.
69
88
 
70
89
  <!-- mustflow-section: postconditions -->
71
90
  ## Postconditions
@@ -84,6 +103,8 @@ intent that isolates the same failure area.
84
103
 
85
104
  - Avoid bundling unrelated fixes.
86
105
  - If the failure is due to missing tools, report the missing tool and the command that revealed the issue.
106
+ - If the failure was caused by an orphaned or overlapping process, report that the original run was invalid and add or use a guard that prevents the same overlap before taking new measurements.
107
+ - If rerunning the same intent produces a different failure without code changes, classify the issue as flaky or environmental and avoid weakening assertions until the unstable dependency is identified.
87
108
  - If sensitive data appears in the output, cease copying raw output and summarize the information safely.
88
109
 
89
110
  <!-- mustflow-section: output-format -->