stylegallery 0.1.0 → 0.1.2
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.
- package/AGENTS.md +4 -1
- package/DOMAINS.md +2 -6
- package/GOVERNANCE.md +10 -9
- package/README.md +29 -127
- package/consumer-reference/agent-native/v2/admission-policy.json +646 -0
- package/consumer-reference/agent-native/v2/material-registry.json +1 -0
- package/consumer-reference/agent-native/v2/schema/admission-policy.schema.json +50 -0
- package/consumer-reference/agent-native/v2/schema/material-manifest.schema.json +17 -0
- package/consumer-reference/agent-native/v2/schema/material-record.schema.json +20 -0
- package/consumer-reference/contract.md +1 -1
- package/consumer-reference/index.md +5 -3
- package/layout/index.md +124 -0
- package/log.md +57 -0
- package/package.json +183 -22
- package/scripts/agent-native/v2/experimental-extension-registry.mjs +143 -0
- package/scripts/agent-native/v2/extensions/a2a-projection.mjs +264 -0
- package/scripts/agent-native/v2/extensions/agui-projection.mjs +191 -0
- package/scripts/agent-native/v2/material-admission.mjs +295 -0
- package/scripts/agent-native/v2/material-cli-adapter.mjs +134 -0
- package/scripts/agent-native/v2/material-context.mjs +251 -0
- package/scripts/agent-native/v2/material-identity.mjs +71 -0
- package/scripts/agent-native/v2/material-mcp-adapter.mjs +253 -0
- package/scripts/agent-native/v2/material-operation-registry.mjs +123 -0
- package/scripts/agent-native/v2/material-queries.mjs +398 -0
- package/scripts/agent-native/v2/material-registry.mjs +319 -0
- package/scripts/sg-material-mcp.mjs +98 -0
- package/scripts/sg-material.mjs +27 -0
- package/consumer-reference/adapters/style-dictionary.config.mjs +0 -36
- package/consumer-reference/baselines/calibration.json +0 -260
- package/consumer-reference/baselines/manifest.json +0 -21
- package/consumer-reference/fixtures/consumer-conformance/e2e-fixture.mjs +0 -282
- package/consumer-reference/fixtures/consumer-conformance/manifest.json +0 -102
- package/consumer-reference/fixtures/consumer-conformance/runtime-proof.mjs +0 -32
- package/consumer-reference/fixtures/consumer-conformance/valid-migration-result.json +0 -18
- package/consumer-reference/fixtures/consumer-conformance/valid-migration.json +0 -142
- package/consumer-reference/fixtures/invalid-stable-ended-support.json +0 -19
- package/consumer-reference/fixtures/promotion/invalid-blocking-evidence.json +0 -26
- package/consumer-reference/fixtures/promotion/invalid-count-only.json +0 -29
- package/consumer-reference/fixtures/promotion/invalid-missing-owner-migration.json +0 -25
- package/consumer-reference/fixtures/promotion/invalid-normative-bypass-no-regression.json +0 -25
- package/consumer-reference/fixtures/promotion/invalid-related-counted-independent.json +0 -45
- package/consumer-reference/fixtures/promotion/invalid-stable-ended-support.json +0 -26
- package/consumer-reference/fixtures/promotion/manifest.json +0 -15
- package/consumer-reference/fixtures/promotion/valid-deferred-example.json +0 -67
- package/consumer-reference/fixtures/promotion/valid-normative-bypass.json +0 -67
- package/consumer-reference/fixtures/token-portability/invalid-cycle.json +0 -7
- package/consumer-reference/fixtures/token-portability/invalid-dangling-alias.json +0 -6
- package/consumer-reference/fixtures/token-portability/invalid-extends.json +0 -4
- package/consumer-reference/fixtures/token-portability/invalid-json-pointer.json +0 -7
- package/consumer-reference/fixtures/token-portability/invalid-resolver.json +0 -9
- package/consumer-reference/fixtures/token-portability/invalid-type-mismatch.json +0 -10
- package/consumer-reference/fixtures/token-portability/invalid-unknown-reserved.json +0 -6
- package/consumer-reference/fixtures/token-portability/invalid-untested-type.json +0 -6
- package/consumer-reference/fixtures/token-portability/valid-border.json +0 -14
- package/consumer-reference/fixtures/token-portability/valid-reference.json +0 -32
- package/consumer-reference/fixtures/token-portability/valid-whole-alias.json +0 -7
- package/consumer-reference/fixtures/valid-deprecated.json +0 -21
- package/consumer-reference/fixtures/valid-experimental.json +0 -19
- package/consumer-reference/generated/manifest.json +0 -40
- package/consumer-reference/generated/tokens.css +0 -12
- package/consumer-reference/policies/shared-experimental.json +0 -37
- package/consumer-reference/schema/ax-evidence.schema.json +0 -30
- package/consumer-reference/schema/baseline-manifest.schema.json +0 -55
- package/consumer-reference/schema/calibration-record.schema.json +0 -190
- package/consumer-reference/schema/capture-session.schema.json +0 -161
- package/consumer-reference/schema/component-state.schema.json +0 -150
- package/consumer-reference/schema/consumer-conformance-record.schema.json +0 -365
- package/consumer-reference/schema/dom-evidence.schema.json +0 -38
- package/consumer-reference/schema/evidence-record.schema.json +0 -81
- package/consumer-reference/schema/fixture-manifest.schema.json +0 -32
- package/consumer-reference/schema/item.schema.json +0 -188
- package/consumer-reference/schema/page-evidence-manifest.schema.json +0 -216
- package/consumer-reference/schema/page-evidence-session.schema.json +0 -119
- package/consumer-reference/schema/portable-tokens.schema.json +0 -104
- package/consumer-reference/schema/promotion-rfc.schema.json +0 -219
- package/consumer-reference/schema/runtime-evidence-manifest.schema.json +0 -33
- package/consumer-reference/schema/visual-evidence.schema.json +0 -31
- package/design-engineering/consumer-migration-readiness.md +0 -124
- package/design-engineering/interface-craft.md +0 -107
- package/design-engineering/reference-profiles/external-adaptation/index.md +0 -12
- package/design-engineering/reference-profiles/governed-local/editorial/components/button.component.json +0 -125
- package/design-engineering/reference-profiles/governed-local/editorial/evidence/button.evidence.json +0 -3504
- package/design-engineering/reference-profiles/governed-local/editorial/fixtures/button.fixture.json +0 -65
- package/design-engineering/reference-profiles/governed-local/editorial/generated/evidence-coverage.md +0 -23
- package/design-engineering/reference-profiles/governed-local/editorial/generated/keyboard-matrix.md +0 -19
- package/design-engineering/reference-profiles/governed-local/editorial/generated/state-matrix.md +0 -21
- package/design-engineering/reference-profiles/governed-local/editorial/local-foundations.json +0 -12
- package/design-engineering/reference-profiles/governed-local/editorial/states/button.states.json +0 -195
- package/design-engineering/reference-profiles/governed-local/editorial/tokens.dtcg.json +0 -17
- package/design-engineering/reference-profiles/governed-local/terminal/components/button.component.json +0 -125
- package/design-engineering/reference-profiles/governed-local/terminal/evidence/button.evidence.json +0 -3504
- package/design-engineering/reference-profiles/governed-local/terminal/fixtures/button.fixture.json +0 -65
- package/design-engineering/reference-profiles/governed-local/terminal/generated/evidence-coverage.md +0 -23
- package/design-engineering/reference-profiles/governed-local/terminal/generated/keyboard-matrix.md +0 -19
- package/design-engineering/reference-profiles/governed-local/terminal/generated/state-matrix.md +0 -21
- package/design-engineering/reference-profiles/governed-local/terminal/local-foundations.json +0 -12
- package/design-engineering/reference-profiles/governed-local/terminal/profile.json +0 -43
- package/design-engineering/reference-profiles/governed-local/terminal/states/button.states.json +0 -195
- package/design-engineering/reference-profiles/governed-local/terminal/tokens.dtcg.json +0 -17
- package/game-ui/classification.md +0 -82
- package/game-ui/reference-record.md +0 -62
- package/game-ui/screen-hierarchy.md +0 -107
- package/game-ui/unity/architecture.md +0 -166
- package/game-ui/unity/cli-loop.md +0 -84
- package/game-ui/unity/data/unity-technologies-public-repositories.json +0 -26654
- package/game-ui/unity/org-wiki.md +0 -146
- package/game-ui/unity/repository-map.md +0 -102
- package/game-ui/unity/ui-systems.md +0 -85
- package/motion/practice-reference.md +0 -145
- package/motion/review-workflow.md +0 -86
- package/motion/vocabulary.md +0 -82
- package/platform-guides/apple-interaction.md +0 -89
- package/scripts/agent-native/events.mjs +0 -113
- package/scripts/agent-native/immutable-store.mjs +0 -102
- package/scripts/artifact-metadata.mjs +0 -20
- package/scripts/audit-evidence-freshness.mjs +0 -308
- package/scripts/baseline-contract.mjs +0 -189
- package/scripts/baseline-schema-parity.mjs +0 -40
- package/scripts/build-reference-artifacts.mjs +0 -127
- package/scripts/calibration-raw-contract.mjs +0 -172
- package/scripts/capture-session-contract.mjs +0 -187
- package/scripts/component-state-artifact-fixture.mjs +0 -44
- package/scripts/component-state-contract.mjs +0 -99
- package/scripts/component-state-semantics.mjs +0 -128
- package/scripts/component-state-workflow-contract.mjs +0 -67
- package/scripts/component-state-workflow-negative-cases.mjs +0 -64
- package/scripts/consumer-conformance-contract.mjs +0 -198
- package/scripts/consumer-evidence-governance-contract.mjs +0 -210
- package/scripts/consumer-reference-case-runner.mjs +0 -93
- package/scripts/consumer-reference-schema.mjs +0 -155
- package/scripts/create-component-state-session.mjs +0 -100
- package/scripts/create-page-evidence-session.mjs +0 -139
- package/scripts/domain-document-boundaries.mjs +0 -40
- package/scripts/domain-validation-checks.mjs +0 -141
- package/scripts/evidence-artifact-contract.mjs +0 -191
- package/scripts/finalize-component-state-evidence.mjs +0 -165
- package/scripts/finalize-page-evidence.mjs +0 -197
- package/scripts/generate-consumer-reference-evidence.mjs +0 -154
- package/scripts/generate-patterns.mjs +0 -218
- package/scripts/governance-matrix-contract.mjs +0 -73
- package/scripts/governance-matrix-negative-cases.mjs +0 -114
- package/scripts/governance-policy-contract.mjs +0 -49
- package/scripts/governance-test-fixture.mjs +0 -321
- package/scripts/governance-workflow-negative-cases.mjs +0 -241
- package/scripts/governed-profile-registry.mjs +0 -125
- package/scripts/json-schema-formats.mjs +0 -31
- package/scripts/markdown-structure.mjs +0 -45
- package/scripts/page-artifact-metadata.mjs +0 -124
- package/scripts/page-evidence-contract.mjs +0 -297
- package/scripts/page-evidence-fixture.mjs +0 -271
- package/scripts/pattern-data.mjs +0 -325
- package/scripts/profile-record-contract.mjs +0 -140
- package/scripts/promotion-attestation-contract.mjs +0 -91
- package/scripts/promotion-boundary-test-contract.mjs +0 -92
- package/scripts/promotion-fixture-inventory.mjs +0 -109
- package/scripts/promotion-governance-contract.mjs +0 -28
- package/scripts/reference-artifact-path-contract.mjs +0 -28
- package/scripts/reference-profile-contract.mjs +0 -114
- package/scripts/reference-token-contract.mjs +0 -156
- package/scripts/run-consumer-page-evidence-ci.mjs +0 -170
- package/scripts/summarize-sentinel-calibration.mjs +0 -98
- package/scripts/test-agent-adapter-conformance.mjs +0 -250
- package/scripts/test-agent-conformance-receipt.mjs +0 -106
- package/scripts/test-agent-events.mjs +0 -81
- package/scripts/test-agent-execution-effects.mjs +0 -114
- package/scripts/test-agent-execution-fixtures.mjs +0 -140
- package/scripts/test-agent-execution-kernel.mjs +0 -39
- package/scripts/test-agent-execution-learning.mjs +0 -130
- package/scripts/test-agent-execution-lifecycle.mjs +0 -143
- package/scripts/test-agent-execution-safety.mjs +0 -158
- package/scripts/test-agent-execution-views.mjs +0 -117
- package/scripts/test-agent-identity-integrity-cases.mjs +0 -160
- package/scripts/test-agent-knowledge-kernel.mjs +0 -183
- package/scripts/test-agent-learning.mjs +0 -246
- package/scripts/test-agent-mcp.mjs +0 -246
- package/scripts/test-agent-native-schemas.mjs +0 -215
- package/scripts/test-agent-projections.mjs +0 -249
- package/scripts/test-agent-registry-mcp-integrity.mjs +0 -215
- package/scripts/test-agent-registry-mutations.mjs +0 -110
- package/scripts/test-audit-evidence-freshness.mjs +0 -177
- package/scripts/test-component-state-sentinel.mjs +0 -35
- package/scripts/test-component-state-source-contract.mjs +0 -83
- package/scripts/test-consumer-conformance-sentinel.mjs +0 -165
- package/scripts/test-consumer-reference-sentinel.mjs +0 -31
- package/scripts/test-generate-consumer-reference-evidence.mjs +0 -124
- package/scripts/test-json-cli-output.mjs +0 -151
- package/scripts/test-json-schema-formats.mjs +0 -40
- package/scripts/test-reference-adapters.mjs +0 -199
- package/scripts/test-renderer-purity.mjs +0 -34
- package/scripts/test-sg-cli.mjs +0 -129
- package/scripts/test-summarize-sentinel-calibration.mjs +0 -226
- package/scripts/test-validate-baseline-manifest.mjs +0 -234
- package/scripts/test-validate-component-state-artifacts.mjs +0 -243
- package/scripts/test-validate-component-state.mjs +0 -106
- package/scripts/test-validate-consumer-conformance.mjs +0 -427
- package/scripts/test-validate-consumer-reference-cli.mjs +0 -69
- package/scripts/test-validate-consumer-reference.mjs +0 -263
- package/scripts/test-validate-domains.mjs +0 -357
- package/scripts/test-validate-governance.mjs +0 -292
- package/scripts/test-validate-ia.mjs +0 -262
- package/scripts/test-validate-okf.mjs +0 -73
- package/scripts/test-validate-page-evidence.mjs +0 -302
- package/scripts/test-validate-patterns.mjs +0 -157
- package/scripts/test-validate-promotion-rfc.mjs +0 -250
- package/scripts/test-validate-reference-profiles.mjs +0 -170
- package/scripts/test-validate-unity-org-wiki.mjs +0 -57
- package/scripts/test-validate-unity-source-contracts.mjs +0 -67
- package/scripts/test-validate-vocabulary.mjs +0 -174
- package/scripts/test-validate-webpage-workflow.mjs +0 -293
- package/scripts/validate-baseline-manifest.mjs +0 -44
- package/scripts/validate-catalog.mjs +0 -65
- package/scripts/validate-component-state.mjs +0 -141
- package/scripts/validate-consumer-conformance.mjs +0 -477
- package/scripts/validate-consumer-reference.mjs +0 -288
- package/scripts/validate-domains.mjs +0 -237
- package/scripts/validate-governance.mjs +0 -248
- package/scripts/validate-ia.mjs +0 -136
- package/scripts/validate-links.mjs +0 -66
- package/scripts/validate-okf.mjs +0 -104
- package/scripts/validate-page-evidence.mjs +0 -191
- package/scripts/validate-patterns.mjs +0 -246
- package/scripts/validate-promotion-rfc.mjs +0 -224
- package/scripts/validate-reference-artifacts.mjs +0 -125
- package/scripts/validate-renderer-purity.mjs +0 -56
- package/scripts/validate-unity-org-wiki.mjs +0 -146
- package/scripts/validate-unity-source-contracts.mjs +0 -107
- package/scripts/validate-vocabulary.mjs +0 -115
- package/scripts/validate-webpage-workflow.mjs +0 -254
- package/scripts/visual-expectation-contract.mjs +0 -20
- package/scripts/workflow-action-contract.mjs +0 -163
package/AGENTS.md
CHANGED
|
@@ -17,7 +17,10 @@ Before editing generated artifacts, validators, lifecycle state, or ownership po
|
|
|
17
17
|
- Do not use one domain to bypass another domain's constraints.
|
|
18
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
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.
|
|
20
|
+
- Include the consumer-reference handoff field in implementation handoffs. For this repository-wide agent surface use `consumer_reference: consumer-reference/agent-native/registry.json`; otherwise use one normalized repository-relative JSON record or `not_applicable` with a sentence reason.
|
|
21
|
+
- Keep material v2, v1 trust/conformance, CLI/MCP transport, and A2A/AG-UI extension planes separate. Material admission never imports profiles, source code, fixtures, schemas, tests, `.omo`, or visual defaults.
|
|
22
|
+
- Validate canonical evidence v2 against its recorded immutable Git revision. Use current-authoring source checks only when creating or finalizing new capture evidence; do not recapture merely because later repository changes differ.
|
|
23
|
+
- Treat `consumer-reference/policies/lifecycle-dispositions.json` as the lifecycle index. Preserve named owners, caller status `unknown`, deadlines, extension dispositions, and immutable archive bindings until their machine gate authorizes a transition.
|
|
21
24
|
- Treat `patterns/**`, `recipes/**`, `GUIDE.md`, and `CATALOG.md` as the Layout corpus at their existing paths.
|
|
22
25
|
- Treat the Layout domain as a layout pattern library, not a visual design system.
|
|
23
26
|
- Start with semantic HTML before adding layout classes.
|
package/DOMAINS.md
CHANGED
|
@@ -32,7 +32,7 @@ This manifest is the source of truth for top-level StyleGallery domains. A domai
|
|
|
32
32
|
|
|
33
33
|
## Shared Non-Domain Infrastructure
|
|
34
34
|
|
|
35
|
-
[Consumer Reference](consumer-reference/index.md) is shared schema, provenance, routing, and
|
|
35
|
+
[Consumer Reference](consumer-reference/index.md) is shared schema, provenance, routing, evidence, lifecycle, and machine-retrieval infrastructure outside the five-domain contract. Its source-bound material v2 index classifies admitted pages by these five domains but does not own their prose. It owns no profile implementation, visual values, or product CSS and cannot add a sixth domain row. Consumer or profile records may depend on Layout; Layout and its generated corpus cannot import consumer-reference, profile, material-registry, or transport records.
|
|
36
36
|
|
|
37
37
|
## External Adaptation Contract
|
|
38
38
|
|
|
@@ -53,11 +53,7 @@ External adaptations begin `experimental`. Promotion to `stable` requires a demo
|
|
|
53
53
|
|
|
54
54
|
### Consumer Reference Promotion
|
|
55
55
|
|
|
56
|
-
Consumer-reference promotion does not add a domain. The
|
|
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.
|
|
56
|
+
Consumer-reference promotion does not add a domain. The [canonical promotion contract](consumer-reference/contract.md#promotion-boundary) owns the full human-readable boundary, and the [canonical JSON promotion policy](consumer-reference/policies/shared-experimental.json) owns machine policy. As a boundary summary: the `>=2` gateway applies only to consumer-local → shared-experimental invariant eligibility; Editorial and terminal are related examples in one fixture set; Shared stable has no numeric adoption threshold; and Normative correctness may waive adoption count only. A failed stable contract is never silently relabeled experimental. Promotion records are JSON-only, and the committed examples remain synthetic with zero adopter attestations.
|
|
61
57
|
|
|
62
58
|
## IA Navigation
|
|
63
59
|
|
package/GOVERNANCE.md
CHANGED
|
@@ -23,7 +23,10 @@ Use this file before editing repository documentation. It names which file is au
|
|
|
23
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
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
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
|
|
26
|
+
| Agent-native knowledge interface v1 | `consumer-reference/agent-native/registry.json`, `consumer-reference/agent-native/schema/*.json`, `scripts/agent-native/{registry,identity,queries}.mjs`, `scripts/sg.mjs`, `scripts/sg-mcp.mjs` | Manual, with protocol projections derived from one operation registry | Frozen v1 CLI JSON, read-only MCP tools/resources, and compatibility projections | `experimental`, byte-compatible v1 interface | Identity grammar, canonical hashing, registry records, operation metadata, capability/effect semantics, receipt/conformance rules, or retrieval changes. | `npm run test:agent-native` | Repository governance owner with Validation owner |
|
|
27
|
+
| Governed material interface v2 | `consumer-reference/agent-native/v2/admission-policy.json`, its closed schemas, and admitted tracked Markdown | `scripts/agent-native/v2/generate-material-registry.mjs` | `consumer-reference/agent-native/v2/material-registry.json`; separate `sg-material` CLI and material MCP | `experimental`, read-only and isolated from v1 | Admission roots/exclusions, source hash, identity, operation inventory, query/context bounds, package exposure, or source drift changes. | `npm run validate:material`, `npm run test:material`, generated drift | Repository governance owner with Validation owner |
|
|
28
|
+
| Experimental protocol extensions | `scripts/agent-native/v2/experimental-extension-registry.mjs`, `scripts/agent-native/v2/extensions/*.mjs`, lifecycle extension records | Manual | A2A `1.0` and AG-UI `0.0.57` projections | `experimental`, retained pending owner review | Protocol version, caller inventory, forwarding, migration evidence, or disposition changes. | `scripts/agent-native/v2/test-agent-extension-boundary.mjs`, lifecycle suites | Repository governance owner with protocol and Validation owners |
|
|
29
|
+
| Lifecycle dispositions and archives | `consumer-reference/policies/lifecycle-dispositions.json`, its five records, and `consumer-reference/schema/lifecycle-disposition.schema.json` | Manual, with immutable archive receipts | Retrieval metadata for historical sentinel/calibration and page evidence | `pending_owner` for three families; both extensions `retain` | Owner, deadline, caller status, archive object/ref, approval, transition, or post-deadline action changes. | `npm run validate:lifecycle-dispositions`, `npm run test:lifecycle-dispositions` | Repository governance owner with named family owner and Validation owner |
|
|
27
30
|
| 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
31
|
| 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
32
|
| 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 |
|
|
@@ -74,7 +77,11 @@ Portable token artifacts are regenerated only from the restricted fixture throug
|
|
|
74
77
|
|
|
75
78
|
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
79
|
|
|
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
|
|
80
|
+
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. This is the current-authoring mode. Canonical evidence v2 stores environment, run, and session identity once in a shared content-addressed capture record; both profile records reference it and v1 readers remain available. Historical validation uses recorded-revision mode: it resolves commit, tree, and blob objects from the receipt's immutable revision and never trusts the working tree or index. 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 unchanged historical evidence remains verifiable after repository evolution.
|
|
81
|
+
|
|
82
|
+
The agent-native implementation has four separate planes: governed Markdown material v2; v1 trust/conformance records; CLI/MCP transport adapters; and explicitly registered A2A/AG-UI extensions. Material retrieval cannot merge trust records, transports cannot expand admission, and extensions cannot alter either registry. Consumer/profile -> Layout remains the only dependency direction; no material registry value is a visual default or reusable Layout input.
|
|
83
|
+
|
|
84
|
+
Lifecycle decisions are machine records, not inferred from deadlines. Sentinel/calibration and page evidence remain active pending their named owner deadlines; protocol-owner review retains archives; A2A and AG-UI remain retained extensions with external callers `unknown`. Archive retrieval must use each record's immutable repository/commit/tree/ref binding and pass `scripts/validate-lifecycle-disposition.mjs`; never copy historical evidence into current canonical records or treat archive presence as approval.
|
|
78
85
|
|
|
79
86
|
## Lifecycle States
|
|
80
87
|
|
|
@@ -122,13 +129,7 @@ Consumer-reference ownership records the current truth as `owner.enforcement: "p
|
|
|
122
129
|
|
|
123
130
|
## Shared Promotion Governance
|
|
124
131
|
|
|
125
|
-
|
|
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
|
+
Promotion semantics are owned by the [canonical promotion contract](consumer-reference/contract.md#promotion-boundary) and the [canonical JSON promotion policy](consumer-reference/policies/shared-experimental.json). This document records only the repository ownership, review, and verification boundary.
|
|
132
133
|
|
|
133
134
|
## Staleness Control
|
|
134
135
|
|
package/README.md
CHANGED
|
@@ -6,6 +6,10 @@ description: Governed gallery of portable interface knowledge organized by domai
|
|
|
6
6
|
|
|
7
7
|
# StyleGallery
|
|
8
8
|
|
|
9
|
+
<p align="center">
|
|
10
|
+
<img src="https://cdn.jsdelivr.net/gh/changeroa/StyleGallery@c18bc87/assets/stylegallery-hero-infographic.webp" alt="StyleGallery infographic connecting five governed interface-knowledge domains to shared consumer and agent infrastructure" width="100%">
|
|
11
|
+
</p>
|
|
12
|
+
|
|
9
13
|
StyleGallery is a governed gallery of portable interface knowledge. It separates reusable spatial patterns, product-layer motion guidance, design-engineering practice, and platform-specific references into explicit domains with different evidence and ownership boundaries.
|
|
10
14
|
|
|
11
15
|
Primary role: repository guide.
|
|
@@ -14,7 +18,7 @@ The existing Layout corpus remains a gallery of minimal, portable CSS layout pat
|
|
|
14
18
|
|
|
15
19
|
[Consumer Reference](consumer-reference/index.md) is shared non-domain infrastructure for optional consumer-owned reference handoffs. It carries schema, routing, provenance, and evidence metadata without owning profiles, visual values, components, or a sixth domain.
|
|
16
20
|
|
|
17
|
-
[Agent-Native StyleGallery](consumer-reference/agent-native/README.md) is the machine-facing entry point over that governed knowledge.
|
|
21
|
+
[Agent-Native StyleGallery](consumer-reference/agent-native/README.md) is the machine-facing entry point over that governed knowledge. Frozen v1 provides claim/evidence/governance records through `sg` and its MCP; isolated material v2 indexes admitted Markdown and exposes `sg-material` plus a separate read-only MCP. Lifecycle records own extension and archive dispositions. These material, trust/conformance, transport, and extension planes do not create a sixth domain, replace the Markdown corpus, permit mutation, or feed visual defaults back into Layout.
|
|
18
22
|
|
|
19
23
|
## Quick Start
|
|
20
24
|
|
|
@@ -31,6 +35,8 @@ npm install --global stylegallery
|
|
|
31
35
|
sg discover --format json
|
|
32
36
|
```
|
|
33
37
|
|
|
38
|
+
The npm package includes the pinned `@chenglou/pretext@0.0.8` browser text-layout engine. StyleGallery uses it as a measurement and verification dependency for text-fit QA; the Node CLI and MCP servers do not execute browser Canvas APIs.
|
|
39
|
+
|
|
34
40
|
Common read-only commands:
|
|
35
41
|
|
|
36
42
|
```sh
|
|
@@ -42,6 +48,18 @@ sg ops --format json
|
|
|
42
48
|
|
|
43
49
|
Every command writes deterministic JSON to stdout. Invalid input returns an error object and a nonzero exit status. See [Agent-Native StyleGallery](consumer-reference/agent-native/README.md) for the command contract, StableRef and VersionID model, MCP resources, and trust boundaries.
|
|
44
50
|
|
|
51
|
+
Material v2 searches the admitted Markdown corpus and returns JSON without an additional format flag:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
sg-material discover
|
|
55
|
+
sg-material search --query "sticky layout" --limit 5
|
|
56
|
+
sg-material context --query "responsive sidebar" --budget-tokens 4096
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Worked homepage example
|
|
60
|
+
|
|
61
|
+
The [StyleGallery homepage example](examples/stylegallery-homepage/README.md) was planned from a clean install of the published npm package. It demonstrates the Homepage recipe, selected layout patterns, agent-native CLI access, responsive behavior, and Chrome CDP verification in a standalone product-layer implementation.
|
|
62
|
+
|
|
45
63
|
### Read-only MCP server
|
|
46
64
|
|
|
47
65
|
Launch the packaged stdio server with:
|
|
@@ -65,6 +83,8 @@ Example MCP client configuration:
|
|
|
65
83
|
|
|
66
84
|
The MCP surface exposes governed read operations only. It cannot modify repository knowledge.
|
|
67
85
|
|
|
86
|
+
The separate Material v2 MCP server is available as `stylegallery-material-mcp`.
|
|
87
|
+
|
|
68
88
|
## 한국어 빠른 시작
|
|
69
89
|
|
|
70
90
|
StyleGallery는 Node.js 22 이상에서 실행됩니다. 전역 설치 없이 바로 사용하려면 다음 명령을 실행하세요.
|
|
@@ -80,7 +100,7 @@ npm install --global stylegallery
|
|
|
80
100
|
sg discover --format json
|
|
81
101
|
```
|
|
82
102
|
|
|
83
|
-
`discover`는 사용 가능한 인터페이스를 보여주고, `resolve`는 하나의 레코드를 조회하며, `claims`는 관련 주장과 근거를 분리해서 보여줍니다. `context`는 에이전트에 전달할 수 있는 제한된 컨텍스트 패키지를 만들고, `ops`는 지원하는 작업 목록을 반환합니다. 모든 결과는 자동화에 바로 사용할 수 있는 JSON입니다.
|
|
103
|
+
`discover`는 사용 가능한 인터페이스를 보여주고, `resolve`는 하나의 레코드를 조회하며, `claims`는 관련 주장과 근거를 분리해서 보여줍니다. `context`는 에이전트에 전달할 수 있는 제한된 컨텍스트 패키지를 만들고, `ops`는 지원하는 작업 목록을 반환합니다. `sg-material search --query "검색어"`를 사용하면 Material v2에 등록된 Markdown 문서를 검색할 수 있습니다. 모든 결과는 자동화에 바로 사용할 수 있는 JSON입니다.
|
|
84
104
|
|
|
85
105
|
CLI와 MCP의 상세 사용법은 [Agent-Native StyleGallery 가이드](consumer-reference/agent-native/README.md)를 참고하세요. 사람이 문서를 탐색하려면 아래의 도메인 표에서 목적에 맞는 진입점을 선택하면 됩니다.
|
|
86
106
|
|
|
@@ -141,7 +161,7 @@ Each common task has one primary route. Use secondary links only after the prima
|
|
|
141
161
|
| `check whether a layout or design claim is admissible` | [Quality Gates](quality/index.md) | It routes claims to gates and evidence boundaries. |
|
|
142
162
|
| `prove repository checks and evidence coverage` | [Executable Evidence Coverage](quality/evidence/executable-evidence.md) | It maps validators, fixtures, CI commands, and their boundaries. |
|
|
143
163
|
| `declare consumer reference applicability` | [Consumer Reference](consumer-reference/index.md) | It provides the required handoff field without moving consumer values into Layout. |
|
|
144
|
-
| `use StyleGallery from an agent or automation` | [Agent-Native StyleGallery](consumer-reference/agent-native/README.md) | It
|
|
164
|
+
| `use StyleGallery from an agent or automation` | [Agent-Native StyleGallery](consumer-reference/agent-native/README.md) | It routes frozen v1 trust queries, material v2 discovery/search/get/context, both read-only MCPs, extensions, lifecycle dispositions, and archive boundaries. |
|
|
145
165
|
| `prove an existing consumer migration` | [Consumer Migration Readiness](design-engineering/consumer-migration-readiness.md) | It requires thirteen explicit behavior classifications, runtime proof, adoption mappings, and source-bound page evidence when applicable. |
|
|
146
166
|
| `change generated patterns, catalog, or governance policy` | [Governance, Lifecycle, And Docs-As-Code](GOVERNANCE.md) | It identifies source files, generated artifacts, validators, lifecycle state, and review ownership. |
|
|
147
167
|
| `run findability QA` | [Tree-Test Findability QA](quality/index.md#tree-test-findability-qa) | It tests whether task routes are discoverable, not just linked. |
|
|
@@ -172,142 +192,24 @@ Each common task has one primary route. Use secondary links only after the prima
|
|
|
172
192
|
|
|
173
193
|
## Layout Domain Principles
|
|
174
194
|
|
|
175
|
-
|
|
176
|
-
- Patterns exist to solve spatial problems, not to define a visual brand.
|
|
177
|
-
- Core CSS should stay focused on layout responsibilities.
|
|
178
|
-
|
|
179
|
-
2. Semantic structure first
|
|
180
|
-
- Start with meaningful HTML before adding layout classes.
|
|
181
|
-
- Class names explain layout responsibility, but they do not replace landmarks, headings, lists, buttons, links, or form controls.
|
|
182
|
-
- DOM order, reading order, and focus order should remain logical.
|
|
183
|
-
|
|
184
|
-
3. One primary spatial problem
|
|
185
|
-
- Each pattern should optimize one primary spatial problem.
|
|
186
|
-
- Secondary behavior is allowed when it is incidental or required for composition.
|
|
187
|
-
- If a pattern has multiple primary problems, split it into smaller primitives or mark it as a shell/composite.
|
|
188
|
-
|
|
189
|
-
4. Minimum robust CSS
|
|
190
|
-
- Use the smallest set of declarations that keeps the pattern stable under real content and container constraints.
|
|
191
|
-
- Minimal does not mean fragile; constraints, overflow rules, intrinsic sizing, and fallbacks are valid when they carry declared responsibility.
|
|
192
|
-
|
|
193
|
-
5. Portable plain HTML/CSS
|
|
194
|
-
- Plain HTML and CSS are the source of truth.
|
|
195
|
-
- Framework-specific versions are optional derivatives, not canonical patterns.
|
|
196
|
-
|
|
197
|
-
6. Explicit constraints and change points
|
|
198
|
-
- Widths, heights, gaps, breakpoints, scroll containers, fixed/sticky anchors, and other constraints should be easy to find.
|
|
199
|
-
- Values users are expected to tune should be surfaced clearly.
|
|
200
|
-
|
|
201
|
-
7. Named scroll ownership
|
|
202
|
-
- If a pattern scrolls, the scrolling element must be obvious.
|
|
203
|
-
- The pattern should make clear what scrolls, what stays fixed, and where height is determined.
|
|
204
|
-
|
|
205
|
-
8. No decorative debt
|
|
206
|
-
- Decorative styling does not belong in reusable pattern CSS unless it is required to explain layout behavior.
|
|
207
|
-
- Demo-only visual aids should be separate from the reusable pattern.
|
|
195
|
+
Layout patterns solve one primary spatial problem with semantic structure, robust plain HTML/CSS, explicit constraints, named scroll ownership, and no decorative debt. The detailed principles live in the [Layout domain contract](layout/index.md#layout-domain-principles).
|
|
208
196
|
|
|
209
197
|
## CSS Authoring Policy
|
|
210
198
|
|
|
211
|
-
|
|
212
|
-
- Avoid ID selectors for styling or layout naming.
|
|
213
|
-
- Avoid deep combinators, selector chaining, and nesting unless the pattern is specifically demonstrating that tradeoff.
|
|
214
|
-
- Use cascade layers when the CSS surface grows beyond isolated snippets.
|
|
215
|
-
- Keep CSS declarations in alphabetical order inside each rule.
|
|
216
|
-
- Prefer intrinsic sizing and content/container-driven adaptation.
|
|
217
|
-
- Use viewport breakpoints only when the spatial problem is viewport-level.
|
|
218
|
-
- Prefer container queries for component-local responsiveness.
|
|
219
|
-
- Prefer logical properties for spacing and sizing unless physical direction is required.
|
|
220
|
-
- Treat exceptions as explicit and local; use state hooks or `data-*` attributes for variants instead of escalating selector specificity.
|
|
199
|
+
Reusable Layout CSS favors low specificity, intrinsic sizing, logical properties, and responsiveness at the correct container or viewport boundary. See the [detailed CSS authoring policy](layout/index.md#css-authoring-policy).
|
|
221
200
|
|
|
222
201
|
## Class Naming Policy
|
|
223
202
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
- Name layout responsibility, not appearance.
|
|
227
|
-
- Make root-child, parent-child, area-element, and fixed-scroll relationships obvious.
|
|
228
|
-
- Prefer pattern-scoped names for related nodes.
|
|
229
|
-
- Avoid vague names like `container`, `wrapper`, `box`, `top`, `content`, and `bottom` unless the surrounding pattern name makes their responsibility unambiguous.
|
|
230
|
-
- Avoid DOM-depth names such as `card_header_title_icon`; describe stable roles instead.
|
|
231
|
-
- Do not use IDs for layout naming. IDs are reserved for JavaScript hooks or document-level targets when needed.
|
|
232
|
-
|
|
233
|
-
Prefer:
|
|
234
|
-
|
|
235
|
-
```html
|
|
236
|
-
<div class="app_shell">
|
|
237
|
-
<header class="app_shell_header"></header>
|
|
238
|
-
<main class="app_shell_scroll_area"></main>
|
|
239
|
-
<footer class="app_shell_footer"></footer>
|
|
240
|
-
</div>
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
Avoid:
|
|
244
|
-
|
|
245
|
-
```html
|
|
246
|
-
<div class="container">
|
|
247
|
-
<div class="top"></div>
|
|
248
|
-
<div class="content"></div>
|
|
249
|
-
<div class="bottom"></div>
|
|
250
|
-
</div>
|
|
251
|
-
```
|
|
203
|
+
Layout class names describe stable spatial responsibilities and relationships rather than appearance or DOM depth. See the [detailed class naming policy](layout/index.md#class-naming-policy).
|
|
252
204
|
|
|
253
205
|
## Value And Token Policy
|
|
254
206
|
|
|
255
|
-
|
|
256
|
-
- Use tokens for stable, shared values such as `content-width`, `gutter`, `stack-gap`, `section-gap`, or density steps.
|
|
257
|
-
- Keep browser/context mechanics in raw CSS: `auto`, percentages, `min-content`, `max-content`, `fit-content`, `clamp()`, viewport units, container-query units, and intrinsic sizing.
|
|
258
|
-
- Put tokens behind logical CSS, for example `padding-block: var(--space-4)`.
|
|
259
|
-
- Use breakpoint names for layout states, not device names.
|
|
207
|
+
Tokens represent stable shared design intent; browser and context mechanics remain explicit CSS values. See the [detailed value and token policy](layout/index.md#value-and-token-policy).
|
|
260
208
|
|
|
261
209
|
## Pattern Contract
|
|
262
210
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
```txt
|
|
266
|
-
Pattern name
|
|
267
|
-
Category
|
|
268
|
-
Primary spatial problem
|
|
269
|
-
Secondary spatial problems
|
|
270
|
-
When to use
|
|
271
|
-
HTML structure
|
|
272
|
-
CSS
|
|
273
|
-
Core properties
|
|
274
|
-
Properties that break the layout if removed
|
|
275
|
-
Constraints and change points
|
|
276
|
-
Scroll ownership
|
|
277
|
-
Accessibility and source-order notes
|
|
278
|
-
Browser/fallback notes
|
|
279
|
-
Composition notes
|
|
280
|
-
Anti-patterns
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
Suggested categories:
|
|
284
|
-
|
|
285
|
-
- Containment
|
|
286
|
-
- Centering
|
|
287
|
-
- Stacking
|
|
288
|
-
- In-line grouping
|
|
289
|
-
- Split / Sidebar
|
|
290
|
-
- Grid / Repetition
|
|
291
|
-
- Viewport / Shell
|
|
292
|
-
- Overlay / Exception
|
|
293
|
-
- Media / Fit
|
|
294
|
-
- Reveal / Density control
|
|
211
|
+
Every pattern documents its primary problem, structure, constraints, scroll ownership, accessibility, fallbacks, composition, and failure boundaries. See the [detailed pattern contract](layout/index.md#pattern-contract), and use the generated [Pattern Categories](patterns/index.md) as the category inventory.
|
|
295
212
|
|
|
296
213
|
## Verification Matrix
|
|
297
214
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
- Viewports: `320px`, `375px`, `768px`, `1024px`, `1440px`
|
|
301
|
-
- Containers: tight, medium, roomy, and `100%` parent
|
|
302
|
-
- Content: empty, short, long label, long paragraph, unbroken string
|
|
303
|
-
- Direction: `ltr` and `rtl`
|
|
304
|
-
- Writing mode: default, plus vertical writing mode if the pattern claims support
|
|
305
|
-
- Interaction: default, hover, focus, active, expanded, scroll top/middle/bottom when relevant
|
|
306
|
-
|
|
307
|
-
Acceptance checks:
|
|
308
|
-
|
|
309
|
-
- The layout reflows without unusable two-dimensional scrolling.
|
|
310
|
-
- Long and empty content do not break alignment or hide essential content.
|
|
311
|
-
- Focus order remains logical and visible.
|
|
312
|
-
- Scrollable regions and sticky elements behave as declared.
|
|
313
|
-
- Screenshot diffs are reviewed when the pattern has visual fixtures.
|
|
215
|
+
Pattern verification covers the relevant viewport, container, content, direction, writing-mode, interaction, overflow, focus, and sticky/scroll cases. See the [detailed verification matrix](layout/index.md#verification-matrix).
|