mustflow 2.24.2 → 2.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mustflow",
3
- "version": "2.24.2",
3
+ "version": "2.25.0",
4
4
  "description": "Agent workflow documents and CLI for mustflow repository roots.",
5
5
  "type": "module",
6
6
  "license": "MIT-0",
@@ -409,7 +409,7 @@ translations = {}
409
409
  [documents."skill.structure-discovery-gate"]
410
410
  source = "locales/en/.mustflow/skills/structure-discovery-gate/SKILL.md"
411
411
  source_locale = "en"
412
- revision = 27
412
+ revision = 28
413
413
  translations = {}
414
414
 
415
415
  [documents."skill.state-machine-pattern"]
@@ -98,6 +98,7 @@ routes. Event routes stay inactive until their event occurs.
98
98
  | --- | --- | --- | --- | --- | --- | --- |
99
99
  | Code changes need review before report | `.mustflow/skills/code-review/SKILL.md` | Diff and task goal | Changed files | behavior and regression | `test`, `test_related`, `test_audit`, `lint` | Findings or no-issue note |
100
100
  | An unfamiliar codebase area needs an evidence-based map before planning, implementation, or reporting | `.mustflow/skills/codebase-orientation/SKILL.md` | User request, target area, relevant instructions, and current source, test, schema, template, configuration, or documentation files | Read-only orientation notes and any smallest follow-up edit chosen from inspected evidence | stale documentation, wrong ownership boundary, or invented architecture claim | `changes_status`, `changes_diff_summary`, `mustflow_check` | Scope inspected, entrypoints, flow map, ownership boundaries, verification options, risks, unknowns, and smallest safe next step |
101
+ | A coding task has missing intent, scope, domain, data, security, UX, dependency, architecture, or verification decisions that cannot be safely inferred from repository evidence | `.mustflow/skills/clarifying-question-gate/SKILL.md` | User request, inspected repository evidence, unresolved decisions, reversibility classification, recommended option, and tradeoffs | Blocking questions, safe assumptions, and the smallest safe implementation boundary | over-questioning, lazy questions, expensive wrong assumptions, user-owned decision drift, data loss, auth bypass, public-contract drift, dependency bloat, or unverifiable completion | `changes_status`, `changes_diff_summary`, `mustflow_check` | Repository evidence inspected, blocking questions with recommendations, safe assumptions, selected scope, verification, and remaining ambiguity |
101
102
  | HTTP, REST, GraphQL, tRPC, Hono RPC, Elysia Eden, gRPC, protobuf, OpenAPI, request/response schema, status code, header, error envelope, pagination, filtering, sorting, search, generated client, SDK, mock, fixture, or API docs contract is created or changed | `.mustflow/skills/api-contract-change/SKILL.md` | API style, contract source of truth, changed operations, request and response schemas, status and headers, error envelope, auth and permission behavior, pagination/filter/sort/search semantics, generated clients, SDKs, mocks, fixtures, callers, docs, and command contract entries | Routes, handlers, resolvers, validators, schemas, generated clients, SDKs, mocks, fixtures, docs, tests, and directly synchronized examples | route-only change, schema drift, generated-client breakage, hidden breaking change, status or error drift, pagination/search semantic drift, auth/permission drift, or stale docs examples | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `test_release`, `mustflow_check` | API contract source, changed operations, compatibility classification, synchronized client/schema/docs/tests surfaces, verification, and remaining API contract risk |
102
103
  | TypeScript source, declarations, tsconfig, package exports, module resolution, public API, or TypeScript tests are created or changed | `.mustflow/skills/typescript-code-change/SKILL.md` | TypeScript config, package entry metadata, target runtime, changed files, and command contract entries | TypeScript source, declarations, compiler config, exports, tests, and directly synchronized docs | weakened type safety, module drift, public API drift, or unverified declaration output | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `mustflow_check` | Runtime, module, type, and public API boundary checked, changes made, verification, and remaining TypeScript risk |
103
104
  | JavaScript source, module format, package entry, browser or Node runtime, dependency usage, Promise handling, bundler config, or JavaScript tests are created or changed | `.mustflow/skills/javascript-code-change/SKILL.md` | Package metadata, module system, runtime target, entrypoints, changed files, and command contract entries | JavaScript source, package exports, bundler config, dependencies, tests, and docs examples | runtime API leakage, ESM/CJS drift, discarded Promise, dependency bloat, or broken package entry | `changes_status`, `changes_diff_summary`, `lint`, `build`, `test_related`, `test`, `docs_validate_fast`, `mustflow_check` | Runtime and module boundary checked, async and dependency notes, verification, and remaining JavaScript risk |
@@ -110,7 +111,7 @@ routes. Event routes stay inactive until their event occurs.
110
111
  | 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 |
111
112
  | 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 |
112
113
  | CLI execution duration, build time, bundle size, test scheduling logic, process spawning, or CLI performance claims are planned, edited, or reported | `.mustflow/skills/performance-budget-check/SKILL.md` | Performance surface, budget source, measurement method, and baseline metrics | Budget checks, CLI duration, bundle weight, scheduling optimization notes, measurements, and tests | invented budgets, stale measurements, child-process bottlenecks, or unverified speed claims | `changes_status`, `changes_diff_summary`, `build`, `test_related`, `docs_validate_fast`, `test_release`, `mustflow_check` | Performance surface, budget source, measurements, execution duration, bundle size, and remaining risks |
113
- | 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 |
114
+ | New feature, ambiguous or complex design request, pre-implementation design gate, 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, design gate classification, restated requirement, success criteria, non-goals, compatibility boundaries, 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` | Design gate classification, restated requirement, success criteria, blocking questions, recommended defaults, 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 |
114
115
 
115
116
  ### Tests and Regression
116
117
 
@@ -0,0 +1,183 @@
1
+ ---
2
+ mustflow_doc: skill.clarifying-question-gate
3
+ locale: en
4
+ canonical: true
5
+ revision: 1
6
+ lifecycle: mustflow-owned
7
+ authority: procedure
8
+ name: clarifying-question-gate
9
+ description: Apply this skill when a coding task has missing intent, scope, domain, data, security, UX, dependency, architecture, or verification decisions that cannot be safely inferred from current repository evidence.
10
+ metadata:
11
+ mustflow_schema: "1"
12
+ mustflow_kind: procedure
13
+ pack_id: mustflow.core
14
+ skill_id: mustflow.core.clarifying-question-gate
15
+ command_intents:
16
+ - changes_status
17
+ - changes_diff_summary
18
+ - mustflow_check
19
+ ---
20
+
21
+ # Clarifying Question Gate
22
+
23
+ <!-- mustflow-section: purpose -->
24
+ ## Purpose
25
+
26
+ Ask only the questions that protect the work from expensive wrong assumptions.
27
+
28
+ Good agent work is not maximally autonomous and not maximally interrogative. It moves forward on
29
+ cheap, reversible, repository-evident decisions, and stops before choices that are costly to undo or
30
+ whose correct answer belongs to the user, product owner, security owner, or operations owner.
31
+
32
+ <!-- mustflow-section: use-when -->
33
+ ## Use When
34
+
35
+ - The user asks for implementation, debugging, refactoring, UI, data, API, release, or workflow work
36
+ but the success criteria are not observable from the request or repository evidence.
37
+ - The task may affect existing users, existing data, migrations, deletion, retention, auth,
38
+ authorization, billing, entitlements, files, secrets, external APIs, public CLI/API output,
39
+ user-visible UX policy, package dependencies, architecture, performance tradeoffs, or verification
40
+ expectations.
41
+ - The task uses ambiguous domain words such as user, account, team, workspace, project, active,
42
+ complete, canceled, subscription, admin, owner, archived, deleted, invite, or verified.
43
+ - Several implementation scopes are plausible and differ in cost, compatibility, risk, or future
44
+ maintenance burden.
45
+ - You are about to add a new dependency, service, folder boundary, storage model, framework pattern,
46
+ persistent state, or broad refactor that the current files do not already require.
47
+
48
+ <!-- mustflow-section: do-not-use-when -->
49
+ ## Do Not Use When
50
+
51
+ - The answer is available by reading current files, tests, docs, config, or local patterns.
52
+ - The change is small, local, reversible, and covered by an existing pattern or focused test.
53
+ - The task is analysis-only and does not need an implementation decision.
54
+ - A more specific skill already requires a blocking question for the same risk and covers the whole
55
+ decision, such as `structure-discovery-gate`, `auth-permission-change`, `database-migration-change`,
56
+ `dependency-upgrade-review`, or `release-publish-change`.
57
+ - Asking would only delegate ordinary engineering responsibility, such as "should I add tests?",
58
+ "should I handle errors?", "what stack is this?", or "what style should I use?" when the repository
59
+ already answers it.
60
+
61
+ <!-- mustflow-section: required-inputs -->
62
+ ## Required Inputs
63
+
64
+ - User request and any stated success criteria, constraints, examples, deadlines, or non-goals.
65
+ - Relevant repository evidence: current files, tests, schemas, command contracts, docs, context,
66
+ nearby code patterns, and existing verification options.
67
+ - Candidate decisions that are still ambiguous after reading local evidence.
68
+ - Reversibility classification for each decision: cheap/reversible, moderate, or expensive/hard to
69
+ roll back.
70
+ - A recommended option for each blocking question, with the tradeoff of at least one alternative.
71
+
72
+ <!-- mustflow-section: preconditions -->
73
+ ## Preconditions
74
+
75
+ - The task matches the Use When conditions and does not match the Do Not Use When exclusions.
76
+ - Repository evidence has been inspected before asking. Do not ask the user to answer facts that the
77
+ codebase can answer.
78
+ - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current
79
+ scope.
80
+ - Questions are limited to decisions that block safe implementation, not curiosity, preference
81
+ collection, or broad product discovery.
82
+
83
+ <!-- mustflow-section: allowed-edits -->
84
+ ## Allowed Edits
85
+
86
+ - No edits are required when the skill only gates a blocking decision.
87
+ - When proceeding under a safe assumption, keep the implementation small enough that a wrong
88
+ assumption can be corrected locally.
89
+ - Do not add dependencies, migrations, persistent data changes, permission policy, deletion behavior,
90
+ public contract changes, or broad refactors while a blocking question remains unanswered.
91
+ - Do not create speculative specs, roadmaps, or documentation unless the user requested that artifact
92
+ or another selected skill authorizes that scope.
93
+
94
+ <!-- mustflow-section: procedure -->
95
+ ## Procedure
96
+
97
+ 1. Read enough local evidence to avoid lazy questions:
98
+ - current feature code, nearby tests, schemas, docs, command contracts, and context files when
99
+ relevant;
100
+ - existing UI, API, data, auth, dependency, and verification patterns before proposing a new one.
101
+ 2. Identify the decisions still unresolved after that evidence.
102
+ 3. Classify each unresolved decision:
103
+ - `repository_answerable`: inspect more local evidence instead of asking;
104
+ - `safe_assumption`: choose the smallest reversible option and state the assumption before or while
105
+ working;
106
+ - `blocking_question`: stop before implementation because the wrong choice would be expensive,
107
+ user-visible, security-sensitive, data-affecting, dependency-affecting, or hard to roll back.
108
+ 4. Ask about observable completion before feature shape when success is unclear:
109
+ - what behavior proves the task is done;
110
+ - which user path, command, test, screenshot, migration state, or registry/release state closes it.
111
+ 5. Ask about scope only when plausible scopes have different cost or risk:
112
+ - minimal symptom fix, root-cause fix, or broader cleanup;
113
+ - prototype, maintainable production path, or release-ready path.
114
+ 6. Ask about existing users and data before changing persistence, lifecycle, deletion, migration,
115
+ retention, cache, API compatibility, or old-client behavior.
116
+ 7. Ask about failure UX before implementing user-visible success flows where failure handling is a
117
+ product decision: retry, queue, message, audit/log-only, rollback, partial success, or manual
118
+ recovery.
119
+ 8. Ask about security and authorization before relying on UI hiding, client-side checks, roles,
120
+ invites, team boundaries, file access, billing state, or admin features.
121
+ 9. Ask before adding or swapping dependencies, services, queues, databases, auth providers, design
122
+ systems, state managers, or major folder boundaries.
123
+ 10. Ask about verification when there is no declared command intent or when the user expects a
124
+ specific proof beyond the repository's configured checks.
125
+ 11. Keep the question set short:
126
+ - ask at most three questions at once;
127
+ - each question must name the decision, the recommended choice, the consequence of that choice,
128
+ and one meaningful alternative;
129
+ - avoid open-ended prompts like "how should I implement this?" unless no responsible options can
130
+ be framed from repository evidence.
131
+ 12. If no blocking question remains, proceed without ceremony. State only the assumptions that matter
132
+ to review or rollback.
133
+ 13. If a blocking question remains unanswered, do not implement around it. Offer the smallest safe
134
+ non-blocked action, such as read-only analysis, a plan, a reproduction, or a narrow preparatory
135
+ refactor when another selected skill supports it.
136
+
137
+ <!-- mustflow-section: postconditions -->
138
+ ## Postconditions
139
+
140
+ - Questions are grounded in inspected repository evidence.
141
+ - The agent has not asked for facts it could read locally.
142
+ - Expensive, user-owned, security-sensitive, data-affecting, dependency-affecting, and public-contract
143
+ decisions are resolved before implementation.
144
+ - Safe assumptions are narrow, reversible, and reported.
145
+ - The final work can be judged against observable success criteria or a reported verification gap.
146
+
147
+ <!-- mustflow-section: verification -->
148
+ ## Verification
149
+
150
+ Use configured oneshot command intents when available:
151
+
152
+ - `changes_status`
153
+ - `changes_diff_summary`
154
+ - `mustflow_check`
155
+
156
+ This skill often runs before edits and may need no command execution by itself. After implementation,
157
+ run the specific configured verification intents required by the selected implementation skills.
158
+
159
+ <!-- mustflow-section: failure-handling -->
160
+ ## Failure Handling
161
+
162
+ - If the user rejects a question as unnecessary, reclassify the decision as a safe assumption only
163
+ when current evidence supports a narrow reversible path; otherwise report the unresolved risk.
164
+ - If new evidence shows the question was answered by current files, continue without asking and note
165
+ the evidence if it affects the final report.
166
+ - If a blocking question reveals a larger feature, switch to the relevant skill before editing that
167
+ new scope.
168
+ - If the task becomes over-scoped, reduce the next action to the smallest safe slice with explicit
169
+ acceptance evidence.
170
+ - If verification intent is missing, report the missing command contract instead of inventing a raw
171
+ command.
172
+
173
+ <!-- mustflow-section: output-format -->
174
+ ## Output Format
175
+
176
+ - Repository evidence inspected
177
+ - Blocking questions asked, with recommendation and tradeoff
178
+ - Safe assumptions made
179
+ - Decisions intentionally deferred
180
+ - Implementation scope selected
181
+ - Command intents run
182
+ - Skipped checks and reasons
183
+ - Remaining ambiguity or rollback risk
@@ -108,6 +108,12 @@ route_type = "primary"
108
108
  priority = 20
109
109
  applies_to_reasons = ["unknown_change", "code_change"]
110
110
 
111
+ [routes."clarifying-question-gate"]
112
+ category = "general_code"
113
+ route_type = "adjunct"
114
+ priority = 42
115
+ applies_to_reasons = ["unknown_change", "code_change", "behavior_change", "public_api_change", "security_change", "privacy_change", "data_change", "migration_change", "package_metadata_change"]
116
+
111
117
  [routes."api-contract-change"]
112
118
  category = "general_code"
113
119
  route_type = "primary"
@@ -412,7 +418,7 @@ applies_to_reasons = ["code_change"]
412
418
  category = "general_code"
413
419
  route_type = "primary"
414
420
  priority = 35
415
- applies_to_reasons = ["code_change", "unknown_change"]
421
+ applies_to_reasons = ["code_change", "unknown_change", "behavior_change", "public_api_change", "security_change", "data_change", "migration_change", "product_change"]
416
422
 
417
423
  [routes."repro-first-debug"]
418
424
  category = "bug_failure"
@@ -2,7 +2,7 @@
2
2
  mustflow_doc: skill.structure-discovery-gate
3
3
  locale: en
4
4
  canonical: true
5
- revision: 27
5
+ revision: 28
6
6
  lifecycle: mustflow-owned
7
7
  authority: procedure
8
8
  name: structure-discovery-gate
@@ -27,10 +27,18 @@ metadata:
27
27
 
28
28
  Find hidden structure decisions before coding so new files, folders, names, routing, data models, and integration boundaries reduce future change cost instead of producing a neat but brittle tree.
29
29
 
30
+ This is the pre-implementation design gate for work where the agent might otherwise shrink the user's
31
+ problem into an easy toy version. It should expose the agent's current understanding, classify the
32
+ work by risk, and stop before coding only when the next design choice can change compatibility,
33
+ data, authorization, failure behavior, scale, operations, or long-term structure.
34
+
30
35
  <!-- mustflow-section: use-when -->
31
36
  ## Use When
32
37
 
33
38
  - The task asks for a new feature, module, folder layout, architecture, scaffold, refactor, API integration, website, app flow, routing structure, data model, state model, or file split.
39
+ - The user asks for a broad or ambiguous capability and coding immediately would require guessing
40
+ success criteria, scope boundaries, users or roles, data lifecycle, failure policy, scale target,
41
+ existing conventions, non-negotiable constraints, test proof, or operational recovery behavior.
34
42
  - A named technology or service may be only an implementation choice rather than the product domain, such as AdSense, Stripe, Supabase, Firebase, Resend, SendGrid, Google Analytics, Plausible, or a CMS.
35
43
  - The request may hide costly structural decisions around localization, SEO, authentication, authorization, payments, ads, analytics, admin workflows, deployment, content management, storage, retention, or external service replacement.
36
44
  - A website, content system, marketplace, comparison site, review site, knowledge base, documentation site, or data-backed product may later need filtering, search, localization, SEO, public APIs, apps, content revisions, data verification, redirects, or cache invalidation.
@@ -78,6 +86,10 @@ Find hidden structure decisions before coding so new files, folders, names, rout
78
86
  ## Required Inputs
79
87
 
80
88
  - User request and intended product or code change.
89
+ - Design gate classification: `simple_patch`, `bounded_feature`, `structural_change`, or
90
+ `risk_change`, with a short reason for the classification.
91
+ - The agent's current understanding of the requirement in four sentences or fewer.
92
+ - Candidate success criteria, non-goals, and compatibility boundaries that could change the design.
81
93
  - Current project instructions, relevant context, and nearby implementation patterns when available.
82
94
  - Known target platform, language, framework, package, or deployment constraints.
83
95
  - Any named external services, content sources, user roles, locales, data stores, algorithms, policies, feature flags, or revenue surfaces in the request.
@@ -135,8 +147,32 @@ Find hidden structure decisions before coding so new files, folders, names, rout
135
147
  <!-- mustflow-section: procedure -->
136
148
  ## Procedure
137
149
 
138
- 1. Restate the requested change as the product capability or code responsibility, not just the named technology.
139
- 2. Identify hidden decisions that could change routing, folder names, file boundaries, data model, state ownership, environment variables, tests, deployment, SEO, localization, external integrations, or legal and policy requirements.
150
+ 1. Classify the work before designing:
151
+ - `simple_patch`: one obvious target, existing local pattern, low reversibility cost, no new
152
+ contract, data, permission, dependency, or architecture decision. Do not run a design interview;
153
+ inspect files and fix it.
154
+ - `bounded_feature`: a focused capability with a few missing product or verification decisions.
155
+ Produce a compact gate with at most five design-shaping questions.
156
+ - `structural_change`: new boundaries, data models, public contracts, workflows, services, or
157
+ cross-module responsibilities are likely. Do not edit until the design gate has a selected
158
+ implementation boundary.
159
+ - `risk_change`: the work touches database schema, auth, permissions, billing, personal data,
160
+ destructive actions, public APIs, migrations, dependencies on survival paths, external side
161
+ effects, or operational recovery. Treat editing as blocked until the risky decisions are
162
+ resolved or explicitly scoped out.
163
+ 2. Restate the requested change as the product capability or code responsibility, not just the named technology. Keep the restatement to four sentences or fewer so the user can correct an early misunderstanding quickly.
164
+ 3. Identify hidden decisions that could change routing, folder names, file boundaries, data model, state ownership, environment variables, tests, deployment, SEO, localization, external integrations, or legal and policy requirements.
165
+ Always check whether the design changes along these axes before asking:
166
+ - observable success criteria and verification proof;
167
+ - scope and non-scope, including public API, URL, schema, event, and stored-data compatibility;
168
+ - actor roles, tenant or ownership boundaries, and server-side authorization;
169
+ - data creation, state transition, deletion, retention, migration, and recovery lifecycle;
170
+ - failure mode, retry, idempotency, partial success, rollback, operator visibility, and manual recovery;
171
+ - expected scale, performance floor, pagination, indexing, caching, and queue or batch throughput;
172
+ - existing local conventions, nearby precedents, naming, error shapes, folder layout, and test style;
173
+ - constraints such as no new dependency, no migration, no public contract change, browser/runtime support, SEO, SSR, and privacy boundaries;
174
+ - tests or invariants that prove the behavior, not only happy-path examples;
175
+ - logging, metrics, audit, trace identifiers, alerts, and operational repair paths.
140
176
  For content-heavy products, treat these as structural decisions, not later feature polish:
141
177
  - Permanent identity: distinguish stable ids from titles, slugs, display names, routes, and provider ids.
142
178
  - Addressing: decide canonical URLs, locale routes, slug history, redirects, filter URLs, sitemap inclusion, `noindex`, and canonical behavior.
@@ -195,12 +231,15 @@ Find hidden structure decisions before coding so new files, folders, names, rout
195
231
  - Failure radius: decide timeout, retry, circuit-breaker, feature-flag, stale fallback, degraded mode, and resource-pool boundaries so one auxiliary dependency does not make unrelated core functions fail.
196
232
  - Operations: decide status workflow, ownership, created/updated actors, permissions, audit logs, preview needs, admin filters, analytics event identity, privacy, deletion, anonymization, retention, backup, and migration expectations before adding user or content data.
197
233
  - Interaction and monetization: decide whether accounts, anonymous identity linking, comments, moderation, reports, notifications, newsletter sends, paywalls, access levels, plans, and previews require data fields now even when the UI is deferred.
198
- 3. Classify each decision:
234
+ 4. Classify each decision:
199
235
  - Blocking: the answer can change the basic structure and cannot be safely assumed.
200
236
  - Structure-impacting: the answer changes boundaries, but a conservative default can be stated if the user does not answer.
201
237
  - Preference: the answer affects styling, wording, or minor details and should not block structure.
202
- 4. Ask at most five high-value questions before coding. Prioritize localization, authentication, authorization, payments, ads, personal data, destructive data actions, admin workflows, SEO, content storage, and external service replacement.
203
- 5. For any question not asked, state the default assumption briefly. Defaults should keep future changes possible without adding speculative layers.
238
+ 5. Ask only questions whose answers can change the design. Each question must include the decision,
239
+ why it matters, the recommended default, and how at least one alternative changes the implementation.
240
+ Do not ask about facts that current files, docs, tests, schemas, or conventions can answer.
241
+ 6. Ask at most five high-value questions before coding. Prioritize localization, authentication, authorization, payments, ads, personal data, destructive data actions, admin workflows, SEO, content storage, external service replacement, failure policy, operational recovery, and verification proof.
242
+ 7. For any question not asked, state the default assumption briefly. Defaults should keep future changes possible without adding speculative layers.
204
243
  For a content or data-product default, prefer:
205
244
  - Stable internal ids plus mutable slugs.
206
245
  - Explicit lifecycle states and delete alternatives, such as archive, private, redirect, gone, and soft delete, before adding a destructive remove path.
@@ -254,7 +293,7 @@ Find hidden structure decisions before coding so new files, folders, names, rout
254
293
  - Operations-as-code-lite before infrastructure-as-code: even without Terraform or OpenTofu, require an environment schema, secret inventory, domain notes, cron definitions, deployment steps, observability notes, and smoke-test expectations when the platform can become a hidden source of truth.
255
294
  - Domain-shaped API responses over screen-shaped payloads; screen-specific endpoints are acceptable when labeled internal and still expose resources, states, errors, and pagination rather than card titles, button text, or storage implementation details.
256
295
  Do not add full implementations of these surfaces unless the task needs them now.
257
- 6. Select structure patterns only when the task's risk shape requires them:
296
+ 8. Select structure patterns only when the task's risk shape requires them:
258
297
  - Use a plan/apply gate for destructive, bulk, migration, billing, permission, publishing, or external-send operations that need review before execution.
259
298
  - Use a capability object when a function should require a specific granted action instead of reading broad user or role state.
260
299
  - Use Result and Option values for expected business failures, meaningful absence, not found, invalid input, denied access, stale state, or blocked policy. Use `result-option` before editing that return-shape contract.
@@ -273,23 +312,23 @@ Find hidden structure decisions before coding so new files, folders, names, rout
273
312
  - Inject time or a time context when expiration, scheduling, retries, leases, or rate windows affect behavior.
274
313
  - Use explicit state transitions when three or more states have meaningful allowed moves.
275
314
  - Use an action ledger or idempotency key when repeating a side effect would be harmful.
276
- 7. Prefer the smallest local version of the selected pattern. Do not add a framework, base class, service locator, global event bus, broad repository layer, or abstract factory when a plain function, table, adapter, or narrow policy object is enough.
277
- 8. Separate product domains from vendor implementations. Use broad names at the product boundary and specific names inside provider or adapter internals.
315
+ 9. Prefer the smallest local version of the selected pattern. Do not add a framework, base class, service locator, global event bus, broad repository layer, or abstract factory when a plain function, table, adapter, or narrow policy object is enough.
316
+ 10. Separate product domains from vendor implementations. Use broad names at the product boundary and specific names inside provider or adapter internals.
278
317
  - Prefer `monetization/ads/providers/adsense` over top-level `adsense`.
279
318
  - Prefer `payments/providers/stripe` over top-level `stripe`.
280
319
  - Prefer `notifications/email/providers/resend` over top-level `resend`.
281
320
  - Prefer `analytics/providers/google-analytics` over top-level `googleAnalytics`.
282
- 9. Propose the smallest folder and file structure that follows the answers and assumptions. For each new file or folder, state its responsibility and what it must not contain.
283
- 10. Check the structure against local precedent with `pattern-scout` when the repository already has a nearby pattern.
284
- 11. If the selected structure changes expected failure, meaningful absence, thrown business errors, null returns, or public error mapping, use `result-option` before editing that scope.
285
- 12. If the selected structure creates or repairs a state-changing execution unit, use `command-pattern` before editing that scope.
286
- 13. If the selected structure introduces or repairs lifecycle state transitions, use `state-machine-pattern` before editing that scope.
287
- 14. If the selected structure introduces interchangeable algorithms, policies, calculations, provider choices, or feature-flag variants, use `strategy-pattern` before editing that scope.
288
- 15. If the selected structure introduces one high-level entry point over several subsystem collaborators, use `facade-pattern` before editing that scope.
289
- 16. If the selected structure separates business decisions from execution, use `pure-core-imperative-shell` before editing that scope.
290
- 17. If the selected structure introduces inheritance, base classes, protected state, or subclass variants, use `composition-over-inheritance` before editing that scope.
291
- 18. If the selected structure introduces or repairs an external dependency boundary, use `dependency-injection` for construction and collaborator flow, and `adapter-boundary` for external data, protocol, error, timeout, retry, idempotency, security, and observability handling.
292
- 19. Implement only after the questions, assumptions, structure, dependency direction, and verification surface are clear enough for the task size.
321
+ 11. Propose the smallest folder and file structure that follows the answers and assumptions. For each new file or folder, state its responsibility and what it must not contain.
322
+ 12. Check the structure against local precedent with `pattern-scout` when the repository already has a nearby pattern.
323
+ 13. If the selected structure changes expected failure, meaningful absence, thrown business errors, null returns, or public error mapping, use `result-option` before editing that scope.
324
+ 14. If the selected structure creates or repairs a state-changing execution unit, use `command-pattern` before editing that scope.
325
+ 15. If the selected structure introduces or repairs lifecycle state transitions, use `state-machine-pattern` before editing that scope.
326
+ 16. If the selected structure introduces interchangeable algorithms, policies, calculations, provider choices, or feature-flag variants, use `strategy-pattern` before editing that scope.
327
+ 17. If the selected structure introduces one high-level entry point over several subsystem collaborators, use `facade-pattern` before editing that scope.
328
+ 18. If the selected structure separates business decisions from execution, use `pure-core-imperative-shell` before editing that scope.
329
+ 19. If the selected structure introduces inheritance, base classes, protected state, or subclass variants, use `composition-over-inheritance` before editing that scope.
330
+ 20. If the selected structure introduces or repairs an external dependency boundary, use `dependency-injection` for construction and collaborator flow, and `adapter-boundary` for external data, protocol, error, timeout, retry, idempotency, security, and observability handling.
331
+ 21. Implement only after the questions, assumptions, structure, dependency direction, and verification surface are clear enough for the task size.
293
332
 
294
333
  <!-- mustflow-section: postconditions -->
295
334
  ## Postconditions
@@ -337,8 +376,12 @@ Also run narrower configured tests or builds required by the changed source, tem
337
376
  <!-- mustflow-section: output-format -->
338
377
  ## Output Format
339
378
 
379
+ - Design gate classification and reason
380
+ - Restated requirement in four sentences or fewer
340
381
  - Capability or responsibility being built
341
382
  - Blocking questions asked, or none
383
+ - Recommended defaults and tradeoffs for each blocking question
384
+ - Success criteria, non-goals, and compatibility boundaries
342
385
  - Structure-impacting assumptions
343
386
  - Proposed files and responsibilities
344
387
  - Upfront structure decisions versus deferred features
@@ -1,6 +1,6 @@
1
1
  id = "default"
2
2
  name = "default"
3
- version = "2.24.2"
3
+ version = "2.25.0"
4
4
  description = "Minimal workflow for LLM agents to read, edit, and verify their work in a repository."
5
5
  common_root = "common"
6
6
  locales_root = "locales"
@@ -19,6 +19,7 @@ creates = [
19
19
  ".mustflow/skills/behavior-preserving-refactor/SKILL.md",
20
20
  ".mustflow/skills/code-review/SKILL.md",
21
21
  ".mustflow/skills/codebase-orientation/SKILL.md",
22
+ ".mustflow/skills/clarifying-question-gate/SKILL.md",
22
23
  ".mustflow/skills/astro-code-change/SKILL.md",
23
24
  ".mustflow/skills/css-code-change/SKILL.md",
24
25
  ".mustflow/skills/dart-code-change/SKILL.md",
@@ -124,6 +125,7 @@ minimal = [
124
125
  "behavior-preserving-refactor",
125
126
  "code-review",
126
127
  "codebase-orientation",
128
+ "clarifying-question-gate",
127
129
  "astro-code-change",
128
130
  "css-code-change",
129
131
  "dart-code-change",
@@ -175,6 +177,7 @@ patterns = [
175
177
  "behavior-preserving-refactor",
176
178
  "code-review",
177
179
  "codebase-orientation",
180
+ "clarifying-question-gate",
178
181
  "astro-code-change",
179
182
  "css-code-change",
180
183
  "dart-code-change",
@@ -237,6 +240,7 @@ oss = [
237
240
  "behavior-preserving-refactor",
238
241
  "code-review",
239
242
  "codebase-orientation",
243
+ "clarifying-question-gate",
240
244
  "astro-code-change",
241
245
  "css-code-change",
242
246
  "dart-code-change",
@@ -311,6 +315,7 @@ team = [
311
315
  "behavior-preserving-refactor",
312
316
  "code-review",
313
317
  "codebase-orientation",
318
+ "clarifying-question-gate",
314
319
  "astro-code-change",
315
320
  "css-code-change",
316
321
  "dart-code-change",
@@ -373,6 +378,7 @@ product = [
373
378
  "behavior-preserving-refactor",
374
379
  "code-review",
375
380
  "codebase-orientation",
381
+ "clarifying-question-gate",
376
382
  "astro-code-change",
377
383
  "css-code-change",
378
384
  "dart-code-change",
@@ -440,6 +446,7 @@ library = [
440
446
  "behavior-preserving-refactor",
441
447
  "code-review",
442
448
  "codebase-orientation",
449
+ "clarifying-question-gate",
443
450
  "astro-code-change",
444
451
  "css-code-change",
445
452
  "dart-code-change",