mustflow 2.23.0 → 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/README.md +12 -2
- package/dist/cli/commands/adapters.js +11 -9
- package/dist/cli/commands/api.js +263 -113
- package/dist/cli/commands/check.js +11 -7
- package/dist/cli/commands/classify.js +16 -42
- package/dist/cli/commands/context.js +18 -31
- package/dist/cli/commands/contract-lint.js +12 -7
- package/dist/cli/commands/dashboard.js +65 -114
- package/dist/cli/commands/docs.js +43 -26
- package/dist/cli/commands/doctor.js +11 -7
- package/dist/cli/commands/evidence.js +642 -0
- package/dist/cli/commands/explain-verify.js +1 -59
- package/dist/cli/commands/explain.js +84 -36
- package/dist/cli/commands/handoff.js +13 -17
- package/dist/cli/commands/impact.js +14 -20
- package/dist/cli/commands/index.js +15 -9
- package/dist/cli/commands/init.js +56 -70
- package/dist/cli/commands/line-endings.js +15 -9
- package/dist/cli/commands/map.js +30 -42
- package/dist/cli/commands/next.js +300 -0
- package/dist/cli/commands/onboard.js +136 -0
- package/dist/cli/commands/run.js +47 -42
- package/dist/cli/commands/search.js +43 -69
- package/dist/cli/commands/status.js +9 -6
- package/dist/cli/commands/update.js +16 -10
- package/dist/cli/commands/upgrade.js +9 -6
- package/dist/cli/commands/verify/args.js +55 -249
- package/dist/cli/commands/verify.js +2 -1
- package/dist/cli/commands/version-sources.js +9 -6
- package/dist/cli/commands/version.js +9 -6
- package/dist/cli/commands/workspace.js +564 -0
- package/dist/cli/i18n/en.js +60 -1
- package/dist/cli/i18n/es.js +60 -1
- package/dist/cli/i18n/fr.js +60 -1
- package/dist/cli/i18n/hi.js +60 -1
- package/dist/cli/i18n/ko.js +60 -1
- package/dist/cli/i18n/zh.js +60 -1
- package/dist/cli/index.js +28 -25
- package/dist/cli/lib/agent-context.js +8 -9
- package/dist/cli/lib/command-registry.js +24 -0
- package/dist/cli/lib/dashboard-html/client-script.js +1 -1
- package/dist/cli/lib/local-index/database-path.js +5 -0
- package/dist/cli/lib/local-index/database-read.js +88 -0
- package/dist/cli/lib/local-index/effect-graph-read-model.js +112 -0
- package/dist/cli/lib/local-index/freshness.js +60 -0
- package/dist/cli/lib/local-index/index.js +12 -1866
- package/dist/cli/lib/local-index/path-surface-read-model.js +134 -0
- package/dist/cli/lib/local-index/populate.js +474 -0
- package/dist/cli/lib/local-index/schema.js +413 -0
- package/dist/cli/lib/local-index/search-read-model.js +533 -0
- package/dist/cli/lib/local-index/search-text.js +79 -0
- package/dist/cli/lib/option-parser.js +93 -0
- package/dist/cli/lib/repo-map.js +2 -2
- package/dist/cli/lib/run-plan.js +5 -22
- package/dist/core/change-verification.js +11 -5
- package/dist/core/command-effects.js +1 -3
- package/dist/core/command-intent-eligibility.js +14 -0
- package/dist/core/command-preconditions.js +8 -4
- package/dist/core/command-run-constraints.js +43 -0
- package/dist/core/public-json-contracts.js +57 -0
- package/dist/core/test-selection.js +8 -2
- package/dist/core/verification-plan.js +32 -4
- package/package.json +1 -1
- package/schemas/README.md +16 -0
- package/schemas/api-serve-response.schema.json +89 -0
- package/schemas/change-verification-report.schema.json +4 -1
- package/schemas/contract-lint-report.schema.json +1 -0
- package/schemas/evidence-report.schema.json +287 -0
- package/schemas/explain-report.schema.json +4 -0
- package/schemas/next-report.schema.json +121 -0
- package/schemas/onboard-commands-report.schema.json +100 -0
- package/schemas/workspace-command-catalog.schema.json +172 -0
- package/schemas/workspace-status.schema.json +141 -0
- package/schemas/workspace-verification-plan.schema.json +195 -0
- package/templates/default/i18n.toml +1 -1
- package/templates/default/locales/en/.mustflow/skills/INDEX.md +2 -1
- package/templates/default/locales/en/.mustflow/skills/clarifying-question-gate/SKILL.md +183 -0
- package/templates/default/locales/en/.mustflow/skills/routes.toml +7 -1
- package/templates/default/locales/en/.mustflow/skills/structure-discovery-gate/SKILL.md +63 -20
- package/templates/default/manifest.toml +8 -1
|
@@ -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:
|
|
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.
|
|
139
|
-
|
|
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
|
-
|
|
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
|
-
|
|
203
|
-
|
|
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
|
-
|
|
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
|
-
|
|
277
|
-
|
|
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
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
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.
|
|
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",
|