Rule 53 - Project: Component spec
Every Component and Utility ships a {name}.spec.js file that
codifies the capability vocabulary documented in
docs/content/capability-vocabulary.md for that component. The spec is the
single source of truth for:
- The Twig docblock - generated by
packages/cli/src/lib/twig-header.js. - The Storybook prop controls - stories import the spec and call
storyFor()fromsrc/tools/storybook-chrome/story-helpers.js, which derives the full control surface through theargTypesFor/argsForhelpers insemetrika-spec. - The CSS class words and
@layermembership - every CSS value class on the component MUST correspond to a value the spec declares for that capability (or an outlier enum-prop value).
Rules
Mandate and scope
53.1. Every Component (src/components/*) and every Utility
(src/utilities/*) MUST ship a {name}.spec.js file in its
directory, whether or not it ships a .twig file; a template-less
subject authors its example markup per
53.20. Foundations
(src/foundation/*) and Patterns (src/patterns/*) are EXEMPT.
yarn cli 53 walks both mandated trees. Where a check
below is component-shaped it says so and names the rule that covers
Utilities instead; everything else applies to both.
53.2. A component or utility spec file MUST default-export a CapabilitySpec built by calling componentSpec(name, {...}) from semetrika-spec. The result is a CapabilitySpec instance; inline object literals are NOT permitted. A foundation's .spec.js holds a token or asset registry (tokenRegistry, assetRegistry) instead, and the one utility-kind spec under src/foundation/ (typography) is read by the Rule 22 utility checks but sits outside the yarn cli 53 and matrix walks.
Required fields
53.3. The componentSpec(name, options) call MUST provide the fields below - name as the first argument, every other field as a key of the options object. SIGNATURES.md lists each option's type.
| Field | Type | Required | Purpose |
|---|---|---|---|
name | string | Yes | The kebab-case component name (matches directory), passed as the first argument of componentSpec(). |
kind | enum | No | Which of the shipped types the spec describes: ComponentKind.component (the default), ComponentKind.utility, or ComponentKind.pattern. yarn cli 53 and the matrix walk components and utilities, so a pattern spec is schema-legal but outside the lint walk (53.1). |
description | string | Yes | One or more sentences of human-readable purpose. |
slots | array | No | List of named Twig blocks (when the component has them). |
props | array | Yes | List of every non-value Twig prop the component accepts (HTML attribute scalars, booleans, strings, passthrough classes/attributes). |
capabilities | array | No | List of every capability the component supports - visual (Capability.X.use([X.subset], { default })) and behavioral (a global capability reference, or inline capability(name, { kind: CapabilityKind.behavioral, hooks, states, emits, listens }) per Rule 44). |
examples | array | No | Per-example metadata used by the producer to render markup samples. A template-less spec authors markup per 53.20 instead. |
dependencies | array | No | Components and utilities this one composes - see the criterion below the table. |
A component belongs in dependencies when this component reaches it in any of four ways: this component's twig {% include %}s its template; this spec's authored example markup composes it; this component's own CSS styles it, whether by selector (section > .container, .addon > .btn, .filter .chip) or by rendering its element form (a <a> this template emits and the Link component styles, a <label> it emits and Label styles); or this component's CSS operates that component's tokens, re-pointing one of its base slots (.form.sm setting --textfield-font-size) or taking a value it defines (a contained width reading --container-max-width). A value that only happens to match is not a reason to depend on a component: tabs that want the link's color read --focus-ring-color, the foundation token the link's color comes from, so a tabs bundle does not ship the link. 53.27 checks the stylesheet side of this criterion. Entries reference the dependency's spec - the imported spec object, or its bare name string only where the import would create a cycle.
53.4. description MUST be a non-empty string. Missing or empty
description is a hard lint failure.
Canonical symbols, not strings
53.5. Where the spec system exports a canonical symbol for a
value, specs MUST use that symbol rather than its string name.
Strings are accepted only inside prop.enum() for outlier values
that don't belong to a canonical capability.
| Where | Correct | Wrong |
|---|---|---|
| Capability symbol | Emphasis, Intent, Fill, Size, … | 'emphasis', 'fill' |
.use() value list | [Intent.info, Intent.warning] | ['info', 'warning'] |
.use() default | Emphasis.neutral, Size.md | 'neutral', 'md' |
prop.enum() values | string literals (outliers only) | symbols (symbols belong in .use()) |
Classes and attributes are explicit
53.6. Every component spec's props array MUST end with explicit
prop.array('classes', ...) and prop.object('attributes', ...)
entries. These are the passthrough slots every component exposes
per Rule 31.7 / 31.8. They are declared explicitly so each spec
reads as a complete contract.
props: [prop.string('content', { description: 'Body text.' }),prop.array('classes', { description: 'Additional CSS class words merged into the root element.' }),prop.object('attributes', { description: 'Additional HTML attributes spread on the root element.' }),],capabilities: [Emphasis.use([Emphasis.neutral]),Intent.use([Intent.info]),],
Outlier props are categorized separately
53.7. An enum prop whose values are not canonical capability words MUST set outlier: true. Three kinds qualify: on a Component, a prop mapping to an HTML attribute or JS-only behavior (autocomplete, loading, enctype, type on <button>) and a prop whose values are component-local class words (required on label, featured on snippet, flush on table); on a Utility, a registry of standalone class words the consumer applies (flush, col-6, at-md). The value list is validated either way.
The flag does exactly one thing beyond being published in
{name}.spec.json: on a Utility it tells Rule 53.8 there is no twig
variable to look for, because the class words are the consumer's to
apply rather than the template's to read.
It does NOT drive anything else, and two nearby mechanisms are easy to mistake for it:
- It does not exempt a value from Rule 53.17.
asClass: falseis the exemption, and it means the value never becomes a class word at all. Rule 22.16 states the same. - It does not put a value in
spec/SPEC_MATRIX.md's outlier tables. Those are classified structurally: an enum prop whose name matches a canonical capability yields an outlier VALUE, and one whose name does not yields an outlier CAPABILITY. A prop lands there on its name alone, flag or no flag.
prop.enum('autocomplete', {outlier: true,values: ['on', 'off'],default: 'on',description: 'Browser autofill behavior.',});
Capabilities live in their own section
53.8. Every capability a component supports MUST be declared in the
top-level capabilities array - visual capabilities via
Capability.X.use([subset], { default }), behavioral capabilities via a
global reference or an inline capability(name, { kind: CapabilityKind.behavioral, … }).
The props array carries non-capability fields only - HTML attribute
scalars, booleans, strings, and the passthrough classes/attributes
entries. Example:
import { componentSpec, prop } from 'semetrika-spec';import { Capability } from '../../../spec/spec.js';const { Emphasis, Intent } = Capability;export default componentSpec('callout', {description: 'Editorial emphasis block.',props: [prop.string('content', { description: 'Body text.' }),prop.array('classes', { description: 'Additional CSS class words merged into the root element.' }),prop.object('attributes', { description: 'Additional HTML attributes spread on the root element.' }),],capabilities: [Emphasis.use([Emphasis.neutral], { default: Emphasis.neutral }), Intent.use([Intent.info, Intent.warning, Intent.danger])],});
The twig template that backs the component MUST expose each
declared visual capability AND each declared prop as a real twig
variable (per Rule 31). A Utility's outlier props are excluded -
they register class words the consumer applies, so the template has no
variable to expose (see 53.7).
Generator and lint
53.9. The Twig docblock (Rule 32.1) MUST be regenerated from the
spec by packages/cli/src/lib/twig-header.js. The generator MUST be
byte-idempotent. --check mode is invoked from yarn lint and
exits non-zero on any drift.
53.10. The two directions of the spec ↔ CSS audit are separate
checks: 53.17 enforces spec → CSS (every spec value implemented)
and 53.18 enforces CSS → spec (no orphan class words). 53.18 reads
every selector in the component CSS rather than only the ones
inside a capability @layer, so a value implemented in the wrong
layer is still caught - by 53.17, which looks for it in the layer
its capability names.
53.11. The co-located {name}.mdx page (Rule 61.29) is NOT generated from the spec; its API section renders the contract from {name}.spec.json, and its prose is caught at review time only.
Coverage matrix
53.12. spec/SPEC_MATRIX.md is regenerated from every
{name}.spec.js by yarn cli matrix. One row per
Component / Utility, one column per visual capability in the
Capability registry in spec/spec.js (15 today).
yarn cli matrix --check verifies the committed
file matches the live specs and is invoked from yarn lint.
53.13. The CLI exposes produce, twig, and 53 as separate
verbs. yarn cli all --fix runs the producers,
rewrites every twig docblock, regenerates spec/SPEC_MATRIX.md,
and refreshes docs/content/handbook/rules/enforcement.md. yarn lint invokes the
read-only equivalents and exits non-zero on any drift.
Spec source of truth
53.14. The spec is the canonical source for prop documentation,
description, capability vocabulary, AND the CSS class words /
@layer membership for the component. The Twig docblock is
auto-rewritten from the spec by yarn cli twig
(or yarn cli 32 --fix); the CSS class words are
audited in both directions by 53.17 and 53.18. The MDX page's prose
is the one surface still review-enforced.
Producer output
53.15. The producer (packages/cli/src/lib/producer.js) MUST render
deterministically for a given spec + twig pair. Two consecutive
invocations MUST return byte-identical JSON. Non-determinism (e.g.
random() in twig, time-based defaults) is a hard lint failure;
hoist generated values to explicit props with default fallbacks.
53.16. Producer-rendered example markup MUST NOT contain whitespace
bleed - no runs of two or more spaces between non-whitespace
tokens, and no embedded newlines inside a rendered example. Add
twig trim markers ({%- -%} or {{- -}}) to remove the bleed.
CSS implementation
53.17. Every spec-declared enum value MUST have a matching
.{component}.{value} selector (with a non-empty body) inside the
corresponding @layer {capability} block in the component CSS. This is
the spec → CSS audit: declaring Emphasis: subtle in the spec
without a matching .callout.subtle { … } rule inside
@layer emphasis is a build failure. Empty rule bodies do NOT
satisfy this requirement - every value, including the capability default,
MUST explicitly assign its properties per Rule 24.17.
The exemption is asClass: false, which says the value never becomes
a class word at all. outlier: true does NOT exempt a value here, per
Rule 22.16 - on an atomic utility
that flag means "not the .{component}.{value} selector shape", not
"not a class".
This check runs for Components only. Both halves of its shape are
component-specific: a Utility's classes are standalone (.invisible,
never .visibility.invisible) and sit in the capability layer rather
than one named after the declaring prop, so the selector match and the
layer lookup would both miss. Rule 22.16 covers Utilities instead,
matching per value word anywhere in the utility's own CSS.
53.18. The inverse audit: every class word that appears compounded
with the component class in the component CSS MUST be declared as
an enum value in that component's spec. The check splits each
selector into compound selectors, and for any compound containing
.{component} collects the other class tokens in it; child classes
(.{component}-{child}) and the component class itself are skipped.
An enum prop with asClass: false does not count as a declaration -
that flag says the value never becomes a class word.
A component whose CSS styles a value its spec never names publishes a class consumers cannot discover: it appears in no matrix, no vocabulary page, and no produced example. This is the check that catches CSS growing a value the spec was never told about.
/* Wrong - header.css styles a value header.spec.js does not declare. */@layer position {.header.sticky {position: sticky;}}
Value sidecar tokens
53.19. Per-value sidecar token contract. A visual capability
becomes subject to this contract by passing { default: <value> }
to .use(). Capabilities without a default opt are exempt; their
tokens and rule bodies are not validated here.
{component} below is the component's token prefix and selector
anchor - its registered mirror short form where it has one (btn
for button, per Rule 11.10), its
name otherwise.
When a value declares a default, the following MUST hold:
a) Token naming. Every component sidecar token MUST follow the
canonical form --{component}-{variant}-{concern} (variant before
concern). A token of the form --{component}-{concern}-{variant}
(variant after concern) is a violation. The canonical form keeps
the target-state-property triple consistent with the CSS selector
.{component}.{variant} and with how Rule 23.1 documents semantic
tokens.
b) Per-value token existence. For every value v
(including the default), a CSS custom property whose name starts
with --{component}-{v}- MUST exist in {component}.variables.css.
The token MUST be declared there. Naming it only in the fallback
position of a read - var(--{component}-{v}-{concern}, var(--{foundation}-{v})) - does not satisfy this, because nothing
declares the token: (c) finds no reference to it and (e) has no
sibling to compare the base against.
Rule 23.7 states which of the two
shapes a given rule takes.
Exception (behavior-only value): if every selector matching
.{component}.{v} in {component}.css contains zero
var(--{component}-*) references, the value flips a structural
property and is exempt.
c) Per-value token usage. Every --{component}-{v}-* token in
the sidecar MUST be referenced inside the body of at least one
selector matching .{component}.{v}.
d) No misplaced read. A .{component}.{v} rule body MUST NOT
read a base sibling --{component}-{prop} when its value-specific
sibling --{component}-{v}-{prop} exists. The default-value rule
must read its own --{component}-{default}-{prop} token, not the
infix-less base. The base exists for the no-value-class case;
the value rule still needs to set the property to its own value so
chain composition (e.g. class="c sm md") resets every property
the earlier class overrode.
e) Default mirror. The infix-less base --{component}-{prop}
value MUST equal its --{component}-{default}-{prop} sibling
(direct equality, or via var(--{component}-{default}-{prop})).
The base IS the default by convention.
f) Property-surface coverage. Every .{component}.{v} rule
body in a capability MUST set the same set of CSS properties as every
other .{component}.{other-value} rule in that capability. Chain
composition requires that the later class can reset every property
the earlier class overrode, which only works when both rules touch
the same surface. Same behavior-only exemption as 53.19b applies.
g) No literal re-point. A .{component}.{v} rule re-points a
base slot to the value's own --{component}-{v}-{concern} token,
never to a literal (--card-shadow: none), so the value owns a
token a consumer can override. A slot whose base mirrors another
capability's default (button's --btn-border-color reads the
Emphasis default while the Fill default clears it, per
Rule 24.16b) is exempt: the later
layer carries only its own contribution.
Run yarn cli 53-19 to surface findings; the same
check runs as part of yarn lint and blocks on any violation.
Template-less example markup
53.20. A spec whose component ships no {name}.twig - a CSS-only
shell whose markup is the consumer's own composition - MUST author
each example's markup string directly. The producer emits it in
place of a render, after collapsing whitespace so Rule 53.16 holds
however the string is formatted in the spec.
Two shapes are rejected, both at production time:
markupauthored alongside a{name}.twig. The template is the single source of the component's markup; a literal string beside it can document markup the template never produces.- an example with neither
markupnor a{name}.twig. There is nothing to render, and the alternative - dropping the example - publishes a spec whoseexamplesarray silently omits what its author declared.
Every other example check applies unchanged: whitespace bleed, the non-empty-markup requirement, and the undeclared-class-word scan all run against authored markup exactly as they do against rendered markup.
examples: [{name: 'composition',description: 'Reference shell: the banner element carries the surface, an inner container and grid carry the layout.',markup: '<header>' + '<div class="container py2">' + '{brand}{nav}' + '</div>' + '</header>',},],
Styling declaration
53.21. Every component carries exactly one value of the Styling
rendering capability, and its CSS decides which one:
- classed - styling attaches to the component class (or an opt-in marker attribute). Declared by omitting the capability.
- bare - element-form selectors alone carry the styling and no
mirror class exists. Declared as
c.Styling.use(c.Styling.bare). - mirrored - one selector group pairs an element-form selector
with the mirror class (
article, .card { … },button, .btn { … }- the mirror signature of Rule 11.2). Declared asc.Styling.use(c.Styling.mirrored).
The spec engine enforces the shape: use() takes exactly one
value, use(c.Styling.classed) is rejected because absence
declares it, and a spec may carry at most one rendering-kind
capability. The declaration and the implementation are audited in
both directions:
- a mirror pairing without the
mirroredvalue is a violation, and themirroredvalue without the pairing is a violation; - element-form styling with no pairing requires the
barevalue, and thebarevalue without such styling is a violation; a bare component's CSS carries no.{name}class compound, since no mirror class exists for it to style; - a mirrored template MUST NOT merge its mirror class onto the root: templates render the bare element form, and the Storybook mirror switch renders the class form;
- the component's stories MUST carry the literal badge tags of
exactly the declared value: the value word on the default export
(badges the component row in the sidebar) and
<value>:playgroundon thePlaygroundstory (badges its sidebar row).
An element-form selector carries no class token, no combinator,
and no pseudo: a bare element (article), an attribute-qualified
one (input[type='file']), or a pure attribute selector
([role='group']). A :not() holding only attribute selectors
excludes a sibling control rather than naming a state, so
input[type='checkbox']:not([role='switch']) keeps the element
form. Selectors rooted on body or html are page
side effects, and data-* attribute selectors are opt-in markers
(Rule 12 reserves data attributes
for JS hooks), so neither counts as an element form. The mirror
anchor is the component name or its registered short form
(.btn), so a child-class group (figcaption, .figure-caption)
never qualifies.
The declaration is what the Storybook integration reads:
argTypesFor injects the Mirror class switch (the Styling
controls category, on by default) on mirrored components, the
storyFor() handle's apply() merges the mirror class into
classes while the switch is on, and the producer publishes the
value in {name}.spec.json as "styling": "<value>".
// CSS pairs the element form with the mirror class.capabilities: [c.Styling.use(c.Styling.mirrored), ...],// Element selectors alone style the semantic markup.capabilities: [c.Styling.use(c.Styling.bare), ...],
One word, one surface
53.22. A class word MUST be declared by at most one of a component's enum surfaces. The comparison spans every visual capability the spec opts into and every enum prop it declares, so all three shapes are violations: two capabilities sharing a word, two enum props sharing one, and a capability sharing one with an outlier enum prop (Rule 53.7).
Each surface becomes its own control - argTypesFor publishes one per
capability and one per enum prop - and the template merges whatever each
control selects into the root class list without consulting the others.
Two surfaces owning one word therefore put both selections on the root at
once, where layer order alone decides which one renders. The losing
control keeps reporting a value the element does not carry, so the panel
states something the markup contradicts.
A value marked asClass: false never becomes a class word, so it is
outside the comparison - the same exemption
53.17 applies. Reuse ACROSS components is
untouched: sm belongs to every sized component, and only one
component's own declarations are compared against each other.
// Wrong - 'top' and 'bottom' reach the root from two controls, and// whichever loses the cascade leaves its control reading a value the// element does not carry.props: [prop.enum('position', { outlier: true, values: ['top', 'bottom'], default: 'top', description: 'Semantic position.' })],capabilities: [c.Alignment.use([c.Alignment.top, c.Alignment.bottom])],// Correct - one surface owns the placement words.capabilities: [c.Alignment.use([c.Alignment.top, c.Alignment.bottom])],
Declaration calls
53.23. Every declaration factory - componentSpec, slot, prop.*, capability, hook, state, emit, and listen - MUST be called as (identifier, options): the name the declaration is addressed by, then one options object that names every other field, description included. Nothing else is passed positionally.
The engine checks the shape at construction, so a malformed call fails the module load at the line that wrote it. It rejects a second argument that isn't a plain object, an options key the factory doesn't read, and a slot, prop, or facet written as an object literal instead of built by its factory. Rejecting unknown keys is what catches a misspelled requried: true, which a spread of unchecked options would drop without a word.
The foundation token and asset factories - token, tokenFamily, tokenRegistry, asset, and assetRegistry - take the same shape and get the same checks, so every declaration in the spec system reads alike.
Each factory declares its options once, as a schema in semetrika-spec: every key's type, whether a call has to pass it, and what it means. The engine validates calls against that schema, and yarn cli signatures renders it twice - SIGNATURES.md lists every option in a table, and packages/spec/src/types.d.ts gives your editor the same types through each factory's JSDoc annotation. That's how you find out what an options object takes without reading the engine.
// Correct.slot('content', { description: 'Body text.', required: true }),hook('init', { description: 'Marks the root.', required: true }),// Wrong - the description is positional and the flag is unnamed.slot('content', 'Body text.', { required: true }),hook('init', 'Marks the root.', true),
Flags state a change
53.24. A flag MUST be written only when it changes the flag's default. That's required: true, outlier: true, asClass: false and isGlobal: true, plus default: true on a boolean prop, whose implicit default is false. The engine rejects a flag written at its default, so required: false or a boolean prop's default: false fails the module load.
One form per flag keeps the published contract consistent. A boolean prop with no default and one with default: false render identically, yet only the second publishes a "default": false for a reader to reconcile with the first.
// Correct - the flag is absent until it changes something.prop.boolean('is_open', { description: 'Renders the open attribute.' }),prop.boolean('has_close', { default: true, description: 'Renders a close button.' }),// Wrong - both flags restate their default.prop.boolean('is_open', { default: false, description: 'Renders the open attribute.' }),slot('title', { description: 'Heading text.', required: false }),
Values follow the capability's order
53.25. Capability.X.use([...]) MUST list its values in the order the capability declares them in spec/spec.js. The engine rejects any other order and names the order it expects.
Without the rule, a list's order decides something nobody chose. The producer's full example renders the value after a capability's default, or its first listed value when there's no default, so a pill-first Shape list and a rounded-first one publish different examples for the same capability. The published values and the Storybook control follow the list too, and a fixed order keeps them reading the same on every component.
// Correct - Shape declares rounded, square, pill, circle.c.Shape.use([c.Shape.rounded, c.Shape.pill]),// Wrong - pill listed ahead of rounded.c.Shape.use([c.Shape.pill, c.Shape.rounded]),
Required slots and props
53.26. required: true marks a slot or prop the component can't do without, and the cases below settle when that is:
- An array prop MUST be required when its template renders nothing while the array is empty - the items a collection exists to show, such as
tabspanelsortableheadersandrows. An array another prop can stand in for stays optional:videorenders itsembed_urlwhen it has nosources. - A form control's
labelslot MUST be required. The template still renders the control without it, but that control has no accessible name, which Rule 13 doesn't allow.
The flag reaches the Storybook controls panel, the minimal example the producer renders, and the published {name}.spec.json, so one component marking its collection required while a sibling doesn't tells a reader two different things about the same kind of prop.
// Correct - an empty headers array renders no table, and a select needs its label.prop.array('headers', { required: true, description: 'Array of column header label strings.' }),slot('label', { description: 'Visible label text for the select.', required: true }),// Wrong - both read as optional, yet neither component works without them.prop.array('headers', { description: 'Array of column header label strings.' }),slot('label', { description: 'Visible label text for the select.' }),
Cross-entry references resolve
53.27. A component or utility stylesheet - {name}.css or {name}.variables.css - MUST reference another component's or utility's class or token only when that entry is in its dependency closure: the dependencies its {name}.spec.json publishes, authored and derived per 53.3, followed transitively.
build --components=<name> concatenates exactly that closure. A class the bundle does not ship matches nothing, and a token it does not declare invalidates every declaration that reads it, so tabs reading --link-color in a bundle without the link have no active color. Declaring the dependency makes the reference resolve; reading the foundation token a borrowed value comes from removes the reference instead.
Ownership comes from the declaration site. A token belongs to the entry whose {name}.variables.css declares it, and a token that src/variables.css or src/options.css declares is foundation: it ships in every bundle and is never a cross-entry reference. A class belongs to the entry whose name it is, or starts with followed by a hyphen - the component or utility class and its {name}-{child} classes - and a mirror short form counts as its component's (.btn is button's).
3 positions are not a reference. A class inside :not() excludes the other component rather than styling it, and a class inside :has() only conditions on it. A compound carrying a class a third-party library writes is skipped too: Prism marks a numeric literal .token.number, which is not the number component. An element selector names no entry, so element-form reach (.message a) stays a 53.3 review call.
/* group.css - the group styles buttons and re-points their base slots. */@layer size {.group.sm > .btn {--btn-font-size: var(--btn-sm-font-size);}}// group.spec.js - so button is a dependency.dependencies: [Button],
Examples render and stay declared
53.28. Every example except empty MUST render markup when the component declares any slot, prop or capability value. Blank markup means the template short-circuited on a falsy default, so the example's uses supplies the gating value, or the gating slot or prop is marked required so the producer supplies a placeholder.
53.29. Every class word in rendered example markup MUST be declared by the component itself, a dependency, a utility or a foundation enum. A boolean prop's is_, has_ or use_ stem, the at- breakpoint prefix and a {declared}-{child} class count as declared. An undeclared word is markup consumers cannot rely on.
One declaration surface per class word
53.30. A visual capability MUST come from the canonical registry in spec/spec.js, attached with .use([...]). A spec file MUST NOT build one with capability(name, { kind: CapabilityKind.visual, ... }); the inline form is for behavioral capabilities, which a component owns because it owns the script behind them. A bare reference - capabilities: [c.Spacing] - is rejected too: it takes every value the capability declares, so a subject that ships two of Size's five silently claims all five.
So a component-local class word has exactly two homes, and which one it takes follows from whether the concept is shared. A word a second subject could carry is registered as a canonical capability and opted into. A word only this subject can carry stays an enum prop with outlier: true per 53.7 - artwork on icon, direction on dropdown.
A third home makes the choice by precedent rather than by that question. Two subjects then declare one concept two ways, as spacing was declared inline on accordion and as an outlier prop on table, fieldset and grid - each with its own sentence describing the same .flush class.
// Correct - a shared concept, registered once and opted into.capabilities: [c.Spacing.use([c.Spacing.flush])],// Correct - a word only this component carries.props: [prop.enum('artwork', { outlier: true, values: ['outline', 'solid'], default: 'outline', description: '…' })],// Wrong - a visual capability built in the spec file.capabilities: [capability(v.spacing, { kind: CapabilityKind.visual, description: '…', values: { [v.flush]: '…' } })],
53.1, 53.3, 53.4, 53.7, 53.8, 53.15, 53.16, 53.17, 53.18, 53.19, 53.20, 53.21, 53.22, 53.23, 53.24, 53.25, 53.27, 53.28, 53.29, 53.30 by yarn cli 53 (loadComponentSpec in packages/cli/src/lib/spec-loader.js, findUnflaggedOutlierEnums in packages/cli/src/rules/53.js, findSpecViolations in packages/cli/src/rules/53.js, produceSpecJson in packages/cli/src/lib/producer.js, detectWhitespaceBleed in packages/cli/src/rules/53.js, findUnimplementedSpecValues in packages/cli/src/rules/53.js, findUndeclaredComponentClasses in packages/cli/src/rules/53.js, runRule53Values in packages/cli/src/rules/53.js, findLiteralRepoints in packages/cli/src/rules/53.js, findRenderingDeclarationDrift in packages/cli/src/rules/53.js, findClassFormOnBare in packages/cli/src/rules/53.js, findCollidingClassWords in packages/cli/src/rules/53.js, findUndeclaredCrossReferences in packages/cli/src/rules/cross-references.js, findEmptyExampleMarkup in packages/cli/src/rules/53.js, findUndeclaredMarkupClasses in packages/cli/src/rules/53.js, findInlineVisualCapabilities in packages/cli/src/rules/53.js). 53.2, 53.5, 53.6, 53.9-53.14, 53.26 are review only. See enforcement.md.