Repository navigation
docs(ui): reshape ui-development for Mobile — shared MCP-free base, thin overlay, no pinned inventory - #212
georgewrmarshall wants to merge 5 commits into
Conversation
…e MCP-free Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
…m rules Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
1b4cfd3 to
2d1ba46
Compare
Deprecation replacements must be exported on the installed platform, Legacy* aliases trigger only on same-file clashes, cross-skill pointers are qualified, the Strategy link survives install, and the manifest reference explains non-component entries. Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Explain retiring useStyles + .styles.ts pairs, note that interactive ListItem applies its own pressed background, and point at MarketingMomentTitle. Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
… and #213 Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
|
|
||
| ### Changed | ||
|
|
||
| - Expand the shared `ui/ui-development` base so it works with no MCP server: a source order (installed package types win, then the hosted Storybook components manifests, the component README at the installed version's tag, repository usage, and Figma MCP with Code Connect when connected), component choice and deprecation rules, foundations, durable typography rules, the `Legacy*` alias rule for incremental migrations, and the Active accessibility, trust, and sheet rules from the Design Brain. Add `references/reading-mmds-manifests.md`, and update the agentic design system strategy so Storybook MCP is optional and skills carry no release-pinned inventories. |
There was a problem hiding this comment.
I removed the CHANGELOG entries from this PR, #212. The reviewer's comment was on the shared base bullet, and the branch also had a second entry for the Mobile overlay. Both are gone, and CHANGELOG.md now matches main. The new commit is 82f57eb.
I also removed the two entries from #213. It carried the same shared bullet, and you had asked that CHANGELOG.md be left alone for these skill changes. That's commit 250424a. If you wanted #213 left as is, I can restore its bullets.
I updated both PR descriptions so they no longer mention a CHANGELOG entry. Nothing else in the skill content changed.
Tests, lint and the two-order merge check still pass on both branches. CI on #212 is still running its CodeQL and finalize scan step, and CI on #213 is still running its CodeQL step; the other checks have passed. I didn't resolve the reviewer's comment thread.
Skill reshape changes are not release-note material for this PR. Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>


Description
This reshapes the
ui/ui-developmentskill for MetaMask Mobile so it works without any MCP server and carries no release-pinned inventory. The previous version of this PR pinned MMDS RN 0.54.0 (MMDS v77.0.0) and added a 231-line inventory. Mobilemainhas since moved to^0.55.0, which shows how quickly pins go stale. This rewrite removes the pins and the inventory.Extension gets the same reshape in #213. Both PRs carry an identical first commit with the shared base. I test-merged them into
mainin both orders and both merges were clean, so whichever lands second just has its copy of that commit drop out.Commit 1 (shared, identical in #213): expand the
ui-developmentbasedomains/ui/skills/ui-development/skill.mdgoes from a one-line pointer to about 200 lines:When to use, and a short Workflow for Create and Review.
Sources, in order, with no MCP needed:
node_modules. These win whenever sources disagree.main, and that snippets can import enums fromdesign-system-shared. Enums still come from the platform package.@metamask/<package>@<installed version>, taken from the installedpackage.json. No release is hard-coded.Storybook MCP and Context Forge are optional only. Agents never block on them and never configure them.
Choosing a component: check the manifest and installed exports before inventing anything, and never port across platforms. The order is MMDS, then non-deprecated legacy, then a feature component, then custom UI with a recorded reason. "Deprecated" means
@deprecatedin the types orjsDocTags.deprecatedin the manifest.Foundations: tokens, Tailwind through the presets, the spacing and radius scale, no arbitrary values, contrast, and i18n tolerance.
Typography:
FontFamily.Defaultby default, andText+TextVariantinstead of raw sizes. Hero is for approved hero cases only. For amount inputs, a single line points to the Proposed Typography rule in the Design Brain and MMDS reference; the skill does not settle that question.The
Legacy*alias rule for incremental migrations.Accessibility, trust, and sheets: short Active Design Brain rules, inlined because agents can't read Notion. Proposed rules are linked, not enforced.
MMDS agent docs: links to
AGENTS.md,docs/ai-agents.md,.cursor/rules/styling.md,figma-integration.md, andcomponent-migration.mdinstead of copies.It also adds
references/reading-mmds-manifests.md, which explains how to readcomponents.jsonand is never synced to a release. It updatesknowledge/agentic-design-system-strategy.md: the baseline is installed types + hosted manifests + consumer Tailwind, Storybook MCP is optional, skills must work with no MCP, and skills carry no release-pinned inventories.Commit 2 (Mobile only)
ui-development/repos/metamask-mobile.mdgoes from 435 lines onmainto 128 lines of durable platform rules:useTailwind(),Box/Text, and noStyleSheet.ButtonBase twClassName={(pressed) => ...}. Itsstyleis a plainStyleProp<ViewStyle>, which I confirmed in the manifest.ScrollViewfromreact-native-gesture-handler, nested sheets, and a singleToaster.announceForAccessibility, the header and tab roles,hitSlop, Dynamic Type, anduseReducedMotion.Legacy*import paths for Mobile's per-folder default exports.The component lists, prop inventories, conversion tables, and version pins are gone.
The pinned
references/mmds-react-native.mdis deleted. It never landed onmain.component-scaffold/repos/metamask-mobile.md:@deprecatedtags instead of a hard-coded list.useElevatedSurface()step is replaced with the MMDSBottomSheetsurface.app/util/theme/themeUtils.tsno longer exists in Mobile.twClassName, and the strings path is nowlocales/languages/en.json.content-guidelines(base and Mobile overlay): "via Storybook MCP" becomes "the README's Content guidelines section at the installed version's tag; no MCP needed". The copied per-component copy table from the earlier revision is dropped.Explicitly kept out: the PR media table rule, process and routing (Jev, Slack, Mac mini), copy rules beyond a pointer to
content-guidelines, glass patterns, and the Hero-vs-Default decision for amount inputs.Eval fixes (commit 3 shared, commit 4 per platform)
The eval in #220 found 13 issues. This PR applies the actionable ones. The shared commit (
6868dbchere,1ae0f98on #213) is byte-identical on both branches:Legacy*alias applies when a file imports the same name from a legacy source and from MMDS. Other legacy imports keep their names until migrated.content-guidelinesandcomponent-scaffoldpointers are qualified with "where the repository has them".reading-mmds-manifests.mdexplains the non-component entries (design-tokens-/docs-,patterns-, cast-expression names). An entry counts as a component only when itspathis undersrc/components/and its name is in the installed export index.Mobile overlay commit (
02bb1c2):useStyles+*.styles.ts, move the styles to typedBoxprops ortwClassName, then delete the file and the hook call. InteractiveListItem(isInteractive) applies its own pressed background, so do not addbg-pressed.app/components/UI/MarketingMomentTitlefor marketing-moment headlines.The re-run (
ui-development-reshape-2026-11-05-rerun.md) gives Pass on all four scenarios on both platforms. ISS-010 and ISS-011 (Design Brain) are deferred to review; this work makes no Notion change. ISS-003 still applies: merge #212 and #213 together.CHANGELOG
This PR adds no
CHANGELOG.mdentries. A reviewer asked for the entries to be removed, so commit82f57ebdrops the two bullets this PR had added, andCHANGELOG.mdmatchesmain.Type of Change
Checklist
Testing
yarn test: 76/76 pass.yarn lint: pass.yarn audit:skills: 0 errors, andui/ui-developmentno longer warns about missing When To Use or Workflow sections.domains/ui/resolves, and nothing referencesmmds-react*.md,v77, or a pinned version.tools/install --repo metamask-mobile --domain uirendersmms-ui-development/SKILL.md(339 lines, base + overlay) withreferences/reading-mmds-manifests.mdbundled.mainis clean in both orders.MIGRATION.mdfiles, and a sample per-package-tag README.Additional Context
Proposed(ISS-010), and an Active Design Brain rule ranks MMDSmainabove installed types (ISS-011). Both are deferred to Design Brain review; this PR does not change Notion.