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
specs analyze [analyzers...] [options]Analyzer names are passed as positional arguments. There is no config key — analyzers are run on demand.
specs analyze propsspecs analyze stylingspecs analyze props stylingspecs analyze props --analysis ./reportsOptions
| Option | Description |
|---|---|
-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. |
--verbose | Log each component as it is processed. |
Available Analyzers
| Analyzer | Output | What it produces |
|---|---|---|
props | _analysis/props.yaml | Cross-library prop inventory — frequency, enum discordance, API surface, slots |
styling | _analysis/styling.byComponent.json, _analysis/styling.byToken.json | Token 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.cssSee Also
analyzecommand — full CLI reference- Transforms overview — build artifacts (contract, css)