@wazir-dev/cli 1.0.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 (629) hide show
  1. package/AGENTS.md +111 -0
  2. package/CHANGELOG.md +14 -0
  3. package/CONTRIBUTING.md +101 -0
  4. package/LICENSE +21 -0
  5. package/README.md +314 -0
  6. package/assets/composition-engine.mmd +34 -0
  7. package/assets/demo-script.sh +17 -0
  8. package/assets/logo-dark.svg +14 -0
  9. package/assets/logo.svg +14 -0
  10. package/assets/pipeline.mmd +39 -0
  11. package/assets/record-demo.sh +51 -0
  12. package/docs/README.md +51 -0
  13. package/docs/adapters/context-mode.md +60 -0
  14. package/docs/concepts/architecture.md +87 -0
  15. package/docs/concepts/artifact-model.md +60 -0
  16. package/docs/concepts/composition-engine.md +36 -0
  17. package/docs/concepts/indexing-and-recall.md +160 -0
  18. package/docs/concepts/observability.md +41 -0
  19. package/docs/concepts/roles-and-workflows.md +59 -0
  20. package/docs/concepts/terminology-policy.md +27 -0
  21. package/docs/getting-started/01-installation.md +78 -0
  22. package/docs/getting-started/02-first-run.md +102 -0
  23. package/docs/getting-started/03-adding-to-project.md +15 -0
  24. package/docs/getting-started/04-host-setup.md +15 -0
  25. package/docs/guides/ci-integration.md +15 -0
  26. package/docs/guides/creating-skills.md +15 -0
  27. package/docs/guides/expertise-module-authoring.md +15 -0
  28. package/docs/guides/hook-development.md +15 -0
  29. package/docs/guides/memory-and-learnings.md +34 -0
  30. package/docs/guides/multi-host-export.md +15 -0
  31. package/docs/guides/troubleshooting.md +101 -0
  32. package/docs/guides/writing-custom-roles.md +15 -0
  33. package/docs/plans/2026-03-15-cli-pipeline-integration-design.md +592 -0
  34. package/docs/plans/2026-03-15-cli-pipeline-integration-plan.md +598 -0
  35. package/docs/plans/2026-03-15-docs-enforcement-plan.md +238 -0
  36. package/docs/readmes/INDEX.md +99 -0
  37. package/docs/readmes/features/expertise/README.md +171 -0
  38. package/docs/readmes/features/exports/README.md +222 -0
  39. package/docs/readmes/features/hooks/README.md +103 -0
  40. package/docs/readmes/features/hooks/loop-cap-guard.md +133 -0
  41. package/docs/readmes/features/hooks/post-tool-capture.md +121 -0
  42. package/docs/readmes/features/hooks/post-tool-lint.md +130 -0
  43. package/docs/readmes/features/hooks/pre-compact-summary.md +122 -0
  44. package/docs/readmes/features/hooks/pre-tool-capture-route.md +100 -0
  45. package/docs/readmes/features/hooks/protected-path-write-guard.md +128 -0
  46. package/docs/readmes/features/hooks/session-start.md +119 -0
  47. package/docs/readmes/features/hooks/stop-handoff-harvest.md +125 -0
  48. package/docs/readmes/features/roles/README.md +157 -0
  49. package/docs/readmes/features/roles/clarifier.md +152 -0
  50. package/docs/readmes/features/roles/content-author.md +190 -0
  51. package/docs/readmes/features/roles/designer.md +193 -0
  52. package/docs/readmes/features/roles/executor.md +184 -0
  53. package/docs/readmes/features/roles/learner.md +210 -0
  54. package/docs/readmes/features/roles/planner.md +182 -0
  55. package/docs/readmes/features/roles/researcher.md +164 -0
  56. package/docs/readmes/features/roles/reviewer.md +184 -0
  57. package/docs/readmes/features/roles/specifier.md +162 -0
  58. package/docs/readmes/features/roles/verifier.md +215 -0
  59. package/docs/readmes/features/schemas/README.md +178 -0
  60. package/docs/readmes/features/skills/README.md +63 -0
  61. package/docs/readmes/features/skills/brainstorming.md +96 -0
  62. package/docs/readmes/features/skills/debugging.md +148 -0
  63. package/docs/readmes/features/skills/design.md +120 -0
  64. package/docs/readmes/features/skills/prepare-next.md +109 -0
  65. package/docs/readmes/features/skills/run-audit.md +159 -0
  66. package/docs/readmes/features/skills/scan-project.md +109 -0
  67. package/docs/readmes/features/skills/self-audit.md +176 -0
  68. package/docs/readmes/features/skills/tdd.md +137 -0
  69. package/docs/readmes/features/skills/using-skills.md +92 -0
  70. package/docs/readmes/features/skills/verification.md +120 -0
  71. package/docs/readmes/features/skills/writing-plans.md +104 -0
  72. package/docs/readmes/features/tooling/README.md +320 -0
  73. package/docs/readmes/features/workflows/README.md +186 -0
  74. package/docs/readmes/features/workflows/author.md +181 -0
  75. package/docs/readmes/features/workflows/clarify.md +154 -0
  76. package/docs/readmes/features/workflows/design-review.md +171 -0
  77. package/docs/readmes/features/workflows/design.md +169 -0
  78. package/docs/readmes/features/workflows/discover.md +162 -0
  79. package/docs/readmes/features/workflows/execute.md +173 -0
  80. package/docs/readmes/features/workflows/learn.md +167 -0
  81. package/docs/readmes/features/workflows/plan-review.md +165 -0
  82. package/docs/readmes/features/workflows/plan.md +170 -0
  83. package/docs/readmes/features/workflows/prepare-next.md +167 -0
  84. package/docs/readmes/features/workflows/review.md +169 -0
  85. package/docs/readmes/features/workflows/run-audit.md +191 -0
  86. package/docs/readmes/features/workflows/spec-challenge.md +159 -0
  87. package/docs/readmes/features/workflows/specify.md +160 -0
  88. package/docs/readmes/features/workflows/verify.md +177 -0
  89. package/docs/readmes/packages/README.md +50 -0
  90. package/docs/readmes/packages/ajv.md +117 -0
  91. package/docs/readmes/packages/context-mode.md +118 -0
  92. package/docs/readmes/packages/gray-matter.md +116 -0
  93. package/docs/readmes/packages/node-test.md +137 -0
  94. package/docs/readmes/packages/yaml.md +112 -0
  95. package/docs/reference/configuration-reference.md +159 -0
  96. package/docs/reference/expertise-index.md +52 -0
  97. package/docs/reference/git-flow.md +43 -0
  98. package/docs/reference/hooks.md +87 -0
  99. package/docs/reference/host-exports.md +50 -0
  100. package/docs/reference/launch-checklist.md +172 -0
  101. package/docs/reference/marketplace-listings.md +76 -0
  102. package/docs/reference/release-process.md +34 -0
  103. package/docs/reference/roles-reference.md +77 -0
  104. package/docs/reference/skills.md +33 -0
  105. package/docs/reference/templates.md +29 -0
  106. package/docs/reference/tooling-cli.md +94 -0
  107. package/docs/truth-claims.yaml +222 -0
  108. package/expertise/PROGRESS.md +63 -0
  109. package/expertise/README.md +18 -0
  110. package/expertise/antipatterns/PROGRESS.md +56 -0
  111. package/expertise/antipatterns/backend/api-design-antipatterns.md +1271 -0
  112. package/expertise/antipatterns/backend/auth-antipatterns.md +1195 -0
  113. package/expertise/antipatterns/backend/caching-antipatterns.md +622 -0
  114. package/expertise/antipatterns/backend/database-antipatterns.md +1038 -0
  115. package/expertise/antipatterns/backend/index.md +24 -0
  116. package/expertise/antipatterns/backend/microservices-antipatterns.md +850 -0
  117. package/expertise/antipatterns/code/architecture-antipatterns.md +919 -0
  118. package/expertise/antipatterns/code/async-antipatterns.md +622 -0
  119. package/expertise/antipatterns/code/code-smells.md +1186 -0
  120. package/expertise/antipatterns/code/dependency-antipatterns.md +1209 -0
  121. package/expertise/antipatterns/code/error-handling-antipatterns.md +1360 -0
  122. package/expertise/antipatterns/code/index.md +27 -0
  123. package/expertise/antipatterns/code/naming-and-abstraction.md +1118 -0
  124. package/expertise/antipatterns/code/state-management-antipatterns.md +1076 -0
  125. package/expertise/antipatterns/code/testing-antipatterns.md +1053 -0
  126. package/expertise/antipatterns/design/accessibility-antipatterns.md +1136 -0
  127. package/expertise/antipatterns/design/dark-patterns.md +1121 -0
  128. package/expertise/antipatterns/design/index.md +22 -0
  129. package/expertise/antipatterns/design/ui-antipatterns.md +1202 -0
  130. package/expertise/antipatterns/design/ux-antipatterns.md +680 -0
  131. package/expertise/antipatterns/frontend/css-layout-antipatterns.md +691 -0
  132. package/expertise/antipatterns/frontend/flutter-antipatterns.md +1827 -0
  133. package/expertise/antipatterns/frontend/index.md +23 -0
  134. package/expertise/antipatterns/frontend/mobile-antipatterns.md +573 -0
  135. package/expertise/antipatterns/frontend/react-antipatterns.md +1128 -0
  136. package/expertise/antipatterns/frontend/spa-antipatterns.md +1235 -0
  137. package/expertise/antipatterns/index.md +31 -0
  138. package/expertise/antipatterns/performance/index.md +20 -0
  139. package/expertise/antipatterns/performance/performance-antipatterns.md +1013 -0
  140. package/expertise/antipatterns/performance/premature-optimization.md +623 -0
  141. package/expertise/antipatterns/performance/scaling-antipatterns.md +785 -0
  142. package/expertise/antipatterns/process/ai-coding-antipatterns.md +853 -0
  143. package/expertise/antipatterns/process/code-review-antipatterns.md +656 -0
  144. package/expertise/antipatterns/process/deployment-antipatterns.md +920 -0
  145. package/expertise/antipatterns/process/index.md +23 -0
  146. package/expertise/antipatterns/process/technical-debt-antipatterns.md +647 -0
  147. package/expertise/antipatterns/security/index.md +20 -0
  148. package/expertise/antipatterns/security/secrets-antipatterns.md +849 -0
  149. package/expertise/antipatterns/security/security-theater.md +843 -0
  150. package/expertise/antipatterns/security/vulnerability-patterns.md +801 -0
  151. package/expertise/architecture/PROGRESS.md +70 -0
  152. package/expertise/architecture/data/caching-architecture.md +671 -0
  153. package/expertise/architecture/data/data-consistency.md +574 -0
  154. package/expertise/architecture/data/data-modeling.md +536 -0
  155. package/expertise/architecture/data/event-streams-and-queues.md +634 -0
  156. package/expertise/architecture/data/index.md +25 -0
  157. package/expertise/architecture/data/search-architecture.md +663 -0
  158. package/expertise/architecture/data/sql-vs-nosql.md +708 -0
  159. package/expertise/architecture/decisions/architecture-decision-records.md +640 -0
  160. package/expertise/architecture/decisions/build-vs-buy.md +616 -0
  161. package/expertise/architecture/decisions/index.md +23 -0
  162. package/expertise/architecture/decisions/monolith-to-microservices.md +790 -0
  163. package/expertise/architecture/decisions/technology-selection.md +616 -0
  164. package/expertise/architecture/distributed/cap-theorem-and-tradeoffs.md +800 -0
  165. package/expertise/architecture/distributed/circuit-breaker-bulkhead.md +741 -0
  166. package/expertise/architecture/distributed/consensus-and-coordination.md +796 -0
  167. package/expertise/architecture/distributed/distributed-systems-fundamentals.md +564 -0
  168. package/expertise/architecture/distributed/idempotency-and-retry.md +796 -0
  169. package/expertise/architecture/distributed/index.md +25 -0
  170. package/expertise/architecture/distributed/saga-pattern.md +797 -0
  171. package/expertise/architecture/foundations/architectural-thinking.md +460 -0
  172. package/expertise/architecture/foundations/coupling-and-cohesion.md +770 -0
  173. package/expertise/architecture/foundations/design-principles-solid.md +649 -0
  174. package/expertise/architecture/foundations/domain-driven-design.md +719 -0
  175. package/expertise/architecture/foundations/index.md +25 -0
  176. package/expertise/architecture/foundations/separation-of-concerns.md +472 -0
  177. package/expertise/architecture/foundations/twelve-factor-app.md +797 -0
  178. package/expertise/architecture/index.md +34 -0
  179. package/expertise/architecture/integration/api-design-graphql.md +638 -0
  180. package/expertise/architecture/integration/api-design-grpc.md +804 -0
  181. package/expertise/architecture/integration/api-design-rest.md +892 -0
  182. package/expertise/architecture/integration/index.md +25 -0
  183. package/expertise/architecture/integration/third-party-integration.md +795 -0
  184. package/expertise/architecture/integration/webhooks-and-callbacks.md +1152 -0
  185. package/expertise/architecture/integration/websockets-realtime.md +791 -0
  186. package/expertise/architecture/mobile-architecture/index.md +22 -0
  187. package/expertise/architecture/mobile-architecture/mobile-app-architecture.md +780 -0
  188. package/expertise/architecture/mobile-architecture/mobile-backend-for-frontend.md +670 -0
  189. package/expertise/architecture/mobile-architecture/offline-first.md +719 -0
  190. package/expertise/architecture/mobile-architecture/push-and-sync.md +782 -0
  191. package/expertise/architecture/patterns/cqrs-event-sourcing.md +717 -0
  192. package/expertise/architecture/patterns/event-driven.md +797 -0
  193. package/expertise/architecture/patterns/hexagonal-clean-architecture.md +870 -0
  194. package/expertise/architecture/patterns/index.md +27 -0
  195. package/expertise/architecture/patterns/layered-architecture.md +736 -0
  196. package/expertise/architecture/patterns/microservices.md +753 -0
  197. package/expertise/architecture/patterns/modular-monolith.md +692 -0
  198. package/expertise/architecture/patterns/monolith.md +626 -0
  199. package/expertise/architecture/patterns/plugin-architecture.md +735 -0
  200. package/expertise/architecture/patterns/serverless.md +780 -0
  201. package/expertise/architecture/scaling/database-scaling.md +615 -0
  202. package/expertise/architecture/scaling/feature-flags-and-rollouts.md +757 -0
  203. package/expertise/architecture/scaling/horizontal-vs-vertical.md +606 -0
  204. package/expertise/architecture/scaling/index.md +24 -0
  205. package/expertise/architecture/scaling/multi-tenancy.md +800 -0
  206. package/expertise/architecture/scaling/stateless-design.md +787 -0
  207. package/expertise/backend/embedded-firmware.md +625 -0
  208. package/expertise/backend/go.md +853 -0
  209. package/expertise/backend/index.md +24 -0
  210. package/expertise/backend/java-spring.md +448 -0
  211. package/expertise/backend/node-typescript.md +625 -0
  212. package/expertise/backend/python-fastapi.md +724 -0
  213. package/expertise/backend/rust.md +458 -0
  214. package/expertise/backend/solidity.md +711 -0
  215. package/expertise/composition-map.yaml +443 -0
  216. package/expertise/content/foundations/content-modeling.md +395 -0
  217. package/expertise/content/foundations/editorial-standards.md +449 -0
  218. package/expertise/content/foundations/index.md +24 -0
  219. package/expertise/content/foundations/microcopy.md +455 -0
  220. package/expertise/content/foundations/terminology-governance.md +509 -0
  221. package/expertise/content/index.md +34 -0
  222. package/expertise/content/patterns/accessibility-copy.md +518 -0
  223. package/expertise/content/patterns/index.md +24 -0
  224. package/expertise/content/patterns/notification-content.md +433 -0
  225. package/expertise/content/patterns/sample-content.md +486 -0
  226. package/expertise/content/patterns/state-copy.md +439 -0
  227. package/expertise/design/PROGRESS.md +58 -0
  228. package/expertise/design/disciplines/dark-mode-theming.md +577 -0
  229. package/expertise/design/disciplines/design-systems.md +595 -0
  230. package/expertise/design/disciplines/index.md +25 -0
  231. package/expertise/design/disciplines/information-architecture.md +800 -0
  232. package/expertise/design/disciplines/interaction-design.md +788 -0
  233. package/expertise/design/disciplines/responsive-design.md +552 -0
  234. package/expertise/design/disciplines/usability-testing.md +516 -0
  235. package/expertise/design/disciplines/user-research.md +792 -0
  236. package/expertise/design/foundations/accessibility-design.md +796 -0
  237. package/expertise/design/foundations/color-theory.md +797 -0
  238. package/expertise/design/foundations/iconography.md +795 -0
  239. package/expertise/design/foundations/index.md +26 -0
  240. package/expertise/design/foundations/motion-and-animation.md +653 -0
  241. package/expertise/design/foundations/rtl-design.md +585 -0
  242. package/expertise/design/foundations/spacing-and-layout.md +607 -0
  243. package/expertise/design/foundations/typography.md +800 -0
  244. package/expertise/design/foundations/visual-hierarchy.md +761 -0
  245. package/expertise/design/index.md +32 -0
  246. package/expertise/design/patterns/authentication-flows.md +474 -0
  247. package/expertise/design/patterns/content-consumption.md +789 -0
  248. package/expertise/design/patterns/data-display.md +618 -0
  249. package/expertise/design/patterns/e-commerce.md +1494 -0
  250. package/expertise/design/patterns/feedback-and-states.md +642 -0
  251. package/expertise/design/patterns/forms-and-input.md +819 -0
  252. package/expertise/design/patterns/gamification.md +801 -0
  253. package/expertise/design/patterns/index.md +31 -0
  254. package/expertise/design/patterns/microinteractions.md +449 -0
  255. package/expertise/design/patterns/navigation.md +800 -0
  256. package/expertise/design/patterns/notifications.md +705 -0
  257. package/expertise/design/patterns/onboarding.md +700 -0
  258. package/expertise/design/patterns/search-and-filter.md +601 -0
  259. package/expertise/design/patterns/settings-and-preferences.md +768 -0
  260. package/expertise/design/patterns/social-and-community.md +748 -0
  261. package/expertise/design/platforms/desktop-native.md +612 -0
  262. package/expertise/design/platforms/index.md +25 -0
  263. package/expertise/design/platforms/mobile-android.md +825 -0
  264. package/expertise/design/platforms/mobile-cross-platform.md +983 -0
  265. package/expertise/design/platforms/mobile-ios.md +699 -0
  266. package/expertise/design/platforms/tablet.md +794 -0
  267. package/expertise/design/platforms/web-dashboard.md +790 -0
  268. package/expertise/design/platforms/web-responsive.md +550 -0
  269. package/expertise/design/psychology/behavioral-nudges.md +449 -0
  270. package/expertise/design/psychology/cognitive-load.md +1191 -0
  271. package/expertise/design/psychology/error-psychology.md +778 -0
  272. package/expertise/design/psychology/index.md +22 -0
  273. package/expertise/design/psychology/persuasive-design.md +736 -0
  274. package/expertise/design/psychology/user-mental-models.md +623 -0
  275. package/expertise/design/tooling/open-pencil.md +266 -0
  276. package/expertise/frontend/angular.md +1073 -0
  277. package/expertise/frontend/desktop-electron.md +546 -0
  278. package/expertise/frontend/flutter.md +782 -0
  279. package/expertise/frontend/index.md +27 -0
  280. package/expertise/frontend/native-android.md +409 -0
  281. package/expertise/frontend/native-ios.md +490 -0
  282. package/expertise/frontend/react-native.md +1160 -0
  283. package/expertise/frontend/react.md +808 -0
  284. package/expertise/frontend/vue.md +1089 -0
  285. package/expertise/humanize/domain-rules-code.md +79 -0
  286. package/expertise/humanize/domain-rules-content.md +67 -0
  287. package/expertise/humanize/domain-rules-technical-docs.md +56 -0
  288. package/expertise/humanize/index.md +35 -0
  289. package/expertise/humanize/self-audit-checklist.md +87 -0
  290. package/expertise/humanize/sentence-patterns.md +218 -0
  291. package/expertise/humanize/vocabulary-blacklist.md +105 -0
  292. package/expertise/i18n/PROGRESS.md +65 -0
  293. package/expertise/i18n/advanced/accessibility-and-i18n.md +28 -0
  294. package/expertise/i18n/advanced/bidirectional-text-algorithm.md +38 -0
  295. package/expertise/i18n/advanced/complex-scripts.md +30 -0
  296. package/expertise/i18n/advanced/performance-and-i18n.md +27 -0
  297. package/expertise/i18n/advanced/testing-i18n.md +28 -0
  298. package/expertise/i18n/content/content-adaptation.md +23 -0
  299. package/expertise/i18n/content/locale-specific-formatting.md +23 -0
  300. package/expertise/i18n/content/machine-translation-integration.md +28 -0
  301. package/expertise/i18n/content/translation-management.md +29 -0
  302. package/expertise/i18n/foundations/date-time-calendars.md +67 -0
  303. package/expertise/i18n/foundations/i18n-architecture.md +272 -0
  304. package/expertise/i18n/foundations/locale-and-language-tags.md +79 -0
  305. package/expertise/i18n/foundations/numbers-currency-units.md +61 -0
  306. package/expertise/i18n/foundations/pluralization-and-gender.md +109 -0
  307. package/expertise/i18n/foundations/string-externalization.md +236 -0
  308. package/expertise/i18n/foundations/text-direction-bidi.md +241 -0
  309. package/expertise/i18n/foundations/unicode-and-encoding.md +86 -0
  310. package/expertise/i18n/index.md +38 -0
  311. package/expertise/i18n/platform/backend-i18n.md +31 -0
  312. package/expertise/i18n/platform/flutter-i18n.md +148 -0
  313. package/expertise/i18n/platform/native-android-i18n.md +36 -0
  314. package/expertise/i18n/platform/native-ios-i18n.md +36 -0
  315. package/expertise/i18n/platform/react-i18n.md +103 -0
  316. package/expertise/i18n/platform/web-css-i18n.md +81 -0
  317. package/expertise/i18n/rtl/arabic-specific.md +175 -0
  318. package/expertise/i18n/rtl/hebrew-specific.md +149 -0
  319. package/expertise/i18n/rtl/rtl-animations-and-transitions.md +111 -0
  320. package/expertise/i18n/rtl/rtl-forms-and-input.md +161 -0
  321. package/expertise/i18n/rtl/rtl-fundamentals.md +211 -0
  322. package/expertise/i18n/rtl/rtl-icons-and-images.md +181 -0
  323. package/expertise/i18n/rtl/rtl-layout-mirroring.md +252 -0
  324. package/expertise/i18n/rtl/rtl-navigation-and-gestures.md +107 -0
  325. package/expertise/i18n/rtl/rtl-testing-and-qa.md +147 -0
  326. package/expertise/i18n/rtl/rtl-typography.md +160 -0
  327. package/expertise/index.md +113 -0
  328. package/expertise/index.yaml +216 -0
  329. package/expertise/infrastructure/cloud-aws.md +597 -0
  330. package/expertise/infrastructure/cloud-gcp.md +599 -0
  331. package/expertise/infrastructure/cybersecurity.md +816 -0
  332. package/expertise/infrastructure/database-mongodb.md +447 -0
  333. package/expertise/infrastructure/database-postgres.md +400 -0
  334. package/expertise/infrastructure/devops-cicd.md +787 -0
  335. package/expertise/infrastructure/index.md +27 -0
  336. package/expertise/performance/PROGRESS.md +50 -0
  337. package/expertise/performance/backend/api-latency.md +1204 -0
  338. package/expertise/performance/backend/background-jobs.md +506 -0
  339. package/expertise/performance/backend/connection-pooling.md +1209 -0
  340. package/expertise/performance/backend/database-query-optimization.md +515 -0
  341. package/expertise/performance/backend/index.md +23 -0
  342. package/expertise/performance/backend/rate-limiting-and-throttling.md +971 -0
  343. package/expertise/performance/foundations/algorithmic-complexity.md +954 -0
  344. package/expertise/performance/foundations/caching-strategies.md +489 -0
  345. package/expertise/performance/foundations/concurrency-and-parallelism.md +847 -0
  346. package/expertise/performance/foundations/index.md +24 -0
  347. package/expertise/performance/foundations/measuring-and-profiling.md +440 -0
  348. package/expertise/performance/foundations/memory-management.md +964 -0
  349. package/expertise/performance/foundations/performance-budgets.md +1314 -0
  350. package/expertise/performance/index.md +31 -0
  351. package/expertise/performance/infrastructure/auto-scaling.md +1059 -0
  352. package/expertise/performance/infrastructure/cdn-and-edge.md +1081 -0
  353. package/expertise/performance/infrastructure/index.md +22 -0
  354. package/expertise/performance/infrastructure/load-balancing.md +1081 -0
  355. package/expertise/performance/infrastructure/observability.md +1079 -0
  356. package/expertise/performance/mobile/index.md +23 -0
  357. package/expertise/performance/mobile/mobile-animations.md +544 -0
  358. package/expertise/performance/mobile/mobile-memory-battery.md +416 -0
  359. package/expertise/performance/mobile/mobile-network.md +452 -0
  360. package/expertise/performance/mobile/mobile-rendering.md +599 -0
  361. package/expertise/performance/mobile/mobile-startup-time.md +505 -0
  362. package/expertise/performance/platform-specific/flutter-performance.md +647 -0
  363. package/expertise/performance/platform-specific/index.md +22 -0
  364. package/expertise/performance/platform-specific/node-performance.md +1307 -0
  365. package/expertise/performance/platform-specific/postgres-performance.md +1366 -0
  366. package/expertise/performance/platform-specific/react-performance.md +1403 -0
  367. package/expertise/performance/web/bundle-optimization.md +1239 -0
  368. package/expertise/performance/web/image-and-media.md +636 -0
  369. package/expertise/performance/web/index.md +24 -0
  370. package/expertise/performance/web/network-optimization.md +1133 -0
  371. package/expertise/performance/web/rendering-performance.md +1098 -0
  372. package/expertise/performance/web/ssr-and-hydration.md +918 -0
  373. package/expertise/performance/web/web-vitals.md +1374 -0
  374. package/expertise/quality/accessibility.md +985 -0
  375. package/expertise/quality/evidence-based-verification.md +499 -0
  376. package/expertise/quality/index.md +24 -0
  377. package/expertise/quality/ml-model-audit.md +614 -0
  378. package/expertise/quality/performance.md +600 -0
  379. package/expertise/quality/testing-api.md +891 -0
  380. package/expertise/quality/testing-mobile.md +496 -0
  381. package/expertise/quality/testing-web.md +849 -0
  382. package/expertise/security/PROGRESS.md +54 -0
  383. package/expertise/security/agentic-identity.md +540 -0
  384. package/expertise/security/compliance-frameworks.md +601 -0
  385. package/expertise/security/data/data-encryption.md +364 -0
  386. package/expertise/security/data/data-privacy-gdpr.md +692 -0
  387. package/expertise/security/data/database-security.md +1171 -0
  388. package/expertise/security/data/index.md +22 -0
  389. package/expertise/security/data/pii-handling.md +531 -0
  390. package/expertise/security/foundations/authentication.md +1041 -0
  391. package/expertise/security/foundations/authorization.md +603 -0
  392. package/expertise/security/foundations/cryptography.md +1001 -0
  393. package/expertise/security/foundations/index.md +25 -0
  394. package/expertise/security/foundations/owasp-top-10.md +1354 -0
  395. package/expertise/security/foundations/secrets-management.md +1217 -0
  396. package/expertise/security/foundations/secure-sdlc.md +700 -0
  397. package/expertise/security/foundations/supply-chain-security.md +698 -0
  398. package/expertise/security/index.md +31 -0
  399. package/expertise/security/infrastructure/cloud-security-aws.md +1296 -0
  400. package/expertise/security/infrastructure/cloud-security-gcp.md +1376 -0
  401. package/expertise/security/infrastructure/container-security.md +721 -0
  402. package/expertise/security/infrastructure/incident-response.md +1295 -0
  403. package/expertise/security/infrastructure/index.md +24 -0
  404. package/expertise/security/infrastructure/logging-and-monitoring.md +1618 -0
  405. package/expertise/security/infrastructure/network-security.md +1337 -0
  406. package/expertise/security/mobile/index.md +23 -0
  407. package/expertise/security/mobile/mobile-android-security.md +1218 -0
  408. package/expertise/security/mobile/mobile-binary-protection.md +1229 -0
  409. package/expertise/security/mobile/mobile-data-storage.md +1265 -0
  410. package/expertise/security/mobile/mobile-ios-security.md +1401 -0
  411. package/expertise/security/mobile/mobile-network-security.md +1520 -0
  412. package/expertise/security/smart-contract-security.md +594 -0
  413. package/expertise/security/testing/index.md +22 -0
  414. package/expertise/security/testing/penetration-testing.md +1258 -0
  415. package/expertise/security/testing/security-code-review.md +1765 -0
  416. package/expertise/security/testing/threat-modeling.md +1074 -0
  417. package/expertise/security/testing/vulnerability-scanning.md +1062 -0
  418. package/expertise/security/web/api-security.md +586 -0
  419. package/expertise/security/web/cors-and-headers.md +433 -0
  420. package/expertise/security/web/csrf.md +562 -0
  421. package/expertise/security/web/file-upload.md +1477 -0
  422. package/expertise/security/web/index.md +25 -0
  423. package/expertise/security/web/injection.md +1375 -0
  424. package/expertise/security/web/session-management.md +1101 -0
  425. package/expertise/security/web/xss.md +1158 -0
  426. package/exports/README.md +17 -0
  427. package/exports/hosts/claude/.claude/agents/clarifier.md +42 -0
  428. package/exports/hosts/claude/.claude/agents/content-author.md +63 -0
  429. package/exports/hosts/claude/.claude/agents/designer.md +55 -0
  430. package/exports/hosts/claude/.claude/agents/executor.md +55 -0
  431. package/exports/hosts/claude/.claude/agents/learner.md +51 -0
  432. package/exports/hosts/claude/.claude/agents/planner.md +53 -0
  433. package/exports/hosts/claude/.claude/agents/researcher.md +43 -0
  434. package/exports/hosts/claude/.claude/agents/reviewer.md +54 -0
  435. package/exports/hosts/claude/.claude/agents/specifier.md +47 -0
  436. package/exports/hosts/claude/.claude/agents/verifier.md +71 -0
  437. package/exports/hosts/claude/.claude/commands/author.md +42 -0
  438. package/exports/hosts/claude/.claude/commands/clarify.md +38 -0
  439. package/exports/hosts/claude/.claude/commands/design-review.md +46 -0
  440. package/exports/hosts/claude/.claude/commands/design.md +44 -0
  441. package/exports/hosts/claude/.claude/commands/discover.md +37 -0
  442. package/exports/hosts/claude/.claude/commands/execute.md +48 -0
  443. package/exports/hosts/claude/.claude/commands/learn.md +38 -0
  444. package/exports/hosts/claude/.claude/commands/plan-review.md +42 -0
  445. package/exports/hosts/claude/.claude/commands/plan.md +39 -0
  446. package/exports/hosts/claude/.claude/commands/prepare-next.md +37 -0
  447. package/exports/hosts/claude/.claude/commands/review.md +40 -0
  448. package/exports/hosts/claude/.claude/commands/run-audit.md +41 -0
  449. package/exports/hosts/claude/.claude/commands/spec-challenge.md +41 -0
  450. package/exports/hosts/claude/.claude/commands/specify.md +38 -0
  451. package/exports/hosts/claude/.claude/commands/verify.md +37 -0
  452. package/exports/hosts/claude/.claude/settings.json +34 -0
  453. package/exports/hosts/claude/CLAUDE.md +19 -0
  454. package/exports/hosts/claude/export.manifest.json +38 -0
  455. package/exports/hosts/claude/host-package.json +67 -0
  456. package/exports/hosts/codex/AGENTS.md +19 -0
  457. package/exports/hosts/codex/export.manifest.json +38 -0
  458. package/exports/hosts/codex/host-package.json +41 -0
  459. package/exports/hosts/cursor/.cursor/hooks.json +16 -0
  460. package/exports/hosts/cursor/.cursor/rules/wazir-core.mdc +19 -0
  461. package/exports/hosts/cursor/export.manifest.json +38 -0
  462. package/exports/hosts/cursor/host-package.json +42 -0
  463. package/exports/hosts/gemini/GEMINI.md +19 -0
  464. package/exports/hosts/gemini/export.manifest.json +38 -0
  465. package/exports/hosts/gemini/host-package.json +41 -0
  466. package/hooks/README.md +18 -0
  467. package/hooks/definitions/loop_cap_guard.yaml +21 -0
  468. package/hooks/definitions/post_tool_capture.yaml +24 -0
  469. package/hooks/definitions/pre_compact_summary.yaml +19 -0
  470. package/hooks/definitions/pre_tool_capture_route.yaml +19 -0
  471. package/hooks/definitions/protected_path_write_guard.yaml +19 -0
  472. package/hooks/definitions/session_start.yaml +19 -0
  473. package/hooks/definitions/stop_handoff_harvest.yaml +20 -0
  474. package/hooks/loop-cap-guard +17 -0
  475. package/hooks/post-tool-lint +36 -0
  476. package/hooks/protected-path-write-guard +17 -0
  477. package/hooks/session-start +41 -0
  478. package/llms-full.txt +2355 -0
  479. package/llms.txt +43 -0
  480. package/package.json +79 -0
  481. package/roles/README.md +20 -0
  482. package/roles/clarifier.md +42 -0
  483. package/roles/content-author.md +63 -0
  484. package/roles/designer.md +55 -0
  485. package/roles/executor.md +55 -0
  486. package/roles/learner.md +51 -0
  487. package/roles/planner.md +53 -0
  488. package/roles/researcher.md +43 -0
  489. package/roles/reviewer.md +54 -0
  490. package/roles/specifier.md +47 -0
  491. package/roles/verifier.md +71 -0
  492. package/schemas/README.md +24 -0
  493. package/schemas/accepted-learning.schema.json +20 -0
  494. package/schemas/author-artifact.schema.json +156 -0
  495. package/schemas/clarification.schema.json +19 -0
  496. package/schemas/design-artifact.schema.json +80 -0
  497. package/schemas/docs-claim.schema.json +18 -0
  498. package/schemas/export-manifest.schema.json +20 -0
  499. package/schemas/hook.schema.json +67 -0
  500. package/schemas/host-export-package.schema.json +18 -0
  501. package/schemas/implementation-plan.schema.json +19 -0
  502. package/schemas/proposed-learning.schema.json +19 -0
  503. package/schemas/research.schema.json +18 -0
  504. package/schemas/review.schema.json +29 -0
  505. package/schemas/run-manifest.schema.json +18 -0
  506. package/schemas/spec-challenge.schema.json +18 -0
  507. package/schemas/spec.schema.json +20 -0
  508. package/schemas/usage.schema.json +102 -0
  509. package/schemas/verification-proof.schema.json +29 -0
  510. package/schemas/wazir-manifest.schema.json +173 -0
  511. package/skills/README.md +40 -0
  512. package/skills/brainstorming/SKILL.md +77 -0
  513. package/skills/debugging/SKILL.md +50 -0
  514. package/skills/design/SKILL.md +61 -0
  515. package/skills/dispatching-parallel-agents/SKILL.md +128 -0
  516. package/skills/executing-plans/SKILL.md +70 -0
  517. package/skills/finishing-a-development-branch/SKILL.md +169 -0
  518. package/skills/humanize/SKILL.md +123 -0
  519. package/skills/init-pipeline/SKILL.md +124 -0
  520. package/skills/prepare-next/SKILL.md +20 -0
  521. package/skills/receiving-code-review/SKILL.md +123 -0
  522. package/skills/requesting-code-review/SKILL.md +105 -0
  523. package/skills/requesting-code-review/code-reviewer.md +108 -0
  524. package/skills/run-audit/SKILL.md +197 -0
  525. package/skills/scan-project/SKILL.md +41 -0
  526. package/skills/self-audit/SKILL.md +153 -0
  527. package/skills/subagent-driven-development/SKILL.md +154 -0
  528. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
  529. package/skills/subagent-driven-development/implementer-prompt.md +102 -0
  530. package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  531. package/skills/tdd/SKILL.md +23 -0
  532. package/skills/using-git-worktrees/SKILL.md +163 -0
  533. package/skills/using-skills/SKILL.md +95 -0
  534. package/skills/verification/SKILL.md +22 -0
  535. package/skills/wazir/SKILL.md +463 -0
  536. package/skills/writing-plans/SKILL.md +30 -0
  537. package/skills/writing-skills/SKILL.md +157 -0
  538. package/skills/writing-skills/anthropic-best-practices.md +122 -0
  539. package/skills/writing-skills/persuasion-principles.md +50 -0
  540. package/templates/README.md +20 -0
  541. package/templates/artifacts/README.md +10 -0
  542. package/templates/artifacts/accepted-learning.md +19 -0
  543. package/templates/artifacts/accepted-learning.template.json +12 -0
  544. package/templates/artifacts/author.md +74 -0
  545. package/templates/artifacts/author.template.json +19 -0
  546. package/templates/artifacts/clarification.md +21 -0
  547. package/templates/artifacts/clarification.template.json +12 -0
  548. package/templates/artifacts/execute-notes.md +19 -0
  549. package/templates/artifacts/implementation-plan.md +21 -0
  550. package/templates/artifacts/implementation-plan.template.json +11 -0
  551. package/templates/artifacts/learning-proposal.md +19 -0
  552. package/templates/artifacts/next-run-handoff.md +21 -0
  553. package/templates/artifacts/plan-review.md +19 -0
  554. package/templates/artifacts/proposed-learning.template.json +12 -0
  555. package/templates/artifacts/research.md +21 -0
  556. package/templates/artifacts/research.template.json +12 -0
  557. package/templates/artifacts/review-findings.md +19 -0
  558. package/templates/artifacts/review.template.json +11 -0
  559. package/templates/artifacts/run-manifest.template.json +8 -0
  560. package/templates/artifacts/spec-challenge.md +19 -0
  561. package/templates/artifacts/spec-challenge.template.json +11 -0
  562. package/templates/artifacts/spec.md +21 -0
  563. package/templates/artifacts/spec.template.json +12 -0
  564. package/templates/artifacts/verification-proof.md +19 -0
  565. package/templates/artifacts/verification-proof.template.json +11 -0
  566. package/templates/examples/accepted-learning.example.json +14 -0
  567. package/templates/examples/author.example.json +152 -0
  568. package/templates/examples/clarification.example.json +15 -0
  569. package/templates/examples/docs-claim.example.json +8 -0
  570. package/templates/examples/export-manifest.example.json +7 -0
  571. package/templates/examples/host-export-package.example.json +11 -0
  572. package/templates/examples/implementation-plan.example.json +17 -0
  573. package/templates/examples/proposed-learning.example.json +13 -0
  574. package/templates/examples/research.example.json +15 -0
  575. package/templates/examples/research.example.md +6 -0
  576. package/templates/examples/review.example.json +17 -0
  577. package/templates/examples/run-manifest.example.json +9 -0
  578. package/templates/examples/spec-challenge.example.json +14 -0
  579. package/templates/examples/spec.example.json +21 -0
  580. package/templates/examples/verification-proof.example.json +21 -0
  581. package/templates/examples/wazir-manifest.example.yaml +65 -0
  582. package/templates/task-definition-schema.md +99 -0
  583. package/tooling/README.md +20 -0
  584. package/tooling/src/adapters/context-mode.js +50 -0
  585. package/tooling/src/capture/command.js +376 -0
  586. package/tooling/src/capture/store.js +99 -0
  587. package/tooling/src/capture/usage.js +270 -0
  588. package/tooling/src/checks/branches.js +50 -0
  589. package/tooling/src/checks/brand-truth.js +110 -0
  590. package/tooling/src/checks/changelog.js +231 -0
  591. package/tooling/src/checks/command-registry.js +36 -0
  592. package/tooling/src/checks/commits.js +102 -0
  593. package/tooling/src/checks/docs-drift.js +103 -0
  594. package/tooling/src/checks/docs-truth.js +201 -0
  595. package/tooling/src/checks/runtime-surface.js +156 -0
  596. package/tooling/src/cli.js +116 -0
  597. package/tooling/src/command-options.js +56 -0
  598. package/tooling/src/commands/validate.js +320 -0
  599. package/tooling/src/doctor/command.js +91 -0
  600. package/tooling/src/export/command.js +77 -0
  601. package/tooling/src/export/compiler.js +498 -0
  602. package/tooling/src/guards/loop-cap-guard.js +52 -0
  603. package/tooling/src/guards/protected-path-write-guard.js +67 -0
  604. package/tooling/src/index/command.js +152 -0
  605. package/tooling/src/index/storage.js +1061 -0
  606. package/tooling/src/index/summarizers.js +261 -0
  607. package/tooling/src/loaders.js +18 -0
  608. package/tooling/src/project-root.js +22 -0
  609. package/tooling/src/recall/command.js +225 -0
  610. package/tooling/src/schema-validator.js +30 -0
  611. package/tooling/src/state-root.js +40 -0
  612. package/tooling/src/status/command.js +71 -0
  613. package/wazir.manifest.yaml +135 -0
  614. package/workflows/README.md +19 -0
  615. package/workflows/author.md +42 -0
  616. package/workflows/clarify.md +38 -0
  617. package/workflows/design-review.md +46 -0
  618. package/workflows/design.md +44 -0
  619. package/workflows/discover.md +37 -0
  620. package/workflows/execute.md +48 -0
  621. package/workflows/learn.md +38 -0
  622. package/workflows/plan-review.md +42 -0
  623. package/workflows/plan.md +39 -0
  624. package/workflows/prepare-next.md +37 -0
  625. package/workflows/review.md +40 -0
  626. package/workflows/run-audit.md +41 -0
  627. package/workflows/spec-challenge.md +41 -0
  628. package/workflows/specify.md +38 -0
  629. package/workflows/verify.md +37 -0
@@ -0,0 +1,825 @@
1
+ # Android Mobile Design — Platform Expertise Module
2
+
3
+ ---
4
+ category: platform
5
+ applies-to: [android-phone, android-tablet, android-foldable]
6
+ version: 2.0
7
+ last-updated: 2026-03-07
8
+ sources:
9
+ - https://m3.material.io/foundations
10
+ - https://m3.material.io/styles/color/roles
11
+ - https://m3.material.io/styles/typography/applying-type
12
+ - https://m3.material.io/styles/motion/easing-and-duration/tokens-specs
13
+ - https://m3.material.io/styles/shape/corner-radius-scale
14
+ - https://m3.material.io/components
15
+ - https://developer.android.com/design/ui/mobile/guides/layout-and-content/edge-to-edge
16
+ - https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back
17
+ - https://developer.android.com/design/ui/mobile/guides/foundations/system-bars
18
+ - https://developer.android.com/develop/ui/compose/layouts/adaptive/foldables/learn-about-foldables
19
+ - https://developer.android.com/develop/ui/compose/designsystems/material3
20
+ - https://developer.android.com/design/ui/mobile/guides/home-screen/notifications
21
+ ---
22
+
23
+ ## 1. Platform Design Language
24
+
25
+ ### 1.1 Material Design 3 (Material You) Philosophy
26
+
27
+ Material Design 3, branded as "Material You," is Google's current design system for
28
+ Android. It is built on three core principles:
29
+
30
+ - **Personal.** The design adapts to each user through dynamic color derived from their
31
+ wallpaper, giving every device a unique personality while preserving brand identity.
32
+ - **Adaptive.** Layouts, components, and navigation patterns respond fluidly across phones,
33
+ tablets, foldables, and large screens using canonical layouts and window-size classes.
34
+ - **Expressive.** Bolder color contrasts, richer typography, spring-based motion, and
35
+ generous corner rounding create interfaces that feel alive and emotionally engaging.
36
+
37
+ Material You launched with Android 12 (2021) and has been the standard design language
38
+ through Android 13, 14, and 15. With Android 16 (2025), Google introduced
39
+ **Material 3 Expressive** -- a significant evolution that amplifies vibrancy, introduces
40
+ fifteen new or updated components (button groups, FAB menus, loading indicators, split
41
+ buttons, toolbars), adds a spring-based motion physics system, and increases the use of
42
+ blur, animation, and haptic feedback throughout the OS.
43
+
44
+ ### 1.2 Dynamic Color from User Wallpaper
45
+
46
+ Dynamic Color is the flagship personalization feature of Material You. The **Monet**
47
+ color-extraction engine analyzes the user's wallpaper and generates a set of tonal
48
+ palettes that propagate through the entire system and into apps that opt in.
49
+
50
+ How dynamic color works:
51
+
52
+ 1. The system extracts a **source color** from the user's wallpaper.
53
+ 2. Five **tonal palettes** are generated: Primary, Secondary, Tertiary, Neutral, and
54
+ Neutral Variant, each with 13 tonal steps (0, 10, 20, 30, 40, 50, 60, 70, 80, 90,
55
+ 95, 99, 100).
56
+ 3. These palettes map to **color roles** (primary, onPrimary, primaryContainer, surface,
57
+ etc.) for both light and dark themes.
58
+ 4. Apps that enable dynamic color automatically receive a harmonized theme while retaining
59
+ the option to define fixed brand colors for specific elements (logos, illustrations).
60
+
61
+ Design implications:
62
+
63
+ - Never hard-code background or surface colors. Use semantic color roles so your UI adapts.
64
+ - Test your designs against multiple wallpapers (warm, cool, neutral, high-saturation) and
65
+ both light and dark themes.
66
+ - Use the **Material Theme Builder** (https://material-foundation.github.io/material-theme-builder/)
67
+ to preview dynamic color output and export theme tokens.
68
+
69
+ ### 1.3 Material You Design Tokens
70
+
71
+ Material Design 3 is a **token-first** system. Design tokens are the atomic values that
72
+ encode every visual decision -- color, typography, shape, motion -- and are referenced by
73
+ components rather than hard-coded.
74
+
75
+ #### Color Tokens
76
+
77
+ Color roles are organized into five groups derived from the five key colors:
78
+
79
+ | Group | Key Roles |
80
+ |------------------|------------------------------------------------------------------------|
81
+ | **Primary** | primary, onPrimary, primaryContainer, onPrimaryContainer |
82
+ | **Secondary** | secondary, onSecondary, secondaryContainer, onSecondaryContainer |
83
+ | **Tertiary** | tertiary, onTertiary, tertiaryContainer, onTertiaryContainer |
84
+ | **Error** | error, onError, errorContainer, onErrorContainer |
85
+ | **Surface** | surface, onSurface, surfaceVariant, onSurfaceVariant, surfaceDim, |
86
+ | | surfaceBright, surfaceContainerLowest, surfaceContainerLow, |
87
+ | | surfaceContainer, surfaceContainerHigh, surfaceContainerHighest |
88
+ | **Outline** | outline, outlineVariant |
89
+ | **Inverse** | inverseSurface, inverseOnSurface, inversePrimary |
90
+ | **Special** | scrim, shadow |
91
+
92
+ Usage guidance:
93
+
94
+ - **primary** -- high-emphasis actions (filled buttons, active states, FAB).
95
+ - **secondary** -- medium-emphasis elements (filter chips, toggles).
96
+ - **tertiary** -- contrasting accents that balance primary and secondary.
97
+ - **surface / surfaceContainer hierarchy** -- backgrounds, cards, sheets. The seven
98
+ surface-container tones create layered depth without relying on elevation shadows.
99
+ - **outline** -- borders and dividers; **outlineVariant** for lower emphasis.
100
+ - **on-*** roles -- text and icon color placed on top of its paired fill, ensuring
101
+ accessible contrast ratios.
102
+
103
+ #### Typography Tokens
104
+
105
+ See Section 4 for the full type scale.
106
+
107
+ #### Shape Tokens
108
+
109
+ The Material 3 shape system defines a 10-step corner-radius scale:
110
+
111
+ | Token | Value | Typical Usage |
112
+ |------------------------------|---------|------------------------------------------- |
113
+ | `shape.corner.none` | 0 dp | Sharp-cornered containers |
114
+ | `shape.corner.extraSmall` | 4 dp | Small utility elements |
115
+ | `shape.corner.small` | 8 dp | Chips, small cards |
116
+ | `shape.corner.medium` | 12 dp | Cards, dialogs |
117
+ | `shape.corner.large` | 16 dp | FABs, navigation drawers |
118
+ | `shape.corner.largeIncreased`| 20 dp | Emphasized containers |
119
+ | `shape.corner.extraLarge` | 28 dp | Bottom sheets, large cards |
120
+ | `shape.corner.extraLargeIncreased` | 32 dp | Hero surfaces |
121
+ | `shape.corner.extraExtraLarge` | 48 dp | Full-width sheets |
122
+ | `shape.corner.full` | 9999 dp | Pill shapes (search bars, badges) |
123
+
124
+ Material 3 Expressive pushes corner rounding further, favoring `large` and above for
125
+ primary interactive surfaces to create a softer, more approachable aesthetic.
126
+
127
+ #### Motion Tokens
128
+
129
+ Material 3 defines **easing** and **duration** token pairs:
130
+
131
+ **Duration tokens:**
132
+
133
+ | Token | Value | Use Case |
134
+ |----------------|---------|---------------------------------------- |
135
+ | `duration.short1` | 50 ms | Micro-interactions (ripple start) |
136
+ | `duration.short2` | 100 ms | Icon transitions |
137
+ | `duration.short3` | 150 ms | Small component state changes |
138
+ | `duration.short4` | 200 ms | Selection, toggle |
139
+ | `duration.medium1` | 250 ms | Component enter |
140
+ | `duration.medium2` | 300 ms | Standard transitions |
141
+ | `duration.medium3` | 350 ms | Complex component transitions |
142
+ | `duration.medium4` | 400 ms | Page-level transitions |
143
+ | `duration.long1` | 450 ms | Route changes |
144
+ | `duration.long2` | 500 ms | Large surface transitions |
145
+ | `duration.long3` | 550 ms | Full-screen transitions |
146
+ | `duration.long4` | 600 ms | Complex orchestrated sequences |
147
+ | `duration.extraLong1` | 700 ms | Dramatic reveals |
148
+ | `duration.extraLong2` | 800 ms | Hero transitions |
149
+ | `duration.extraLong3` | 900 ms | Onboarding sequences |
150
+ | `duration.extraLong4` | 1000 ms| Full orchestration |
151
+
152
+ **Easing families:**
153
+
154
+ - **Emphasized** -- the primary easing; asymmetric curve with slow start and fast end.
155
+ Used for most transitions where an element moves or transforms.
156
+ - **Emphasized Decelerate** -- elements entering the screen (decelerates into rest).
157
+ - **Emphasized Accelerate** -- elements exiting the screen (accelerates out of view).
158
+ - **Standard** -- symmetric ease-in-out for property changes that stay on screen (color,
159
+ opacity, scale without position change).
160
+ - **Standard Decelerate** -- entering elements for simple property changes.
161
+ - **Standard Accelerate** -- exiting elements for simple property changes.
162
+
163
+ **Spring system (Material 3 Expressive):**
164
+
165
+ Material 3 Expressive adds a spring-based motion model with three speed presets:
166
+
167
+ - **Fast spring** -- small component animations (switches, checkboxes).
168
+ - **Default spring** -- mid-size elements (cards, chips expanding).
169
+ - **Slow spring** -- full-screen transitions and route changes.
170
+
171
+ Spring physics create more natural, responsive motion than fixed cubic-bezier curves,
172
+ especially for gesture-driven interactions like drag-to-dismiss.
173
+
174
+ ### 1.4 What Makes a "Native-Feeling" Android App
175
+
176
+ A native-feeling Android app:
177
+
178
+ - Adopts **dynamic color** and responds to the user's theme (light/dark/wallpaper-based).
179
+ - Uses **Material 3 components** (FAB, bottom sheets, top app bars) rather than custom
180
+ recreations of iOS-style controls.
181
+ - Supports **edge-to-edge** rendering with proper inset handling.
182
+ - Implements the **predictive back gesture** with appropriate preview animations.
183
+ - Places primary navigation in a **bottom navigation bar** (phone) or **navigation rail**
184
+ (tablet/foldable) rather than a hamburger menu as the sole navigation.
185
+ - Respects the **8dp grid** and uses Material type scale tokens.
186
+ - Provides **haptic feedback** for meaningful interactions (toggle, long-press, delete).
187
+ - Integrates with the system: proper notifications, app shortcuts, widgets.
188
+
189
+ ### 1.5 Android 14 / 15 / 16 Design Updates
190
+
191
+ **Android 14 (API 34):**
192
+ - Predictive back gesture available behind Developer Options.
193
+ - Per-app language preferences with in-app UI.
194
+ - Improved font scaling for accessibility (non-linear scaling above 200%).
195
+ - Regional preferences support for localized formatting.
196
+
197
+ **Android 15 (API 35):**
198
+ - **Edge-to-edge enforcement** -- all apps targeting API 35 render edge-to-edge by
199
+ default. Apps must handle insets properly or face visual overlap.
200
+ - Predictive back system animations graduate from Developer Options and become active for
201
+ opted-in apps (back-to-home, cross-task, cross-activity).
202
+ - Richer widget APIs with improved preview and configuration.
203
+ - Improved large-screen and foldable support in the platform.
204
+
205
+ **Android 16 (API 36) -- Material 3 Expressive:**
206
+ - Fifteen new or updated components (button groups, FAB menus, split buttons, loading
207
+ indicators, toolbars).
208
+ - Spring-based motion physics system-wide.
209
+ - More vibrant, higher-contrast dynamic color palettes.
210
+ - Notification "Live Update" templates for real-time status updates.
211
+ - Enhanced blur, animation, and haptic feedback throughout the system UI.
212
+
213
+
214
+ ---
215
+
216
+ ## 2. Layout & Navigation Patterns
217
+
218
+ ### 2.1 Bottom Navigation Bar
219
+
220
+ The primary navigation pattern for phones with 3-5 top-level destinations.
221
+
222
+ | Property | Specification |
223
+ |-----------------------|-------------------------------------------------------|
224
+ | Height | 80 dp |
225
+ | Destinations | 3 to 5 (never fewer, never more) |
226
+ | Icon size | 24 dp |
227
+ | Label | Always visible (active and inactive); single line |
228
+ | Active indicator | Pill-shaped container behind the active icon |
229
+ | Active indicator shape| `shape.corner.full` (pill) |
230
+ | Placement | Bottom edge, spanning full width |
231
+ | Elevation | Surface tint (tone-based elevation) rather than shadow|
232
+
233
+ Design rules:
234
+
235
+ - Always show text labels. Icon-only bottom bars violate Material guidance and hurt
236
+ discoverability. Labels must be concise (1-2 words).
237
+ - The active destination uses a filled pill indicator behind the icon with
238
+ `secondaryContainer` fill.
239
+ - Do not place a bottom navigation bar alongside a navigation rail. Use one or the other
240
+ based on window-size class.
241
+ - Avoid placing a FAB that overlaps the navigation bar unless using a Bottom App Bar with
242
+ an integrated FAB cutout.
243
+ - Navigation bar items do not scroll. If you have more than 5 destinations, use a
244
+ navigation drawer.
245
+
246
+ ### 2.2 Navigation Rail
247
+
248
+ The primary navigation pattern for medium-width devices (tablets, foldables unfolded,
249
+ landscape phones). Replaces the bottom navigation bar at the medium window-size class
250
+ breakpoint (600dp+).
251
+
252
+ | Property | Specification |
253
+ |-----------------------|-------------------------------------------------------|
254
+ | Width | 80 dp |
255
+ | Destinations | 3 to 7 |
256
+ | Alignment | Top, center, or bottom within the rail |
257
+ | FAB slot | Optional FAB above destinations |
258
+ | Icon size | 24 dp |
259
+ | Label | Visible on active item (optionally all items) |
260
+ | Placement | Leading edge (start side) of the screen |
261
+
262
+ Design rules:
263
+
264
+ - Navigation rail always appears on the leading (start) edge of the layout.
265
+ - An optional FAB can be placed at the top of the rail above the navigation items.
266
+ - On large screens (840dp+), consider upgrading to a permanent navigation drawer.
267
+ - When the device is in portrait and the window width drops below 600dp, transition back
268
+ to a bottom navigation bar.
269
+
270
+ ### 2.3 Navigation Drawer
271
+
272
+ Used for apps with many destinations (more than 5) or for large-screen layouts (840dp+).
273
+ Three variants exist:
274
+
275
+ | Variant | Behavior |
276
+ |-----------------------|-------------------------------------------------------|
277
+ | **Standard** | Sits alongside content. Always visible on large screens. |
278
+ | **Modal** | Overlays content with a scrim. Triggered by menu icon or swipe from the leading edge. Dismisses on outside tap or back gesture. |
279
+ | **Dismissible** | Pushes content aside when opened. Can be toggled open/closed. No scrim. |
280
+
281
+ Design rules:
282
+
283
+ - Standard drawers are appropriate only when the window is wide enough (typically 1240dp+
284
+ or expanded window-size class) so content is not cramped.
285
+ - Modal drawers are the fallback for compact screens when the app has more than 5
286
+ destinations.
287
+ - The drawer opens from the **leading edge** only. Never place a drawer on the trailing
288
+ edge.
289
+ - Drawer width: 256-360dp, not exceeding `screenWidth - 56dp`.
290
+ - Include a header area for branding or user account info (optional).
291
+
292
+ ### 2.4 Top App Bar
293
+
294
+ Top app bars anchor the top of the screen and provide a title, navigation icon, and
295
+ action buttons.
296
+
297
+ Material 3 defines four variants:
298
+
299
+ | Variant | Height (collapsed) | Height (expanded) | Title Position |
300
+ |-----------------------|--------------------|--------------------|----------------------|
301
+ | **Center-aligned** | 64 dp | 64 dp (fixed) | Centered |
302
+ | **Small** | 64 dp | 64 dp (fixed) | Start-aligned |
303
+ | **Medium** | 64 dp | 112 dp | Start, below actions |
304
+ | **Large** | 64 dp | 152 dp | Start, below actions |
305
+
306
+ Design rules:
307
+
308
+ - **Center-aligned** is for simple screens with a short title and minimal actions. Use
309
+ sparingly; it is not a universal default.
310
+ - **Small** is the most common variant for general-purpose screens.
311
+ - **Medium** and **Large** are collapsing app bars that shrink to 64dp on scroll, creating
312
+ a dynamic, spatial effect.
313
+ - The navigation icon (hamburger or back arrow) sits at the start. Action icons sit at
314
+ the end. Limit action icons to 2-3; overflow the rest into a menu.
315
+ - On scroll, the top app bar should gain a `surfaceContainer` fill (tone-based elevation)
316
+ to separate it from content.
317
+
318
+ ### 2.5 Edge-to-Edge Design
319
+
320
+ Starting with Android 15 (API 35), **edge-to-edge is mandatory** for all apps targeting
321
+ the latest API. Content renders behind the status bar and navigation bar, and apps must
322
+ manage insets explicitly.
323
+
324
+ #### System Bars
325
+
326
+ | Bar | Behavior |
327
+ |-----------------------|-------------------------------------------------------|
328
+ | **Status bar** | Transparent; content draws behind it |
329
+ | **Navigation bar** | Transparent; gesture handle or 3-button bar |
330
+
331
+ #### Inset Types
332
+
333
+ | Inset Type | Purpose |
334
+ |------------------------------|--------------------------------------------------|
335
+ | `systemBars` | Combined status + navigation bar insets |
336
+ | `statusBars` | Status bar only |
337
+ | `navigationBars` | Navigation bar only |
338
+ | `systemGestures` | System gesture zones (back, home swipe) |
339
+ | `mandatorySystemGestures` | Non-overridable gesture areas (home indicator) |
340
+ | `displayCutout` | Camera cutout / notch |
341
+ | `ime` | Software keyboard |
342
+ | `safeDrawing` | Union of all insets -- the safest area for content|
343
+
344
+ #### Design Rules
345
+
346
+ - **Backgrounds and decorative elements** draw edge-to-edge, behind system bars.
347
+ - **Interactive content** (buttons, text fields, FABs) must be inset to avoid overlap
348
+ with system bars and gesture zones.
349
+ - **Scrollable lists** should use content padding (not clip padding) so items scroll
350
+ behind the status bar but rest position remains clear of system UI.
351
+ - **Bottom navigation bars** and **Bottom app bars** must account for navigation bar
352
+ insets in their own padding.
353
+ - Set system bar appearance (light/dark icons) based on your surface color so icons
354
+ remain legible.
355
+
356
+ ### 2.6 Foldable Device Considerations
357
+
358
+ Android foldable devices introduce the **fold** as a physical boundary. Designs must be
359
+ "fold-aware" to deliver quality experiences.
360
+
361
+ #### Window Size Classes
362
+
363
+ | Class | Width | Navigation Pattern |
364
+ |----------------|-----------------|-------------------------|
365
+ | **Compact** | < 600 dp | Bottom navigation bar |
366
+ | **Medium** | 600-839 dp | Navigation rail |
367
+ | **Expanded** | 840 dp+ | Navigation drawer/rail |
368
+
369
+ #### Canonical Layouts
370
+
371
+ Material Design provides three canonical layouts for adaptive design:
372
+
373
+ 1. **List-Detail** -- item list on the leading pane, detail on the trailing pane. Collapses
374
+ to single-pane on compact screens.
375
+ 2. **Feed** -- content cards arranged in a grid that reflows based on available width.
376
+ 3. **Supporting Pane** -- primary content area with a secondary supporting panel (e.g.,
377
+ a map with a location list).
378
+
379
+ #### Fold Postures
380
+
381
+ | Posture | Description | Design Guidance |
382
+ |----------------|------------------------------------|----------------------------------|
383
+ | **Flat** | Device fully unfolded | Use expanded layout |
384
+ | **Half-opened**| Hinge at ~90-degree angle | Split content at the fold line |
385
+ | **Tabletop** | Bottom half rests on surface | Controls below fold, content above |
386
+ | **Book** | Side-by-side like an open book | List-detail layout |
387
+
388
+ Design rules:
389
+
390
+ - Never place interactive elements directly on or across the fold/hinge area.
391
+ - Detect the fold position using `FoldingFeature` and adapt layout accordingly.
392
+ - Use `Compose Adaptive Layouts` library for built-in fold-aware layout strategies
393
+ (reflow, levitate).
394
+ - Test on both inner and outer displays of flip-style foldables.
395
+
396
+ ### 2.7 Predictive Back Gesture
397
+
398
+ Android 15 enforces the **predictive back gesture** for opted-in apps. When a user
399
+ begins a back swipe, the system shows a live preview of the destination before the
400
+ gesture completes, letting the user decide whether to commit.
401
+
402
+ Built-in predictive back animations:
403
+
404
+ | Animation | Trigger |
405
+ |--------------------|------------------------------------------------------|
406
+ | **Back-to-home** | Back gesture from the app's root; shows home screen preview |
407
+ | **Cross-activity** | Back gesture navigates to a previous activity |
408
+ | **Cross-task** | Back gesture navigates to a previous task |
409
+ | **Custom** | App-defined transitions (e.g., closing a bottom sheet)|
410
+
411
+ Design rules:
412
+
413
+ - Ensure all back-navigation paths are properly declared so the system can animate them.
414
+ - Design transitions that make sense in reverse: if a screen slides in from the right,
415
+ predictive back should show it sliding back to the right.
416
+ - Bottom sheets, side sheets, and modals should support predictive-back dismissal with a
417
+ shrink/slide animation.
418
+ - Avoid overriding the back gesture for custom behavior unless absolutely necessary.
419
+ Users expect back to behave consistently.
420
+ - The gesture originates from the left or right screen edge (user-configurable). Reserve
421
+ edge-adjacent swipe gestures for navigation drawers only on the leading edge.
422
+
423
+
424
+ ---
425
+
426
+ ## 3. Component Conventions
427
+
428
+ ### 3.1 Floating Action Button (FAB)
429
+
430
+ The FAB represents the single most important action on a screen. It floats above content
431
+ and should be used sparingly (one per screen maximum).
432
+
433
+ | Variant | Size | Shape | Content |
434
+ |----------------|----------------|---------------------------|------------------|
435
+ | **FAB** | 56 x 56 dp | `large` (16dp radius) | Icon only |
436
+ | **Small FAB** | 40 x 40 dp | `medium` (12dp radius) | Icon only |
437
+ | **Large FAB** | 96 x 96 dp | `extraLarge` (28dp radius)| Icon only |
438
+ | **Extended FAB**| 56 dp height | `large` (16dp radius) | Icon + label |
439
+
440
+ Design rules:
441
+
442
+ - Use `primaryContainer` as the default FAB color. The icon uses `onPrimaryContainer`.
443
+ - Position the FAB at the bottom-end corner, 16dp from the edge, above the bottom
444
+ navigation bar.
445
+ - The Extended FAB should collapse to a regular FAB on scroll to save space.
446
+ - Only one FAB per screen. If you need multiple actions, use a FAB menu (M3 Expressive)
447
+ or a bottom app bar with action icons.
448
+ - The FAB should not be used for destructive actions (delete, cancel) or minor utility
449
+ actions (search, settings).
450
+
451
+ ### 3.2 Bottom Sheets
452
+
453
+ Bottom sheets are surfaces anchored to the bottom of the screen that present supplementary
454
+ content or actions.
455
+
456
+ | Variant | Behavior |
457
+ |----------------|--------------------------------------------------------------|
458
+ | **Standard** | Coexists with primary content. Both regions are interactive simultaneously. Used for persistent secondary content (e.g., music player mini-view, map controls). |
459
+ | **Modal** | Blocks interaction with primary content. A scrim covers the background. Must be dismissed before the user can interact with the main surface. Used for contextual menus, confirmation dialogs, deep-linked content. |
460
+
461
+ Design rules:
462
+
463
+ - Bottom sheets use `surfaceContainerLow` fill and `extraLarge` (28dp) top corner radius.
464
+ - Include a **drag handle** (32 x 4 dp, centered, 22dp from top) for discoverability.
465
+ - Modal bottom sheets must support dismissal via: drag down, scrim tap, back gesture.
466
+ - Standard bottom sheets can be expanded/collapsed programmatically and by drag.
467
+ - Maximum height: full screen minus status bar. Half-expanded state should show enough
468
+ content to be useful without full expansion.
469
+ - On tablets/large screens, consider using a **side sheet** instead.
470
+
471
+ ### 3.3 Snackbars
472
+
473
+ Snackbars provide brief, non-blocking feedback at the bottom of the screen.
474
+
475
+ Design rules:
476
+
477
+ - Appear above FABs and bottom navigation (anchor to the FAB or nav bar).
478
+ - Duration: 4-10 seconds; dismiss automatically or on swipe.
479
+ - Single line preferred. Two-line maximum with a longer action button on the second line.
480
+ - Use `inverseSurface` background with `inverseOnSurface` text for high contrast against
481
+ the page.
482
+ - One optional action (e.g., "Undo"). Never include a dismiss icon and an action
483
+ simultaneously -- the action IS the dismiss trigger.
484
+ - Never stack multiple snackbars. Queue them sequentially.
485
+
486
+ ### 3.4 Material 3 Component Library
487
+
488
+ #### Cards
489
+
490
+ Three variants: **Elevated**, **Filled**, **Outlined**.
491
+
492
+ | Variant | Fill | Border | Elevation |
493
+ |------------|-------------------------|-----------------|-----------|
494
+ | Elevated | surfaceContainerLow | none | Level 1 |
495
+ | Filled | surfaceContainerHighest | none | Level 0 |
496
+ | Outlined | surface | outlineVariant | Level 0 |
497
+
498
+ - Cards are containers for related content and actions about a single subject.
499
+ - Touch target: entire card surface is tappable for the primary action.
500
+ - Minimum height: 48dp (to meet touch target requirements).
501
+
502
+ #### Chips
503
+
504
+ Four types: **Assist**, **Filter**, **Input**, **Suggestion**.
505
+
506
+ - Assist chips trigger smart or automated actions (e.g., "Add to calendar").
507
+ - Filter chips narrow content using tags or categories. Multi-select is allowed.
508
+ - Input chips represent user-entered information (e.g., email recipients in a compose
509
+ field).
510
+ - Suggestion chips offer dynamically generated recommendations.
511
+ - Height: 32dp. Corner radius: `small` (8dp). Minimum touch target: 48dp.
512
+
513
+ #### Dialogs
514
+
515
+ - Basic dialogs present a title, supporting text, and up to 3 actions.
516
+ - Full-screen dialogs are used for complex tasks requiring multiple inputs.
517
+ - Corner radius: `extraLarge` (28dp).
518
+ - Scrim: `scrim` color at 32% opacity.
519
+ - Dialogs use `surfaceContainerHigh` fill.
520
+ - Action buttons are right-aligned. The confirming action is the rightmost button.
521
+ - Avoid nesting dialogs or launching dialogs from within bottom sheets.
522
+
523
+ #### Menus
524
+
525
+ - Dropdown menus appear from a trigger (icon button, text field, chip).
526
+ - Maximum 10 visible items; after that, the menu scrolls.
527
+ - Width: 112-280dp, adjusting to content.
528
+ - Corner radius: `extraSmall` (4dp).
529
+ - Menus appear below and aligned to the start of the trigger by default.
530
+
531
+ #### Sliders
532
+
533
+ - Continuous sliders for selecting a value from a range.
534
+ - Discrete sliders snap to predefined increments (displayed as tick marks).
535
+ - Track height: 4dp active, 4dp inactive.
536
+ - Thumb size: 20dp diameter (44dp touch target).
537
+ - Always provide a visible value label for discrete sliders.
538
+
539
+ #### Switches
540
+
541
+ - Track width: 52dp. Track height: 32dp. Thumb diameter: 24dp (28dp when pressed).
542
+ - Use `primary` fill for the active track, `surfaceContainerHighest` for inactive.
543
+ - Switches are self-contained toggles -- they should not require a separate "Save" action.
544
+ - Place switches at the trailing end of a list item, right-aligned.
545
+
546
+ ### 3.5 Android-Specific Gestures
547
+
548
+ | Gesture | System Behavior | Design Guidance |
549
+ |--------------------|------------------------------------------------------|----------------|
550
+ | **Back gesture** | Swipe from left or right edge to navigate back | Support predictive back. Never hijack for custom drawer open from trailing edge. |
551
+ | **Long press** | Opens contextual menu or selection mode | Provide haptic feedback. Show a contextual action bar or popup menu. |
552
+ | **Drag** | Reorder items, move elements, drag-to-dismiss | Show a drag handle affordance. Provide haptic pulse on pickup and drop. |
553
+ | **Swipe to dismiss**| Dismiss notifications, snackbars, bottom sheets | Horizontal swipe for items in lists. Vertical swipe for bottom sheets. |
554
+ | **Double tap** | Zoom in (maps, images, text) | Reserve for zoom contexts only. |
555
+ | **Pinch** | Scale content (maps, images, PDFs) | Always pair with double-tap zoom as a fallback. |
556
+
557
+ ### 3.6 System Integration
558
+
559
+ #### Notifications
560
+
561
+ - Group related notifications into a **channel** with an appropriate importance level.
562
+ - Importance levels: Urgent (sound + heads-up), High (sound), Default (sound, no pop),
563
+ Low (silent), Min (silent, minimized).
564
+ - Use **MessagingStyle** for conversations, **BigTextStyle** for long content,
565
+ **BigPictureStyle** for images.
566
+ - Notification icons must be **monochrome** (white on transparent) vector drawables, 24dp.
567
+ - On Android 16, use **Live Update** notification templates for real-time status
568
+ (delivery tracking, rideshare, sports scores).
569
+ - Always include a `contentIntent` (tap action) and consider adding action buttons (max 3).
570
+
571
+ #### App Widgets
572
+
573
+ - Design widgets to respect the home screen grid (minimum 2x1 cells).
574
+ - Provide resizable widgets using `minWidth`, `minHeight`, `maxResizeWidth`,
575
+ `maxResizeHeight`.
576
+ - Use rounded corners matching `shape.corner.extraLarge` (28dp) for the widget container.
577
+ - Widgets should have internal padding of 8-16dp and leave margins between the widget
578
+ boundary and content.
579
+ - Provide a meaningful **preview image** and a **configuration activity** if the widget
580
+ has settings.
581
+ - Widgets should use the app's dynamic color theme when available.
582
+
583
+ #### App Shortcuts
584
+
585
+ - Provide up to 4 static shortcuts and additional dynamic shortcuts (combined max varies
586
+ by launcher but aim for 4-5 total).
587
+ - Shortcut icons must be **adaptive icons** (foreground + background layers).
588
+ - Short label: max 10 characters. Long label: max 25 characters.
589
+ - Shortcuts appear on long-press of the app icon.
590
+
591
+ #### Quick Settings Tiles
592
+
593
+ - Tile icons must be **solid white on transparent background**, 24dp vector drawable.
594
+ - Maximum 2 tiles per app. Do not create tiles for features users access rarely.
595
+ - Tiles represent toggle-able states or quick-launch actions, not informational displays.
596
+ Use notifications or widgets for status information.
597
+ - Active tile uses the system accent color; inactive tiles are neutral gray.
598
+
599
+
600
+ ---
601
+
602
+ ## 4. Typography & Spacing System
603
+
604
+ ### 4.1 Material Design 3 Type Scale
605
+
606
+ Material 3 defines 15 type styles across 5 roles, each in three sizes:
607
+
608
+ | Role | Size | Default Font | Weight | Size (sp) | Line Height (sp) | Tracking (sp) |
609
+ |-------------|--------|---------------|---------|-----------|-------------------|---------------|
610
+ | **Display** | Large | Roboto | Regular | 57 | 64 | -0.25 |
611
+ | **Display** | Medium | Roboto | Regular | 45 | 52 | 0 |
612
+ | **Display** | Small | Roboto | Regular | 36 | 44 | 0 |
613
+ | **Headline**| Large | Roboto | Regular | 32 | 40 | 0 |
614
+ | **Headline**| Medium | Roboto | Regular | 28 | 36 | 0 |
615
+ | **Headline**| Small | Roboto | Regular | 24 | 32 | 0 |
616
+ | **Title** | Large | Roboto | Regular | 22 | 28 | 0 |
617
+ | **Title** | Medium | Roboto | Medium | 16 | 24 | 0.15 |
618
+ | **Title** | Small | Roboto | Medium | 14 | 20 | 0.1 |
619
+ | **Body** | Large | Roboto | Regular | 16 | 24 | 0.5 |
620
+ | **Body** | Medium | Roboto | Regular | 14 | 20 | 0.25 |
621
+ | **Body** | Small | Roboto | Regular | 12 | 16 | 0.4 |
622
+ | **Label** | Large | Roboto | Medium | 14 | 20 | 0.1 |
623
+ | **Label** | Medium | Roboto | Medium | 12 | 16 | 0.5 |
624
+ | **Label** | Small | Roboto | Medium | 11 | 16 | 0.5 |
625
+
626
+ Usage guidance:
627
+
628
+ - **Display** -- reserved for short, impactful text on large screens (hero numbers,
629
+ feature titles). Rarely used on phone-sized screens.
630
+ - **Headline** -- section headings, screen titles in medium/large top app bars.
631
+ - **Title** -- card titles, dialog titles, list item primary text (Title Medium/Small).
632
+ - **Body** -- paragraph text, descriptions, long-form content. Body Large is the
633
+ recommended default for readability.
634
+ - **Label** -- buttons, chips, tabs, captions, navigation bar labels. Label Large for
635
+ buttons, Label Medium for chips.
636
+
637
+ ### 4.2 Roboto and System Font
638
+
639
+ - **Roboto** remains the default Android system font and the Material Design standard.
640
+ - **Roboto Flex** is the variable-font successor used in Material 3 Expressive, enabling
641
+ continuous weight and width adjustments.
642
+ - Only **Regular (400)** and **Medium (500)** weights are used in the default type scale.
643
+ Bold is not part of the standard scale (use Medium for emphasis).
644
+ - Apps may substitute brand fonts for Display and Headline styles while keeping Roboto for
645
+ Body and Label for optimal readability.
646
+ - Always use `sp` (scale-independent pixels) for text, never `dp`, to respect the user's
647
+ font-size accessibility setting.
648
+ - Android 14+ uses **non-linear font scaling** above 200% -- large text sizes scale less
649
+ aggressively than small text to prevent layout breakage. Test at 200% font scale.
650
+
651
+ ### 4.3 The 8dp Grid and 4dp Sub-Grid
652
+
653
+ Material Design is built on an **8dp baseline grid**:
654
+
655
+ - All spacing, padding, margins, and component dimensions should be multiples of 8dp.
656
+ - Use **4dp** for fine adjustments (icon internal padding, text alignment nudges, small
657
+ gaps between tightly coupled elements like a label and its helper text).
658
+ - Common spacing values: 4, 8, 12, 16, 24, 32, 48, 64 dp.
659
+
660
+ Avoid non-standard increments like 5dp, 6dp, 10dp, or 15dp. These break visual rhythm
661
+ and create inconsistencies when components are placed adjacent to each other.
662
+
663
+ ### 4.4 Screen Margins and Content Padding
664
+
665
+ | Context | Margin / Padding |
666
+ |-----------------------|------------------------------------------------------|
667
+ | Screen horizontal margin | 16 dp (compact), 24 dp (medium), 24-32 dp (expanded) |
668
+ | Card internal padding | 16 dp |
669
+ | List item padding | 16 dp horizontal, 8-12 dp vertical |
670
+ | Dialog padding | 24 dp |
671
+ | Bottom sheet padding | 16-24 dp |
672
+ | Between cards in a grid| 8 dp gap |
673
+ | Section spacing | 24-32 dp vertical |
674
+
675
+ Touch targets:
676
+
677
+ - Minimum touch target: **48 x 48 dp** regardless of visual size.
678
+ - Recommended touch target for primary actions: **56 dp** (the FAB standard).
679
+ - For dense UIs (data tables), touch targets can be reduced to **40 dp** height but
680
+ this should be the exception, not the default.
681
+
682
+
683
+ ---
684
+
685
+ ## 5. Common Mistakes
686
+
687
+ ### 5.1 iOS Patterns Forced on Android
688
+
689
+ | Mistake | Why It Fails on Android | Correct Approach |
690
+ |------------------------------------------|-----------------------------------------------------|-----------------------------------------|
691
+ | Icon-only bottom tab bar (no labels) | Material guidelines require labels for discoverability. Users do not universally recognize custom icons. | Always show text labels on navigation bar items. |
692
+ | iOS-style "< Back" text button in the top-left | Android uses a back arrow icon or relies on the system back gesture. Text back buttons look foreign. | Use a leading arrow icon in the top app bar or rely on system back gesture. |
693
+ | iOS-style segmented control for top-level navigation | Android uses Material tabs (fixed or scrollable) for in-page filtering. | Use Material 3 Tabs or Chips. |
694
+ | Swipe-from-left-edge to open drawer everywhere | Conflicts with the system back gesture on Android. | Use a hamburger icon button to toggle the modal drawer. Leading-edge swipe should only supplement, not replace, the back gesture. |
695
+ | Full-screen modal for every sub-flow | Android prefers new activities/screens with top app bar back navigation, or bottom sheets for lightweight flows. | Use appropriately-sized surfaces: bottom sheets for simple choices, new screens for complex flows. |
696
+ | Action sheet rising from bottom for destructive actions | Android uses dialogs for confirmations and menus for selections, not iOS-style action sheets. | Use a Material 3 Dialog for destructive confirmations. Use a dropdown or bottom-sheet menu for selections. |
697
+ | Pull-down-to-refresh as the only refresh mechanism | Acceptable on Android, but do not animate it with a custom iOS-style spinner. | Use `SwipeRefresh` with the Material 3 circular progress indicator. |
698
+ | Non-Material toggle styles (iOS-style pill toggle) | Looks out of place on Android and breaks consistency. | Use Material 3 Switch component. |
699
+
700
+ ### 5.2 Ignoring Material You Dynamic Color
701
+
702
+ - Hard-coding colors (hex values) for surfaces, backgrounds, and containers instead of
703
+ using semantic color roles.
704
+ - Not testing against multiple wallpaper palettes -- an app may look fine on a blue theme
705
+ but unreadable on a yellow one.
706
+ - Not supporting dark theme. Dynamic color generates both light and dark variants; your
707
+ app should honor both.
708
+ - Ignoring `surfaceContainer` hierarchy and using a flat, single surface color for all
709
+ backgrounds, losing the depth and layering that Material 3 provides.
710
+ - Overriding dynamic color for every element instead of using it as the base and applying
711
+ fixed brand colors only where necessary (logos, illustrations, branded CTAs).
712
+
713
+ ### 5.3 Not Supporting Edge-to-Edge
714
+
715
+ - Content (especially FABs, bottom sheets, and list items) overlapping with the
716
+ navigation bar or status bar because insets are not handled.
717
+ - Hard-coding status bar color to a solid brand color instead of making it transparent
718
+ and letting content scroll beneath it.
719
+ - Not testing with 3-button navigation (which has a larger navigation bar) alongside
720
+ gesture navigation (which has only a thin handle).
721
+ - Ignoring the display cutout/notch -- content hidden behind camera hardware.
722
+ - Not padding the IME (keyboard) inset, causing text fields to be obscured when the
723
+ keyboard appears.
724
+
725
+ ### 5.4 Other Common Pitfalls
726
+
727
+ - **Ignoring the 48dp minimum touch target.** Tiny tap targets cause user frustration and
728
+ accessibility failures.
729
+ - **Using elevation shadows instead of tone-based elevation.** Material 3 replaced shadow
730
+ elevation with surface-tint elevation (higher surfaces get a lighter tint of primary).
731
+ Shadows are still used for FABs and overlapping surfaces, but not for cards or app bars.
732
+ - **Overloading the top app bar with too many action icons.** Limit to 2-3 icons; overflow
733
+ the rest into a "more" menu.
734
+ - **Not providing haptic feedback.** Switches, long-press actions, and drag operations
735
+ should trigger appropriate haptic responses.
736
+ - **Placing destructive actions in a FAB.** The FAB is for primary, constructive actions
737
+ only.
738
+ - **Ignoring foldable and tablet layouts.** Over 300 million large-screen Android devices
739
+ are in active use. Stretched phone layouts look broken on tablets.
740
+ - **Misusing navigation drawers on phones.** A hamburger menu as the sole navigation on a
741
+ phone reduces discoverability. Prefer a bottom navigation bar for 3-5 destinations and
742
+ reserve the drawer for supplementary destinations.
743
+ - **Skipping predictive back support.** Apps that intercept the back gesture without
744
+ implementing OnBackPressedCallback correctly will show broken animations or no preview.
745
+
746
+
747
+ ---
748
+
749
+ ## 6. Android Design Correctness Checklist
750
+
751
+ Use this checklist to verify that a design follows current Android and Material Design 3
752
+ conventions before handoff to development.
753
+
754
+ ### Theme & Color
755
+ - [ ] App supports **dynamic color** (Material You) and falls back to a branded static
756
+ theme on devices below Android 12.
757
+ - [ ] Both **light and dark** themes are fully designed and tested.
758
+ - [ ] All colors use **semantic color roles** (primary, surface, etc.) rather than
759
+ hard-coded hex values for theme-aware surfaces.
760
+ - [ ] Tested with at least 3 different wallpaper palettes (warm, cool, neutral) in both
761
+ light and dark modes.
762
+
763
+ ### Layout & Navigation
764
+ - [ ] Navigation pattern matches window-size class: **bottom nav** (compact),
765
+ **navigation rail** (medium), **drawer or expanded rail** (expanded).
766
+ - [ ] Layouts use one of the three **canonical layouts** (list-detail, feed, supporting
767
+ pane) for adaptive design.
768
+ - [ ] All screens render **edge-to-edge** with proper inset handling for status bar,
769
+ navigation bar, display cutout, and IME.
770
+ - [ ] **Predictive back gesture** is supported with appropriate preview animations for
771
+ all back-navigation paths.
772
+
773
+ ### Components
774
+ - [ ] FAB is used for the **single primary action** only; no destructive or minor utility
775
+ actions in the FAB.
776
+ - [ ] Bottom navigation bar shows **text labels** on all items (active and inactive).
777
+ - [ ] Top app bar uses a **Material 3 variant** (center-aligned, small, medium, or large)
778
+ with 2-3 action icons maximum.
779
+ - [ ] Dialogs, bottom sheets, and menus use the correct **Material 3 shape tokens**
780
+ (extraLarge corners for sheets, extraSmall for menus).
781
+ - [ ] Snackbars appear **above the FAB and bottom nav**, not behind them.
782
+
783
+ ### Typography & Spacing
784
+ - [ ] All text uses the **Material 3 type scale** tokens (Display, Headline, Title, Body,
785
+ Label) in `sp` units.
786
+ - [ ] Spacing follows the **8dp grid** (4dp for fine adjustments only).
787
+ - [ ] Screen margins are **16dp minimum** on compact screens, 24dp on medium/expanded.
788
+ - [ ] All interactive elements meet the **48dp minimum touch target**.
789
+
790
+ ### System Integration
791
+ - [ ] Notifications use appropriate **channels and importance levels**, with correct
792
+ styles (MessagingStyle, BigTextStyle, etc.).
793
+ - [ ] App widgets use **rounded corners** (28dp), are **resizable**, and include a preview.
794
+ - [ ] App shortcuts (long-press launcher icon) are provided for top user tasks.
795
+ - [ ] Haptic feedback is provided for toggles, long-press, and drag interactions.
796
+
797
+ ### Accessibility & Adaptiveness
798
+ - [ ] Tested at **200% font scale** (non-linear scaling on Android 14+) without layout
799
+ breakage.
800
+ - [ ] Foldable devices: layout adapts to fold postures (tabletop, book) and avoids
801
+ placing content across the hinge.
802
+ - [ ] Color contrast meets **WCAG AA** (4.5:1 for body text, 3:1 for large text and UI
803
+ components).
804
+ - [ ] All images and icons have meaningful **content descriptions** for screen readers.
805
+
806
+
807
+ ---
808
+
809
+ ## References
810
+
811
+ - Material Design 3 Foundations: https://m3.material.io/foundations
812
+ - Material Design 3 Components: https://m3.material.io/components
813
+ - Material Design 3 Color Roles: https://m3.material.io/styles/color/roles
814
+ - Material Design 3 Typography: https://m3.material.io/styles/typography/applying-type
815
+ - Material Design 3 Shape: https://m3.material.io/styles/shape/corner-radius-scale
816
+ - Material Design 3 Motion: https://m3.material.io/styles/motion/easing-and-duration/tokens-specs
817
+ - Material Design 3 Expressive: https://m3.material.io (Android 16 update)
818
+ - Android Edge-to-Edge Design: https://developer.android.com/design/ui/mobile/guides/layout-and-content/edge-to-edge
819
+ - Predictive Back Gesture: https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back
820
+ - Android System Bars: https://developer.android.com/design/ui/mobile/guides/foundations/system-bars
821
+ - Android Foldable Design: https://developer.android.com/develop/ui/compose/layouts/adaptive/foldables/learn-about-foldables
822
+ - Android Notifications: https://developer.android.com/design/ui/mobile/guides/home-screen/notifications
823
+ - Material Design 3 in Compose: https://developer.android.com/develop/ui/compose/designsystems/material3
824
+ - Material Theme Builder: https://material-foundation.github.io/material-theme-builder/
825
+ - Material 3 Expressive Deep Dive: https://www.androidauthority.com/google-material-3-expressive-features-changes-availability-supported-devices-3556392/