#6260·webstudio

Add Craft conformance audit to CLI and MCP

Author: kofCreated Aug 28, 2026Updated Sep 28, 2026
Labelstype:featcomplexity:highprio:2area:aiarea:mcp

Problem

Craft defines a public conformance contract for theme variables, semantic variables, composite Tokens, naming, extensions, and accessibility. Today, neither users nor agents can inspect a Webstudio project and determine which Craft contract it follows, whether it conforms, or what must change.

Manual review is inconsistent and does not provide stable evidence that Marketplace resources and projects remain compatible as Craft evolves.

Desired outcome

Provide one non-mutating Craft conformance audit through the Webstudio CLI and MCP. The audit should identify the Craft profile or specification version being checked, return structured evidence, and explain the smallest corrective action for every failure.

Product scope

  • Define a versioned Craft conformance profile that the audit can select explicitly and report in its result.
  • Add a CLI command and corresponding MCP operation for auditing the current project without changing it.
  • Check the declared theme inputs, semantic-variable derivation, color naming grammar, composite Token dependencies, documented extensions, and literal exceptions.
  • Report missing required variables and extensions for reusable resources.
  • Validate accessibility requirements that can be determined from project data, and clearly identify checks that require rendered or interaction evidence.
  • Return stable machine-readable findings with severity, rule identifier, affected entity or variable, evidence, and remediation.
  • Generate the user-facing command and MCP documentation from the owning rule catalog so the implementation and guidance cannot drift.

Constraints

  • The audit is read-only and must not adopt Craft or rewrite project data.
  • Non-Craft projects must be reported as such rather than treated as corrupt.
  • Project-specific extensions are valid when they satisfy Craft's documented extension contract.
  • Do not claim accessibility conformance for behavior that was not rendered or exercised.
  • Keep Craft rules in one owning catalog shared by CLI, MCP, documentation, and tests.
  • Results must remain useful to humans without requiring an AI client.

Acceptance criteria

  • A user or agent can run one CLI or MCP operation and receive the selected Craft profile/version and an overall conforming or nonconforming result.
  • Every finding has a stable rule identifier, severity, exact project target, evidence, and a concrete remediation.
  • The audit detects invalid semantic color names, standalone semantic color literals, undocumented dependencies and extensions, and direct theme or palette consumption by composite Tokens.
  • The audit distinguishes failed static checks from accessibility checks that require rendered evidence.
  • Clean, extended, non-Craft, and intentionally nonconforming fixtures cover CLI and MCP output.
  • The public Craft documentation explains how to run the audit and interpret its result.

Ref #5989 Ref #3818