mobile-modularization-architect
Architect-level app modularisation — module boundaries by feature and layer, dependency rules and API surfaces, build-time impact, dynamic feature delivery, and the ownership model that makes modules worth their cost. Use when an app has outgrown a single module.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- mobile-modularization-architect
- license
- MIT
- metadata
- { "crusor-path": "mobile-architect/platforms-architect/mobile-modularization-architect", "crusor-domain": "mobile-architect", "crusor-origin": "original", "crusor-sources": "developer.android.com/topic/modularization; developer.apple.com/documentation/xcode/creating-a-multiplatform-framework; developer.android.com/guide/playcore/feature-delivery", "crusor-triggers": "modularization, gradle modules, swift packages, xcode framework, dynamic feature, module boundaries, build times, dependency graph, modularize, modularise, split into modules, feature module", "crusor-verified-on": "2026-10-30" }
- description
- Architect-level app modularisation — module boundaries by feature and layer, dependency rules and API surfaces, build-time impact, dynamic feature delivery, and the ownership model that makes modules worth their cost. Use when an app has outgrown a single module.
- compatibility
- Gradle modules, Xcode frameworks/Swift packages, Bazel
03 SKILL.md 正文
Mobile Modularisation Architect
Modules buy boundaries and build parallelism, at the cost of ceremony. Split for a reason; every module has an owner and a tax.
When to use
- Build times over ~5 minutes on the main path.
- Multiple teams editing the same module daily.
- Features that should ship independently or on demand.
When NOT to use
- A small app with one team — modules add configuration and indirection for nothing.
- Splitting before you have a dependency problem; measurement comes first.
Decision 1 — Boundary type
| Split by | Use when |
|---|---|
| feature | teams own vertical slices |
| layer (data/domain/ui) | strict dependency direction matters |
| library/SDK | reused across apps |
| dynamic feature | on-demand install, large optional flows |
- Feature modules with internal layers beat layer-per-module-everywhere at small scale.
- One module per screen is over-fragmentation; one module per bounded feature is the usual sweet spot.
Decision 2 — Dependency rules
app → feature-* → core-ui / core-domain
↑
feature-* never depends on feature-*
- Features communicate through the app module or a shared domain API, not by direct dependency.
- Enforce with build tooling (
implementationvsapi, or a lint rule); documented rules decay in a quarter. - Public surface = a small API module per feature; internals stay
internal.
Decision 3 — Build performance
- Measure clean and incremental builds before and after each split.
- Gradle configuration cache and Kotlin incremental compilation matter more than module count.
- iOS: Swift packages and frameworks parallelise better than one target with folders.
- A split that increases build time is a net loss — revert it.
Decision 4 — Dynamic delivery
- Dynamic features for large, rarely used flows (onboarding extras, editor tools).
- Every dynamic module adds install-time state and failure modes; test on low-end devices and slow networks.
- Base module size is the download metric users feel; keep it lean.
Decision 5 — Ownership
- Each module has an owner team and a CODEOWNERS entry; orphan modules are deleted.
- Module boundaries are architecture: changes go through review.
- Document the graph; a diagram nobody updates is fiction — generate it from the build.
Failure modes at scale
- 80 modules, 9-minute builds, no ownership.
- Features depending on each other's internals; boundaries are decorative.
- One "core" module that everything imports and everyone edits.
- Dynamic feature that breaks on first launch for 2% of devices.
- Modules split by layer only; every feature change touches five modules.
Verification receipts
- Module graph generated from the build, with ownership.
- Clean and incremental build times before and after the split.
- Dependency rule violation caught by tooling in a test PR.
- Dynamic feature installed and exercised on a slow network.
- Base app download size tracked per release.
04 同仓库更多 Skills
interaction-patterns-architect
Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.
design-system-ops-architect
Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.
design-handoff-architect
Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.
content-microcopy-architect
Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.
ui-ux-implementation-architect
Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.
test-strategy-architect
Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.