Skip to content

Analyze

Analyzers read component specs and produce aggregate snapshots for governance, auditing, and LLM-assisted analysis. Unlike transforms — which produce build artifacts your codebase consumes — analyzers produce one-time snapshots you read, diff, or hand to a language model.

Output lands in _analysis/ alongside your component subfolders, or in a custom path via --analysis.

Invocation

Terminal window
specs analyze [analyzers...] [options]

Analyzer names are passed as positional arguments. There is no config key — analyzers are run on demand.

Terminal window
specs analyze props
specs analyze styling
specs analyze props styling
specs analyze props --analysis ./reports

Options

OptionDescription
-o, --output <path>Path to the specs directory (input). Defaults to config outputDirectory or cwd.
--analysis <path>Where to write analysis output. Defaults to <specs-dir>/_analysis/.
--config <path>Path to specs.config.yaml.
--verboseLog each component as it is processed.

Available Analyzers

AnalyzerOutputWhat it produces
props_analysis/props.yamlCross-library prop inventory — frequency, enum discordance, API surface, slots
styling_analysis/styling.byComponent.json, _analysis/styling.byToken.jsonToken usage indexed by component and by token name

Output Directory

specs/
_analysis/
props.yaml # from specs analyze props
styling.byComponent.json # from specs analyze styling
styling.byToken.json # from specs analyze styling
ds-button/
api.yaml
contract.ts
styles.css

See Also