@soleri/domain-code-review
v1.0.0
Published
Code review intelligence domain pack for Soleri agents — hex color detection, architecture boundary warnings, and review patterns.
Maintainers
Readme
@soleri/domain-code-review
Code review intelligence domain pack for Soleri agents — design token enforcement, architecture boundary detection, accessibility auditing, and visual change classification.
What it does
This pack provides the code-review domain with 8 algorithmic ops split across two facades and 2 warning detectors.
Warning Detectors
| Detector | Scans | Purpose |
|----------|-------|---------|
| HexColorDetector | .ts, .tsx, .js, .jsx, .css, .scss | Flags hardcoded hex colors that bypass the design token system |
| ArchitectureBoundaryDetector | .ts, .tsx | Flags cross-feature imports and UI-data layer coupling violations |
Detectors are registered with PackRuntime via onActivate.
Ops
GitHub-sourced (pre-extracted diff data):
| Op | Description |
|----|-------------|
| review_pr_design | Review PR diff for design token violations (hex colors, arbitrary values, !important, inline styles, missing alt) |
| check_architecture | Check import statements for architecture boundary violations |
| search_review_context | Search the built-in knowledge base (or vault) for review patterns |
| generate_review_summary | Generate a structured summary with severity counts and verdict |
Playwright-sourced (pre-extracted DOM/style data):
| Op | Description |
|----|-------------|
| validate_page_styles | Validate computed styles against design system scales (font size, spacing, line height, colors) |
| accessibility_audit | Audit elements for missing labels, bad contrast, missing roles, tab order issues |
| classify_visual_changes | Classify before/after style changes as cosmetic, structural, or behavioral |
| validate_component_states | Validate that a component implements all required interaction states (default, hover, focus, disabled, error) |
Install
npm install @soleri/domain-code-reviewRequires @soleri/core >= 9.0.0 as a peer dependency.
Usage
Add to your agent.yaml:
packs:
- name: code-review
package: "@soleri/domain-code-review"Development
npm install
npm run build # tsc
npm test # vitest run
npm run typecheck # tsc --noEmitPublishing
Tag and push to trigger CI:
git tag v<version>
git push origin v<version>License
Apache-2.0
