{"id":"ss-lint","name":"ss-lint","summary":"迅速な自動リント機能 — 一般的な設計システムの違反を数秒で検出","body":"# Design Lint (Quick Check)\n## Registry-first artifact boundary\n\nWhen `.styleseed/project.json` and `.styleseed/artifacts/index.json` exist, resolve the requested artifact ID first, then read only `.styleseed/bundles/<artifact-id>.md` and `.styleseed/manifests/<artifact-id>.json`. Never fall back to the global legacy bundle for a registry project. Legacy projects may use `.styleseed/effective-rules.md` only when no registry exists.\n\n## Canonical executable check\n\nFor a reproducible, artifact-bound scan with machine-readable output, use:\n\n```bash\nnode <installed-ss-score>/scripts/styleseed-check.mjs scan \\\n  --project-root . --artifact <artifact-id> --format json\nnode <installed-ss-score>/scripts/styleseed-check.mjs scan \\\n  --project-root . --all --format sarif\n```\n\nThe checker treats only contract, containment, manifest/hash, malformed-report, and required\ncoverage failures as hard errors. Detector findings (`SS001`–`SS006`) remain warnings and include a\nstable file, line, evidence snippet, severity, and fix. Use `styleseed-check ... verify` to recompute\nthe bound evidence run; do not turn a string or stale report into a pass.\n\nRead `.styleseed/effective-rules.md` and `.styleseed/manifest.json`; invoke `/ss-resolve` or\n`$ss-resolve` first when they are missing or stale. Lint detects deterministic drift; it must\nnot flag an exact grammar/recipe/profile/adapter contract as a violation or let an arbitrary lock\nvalue create an exception.\n\n## When NOT to use\n\n- For deeper review of design judgment (composition, hierarchy, rhythm) → use `/ss-review`\n- For accessibility specifically → use `/ss-a11y`\n- For Nielsen UX heuristics → use `/ss-audit`\n- For applying refactors — this only flags violations; use `/ss-review` to fix\n\nTarget: **$ARGUMENTS**\n\n## What This Does\n\nFast, grep-based scan for common design violations. Runs in seconds (unlike /ss-review which is a deep manual audit). Run this after every file change.\n\n## Checks\n\n### 1. Hardcoded Colors\nSearch for hex colors in className strings that should be semantic tokens:\n```bash\ngrep -n '#[0-9a-fA-F]\\{3,8\\}' [file] | grep -v 'theme.css\\|tokens\\|\\.json'\n```\n**Violation:** `text-[#3C3C3C]`, `bg-[#3182F6]`\n**Fix:** `text-text-primary`, `bg-brand`\n\n### 2. Raw Pixel Values in Tailwind\n```bash\ngrep -n 'p-\\[.*px\\]\\|m-\\[.*px\\]\\|gap-\\[.*px\\]' [file]\n```\n**Violation:** `p-[24px]`, `gap-[12px]`\n**Fix:** `p-6`, `gap-3`\n\n### 3. Old Width/Height Syntax\n```bash\ngrep -n 'w-[0-9] h-[0-9]\\|w-\\[.*\\] h-\\[' [file]\n```\n**Violation:** `w-4 h-4`\n**Fix:** `size-4`\n\n### 4. Physical Properties (LTR-only)\n```bash\ngrep -n ' ml-\\| mr-\\| pl-\\| pr-' [file]\n```\n**Violation:** `ml-2`, `mr-4`\n**Fix:** `ms-2`, `me-4`\n\n### 5. Uncontracted Hard Black\n```bash\ngrep -n 'text-black\\|bg-black\\|#000000\\|#000\"' [file]\n```\n**Violation:** Pure black without an exact structural role in the selected grammar/profile\n**Fix:** Use the semantic ink token, or cite the maintained contract that requires hard black\n\n### 6. Missing data-slot\n```bash\ngrep -n 'function [A-Z]' [file] # find components\ngrep -n 'data-slot' [file]       # check if present\n```\n**Violation:** Component without `data-slot`\n**Fix:** Add `data-slot=\"component-name\"`\n\n### 7. Font Size CSS Variables (CRITICAL — Tailwind v4 conflict)\n```bash\ngrep -n 'text-\\[var(--' [file]\ngrep -n '\\-\\-text-.*px\\|--fs-.*px' [file]\n```\n**Violation:** `text-[var(--text-sm)]` or `--text-sm: 13px` in theme.css\n**Fix:** Use explicit `text-[13px]`. CSS variable font sizes conflict with Tailwind v4's `--text-*` namespace — Tailwind reads them as color, not font-size.\n\n### 8. className Without cn()\n```bash\ngrep -n 'className={`' [file]\n```\n**Violation:** Template literal className\n**Fix:** Use `cn()` for all className composition\n\n### 9. Universal Soft-card Drift\nSearch for repeated `rounded-2xl`, `shadow-[var(--shadow-card)]`, and `mx-6` in pattern files.\nFlag the combination when the selected recipe is not `calm-consumer`.\n**Fix:** use `ss-pattern-surface`, `ss-page-gutter`, and the other recipe-aware helper classes.\n\n## Output Format\n\n```\n🔴 FAIL  [file:line] Hardcoded hex: text-[#3C3C3C] → use text-text-primary\n🔴 FAIL  [file:line] Raw px: p-[24px] → use p-6\n🟡 WARN  [file:line] Physical prop: ml-2 → use ms-2\n🟡 WARN  [file:line] Missing data-slot on MyComponent\n🟢 PASS  No violations found\n\nTotal: X errors, Y warnings\n```\n\nIf errors > 0, list specific fixes for each violation.","author":"@bitjaru","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/bitjaru/styleseed/tree/main/engine/.claude/skills/ss-lint","license":"MIT","category":"document","lang":"en","tokens":1266,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[],"requires":{"mcp":[],"tools":["Read","Grep","Glob","Bash"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}