stylegallery 0.1.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 (346) hide show
  1. package/AGENTS.md +156 -0
  2. package/CATALOG.md +69 -0
  3. package/DOMAINS.md +65 -0
  4. package/GOVERNANCE.md +222 -0
  5. package/GUIDE.md +59 -0
  6. package/README.md +313 -0
  7. package/consumer-reference/adapters/style-dictionary.config.mjs +36 -0
  8. package/consumer-reference/agent-native/README.md +157 -0
  9. package/consumer-reference/agent-native/registry.json +640 -0
  10. package/consumer-reference/agent-native/schema/agent-native.schema.json +848 -0
  11. package/consumer-reference/agent-native/schema/epistemic.schema.json +14 -0
  12. package/consumer-reference/agent-native/schema/execution.schema.json +12 -0
  13. package/consumer-reference/agent-native/schema/identity.schema.json +10 -0
  14. package/consumer-reference/agent-native/schema/learning.schema.json +12 -0
  15. package/consumer-reference/agent-native/schema/manifest.schema.json +6 -0
  16. package/consumer-reference/agent-native/schema/operation.schema.json +12 -0
  17. package/consumer-reference/agent-native/schema/protocol-binding.schema.json +9 -0
  18. package/consumer-reference/agent-native/schema/retrieval.schema.json +10 -0
  19. package/consumer-reference/baselines/calibration.json +260 -0
  20. package/consumer-reference/baselines/manifest.json +21 -0
  21. package/consumer-reference/contract.md +83 -0
  22. package/consumer-reference/fixtures/consumer-conformance/e2e-fixture.mjs +282 -0
  23. package/consumer-reference/fixtures/consumer-conformance/manifest.json +102 -0
  24. package/consumer-reference/fixtures/consumer-conformance/runtime-proof.mjs +32 -0
  25. package/consumer-reference/fixtures/consumer-conformance/valid-migration-result.json +18 -0
  26. package/consumer-reference/fixtures/consumer-conformance/valid-migration.json +142 -0
  27. package/consumer-reference/fixtures/invalid-stable-ended-support.json +19 -0
  28. package/consumer-reference/fixtures/promotion/invalid-blocking-evidence.json +26 -0
  29. package/consumer-reference/fixtures/promotion/invalid-count-only.json +29 -0
  30. package/consumer-reference/fixtures/promotion/invalid-missing-owner-migration.json +25 -0
  31. package/consumer-reference/fixtures/promotion/invalid-normative-bypass-no-regression.json +25 -0
  32. package/consumer-reference/fixtures/promotion/invalid-related-counted-independent.json +45 -0
  33. package/consumer-reference/fixtures/promotion/invalid-stable-ended-support.json +26 -0
  34. package/consumer-reference/fixtures/promotion/manifest.json +15 -0
  35. package/consumer-reference/fixtures/promotion/valid-deferred-example.json +67 -0
  36. package/consumer-reference/fixtures/promotion/valid-normative-bypass.json +67 -0
  37. package/consumer-reference/fixtures/token-portability/invalid-cycle.json +7 -0
  38. package/consumer-reference/fixtures/token-portability/invalid-dangling-alias.json +6 -0
  39. package/consumer-reference/fixtures/token-portability/invalid-extends.json +4 -0
  40. package/consumer-reference/fixtures/token-portability/invalid-json-pointer.json +7 -0
  41. package/consumer-reference/fixtures/token-portability/invalid-resolver.json +9 -0
  42. package/consumer-reference/fixtures/token-portability/invalid-type-mismatch.json +10 -0
  43. package/consumer-reference/fixtures/token-portability/invalid-unknown-reserved.json +6 -0
  44. package/consumer-reference/fixtures/token-portability/invalid-untested-type.json +6 -0
  45. package/consumer-reference/fixtures/token-portability/valid-border.json +14 -0
  46. package/consumer-reference/fixtures/token-portability/valid-reference.json +32 -0
  47. package/consumer-reference/fixtures/token-portability/valid-whole-alias.json +7 -0
  48. package/consumer-reference/fixtures/valid-deprecated.json +21 -0
  49. package/consumer-reference/fixtures/valid-experimental.json +19 -0
  50. package/consumer-reference/generated/manifest.json +40 -0
  51. package/consumer-reference/generated/tokens.css +12 -0
  52. package/consumer-reference/index.md +32 -0
  53. package/consumer-reference/policies/shared-experimental.json +37 -0
  54. package/consumer-reference/schema/ax-evidence.schema.json +30 -0
  55. package/consumer-reference/schema/baseline-manifest.schema.json +55 -0
  56. package/consumer-reference/schema/calibration-record.schema.json +190 -0
  57. package/consumer-reference/schema/capture-session.schema.json +161 -0
  58. package/consumer-reference/schema/component-state.schema.json +150 -0
  59. package/consumer-reference/schema/consumer-conformance-record.schema.json +365 -0
  60. package/consumer-reference/schema/dom-evidence.schema.json +38 -0
  61. package/consumer-reference/schema/evidence-record.schema.json +81 -0
  62. package/consumer-reference/schema/fixture-manifest.schema.json +32 -0
  63. package/consumer-reference/schema/item.schema.json +188 -0
  64. package/consumer-reference/schema/page-evidence-manifest.schema.json +216 -0
  65. package/consumer-reference/schema/page-evidence-session.schema.json +119 -0
  66. package/consumer-reference/schema/portable-tokens.schema.json +104 -0
  67. package/consumer-reference/schema/promotion-rfc.schema.json +219 -0
  68. package/consumer-reference/schema/runtime-evidence-manifest.schema.json +33 -0
  69. package/consumer-reference/schema/visual-evidence.schema.json +31 -0
  70. package/design-engineering/consumer-migration-readiness.md +124 -0
  71. package/design-engineering/index.md +28 -0
  72. package/design-engineering/interface-craft.md +107 -0
  73. package/design-engineering/reference-profiles/external-adaptation/index.md +12 -0
  74. package/design-engineering/reference-profiles/governed-local/editorial/components/button.component.json +125 -0
  75. package/design-engineering/reference-profiles/governed-local/editorial/evidence/button.evidence.json +3504 -0
  76. package/design-engineering/reference-profiles/governed-local/editorial/fixtures/button.fixture.json +65 -0
  77. package/design-engineering/reference-profiles/governed-local/editorial/generated/evidence-coverage.md +23 -0
  78. package/design-engineering/reference-profiles/governed-local/editorial/generated/keyboard-matrix.md +19 -0
  79. package/design-engineering/reference-profiles/governed-local/editorial/generated/state-matrix.md +21 -0
  80. package/design-engineering/reference-profiles/governed-local/editorial/local-foundations.json +12 -0
  81. package/design-engineering/reference-profiles/governed-local/editorial/profile.json +43 -0
  82. package/design-engineering/reference-profiles/governed-local/editorial/states/button.states.json +195 -0
  83. package/design-engineering/reference-profiles/governed-local/editorial/tokens.dtcg.json +17 -0
  84. package/design-engineering/reference-profiles/governed-local/index.md +26 -0
  85. package/design-engineering/reference-profiles/governed-local/terminal/components/button.component.json +125 -0
  86. package/design-engineering/reference-profiles/governed-local/terminal/evidence/button.evidence.json +3504 -0
  87. package/design-engineering/reference-profiles/governed-local/terminal/fixtures/button.fixture.json +65 -0
  88. package/design-engineering/reference-profiles/governed-local/terminal/generated/evidence-coverage.md +23 -0
  89. package/design-engineering/reference-profiles/governed-local/terminal/generated/keyboard-matrix.md +19 -0
  90. package/design-engineering/reference-profiles/governed-local/terminal/generated/state-matrix.md +21 -0
  91. package/design-engineering/reference-profiles/governed-local/terminal/local-foundations.json +12 -0
  92. package/design-engineering/reference-profiles/governed-local/terminal/profile.json +43 -0
  93. package/design-engineering/reference-profiles/governed-local/terminal/states/button.states.json +195 -0
  94. package/design-engineering/reference-profiles/governed-local/terminal/tokens.dtcg.json +17 -0
  95. package/design-engineering/reference-profiles/index.md +19 -0
  96. package/game-ui/classification.md +82 -0
  97. package/game-ui/index.md +35 -0
  98. package/game-ui/reference-record.md +62 -0
  99. package/game-ui/screen-hierarchy.md +107 -0
  100. package/game-ui/unity/architecture.md +166 -0
  101. package/game-ui/unity/cli-loop.md +84 -0
  102. package/game-ui/unity/data/unity-technologies-public-repositories.json +26654 -0
  103. package/game-ui/unity/org-wiki.md +146 -0
  104. package/game-ui/unity/repository-map.md +102 -0
  105. package/game-ui/unity/ui-systems.md +85 -0
  106. package/guides/decision-tree.md +149 -0
  107. package/guides/documentation-mode-taxonomy.md +157 -0
  108. package/guides/layout-brief.md +220 -0
  109. package/guides/vocabulary.md +148 -0
  110. package/guides/webpage-generation-workflow.md +185 -0
  111. package/index.md +36 -0
  112. package/layout/index.md +26 -0
  113. package/motion/index.md +24 -0
  114. package/motion/practice-reference.md +145 -0
  115. package/motion/review-workflow.md +86 -0
  116. package/motion/vocabulary.md +82 -0
  117. package/package.json +78 -0
  118. package/patterns/centering/center.md +87 -0
  119. package/patterns/centering/index.md +6 -0
  120. package/patterns/centering/super-center.md +89 -0
  121. package/patterns/containment/box.md +87 -0
  122. package/patterns/containment/clamped-card.md +86 -0
  123. package/patterns/containment/content-limiter.md +87 -0
  124. package/patterns/containment/fluid-styles.md +86 -0
  125. package/patterns/containment/index.md +8 -0
  126. package/patterns/grid-repetition/card-grid.md +88 -0
  127. package/patterns/grid-repetition/columns.md +87 -0
  128. package/patterns/grid-repetition/dense-grid.md +88 -0
  129. package/patterns/grid-repetition/grid-wrapper.md +89 -0
  130. package/patterns/grid-repetition/index.md +12 -0
  131. package/patterns/grid-repetition/masonry-approx.md +87 -0
  132. package/patterns/grid-repetition/page-grid.md +90 -0
  133. package/patterns/grid-repetition/ram-grid.md +88 -0
  134. package/patterns/grid-repetition/twelve-span-grid.md +92 -0
  135. package/patterns/in-line-grouping/badge-list.md +94 -0
  136. package/patterns/in-line-grouping/breadcrumb.md +89 -0
  137. package/patterns/in-line-grouping/cluster.md +89 -0
  138. package/patterns/in-line-grouping/deconstructed-pancake.md +92 -0
  139. package/patterns/in-line-grouping/index.md +13 -0
  140. package/patterns/in-line-grouping/pagination.md +89 -0
  141. package/patterns/in-line-grouping/reel.md +90 -0
  142. package/patterns/in-line-grouping/split-nav.md +97 -0
  143. package/patterns/in-line-grouping/tab-strip.md +88 -0
  144. package/patterns/in-line-grouping/wrap-row.md +89 -0
  145. package/patterns/index.md +13 -0
  146. package/patterns/media-fit/frame.md +95 -0
  147. package/patterns/media-fit/icon-frame.md +87 -0
  148. package/patterns/media-fit/index.md +6 -0
  149. package/patterns/overlay-exception/imposter.md +95 -0
  150. package/patterns/overlay-exception/index.md +6 -0
  151. package/patterns/overlay-exception/overlay-stack.md +89 -0
  152. package/patterns/split-sidebar/index.md +12 -0
  153. package/patterns/split-sidebar/list-detail.md +95 -0
  154. package/patterns/split-sidebar/main-with-rail.md +95 -0
  155. package/patterns/split-sidebar/media-object.md +102 -0
  156. package/patterns/split-sidebar/sidebar.md +101 -0
  157. package/patterns/split-sidebar/split-screen.md +92 -0
  158. package/patterns/split-sidebar/sticky-aside.md +97 -0
  159. package/patterns/split-sidebar/supporting-pane.md +95 -0
  160. package/patterns/split-sidebar/switcher.md +93 -0
  161. package/patterns/stacking/feed.md +88 -0
  162. package/patterns/stacking/index.md +8 -0
  163. package/patterns/stacking/line-up.md +95 -0
  164. package/patterns/stacking/stack.md +87 -0
  165. package/patterns/stacking/step-nav.md +88 -0
  166. package/patterns/viewport-shell/cover.md +90 -0
  167. package/patterns/viewport-shell/fixed-sidenav-shell.md +97 -0
  168. package/patterns/viewport-shell/holy-grail.md +112 -0
  169. package/patterns/viewport-shell/index.md +11 -0
  170. package/patterns/viewport-shell/panel-layout.md +95 -0
  171. package/patterns/viewport-shell/scroll-body-shell.md +93 -0
  172. package/patterns/viewport-shell/sticky-footer.md +92 -0
  173. package/patterns/viewport-shell/sticky-header.md +86 -0
  174. package/platform-guides/apple-interaction.md +89 -0
  175. package/platform-guides/index.md +26 -0
  176. package/quality/claim-records/index.md +3 -0
  177. package/quality/claim-records/samples.md +92 -0
  178. package/quality/claim-records/stylegallery-multidomain-scope.md +42 -0
  179. package/quality/claims.md +77 -0
  180. package/quality/evidence/accessibility.md +58 -0
  181. package/quality/evidence/consumer-migration.md +42 -0
  182. package/quality/evidence/design-rationale.md +34 -0
  183. package/quality/evidence/executable-evidence.md +79 -0
  184. package/quality/evidence/families.md +56 -0
  185. package/quality/evidence/hci-evaluation.md +36 -0
  186. package/quality/evidence/index.md +16 -0
  187. package/quality/evidence/pattern-contract-audit.md +96 -0
  188. package/quality/evidence/search-metadata-polyhierarchy.md +86 -0
  189. package/quality/evidence/sources.md +43 -0
  190. package/quality/evidence/tokens.md +33 -0
  191. package/quality/evidence/visual-qa.md +41 -0
  192. package/quality/gates/accessibility-evidence.md +60 -0
  193. package/quality/gates/consumer-migration-evidence.md +53 -0
  194. package/quality/gates/design-claim.md +56 -0
  195. package/quality/gates/harmony-evaluation.md +78 -0
  196. package/quality/gates/index.md +13 -0
  197. package/quality/gates/layout.md +52 -0
  198. package/quality/gates/rationale.md +53 -0
  199. package/quality/gates/visual-evidence.md +47 -0
  200. package/quality/index.md +55 -0
  201. package/quality/principles.md +58 -0
  202. package/recipes/article-page.md +52 -0
  203. package/recipes/command-surface.md +55 -0
  204. package/recipes/dashboard.md +56 -0
  205. package/recipes/form-flow.md +55 -0
  206. package/recipes/homepage.md +89 -0
  207. package/recipes/index.md +13 -0
  208. package/recipes/list-detail.md +55 -0
  209. package/recipes/primitive-to-recipe-matrix.md +83 -0
  210. package/recipes/saas-settings.md +52 -0
  211. package/scripts/agent-native/a2a-projection.mjs +248 -0
  212. package/scripts/agent-native/agui-projection.mjs +178 -0
  213. package/scripts/agent-native/canonical-json.mjs +109 -0
  214. package/scripts/agent-native/cli-adapter.mjs +68 -0
  215. package/scripts/agent-native/events.mjs +113 -0
  216. package/scripts/agent-native/execution.mjs +227 -0
  217. package/scripts/agent-native/fixture.mjs +159 -0
  218. package/scripts/agent-native/identity.mjs +184 -0
  219. package/scripts/agent-native/immutable-store.mjs +102 -0
  220. package/scripts/agent-native/knowledge.mjs +168 -0
  221. package/scripts/agent-native/learning-records.mjs +244 -0
  222. package/scripts/agent-native/learning.mjs +247 -0
  223. package/scripts/agent-native/mcp-adapter.mjs +173 -0
  224. package/scripts/agent-native/queries.mjs +173 -0
  225. package/scripts/agent-native/registry.mjs +154 -0
  226. package/scripts/agent-native/retrieval.mjs +171 -0
  227. package/scripts/agent-native/self-description.mjs +160 -0
  228. package/scripts/artifact-metadata.mjs +20 -0
  229. package/scripts/audit-evidence-freshness.mjs +308 -0
  230. package/scripts/baseline-contract.mjs +189 -0
  231. package/scripts/baseline-schema-parity.mjs +40 -0
  232. package/scripts/build-reference-artifacts.mjs +127 -0
  233. package/scripts/calibration-raw-contract.mjs +172 -0
  234. package/scripts/capture-session-contract.mjs +187 -0
  235. package/scripts/component-state-artifact-fixture.mjs +44 -0
  236. package/scripts/component-state-contract.mjs +99 -0
  237. package/scripts/component-state-semantics.mjs +128 -0
  238. package/scripts/component-state-workflow-contract.mjs +67 -0
  239. package/scripts/component-state-workflow-negative-cases.mjs +64 -0
  240. package/scripts/consumer-conformance-contract.mjs +198 -0
  241. package/scripts/consumer-evidence-governance-contract.mjs +210 -0
  242. package/scripts/consumer-reference-case-runner.mjs +93 -0
  243. package/scripts/consumer-reference-schema.mjs +155 -0
  244. package/scripts/create-component-state-session.mjs +100 -0
  245. package/scripts/create-page-evidence-session.mjs +139 -0
  246. package/scripts/domain-document-boundaries.mjs +40 -0
  247. package/scripts/domain-validation-checks.mjs +141 -0
  248. package/scripts/evidence-artifact-contract.mjs +191 -0
  249. package/scripts/finalize-component-state-evidence.mjs +165 -0
  250. package/scripts/finalize-page-evidence.mjs +197 -0
  251. package/scripts/generate-consumer-reference-evidence.mjs +154 -0
  252. package/scripts/generate-patterns.mjs +218 -0
  253. package/scripts/governance-matrix-contract.mjs +73 -0
  254. package/scripts/governance-matrix-negative-cases.mjs +114 -0
  255. package/scripts/governance-policy-contract.mjs +49 -0
  256. package/scripts/governance-test-fixture.mjs +321 -0
  257. package/scripts/governance-workflow-negative-cases.mjs +241 -0
  258. package/scripts/governed-profile-registry.mjs +125 -0
  259. package/scripts/json-schema-formats.mjs +31 -0
  260. package/scripts/markdown-structure.mjs +45 -0
  261. package/scripts/page-artifact-metadata.mjs +124 -0
  262. package/scripts/page-evidence-contract.mjs +297 -0
  263. package/scripts/page-evidence-fixture.mjs +271 -0
  264. package/scripts/pattern-data.mjs +325 -0
  265. package/scripts/profile-record-contract.mjs +140 -0
  266. package/scripts/promotion-attestation-contract.mjs +91 -0
  267. package/scripts/promotion-boundary-test-contract.mjs +92 -0
  268. package/scripts/promotion-fixture-inventory.mjs +109 -0
  269. package/scripts/promotion-governance-contract.mjs +28 -0
  270. package/scripts/reference-artifact-path-contract.mjs +28 -0
  271. package/scripts/reference-profile-contract.mjs +114 -0
  272. package/scripts/reference-token-contract.mjs +156 -0
  273. package/scripts/run-consumer-page-evidence-ci.mjs +170 -0
  274. package/scripts/sg-mcp.mjs +16 -0
  275. package/scripts/sg.mjs +27 -0
  276. package/scripts/strict-json.mjs +72 -0
  277. package/scripts/summarize-sentinel-calibration.mjs +98 -0
  278. package/scripts/test-agent-adapter-conformance.mjs +250 -0
  279. package/scripts/test-agent-conformance-receipt.mjs +106 -0
  280. package/scripts/test-agent-events.mjs +81 -0
  281. package/scripts/test-agent-execution-effects.mjs +114 -0
  282. package/scripts/test-agent-execution-fixtures.mjs +140 -0
  283. package/scripts/test-agent-execution-kernel.mjs +39 -0
  284. package/scripts/test-agent-execution-learning.mjs +130 -0
  285. package/scripts/test-agent-execution-lifecycle.mjs +143 -0
  286. package/scripts/test-agent-execution-safety.mjs +158 -0
  287. package/scripts/test-agent-execution-views.mjs +117 -0
  288. package/scripts/test-agent-identity-integrity-cases.mjs +160 -0
  289. package/scripts/test-agent-knowledge-kernel.mjs +183 -0
  290. package/scripts/test-agent-learning.mjs +246 -0
  291. package/scripts/test-agent-mcp.mjs +246 -0
  292. package/scripts/test-agent-native-schemas.mjs +215 -0
  293. package/scripts/test-agent-projections.mjs +249 -0
  294. package/scripts/test-agent-registry-mcp-integrity.mjs +215 -0
  295. package/scripts/test-agent-registry-mutations.mjs +110 -0
  296. package/scripts/test-audit-evidence-freshness.mjs +177 -0
  297. package/scripts/test-component-state-sentinel.mjs +35 -0
  298. package/scripts/test-component-state-source-contract.mjs +83 -0
  299. package/scripts/test-consumer-conformance-sentinel.mjs +165 -0
  300. package/scripts/test-consumer-reference-sentinel.mjs +31 -0
  301. package/scripts/test-generate-consumer-reference-evidence.mjs +124 -0
  302. package/scripts/test-json-cli-output.mjs +151 -0
  303. package/scripts/test-json-schema-formats.mjs +40 -0
  304. package/scripts/test-reference-adapters.mjs +199 -0
  305. package/scripts/test-renderer-purity.mjs +34 -0
  306. package/scripts/test-sg-cli.mjs +129 -0
  307. package/scripts/test-summarize-sentinel-calibration.mjs +226 -0
  308. package/scripts/test-validate-baseline-manifest.mjs +234 -0
  309. package/scripts/test-validate-component-state-artifacts.mjs +243 -0
  310. package/scripts/test-validate-component-state.mjs +106 -0
  311. package/scripts/test-validate-consumer-conformance.mjs +427 -0
  312. package/scripts/test-validate-consumer-reference-cli.mjs +69 -0
  313. package/scripts/test-validate-consumer-reference.mjs +263 -0
  314. package/scripts/test-validate-domains.mjs +357 -0
  315. package/scripts/test-validate-governance.mjs +292 -0
  316. package/scripts/test-validate-ia.mjs +262 -0
  317. package/scripts/test-validate-okf.mjs +73 -0
  318. package/scripts/test-validate-page-evidence.mjs +302 -0
  319. package/scripts/test-validate-patterns.mjs +157 -0
  320. package/scripts/test-validate-promotion-rfc.mjs +250 -0
  321. package/scripts/test-validate-reference-profiles.mjs +170 -0
  322. package/scripts/test-validate-unity-org-wiki.mjs +57 -0
  323. package/scripts/test-validate-unity-source-contracts.mjs +67 -0
  324. package/scripts/test-validate-vocabulary.mjs +174 -0
  325. package/scripts/test-validate-webpage-workflow.mjs +293 -0
  326. package/scripts/validate-baseline-manifest.mjs +44 -0
  327. package/scripts/validate-catalog.mjs +65 -0
  328. package/scripts/validate-component-state.mjs +141 -0
  329. package/scripts/validate-consumer-conformance.mjs +477 -0
  330. package/scripts/validate-consumer-reference.mjs +288 -0
  331. package/scripts/validate-domains.mjs +237 -0
  332. package/scripts/validate-governance.mjs +248 -0
  333. package/scripts/validate-ia.mjs +136 -0
  334. package/scripts/validate-links.mjs +66 -0
  335. package/scripts/validate-okf.mjs +104 -0
  336. package/scripts/validate-page-evidence.mjs +191 -0
  337. package/scripts/validate-patterns.mjs +246 -0
  338. package/scripts/validate-promotion-rfc.mjs +224 -0
  339. package/scripts/validate-reference-artifacts.mjs +125 -0
  340. package/scripts/validate-renderer-purity.mjs +56 -0
  341. package/scripts/validate-unity-org-wiki.mjs +146 -0
  342. package/scripts/validate-unity-source-contracts.mjs +107 -0
  343. package/scripts/validate-vocabulary.mjs +115 -0
  344. package/scripts/validate-webpage-workflow.mjs +254 -0
  345. package/scripts/visual-expectation-contract.mjs +20 -0
  346. package/scripts/workflow-action-contract.mjs +163 -0
package/AGENTS.md ADDED
@@ -0,0 +1,156 @@
1
+ ---
2
+ type: Agent Instructions
3
+ title: StyleGallery agent instructions
4
+ description: Rules coding agents must follow when editing this governed multi-domain gallery.
5
+ ---
6
+
7
+ # Agent Instructions
8
+
9
+ This repository is StyleGallery: a governed gallery with Layout, Motion, Design Engineering, Game UI, and Platform Guides domains. Read [StyleGallery Domains](DOMAINS.md) before adding a domain, changing a domain boundary, or adapting an external source.
10
+
11
+ Before editing generated artifacts, validators, lifecycle state, or ownership policy, read [Governance, Lifecycle, And Docs-As-Code](GOVERNANCE.md).
12
+
13
+ ## Core Rules
14
+
15
+ - Classify every change by domain before editing.
16
+ - Keep domain-local guidance inside its owning path and preserve shared evidence boundaries.
17
+ - Do not use one domain to bypass another domain's constraints.
18
+ - Treat `consumer-reference/` as shared non-domain schema, provenance, routing, and evidence infrastructure; it owns no profile values, visual defaults, component implementation, or product CSS.
19
+ - Keep dependency direction consumer/profile -> Layout. Do not import consumer-reference records, profile data, tokens, or decorative values into `layout/**`, `patterns/**`, `scripts/pattern-data.mjs`, or `CATALOG.md`.
20
+ - Include the consumer-reference handoff field in implementation handoffs. Use one normalized repository-relative JSON record or `not_applicable` with a sentence reason.
21
+ - Treat `patterns/**`, `recipes/**`, `GUIDE.md`, and `CATALOG.md` as the Layout corpus at their existing paths.
22
+ - Treat the Layout domain as a layout pattern library, not a visual design system.
23
+ - Start with semantic HTML before adding layout classes.
24
+ - Keep DOM order, reading order, and focus order logical.
25
+ - Keep each pattern focused on one primary spatial problem.
26
+ - Allow secondary spatial behavior only when it is required for composition.
27
+ - Use the smallest robust set of CSS declarations, not the fewest fragile declarations.
28
+ - Prefer plain HTML and CSS as the source of truth.
29
+ - Make constraints explicit: widths, heights, gaps, breakpoints, scroll containers, and fixed or sticky anchors should be easy to find.
30
+ - Make scroll responsibility obvious in both class names and CSS.
31
+ - Keep decorative styling out of reusable pattern CSS.
32
+
33
+ The remaining pattern, CSS, naming, token, checklist, and verification rules apply to the Layout domain. Non-Layout domain documents may discuss product-layer behavior, but they do not authorize decorative or motion properties in reusable Layout pattern CSS.
34
+
35
+ ## Pattern Boundary Gate
36
+
37
+ Before adding a new pattern or changing reusable pattern CSS, check [Layout Decision Tree](guides/decision-tree.md) and [Layout Brief Template](guides/layout-brief.md).
38
+
39
+ - Decide whether the work is a new pattern, a recipe composition, or product styling outside this repository.
40
+ - Name the layout owner, scroll owner, core layout declarations, excluded demo/product styling, and likely breaking content case.
41
+ - For scroll or responsive changes, include the failure case the pattern prevents, such as a missing shrink constraint or a viewport breakpoint used for component-local behavior.
42
+ - Add a new pattern only when existing patterns or recipes do not already cover the spatial responsibility.
43
+
44
+ ## CSS Authoring
45
+
46
+ - Use layout properties only unless a non-layout property is required to explain layout behavior.
47
+ - Prefer low-specificity, single-class selectors.
48
+ - Do not use ID selectors for styling or layout naming.
49
+ - Avoid deep combinators, selector chaining, element-qualified classes, and nesting unless the pattern explicitly demonstrates that tradeoff.
50
+ - Use cascade layers when the CSS surface grows beyond isolated snippets.
51
+ - Keep CSS declarations in alphabetical order inside each rule.
52
+ - Prefer intrinsic sizing and content/container-driven adaptation.
53
+ - Use viewport breakpoints only for viewport-level patterns.
54
+ - Prefer container queries for component-local responsiveness.
55
+ - Prefer logical properties for spacing and sizing unless physical direction is required.
56
+ - Use state hooks or `data-*` attributes for variants instead of escalating selector specificity.
57
+
58
+ ## CSS Scope
59
+
60
+ Allowed by default:
61
+
62
+ - `align-*`
63
+ - `aspect-ratio`
64
+ - `block-size`
65
+ - `box-sizing`
66
+ - `container-*`
67
+ - `display`
68
+ - `flex-*`
69
+ - `gap`
70
+ - `grid-*`
71
+ - `height`
72
+ - `inline-size`
73
+ - `inset`
74
+ - `justify-*`
75
+ - `margin`
76
+ - `margin-block`
77
+ - `margin-inline`
78
+ - `max-*`
79
+ - `min-*`
80
+ - `overflow`
81
+ - `padding`
82
+ - `padding-block`
83
+ - `padding-inline`
84
+ - `place-*`
85
+ - `position`
86
+ - `width`
87
+ - `z-index`
88
+
89
+ Avoid in reusable pattern CSS unless there is a layout-specific reason:
90
+
91
+ - `animation`
92
+ - `background`
93
+ - `border`
94
+ - `border-radius`
95
+ - `box-shadow`
96
+ - `color`
97
+ - `filter`
98
+ - `font-*`
99
+ - `opacity`
100
+ - `text-*`
101
+ - `transition`
102
+ - `transform`
103
+
104
+ ## Class Naming
105
+
106
+ - Class names must describe layout responsibility, not visual appearance.
107
+ - Class names should make relationships obvious: root-child, parent-child, area-element, and fixed-scroll relationships.
108
+ - Prefer pattern-scoped names for related nodes.
109
+ - Avoid vague names like `container`, `wrapper`, `box`, `top`, `content`, and `bottom` unless the surrounding pattern name makes their responsibility unambiguous.
110
+ - Avoid DOM-depth names that mirror every nested node; name stable roles instead.
111
+ - Do not use IDs for layout naming. Use IDs only for JavaScript hooks or document-level targets when needed.
112
+
113
+ Example:
114
+
115
+ ```html
116
+ <div class="fixed_header_layout">
117
+ <header class="fixed_header_layout_header"></header>
118
+ <main class="fixed_header_layout_scroll_area"></main>
119
+ </div>
120
+ ```
121
+
122
+ ## Value And Token Policy
123
+
124
+ - Tokenize reusable design intent, not every layout number.
125
+ - Use tokens for stable shared values such as content width, gutters, stack gaps, section gaps, and density steps.
126
+ - Keep browser/context mechanics in raw CSS: `auto`, percentages, intrinsic sizing, viewport units, and container-query units.
127
+ - Put tokens behind logical CSS, for example `padding-block: var(--space-4)`.
128
+ - Use breakpoint names for layout states, not device names.
129
+
130
+ ## Pattern Checklist
131
+
132
+ Before finishing a pattern change, check:
133
+
134
+ - Does the pattern optimize one primary spatial problem?
135
+ - Can the DOM structure be understood without the CSS?
136
+ - Are semantic HTML elements used before layout classes?
137
+ - Are class names semantically clear and relationship-aware?
138
+ - Is every CSS declaration necessary for robust behavior?
139
+ - Are declarations alphabetized?
140
+ - Is selector specificity low and intentional?
141
+ - Is scroll ownership explicit?
142
+ - Are constraints and change points easy to find?
143
+ - Did decorative styling stay out of the reusable pattern?
144
+
145
+ ## Verification Checklist
146
+
147
+ Verify the smallest relevant matrix for the change:
148
+
149
+ - Viewports: `320px`, `375px`, `768px`, `1024px`, `1440px`
150
+ - Containers: tight, medium, roomy, and `100%` parent
151
+ - Content: empty, short, long label, long paragraph, unbroken string
152
+ - Direction: `ltr` and `rtl`
153
+ - Writing mode: default, plus vertical writing mode if the pattern claims support
154
+ - Interaction: default, hover, focus, active, expanded, scroll top/middle/bottom when relevant
155
+
156
+ If there is no runnable gallery surface yet, inspect the snippets directly and report that manual browser verification is not available.
package/CATALOG.md ADDED
@@ -0,0 +1,69 @@
1
+ ---
2
+ type: Catalog
3
+ title: Layout Pattern Catalog
4
+ description: Generated index of layout-gallery patterns.
5
+ ---
6
+
7
+ # Layout Pattern Catalog
8
+
9
+ Primary role: pattern lookup.
10
+
11
+ <!-- Generated from `scripts/generate-patterns.mjs` and `scripts/pattern-data.mjs`. Do not hand-edit generated catalog or pattern docs; edit the source files and regenerate. -->
12
+
13
+ Generated from `scripts/generate-patterns.mjs` and `scripts/pattern-data.mjs`.
14
+
15
+ ## Planning Layer
16
+
17
+ - [Layout Planning Guide](GUIDE.md) - Pre-design entry point for choosing and composing patterns.
18
+ - [Decision Tree](guides/decision-tree.md) - Question-driven route from screen constraints to pattern categories.
19
+ - [Layout Brief](guides/layout-brief.md) - Questions to answer before selecting a pattern stack.
20
+ - [Layout Recipes](recipes/index.md) - Screen-level compositions built from reusable patterns.
21
+
22
+ ## Patterns
23
+
24
+ - [stack](patterns/stacking/stack.md) - Stacking: Create consistent vertical rhythm between direct children.
25
+ - [box](patterns/containment/box.md) - Containment: Wrap content with predictable internal spacing.
26
+ - [center](patterns/centering/center.md) - Centering: Center a block while respecting a maximum measure.
27
+ - [cluster](patterns/in-line-grouping/cluster.md) - In-line grouping: Keep related items together while allowing wrapping.
28
+ - [content-limiter](patterns/containment/content-limiter.md) - Containment: Keep prose width readable inside fluid containers.
29
+ - [super-center](patterns/centering/super-center.md) - Centering: Center one region along both axes.
30
+ - [icon-frame](patterns/media-fit/icon-frame.md) - Media / Fit: Keep an icon aligned inside a fixed square slot.
31
+ - [frame](patterns/media-fit/frame.md) - Media / Fit: Preserve media aspect ratio in a responsive slot.
32
+ - [cover](patterns/viewport-shell/cover.md) - Viewport / Shell: Keep a central region balanced between optional header and footer.
33
+ - [sidebar](patterns/split-sidebar/sidebar.md) - Split / Sidebar: Let a narrow sidebar and wider content wrap when space is tight.
34
+ - [switcher](patterns/split-sidebar/switcher.md) - Split / Sidebar: Switch equal regions from row to stack without a viewport breakpoint.
35
+ - [media-object](patterns/split-sidebar/media-object.md) - Split / Sidebar: Align media and descriptive content as a stable pair.
36
+ - [split-nav](patterns/in-line-grouping/split-nav.md) - In-line grouping: Separate primary and secondary nav actions in one row.
37
+ - [holy-grail](patterns/viewport-shell/holy-grail.md) - Viewport / Shell: Place header, footer, sidebars, and main content in a resilient shell.
38
+ - [sticky-footer](patterns/viewport-shell/sticky-footer.md) - Viewport / Shell: Keep footer at the bottom when content is short.
39
+ - [sticky-header](patterns/viewport-shell/sticky-header.md) - Viewport / Shell: Keep a header visible above a scrolling content region.
40
+ - [scroll-body-shell](patterns/viewport-shell/scroll-body-shell.md) - Viewport / Shell: Keep shell regions fixed while only the body scrolls.
41
+ - [fixed-sidenav-shell](patterns/viewport-shell/fixed-sidenav-shell.md) - Viewport / Shell: Keep side navigation stable while main content scrolls.
42
+ - [sticky-aside](patterns/split-sidebar/sticky-aside.md) - Split / Sidebar: Keep related aside content visible during long reads.
43
+ - [ram-grid](patterns/grid-repetition/ram-grid.md) - Grid / Repetition: Repeat items into as many useful columns as space allows.
44
+ - [card-grid](patterns/grid-repetition/card-grid.md) - Grid / Repetition: Align repeating cards in rows and columns.
45
+ - [twelve-span-grid](patterns/grid-repetition/twelve-span-grid.md) - Grid / Repetition: Provide a twelve-column placement scaffold.
46
+ - [page-grid](patterns/grid-repetition/page-grid.md) - Grid / Repetition: Align page content to margins, gutters, and a central track.
47
+ - [grid-wrapper](patterns/grid-repetition/grid-wrapper.md) - Grid / Repetition: Center grid tracks while allowing full-width breakout tracks.
48
+ - [columns](patterns/grid-repetition/columns.md) - Grid / Repetition: Flow long content into balanced text columns.
49
+ - [deconstructed-pancake](patterns/in-line-grouping/deconstructed-pancake.md) - In-line grouping: Let equal cards stretch in a row and stack naturally when narrow.
50
+ - [line-up](patterns/stacking/line-up.md) - Stacking: Keep card footer actions aligned at the bottom.
51
+ - [clamped-card](patterns/containment/clamped-card.md) - Containment: Constrain a card to a readable fluid width.
52
+ - [fluid-styles](patterns/containment/fluid-styles.md) - Containment: Let a region fill available width without exceeding a readable max.
53
+ - [split-screen](patterns/split-sidebar/split-screen.md) - Split / Sidebar: Split a viewport or region into two balanced panes.
54
+ - [list-detail](patterns/split-sidebar/list-detail.md) - Split / Sidebar: Place an explorable list beside its detail region.
55
+ - [supporting-pane](patterns/split-sidebar/supporting-pane.md) - Split / Sidebar: Keep supplemental information beside a primary task.
56
+ - [feed](patterns/stacking/feed.md) - Stacking: Stack repeated content items with stable rhythm.
57
+ - [breadcrumb](patterns/in-line-grouping/breadcrumb.md) - In-line grouping: Lay out hierarchy links compactly with wrapping.
58
+ - [pagination](patterns/in-line-grouping/pagination.md) - In-line grouping: Lay out page controls as a bounded wrapping row.
59
+ - [badge-list](patterns/in-line-grouping/badge-list.md) - In-line grouping: Align item labels with trailing counts.
60
+ - [step-nav](patterns/stacking/step-nav.md) - Stacking: Present sequential steps with consistent vertical rhythm.
61
+ - [tab-strip](patterns/in-line-grouping/tab-strip.md) - In-line grouping: Keep peer tabs in one stable row that can wrap.
62
+ - [reel](patterns/in-line-grouping/reel.md) - In-line grouping: Let a row scroll horizontally instead of wrapping.
63
+ - [imposter](patterns/overlay-exception/imposter.md) - Overlay / Exception: Place an overlay region over a parent without changing document order.
64
+ - [panel-layout](patterns/viewport-shell/panel-layout.md) - Viewport / Shell: Create predictable main and utility panels.
65
+ - [overlay-stack](patterns/overlay-exception/overlay-stack.md) - Overlay / Exception: Stack several regions into the same grid cell.
66
+ - [wrap-row](patterns/in-line-grouping/wrap-row.md) - In-line grouping: Wrap controls into rows with stable gaps.
67
+ - [dense-grid](patterns/grid-repetition/dense-grid.md) - Grid / Repetition: Fill a compact grid with repeated small items.
68
+ - [masonry-approx](patterns/grid-repetition/masonry-approx.md) - Grid / Repetition: Approximate staggered content with columns when exact row alignment is not needed.
69
+ - [main-with-rail](patterns/split-sidebar/main-with-rail.md) - Split / Sidebar: Keep primary content dominant with a narrow secondary rail.
package/DOMAINS.md ADDED
@@ -0,0 +1,65 @@
1
+ ---
2
+ type: Domain Manifest
3
+ title: StyleGallery Domains
4
+ description: Canonical domain ownership, scope, lifecycle, page membership, and provenance policy.
5
+ ---
6
+
7
+ # StyleGallery Domains
8
+
9
+ Primary role: domain manifest.
10
+
11
+ This manifest is the source of truth for top-level StyleGallery domains. A domain owns a coherent decision surface; a category is a domain-local browse placement and must not be used as a synonym for domain.
12
+
13
+ ## Domain Contract
14
+
15
+ | Domain | Hub | Lifecycle | Owns | Does not own | Review owner |
16
+ | --- | --- | --- | --- | --- | --- |
17
+ | Layout | [Layout](layout/index.md) | `stable` and `generated` | Spatial patterns, recipes, planning, constraints, and scroll ownership. | Product motion, visual treatment, or platform imitation. | Pattern-data owner |
18
+ | Motion | [Motion](motion/index.md) | `experimental` | Motion naming, review procedure, and bounded practice guidance. | Universal prescriptions or reusable Layout CSS. | Motion domain owner |
19
+ | Design Engineering | [Design Engineering](design-engineering/index.md) | `experimental` | Product-layer craft questions and evidence-bearing decisions. | A second shared principle system or taste as proof. | Design Engineering domain owner |
20
+ | Game UI | [Game UI](game-ui/index.md) | `experimental` | Game-interface classification, hierarchy, reference records, and implementation guides nested by engine. | Reusable Layout CSS or claims that one engine structure is universal. | Game UI domain owner |
21
+ | Platform Guides | [Platform Guides](platform-guides/index.md) | `experimental` | Comparative references for a named platform and version context. | Affiliation, brand imitation, or authority over web standards. | Platform Guides domain owner |
22
+
23
+ ## Page Manifest
24
+
25
+ | Domain | Manual hub | Governed leaves |
26
+ | --- | --- | --- |
27
+ | Layout | `layout/index.md` | Existing `GUIDE.md`, Layout-specific `guides/*.md`, and `recipes/*.md`; generated `patterns/**/*.md` and `CATALOG.md` remain at current paths. Shared `quality/**/*.md` infrastructure governs every domain without becoming a Layout leaf. |
28
+ | Motion | `motion/index.md` | `motion/vocabulary.md`, `motion/review-workflow.md`, `motion/practice-reference.md` |
29
+ | Design Engineering | `design-engineering/index.md` | `design-engineering/interface-craft.md`, `design-engineering/consumer-migration-readiness.md`, `design-engineering/reference-profiles/index.md`, `design-engineering/reference-profiles/governed-local/index.md`, `design-engineering/reference-profiles/external-adaptation/index.md` |
30
+ | Game UI | `game-ui/index.md` | `game-ui/classification.md`, `game-ui/screen-hierarchy.md`, `game-ui/reference-record.md`, `game-ui/unity/architecture.md`, `game-ui/unity/ui-systems.md`, `game-ui/unity/cli-loop.md`, `game-ui/unity/repository-map.md`, `game-ui/unity/org-wiki.md` |
31
+ | Platform Guides | `platform-guides/index.md` | `platform-guides/apple-interaction.md` |
32
+
33
+ ## Shared Non-Domain Infrastructure
34
+
35
+ [Consumer Reference](consumer-reference/index.md) is shared schema, provenance, routing, and evidence infrastructure outside the five-domain contract. It owns no profile implementation or visual values and cannot add a sixth domain row. Consumer or profile records may depend on Layout; Layout and its generated corpus cannot import those records.
36
+
37
+ ## External Adaptation Contract
38
+
39
+ The initial five domain leaves are independent method rewrites inspired by [emilkowalski/skills](https://github.com/emilkowalski/skills) at snapshot `220e8607c90b17337d210125777b7b695f26c221`. Other adapted leaves record their own repositories and revisions in page metadata.
40
+
41
+ - Each externally adapted leaf records `source_repository`, exact `source_path`, and the full `source_revision`. Locally authored synthesis leaves state that boundary in their attribution section and omit upstream metadata.
42
+ - A full SHA identifies source content; it does not prove publisher authenticity or local quality.
43
+ - The local pages do not retain upstream prose, tables, code samples, distinctive examples, or distinctive sequence.
44
+ - Apple/WWDC-derived expression and quotations attributed to other authors, including the Paul Graham quotation noted during review, are excluded.
45
+ - If recognizable upstream expression is added later, preserve the full upstream MIT notice and record the copied material separately before merge.
46
+ - Tracked repository documents must not depend on `.omo/`; stable upstream blob links and tracked repository contracts carry contributor-facing provenance.
47
+
48
+ `design-engineering/consumer-migration-readiness.md` is the separately declared StyleGallery-local leaf. It uses `provenance_kind: local`, carries no external source fields, and remains experimental. Its presence does not change the external-adaptation inventory or make its consumer-local method universal policy.
49
+
50
+ ## Promotion And Staleness
51
+
52
+ External adaptations begin `experimental`. Promotion to `stable` requires a demonstrated reader or review task, evidence that the document improves that task, a named review owner, and no unresolved provenance or platform-version debt. Remove or revise a page when its source revision changes materially, a platform claim becomes stale, a local quality gate contradicts it, or a reader test shows the route is misleading.
53
+
54
+ ### Consumer Reference Promotion
55
+
56
+ Consumer-reference promotion does not add a domain. The StyleGallery-local `>=2` independent-consumer gateway applies only to consumer-local → shared-experimental invariant eligibility. Editorial and terminal are related examples in one fixture set, so neither counts as an independent consumer. Shared stable has no numeric adoption threshold.
57
+
58
+ Normative correctness may waive adoption count only; regression evidence, invariant scope, owner and support capacity, compatibility, migration, deprecation, rollback, and provenance duties remain required. A failed stable contract is restricted, maintained, rolled back, or deprecated with migration, never silently relabeled experimental. Promotion records are JSON-only; the committed examples are synthetic, `example_only`, deferred, and contain zero adopter attestations.
59
+
60
+ Consumer-reference maturity is governed independently from artifact mode. Stable records cannot have ended support, and related repository fixtures are not independent adoption evidence.
61
+
62
+ ## IA Navigation
63
+
64
+ Parent: [StyleGallery](index.md).
65
+ Next: [Governance, Lifecycle, And Docs-As-Code](GOVERNANCE.md) for ownership and validator policy.
package/GOVERNANCE.md ADDED
@@ -0,0 +1,222 @@
1
+ ---
2
+ type: Governance Reference
3
+ title: Governance, Lifecycle, And Docs-As-Code
4
+ description: Source-of-truth, generated artifact, domain, lifecycle, ownership, and stale-content policy for StyleGallery.
5
+ scheduled_stale_audit: deferred
6
+ scheduled_evidence_audit: active_advisory
7
+ ---
8
+
9
+ # Governance, Lifecycle, And Docs-As-Code
10
+
11
+ Primary role: governance reference.
12
+
13
+ Use this file before editing repository documentation. It names which file is authoritative, which files are generated, which validators must run, and which review owner should check the change.
14
+
15
+ ## Source Of Truth Matrix
16
+
17
+ | Doc family | Source of truth | Generator | Generated artifacts | Lifecycle state | Stale trigger | Validator | Review owner |
18
+ | --- | --- | --- | --- | --- | --- | --- | --- |
19
+ | Root repository guide | `README.md` | Manual | None | `stable` | Source-of-truth route changes, broken root links, or ownership changes. | `scripts/validate-okf.mjs`, `scripts/validate-links.mjs`, `scripts/validate-ia.mjs`, `scripts/validate-governance.mjs` | Repository governance owner |
20
+ | OKF bundle map | `index.md` | Manual | None | `stable` | New root entry, moved concept, broken root links, or ownership changes. | `scripts/validate-okf.mjs`, `scripts/validate-links.mjs`, `scripts/validate-ia.mjs`, `scripts/validate-governance.mjs` | Repository governance owner |
21
+ | Agent editing rules | `AGENTS.md` | Manual | None | `stable` | Rule changes, generated-artifact policy changes, or ownership changes. | `scripts/validate-links.mjs`, `scripts/validate-governance.mjs` | Repository governance owner |
22
+ | Planning guides | `GUIDE.md`, `guides/*.md` | Manual | None | `stable` | Workflow changes, route changes, source-lineage changes, or broken guide links. | `scripts/validate-okf.mjs`, `scripts/validate-links.mjs`, `scripts/validate-ia.mjs` | Planning-doc owner |
23
+ | Layout recipes | `recipes/*.md` | Manual | None | `stable` | Pattern-stack changes, route changes, or broken recipe links. | `scripts/validate-okf.mjs`, `scripts/validate-links.mjs`, `scripts/validate-ia.mjs` | Recipe owner |
24
+ | Quality gates and evidence | `quality/**/*.md` | Manual | None | `stable` | Claim-boundary changes, evidence-family changes, or broken quality links. | `scripts/validate-okf.mjs`, `scripts/validate-links.mjs`, `scripts/validate-ia.mjs` | Quality owner |
25
+ | Consumer reference contract | `consumer-reference/contract.md`, `consumer-reference/schema/item.schema.json` | Manual | None | `stable` contract with related fixtures | Handoff shape, path boundary, lifecycle, ownership, or dependency-direction changes. | `scripts/validate-consumer-reference.mjs`, `scripts/test-validate-consumer-reference.mjs` | Repository governance owner with Validation owner |
26
+ | Agent-native knowledge interface | `consumer-reference/agent-native/registry.json`, `consumer-reference/agent-native/schema/*.json`, `scripts/agent-native/*.mjs`, `scripts/sg.mjs`, `scripts/sg-mcp.mjs` | Manual, with protocol projections derived from one operation registry | CLI JSON, read-only MCP tools/resources, A2A Task projections, and AG-UI event projections | `experimental` interface over governed records | Identity grammar, canonical hashing, registry records, operation metadata, capability/effect semantics, receipt/conformance rules, protocol mapping, retrieval, or learning-promotion rules change. | `npm run test:agent-native`, syntax checks in `.github/workflows/validate.yml` | Repository governance owner with Validation owner |
27
+ | Portable token source | `consumer-reference/fixtures/token-portability/valid-reference.json`, `consumer-reference/schema/portable-tokens.schema.json` | `scripts/build-reference-artifacts.mjs` with Style Dictionary `5.5.0` | `consumer-reference/generated/tokens.css`, `consumer-reference/generated/manifest.json` | `stable` restricted adapter contract, `generated` output | Allowed token shape, adapter/version pin, source token count, warning, declaration, or content hash changes. | `scripts/validate-reference-artifacts.mjs`, `scripts/test-reference-adapters.mjs` | Repository governance owner with Validation owner |
28
+ | Governed local reference profiles | `design-engineering/reference-profiles/governed-local/editorial/profile.json`, `design-engineering/reference-profiles/governed-local/editorial/tokens.dtcg.json`, `design-engineering/reference-profiles/governed-local/editorial/local-foundations.json`, `design-engineering/reference-profiles/governed-local/terminal/profile.json`, `design-engineering/reference-profiles/governed-local/terminal/tokens.dtcg.json`, `design-engineering/reference-profiles/governed-local/terminal/local-foundations.json` | Manual | None | `experimental`, `example_only`, non-default related fixtures | Layout revision, identity values, UA/reset assumptions, explicit selection, or fixture relationship changes. | `scripts/validate-consumer-reference.mjs`, `scripts/test-validate-consumer-reference.mjs` | Design Engineering owner with Validation owner |
29
+ | Component-state evidence matrices | Each profile's declared `components/*.component.json`, `states/*.states.json`, `fixtures/*.fixture.json`, and `evidence/*.evidence.json` records | `scripts/generate-consumer-reference-evidence.mjs` | `design-engineering/reference-profiles/governed-local/editorial/generated/state-matrix.md`, `design-engineering/reference-profiles/governed-local/editorial/generated/keyboard-matrix.md`, `design-engineering/reference-profiles/governed-local/editorial/generated/evidence-coverage.md`, `design-engineering/reference-profiles/governed-local/terminal/generated/state-matrix.md`, `design-engineering/reference-profiles/governed-local/terminal/generated/keyboard-matrix.md`, `design-engineering/reference-profiles/governed-local/terminal/generated/evidence-coverage.md` | `generated` output from `experimental` canonical records | Declared record paths, capture-session identity, scenario/mode/channel counts, claim boundary, generated escaping, or generator output changes. | `scripts/validate-component-state.mjs`, `scripts/test-validate-component-state.mjs`, `scripts/test-validate-component-state-artifacts.mjs`, `scripts/test-generate-consumer-reference-evidence.mjs` | Design Engineering owner with Validation owner |
30
+ | Consumer migration conformance | `consumer-reference/schema/consumer-conformance-record.schema.json`, `design-engineering/consumer-migration-readiness.md` | Manual | Consumer-owned conformance records | `experimental` method | Method, dimension, scenario, mapping, or ownership changes. | `scripts/validate-consumer-conformance.mjs`, `scripts/test-validate-consumer-conformance.mjs` | Design Engineering owner with Validation owner |
31
+ | Consumer page-evidence lifecycle | `consumer-reference/schema/page-evidence-session.schema.json`, `consumer-reference/schema/page-evidence-manifest.schema.json` | Browser/session tooling | Consumer-owned session, runner, manifest, and raster artifacts | `experimental` evidence protocol | Source, revision, session, run, scenario, review deadline, or artifact integrity changes. | `scripts/test-validate-page-evidence.mjs`, deterministic Chromium consumer-conformance job | Validation owner with consumer owner |
32
+ | Explicit evidence freshness schedule | Evidence records that declare `expires_at` or `review_by` | `.github/workflows/evidence-freshness.yml` | Advisory JSON audit artifact | `stable` narrow schedule | Explicit deadline, auditor, schedule, or inventory changes. | `scripts/audit-evidence-freshness.mjs`, `scripts/test-audit-evidence-freshness.mjs` | Validation owner |
33
+ | Deterministic consumer browser conformance | `tests/consumer-conformance.spec.mjs`, `tests/fixtures/consumer-conformance-scenarios.mjs`, `tests/helpers/render-consumer-conformance.mjs` | Playwright `1.61.0` in the digest-pinned `linux/amd64` image | Optional page-evidence raster artifact | `experimental` contract with blocking semantic gate and nonblocking raster capture | Viewport, container, content, state, overlay, page-scale, focus, overflow, contrast, semantics, or runtime-error changes. | Playwright matrix and `scripts/test-consumer-conformance-sentinel.mjs` | Validation owner with Design Engineering owner |
34
+ | Shared promotion policy | `consumer-reference/policies/shared-experimental.json`, `consumer-reference/schema/promotion-rfc.schema.json` | Manual | None; promotion fixtures are synthetic examples | `stable` policy with `example_only`, deferred fixtures | Gateway scope, independence basis, evidence, ownership, support, compatibility, migration, deprecation, rollback, provenance, or decision changes. | `scripts/validate-promotion-rfc.mjs`, `scripts/test-validate-promotion-rfc.mjs` | Repository governance owner with actual consumer, support, migration, rollback, and Validation owners |
35
+ | Proposed Chromium sentinel | `tests/helpers/render-consumer-reference.mjs`, `consumer-reference/schema/{baseline-manifest,calibration-record}.schema.json`, `consumer-reference/baselines/*.json` | Playwright `1.61.0` in the digest-pinned `linux/amd64` image | `tests/snapshots/consumer-reference-card-grid.png`, raw GitHub Actions calibration artifact | `experimental`, nonblocking while owner approval is pending | Renderer source, exact image/platform/tool pin, baseline bytes, computed layout contract, or calibration metadata changes. | `scripts/validate-baseline-manifest.mjs`, `scripts/test-validate-baseline-manifest.mjs`, `scripts/test-summarize-sentinel-calibration.mjs`, Playwright | Repository governance owner with Validation owner |
36
+ | Domain manifest and scope decision | `DOMAINS.md`, `quality/claim-records/stylegallery-multidomain-scope.md` | Manual | None | `stable` | Domain membership, repository-scope, or provenance-policy changes. | `scripts/validate-domains.mjs`, `scripts/validate-governance.mjs` | Repository governance owner |
37
+ | Layout domain hub | `layout/index.md` | Manual | None | `stable` | Layout route or ownership changes. | `scripts/validate-domains.mjs`, `scripts/validate-ia.mjs` | Pattern-data owner |
38
+ | Motion domain guidance | `motion/*.md` | Manual | None | `experimental` | Upstream revision, evidence boundary, or guidance changes. | `scripts/validate-domains.mjs` | Motion domain owner |
39
+ | Design Engineering domain guidance | `design-engineering/*.md` | Manual | None | `experimental` | Upstream revision, evidence boundary, or guidance changes. | `scripts/validate-domains.mjs` | Design Engineering domain owner |
40
+ | Game UI domain guidance | `game-ui/**/*.md` | Manual | None | `experimental` | Classification, hierarchy, engine implementation, evidence boundary, or route changes. | `scripts/validate-domains.mjs` | Game UI domain owner |
41
+ | Platform Guides domain guidance | `platform-guides/*.md` | Manual | None | `experimental` | Platform version, upstream revision, evidence boundary, or guidance changes. | `scripts/validate-domains.mjs` | Platform Guides domain owner |
42
+ | Pattern data and examples | `scripts/pattern-data.mjs` | Manual data source | `patterns/**/*.md`, `patterns/**/index.md`, `patterns/index.md`, `CATALOG.md` | `generated` output from `stable` source | Source-lineage URL changes, generated drift, category changes, or pattern count changes. | `scripts/validate-patterns.mjs`, `scripts/validate-catalog.mjs`, `scripts/validate-governance.mjs` | Pattern-data owner |
43
+ | Pattern generator | `scripts/generate-patterns.mjs` | Manual code source | `patterns/**/*.md`, `patterns/**/index.md`, `patterns/index.md`, `CATALOG.md` | `stable` generator, `generated` output | Generated structure changes, generated-warning changes, or generated metadata changes. | `node -c scripts/generate-patterns.mjs`, generated drift check, `scripts/validate-governance.mjs` | Pattern-data owner |
44
+ | Validation scripts | `scripts/validate-*.mjs`, `scripts/test-validate-*.mjs` | Manual code source | CI validation output | `stable` | Validator scope changes, fixture changes, or CI parity changes. | `node -c`, matching fixture tests, `.github/workflows/validate.yml` | Validation owner |
45
+ | CI workflows | `.github/workflows/validate.yml`, `.github/workflows/evidence-freshness.yml` | Manual | GitHub Actions runs and audit artifacts | `stable` | Validation step, explicit-deadline schedule, generated drift policy, or owner changes. | GitHub Actions, `scripts/validate-governance.mjs` | Repository governance owner |
46
+
47
+ ## Generated Artifact Policy
48
+
49
+ Generated files are not source of truth. Do not hand-edit generated artifacts to change pattern content or catalog structure.
50
+
51
+ - Edit `scripts/pattern-data.mjs` when changing pattern names, categories, source lineage, sample HTML, CSS declarations, responsiveness, or scroll ownership.
52
+ - Edit `scripts/generate-patterns.mjs` when changing generated document structure, generated warnings, accessibility contract text, IA navigation text, or catalog layout.
53
+ - Regenerate with `node scripts/generate-patterns.mjs`.
54
+ - Verify with `git diff --exit-code -- CATALOG.md patterns` after generation.
55
+ - Generated artifacts must contain a generated warning that points contributors back to `scripts/generate-patterns.mjs` and `scripts/pattern-data.mjs`.
56
+
57
+ Current generated artifacts:
58
+
59
+ - `CATALOG.md`
60
+ - `patterns/index.md`
61
+ - `patterns/**/index.md`
62
+ - `patterns/**/*.md`
63
+ - `consumer-reference/generated/tokens.css`
64
+ - `consumer-reference/generated/manifest.json`
65
+ - `design-engineering/reference-profiles/governed-local/editorial/generated/state-matrix.md`
66
+ - `design-engineering/reference-profiles/governed-local/editorial/generated/keyboard-matrix.md`
67
+ - `design-engineering/reference-profiles/governed-local/editorial/generated/evidence-coverage.md`
68
+ - `design-engineering/reference-profiles/governed-local/terminal/generated/state-matrix.md`
69
+ - `design-engineering/reference-profiles/governed-local/terminal/generated/keyboard-matrix.md`
70
+ - `design-engineering/reference-profiles/governed-local/terminal/generated/evidence-coverage.md`
71
+ - `tests/snapshots/consumer-reference-card-grid.png` (proposed; update only by an explicit local baseline proposal, never in CI)
72
+
73
+ Portable token artifacts are regenerated only from the restricted fixture through the pinned adapter. Run `npm run build`; never broaden the allowed token subset to accommodate an adapter false-success, and revert the adapter with both generated files if the pin regresses.
74
+
75
+ Component-state evidence matrices are regenerated only from the records declared by each `profile.json`. Run `node scripts/generate-consumer-reference-evidence.mjs --json`; never hand-edit any of the six matrices or substitute undeclared record paths.
76
+
77
+ Browser state evidence begins with `scripts/create-component-state-session.mjs`. Its closed receipt binds a random nonce and session ID to the checked-out revision, branch, attempt, exact runtime pins, viewport, intended profile/scenario/channel set, and a deterministic digest of the relevant capture sources before capture. Receipt creation rejects dirty relevant sources. DOM and AX artifacts embed the receipt digest and session identity; browser-authored visual sidecars bind the same session, scenario, capture time, source digest, PNG bytes, dimensions, and hash. Finalization accepts exactly 30 channel passes over the closed 40-file runtime set. Validation uses the receipt and completed manifest interval, not a wall-clock maximum age, so an unchanged downloaded session remains verifiable later.
78
+
79
+ ## Lifecycle States
80
+
81
+ Use these states in reviews and governance notes. Do not invent new lifecycle language when one of these states fits.
82
+
83
+ | State | Meaning | Change rule |
84
+ | --- | --- | --- |
85
+ | `draft` | Useful but still being shaped. | May change in structure or wording; review owner checks source-of-truth fit. |
86
+ | `stable` | Canonical guidance or contract. | Requires validator coverage or a named evidence boundary before behavior changes. |
87
+ | `deprecated` | Kept for history or migration. | Must name the replacement and removal trigger. |
88
+ | `experimental` | Accepted exploration that should not be treated as canonical. | Must name the review trigger that promotes, revises, or removes it. |
89
+ | `generated` | Produced from generator/data source. | Change the source file, regenerate, and run generated drift checks. |
90
+
91
+ Default lifecycle:
92
+
93
+ - Root docs, guides, recipes, quality docs, validators, and CI are `stable` unless a page explicitly says otherwise.
94
+ - `DOMAINS.md`, the scope decision, and `layout/index.md` are `stable`; domain leaves under `motion/`, `design-engineering/`, `game-ui/`, and `platform-guides/` begin `experimental`.
95
+ - Generated pattern docs, generated pattern indexes, and `CATALOG.md` are `generated`.
96
+ - Draft research artifacts under `.omo/` are `draft` or `experimental` and are not contributor-facing source of truth.
97
+
98
+ ## Review Ownership
99
+
100
+ The CODEOWNERS file is a review proposal for high-impact areas. It should stay conservative until repository maintainers replace `@changeroa` with a verified team.
101
+
102
+ Consumer-reference ownership records the current truth as `owner.enforcement: "placeholder"` and `review_independence: "single_account"`. Multiple logical review roles assigned to this account do not create independent review.
103
+
104
+ | Area | Review owner | Review focus |
105
+ | --- | --- | --- |
106
+ | `GOVERNANCE.md`, `README.md`, `index.md`, `AGENTS.md` | Repository governance owner | Source-of-truth routing, lifecycle, stale-content policy, contributor path. |
107
+ | `scripts/pattern-data.mjs`, `scripts/generate-patterns.mjs`, `patterns/**`, `CATALOG.md` | Pattern-data owner | Generated drift, source lineage, pattern contract, generated warning coverage. |
108
+ | `guides/**`, `GUIDE.md`, `recipes/**` | Planning-doc owner | Planning flow, task routes, recipe composition boundaries. |
109
+ | `quality/**` | Quality owner | Claim boundaries, executable evidence, review gates. |
110
+ | `consumer-reference/**` | Repository governance owner with Validation owner | Required handoff, repository-local record safety, lifecycle separation, ownership truth, and reverse-dependency guard. |
111
+ | `consumer-reference/schema/{consumer-conformance-record,page-evidence-session,page-evidence-manifest}.schema.json`, `scripts/*consumer-conformance*.mjs`, `scripts/*page-evidence*.mjs` | Validation owner with Design Engineering owner | Closed migration dimensions, source/revision/session/run binding, artifact containment, executable scenario coverage, and consumer-owned adoption mapping. |
112
+ | `consumer-reference/policies/**`, `consumer-reference/fixtures/promotion/**`, `consumer-reference/schema/promotion-rfc.schema.json`, `scripts/*promotion-rfc.mjs` | Repository governance owner with actual consumer, support, migration, rollback, and Validation owners | Invariant-only scope, independence truth, claim-scoped evidence, compatibility, support capacity, lifecycle duties, and zero promotion/adoption overclaim. |
113
+ | `consumer-reference/adapters/**`, `consumer-reference/generated/**`, `scripts/*reference-artifacts.mjs`, `scripts/test-reference-adapters.mjs` | Repository governance owner with Validation owner | Restricted token ingress, exact adapter pin, warning handling, token/declaration counts, hashes, preserved aliases, and generated drift. |
114
+ | `DOMAINS.md`, `layout/**` | Repository governance owner with Pattern-data owner | Domain routing and preservation of the stable Layout path contract. |
115
+ | `motion/**` | Motion domain owner | Motion terminology, review procedure, practice classification, and evidence boundaries. |
116
+ | `design-engineering/**` | Design Engineering domain owner | Separation of product heuristics from shared quality gates. |
117
+ | `design-engineering/reference-profiles/**` | Design Engineering owner with Validation owner | Profile-local identity and values, pinned Layout provenance, explicit non-default selection, and related-fixture truth. |
118
+ | `tests/**`, `playwright.config.mjs`, `consumer-reference/baselines/**`, `scripts/*baseline*.mjs`, `scripts/*sentinel*.mjs`, `scripts/*renderer-purity.mjs` | Repository governance owner with Validation owner | Pure rendering, computed semantics before screenshots, immutable browser pins, required consumer-conformance semantics, optional raster capture, calibration cardinality, and pending owner approval. |
119
+ | `game-ui/**` | Game UI domain owner | Player-task classification, hierarchy responsibility, reference records, engine-specific subtrees, and cross-engine boundaries. |
120
+ | `platform-guides/**` | Platform Guides domain owner | Platform/source/version limits, comparison boundaries, and stale review. |
121
+ | `scripts/validate-*.mjs`, `scripts/test-validate-*.mjs`, `.github/workflows/validate.yml`, `.github/workflows/evidence-freshness.yml` | Validation owner | Validator scope, negative fixtures, blocking/advisory boundaries, CI parity. |
122
+
123
+ ## Shared Promotion Governance
124
+
125
+ The StyleGallery-local `>=2` independent-consumer gateway applies only to consumer-local → shared-experimental invariant eligibility. It is neither a universal rule nor a stable threshold. Shared stable has no numeric adoption threshold; it requires claim-scoped evidence, active owner and support capacity, compatibility review, known-issue and exception visibility, migration and deprecation readiness, rollback triggers, resolved provenance debt, and an explicit scope decision.
126
+
127
+ Normative accessibility, security, standards, or correctness fixes may waive adoption count only. They never waive regression proof, scope control, owner acceptance, support capacity, compatibility, migration, deprecation, or rollback. Palette, typography, imagery, motion character, and component skin remain consumer-local even when repeated.
128
+
129
+ The committed RFC fixtures are synthetic `example_only` proposals with `decision: "deferred"`; they contain zero durable adopter attestations and record no promotion. Editorial and terminal remain related fixtures in one set and never count as independent consumers. Current review truth remains `review_independence: "single_account"`; booleans and multiple role labels do not create independent review.
130
+
131
+ If evidence fails, restrict, maintain, or roll back the candidate. A consumed stable contract may be deprecated only with a named migration; it must never be silently relabeled shared-experimental. The canonical JSON policy and RFC records own these decisions; no YAML promotion record is valid.
132
+
133
+ ## Staleness Control
134
+
135
+ Decision: run a weekly advisory audit only for evidence records that already declare `expires_at` or `review_by`.
136
+
137
+ The independent `.github/workflows/evidence-freshness.yml` schedule runs Monday at 05:00 UTC and also supports manual dispatch. It currently inventories the committed Chromium calibration record; consumer-owned page-evidence manifests enter the same audit by passing their explicit record path to `scripts/audit-evidence-freshness.mjs`.
138
+
139
+ No repository-wide maximum age or inferred time-to-live applies. Evidence without an explicit deadline remains outside this schedule. An expired `expires_at` or due `review_by` emits an advisory annotation and a JSON report without failing solely because the date passed. Malformed records and auditor failures remain blocking even though due-date findings are advisory.
140
+
141
+ Audit trigger:
142
+
143
+ - Run `node scripts/validate-links.mjs --json` and `node scripts/validate-governance.mjs --json` when external source lineage, generated policy, root navigation, or validation ownership changes.
144
+ - Run `node scripts/validate-domains.mjs --json` and `node scripts/test-validate-domains.mjs` when domain membership, scope boundaries, source paths, source revisions, platform context, or promotion state changes.
145
+ - Run `node scripts/test-audit-evidence-freshness.mjs --json` when `expires_at`, `review_by`, record inventory, advisory classification, or the scheduled workflow changes.
146
+
147
+ ## Required Verification
148
+
149
+ For governance changes, run:
150
+
151
+ ```sh
152
+ node scripts/validate-governance.mjs --json
153
+ node scripts/test-validate-governance.mjs --json
154
+ node scripts/validate-links.mjs --json
155
+ node scripts/validate-domains.mjs --json
156
+ node scripts/test-validate-domains.mjs
157
+ node scripts/validate-consumer-reference.mjs --json
158
+ node scripts/test-validate-consumer-reference.mjs --json
159
+ node scripts/test-validate-consumer-conformance.mjs --case valid-runtime-proof --json
160
+ node scripts/test-validate-consumer-conformance.mjs --json
161
+ node scripts/test-validate-page-evidence.mjs --json
162
+ node scripts/test-audit-evidence-freshness.mjs --json
163
+ ```
164
+
165
+ For generated pattern or catalog changes, also run:
166
+
167
+ ```sh
168
+ node scripts/generate-patterns.mjs
169
+ git diff --exit-code -- CATALOG.md patterns
170
+ node scripts/validate-patterns.mjs --min-count 46 --json
171
+ node scripts/validate-catalog.mjs --json
172
+ ```
173
+
174
+ For portable token source, adapter, or generated artifact changes, run:
175
+
176
+ ```sh
177
+ npm ci --ignore-scripts --no-audit --no-fund
178
+ node scripts/build-reference-artifacts.mjs --adapter style-dictionary --fail-on-warning --json
179
+ node scripts/validate-reference-artifacts.mjs --manifest consumer-reference/generated/manifest.json --json
180
+ node scripts/test-reference-adapters.mjs --json
181
+ git diff --exit-code -- consumer-reference/generated
182
+ ```
183
+
184
+ For the proposed Chromium sentinel, also run:
185
+
186
+ ```sh
187
+ npm run test:sentinel
188
+ node scripts/test-consumer-reference-sentinel.mjs
189
+ node scripts/validate-baseline-manifest.mjs --json
190
+ node scripts/test-validate-baseline-manifest.mjs --json
191
+ node scripts/test-summarize-sentinel-calibration.mjs
192
+ node scripts/validate-renderer-purity.mjs --json
193
+ node scripts/test-renderer-purity.mjs
194
+ ```
195
+
196
+ For capture-session-bound component-state evidence, also run:
197
+
198
+ ```sh
199
+ STATE_EVIDENCE_ROOT=".tmp/consumer-reference-state"
200
+ mkdir -p "$STATE_EVIDENCE_ROOT"
201
+ node scripts/create-component-state-session.mjs --output "$STATE_EVIDENCE_ROOT/capture-session.json" --json
202
+ STATE_SESSION_RECEIPT="$STATE_EVIDENCE_ROOT/capture-session.json" \
203
+ STATE_ARTIFACT_DIR="$STATE_EVIDENCE_ROOT/runtime" \
204
+ npm run test:component-state:runtime -- --reporter=line
205
+ node scripts/finalize-component-state-evidence.mjs --artifact-root "$STATE_EVIDENCE_ROOT" --json
206
+ node scripts/validate-component-state.mjs \
207
+ --artifact-root "$STATE_EVIDENCE_ROOT" \
208
+ --runtime-manifest "$STATE_EVIDENCE_ROOT/runtime-manifest.json" \
209
+ --json
210
+ npm run test:component-state:runtime-negative
211
+ ```
212
+
213
+ For shared promotion governance, also run:
214
+
215
+ ```sh
216
+ node scripts/validate-promotion-rfc.mjs --json
217
+ node scripts/test-validate-promotion-rfc.mjs --json
218
+ ```
219
+
220
+ Do not pass `--update-snapshots` in CI. Calibration runs exactly 20 times on the manifest's digest-pinned `linux/amd64` container and uploads raw Playwright JSON, strict exit records, PNG, DOM, AX, metadata, and post-assertion comparison evidence. Failed or incomplete calibration still uploads its truthful raw evidence without writing a completed aggregate. It remains nonblocking until the named owner explicitly approves the baseline.
221
+
222
+ Completed-CI repository, workflow, run ID and attempt, SHA, and artifact-name fields are workflow-recorded, self-asserted metadata, not an external attestation. The self-asserted repository field names the canonical upstream changeroa/StyleGallery; the self-asserted execution_repository field names the actual GitHub Actions repository and is limited to changeroa/StyleGallery or ark-jo/StyleGallery. The committed calibration's external_verification object records an independently checked GitHub Actions run and artifact API identity; artifact.api_digest is distinct from committed_ci.raw_evidence_sha256. Future CI aggregates remain awaiting_external_verification until their uploaded artifact API identity is independently checked. Linux/amd64 repeatability is externally verified only for committed run 29260372260; it does not establish baseline-owner approval or product suitability. Baseline-owner approval remains unclaimed until the named owner explicitly approves it. Synthetic fixtures validate rejection and acceptance behavior only; they are not authenticated provenance.
package/GUIDE.md ADDED
@@ -0,0 +1,59 @@
1
+ ---
2
+ type: Planning Guide
3
+ title: Layout Planning Guide
4
+ description: Pre-design entry point for choosing and composing StyleGallery Layout patterns.
5
+ ---
6
+
7
+ # Layout Planning Guide
8
+
9
+ Primary role: planning workflow.
10
+
11
+ Use this guide before a layout problem appears. It helps you classify a screen, name its spatial responsibilities, and choose a small stack of layout patterns before writing application CSS.
12
+
13
+ The StyleGallery Layout domain has two modes:
14
+
15
+ - **After a problem appears:** find a named pattern in `CATALOG.md` and port its HTML/CSS contract.
16
+ - **Before a problem appears:** start with the screen type, answer the layout brief, then compose patterns from `recipes/`.
17
+ - **When content needs to become a webpage:** use the [Webpage generation workflow](guides/webpage-generation-workflow.md) to classify the use case, make the content-to-layout match, run harmony evaluation, create the GPT Image reference, and record the implementation handoff before writing product CSS.
18
+
19
+ ## Planning Flow
20
+
21
+ 1. Identify the primary user task.
22
+ 2. Name the primary content and supporting content.
23
+ 3. If the request is an ordinary webpage or homepage, classify the use case before choosing a recipe.
24
+ 4. Decide what owns scrolling.
25
+ 5. Decide whether the problem is viewport-level or component-local.
26
+ 6. Choose a screen recipe.
27
+ 7. Replace any recipe pattern that does not match the real content constraints.
28
+ 8. Run a harmony evaluation against the chosen use case, content hierarchy, pattern stack, and accessibility constraints.
29
+ 9. If visual direction is needed, create a GPT Image reference from the approved layout brief and keep the image outside reusable pattern CSS.
30
+ 10. Record an implementation handoff: pattern stack, semantic order, constraints, image-reference observations, accepted debt, and verification plan.
31
+ - Consumer reference: `not_applicable`.
32
+ - Consumer reference reason: This generic planning workflow declares no consumer-specific reference record.
33
+ 11. Verify the result against long, empty, narrow, and wide content.
34
+
35
+ ## Entry Points
36
+
37
+ - [Decision tree](guides/decision-tree.md): start here when you do not know the pattern name.
38
+ - [Layout brief](guides/layout-brief.md): answer these questions before selecting a pattern stack.
39
+ - [Webpage generation workflow](guides/webpage-generation-workflow.md): start here when content needs to become a homepage or ordinary webpage.
40
+ - [Documentation mode taxonomy](guides/documentation-mode-taxonomy.md): use this when adding, moving, or reviewing documentation.
41
+ - [Controlled vocabulary](guides/vocabulary.md): use this when terms affect routing, metadata, search, claim records, or review decisions.
42
+ - [Recipe index](recipes/index.md): screen-type compositions built from reusable patterns.
43
+ - [Pattern catalog](CATALOG.md): individual layout primitives and their contracts.
44
+
45
+ ## How To Choose A Recipe
46
+
47
+ Choose the recipe that matches the screen's spatial model, not the product category.
48
+
49
+ - A settings page and documentation app may both use a fixed side navigation.
50
+ - A dashboard and gallery may both use repeated grid regions.
51
+ - A support inbox and file browser may both use list-detail layout.
52
+ - A command surface and toolbar-heavy editor may both need wrapping or scrolling action rows.
53
+ - A landing page, product homepage, personal site, and campaign page may all start from the [Homepage](recipes/homepage.md) recipe, then diverge by section jobs and visual direction.
54
+
55
+ Recipes are starting points. If a recipe has one pattern that does not fit, replace that pattern rather than copying the recipe blindly.
56
+
57
+ ## What Not To Put Here
58
+
59
+ The planning layer does not define brand, typography, color, border, shadow, or animation. Those belong to the consuming product. This repository only records layout responsibility, semantic structure, constraints, scroll ownership, and composition.