Use supernova code analyze to scan your design system and usage code, then push snapshots to Supernova for processing.
The output becomes a shared, LLM-optimized knowledge layer used by both:
- Supernova Create (prototyping agent)
This keeps prototyping and implementation aligned with the same source of truth.
What analyze Does
supernova code analyze processes:
- TypeScript definitions
- JSDoc
- Markdown documentation
- Storybook stories
- real usage/adoption signals in consumer code
It creates snapshot artifacts and uploads them for backend processing.
Analysis Modes
Full pipeline (supernova code analyze) — recommended default
Runs both analyzers:
- Components: what exists and how to use it
- Adoption: how it is used in real code
supernova code analyze --package @design-system-package
If packages are already configured in supernova.config.json:
supernova code analyze
For multiple packages:
supernova code analyze --package @design-system-package --package @icons-package
Integration Topologies
1) Unified Monorepo (single root scan)
Use this when design-system packages and consumer apps live in one monorepo.
How to run:
- Execute from monorepo root
- Provide all DS packages as -package (or persist in config)
- Run full pipeline for complete context
# one-off run
supernova code analyze \\
--package @company/design-system \\
--package @company/icons \\
--package @company/primitives
# after packages are saved in supernova.config
supernova code analyze
When to use:
- centralized platform ownership
- easiest operational model
- best end-to-end visibility in a single run
2) Distributed Multi-Repo
Use this when teams run separate CI pipelines in separate repositories.
How to run:
- Run Analyze independently in each repo
- Keep package naming and target designSystemId consistent
- Use async mode in CI and monitor centrally
# repo A pipeline
supernova code analyze --package @company/design-system --noWait
# repo B pipeline
supernova code analyze --package @company/design-system --noWait
# monitor processing
supernova code analyze status --designSystemId <id>
When to use:
- federated orgs
- autonomous team pipelines
- repo-level rollout control with shared DS identity
Typical Flows
Full data refresh
supernova code analyze --package @design-system-package
CI async run
supernova code analyze --package @design-system-package --noWait
Preflight without upload
supernova code analyze --package @design-system-package --dryRun
Monitor processing
supernova code analyze status --designSystemId <id>
Command Reference
supernova code analyze --package <package-name> [--package <package-name>...]
supernova code analyze status [--designSystemId <id>]
Flags
|
Flag |
Short |
Required |
Description |
|---|---|---|---|
|
--package <value> |
-p |
Conditionally |
Repeatable. Required only when analyze.packages is not configured. |
|
--designSystemId <id> |
-d |
No |
Uses provided design system ID; otherwise from config/prompt. |
|
--exclude <path> |
|
No |
Repeatable path exclusion for analyzers. |
|
--dryRun |
|
No |
Write local snapshots only; skip upload. |
|
--noWait |
|
No |
Upload and start processing, do not wait for completion. |
Configuration
Analyze reads/writes supernova.config.json in the current directory.
Example:
{
"designSystemId": "123",
"analyze": {
"repoId": "7c8e9b6b-4c0a-4dbd-8f78-2d5c3d6a9f10",
"packages": ["@design-system-package", "@icons-package"],
"excludedPackages": ["excluded-package"]
}
}
Stored fields:
- designSystemId
- analyze.repoId
- analyze.packages
- analyze.excludedPackages
Output Artifacts
Snapshots are written under:
<package>/.supernova/snapshots/<snapshotId>/
Primary files:
- raw/*.json analyzer outputs
Upload and Processing Lifecycle
- CLI uploads snapshot archives
- CLI finalizes snapshots
- CLI starts processing runs
- CLI waits for completion (default)
Use --noWait to skip step 4 in CI.
Best Practices
- Run full pipeline regularly (for example after releases).
- Use targeted modes for faster incremental updates.
- Keep analyze.packages explicit and versioned.
- Use -dryRun before widening analysis scope.
- Use -exclude to reduce noise.
- In CI, use -noWait plus supernova code analyze status.