Skip to content

[NO-ISSUE] feat(guardrails): stronger code-standard + animation lint, fix broken gate#724

Closed
HerbertJulio wants to merge 2 commits into
devfrom
chore/webkit-guardrails-hardening
Closed

[NO-ISSUE] feat(guardrails): stronger code-standard + animation lint, fix broken gate#724
HerbertJulio wants to merge 2 commits into
devfrom
chore/webkit-guardrails-hardening

Conversation

@HerbertJulio

Copy link
Copy Markdown
Contributor

Summary

Strengthens the internal guardrails (.claude/) so components follow the documented standards automatically, and fixes real bugs found while mapping coverage. Governance-only — separate from the toolkit code PR (#717) per .claude/rules/git-workflow.md.

Fixes (B5)

  • enforce-component-create.mjs called skillReferencedInTranscript (undefined; the function is pipelineReferencedInTranscript) → it threw and failed open, so the "run the spec pipeline first" gate never blocked. Repaired.
  • Dangling ./tokens.md links in no-invention.md / migration.md / dependencies.md → repointed to the real catalog doc (.claude/docs/DESIGN.md § Animations).

New enforcement (B1 + inline animations)

  • validate-spec-compliance: blocks forbidden variant-prop names (variant/appearance/intentkind), is/has boolean prefixes, and camelCase (non-kebab) event names.
  • validate-tokens: blocks JS class presets (const *Classes = {}/[]/computed), component-local <style> blocks, component-local @keyframes, arbitrary animate-[…], and hardcoded duration/ease/delay-[…].

Both fire only on new matches (baseline diff), so existing components are grandfathered. Verified: no false positives on button / input-text / badge; the bad-pattern sample blocks with exit 2; a clean sample passes.

Not in this PR (follow-ups, noted)

…oken tokens.md links

enforce-component-create.mjs called skillReferencedInTranscript (undefined; the function is
pipelineReferencedInTranscript) → it threw and failed open, so the 'run the spec pipeline first'
gate never blocked. Also repoint the dangling ./tokens.md links in no-invention/migration/
dependencies to the real catalog doc (.claude/docs/DESIGN.md § Animations).
… rules

validate-spec-compliance: block forbidden variant-prop names (variant/appearance/intent → kind),
is/has boolean prefixes, and camelCase (non-kebab) event names.
validate-tokens: block JS class presets (const *Classes = {}/[]/computed), component-local <style>
blocks, component-local @Keyframes, arbitrary animate-[…], and hardcoded duration/ease/delay-[…].
Both fire only on NEW matches (baseline diff) so existing components are grandfathered; verified
no false positives on button/input-text/badge and a clean sample.
@HerbertJulio HerbertJulio requested a review from a team as a code owner July 6, 2026 19:41
@HerbertJulio

Copy link
Copy Markdown
Contributor Author

Fechando: consolidando tudo no #717 (sem PR novo). Os commits de governança (gate fix, links, code-standard + inline-animation lint) foram movidos para a branch do #717.

@HerbertJulio HerbertJulio deleted the chore/webkit-guardrails-hardening branch July 6, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant