Schemas / v0.4
Lifecycle
Composable lifecycle fragment for the v0.4 contracts: a shared status vocabulary and deprecation records that every entity type references instead of redefining.
This is a reusable definitions fragment, not a standalone
manifest format: the root document has no properties of its own and
validates no complete manifest. The other v0.4 contracts select the
definitions they need from here with $ref, so every entity
type shares one canonical vocabulary for status and deprecation.
Because the fragment cannot be pointed at by a manifest's
$schema, the examples on this page show fragment
records — single definition values — rather than full manifests.
Minimal fragment record
The smallest valid Deprecated
record carries only the required message field. It is a
value the definition accepts, not a complete manifest.
{
"message": "Use the “ghost” variant instead."
}
Nested definitions
The shared lifecycle definitions. Every v0.4 contract that models
lifecycle metadata $refs the ones it needs from here, so
all entity types share one vocabulary.
Status
Plain string lifecycle status for a manifest entity.
Use when: Set on tokens, utilities, icons, CEM declarations, attributes, and DTCG extension payloads.
Origin: Shared v0.4 status vocabulary; only deprecated and removed are normative.
{
"status": "deprecated"
}
A plain string with no
constraints. Consumers may use any value; the lifecycle contract
treats only deprecated and removed as
normative, and everything else is informational.
Deprecated
Canonical deprecation record for native manifest entities; permissive on unknown properties.
Use when: The record branch of NativeDeprecation, and the target of the local Deprecated aliases in tokens, utilities, and icons.
Origin: Shared v0.4 deprecation record.
{
"message": "Use the “ghost” variant instead.",
"removal": "2027-01-01",
"replacement": "ghost"
}
This definition is permissive: unknown properties are allowed, so consumers can extend records without breaking validation.
| Field | Type | Description |
|---|---|---|
|
|
string
|
Required, human-readable deprecation reason plus migration guidance. |
|
Use when: Always set; it is the only required field of the record. Origin: Canonical deprecation record field. Related: Example usage |
||
|
|
string
|
Optional removal target: ISO date (YYYY-MM-DD), semver (X.Y.Z), or quarter (YYYY-Qn). |
|
Use when: When removal is planned; only ISO dates drive time-aware severity. Origin: Canonical deprecation record field. Related: Example usage |
||
|
|
string
|
Optional machine-readable replacement identifier, scoped by entity type. |
|
Use when: When a drop-in replacement exists that tooling can point users at. Origin: Canonical deprecation record field. Related: Example usage |
||
StrictDeprecated
Closed deprecation record for the DTCG extension namespace; unknown properties are rejected.
Use when: DTCG $extensions deprecation payloads, where the extension contract is closed.
Origin: Shared v0.4 DTCG extension namespace record.
{
"message": "Use the “ghost” variant instead.",
"removal": "2027-01-01",
"replacement": "ghost"
}
Same fields as Deprecated,
but closed: additionalProperties: false rejects unknown
keys, keeping the DTCG extension namespace strict.
| Field | Type | Description |
|---|---|---|
|
|
string
|
Required, human-readable deprecation reason plus migration guidance. |
|
Use when: Always set; it is the only required field of the record. Origin: DTCG extension namespace record field. Related: Example usage |
||
|
|
string
|
Optional removal target: ISO date (YYYY-MM-DD), semver (X.Y.Z), or quarter (YYYY-Qn). |
|
Use when: When removal is planned; only ISO dates drive time-aware severity. Origin: DTCG extension namespace record field. Related: Example usage |
||
|
|
string
|
Optional machine-readable replacement identifier, scoped by entity type. |
|
Use when: When a drop-in replacement exists that tooling can point users at. Origin: DTCG extension namespace record field. Related: Example usage |
||
NativeDeprecation
Union type for a native manifest deprecation field: false, null, or a Deprecated record.
Use when: The deprecated field on tokens, utilities, and icons in v0.4 native manifests.
Origin: Shared v0.4 native deprecation pattern (deprecated plus status).
{
"deprecated": {
"message": "Use “lasagna-action-button” instead.",
"removal": "2027-01-01"
}
}
A oneOf union over exactly three shapes:
-
boolean false— an explicit "not deprecated" assertion in a native manifest. DTCG source cancellation uses the standard$deprecated: falsefield, not an extension value. -
null— not asserted; no lifecycle claim. -
Deprecated— the full deprecation record.
The false and null branches keep the field
lightweight when an entity is simply not deprecated, while the
record branch carries the full deprecation payload.
DeprecatedValue
Deprecation record for a specific attribute value in a CEM; permissive on unknown properties.
Use when: Entries of deprecatedValues on CEM attribute entries extended by the v0.4 component schema.
Origin: Shared v0.4 CEM per-value deprecation record.
{
"value": "flat",
"message": "Use “ghost” instead."
}
Like Deprecated this
definition is permissive on unknown properties, and it adds the
required value field that names the deprecated
attribute value.
| Field | Type | Description |
|---|---|---|
|
|
string
|
The specific attribute value being deprecated. |
|
Use when: Always set for a DeprecatedValue record; it names the enum value. Origin: CEM per-value deprecation record field. Related: Example usage |
||
|
|
string
|
Required, human-readable deprecation reason plus migration guidance. |
|
Use when: Always set; it is required alongside value. Origin: CEM per-value deprecation record field. Related: Example usage |
||
|
|
string
|
Optional removal target: ISO date (YYYY-MM-DD), semver (X.Y.Z), or quarter (YYYY-Qn). |
|
Use when: When the value is scheduled for removal; only ISO dates drive time-aware severity. Origin: CEM per-value deprecation record field. Related: Example usage |
||
|
|
string
|
Optional machine-readable replacement identifier; for CEM attribute values, an enum value of the same attribute. |
|
Use when: When a replacement enum value exists that tooling can point users at. Origin: CEM per-value deprecation record field. Related: Example usage |
||
How the v0.4 contracts use this fragment
Every v0.4 contract that models lifecycle metadata $refs
definitions from this file instead of redefining them:
-
Token.statususesStatusToken.deprecatedusesNativeDeprecation -
UtilityClass.statususesStatusUtilityClass.deprecatedusesNativeDeprecation -
Icon.statususesStatusIcon.deprecatedusesNativeDeprecation -
LifecycleFields.status,AttributeExtensions.statususesStatusdeprecatedValuesentries usesDeprecatedValue -
TokenExtensions.status,GroupExtensions.statususesStatusTokenExtensions.deprecated,GroupExtensions.deprecatedusesStrictDeprecated
The native manifest contracts (tokens, utilities, icons) also carry a
local Deprecated alias that $refs
lifecycle.json#/definitions/Deprecated, and the DTCG
extensions schema aliases its local Deprecated to
StrictDeprecated — one canonical record shape per
namespace, defined once here.
Lifecycle selection and rules
Selection
-
Native manifests (tokens, utilities, icons): the
$schemaURL selects the validating contract.schemaVersionis a plain string, not version dispatch; the consuming resolver selects the matching v0.4 profile. -
A v0.3 manifest keeps its v0.3 URL and
"0.3.0". A migrated one is valid only against v0.4 and needs a v0.4-capable consumer. -
CEM and DTCG are host formats: no Design Lasagna
schemaVersion. A CEM manifest keeps its CEMschemaVersion; DTCG lifecycle data lives in$extensions["recipes.designlasagna"]. -
CEM and DTCG extension lifecycle fields apply only when project or
resolver config selects lifecycle profile
0.4; otherwise the legacy profile applies. No schema file encodes this; seedocs/lifecycle-migration.mdin@designlasagna/schemas@0.4.0. - Legacy data has no automatic, lossless conversion; do not assume universal v0.4 consumer support.
- During the transition, v0.3 and v0.4 documents coexist, each valid against its own contracts.
-
Legacy parser-only forms (native booleans or strings, raw DTCG
$status/$removal/$replacement, prose-derived data) have no lossless upgrade path; ask authors for structuredmessage,removal,replacement.
Rules
- DTCG extension
deprecatedmust not befalseornull; clear inherited deprecation with the standard$deprecated: false. - CEM
deprecatedmust not be an object. - Positive evidence (
status: deprecatedorremoved, or a deprecation record) beatsfalse; the conflict is reported aslifecycle-conflict. removedis always an error.- Only exact ISO dates (
YYYY-MM-DD) inremovaldrive severity; semver and quarters are displayed as authored. - Expand DTCG
$extendsbefore lifecycle selection. - Offline validation: register all six exported v0.4 schemas by
$id, since the relative$refs to this fragment do not resolve from a single file.