Skip to content

feat: per-component className allowances for DS046 - #541

Merged
egdev6 merged 3 commits into
mainfrom
feat/classname-allows
Nov 22, 2026
Merged

egdev6 merged 3 commits into
mainfrom
feat/classname-allows

Conversation

@egdev6

@egdev6 egdev6 commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Summary

This fixes the two design-system-side defects that Nexo's first run of the #530 flow exposed (egdev6/nexo#92).

  1. DS046 contradicted per-component className contracts. For example, SelectTile documents that its root className may set width and column count (select-tile/types.ts:122), but DS046 flagged both properties (see Consumer request (nexo): two-option SelectTile in a single column on narrow panels #536). Those contracts existed only as prose.
  2. The AGENTS block blocked workers that have no MCP server.

Changes:

  • 9a61656 (ui, system and prop-naming registry)
    • A JSDoc tag @classNameAllows <css-property> … on a component's props type declares the CSS properties, beyond the base placement list, that its className may set.
    • The artifact generator validates the tag: unknown, empty or duplicate tags fail the build. It publishes the result as components[].classNameAllows in design-system.json. The field is additive, so schemaVersion stays 1.0.0.
    • 51 components and parts are tagged from their existing prose, which stays unchanged. Most tags are width constraints; SelectTile adds grid-template-columns and TopBar adds z-index. 23 ambiguous contracts are left untagged for owner review.
    • The tag edits are JSDoc-only in 32 types.ts files: stripping comments leaves the code unchanged. Following the registry rule ("even unrelated edits in an evidence file require renewed source review and explicit JSON revision updates"), 216 source.revision fields in skills/_shared/prop-naming.json were refreshed. Nothing else changed: conventions, approvals, exceptions and usages are untouched.
    • Two receipt tests now pin their immutable historical source hashes, following the existing precedent at scripts/prop-naming.test.mjs:1597. No receipt file changed.
  • 4497e68 (cli)
    • DS046 reads classNameAllows from the project's vendored @egdev/system artifact. When the field is missing, or the artifact is missing or invalid, the base list applies and output is unchanged.
    • The AGENTS block gains an MCP fallback: the vendored @egdev/mcp over stdio, or design/system.md.
    • Its DS046 line now matches per-component contracts. Existing marked blocks are never rewritten.
  • 06daced records the verification in the ODD document.

Validation

  • RED → GREEN for each change. Results:
    • pnpm test:cli 241/241
    • artifact tests 42/42
    • pnpm test:props 131/131
    • pnpm test:system 36/36
    • pnpm props:check, pnpm artifact --check, pnpm system:check, pnpm typecheck and pnpm lint all pass
  • Independent verification (risk item 3: consumed artifact format, DS046 results in app CI, the block text written by init, and registry evidence) passed every contract and the risk:
    • 14 tags spot-checked against their prose; none is over-permissive.
    • The registry diff is limited to source.revision, and each value equals the current file hash.
    • The artifact without the new field is identical to the base artifact.
    • Doctor output with artifacts that lack the field is byte-identical to the base: 24/24 fixture runs and 9/9 consumer runs.
  • Consumers, with the new artifact substituted:
    • Nexo 2e74b33: DS046 drops 8 → 6. Only the two false positives (SelectTile grid-template-columns, Button width) disappear; the remaining six are real.
    • Recado: unchanged at 5/8/3.
    • egdev-website: 0.
  • pnpm test:mcp has one failure that also exists on the base: the @egdev/mcp README still says 0.2.0. It is untouched here.

Delivery: apps get this after a release with minor bumps of @egdev/system and @egdev/cli. The new DS046 behavior needs the new artifact vendored.

Linked issue

Refs #530

@egdev6 egdev6 added enhancement New feature or request odd Planificación y seguimiento ODD labels Nov 22, 2026
@egdev6
egdev6 merged commit da0114f into main Nov 22, 2026
7 checks passed
@egdev6
egdev6 deleted the feat/classname-allows branch November 22, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request odd Planificación y seguimiento ODD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant