mustflow 2.18.20 → 2.21.1

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 (46) hide show
  1. package/dist/cli/commands/classify.js +2 -3
  2. package/dist/cli/commands/doctor.js +46 -6
  3. package/dist/cli/commands/run/output.js +1 -1
  4. package/dist/cli/commands/run/receipt.js +1 -0
  5. package/dist/cli/commands/verify.js +52 -23
  6. package/dist/cli/i18n/en.js +1 -0
  7. package/dist/cli/i18n/es.js +1 -0
  8. package/dist/cli/i18n/fr.js +1 -0
  9. package/dist/cli/i18n/hi.js +1 -0
  10. package/dist/cli/i18n/ko.js +1 -0
  11. package/dist/cli/i18n/zh.js +1 -0
  12. package/dist/cli/lib/git-changes.js +7 -1
  13. package/dist/cli/lib/local-index/index.js +9 -30
  14. package/dist/cli/lib/repo-map.js +3 -2
  15. package/dist/cli/lib/run-plan.js +8 -4
  16. package/dist/core/change-classification.js +24 -2
  17. package/dist/core/check-issues.js +1 -1
  18. package/dist/core/command-contract-rules.js +6 -0
  19. package/dist/core/command-contract-validation.js +24 -10
  20. package/dist/core/command-output-limits.js +2 -1
  21. package/dist/core/line-endings.js +12 -4
  22. package/dist/core/repeated-failure.js +3 -3
  23. package/dist/core/run-performance-history.js +4 -4
  24. package/dist/core/run-profile.js +2 -3
  25. package/dist/core/run-receipt.js +11 -3
  26. package/dist/core/run-write-drift.js +64 -12
  27. package/dist/core/safe-filesystem.js +155 -0
  28. package/package.json +1 -1
  29. package/schemas/commands.schema.json +1 -0
  30. package/schemas/doctor-report.schema.json +23 -1
  31. package/schemas/run-receipt.schema.json +6 -2
  32. package/templates/default/i18n.toml +13 -13
  33. package/templates/default/locales/en/.mustflow/skills/INDEX.md +13 -13
  34. package/templates/default/locales/en/.mustflow/skills/adapter-boundary/SKILL.md +72 -4
  35. package/templates/default/locales/en/.mustflow/skills/command-contract-authoring/SKILL.md +16 -10
  36. package/templates/default/locales/en/.mustflow/skills/command-pattern/SKILL.md +64 -7
  37. package/templates/default/locales/en/.mustflow/skills/database-change-safety/SKILL.md +249 -16
  38. package/templates/default/locales/en/.mustflow/skills/dependency-reality-check/SKILL.md +37 -7
  39. package/templates/default/locales/en/.mustflow/skills/migration-safety-check/SKILL.md +74 -10
  40. package/templates/default/locales/en/.mustflow/skills/performance-budget-check/SKILL.md +132 -5
  41. package/templates/default/locales/en/.mustflow/skills/pure-core-imperative-shell/SKILL.md +12 -5
  42. package/templates/default/locales/en/.mustflow/skills/result-option/SKILL.md +4 -2
  43. package/templates/default/locales/en/.mustflow/skills/security-privacy-review/SKILL.md +112 -29
  44. package/templates/default/locales/en/.mustflow/skills/state-machine-pattern/SKILL.md +17 -4
  45. package/templates/default/locales/en/.mustflow/skills/structure-discovery-gate/SKILL.md +193 -2
  46. package/templates/default/manifest.toml +1 -1
@@ -56,13 +56,13 @@ translations = {}
56
56
  [documents."skills.index"]
57
57
  source = "locales/en/.mustflow/skills/INDEX.md"
58
58
  source_locale = "en"
59
- revision = 60
59
+ revision = 73
60
60
  translations = {}
61
61
 
62
62
  [documents."skill.adapter-boundary"]
63
63
  source = "locales/en/.mustflow/skills/adapter-boundary/SKILL.md"
64
64
  source_locale = "en"
65
- revision = 3
65
+ revision = 11
66
66
  translations = {}
67
67
 
68
68
  [documents."skill.artifact-integrity-check"]
@@ -104,7 +104,7 @@ translations = {}
104
104
  [documents."skill.database-change-safety"]
105
105
  source = "locales/en/.mustflow/skills/database-change-safety/SKILL.md"
106
106
  source_locale = "en"
107
- revision = 1
107
+ revision = 16
108
108
  translations = {}
109
109
 
110
110
  [documents."skill.dependency-injection"]
@@ -116,7 +116,7 @@ translations = {}
116
116
  [documents."skill.dependency-reality-check"]
117
117
  source = "locales/en/.mustflow/skills/dependency-reality-check/SKILL.md"
118
118
  source_locale = "en"
119
- revision = 3
119
+ revision = 6
120
120
  translations = {}
121
121
 
122
122
  [documents."skill.line-ending-hygiene"]
@@ -152,13 +152,13 @@ translations = {}
152
152
  [documents."skill.command-pattern"]
153
153
  source = "locales/en/.mustflow/skills/command-pattern/SKILL.md"
154
154
  source_locale = "en"
155
- revision = 4
155
+ revision = 13
156
156
  translations = {}
157
157
 
158
158
  [documents."skill.command-contract-authoring"]
159
159
  source = "locales/en/.mustflow/skills/command-contract-authoring/SKILL.md"
160
160
  source_locale = "en"
161
- revision = 1
161
+ revision = 2
162
162
  translations = {}
163
163
 
164
164
  [documents."skill.cross-platform-filesystem-safety"]
@@ -170,13 +170,13 @@ translations = {}
170
170
  [documents."skill.pure-core-imperative-shell"]
171
171
  source = "locales/en/.mustflow/skills/pure-core-imperative-shell/SKILL.md"
172
172
  source_locale = "en"
173
- revision = 6
173
+ revision = 7
174
174
  translations = {}
175
175
 
176
176
  [documents."skill.result-option"]
177
177
  source = "locales/en/.mustflow/skills/result-option/SKILL.md"
178
178
  source_locale = "en"
179
- revision = 2
179
+ revision = 3
180
180
  translations = {}
181
181
 
182
182
  [documents."skill.docs-update"]
@@ -223,7 +223,7 @@ translations = {}
223
223
  [documents."skill.migration-safety-check"]
224
224
  source = "locales/en/.mustflow/skills/migration-safety-check/SKILL.md"
225
225
  source_locale = "en"
226
- revision = 1
226
+ revision = 8
227
227
  translations = {}
228
228
 
229
229
  [documents."skill.multi-agent-work-coordination"]
@@ -241,7 +241,7 @@ 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 = 1
244
+ revision = 12
245
245
  translations = {}
246
246
 
247
247
  [documents."skill.pattern-scout"]
@@ -271,13 +271,13 @@ translations = {}
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 = 12
274
+ revision = 26
275
275
  translations = {}
276
276
 
277
277
  [documents."skill.state-machine-pattern"]
278
278
  source = "locales/en/.mustflow/skills/state-machine-pattern/SKILL.md"
279
279
  source_locale = "en"
280
- revision = 1
280
+ revision = 4
281
281
  translations = {}
282
282
 
283
283
  [documents."skill.strategy-pattern"]
@@ -325,7 +325,7 @@ translations = {}
325
325
  [documents."skill.security-privacy-review"]
326
326
  source = "locales/en/.mustflow/skills/security-privacy-review/SKILL.md"
327
327
  source_locale = "en"
328
- revision = 7
328
+ revision = 16
329
329
  translations = {}
330
330
 
331
331
  [documents."skill.security-regression-tests"]
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skills.index
3
3
  locale: en
4
4
  canonical: true
5
- revision: 60
5
+ revision: 73
6
6
  authority: router
7
7
  lifecycle: mustflow-owned
8
8
  ---
@@ -96,8 +96,8 @@ stay inactive until their event occurs.
96
96
  | 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 |
97
97
  | 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 |
98
98
  | 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 |
99
- | Performance budgets, 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, environment boundary, and command contract entries | Budget checks, thresholds, measurements, dependency tradeoff notes, tests, docs, package metadata, and reports | invented budgets, stale measurements, hidden performance cost, or unverified speed claim | `changes_status`, `changes_diff_summary`, `build`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Performance surface, budget source, measurement boundary, synchronized claims, skipped measurements, and remaining performance risk |
100
- | New feature, module, folder layout, architecture, scaffold, refactor, routing, data model, 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, and relevant local patterns | Questions, assumptions, proposed file boundaries, and the smallest resulting implementation | brittle structure, vendor-name leakage, over-questioning, or speculative abstraction | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Blocking questions, assumptions, proposed files and responsibilities, dependency direction, local pattern, verification, and remaining structure risk |
99
+ | 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 |
100
+ | 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 |
101
101
 
102
102
  ### Tests and Regression
103
103
 
@@ -123,7 +123,7 @@ stay inactive until their event occurs.
123
123
 
124
124
  | Trigger | Skill Document | Required Input | Edit Scope | Risk | Verification Intents | Expected Output |
125
125
  | --- | --- | --- | --- | --- | --- | --- |
126
- | Code, configuration, docs, templates, logs, telemetry, credentials, data flows, AI-generated code, authentication, authorization, sessions, tokens, uploads, downloads, external requests, deployment settings, dependencies, cryptography, secure transport, scanner gates, security invariants, or agent configuration affect secrets, personal data, retention, or external disclosure | `.mustflow/skills/security-privacy-review/SKILL.md` | Changed files, sensitive surfaces, actor and resource owner, session or token surface, external target, dependency source, cryptography or transport surface, scanner evidence, agent-tool permission, deployment setting, project secret and privacy rules, public or packaged surfaces, and command contract entries | Sensitive data handling, authorization, sessions, tokens, inputs, files, logs, receipts, generated state, docs, templates, package metadata, deployment settings, and reports | secret leak, personal-data exposure, access-control bypass, unsafe external request, supply-chain drift, weak cryptography, insecure transport, over-privileged agent, or misleading privacy claim | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Sensitive surfaces reviewed, authorization and disclosure paths checked, dependency, cryptography, transport, scanner, and agent-tool boundaries checked, redaction or omission changes, related test need, and remaining security or privacy risk |
126
+ | Code, configuration, docs, templates, logs, telemetry, traces, baggage, behavior analytics, credentials, data flows, data residency policy, region or processing-location claims, AI-generated code, authentication, authorization, client-only permission checks, admin operations, audit logs, cache policy, cache-as-authority decisions, claim or policy data, comparison or affiliate data, user-generated content, sessions, tokens, uploads, downloads, signed URLs, API responses, webhooks, job queues, external API call records, external requests, third-party data-use terms, runtime security patch policy, deployment settings, dependencies, cryptography, secure transport, scanner gates, security invariants, or agent configuration affect secrets, personal data, retention, access control, vendor disclosure, or external disclosure | `.mustflow/skills/security-privacy-review/SKILL.md` | Changed files, sensitive surfaces, actor and resource owner, data-owner boundary, data residency and processing-location boundary, runtime patch boundary, AI gateway or budget boundary, server-side authorization rule, file upload/download boundary, API response field boundary, behavior analytics surface, trace or baggage surface, webhook or external-call record surface, admin operation surface, audit-log surface, cache visibility and authority policy, claim or affiliate policy surface, session or token surface, external target, dependency source, third-party data-use or terms surface, cryptography or transport surface, scanner evidence, agent-tool permission, deployment setting, project secret and privacy rules, public or packaged surfaces, and command contract entries | Sensitive data handling, authorization, admin operations, data residency, runtime patchability, AI budget records, behavior analytics, observability identifiers, webhook receipts, external-call records, dead-letter records, audit logs, shared-cache behavior, cache-authority behavior, claim and affiliate disclosure, sessions, tokens, inputs, files, signed URLs, API responses, logs, receipts, generated state, docs, templates, package metadata, deployment settings, and reports | secret leak, personal-data exposure, access-control bypass, client-trusted role or owner value, unsafe admin action, private file exposure, over-broad API response, shared-cache leak, unsafe cache authority, unprovable data location, unpatchable runtime, privacy-heavy telemetry, unsafe baggage propagation, unsafe webhook payload retention, unsafe external request, supply-chain drift, weak cryptography, insecure transport, over-privileged agent, risky third-party terms, or misleading privacy claim | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Sensitive surfaces reviewed, data residency, runtime patchability, AI hard-limit, behavior analytics, observability, and audit boundaries, webhook, external-call, and dead-letter boundaries, cache authority and disclosure boundaries, assumptions checked, disclosure and retention paths, authorization, file, API response, third-party terms, and external-boundary notes, verification, and remaining security or privacy risk |
127
127
  | Security-sensitive behavior changes need abuse-case regression tests | `.mustflow/skills/security-regression-tests/SKILL.md` | Changed boundary, actors, resource ownership, state-changing route, token, file, cryptography, transport, scanner, or invariant behavior, business rule, and expected deny behavior | Test files and related security boundary source | false confidence, happy-path-only coverage, unsafe authorization, token, file, business-rule, cryptography, transport, deployment, or invariant coverage | `test`, `test_related`, `test_audit`, `lint`, `build` | Security boundary, abuse case, defensive test data, tests added or reused, and remaining risks |
128
128
  | Outside text, generated content, logs, issues, webpages, pasted prompts, agent rules, MCP/tool configuration, or AI context sources include instructions that could override repository rules, broaden tool access, leak data, or change scope | `.mustflow/skills/external-prompt-injection-defense/SKILL.md` | External text source, direct user request, repository instruction files, conflicting instruction, context sources, tool permission surface, hidden content evidence, and command contract entries | Prompts, fixtures, docs, tests, skills, templates, agent configs, tool configs, and reports that handle untrusted text | prompt injection, context leakage, scope drift, unsafe command authority, or over-broad tool permission | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | External sources reviewed, unsafe instructions neutralized, context and permission boundaries checked, safe requirements adapted, verification, and remaining prompt-injection risk |
129
129
 
@@ -131,13 +131,13 @@ stay inactive until their event occurs.
131
131
 
132
132
  | Trigger | Skill Document | Required Input | Edit Scope | Risk | Verification Intents | Expected Output |
133
133
  | --- | --- | --- | --- | --- | --- | --- |
134
- | Database schema, query, transaction, ORM model, repository/store, index, cache-backed read model, data retention, pagination, concurrency, idempotency, audit log, or persistence boundary is introduced, changed, reviewed, or reported | `.mustflow/skills/database-change-safety/SKILL.md` | Data role, affected tables or stores, read/write path, transaction boundary, migration or rollback expectations, local DB or ORM patterns, changed files, and command contract entries | Schema, migrations, repositories, stores, queries, transactions, indexes, read models, fixtures, tests, docs, and directly synchronized templates | data loss, stale cache, authorization leak, transaction bug, duplicate side effect, slow query, or unverified migration claim | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Data role, schema/query/transaction review, migration and rollback status, index/performance notes, security/retention checks, tests, verification, and remaining database risk |
135
- | Dependency, package, runtime, tool, command, plugin, service, platform capability, package script, lifecycle hook, binary download, lockfile, audit result, or supply-chain-sensitive dependency surface is assumed, added, removed, imported, invoked, installed, or documented | `.mustflow/skills/dependency-reality-check/SKILL.md` | Assumed dependency or capability, declaration files, version or feature expectation, lockfile entry, package script or lifecycle hook, audit or provenance evidence, and relevant command intents | Package metadata, lockfiles, imports, scripts, command contracts, docs, tests, and reports | unavailable dependency, hallucinated or lookalike package, stale version claim, lifecycle script risk, audit suppression, lockfile drift, or install guidance mismatch | `changes_status`, `changes_diff_summary`, `build`, `test_release`, `mustflow_check` | Dependency checked, supply-chain surface reviewed, declarations synchronized, verification, and remaining dependency risk |
136
- | External systems, protocols, SDKs, databases, webhooks, queues, files, caches, framework requests or responses, AI models, browser storage, or provider data cross the core boundary or need port/adapter translation, error mapping, retry, idempotency, security, or observability handling | `.mustflow/skills/adapter-boundary/SKILL.md` | External system or protocol, inbound/outbound direction, internal use case, local port/adapter patterns, provider risk, changed files, and command contract entries | Ports, adapters, mappers, controllers, workers, stores, gateways, tests, fixtures, assembly wiring, and directly synchronized docs or templates | provider leakage, pass-through wrapper, unclassified external failure, duplicate side effect, unsafe retry, missing timeout, secret or personal-data leak, or untested integration drift | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Boundary classification, internal port, provider containment, validation and mapping, timeout/retry/idempotency handling, security notes, verification, and remaining provider risk |
134
+ | Database schema, database engine choice, managed database extension or provider feature, SQLite or PostgreSQL suitability, query, transaction, ORM model, repository/store, index, cache-backed read model, read/write model, content metadata, content blocks, content graph, lifecycle states, versioned records, ledgers, job tables, outbox events, inbox events, idempotency records, processed webhook records, external API call records, provider intent records, manual recovery records, taxonomy, filter URL policies, SEO landing records, claim or fact registries, comparison methodologies, affiliate links, source provenance, verification state, behavior analytics events, core event stores, search document metadata, queue recovery metadata, semantic export/import data, provider id mappings, app-owned identity records, public URL records, data residency records, AI budget or policy records, external-service truth ownership, operational versus analytics data boundaries, cache-as-store decisions, API response projections, public identifiers, data ownership boundaries, admin audit logs, cache invalidation data, user activity state, aggregate cache, hybrid file/database storage, file metadata records, data retention, pagination, concurrency, idempotency, audit log, or persistence boundary is introduced, changed, reviewed, or reported | `.mustflow/skills/database-change-safety/SKILL.md` | Data role, database operating model, managed database dependency model, event role, affected tables or stores, storage split, identity and provider-id mapping model, public URL and file-object model, data location model, AI budget and feature-policy model, block/graph/lifecycle/version/ledger/job/outbox/inbox/webhook/provider-call/taxonomy/filter/claim/source/admin/cache/user-state model, export/import and provider-id mapping model, external-service truth model, search/queue/log/analytics data model, operational versus analytics boundary, API projection boundary, file metadata and object-storage boundary, public id rule, read/write path, transaction boundary, migration or rollback expectations, local DB or ORM patterns, changed files, and command contract entries | Schema, migrations, repositories, stores, queries, transactions, indexes, read models, ledgers, job records, outbox records, inbox records, processed webhook records, external call records, provider intent records, manual recovery records, content metadata, block records, claim records, source records, comparison records, affiliate records, behavior event records, core event records, search source records, projection records, export/import records, provider mapping records, app identity records, public URL records, data residency records, AI budget or feature-policy records, admin audit records, file metadata records, cache records, user-state records, fixtures, tests, docs, and directly synchronized templates | data loss, incomplete export, provider-id lock-in, provider-auth-function lock-in, raw storage URL lock-in, unprovable data location, SaaS-only core fact, stale cache, authorization leak, transaction bug, duplicate side effect, unknown provider outcome, retry drift, missing manual replay record, slow query, N+1 query growth, write-contention blind spot, operational DB reporting overload, file/database drift, provenance drift, search or queue reconstruction gap, aggregate drift, API/DB coupling, cache-invalidation drift, provider-budget-only AI enforcement, or unverified migration claim | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Data role, database operating model, source-of-truth split, managed database dependency, app-owned identity, public URL, data residency, AI budget and policy records, schema/query/transaction review, delete lifecycle, versioning, ledger, job/outbox/inbox/webhook/provider-call/manual-recovery model, export/import and provider-id mapping model, external-service truth model, search/queue/log/analytics ownership, read/write model, behavior/audit event boundary, API projection boundary, file metadata boundary, block/graph/lifecycle/taxonomy/filter/claim/source/admin/cache/user-state checks, migration and rollback status, index/performance notes, security/retention checks, tests, verification, and remaining database risk |
135
+ | Dependency, package, runtime, framework, tool, command, plugin, service, platform capability, supported-version policy, security patch path, ecosystem maturity claim, maintainer-risk assumption, runtime portability claim, edge or serverless compatibility claim, critical-path library choice, package script, lifecycle hook, binary download, lockfile, audit result, or supply-chain-sensitive dependency surface is assumed, added, removed, imported, invoked, installed, audited, or documented | `.mustflow/skills/dependency-reality-check/SKILL.md` | Assumed dependency or capability, declaration files, version or feature expectation, role criticality, supported-version or end-of-life evidence, patchability expectation, runtime compatibility boundary, maintainer and ecosystem evidence when available, lockfile entry, package script or lifecycle hook, audit or provenance evidence, and relevant command intents | Package metadata, lockfiles, imports, scripts, command contracts, docs, tests, runtime policy notes, portability notes, and reports | unavailable dependency, hallucinated or lookalike package, fragile single-maintainer core dependency, experimental technology in a survival path, unsupported runtime, unclear security patch path, runtime-specific API leakage into core logic, stale version claim, lifecycle script risk, audit suppression, lockfile drift, or install guidance mismatch | `changes_status`, `changes_diff_summary`, `build`, `test_release`, `mustflow_check` | Dependency checked, ecosystem and maintainer-risk boundary reviewed, supported-version, patchability, and runtime-portability boundary reviewed, supply-chain surface reviewed, declarations synchronized, verification, and remaining dependency risk |
136
+ | External systems, protocols, SDKs, databases, webhooks, queues, files, object storage, signed upload or download URLs, caches, API response models, framework requests or responses, server actions, route handlers, edge functions, worker handlers, AI models, browser storage, search engines, analytics tools, email platforms, no-code tools, observability backends, trace or request context, or provider data cross the core boundary or need port/adapter translation, error mapping, timeout, retry, circuit-breaker, bulkhead, idempotency, reconciliation, security, core-state ownership, vendor portability, or observability handling | `.mustflow/skills/adapter-boundary/SKILL.md` | External system or protocol, inbound/outbound direction, delivery boundary, internal use case, local port/adapter patterns, provider risk, provider failure policy, core-state ownership risk, vendor portability risk, observability identifier policy, API contract risk, changed files, and command contract entries | Ports, adapters, mappers, controllers, workers, stores, gateways, response mappers, telemetry mappers, timeout and retry policies, circuit breakers, bulkhead boundaries, tests, fixtures, assembly wiring, and directly synchronized docs or templates | provider leakage, framework business-rule leakage, telemetry backend leakage, storage-key leakage, screen-shaped API coupling, pass-through wrapper, SaaS dashboard as truth source, search or analytics policy leakage, queue contract leakage, unclassified external failure, duplicate side effect, unsafe retry, missing timeout, missing circuit breaker, missing bulkhead, unresolved unknown provider outcome, broken identifier propagation, secret or personal-data leak, or untested integration drift | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Boundary classification, delivery adapter responsibility, internal port, provider containment, core-state ownership, vendor portability, validation and mapping, API response mapping, observability identifier flow, timeout/retry/circuit-breaker/bulkhead/idempotency handling, reconciliation behavior, security notes, verification, and remaining provider risk |
137
137
  | File paths, directories, symlinks, real paths, traversal, atomic writes, file copies, generated outputs, temporary files, cleanup, or Windows/POSIX filesystem behavior are created, changed, reviewed, or reported | `.mustflow/skills/cross-platform-filesystem-safety/SKILL.md` | Path inputs, base directory, trust boundary, symlink policy, write or cleanup strategy, platform expectations, and command contract entries | Path validation, file helpers, copy/update/delete code, scan bounds, fixtures, tests, docs, and templates | path traversal, symlink escape, unsafe overwrite, platform-only behavior, stale output, or cleanup data loss | `changes_status`, `changes_diff_summary`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Path trust classes, root boundary, symlink/write/delete/scan decisions, platform assumptions, verification, and remaining filesystem risk |
138
138
  | Child processes, shell or argv execution, built-in command reruns, timeouts, process trees, output limits, streaming, environment policy, command eligibility, or execution receipts are created, changed, reviewed, or reported | `.mustflow/skills/process-execution-safety/SKILL.md` | Execution path, timeout, output limit, stdin, environment, cwd, process tree behavior, receipt and write-tracking expectations, and command contract entries | Process execution code, process-tree helpers, output buffers, environment creation, eligibility checks, receipts, tests, and docs | runaway process, unbounded output, leaked environment, inconsistent JSON/text execution, false cleanup claim, or unreliable receipt | `changes_status`, `changes_diff_summary`, `test_related`, `test_release`, `mustflow_check` | Execution surface, timeout/output/environment/process-tree boundaries, receipt consistency, tests, verification, and remaining process risk |
139
139
  | Core or application logic creates, imports, resolves, or hides external dependencies such as databases, SDKs, clocks, random generators, configuration, loggers, framework objects, filesystems, queues, AI clients, or payment/email providers | `.mustflow/skills/dependency-injection/SKILL.md` | Target code area, hidden dependency, intended business capability, layer ownership, local port/adapter patterns, changed files, and command contract entries | Core logic signatures, ports, adapters, assembly roots, tests, and directly synchronized docs or templates | hidden global state, untestable business logic, provider leakage, lifecycle drift, or service-locator coupling | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Dependency boundary, direct dependencies found, injection style, ports/adapters, assembly boundary, tests or fakes, verification, and remaining dependency leakage |
140
- | Code, data, schema, configuration, file layout, template, or generated-state migrations are planned, edited, documented, or reported | `.mustflow/skills/migration-safety-check/SKILL.md` | Source state, target state, migration surface owner, idempotency, rollback, dry-run, compatibility, and command contract entries | Migration plans, compatibility notes, lock metadata, docs, tests, templates, generated state, and reports | irreversible migration, data loss, or false migration-success claim | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Migration surface, source and target state, idempotency, rollback, metadata updates, verification, and remaining migration risk |
140
+ | Code, data, schema, configuration, file layout, template, content frontmatter, file-to-database, URL, slug, lifecycle, asset, claim or fact extraction, API projection compatibility, public identifier changes, provider id mappings, event-schema changes, observability identifier continuity, deployment-state reproduction, generated-state, backup or restore proof, semantic export, import, platform exit, or cache migrations are planned, edited, documented, or reported | `.mustflow/skills/migration-safety-check/SKILL.md` | Source state, target state, migration surface owner, identity, lifecycle, asset, claim, export/import reconstruction shape, URL continuity, API projection expectations, public id mapping, provider id mapping, event schema versioning, observability identifier continuity, deployment-state reproduction, cache key versioning, restore evidence, idempotency, rollback, dry-run, compatibility, and command contract entries | Migration plans, compatibility notes, lock metadata, docs, tests, templates, generated state, redirects, assets, exports, imports, deployment notes, observability continuity notes, caches, restore notes, and reports | irreversible migration, data loss, incomplete export, broken links, identity drift, provider-id lock-in, lost asset originals, API contract break, event-schema ambiguity, broken traceability, dashboard-only operating state, cache-key drift, untested restore, or false migration-success claim | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Migration surface, source and target state, identity, lifecycle, asset, claim, URL, API, event, observability, deployment-state, cache, restore, and export/import continuity, idempotency, rollback, metadata updates, verification, and remaining migration risk |
141
141
 
142
142
  ### UI and Assets
143
143
 
@@ -157,11 +157,11 @@ stay inactive until their event occurs.
157
157
  | Code is being refactored, reorganized, renamed, deduplicated, simplified, or structurally improved while existing behavior should be preserved | `.mustflow/skills/behavior-preserving-refactor/SKILL.md` | Refactoring goal, target area, behavior evidence, local patterns, current changed files, and command contract entries | Small behavior-preserving refactor steps, related tests, and directly synchronized docs or contracts | hidden behavior change, broad cleanup, misleading abstraction, unsafe deduplication, or unverified legacy change | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `docs_validate_fast`, `test_release`, `mustflow_check` | Goal, behavior evidence, structural risks, refactoring ladder, changes made, excluded behavior changes, verification, and remaining risks |
158
158
  | Class inheritance, base classes, abstract classes, template methods, protected state, mixins, framework subclasses, or subtype hierarchies are introduced, reviewed, or refactored, especially for behavior reuse or feature variants | `.mustflow/skills/composition-over-inheritance/SKILL.md` | Inheritance surface, reuse goal, change dimensions, local composition patterns, compatibility constraints, current changed files, and command contract entries | Classes, functions, role interfaces, policies, strategies, adapters, decorators, state machines, tests, wrappers, and directly synchronized docs or templates | fragile parent-child coupling, subclass explosion, broken substitutability, hidden protected state, over-composition, or untested behavior-preserving refactor | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Inheritance review, keep-or-replace decision, change dimensions, composition pattern, tests, verification, and remaining hierarchy risk |
159
159
  | Multiple interchangeable algorithms, policies, calculations, scoring methods, sorting methods, recommendation methods, pricing rules, discount rules, shipping methods, payment methods, notification methods, permission policies, provider choices, feature-flag variants, or repeated branches choose how to do the same kind of work | `.mustflow/skills/strategy-pattern/SKILL.md` | Stable workflow, variants and shared purpose, current branch locations, common input and output shape, selection criteria, local Result, dependency injection, decorator, registry, and test patterns, current changed files, and command contract entries | Strategy function types, interfaces, concrete strategies, selectors, resolvers, registries, decorators, context wiring, tests, and directly synchronized docs or templates | over-abstracted small branch, wrong use-case grouping, context knowing concrete strategies, silent fallback, unsafe user-selected strategy, request-stateful strategy, strategy combination explosion, or untested selector behavior | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Strategy classification, shared contract, strategy registry, selector or resolver, default and unsupported-key behavior, tests, verification, and remaining strategy risk |
160
- | State-changing user or system intents, command data objects, command handlers, command buses, idempotency, authorization, transactions, outbox events, audit logs, retries, concurrency, long-running jobs, or external side effects need one traceable execution unit | `.mustflow/skills/command-pattern/SKILL.md` | User or system intent, source boundary, payload, actor and context, affected resources, local Result, repository, gateway, unit-of-work, outbox, idempotency, audit, retry, and test patterns | Command payloads, command context, handlers, command bus wiring when justified, idempotency, outbox, audit, retry, transaction, controller or worker adapters, tests, and directly synchronized docs or templates | command ceremony for reads, giant handler, hidden domain policy, unsafe duplicate side effect, transaction and external-call coupling, missing audit trail, retry without idempotency, or untested command boundary | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Command classification, payload and context shape, handler dependencies, domain delegation, transaction, outbox, idempotency, retry, audit, concurrency choices, tests, verification, and remaining command safety risk |
160
+ | State-changing user or system intents, command data objects, command handlers, command buses, payment, credit, point, inventory, entitlement, subscription, permission, document, prompt, AI budget reservation, agent loop execution, idempotency, authorization, transactions, outbox events, audit logs, retries, concurrency, long-running jobs, queue message contracts, provider intent records, HTTP work acceptance, core-state changes with auxiliary analytics, email, AI, search, statistics, cache rebuild, webhook follow-up, cron or worker execution, manual recovery, or external side effects need one traceable execution unit | `.mustflow/skills/command-pattern/SKILL.md` | User or system intent, source boundary, payload, actor and context, request/trace/correlation/causation/job/webhook identifiers, affected resources, core state to commit, auxiliary work to defer, acceptable delay or loss, work-acceptance response policy, queue contract, provider intent and recovery policy, local Result, repository, gateway, unit-of-work, outbox, job, idempotency, audit, retry, AI policy decision, agent caps, and test patterns | Command payloads, command context, handlers, command bus wiring when justified, idempotency, outbox, job records, provider intent records, audit, retry, transaction, ledger or action records, controller or worker adapters, auxiliary worker handoff, queue envelope and replay rules, AI policy decisions, tests, and directly synchronized docs or templates | command ceremony for reads, giant handler, hidden domain policy, unsafe duplicate side effect, transaction and external-call coupling, broken async traceability, auxiliary dependency blocking core state, missing durable job record, missing provider intent record, missing audit trail, retry without idempotency, unversioned queue message, one worker pool starving unrelated work, unwatched dead-letter state, unbounded AI agent loop, or untested command boundary | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Command classification, payload and context shape, request/trace/causation/job identifier choices, handler dependencies, domain delegation, core versus auxiliary split, transaction, ledger, outbox, job, provider intent, queue envelope, idempotency, retry, audit, concurrency, worker, dead-letter, manual replay, reconciliation, and AI policy choices, tests, verification, and remaining command safety risk |
161
161
  | Controllers, handlers, command handlers, workers, services, or UI events need one stable high-level entry point over a complex subsystem, repeated multi-step workflow, multiple dependencies, external services, storage, queues, caches, transactions, idempotency, retries, logging, or normalized results | `.mustflow/skills/facade-pattern/SKILL.md` | Caller surface, high-level operation, repeated internal sequence, leaked subsystem details, dependencies, expected response and errors, authorization, idempotency, retry, transaction, observability, security, performance, local Result, port, adapter, command, and test patterns | Facade request, context, response, and error types, injected collaborators, orchestration, mappers, error normalizers, idempotency, transactions, retries, events, cache invalidation, logging, tests, and directly synchronized docs or templates | pass-through wrapper, god service, hidden domain policy, public internal steps, SDK or ORM leakage, facade-to-facade coupling, request-stateful facade, unsafe retry, external call inside transaction, or untested subsystem orchestration | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Facade classification, caller simplification, request and context shape, normalized result, injected dependencies, delegated domain rules, transaction/idempotency/retry/logging choices, tests, verification, and remaining facade risk |
162
- | Business decisions, validation, authorization, pricing, eligibility, state transitions, domain events, effect descriptions, or calculations are mixed with databases, HTTP handlers, repositories, SDK calls, files, queues, logs, metrics, clocks, randomness, environment reads, payments, emails, or framework request/response objects | `.mustflow/skills/pure-core-imperative-shell/SKILL.md` | Business action, decision facts, side effects, current boundary shape, local result/event/effect patterns, behavior evidence, changed files, and command contract entries | Core decision functions, shell orchestration, mappers, result/error types, events, effect descriptions, tests, and directly synchronized docs or templates | business rules hidden in I/O, non-deterministic core, mock-heavy tests, stale decisions, duplicate side effects, transaction/external-call coupling, or over-layered trivial CRUD | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Decision isolated, explicit core input and output, shell responsibilities, events or effects, typed business failures, tests, verification, and remaining mixed-logic risk |
163
- | Domain objects have lifecycle state, status fields, phase or step fields, allowed actions depend on state, transitions are scattered, external results change state, duplicate events are possible, or state changes need transition tables, guards, effects, history, idempotency, or concurrency control | `.mustflow/skills/state-machine-pattern/SKILL.md` | Entity, state field, state list, event list, terminal states, current state-changing code, guards, context facts, effects, history, idempotency, concurrency risks, local Result and outbox patterns, and command contract entries | State unions, event unions, transition tables, guard functions, pure transition functions, dispatch shell, outbox, transition logs, idempotency records, available-action helpers, tests, and directly synchronized docs or templates | direct state assignment, hidden invalid transition, silent no-op, impure guard, external effect before commit, duplicate webhook damage, state explosion, stale concurrent transition, UI/server rule drift, or untested lifecycle | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Lifecycle classification, states and events, transition table, guards and context facts, effects and history, idempotency and concurrency choices, direct assignment cleanup, tests, verification, and remaining state-machine risk |
164
- | Expected failures, meaningful absence, null or undefined returns, thrown business errors, boolean success flags, raw string errors, repository lookups, validation, parsing, external adapter errors, or boundary error mapping need explicit value-based handling | `.mustflow/skills/result-option/SKILL.md` | Operation semantics, absence and failure cases, local Result/Option/error conventions, layer ownership, public response rules, sensitive data constraints, changed files, and command contract entries | Result and Option helpers, function signatures, typed errors, boundary mappers, repository/service/controller contracts, tests, and directly synchronized docs or templates | hidden null, swallowed error, thrown business failure, ambiguous boolean result, provider error leakage, public error-shape drift, or over-wrapped total function | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Return shape decision, error codes and categories, absence handling, boundary conversions, preserved throw paths, tests, verification, and remaining exception or null risk |
162
+ | Business decisions, validation, authorization, pricing, discounts, credits, permissions, eligibility, state transitions, domain events, effect descriptions, or calculations are mixed with databases, ORM entities, HTTP handlers, repositories, SDK calls, files, queues, logs, metrics, clocks, randomness, environment reads, payments, emails, or framework request/response objects | `.mustflow/skills/pure-core-imperative-shell/SKILL.md` | Business action, decision facts, side effects, ORM dependency shape, current boundary shape, local result/event/effect patterns, behavior evidence, changed files, and command contract entries | Core decision functions, shell orchestration, mappers, result/error types, events, effect descriptions, ORM boundary cleanup, tests, and directly synchronized docs or templates | business rules hidden in I/O, ORM hooks or models, non-deterministic core, mock-heavy tests, stale decisions, duplicate side effects, transaction/external-call coupling, or over-layered trivial CRUD | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Decision isolated, explicit core input and output, shell responsibilities, ORM boundary, events or effects, typed business failures, tests, verification, and remaining mixed-logic risk |
163
+ | Domain objects, jobs, external API calls, webhooks, uploads, or processing workflows have lifecycle state, deletion or restore flow, file upload or processing status, status fields, phase or step fields, allowed actions depend on state, transitions are scattered, external results change state, duplicate events are possible, or state changes need transition tables, guards, effects, history, idempotency, retry, reconciliation, or concurrency control | `.mustflow/skills/state-machine-pattern/SKILL.md` | Entity, state field, state list, event list, terminal states, delete/restore/purge semantics, upload, job, external-call, or processing semantics, current state-changing code, guards, context facts, effects, history, idempotency, retry, reconciliation, concurrency risks, local Result and outbox patterns, and command contract entries | State unions, event unions, transition tables, guard functions, pure transition functions, dispatch shell, outbox, transition logs, idempotency records, available-action helpers, tests, and directly synchronized docs or templates | direct state assignment, hidden invalid transition, silent no-op, impure guard, direct deleted_at bypass, direct upload-ready assignment, direct job-success assignment, external effect before commit, duplicate webhook damage, unknown provider outcome treated as failure, state explosion, stale concurrent transition, UI/server rule drift, or untested lifecycle | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Lifecycle classification, states and events, transition table, delete/restore/purge and upload/job/processing semantics, guards and context facts, effects and history, idempotency, retry, reconciliation, and concurrency choices, direct assignment cleanup, tests, verification, and remaining state-machine risk |
164
+ | Expected failures, meaningful absence, null or undefined returns, thrown business errors, boolean success flags, raw string errors, repository lookups, validation, parsing, external adapter errors, API error response contracts, or boundary error mapping need explicit value-based handling | `.mustflow/skills/result-option/SKILL.md` | Operation semantics, absence and failure cases, local Result/Option/error conventions, layer ownership, public response rules, API error envelope rules, sensitive data constraints, changed files, and command contract entries | Result and Option helpers, function signatures, typed errors, boundary mappers, repository/service/controller contracts, tests, and directly synchronized docs or templates | hidden null, swallowed error, thrown business failure, ambiguous boolean result, provider error leakage, public error-shape drift, sensitive error detail leak, or over-wrapped total function | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Return shape decision, error codes and categories, absence handling, boundary conversions, API error response shape, preserved throw paths, tests, verification, and remaining exception or null risk |
165
165
  | Repeated null, undefined, None, or nil checks, optional dependencies, disabled integrations, null loggers, null analytics, null caches, optional notifications, no-op collaborators, identity processors, or safe neutral implementations are introduced or refactored | `.mustflow/skills/null-object-pattern/SKILL.md` | Optional collaborator, interface, absence semantics, caller branch needs, neutral output, required side effects, security, money, data, and audit risks, assembly location, local Result, Option, dependency injection, strategy, and test patterns | Interfaces, null, no-op, disabled, identity, empty, deny-all, or failing implementations, assembly wiring, non-null dependency types, tests, and directly synchronized docs or templates | hidden required failure, fake success, authorization bypass, dropped persistence, skipped audit, swallowed initialization error, stateful null object, or caller still nullable | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `lint`, `build`, `docs_validate_fast`, `test_release`, `mustflow_check` | Absence classification, null object decision, neutral implementation, assembly selection, nullable caller cleanup, tests, verification, and remaining hidden-failure risk |
166
166
  | Implementation in an unfamiliar area needs a local precedent before new structure is introduced | `.mustflow/skills/pattern-scout/SKILL.md` | User request, intended file area, nearby examples, and current changed files | Pattern evidence and files needed to follow it | invented parallel structure | `changes_status`, `changes_diff_summary`, `mustflow_check` | Local pattern, applied alignment, intentional deviations, and verification |
167
167
 
@@ -172,7 +172,7 @@ stay inactive until their event occurs.
172
172
  | Multiple AI workers, subagents, external agents, parallel task runners, or worktree-based worker roles are planned or used for one repository task | `.mustflow/skills/multi-agent-work-coordination/SKILL.md` | Task goal, worker roles, write permissions, file ownership, workspace isolation, credential boundary, merge owner, and command contract entries | Coordination plan, worker instructions, ownership boundaries, merge notes, and directly synchronized tests or docs | same-file races, conflicting instructions, leaked credentials, shared auth cache, untrusted worker output, merge drift, or unverified parallel result | `changes_status`, `changes_diff_summary`, `test_related`, `test`, `docs_validate_fast`, `test_release`, `mustflow_check` | Worker limit, role map, write ownership, isolation and credential boundaries, merge owner, verification, skipped checks, and remaining coordination risk |
173
173
  | Repository improvement, audit, prioritization, stabilization, polish, onboarding, contributor-readiness, production-readiness, or iterative improvement is requested without a single predetermined edit | `.mustflow/skills/repo-improvement-loop/SKILL.md` | User goal, improvement mode, repository evidence, candidate risks, current changed files, and command contract entries | Repository diagnosis, ranked candidates, and at most one scoped improvement cycle unless the user explicitly requests analysis-only | idea spam, ungrounded prioritization, autonomous loop drift, broad rewrite, or unverified improvement claim | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Mode, evidence inspected, scored candidates, selected improvement, files changed or analysis-only note, verification, next improvement question, and stop reason |
174
174
  | Declared behavior must stay aligned across code, schemas, templates, tests, and docs | `.mustflow/skills/contract-sync-check/SKILL.md` | Changed files, intended behavior, source of truth, derived surfaces, and command contract entries | Contract source and required synchronized surfaces | contract drift | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Contract source, synchronized surfaces, deferred surfaces, verification, and drift risk |
175
- | `.mustflow/config/commands.toml` command intents, resources, effects, timeouts, output limits, environment policies, lifecycle values, run policies, or command-selection metadata are created, changed, reviewed, or removed | `.mustflow/skills/command-contract-authoring/SKILL.md` | Command goal, current command contract, expected reads and writes, side effects, locks, timeout, output, environment, stdin, and verification entries | Command contract, template command contracts, workflow docs, skills, tests, and directly synchronized public docs | accidental command authority, inferred command, unbounded side effect, missing lock, secret exposure, or long-running command approval | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Intent authority decision, side-effect model, environment and timeout boundary, synchronized surfaces, verification, and remaining command-contract risk |
175
+ | `.mustflow/config/commands.toml` command intents, resources, effects, timeouts, output limits, environment policies, lifecycle values, run policies, command-selection metadata, CI/CD reproducibility rules, build/test/migration/deploy verification handoffs, or health-check command surfaces are created, changed, reviewed, or removed | `.mustflow/skills/command-contract-authoring/SKILL.md` | Command goal, current command contract, expected reads and writes, side effects, locks, timeout, output, environment, stdin, dashboard or platform setting dependency, and verification entries | Command contract, template command contracts, workflow docs, skills, tests, and directly synchronized public docs | accidental command authority, inferred command, dashboard-only source of truth, unreproducible deployment, unbounded side effect, missing lock, secret exposure, or long-running command approval | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Intent authority decision, side-effect model, environment and timeout boundary, CI/CD reproducibility boundary, synchronized surfaces, verification, and remaining command-contract risk |
176
176
  | CLI text output, JSON output, exit codes, error messages, warnings, deprecations, help text, command aliases, schema-backed reports, or automation-facing command behavior are created, changed, reviewed, or reported | `.mustflow/skills/cli-output-contract-review/SKILL.md` | Affected command, output modes, exit-code expectations, docs examples, schemas, fixtures, consumers, and command contract entries | CLI output code, schemas, fixtures, docs, README examples, package tests, templates, and reports | broken automation, misleading success, schema drift, undocumented deprecation, stale example, or incompatible output change | `changes_status`, `changes_diff_summary`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Output surfaces reviewed, status and exit-code semantics, synchronized schemas/docs/tests/templates, verification, and remaining CLI-output risk |
177
177
  | Dates, versions, counts, durations, limits, metrics, benchmarks, prices, percentages, or other numeric facts are created, edited, or reported | `.mustflow/skills/date-number-audit/SKILL.md` | Date or numeric fact, source of truth, dependent surfaces, precision expectation, and command contract entries | Numeric statements, metadata, tests, docs, templates, and reports | invented, stale, or mismatched numeric claim | `changes_status`, `changes_diff_summary`, `docs_validate_fast`, `test_release`, `mustflow_check` | Audited values, source of truth, synchronized surfaces, skipped checks, and remaining numeric risk |
178
178
  | Git reports CRLF/LF warnings or tracked text files may need line-ending normalization | `.mustflow/skills/line-ending-hygiene/SKILL.md` | Warning text or changed-file evidence, line-ending policy, changed-file status, and command contract entries | Line-ending policy files, tracked text files, command metadata, tests, and reports | silent working-tree rewrite or policy drift | `line_endings_check`, `changes_status`, `mustflow_check` | Policy found, drift files, normalization status, verification, and remaining line-ending risk |
@@ -2,11 +2,11 @@
2
2
  mustflow_doc: skill.adapter-boundary
3
3
  locale: en
4
4
  canonical: true
5
- revision: 3
5
+ revision: 11
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: adapter-boundary
9
- description: Apply this skill when external systems, protocols, SDKs, databases, webhooks, queues, files, caches, framework requests or responses, AI models, browser storage, or provider data cross into or out of core logic and need ports, adapters, translation, error mapping, timeout, retry, idempotency, security, or observability boundaries.
9
+ description: Apply this skill when external systems, protocols, SDKs, databases, managed database features, authentication providers, webhooks, queues, files, object storage, public URL contracts, signed upload or download URLs, CDN transform rules, caches, API response models, framework requests or responses, server actions, route handlers, edge functions, worker handlers, AI models, AI gateway usage policy, AI provider cost and usage data, browser storage, search engines, analytics tools, email platforms, no-code tools, observability backends, trace or request context, or provider data cross into or out of core logic and need ports, adapters, translation, error mapping, timeout, retry, circuit-breaker, bulkhead, idempotency, security, cost attribution, reconciliation, core-state ownership, vendor portability, or observability boundaries.
10
10
  metadata:
11
11
  mustflow_schema: "1"
12
12
  mustflow_kind: procedure
@@ -38,9 +38,20 @@ This skill is not just a wrapper pattern. A good adapter boundary absorbs provid
38
38
 
39
39
  - Code receives input from HTTP, CLI, webhooks, message queues, scheduled jobs, browser events, uploaded files, external databases, or external APIs.
40
40
  - Code calls external APIs, payment providers, email or SMS providers, file storage, object storage, databases, caches, search engines, analytics, AI models, queues, or browser storage.
41
+ - Code would let a provider dashboard, SDK object, search engine setting, queue product, email tag, analytics cohort, no-code automation, or hosted storage URL define core business state instead of only processing, storing, indexing, or displaying product-owned state.
42
+ - Code sends logs, metrics, traces, errors, request context, baggage, user context, job metadata, webhook metadata, or telemetry to an observability backend or passes those identifiers across HTTP, queue, cron, worker, or webhook boundaries.
43
+ - Code issues signed upload or download URLs, translates uploaded file metadata, maps storage keys, handles object-storage callbacks, or exposes file download responses.
44
+ - Code exposes file, image, avatar, attachment, export, or share URLs to browsers, emails, mobile apps, crawlers, Open Graph consumers, or API clients.
45
+ - Code maps external authentication tokens, provider subjects, social identities, hosted auth metadata, managed database auth functions, or provider permission fields into the internal user, membership, entitlement, or authorization model.
46
+ - Code maps database rows, ORM entities, internal model fields, storage keys, or provider payloads into public, mobile, admin, integration, or internal web API responses.
41
47
  - Provider SDK types, framework request or response objects, database rows, external event objects, raw model responses, or provider error types are visible in domain, application, service, or use-case code.
48
+ - Delivery-layer tools such as server actions, route handlers, Web-standard handlers, edge middleware, CLI commands, cron handlers, workers, or admin actions are about to contain pricing rules, authorization policy, payment state transitions, entitlement decisions, external provider calls, or database transactions directly.
42
49
  - A new or changed port, repository, gateway, provider module, controller, worker, webhook handler, mapper, or integration test is needed.
43
50
  - The boundary needs timeout, retry, rate-limit, idempotency, signature verification, duplicate handling, logging, metrics, redaction, or provider-version decisions.
51
+ - External calls can be slow, rate-limited, duplicated, partially completed, or ambiguous, and the system needs timeout, limited retry, backoff, circuit-breaker, queue isolation, dead-letter, or reconciliation behavior.
52
+ - AI provider calls need a single internal boundary for model selection, prompt assembly, token usage, provider-call identity, request-to-call grouping, pricing snapshot, cache-hit classification, retry cost, plan limits, and redacted observability.
53
+ - AI provider calls need a product-owned gateway for preflight cost estimation, hard budget enforcement, feature policy, model fallback, user or organization limits, token caps, tool-call caps, agent-step caps, timeout caps, provider-budget fallback, and emergency disable behavior.
54
+ - Core external SDKs or platform APIs for authentication, billing, storage, search, queues, email, analytics, AI, deployment, or database access would otherwise spread through handlers, domain logic, jobs, or UI code and make the provider difficult to replace or test.
44
55
  - An optional external integration may be disabled and needs either a safe neutral adapter or an explicit disabled result without leaking provider absence inward.
45
56
 
46
57
  <!-- mustflow-section: do-not-use-when -->
@@ -59,6 +70,17 @@ This skill is not just a wrapper pattern. A good adapter boundary absorbs provid
59
70
  - The internal use case, domain action, or read model that should receive translated data.
60
71
  - Existing local patterns for ports, adapters, repositories, controllers, workers, mappers, result types, retries, idempotency, logging, and tests.
61
72
  - Provider-specific risk: write effects, duplicate delivery, unknown statuses, money, time, identifiers, secrets, personal data, files, untrusted URLs, rate limits, or provider version changes.
73
+ - Public contract risk: whether provider ids, raw storage URLs, bucket names, object keys, CDN query parameters, image-transform syntax, provider template ids, provider event names, or provider auth metadata would become visible in persisted content, API responses, emails, mobile apps, search indexes, or browser caches.
74
+ - Delivery contract risk: whether a server action, route handler, Web API adapter, edge function, queue consumer, CLI command, cron task, or admin operation should only parse/authenticate/map/call a use case, or whether it is currently becoming the place where business rules and provider calls live.
75
+ - Identity boundary risk: how provider subject ids, emails, token claims, user metadata, hosted-auth roles, and session state are normalized into app-owned user, organization, membership, and permission concepts.
76
+ - Dependency and provider replacement risk: whether the SDK or platform is on a survival path, how widely provider names and types would spread, what internal contract would preserve product meaning, and which provider features are acceptable to depend on directly.
77
+ - Core-state ownership risk: which customer, entitlement, consent, file, content, search, job, audit, or event facts must be represented in internal types and storage before or after the provider call.
78
+ - Vendor portability risk: which provider settings, search ranking rules, queue retry behavior, email automation tags, analytics event definitions, or no-code workflow rules must be captured as internal policy, configuration, or operator procedure instead of living only in a dashboard.
79
+ - Provider failure policy: timeout, retryable status categories, backoff and jitter rule, rate-limit handling, circuit-breaker behavior, bulkhead or queue isolation, idempotency key support, unknown-result reconciliation, and dead-letter handling when available.
80
+ - Observability portability policy: request id, trace id, span id, correlation id, causation id, user or anonymous id, tenant or organization id, job run id, webhook event id, event schema version, and which context fields are propagated, redacted, hashed, or kept internal.
81
+ - AI usage policy when AI models are involved: feature key, model key, user request id, provider call id, token usage fields, cached-input treatment, pricing snapshot, cost unit, retry grouping, cache key hash, prompt/output retention rule, and plan-limit behavior.
82
+ - AI gateway policy when AI models are involved: preflight estimate, hard limit, selected model, fallback model, blocked reason, remaining budget, maximum input and output tokens, maximum tool calls, maximum agent steps, maximum retries, timeout, provider-console budget role, and emergency kill switch.
83
+ - API contract risk: stable resource ids, public identifiers, pagination, machine-readable status, safe error codes, field omission, private file URL handling, and whether the response shape is domain-oriented or screen-component-oriented.
62
84
  - Relevant command-intent contract entries for tests, builds, docs, template checks, release checks, and mustflow validation.
63
85
 
64
86
  <!-- mustflow-section: preconditions -->
@@ -87,21 +109,31 @@ This skill is not just a wrapper pattern. A good adapter boundary absorbs provid
87
109
  - Inbound: HTTP route, controller, webhook, CLI command, queue consumer, scheduler, browser event, uploaded file, or external data import.
88
110
  - Outbound: provider SDK, HTTP API, database, cache, file storage, search engine, message publisher, email/SMS/push provider, payment provider, AI model, or browser storage.
89
111
  2. Name the internal capability in business language. Use names such as `PaymentGateway`, `EmailSender`, `ObjectStorage`, `UserStore`, `OrderReader`, `SummaryGenerator`, or `EventPublisher`. Keep provider names such as Stripe, Prisma, SendGrid, S3, OpenAI, or Redis inside adapter implementation names.
112
+ Treat external services as processors or presenters unless the architecture explicitly accepts them as a system of record. A payment provider can process money, an email tool can send messages, a search engine can rank derived documents, and an analytics tool can visualize events, but internal code should still own the facts needed to explain customers, rights, money, files, content, and important events.
90
113
  3. Design the port from the consumer's need, not from the provider's API.
91
114
  - Keep ports small and split unrelated reasons to change.
92
115
  - Use internal input and output types only.
93
116
  - Do not include SDK types, ORM model types, HTTP request objects, provider response objects, or provider error classes.
117
+ - For survival-path providers, define the internal operation first, such as create checkout, grant entitlement, store file, send transactional email, enqueue job, or generate summary. Let adapter implementations translate that operation to Stripe, Supabase, S3, Resend, OpenAI, or another provider.
118
+ - Do not build a fake "replace every vendor tomorrow" abstraction. Keep the boundary thin, but ensure provider names, dashboards, response shapes, and SDK errors do not become the language of the core use case.
119
+ - Abstract product contracts, not every technology. Prefer boundaries such as user identity, permission checks, public URLs, file objects, entitlements, usage metering, AI generation, and billing rights over broad catch-all adapters that still leak provider concepts.
94
120
  4. Build inbound adapters as translators, not business-rule containers.
95
121
  - Parse and validate external input.
96
122
  - Verify signatures, authentication evidence, request size, file constraints, and allowed URL or host rules where relevant.
97
123
  - Extract only the values needed by the use case.
98
124
  - Map use-case results back to the protocol response.
99
125
  - Keep pricing, permission decisions, state transitions, inventory policy, subscription policy, and other business rules in the application or domain layer.
126
+ - For server actions, route handlers, Web API adapters, edge functions, CLI commands, cron tasks, and worker handlers, keep framework-specific work to input parsing, trusted context creation, use-case invocation, response mapping, redirects, and cache invalidation. Move pricing, entitlement, payment, persistence orchestration, provider calls, and retry policy behind application commands or ports.
100
127
  5. Build outbound adapters as provider translators, not pass-through wrappers.
101
128
  - Create provider requests from internal input.
102
129
  - Set timeouts and retry policy where appropriate.
103
130
  - Pass idempotency keys for writes when the provider supports them.
131
+ - Use limited retries with backoff and jitter for transient failures. Do not retry malformed requests, denied authorization, or domain rejections.
132
+ - Add a circuit breaker or disabled/degraded result when repeated provider failures would otherwise make the core path keep calling a dependency that is likely to fail.
133
+ - Isolate provider capacity with a separate queue, worker pool, rate limiter, or concurrency budget when one dependency can starve unrelated work.
104
134
  - Distinguish timeout, network error, rate limit, authentication failure, authorization failure, invalid request, business rejection, provider outage, and unknown provider error.
135
+ - Distinguish known failure from unknown completion. For operations such as payment, refund, email, AI cost, or external mutation, an interrupted response can mean the provider may have acted; return or persist an `unknown` outcome that requires lookup or reconciliation before retry.
136
+ - Record the product-owned intent before harmful or expensive provider calls when the operation must be recoverable. A payment attempt, email request, AI job, search index request, geocode request, or file operation should have an internal id and safe status before the provider result becomes the only evidence.
105
137
  - Return internal `Result` values or local error types instead of throwing provider errors for expected failures.
106
138
  - For optional disabled integrations, return an honest skipped or disabled outcome, or wire a safe null object at the assembly boundary. Do not return fake provider success.
107
139
  6. Convert external data immediately at the boundary.
@@ -110,6 +142,11 @@ This skill is not just a wrapper pattern. A good adapter boundary absorbs provid
110
142
  - Represent money in integer minor units and explicit currency.
111
143
  - Convert dates and times explicitly according to the repository's time policy.
112
144
  - Copy only fields that internal code actually uses.
145
+ - For API response mapping, expose product concepts rather than table or provider structure. Stable resource ids, typed statuses, safe labels, pagination, and error codes belong at the boundary; raw rows, ORM entities, storage keys, provider ids, private URLs, and internal flags do not.
146
+ - For private file downloads, return metadata through ordinary resource responses and issue short-lived signed URLs through a separate authorized boundary when needed.
147
+ - Keep public file URLs application-owned. Raw storage provider URLs, object keys, bucket names, and CDN query parameters belong inside storage or URL adapters, not in user content, emails, API contracts, search documents, or mobile caches.
148
+ - Represent image transforms as named internal variants such as profile, card, or Open Graph versions. Let the adapter translate those variant names into provider-specific resize or format options.
149
+ - Normalize external auth tokens into an internal current-user context before application code uses them. Do not spread token claim paths, provider metadata, or provider subject ids through handlers and domain logic.
113
150
  7. Separate mappers when translation grows.
114
151
  - Split request mapping, response mapping, error mapping, and fixture builders once they become non-trivial or repeated.
115
152
  - Keep provider-version differences inside adapter or mapper files.
@@ -118,6 +155,11 @@ This skill is not just a wrapper pattern. A good adapter boundary absorbs provid
118
155
  - Database rows are persistence shapes, not domain objects.
119
156
  - Queue messages and integration events are external envelopes until parsed and translated.
120
157
  - Cache keys, time-to-live values, invalidation rules, and stale-data policy must be explicit.
158
+ - Object-storage keys, signed URL policies, file metadata, and upload completion signals are external storage protocol details until translated into internal asset records and states.
159
+ - Search documents, ranking settings, synonym lists, and query logs are external search protocol details until translated from internal source records and search policy.
160
+ - Analytics events and email tags are external reporting or messaging details until translated from internal event and customer-state records.
161
+ - Queue messages are external envelopes until parsed into an internal command or job with schema version, idempotency key, trace context, retry state, and safe payload reference.
162
+ - Provider identifiers for payments, email, maps, search, AI, and storage are mappings. Internal orders, entitlements, emails, locations, documents, jobs, and file objects should remain product-owned resources even when the provider performs the work.
121
163
  9. Keep database transactions and external side effects separate by default.
122
164
  - Do not call external APIs inside database transactions unless a local rule explicitly justifies the risk.
123
165
  - Use explicit states, an outbox, an action ledger, or a reconciliation path when database changes and external effects must be coordinated.
@@ -126,12 +168,27 @@ This skill is not just a wrapper pattern. A good adapter boundary absorbs provid
126
168
  - Preserve the raw body or safe raw reference when needed for verification and replay.
127
169
  - Use provider event identifiers or action keys to prevent duplicate effects.
128
170
  - Translate external event types into internal commands or events before calling the use case.
171
+ - Acknowledge inbound webhooks quickly after validation and durable receipt when provider retry behavior can amplify slow processing. Move state updates, email, AI, analytics, and other follow-up work to worker commands unless the provider contract requires inline handling.
172
+ - Store processed event identifiers, and when a provider can create semantically duplicate events with different event ids, dedupe on a normalized object id plus event type as well.
173
+ - Keep the webhook receipt separate from the follow-up outcome. Payment state reconciliation, email bounce handling, entitlement grants, search indexing, and AI job completion should be replayable without trusting that the first handler invocation finished every side effect.
129
174
  11. Keep AI model boundaries explicit.
130
175
  - Keep provider request format, model name, temperature, token limits, safety settings, and raw response parsing inside adapter or configuration code.
131
- - Validate structured output before returning it.
176
+ - Route production AI calls through one application-owned client, gateway, or facade before reaching provider SDKs. Scattered direct SDK calls make cost attribution, redaction, rate limiting, and retries unreliable.
177
+ - Require internal request metadata such as account or workspace id, feature key, model key, user request id, idempotency key when relevant, and safe correlation id before making cost-bearing calls.
178
+ - Record provider-call metadata separately from user request metadata so retries, fallbacks, embeddings, tool calls, reranking, image or audio calls, and evaluations can be reconciled without double-counting the user's action.
179
+ - Capture token usage, cached input usage when available, latency, provider request id, model, status, pricing snapshot, and integer cost unit after the provider response or failure.
180
+ - Classify AI caches as app response cache, provider prompt cache, embedding cache, or search-result cache. Store cache key hashes or safe identifiers, not raw prompts or confidential user content.
181
+ - Apply plan, request-size, model-tier, token, request-count, and cost limits before the provider call where possible; update actual usage after the call.
182
+ - Treat provider budgets and rate limits as secondary guardrails unless the provider is proven to enforce a hard stop before cost. Product-owned preflight policy should decide allow, block, downgrade, or queue before the provider call.
183
+ - Enforce agent-specific caps such as maximum steps, tool calls, total tokens, total cost, and timeout before running autonomous or multi-call AI work.
184
+ - Validate structured output before returning it.
132
185
  - Return internal purpose-level outputs such as summaries, classifications, recommendations, or extracted fields.
133
186
  12. Make observability safe and useful.
134
187
  - Log adapter name, provider, operation, correlation id, safe idempotency-key hash, provider request id, duration, retry count, outcome, and local error kind when available.
188
+ - Treat observability as an identifier-flow boundary, not a vendor choice. Preserve request id, trace id, span id, user or anonymous id, tenant or organization id, job run id, webhook event id, and event schema version across HTTP, queues, workers, cron, webhooks, and external calls where the operation needs end-to-end diagnosis.
189
+ - Prefer standard propagation shapes such as trace context at protocol edges when the project uses distributed tracing, but keep application code behind a neutral telemetry boundary so the logging, tracing, metrics, or error backend can be replaced.
190
+ - Keep baggage or propagated context minimal. Do not put email, names, JWTs, session ids, access tokens, payment customer ids, raw provider ids, file names, prompt text, or confidential document text into headers, logs, traces, metrics, or telemetry attributes unless a narrow internal policy explicitly allows and protects it.
191
+ - For background jobs and scheduled work, create or carry a job run id and causation id so work can be connected to the request or event that created it without inventing a fake user request.
135
192
  - Do not log API keys, tokens, card data, passwords, identity numbers, raw personal data, full email bodies, full payment requests, full provider responses, or unredacted payloads.
136
193
  - Add metrics for latency, failures, retries, rate limits, duplicate handling, and ambiguous or unknown provider outcomes when the boundary is operationally important.
137
194
  13. Test at the right layer.
@@ -145,9 +202,16 @@ This skill is not just a wrapper pattern. A good adapter boundary absorbs provid
145
202
 
146
203
  - Core logic has no provider SDK imports, framework request or response objects, ORM clients, database rows, provider response objects, or provider error classes.
147
204
  - Ports are named in internal business language and expose only internal input, output, and error types.
205
+ - Provider dashboards, hosted settings, and SDK payloads do not become the only source for core business facts, search policy, queue failure policy, analytics event definitions, email customer state, or file ownership.
206
+ - Public URLs, provider identity claims, image variants, entitlement decisions, and AI policy decisions are represented as product-owned contracts before provider-specific syntax reaches callers.
207
+ - Critical external SDKs are contained behind internal use-case contracts so provider names, SDK types, and dashboard assumptions do not spread through core logic.
148
208
  - Inbound adapters validate and translate before calling use cases.
149
209
  - Outbound adapters translate internal requests, provider responses, and provider failures before returning.
150
210
  - Timeouts, retry policy, idempotency, duplicate handling, security checks, and redacted observability are explicit where the risk requires them.
211
+ - Request, trace, user, tenant, job, cron, and webhook identifier propagation is explicit where diagnostic continuity matters, and telemetry backend details do not leak into core logic.
212
+ - Circuit-breaker, bulkhead, dead-letter, and reconciliation behavior is explicit where provider failure can spread beyond the integration.
213
+ - AI model boundaries centralize provider calls, cost attribution, usage recording, pricing snapshots, cache-hit classification, plan limits, and redacted prompt or output handling when AI calls are cost-bearing.
214
+ - AI gateway boundaries enforce preflight hard limits, model fallback, agent-loop caps, provider-budget fallback assumptions, and emergency disable behavior when cost-bearing or autonomous AI work exists.
151
215
  - Tests cover core behavior through fakes and adapter behavior through mapping, error, and boundary tests.
152
216
 
153
217
  <!-- mustflow-section: verification -->
@@ -183,10 +247,14 @@ Prefer the narrowest configured test or build intent that proves the affected bo
183
247
  - Boundary classified
184
248
  - Internal port or use-case input selected
185
249
  - Provider or protocol details contained
250
+ - Public URL, identity, and provider-id details contained when relevant
186
251
  - Inbound validation and translation handled
187
252
  - Outbound request, response, and error mapping handled
188
- - Timeout, retry, idempotency, and duplicate behavior handled or explicitly deferred
253
+ - Timeout, retry, circuit-breaker, bulkhead, idempotency, duplicate, dead-letter, and reconciliation behavior handled or explicitly deferred
254
+ - AI usage, cost, pricing snapshot, cache-hit, retry grouping, plan-limit, and redacted observability behavior handled or explicitly deferred when relevant
255
+ - AI gateway preflight limit, model fallback, agent cap, and kill-switch behavior handled or explicitly deferred when relevant
189
256
  - Security and redaction surfaces checked
257
+ - Observability identifier propagation and backend portability checked when relevant
190
258
  - Tests, fixtures, fakes, or contract checks added or reused
191
259
  - Command intents run
192
260
  - Skipped checks and reasons
@@ -2,11 +2,11 @@
2
2
  mustflow_doc: skill.command-contract-authoring
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: command-contract-authoring
9
- description: Apply this skill when creating, editing, reviewing, or removing `.mustflow/config/commands.toml` command intents, resources, effects, timeouts, output limits, environment policies, lifecycle values, run policies, or command-selection metadata.
9
+ description: Apply this skill when creating, editing, reviewing, or removing `.mustflow/config/commands.toml` command intents, resources, effects, timeouts, output limits, environment policies, lifecycle values, run policies, command-selection metadata, CI/CD reproducibility surfaces, deployment handoffs, migration checks, health checks, smoke checks, or dashboard-hidden command behavior.
10
10
  metadata:
11
11
  mustflow_schema: "1"
12
12
  mustflow_kind: procedure
@@ -32,6 +32,7 @@ Keep `.mustflow/config/commands.toml` as the only runnable command-authority sur
32
32
 
33
33
  - A command intent, resource, effect, lock, lifecycle, run policy, timeout, output limit, environment policy, success code, or command selection hint is added, changed, removed, reviewed, or reported.
34
34
  - A user asks to make a test, build, lint, release, publish, deploy, benchmark, browser, watcher, server, or external tool runnable through mustflow.
35
+ - CI/CD, deployment, migration, rollback, health-check, smoke-test, or platform handoff behavior is described as a button, dashboard setting, remembered local command, or provider-specific hidden configuration.
35
36
  - A command is mentioned in docs, skills, templates, tests, or final reports as if an agent may run it.
36
37
  - A missing, blocked, manual-only, unknown, unsafe, long-running, or inferred command path needs to be represented safely.
37
38
 
@@ -49,6 +50,8 @@ Keep `.mustflow/config/commands.toml` as the only runnable command-authority sur
49
50
  - The intended command goal and whether it is verification, generation, release, diagnostics, migration, or a user-requested manual action.
50
51
  - Current `.mustflow/config/commands.toml`, relevant workflow docs, affected tests, and any template command contract copies.
51
52
  - Expected reads, writes, generated outputs, locks, network use, destructive behavior, timeout, output volume, environment needs, and stdin behavior.
53
+ - CI/CD or deployment reproducibility needs, including which build, test, migration, health, smoke, rollback, and deploy-adjacent steps must be represented as repository-owned command intents, manual-only actions, unknown capabilities, or documentation-only procedures.
54
+ - Dashboard dependency, including whether a platform stores build commands, environment variables, domains, scheduled jobs, routes, runtime version, regions, worker settings, or rollback behavior outside the repository.
52
55
  - Whether the intent should be `configured`, `manual_only`, `unknown`, or omitted.
53
56
  - Relevant verification command-intent entries for contract validation, docs, release-sensitive template output, and changed-file status.
54
57
 
@@ -72,20 +75,22 @@ Keep `.mustflow/config/commands.toml` as the only runnable command-authority sur
72
75
 
73
76
  1. Classify the intent: read-only diagnostic, verification, build or generated output, migration, release or publish, dashboard or browser flow, long-running server, destructive action, or unknown capability.
74
77
  2. Decide whether the command belongs in the contract. Prefer `manual_only` or `unknown` when the command needs human judgment, credentials, a server, a watcher, broad network access, or unbounded side effects.
75
- 3. Define the narrowest stable intent name and description. The description should explain the command purpose, not instruct an agent to bypass policy.
76
- 4. Declare lifecycle, run policy, stdin, timeout, success codes, output limit, working directory, network and destructive flags, and environment policy explicitly.
77
- 5. Model side effects before execution. Use resources and effects for generated output, writes, deletes, exclusive locks, shared reads, and non-overlap requirements.
78
- 6. Check long-running and background risks. If the operation starts a server, watcher, browser, queue worker, or daemon, require a bounded wrapper that starts, tests, and stops within one configured one-shot intent, or leave it unavailable.
79
- 7. Check environment exposure. Prefer minimal or allowlisted environment values; do not pass tokens, cloud credentials, or user secrets by default.
80
- 8. Keep command selection metadata non-authoritative. `required_after`, coverage hints, cost hints, and verification preferences may guide choice, but only configured eligible intents can be run.
81
- 9. Synchronize all surfaces that name the intent: skills, workflow docs, templates, tests, public docs, and schema fixtures.
82
- 10. Verify with the narrowest configured command intents that validate contract syntax, template output, release-sensitive package contents, and changed-file status.
78
+ 3. For CI/CD and platform portability, distinguish execution from authority. A hosted platform button may trigger the process, but the repository should still name the build, test, migration, health-check, smoke-check, environment, and rollback expectations as command intents, manual-only entries, unknown capabilities, or operations docs.
79
+ 4. Define the narrowest stable intent name and description. The description should explain the command purpose, not instruct an agent to bypass policy.
80
+ 5. Declare lifecycle, run policy, stdin, timeout, success codes, output limit, working directory, network and destructive flags, and environment policy explicitly.
81
+ 6. Model side effects before execution. Use resources and effects for generated output, writes, deletes, exclusive locks, shared reads, and non-overlap requirements.
82
+ 7. Check long-running and background risks. If the operation starts a server, watcher, browser, queue worker, or daemon, require a bounded wrapper that starts, tests, and stops within one configured one-shot intent, or leave it unavailable.
83
+ 8. Check environment exposure. Prefer minimal or allowlisted environment values; do not pass tokens, cloud credentials, or user secrets by default. If a command depends on environment variables, ensure the contract or synchronized docs identify the variable names and validation boundary without storing values.
84
+ 9. Keep command selection metadata non-authoritative. `required_after`, coverage hints, cost hints, and verification preferences may guide choice, but only configured eligible intents can be run.
85
+ 10. Synchronize all surfaces that name the intent: skills, workflow docs, templates, tests, public docs, operations docs, and schema fixtures.
86
+ 11. Verify with the narrowest configured command intents that validate contract syntax, template output, release-sensitive package contents, and changed-file status.
83
87
 
84
88
  <!-- mustflow-section: postconditions -->
85
89
  ## Postconditions
86
90
 
87
91
  - Every runnable intent is configured, one-shot, agent-allowed, closed-stdin, bounded by timeout and output limits, and explicit about side effects.
88
92
  - Manual-only and unknown capabilities are visible without granting permission.
93
+ - Build, test, migration, health-check, smoke-check, deployment handoff, and rollback expectations are not hidden only in dashboard memory when they affect reproducibility.
89
94
  - The final report names any missing, manual-only, or intentionally unavailable command path.
90
95
 
91
96
  <!-- mustflow-section: verification -->
@@ -115,6 +120,7 @@ Use narrower related tests when the command contract is covered by a specific te
115
120
  - Command intents or resources changed
116
121
  - Authority decision: configured, manual-only, unknown, omitted, or deferred
117
122
  - Side effects, locks, timeout, output, stdin, environment, network, and destructive boundaries
123
+ - CI/CD reproducibility, dashboard dependency, health-check, smoke-check, migration, deployment handoff, and rollback boundaries
118
124
  - Synchronized docs, tests, templates, and schemas
119
125
  - Command intents run
120
126
  - Skipped checks and reasons