Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DOMAINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ The initial five domain leaves are independent method rewrites inspired by [emil

`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.

## Promotion And Staleness
## Lifecycle And Staleness

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.
External adaptations begin `experimental`. Domain lifecycle changes are repository-owner decisions based on whether the bounded scope remains coherent, provenance and platform-version obligations are current, and machine-checkable contracts have relevant validator coverage. User studies, reader tasks, adoption counts, and attestations are neither required nor sufficient for a domain lifecycle change. Remove or revise a page when its source revision changes materially, a platform claim becomes stale, a local quality gate contradicts it, or its route or boundary no longer matches the domain contract.

### Consumer Reference Promotion

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.
This separate contract governs consumer-reference invariant sharing only; it does not govern domain or page lifecycle. 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.

## IA Navigation

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion design-engineering/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This domain proposes product-layer questions. [Quality Gates](../quality/index.m

## Domain Contract

See [StyleGallery Domains](../DOMAINS.md) for lifecycle, provenance, page membership, and promotion rules.
See [StyleGallery Domains](../DOMAINS.md) for lifecycle, provenance, page membership, and staleness rules.

## IA Navigation

Expand Down
6 changes: 6 additions & 0 deletions examples/stylegallery-homepage/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
type: Example Guide
title: StyleGallery Homepage Example
description: Static product-layer homepage built as an end-to-end npm package usage test.
---

# StyleGallery Homepage Example

Static product-layer homepage built as an end-to-end npm package usage test.
Expand Down
2 changes: 1 addition & 1 deletion motion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Out of scope: universal timing or easing rules, unmeasured performance claims, a

## Domain Contract

See [StyleGallery Domains](../DOMAINS.md) for lifecycle, provenance, page membership, and promotion rules.
See [StyleGallery Domains](../DOMAINS.md) for lifecycle, provenance, page membership, and staleness rules.

## IA Navigation

Expand Down
4 changes: 2 additions & 2 deletions motion/vocabulary.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The terms are implementation-neutral. A framework, operating-system behavior, or

## Opinionated Guidance

The family ordering favors what a reader can observe before implementation details. It is useful for retrieval, but it is not a complete ontology. Add a term only after a reader task demonstrates that existing terms and aliases cannot express the distinction.
The family ordering favors what a reader can observe before implementation details. It is useful for retrieval, but it is not a complete ontology. Add a term only when contrastive repository cases show that existing terms and aliases cannot express the distinction.

## Platform-Specific Guidance

Expand All @@ -66,7 +66,7 @@ Names tied to iOS, macOS, a browser API, Motion, Framer Motion, React, or a comp

## Verification Contract

A vocabulary lookup should exercise exact, ambiguous, and unknown cases. Pass requires one justified term, an ordered candidate set with a stated distinction, or `unknown`; invented winners fail. A new term also requires a findability task showing the current route cannot reach an adequate term within two hops.
A vocabulary lookup should exercise exact, ambiguous, and unknown cases. Pass requires one justified term, an ordered candidate set with a stated distinction, or `unknown`; invented winners fail. A new term also requires contrastive exact, ambiguous, and unknown cases showing that the current vocabulary cannot express the distinction.

## Source, License, And Attribution

Expand Down
2 changes: 1 addition & 1 deletion platform-guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A platform guide names the platform, source authority, version or review date, w

## Domain Contract

See [StyleGallery Domains](../DOMAINS.md) for lifecycle, provenance, page membership, and promotion rules.
See [StyleGallery Domains](../DOMAINS.md) for lifecycle, provenance, page membership, and staleness rules.

## IA Navigation

Expand Down
15 changes: 14 additions & 1 deletion scripts/domain-validation-checks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,24 @@ export function createDomainValidationChecks({
}
}

function checkDomainLifecycleBoundary() {
const relative = "DOMAINS.md";
const content = stripFencedCodeBlocks(read(relative));
const required = [
"## Lifecycle And Staleness",
"Domain lifecycle changes are repository-owner decisions",
"machine-checkable contracts have relevant validator coverage",
"User studies, reader tasks, adoption counts, and attestations are neither required nor sufficient for a domain lifecycle change.",
];
for (const clause of required) if (!content.includes(clause)) failures.push(`${relative}: missing lifecycle boundary ${clause}`);
}

function checkPromotionBoundary() {
const relative = "DOMAINS.md";
const content = stripFencedCodeBlocks(read(relative));
const required = [
"### Consumer Reference Promotion",
"does not govern domain or page lifecycle",
"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",
Expand All @@ -137,5 +150,5 @@ export function createDomainValidationChecks({
for (const clause of required) if (!content.includes(clause)) failures.push(`${relative}: missing promotion boundary ${clause}`);
}

return { checkIndex, checkLeaf, checkReferenceDocuments, checkPromotionBoundary };
return { checkDomainLifecycleBoundary, checkIndex, checkLeaf, checkReferenceDocuments, checkPromotionBoundary };
}
8 changes: 8 additions & 0 deletions scripts/test-validate-domains.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,14 @@ const baseFiles = {
"",
"[Consumer Reference](consumer-reference/index.md) is shared infrastructure outside the five-domain contract and cannot add a sixth domain row.",
"",
"## Lifecycle And Staleness",
"",
"Domain lifecycle changes are repository-owner decisions when machine-checkable contracts have relevant validator coverage.",
"User studies, reader tasks, adoption counts, and attestations are neither required nor sufficient for a domain lifecycle change.",
"",
"### Consumer Reference Promotion",
"",
"This separate contract governs consumer-reference invariant sharing only; it does not govern domain or page lifecycle.",
"The 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.",
Expand Down Expand Up @@ -200,6 +206,8 @@ const cases = [
{ name: "manifest_extra_domain", mutate: ["DOMAINS.md", "| Platform Guides | [Platform Guides](platform-guides/index.md) | `experimental` |", "| Platform Guides | [Platform Guides](platform-guides/index.md) | `experimental` |\n| Other | [Other](other/index.md) | `experimental` |"], expect: "DOMAINS.md: missing canonical domain contract" },
{ name: "consumer_reference_sixth_domain", mutate: ["DOMAINS.md", "| Platform Guides | [Platform Guides](platform-guides/index.md) | `experimental` |", "| Platform Guides | [Platform Guides](platform-guides/index.md) | `experimental` |\n| Consumer Reference | [Consumer Reference](consumer-reference/index.md) | `stable` |"], expect: "DOMAINS.md: missing canonical domain contract" },
{ name: "consumer_reference_four_domain_contract", mutate: ["DOMAINS.md", "five-domain contract", "four-domain contract"], expect: "DOMAINS.md: missing canonical domain contract" },
{ name: "domain_lifecycle_reader_gate", mutate: ["DOMAINS.md", "User studies, reader tasks, adoption counts, and attestations are neither required nor sufficient for a domain lifecycle change.", "User studies and reader tasks are required for a domain lifecycle change."], expect: "DOMAINS.md: missing lifecycle boundary User studies, reader tasks, adoption counts, and attestations are neither required nor sufficient for a domain lifecycle change." },
{ name: "consumer_promotion_claims_domain_lifecycle", mutate: ["DOMAINS.md", "does not govern domain or page lifecycle", "also governs domain and page lifecycle"], expect: "DOMAINS.md: missing promotion boundary does not govern domain or page lifecycle" },
{ name: "promotion_stable_by_count", mutate: ["DOMAINS.md", "Shared stable has no numeric adoption threshold.", "Shared stable uses a numeric adoption threshold."], expect: "DOMAINS.md: missing promotion boundary Shared stable has no numeric adoption threshold" },
{ name: "promotion_related_as_independent", mutate: ["DOMAINS.md", "Editorial and terminal are related examples in one fixture set.", "Editorial and terminal are independent consumers."], expect: "DOMAINS.md: missing promotion boundary Editorial and terminal are related examples in one fixture set" },
{ name: "promotion_yaml_route", mutate: ["DOMAINS.md", "Promotion records are JSON-only", "Promotion records may use YAML"], expect: "DOMAINS.md: missing promotion boundary Promotion records are JSON-only" },
Expand Down
3 changes: 2 additions & 1 deletion scripts/validate-domains.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export function validateDomains({ root: nextRoot = process.cwd(), domains: nextD
root = nextRoot;
domains = nextDomains;
failures = [];
const { checkIndex, checkLeaf, checkReferenceDocuments, checkPromotionBoundary } = createDomainValidationChecks({
const { checkDomainLifecycleBoundary, checkIndex, checkLeaf, checkReferenceDocuments, checkPromotionBoundary } = createDomainValidationChecks({
domains,
failures,
read,
Expand All @@ -218,6 +218,7 @@ export function validateDomains({ root: nextRoot = process.cwd(), domains: nextD
}
failures.push(...collectDomainBoundaryFailures(root, boundaryRegistry(domains)));
checkReferenceDocuments();
checkDomainLifecycleBoundary();
checkPromotionBoundary();

const result = { ok: failures.length === 0, checkedDomains: domains.length, checkedLeaves, failures: [...new Set(failures)] };
Expand Down
Loading