ShtukbaseStandard
DSC-R05/norms/rules/design-components/DSC-R05.md

Este texto aún no está traducido. Debajo está el original en inglés.

A component library reports its health

SHOULDavisacomprobaciónactiva
The health of a component library is reported in bands (full, missing, fallbacks, extra): headers, tokens only and coverage of the shadcn list; a library that is not full is told, never stopped.
Por qué: A library is a swappable part only while it follows the convention, but a library under construction, one of an earlier product or one with half the components must still install and run. So the convention only informs: it names the files that break the format and the shadcn components that are not there.
Campos de la página (15)
ruleIdDSC-R05
requirementThe health of a component library is reported in bands (full, missing, fallbacks, extra): headers, tokens only and coverage of the shadcn list; a library that is not full is told, never stopped.
levelSHOULD
floorfalse
statusactive
spheredesign
appliesTo/design
enforcers.shtukbase/packages/design-components/checks/health.ts
enforcerKindgate
modewarn
becauseA library is a swappable part only while it follows the convention, but a library under construction, one of an earlier product or one with half the components must still install and run. So the convention only informs: it names the files that break the format and the shadcn components that are not there.
baseline0
reviewBy2027-05-29
packdesign-components
railRead the lines "health component-library/<lib>": fix the files named under missing (header format, raw colours); fallbacks and extras are information.

The convention A component library has its health in this norm. The check health judges the libraries chosen on Design, or every library that holds components when none is chosen, and prints lines:

health component-library/<lib>: full (<n> components)
health component-library/<lib>: missing: <files, each with (header) or (raw colour)>
health component-library/<lib>: fallbacks: <shadcn components not in the library>
health component-library/<lib>: extra: components <own ids> | css names <names outside the contract>

Run. shtuk run design-components health; --lib <id> judges one library. The exit code is always 0: the check informs and never fails, so shtuk check shows the lines under a PASS.

What the bands mean. missing: a file with a component header that does not parse, or a CSS file with a raw colour outside the fallback of a var(). fallbacks: components of the shadcn list (lib/shadcn-names.json) the library does not have. extra: components with ids outside the shadcn list, and CSS names the library reads from the style that are neither in the token contract nor declared by the library (the --<id>-<control> properties of its own controls are not counted).

The hard checks. DSC-R01 to DSC-R04 are the gates of the same format; this norm is the report that never blocks.

El paquete Design components coloca esta página en /norms/rules/design-components/DSC-R05.md.Texto fuente