audit_component
Validate a Symbols/DOMQL component string against the deterministic ruleset. Get violations and warnings instantly to verify code before saving, even without CLI access.
Instructions
Inline VALIDATOR for a single Symbols/DOMQL component string.
Runs the deterministic ruleset (flat element API, signal reactivity, design system tokens, declarative fetch/polyglot/helmet/router, no DOM manipulation, Rule 62 icon ban) against an in-memory string of code. Returns a tight report with violations + warnings.
Use this:
During generation, to verify a freshly-generated component before saving
In any client without shell access (claude.ai web, hosted MCP) where the CLI is unreachable
On a single file's contents, not a whole project
Adjacent tools — call these for different scopes:
audit_project()— returns the MULTI-PHASE PROJECT AUDIT PLAYBOOK (instructions for the agent to follow). Use when the user asks for a full project audit.bin/symbols-audit <symbols-dir>(CLI, ships with this package) — filesystem regex sweep across an entire project. Use during the playbook's static-audit phase.
By default returns ONLY the findings (≈1–2K chars). Pass include_playbook=True
to also dump the AUDIT.md playbook in the same response when you don't already have it.
Args:
component_code: The JavaScript/DOMQL source string to validate.
include_playbook: Append the full audit playbook to the response. Default False
to keep responses small. Default agents should NOT set this —
call audit_project() separately if the playbook is needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| component_code | Yes | ||
| include_playbook | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |