mustflow 2.107.3 → 2.108.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.
Files changed (42) hide show
  1. package/README.md +1 -0
  2. package/dist/cli/commands/init.js +49 -1
  3. package/dist/cli/commands/run/execution.js +7 -0
  4. package/dist/cli/commands/run/executor.js +7 -0
  5. package/dist/cli/commands/verify.js +14 -0
  6. package/dist/cli/commands/workspace.js +106 -16
  7. package/dist/cli/i18n/en.js +6 -1
  8. package/dist/cli/i18n/es.js +6 -1
  9. package/dist/cli/i18n/fr.js +6 -1
  10. package/dist/cli/i18n/hi.js +6 -1
  11. package/dist/cli/i18n/ko.js +6 -1
  12. package/dist/cli/i18n/zh.js +6 -1
  13. package/dist/cli/index.js +8 -0
  14. package/dist/cli/lib/agent-context.js +7 -0
  15. package/dist/cli/lib/repo-map.js +14 -0
  16. package/dist/cli/lib/run-plan.js +7 -0
  17. package/dist/core/change-verification.js +7 -0
  18. package/dist/core/verification-scheduler.js +7 -0
  19. package/package.json +1 -1
  20. package/schemas/README.md +3 -3
  21. package/schemas/workspace-status.schema.json +4 -2
  22. package/templates/default/common/.mustflow/config/mustflow.toml +3 -3
  23. package/templates/default/i18n.toml +61 -7
  24. package/templates/default/locales/en/.mustflow/docs/agent-workflow.md +24 -1
  25. package/templates/default/locales/en/.mustflow/skills/INDEX.md +51 -5
  26. package/templates/default/locales/en/.mustflow/skills/admin-control-plane-safety-review/SKILL.md +200 -0
  27. package/templates/default/locales/en/.mustflow/skills/ai-product-readiness-review/SKILL.md +158 -0
  28. package/templates/default/locales/en/.mustflow/skills/auth-permission-change/SKILL.md +91 -28
  29. package/templates/default/locales/en/.mustflow/skills/browser-automation-reliability-review/SKILL.md +279 -0
  30. package/templates/default/locales/en/.mustflow/skills/cli-option-contract-review/SKILL.md +147 -0
  31. package/templates/default/locales/en/.mustflow/skills/database-change-safety/SKILL.md +21 -2
  32. package/templates/default/locales/en/.mustflow/skills/database-migration-change/SKILL.md +25 -7
  33. package/templates/default/locales/en/.mustflow/skills/deployment-rollout-safety-review/SKILL.md +117 -43
  34. package/templates/default/locales/en/.mustflow/skills/frontend-component-library-review/SKILL.md +299 -0
  35. package/templates/default/locales/en/.mustflow/skills/frontend-localization-review/SKILL.md +128 -36
  36. package/templates/default/locales/en/.mustflow/skills/notification-delivery-integrity-review/SKILL.md +226 -0
  37. package/templates/default/locales/en/.mustflow/skills/payment-integrity-review/SKILL.md +34 -14
  38. package/templates/default/locales/en/.mustflow/skills/routes.toml +54 -0
  39. package/templates/default/locales/en/.mustflow/skills/small-service-platform-architecture-review/SKILL.md +273 -0
  40. package/templates/default/locales/en/.mustflow/skills/third-party-api-integration-review/SKILL.md +188 -0
  41. package/templates/default/locales/en/.mustflow/skills/website-task-friction-review/SKILL.md +139 -0
  42. package/templates/default/manifest.toml +60 -1
@@ -0,0 +1,299 @@
1
+ ---
2
+ mustflow_doc: skill.frontend-component-library-review
3
+ locale: en
4
+ canonical: true
5
+ revision: 1
6
+ lifecycle: mustflow-owned
7
+ authority: procedure
8
+ name: frontend-component-library-review
9
+ description: Apply this skill when a frontend component library, design system package, UI kit, shared component package, token system, primitive layer, variant API, theming surface, Storybook or docs site, package exports, public CSS or data attributes, accessibility behavior, controlled or uncontrolled component contract, visual regression suite, codemod, SemVer policy, or breaking-change plan is created, changed, reviewed, or reported.
10
+ metadata:
11
+ mustflow_schema: "1"
12
+ mustflow_kind: procedure
13
+ pack_id: mustflow.core
14
+ skill_id: mustflow.core.frontend-component-library-review
15
+ command_intents:
16
+ - changes_status
17
+ - changes_diff_summary
18
+ - lint
19
+ - build
20
+ - test_related
21
+ - test
22
+ - docs_validate_fast
23
+ - test_release
24
+ - mustflow_check
25
+ ---
26
+
27
+ # Frontend Component Library Review
28
+
29
+ <!-- mustflow-section: purpose -->
30
+ ## Purpose
31
+
32
+ Review frontend component libraries as public API platforms, not collections of pretty
33
+ components copied from a design file.
34
+
35
+ The core question is: "Can multiple product teams upgrade this package without guessing which
36
+ tokens, props, slots, DOM shape, CSS variables, keyboard behavior, exports, docs examples, and
37
+ release notes are contractual?" If the answer is unclear, the library is a shared copy-paste
38
+ folder wearing a package name.
39
+
40
+ <!-- mustflow-section: use-when -->
41
+ ## Use When
42
+
43
+ - A design system, component library, UI kit, shared React, Vue, Svelte, Web Component, CSS, or
44
+ framework-agnostic component package is created, changed, reviewed, or reported.
45
+ - Code or docs touch design tokens, CSS variables, theme modes, brand themes, density, contrast,
46
+ motion settings, primitive components, compound components, slots, variant props, polymorphic
47
+ `as` or `asChild`, public data attributes, `className` escape hatches, or package exports.
48
+ - Button, Link, TextField, Dialog, Popover, Menu, Select, Combobox, Tabs, Tooltip, Toast, Table,
49
+ Data Grid, Icon, Badge, Card, Alert, or similar reusable components gain public behavior.
50
+ - Storybook, docs, examples, props tables, visual regression stories, interaction tests,
51
+ accessibility tests, type tests, SSR or hydration checks, bundle-size checks, changelog entries,
52
+ migration guides, deprecation warnings, or codemods define consumer-facing behavior.
53
+ - A review or final report claims a component library is reusable, accessible, themeable,
54
+ design-system-ready, stable, backward compatible, SemVer-safe, or ready for external teams.
55
+
56
+ <!-- mustflow-section: do-not-use-when -->
57
+ ## Do Not Use When
58
+
59
+ - The task is ordinary app UI with no reusable package, public component API, token contract, or
60
+ cross-team consumer surface. Use the framework, UI quality, layout, or accessibility skill.
61
+ - The task only checks accessibility-tree semantics, keyboard behavior, labels, forms, dialogs, or
62
+ ARIA for a specific UI. Use `frontend-accessibility-tree-review` first.
63
+ - The task only checks frontend state drift in an application. Use `frontend-state-ownership-review`
64
+ first.
65
+ - The task only checks localization, RTL text behavior, translated layout stress, or locale SEO.
66
+ Use `frontend-localization-review` or `frontend-stress-layout-review` first.
67
+ - The task only changes package metadata or exports without component-library contracts. Use the
68
+ matching package, public API, or CLI contract skill.
69
+ - Verification would require unconfigured Storybook, browser, screenshot, visual-regression, or
70
+ package-manager commands. Report the missing evidence instead of inventing commands.
71
+
72
+ <!-- mustflow-section: required-inputs -->
73
+ ## Required Inputs
74
+
75
+ - User goal, target package or library, framework signals, consumer audience, current diff or
76
+ target files, package manager and build signals, and configured command intents.
77
+ - Package API ledger: public entrypoints, `package.json` exports, documented imports, deep-import
78
+ policy, peer dependencies, side-effect CSS, generated styles, tree-shaking claims, SSR support,
79
+ and bundle boundaries.
80
+ - Token ledger: primitive tokens, semantic tokens, component tokens, aliases, generated outputs,
81
+ CSS variables, TypeScript types, platform exports, descriptions, deprecations, owners, contrast
82
+ checks, and source-of-truth files.
83
+ - Primitive behavior ledger: dialog, popover, menu, select, combobox, tabs, tooltip, toast, focus
84
+ scope, portal, scroll lock, typeahead, roving focus, escape behavior, outside interaction, and
85
+ restore-focus contracts.
86
+ - Component contract ledger: props, slots, compound parts, refs, events, DOM ownership, data
87
+ attributes, CSS variable hooks, `className` or style overrides, polymorphic behavior, default
88
+ element, form participation, and documented examples.
89
+ - State contract ledger: controlled and uncontrolled pairs such as `value`, `defaultValue`,
90
+ `onValueChange`, `open`, `defaultOpen`, `onOpenChange`, reset rules, disabled behavior, loading
91
+ behavior, and duplicate-submit policy.
92
+ - Variant and theming ledger: semantic variant axes, impossible combinations, required accessible
93
+ names, brand, light and dark mode, density, contrast, reduced motion, forced colors, responsive
94
+ behavior, and theme-resolution order.
95
+ - Docs and test ledger: Storybook stories, anatomy docs, do and do-not guidance, accessibility and
96
+ keyboard docs, controlled examples, theme-token docs, migration docs, type tests, behavior tests,
97
+ visual regression matrix, accessibility automation, manual evidence, SSR, hydration, and bundle
98
+ checks.
99
+ - Release ledger: SemVer classification, public API definition, deprecation warnings, migration
100
+ guide, codemods, changelog, consumer upgrade path, and known breaking-change inventory.
101
+
102
+ <!-- mustflow-section: preconditions -->
103
+ ## Preconditions
104
+
105
+ - The task matches the Use When conditions and does not match the Do Not Use When exclusions.
106
+ - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the
107
+ current scope.
108
+ - Existing local patterns for tokens, primitives, variant helpers, styling, package exports, docs,
109
+ tests, and release notes have been searched before inventing a new component-library pattern.
110
+ - If the change touches app data, auth, payments, notifications, deployment, database, or security
111
+ behavior, also apply the narrower matching skill for that boundary.
112
+
113
+ <!-- mustflow-section: allowed-edits -->
114
+ ## Allowed Edits
115
+
116
+ - Create or refine component-library skill, docs, tests, route metadata, package metadata, template
117
+ copies, token docs, story contracts, migration notes, or release notes directly tied to the
118
+ changed component-library surface.
119
+ - Tighten public API boundaries by documenting exports, removing undocumented example deep imports,
120
+ making internal paths private, or marking such changes as breaking when consumers may rely on
121
+ them.
122
+ - Add focused tests for exports, types, roles and names, keyboard behavior, controlled and
123
+ uncontrolled state, variant constraints, token output, visual regression stories, SSR, hydration,
124
+ and bundle boundaries when existing project patterns support them.
125
+ - Do not migrate the library to a new framework, styling engine, primitive library, package manager,
126
+ Storybook setup, or token compiler unless the current task explicitly requires that migration.
127
+ - Do not treat `className`, raw `style`, hex-color props, arbitrary DOM selectors, or undocumented
128
+ internal files as harmless flexibility when they become consumer contracts.
129
+
130
+ <!-- mustflow-section: procedure -->
131
+ ## Procedure
132
+
133
+ 1. Decide whether this is a component library or ordinary app UI.
134
+ - A library has downstream consumers, public imports, reusable components, upgrade risk, docs
135
+ examples, and package or workspace boundaries.
136
+ - If it is just one screen, route to the narrower app UI skill and report that this skill does
137
+ not apply.
138
+ 2. Build the public API ledger first.
139
+ - List public exports, documented imports, package entrypoints, peer dependencies, CSS side
140
+ effects, token exports, generated files, and documented slot or DOM hooks.
141
+ - Treat docs examples as public API. Consumers copy them.
142
+ - Flag undocumented deep imports such as `dist/internal/*`, helper hooks, generated class files,
143
+ or internal token maps. Blocking existing deep imports can be breaking.
144
+ 3. Separate top-level library layers.
145
+ - Prefer clear boundaries for tokens, primitives, components, icons, utilities, docs, testing,
146
+ and codemods.
147
+ - Reject a structure where every reusable concern lands in `components/*` and the Button prop
148
+ list becomes the escape hatch for the whole system.
149
+ 4. Review token architecture.
150
+ - Separate primitive tokens such as raw colors and spacing, semantic tokens such as
151
+ action-background and text-primary, and component tokens only when component-specific tuning
152
+ is truly needed.
153
+ - Product components should usually consume semantic tokens, not Figma variable names, raw hex
154
+ values, or one-off pixel literals.
155
+ - Token source, generated CSS variables, generated TypeScript types, docs tables, platform
156
+ outputs, deprecations, and contrast checks must agree.
157
+ 5. Review theming as value substitution, not logic spread.
158
+ - Prefer root attributes, classes, or scopes that swap CSS variable values.
159
+ - Keep brand, mode, density, contrast, and motion as independent axes unless the product has a
160
+ documented reason to bundle them.
161
+ - Flag per-component `theme.mode === ...` branches, theme-object reads on every component, and
162
+ theme names that encode every axis into one untestable mega-theme.
163
+ 6. Review primitives before styled components.
164
+ - Dialog, Popover, Menu, Select, Combobox, Tabs, Tooltip, Toast, and similar primitives own
165
+ accessibility behavior, focus, keyboard, portal, layering, scroll, and dismissal policy.
166
+ - Styled components should wrap or compose primitive behavior without weakening it.
167
+ - If the project hand-rolls a primitive, require the same behavior ledger a proven primitive
168
+ library would have supplied.
169
+ 7. Treat accessibility as public API.
170
+ - Native elements, accessible names, labels, keyboard behavior, focus management, form
171
+ participation, disabled behavior, live regions, and high contrast behavior are contractual.
172
+ - `role`, `aria-*`, and data attributes imply behavior promises. Attributes without keyboard
173
+ and focus behavior are not accessibility.
174
+ - Route detailed accessibility fixes to `frontend-accessibility-tree-review`.
175
+ 8. Review component state contracts.
176
+ - Controlled and uncontrolled modes need consistent pairs: `value` with `onValueChange`,
177
+ `defaultValue` for initial internal state, `open` with `onOpenChange`, and `defaultOpen`.
178
+ - Do not mix controlled and uncontrolled ownership silently.
179
+ - Components should not couple to app stores, routers, data-fetching libraries, or form
180
+ libraries except through explicit adapters.
181
+ 9. Review variant API shape.
182
+ - Keep axes semantic and small, such as tone, emphasis, size, loading, icon-only, and disabled.
183
+ - Prevent impossible combinations with types, runtime guards, docs, or component split.
184
+ - Require an accessible name for icon-only controls, block duplicate submit when loading, and
185
+ review polymorphic `as` or `asChild` combinations for semantic breakage.
186
+ 10. Review styling contracts.
187
+ - Stable slots, data attributes, CSS variables, and documented class hooks are safer than
188
+ consumers styling incidental DOM shape.
189
+ - Decide which DOM parts are public and which are internal.
190
+ - If internal DOM, class names, or data attributes appear in docs, tests, examples, or consumer
191
+ code, changing them may be breaking.
192
+ 11. Review component-specific traps.
193
+ - Button: native button behavior, `type`, loading duplicate-submit policy, icon-only names,
194
+ disabled versus `aria-disabled`, and focus-visible styling.
195
+ - TextField: durable label, description, error wiring, `aria-invalid`, required, readOnly,
196
+ disabled, prefix and suffix, clear button, password reveal, and form reset behavior.
197
+ - Dialog: name, initial focus, focus containment, restore focus, Escape, outside interaction,
198
+ background inertness, scroll lock, nested overlays, and portal container.
199
+ - Select and Combobox: do not conflate them. Review typeahead, search, highlighted option,
200
+ selected option, groups, disabled items, mobile fallback, IME, scroll, and form behavior.
201
+ - Table and Data Grid: separate semantic table from product-grade grid behavior such as
202
+ sorting, pagination, virtualization, editing, export, and fetching.
203
+ - Icon: `currentColor`, tree-shaking, viewBox consistency, decorative `aria-hidden`, and
204
+ meaningful label strategy.
205
+ 12. Review docs as executable specs.
206
+ - Storybook or docs should show anatomy, when to use, when not to use, variants, controlled and
207
+ uncontrolled examples, accessibility names, keyboard behavior, theme tokens, form behavior,
208
+ migration notes, and do-not patterns.
209
+ - Props tables are not enough.
210
+ - Happy-path-only stories are weak contracts; important states need stories that tests can
211
+ target.
212
+ 13. Review test layers.
213
+ - Type and export tests catch public API drift.
214
+ - Behavior tests should use roles, names, keyboard events, state changes, and form behavior
215
+ instead of brittle internal selectors.
216
+ - Accessibility automation is a floor, not proof. Manual keyboard, focus, screen-reader smoke,
217
+ forced-colors, reduced-motion, and target-size evidence may still be needed.
218
+ - Visual regression should cover a representative matrix, not every combinatorial explosion.
219
+ Keep failures diagnosable.
220
+ - SSR, hydration, bundle size, tree-shaking, and CSS side-effect checks matter when the package
221
+ claims app-framework or library-mode support.
222
+ 14. Classify breaking changes broadly.
223
+ - Public API includes exports, props, prop meaning, defaults, event timing, refs, CSS variables,
224
+ token names, slot names, data attributes, documented DOM hooks, keyboard behavior, form
225
+ behavior, theme resolution order, peer dependency ranges, generated files, and docs examples.
226
+ - Removing, renaming, narrowing, changing defaults, changing ref targets, changing event order,
227
+ blocking deep imports, deleting CSS variables, or changing documented data attributes may be
228
+ major-version work.
229
+ 15. Plan migrations before removals.
230
+ - Prefer deprecation warnings and docs in a compatible release before removal.
231
+ - Provide migration notes and codemods for broad prop, import, token, or slot renames.
232
+ - Keep examples, changelog, tests, and generated docs aligned with the migration path.
233
+ 16. Report the evidence level honestly.
234
+ - Separate static package inspection, docs inspection, type-test evidence, behavior-test
235
+ evidence, visual-regression evidence, accessibility evidence, browser evidence, and
236
+ consumer-upgrade evidence.
237
+ - If an evidence path is unconfigured, name the missing configured intent or manual review
238
+ instead of claiming readiness.
239
+
240
+ <!-- mustflow-section: postconditions -->
241
+ ## Postconditions
242
+
243
+ - Public API, token, primitive behavior, component contract, state contract, variant, theming,
244
+ styling, docs, test, and release ledgers are fixed, ruled out, or reported.
245
+ - Component-library consumers can tell what is safe to import, style, theme, override, test, and
246
+ rely on across upgrades.
247
+ - Breaking-change risk is classified across code, tokens, CSS, docs, tests, package exports, and
248
+ runtime behavior.
249
+ - Missing Storybook, browser, visual, accessibility, package, or consumer-upgrade evidence is named
250
+ instead of hidden.
251
+
252
+ <!-- mustflow-section: verification -->
253
+ ## Verification
254
+
255
+ Use configured oneshot command intents when available:
256
+
257
+ - `changes_status`
258
+ - `changes_diff_summary`
259
+ - `lint`
260
+ - `build`
261
+ - `test_related`
262
+ - `test`
263
+ - `docs_validate_fast`
264
+ - `test_release`
265
+ - `mustflow_check`
266
+
267
+ Use the narrowest configured unit, component, docs, release, build, package, visual, accessibility,
268
+ or mustflow intent that covers the changed component-library contract. Do not infer raw Storybook,
269
+ browser, package-manager, visual-regression, or dev-server commands outside the command contract.
270
+
271
+ <!-- mustflow-section: failure-handling -->
272
+ ## Failure Handling
273
+
274
+ - If the public API ledger cannot be built, stop treating the change as SemVer-safe and report the
275
+ missing source of truth.
276
+ - If token source, generated CSS variables, generated types, and docs disagree, fix the source and
277
+ generated-surface contract before changing individual components.
278
+ - If a component requires custom primitive behavior but keyboard and focus behavior are unknown,
279
+ route to `frontend-accessibility-tree-review` or report the missing evidence.
280
+ - If a variant or theming change creates impossible combinations, narrow the API, split the
281
+ component, or report the product decision needed.
282
+ - If tests fail, preserve the configured intent name and failure evidence, then fix the contract
283
+ surface rather than weakening tests.
284
+ - If release impact is unclear, apply `date-number-audit` before editing versions or release notes.
285
+
286
+ <!-- mustflow-section: output-format -->
287
+ ## Output Format
288
+
289
+ - Component-library surface reviewed
290
+ - Package API, token, primitive, component, state, variant, theming, styling, docs, test, and release
291
+ ledgers
292
+ - Findings, fixes, or recommendations
293
+ - Breaking-change and migration classification
294
+ - Evidence level by docs, types, behavior, accessibility, visual, package, browser, and consumer
295
+ upgrade surface
296
+ - Narrower skills used or deferred
297
+ - Command intents run
298
+ - Skipped component-library checks and reasons
299
+ - Remaining component-library contract risk
@@ -2,11 +2,11 @@
2
2
  mustflow_doc: skill.frontend-localization-review
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: frontend-localization-review
9
- description: Apply this skill when frontend UI, product copy, messages, metadata, notifications, exports, locale handling, formatting, sorting, search, SSR hydration, RTL behavior, or i18n tests are created, changed, reviewed, or reported and localization correctness must be checked beyond visible JSX text.
9
+ description: Apply this skill when frontend UI, product copy, messages, translation keys, message catalogs, metadata, SEO or hreflang, localized routes, notifications, exports, locale handling, fallback, translation workflow, formatting, sorting, search, SSR hydration, RTL behavior, or i18n tests are created, changed, reviewed, or reported and localization correctness must be checked beyond visible JSX text.
10
10
  metadata:
11
11
  mustflow_schema: "1"
12
12
  mustflow_kind: procedure
@@ -29,18 +29,20 @@ metadata:
29
29
  <!-- mustflow-section: purpose -->
30
30
  ## Purpose
31
31
 
32
- Review frontend localization by tracing every user-visible string, locale-sensitive value, direction-sensitive layout choice, and exported text surface instead of only scanning visible JSX text.
32
+ Review frontend localization by tracing every user-visible string, locale-sensitive value, locale route, direction-sensitive layout choice, translation workflow, and exported text surface instead of only scanning visible JSX text.
33
33
 
34
- The core question is: "Can the product say the right thing, in the right grammar, format, direction, tone, and channel for this user's language, region, currency, unit, and time zone?" A translated screen is not localized if placeholders, validation errors, file names, emails, metadata, numbers, dates, sort order, or fallback behavior still leak the source locale.
34
+ The core question is: "Can the product say the right thing, in the right grammar, format, direction, tone, URL, search result, and channel for this user's language, region, currency, unit, and time zone?" A translated screen is not localized if placeholders, validation errors, file names, emails, metadata, numbers, dates, sort order, URL structure, or fallback behavior still leak the source locale.
35
35
 
36
36
  <!-- mustflow-section: use-when -->
37
37
  ## Use When
38
38
 
39
39
  - Frontend UI, product copy, forms, validation, error messages, empty states, toasts, dialogs, emails, push notifications, share text, exports, downloads, PDFs, CSVs, calendar invites, charts, canvas, SVG text, document titles, metadata, Open Graph, or SEO text are created, changed, reviewed, or reported.
40
- - Code adds or changes translation keys, message catalogs, `t(...)`, ICU messages, placeholders, `aria-label`, `title`, `alt`, `meta` tags, Open Graph text, browser `confirm` text, chart labels, file names, copy-to-clipboard text, or backend error-code mapping.
40
+ - Code adds or changes translation keys, key naming, stale or missing key behavior, message catalogs, `t(...)`, ICU messages, placeholders, `aria-label`, `title`, `alt`, `meta` tags, Open Graph text, browser `confirm` text, chart labels, file names, copy-to-clipboard text, or backend error-code mapping.
41
41
  - Code adds or changes date, time, relative-time, number, currency, percent, unit, plural, list, case, collation, search normalization, truncation, string length, or user-input parsing logic.
42
- - UI needs to support long translated labels, pseudo localization, RTL or bidirectional text, locale-specific font fallback, language switching, server rendering, hydration, or client/server locale agreement.
43
- - A review or final report claims a surface is translated, localization-safe, i18n-ready, RTL-ready, locale-aware, or global-ready.
42
+ - UI needs to support long translated labels, pseudo localization, RTL or bidirectional text, locale-specific font fallback, language switching, locale-specific routes, server rendering, hydration, or client/server locale agreement.
43
+ - International SEO changes involve language-specific URLs, canonical links, `hreflang`, `x-default`, locale sitemaps, localized title or meta description, Open Graph, structured data, or automatic locale redirects.
44
+ - Translation workflow, TMS sync, string freeze, glossary, translation memory, screenshot context, placeholder metadata, locale launch readiness, missing-key telemetry, or fallback monitoring is created, changed, reviewed, or reported.
45
+ - A review or final report claims a surface is translated, localization-safe, i18n-ready, l10n-ready, RTL-ready, locale-aware, SEO-localized, or global-ready.
44
46
 
45
47
  <!-- mustflow-section: do-not-use-when -->
46
48
  ## Do Not Use When
@@ -48,6 +50,7 @@ The core question is: "Can the product say the right thing, in the right grammar
48
50
  - The task is only hostile layout resilience from long translated text or RTL layout without translation, formatting, or locale-state risk; use `frontend-stress-layout-review` first and this skill only for localization semantics.
49
51
  - The task is only accessibility names, labels, ARIA, keyboard, focus, or assistive-technology behavior; use `frontend-accessibility-tree-review` first and this skill only when translated names or visible-label consistency are involved.
50
52
  - The task is only copy tone in one language with no locale, formatting, fallback, or translation-key surface.
53
+ - The task is only generic SEO unrelated to locale-specific URLs, metadata, hreflang, translated content, or locale routing.
51
54
  - No user-visible text, locale-sensitive value, user-entered text, exported text, metadata, search, sort, SSR locale, or direction-sensitive behavior is affected.
52
55
  - Verification would require an unconfigured pseudo-localization, screenshot, browser, or translation-management workflow. Report the missing localization evidence instead of inventing raw commands.
53
56
 
@@ -55,12 +58,27 @@ The core question is: "Can the product say the right thing, in the right grammar
55
58
  ## Required Inputs
56
59
 
57
60
  - User goal, changed UI or text surface, current diff or target files, framework and i18n library signals, supported locale policy, and configured command intents.
61
+ - Locale model ledger: language, script, region, calendar, numbering system, time zone, currency,
62
+ measurement unit, explicit user preference, URL locale, cookie or account locale, browser hint,
63
+ and fallback order.
58
64
  - String exposure ledger: visible text, placeholders, labels, `aria-label`, `title`, `alt`, document title, metadata, Open Graph, toasts, validation, errors, empty states, confirm prompts, chart labels, SVG text, canvas text, clipboard text, download file names, emails, push notifications, exports, PDFs, CSV headers, and calendar invites.
59
- - Message-shape ledger: full sentence keys, interpolation values, grammatical context, plural categories, zero case, Korean particles or other inflection needs, tone or formality, reusable key risks, and HTML or component interpolation.
65
+ - Translation-key ledger: key naming policy, domain or screen namespace, context, source text,
66
+ translator notes, key reuse, key lifecycle, stale keys, missing keys, fallback behavior, and
67
+ source-of-truth catalog.
68
+ - Message-shape ledger: full sentence keys, interpolation values, placeholder names and examples, grammatical context, plural categories, select cases, zero case, Korean particles or other inflection needs, tone or formality, reusable key risks, and HTML or component interpolation.
60
69
  - Format ledger: dates, times, relative times, time zones, calendars, numbers, currency, percent, units, measurement systems, list formatting, input parsing, and display versus storage values.
61
70
  - Text-processing ledger: case conversion, search, sort, collation, accent handling, Unicode normalization, grapheme segmentation, truncation, ellipsis policy, and file or user name handling.
62
71
  - Direction and layout ledger: RTL, bidirectional user content, `dir="auto"`, logical CSS properties, direction-sensitive icons, font fallback, line height, long translated labels, pseudo localization, and locale-specific screenshot coverage.
63
72
  - Runtime locale ledger: language versus region versus currency versus time zone versus unit settings, fallback behavior, missing-key handling, server-rendered locale, client hydration locale, and backend error-code mapping.
73
+ - SEO and routing ledger: localized URL shape, route locale priority, automatic redirects, canonical
74
+ links, `hreflang`, `x-default`, locale sitemap, translated metadata, Open Graph, structured data,
75
+ and crawler-visible content.
76
+ - Translation workflow ledger: key extraction, static validation, TMS or XLIFF sync, glossary,
77
+ translation memory, screenshot context, string freeze, human review requirements, AI translation
78
+ limits, locale launch threshold, and release blocking rules.
79
+ - Operations ledger: missing-key rate, fallback rate, bundle load failures, per-locale error rate,
80
+ conversion or task metrics, locale-specific support tickets, and safe logging fields such as
81
+ requested locale, resolved locale, fallback chain, time zone, and currency.
64
82
  - Evidence level: static string inventory, catalog diff, pseudo-localization evidence, locale snapshot evidence, configured tests, SSR hydration evidence, or missing evidence.
65
83
 
66
84
  <!-- mustflow-section: preconditions -->
@@ -69,6 +87,8 @@ The core question is: "Can the product say the right thing, in the right grammar
69
87
  - The task matches the Use When conditions and does not match the Do Not Use When exclusions.
70
88
  - Higher-priority instructions and `.mustflow/config/commands.toml` have been checked for the current scope.
71
89
  - Existing local patterns for message catalogs, ICU syntax, locale routing, formatters, error-code mapping, pseudo localization, RTL support, and exported text have been searched before adding a new pattern.
90
+ - Locale decisions are treated as product state, not only presentation. Do not assume language,
91
+ country, currency, time zone, and measurement unit are the same setting.
72
92
  - If localization changes affect layout, accessibility, payment, business rules, security, or API contracts, also apply the narrower matching skill for that boundary.
73
93
 
74
94
  <!-- mustflow-section: allowed-edits -->
@@ -79,7 +99,9 @@ The core question is: "Can the product say the right thing, in the right grammar
79
99
  - Add or correct plural, zero, context-specific, tone-specific, Korean particle, or inflection-safe messages when the project pattern supports them.
80
100
  - Replace ad hoc date, time, number, currency, unit, list, sort, search, and segmentation logic with locale-aware helpers or existing project formatters.
81
101
  - Add or refine RTL, `dir="auto"`, logical CSS property, pseudo-localization, locale screenshot, missing-key, backend error-code mapping, and export-text coverage where existing project patterns support them.
82
- - Do not invent a translation-management system, rewrite all catalogs, install i18n packages, machine-translate production copy, or broaden product language policy beyond the changed surface.
102
+ - Add or refine localized route metadata, `hreflang`, canonical, locale sitemap, fallback telemetry,
103
+ or key lifecycle checks where existing project patterns support them.
104
+ - Do not invent a translation-management system, rewrite all catalogs, install i18n packages, machine-translate production copy, change legal or pricing copy semantics, or broaden product language policy beyond the changed surface.
83
105
 
84
106
  <!-- mustflow-section: procedure -->
85
107
  ## Procedure
@@ -93,74 +115,144 @@ The core question is: "Can the product say the right thing, in the right grammar
93
115
  3. Check context-specific wording.
94
116
  - Do not reuse a generic key when the same source word means different things, such as file open, business open, and public status.
95
117
  - Prefer keys that name the product context, user action, and destination surface rather than a short dictionary word.
96
- 4. Check destructive and action labels as complete phrases.
118
+ 4. Check translation-key lifecycle.
119
+ - Do not use raw source prose as a stable key when ordinary copy editing would invalidate all
120
+ translations.
121
+ - Do not use dictionary keys such as `ok`, `title`, `description`, or `submit` when the key
122
+ lacks product context.
123
+ - Check added, renamed, unused, orphaned, and missing keys, including keys that exist only in
124
+ default-language catalogs or only in the translation platform.
125
+ - Missing keys and fallback usage should be visible in development, CI, staging, or production
126
+ diagnostics according to project policy.
127
+ 5. Check destructive and action labels as complete phrases.
97
128
  - Do not build labels like `Delete {item}` from separate translated parts when languages need different order, case, or particles.
98
129
  - Use context-specific messages such as delete project, delete file, or delete account.
99
- 5. Check plural and zero cases.
130
+ 6. Check plural, select, and zero cases.
100
131
  - Do not model plural as only `count === 1`.
101
- - Use ICU plural or the project's plural system for all supported locale categories.
132
+ - Use ICU plural, select, or the project's message system for all supported locale categories and
133
+ state or gender variants.
102
134
  - Give zero-result states their own UX wording when "0 items" would be awkward or misleading.
103
- 6. Check language-specific grammar traps.
135
+ - Keep complex plural or select branches as complete sentences so translators can move words,
136
+ variables, and clauses safely.
137
+ 7. Check language-specific grammar traps.
104
138
  - For Korean, review particles such as eun/neun, i/ga, eul/reul, and wa/gwa or avoid the particle with a safer sentence shape.
105
139
  - For other languages, check case, gender, noun class, politeness, or inflection needs when dynamic values are inserted into prose.
106
- 7. Check tone and formality inside one flow.
140
+ - Prefer neutral rewrites over collecting sensitive profile attributes such as gender only to
141
+ satisfy grammar in one message.
142
+ 8. Check placeholder and rich-context metadata.
143
+ - Named placeholders should explain whether the value is a person, organization, URL, amount,
144
+ count, product name, untranslated brand term, or user-provided text.
145
+ - Translators need screenshots, character limits, tone, glossary terms, and examples for
146
+ ambiguous words such as free, open, archive, owner, and plan.
147
+ 9. Check tone and formality inside one flow.
107
148
  - Compare adjacent labels, confirmations, validation messages, empty states, and recovery actions.
108
149
  - A flow that mixes formal and casual voice should be fixed or reported as product-language drift.
109
- 8. Check date, time, and relative-time formatting.
150
+ 10. Check date, time, calendar, and relative-time formatting.
110
151
  - Reject manual assembly such as `year + '.' + month + '.' + day`.
111
152
  - Use locale-aware formatters and confirm whether the user's time zone, server time zone, and stored instant can shift deadlines, bookings, billing dates, or "yesterday" labels.
153
+ - Store instants and local event time-zone identifiers intentionally. Recurring local-time events
154
+ should not become naive UTC repeats when daylight-saving or civil-time rules matter.
112
155
  - Treat `new Date()` in render paths, server-rendered relative time, and client hydration time as mismatch risks.
113
- 9. Check numbers, currency, percent, and units.
156
+ 11. Check numbers, currency, percent, and units.
114
157
  - Do not rely on comma insertion, fixed decimal assumptions, or locale-agnostic `Number(input)` parsing.
115
158
  - Separate display format from canonical stored value.
116
159
  - Keep language, region, currency, time zone, and measurement unit as separate settings unless the product has an explicit rule tying them together.
117
- 10. Check collation, search, and normalization.
160
+ - For prices, invoices, receipts, taxes, and billing text, distinguish display currency,
161
+ settlement or charge currency, tax inclusion, rounding, exchange-rate snapshot, and legal
162
+ document requirements.
163
+ 12. Check collation, search, and normalization.
118
164
  - Do not trust default `sort()`, raw `localeCompare` without locale intent, or plain `toLowerCase()` for user-facing search and sort.
119
165
  - Use locale-aware collation where order matters.
120
166
  - Normalize Unicode when comparing user names, filenames, tags, search queries, accents, combining characters, or Hangul variants.
121
- 11. Check grapheme-safe length, truncation, and ellipsis.
167
+ - Align client filtering, database collation, and search-engine analyzers so search results do
168
+ not differ by layer.
169
+ 13. Check names, addresses, phone numbers, and user data.
170
+ - Do not force global users into first-name/last-name, state/ZIP-only addresses, numeric phone
171
+ numbers, numeric postal codes, ASCII-only names, or fixed short field limits.
172
+ - Treat names, phone numbers, postal codes, and identifiers as display strings unless the domain
173
+ has a validated canonical structure.
174
+ 14. Check grapheme-safe length, truncation, and ellipsis.
122
175
  - Do not use `.length` and `slice(0, n)` when user-visible text may contain emoji, flags, skin tones, combining marks, or complex scripts.
123
176
  - Use grapheme-aware segmentation or existing utilities.
124
177
  - Choose ellipsis by content meaning: paths may need middle truncation, names may need enough disambiguating text, and amounts should not be truncated.
125
- 12. Check RTL and bidirectional text.
178
+ 15. Check RTL and bidirectional text.
126
179
  - Replace physical `left` and `right` assumptions with logical `start`, `end`, `inline-start`, and `inline-end` where direction depends on language.
127
180
  - Use `dir="auto"` for user-generated names, comments, reviews, addresses, chat, and profile text when direction may differ from the UI locale.
181
+ - Ensure document or route shells set compatible `lang` and `dir` values, not only leaf text.
128
182
  - Do not mirror all icons blindly. Back, next, drawer, and carousel direction may flip; play, download, clock, and brand icons usually should not.
129
- 13. Check translated layout resilience.
183
+ 16. Check translated layout resilience.
130
184
  - Long German, French, Vietnamese, Arabic, pseudo-localized, and compact CJK labels need real fixtures.
131
185
  - Fixed-width buttons, tabs, table headers, modal titles, `white-space: nowrap`, and fixed-height rows should be routed to `frontend-stress-layout-review` when geometry changes are needed.
132
- 14. Check font fallback.
186
+ 17. Check font fallback.
133
187
  - CJK, Thai, Arabic, Hindi, and emoji may need safe fallback fonts, line-height tolerance, and real glyph coverage.
134
188
  - Watch icon fonts, fake bold, missing weights, and square tofu glyphs.
135
- 15. Check pseudo localization and locale snapshots.
189
+ 18. Check pseudo localization and locale snapshots.
136
190
  - Prefer pseudo localization for hardcoded strings, missing keys, broken interpolation, glyph support, and expansion stress before real translations arrive.
137
191
  - For high-trust flows, compare at least a long-language locale, an RTL locale, and a dense CJK or Japanese-style locale when the project has such coverage.
138
- 16. Check SSR and hydration locale agreement.
192
+ 19. Check locale routing and preference priority.
193
+ - Prefer explicit user or URL locale over `Accept-Language` or browser hints. Browser hints
194
+ should not overwrite a user's saved or URL-selected language.
195
+ - Define priority across URL locale, account preference, cookie, browser hint, and default
196
+ locale so server and client choose the same locale.
197
+ - Avoid one URL serving many languages unless cache, SEO, and `Vary` behavior are explicitly
198
+ designed.
199
+ 20. Check SSR and hydration locale agreement.
139
200
  - Server and client must receive compatible locale, time zone, messages, and formatter inputs.
140
201
  - Default-language server output followed by client language switching can cause flicker, hydration mismatch, SEO drift, and different date or number text on first render.
141
- 17. Check fallback and missing-key behavior.
202
+ 21. Check fallback and missing-key behavior.
142
203
  - In development, missing keys should be loud enough to catch.
143
204
  - In production, fallback should protect the user while logs, metrics, or diagnostics make the missing translation visible to maintainers.
144
205
  - Do not treat silent English fallback as a successful localization state.
145
- 18. Check HTML and rich text in translations.
206
+ - Separate locale fallback, namespace fallback, key fallback, runtime bundle-load fallback, and
207
+ SEO fallback. They solve different failures and need different evidence.
208
+ 22. Check international SEO.
209
+ - Locale variants should have crawler-visible, stable URLs when SEO matters.
210
+ - Check `lang`, localized title and meta description, Open Graph, canonical URL,
211
+ self-referencing and reciprocal `hreflang`, `x-default`, locale sitemap, and structured data
212
+ when those surfaces exist.
213
+ - Do not canonical every translated page to the source-language URL unless the product intends
214
+ those localized pages not to be indexed.
215
+ - Avoid forced automatic redirects that prevent users or crawlers from reaching other locale
216
+ versions.
217
+ 23. Check HTML and rich text in translations.
146
218
  - Do not let translators edit raw HTML when component interpolation can preserve link, emphasis, and accessibility structure safely.
147
219
  - Links and emphasis inside a sentence must be movable by locale without exposing XSS, broken tags, or fixed English word order.
148
- 19. Check backend error message boundaries.
220
+ 24. Check backend error message boundaries.
149
221
  - Do not show raw backend prose such as "Invalid password" directly in localized UI.
150
222
  - Prefer stable error codes mapped to localized frontend messages, with safe fallback for unknown codes.
151
- 20. Check export, share, and notification surfaces.
223
+ 25. Check image, media, and culturally loaded assets.
224
+ - Text embedded in images, screenshots, app-store assets, email headers, PDFs, videos, and
225
+ onboarding media bypasses normal translation pipelines unless assets are locale-keyed.
226
+ - Review flags-as-language selectors, culturally loaded symbols, gestures, holidays, maps,
227
+ colors, and people imagery when the surface is public or high-trust.
228
+ 26. Check export, share, and notification surfaces.
152
229
  - Confirm CSV headers, PDF receipts, downloaded file names, email subjects, email bodies, push notifications, share text, clipboard output, printed output, and calendar invites follow the same language and formatting policy as the screen.
153
- 21. Report evidence by surface.
230
+ 27. Check translation workflow and release gates.
231
+ - Key extraction, catalog validation, placeholder parity, ICU syntax, unused-key cleanup,
232
+ missing-key blocking, TMS or XLIFF sync, glossary, translation memory, screenshot context,
233
+ string freeze, human review, and locale launch thresholds should be named when the task claims
234
+ production localization readiness.
235
+ - AI or machine translation may be a draft input, but legal, billing, privacy, security,
236
+ medical, tax, refund, and marketing claims need the review path required by the product.
237
+ 28. Check operations and telemetry.
238
+ - Per-locale missing-key rate, fallback rate, bundle load failure, error rate, conversion,
239
+ support tickets, search traffic, refund or billing contacts, and localized-route crawl health
240
+ should be observable for launched locales when the project has such telemetry.
241
+ - Logs may include requested locale, resolved locale, fallback chain, time zone, currency, and
242
+ route locale, but should not become user fingerprinting or leak sensitive content.
243
+ 29. Report evidence by surface.
154
244
  - Separate string-inventory evidence, catalog evidence, formatter evidence, pseudo-localization evidence, screenshot evidence, SSR evidence, and export or notification evidence.
155
- - If a claim is static-only, say which runtime locale, time zone, RTL, pseudo-localization, or export proof is missing.
245
+ - If a claim is static-only, say which runtime locale, time zone, RTL, pseudo-localization, SEO,
246
+ translation workflow, or export proof is missing.
156
247
 
157
248
  <!-- mustflow-section: postconditions -->
158
249
  ## Postconditions
159
250
 
160
251
  - User-visible strings across screen, metadata, notifications, exports, downloads, and assistive labels are either localized, intentionally excluded, or reported.
161
- - Messages use full translation units, named interpolation, contextual keys, plural and zero handling, tone consistency, and grammar-safe dynamic values where relevant.
162
- - Dates, times, numbers, currencies, units, search, sort, case conversion, Unicode normalization, grapheme length, truncation, RTL, bidi text, font fallback, SSR locale, fallback, backend errors, and rich text are fixed, ruled out, or reported where relevant.
163
- - Localization readiness claims distinguish static catalog evidence from pseudo-localization, locale snapshot, SSR, runtime formatter, and export evidence.
252
+ - Messages use full translation units, named interpolation, contextual keys, plural, select, zero handling, tone consistency, and grammar-safe dynamic values where relevant.
253
+ - Translation keys, locale routes, fallback behavior, SEO metadata, `hreflang`, canonical behavior, translation workflow, and missing-key telemetry are fixed, ruled out, or reported where relevant.
254
+ - Dates, times, numbers, currencies, units, names, addresses, search, sort, case conversion, Unicode normalization, grapheme length, truncation, RTL, bidi text, font fallback, SSR locale, fallback, backend errors, and rich text are fixed, ruled out, or reported where relevant.
255
+ - Localization readiness claims distinguish static catalog evidence from pseudo-localization, locale snapshot, SSR, runtime formatter, SEO, translation workflow, operations telemetry, and export evidence.
164
256
 
165
257
  <!-- mustflow-section: verification -->
166
258
  ## Verification
@@ -183,9 +275,9 @@ Use the narrowest configured unit, component, i18n, screenshot, build, docs, rel
183
275
  ## Failure Handling
184
276
 
185
277
  - If a string surface cannot be enumerated, report the missing exposure ledger before claiming localization coverage.
186
- - If the project has no plural, formatter, collation, segmentation, pseudo-localization, or missing-key pattern, preserve existing behavior and report the missing project contract instead of inventing a broad framework.
278
+ - If the project has no plural, formatter, collation, segmentation, localized-route, SEO, pseudo-localization, translation-workflow, or missing-key pattern, preserve existing behavior and report the missing project contract instead of inventing a broad framework.
187
279
  - If language, region, currency, time zone, or unit settings are conflated, avoid patching one locale branch only; report the model issue or make the smallest local split required by the changed surface.
188
- - If translation changes alter accessibility names, focus recovery, layout geometry, payment meaning, legal copy, or security-sensitive messaging, apply the matching skill before continuing that part.
280
+ - If translation changes alter accessibility names, focus recovery, layout geometry, payment meaning, legal copy, SEO indexing, privacy disclosures, or security-sensitive messaging, apply the matching skill before continuing that part.
189
281
  - If a configured test or build fails after a localization change, preserve the failing intent and output tail, then use `failure-triage` before broadening the fix.
190
282
  - If verification requires unconfigured browser, pseudo-localization, screenshot, SSR, export, or translation-management tooling, stop at that boundary and report the skipped check.
191
283
 
@@ -194,9 +286,9 @@ Use the narrowest configured unit, component, i18n, screenshot, build, docs, rel
194
286
 
195
287
  - Frontend localization surface reviewed
196
288
  - String exposure ledger
197
- - Message-shape, plural, zero, grammar, tone, formatter, search, sort, normalization, segmentation, RTL, bidi, font, SSR, fallback, backend-error, rich-text, export, share, and notification checks where relevant
289
+ - Locale model, translation-key, message-shape, plural, select, zero, grammar, tone, formatter, search, sort, normalization, segmentation, RTL, bidi, font, locale routing, SEO, SSR, fallback, backend-error, rich-text, workflow, operations, export, share, and notification checks where relevant
198
290
  - Localization fixes or recommendations
199
- - Evidence level: static inventory, catalog, configured test, pseudo-localization, screenshot, SSR, export, manual-only, missing, or not applicable
291
+ - Evidence level: static inventory, catalog, configured test, pseudo-localization, screenshot, SEO, SSR, translation workflow, operations telemetry, export, manual-only, missing, or not applicable
200
292
  - Command intents run
201
293
  - Skipped localization checks and reasons
202
294
  - Remaining localization risk