Salta ai contenuti
← Torna al sito
Soleri | Docs

Domain Packs

Questi contenuti non sono ancora disponibili nella tua lingua.

Domain packs are npm packages that register specialized operations with the Soleri engine. Unlike knowledge packs (which add static vault entries), domain packs add algorithmic capabilities — operations that compute results, validate data, and enforce rules.

Soleri ships with four built-in domain packs. All are free and included at the default tier.

Design system intelligence — 45 operations across three facades.

OperationTypeWhat it does
check_contrastAlgorithmicWCAG 2.1 contrast ratio check between two colors
get_color_pairsAlgorithmicSuggest accessible foreground colors for a background
validate_tokenAlgorithmicValidate a design token name against the token schema
validate_component_codeAlgorithmicCheck component code for design system compliance
check_button_semanticsAlgorithmicVerify button variant matches its action intent
check_action_overflowAlgorithmicRecommend buttons vs. dropdown menu based on action count
generate_imageLLM-dependentGenerate images via Google Gemini
get_typography_guidanceData-servingTypography scales, rules, and recommendations
get_spacing_guidanceData-servingSpacing system and scale guidance
get_icon_guidanceData-servingIcon usage patterns
get_animation_patternsData-servingAnimation and transition patterns
get_dark_mode_colorsData-servingDark mode color mappings
get_responsive_patternsData-servingResponsive design patterns
get_ux_lawData-servingUX laws and principles
get_guidanceData-servingGeneral design guidance
recommend_styleData-servingStyle recommendations
recommend_paletteData-servingColor palette recommendations
recommend_typographyData-servingTypography pairing suggestions
recommend_design_systemData-servingDesign system recommendations
get_stack_guidelinesData-servingStack-specific guidelines (React, Vue, Svelte, etc.)

Clean code rules, architecture patterns, variant philosophy, API constraints, stabilization patterns, delivery workflow, UX writing rules, performance constraints, component dev rules, defensive design rules, dialog patterns, component usage patterns, UI patterns, operational expertise, and error handling patterns.

Container pattern recommendations, radius guidance, depth layering, component workflows, Storybook patterns, testing patterns, font requirements, shadcn components, plus orchestration packs for fix workflows and theming.

Component registry lifecycle — 7 operations.

OperationTypeWhat it does
searchData-servingSearch vault for components by query
getData-servingGet a component by ID
listData-servingList components with optional filters
createAlgorithmicRegister a new component with metadata
detect_driftAlgorithmicCompare component code against stored vault metadata
analyze_dependenciesAlgorithmicParse imports to build a dependency graph
sync_statusAlgorithmicCheck sync between vault registry and filesystem

Code review intelligence — 8 operations split between GitHub PR review and Playwright validation.

OperationWhat it does
review_pr_designReview a PR diff for design-relevant issues (tokens, hex, inline styles)
check_architectureCheck imports for architecture boundary violations
search_review_contextSearch knowledge base for review patterns matching a query
generate_review_summaryGenerate a structured summary from an array of issues
OperationWhat it does
validate_page_stylesValidate computed styles against design system scales
accessibility_auditAudit accessibility data — missing labels, bad contrast, roles
classify_visual_changesClassify style changes as cosmetic, structural, or behavioral
validate_component_statesVerify all required interaction states are implemented

Design QA — 5 operations for handoff quality assurance.

OperationWhat it does
detect_token_driftCompare design tokens against a token map with fuzzy matching
detect_hardcoded_colorsFind hex colors that lack token mappings
sync_componentsMatch design components against code components by name
accessibility_precheckWCAG contrast check on an array of color pairs
handoff_auditAudit component metadata completeness with composite scoring

All ops process pre-extracted data — no external API calls required. The handoff_audit produces a composite score weighted 40% token drift, 30% component sync, 30% accessibility when full data is provided.

Domain packs are npm packages. Install them as dependencies of your agent project:

Terminal window
npm install @soleri/domain-design @soleri/domain-component

Then register them in your agent’s entry point (see Extending Your Agent for details). The engine discovers domain pack ops automatically when the pack is imported and activated.

When to use domain packs vs. knowledge packs

Section titled “When to use domain packs vs. knowledge packs”
NeedUse
Static patterns, rules, principlesKnowledge pack
Algorithmic validation and checksDomain pack
Computed results (contrast ratios)Domain pack
Best practices and anti-patternsKnowledge pack
Both knowledge and operationsDomain pack with bundled knowledge

Domain packs can include bundled knowledge (the knowledge field in their manifest), so a single domain pack can provide both algorithmic ops and vault entries.


Next: Creating Packs — build your own packs to share expertise. See also Skills Catalog for workflow skills, Capabilities for the full feature list, Extending Your Agent for custom ops and facades, and the CLI Reference for soleri pack and domain management commands.