Files
pbakaus_impeccable/package.json
T
Paul BakausandClaude Fable 5 c3aba1e343 hooks: two-tier design hook — immediate per-edit rules + full-set Stop deep pass
Eval evidence showed the per-edit PostToolUse stream fires overwhelmingly
on copy-level rules (em-dash-overuse ~97x/session) and measurably makes
models more conservative, while a full-detector pass at completion is what
actually fixes contrast/padding/glow. Split the hook accordingly:

- Per-edit (PostToolUse) now surfaces only IMMEDIATE_TIER_RULES: broken
  output (broken-image, text-overflow, clipped-overflow-container,
  body-text-viewport-edge), objective contrast/legibility failures
  (low-contrast, gray-on-color, tiny-text), single-property mechanical
  slop (gradient-text, dark-glow), and design-system drift (the four
  design-system-* rules, which compound if left uncorrected). Everything
  else defers. Override with hook.perEditRules: "all" in
  .impeccable/config.json. Tiering is off for Cursor/Copilot harnesses,
  which have no Stop pass wired, so nothing gets silently dropped there.

- Stop deep pass (runStopHook): runs the FULL rule set over every UI file
  touched this session (tracked via the existing hook.cache.json session
  state; deferred-only edits now mark the file touched), dedupes against
  everything already surfaced per-edit, honors ignore-rule/file/value and
  inline disables, reuses the [impeccable@1] envelope, and no-ops fast
  when no UI files were touched. Emits hookSpecificOutput
  { hookEventName: "Stop", additionalContext } per the Claude Code SDK
  Stop contract (conversation continues so the model can act on it).
  Second Stop fire is silent - deep-pass findings are remembered.

- Wiring: Stop entries (timeout 30) in plugin/hooks/hooks.json, the
  .claude settings + .codex hooks manifests (transformers + hook-admin
  repair path). Claude Code and Codex both dispatch a native Stop event;
  Cursor's stop hook is inconsistently dispatched (pre-write gate stays)
  and Copilot's agentStop/sessionEnd don't inject model context, so
  neither gets a Stop entry - documented in reference/hooks.md.

- Tests: tiering split/override/harness gating, Stop dedupe + silent
  no-touched-files + ignore machinery + kill switches; existing per-edit
  tests moved to immediate-tier rule ids. 181 tests green; smoke-tested
  the built dist skill end to end (glow surfaced per-edit, em-dash only
  at Stop, second Stop silent).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-11 16:46:00 -07:00

112 lines
3.9 KiB
JSON

{
"name": "impeccable",
"version": "3.2.1",
"author": "Paul Bakaus",
"description": "Design skills, commands, and anti-pattern detection for AI coding agents",
"keywords": [
"design",
"frontend",
"ux",
"skills",
"ai",
"anti-patterns",
"lint",
"accessibility",
"css",
"html",
"detection",
"ci-cd"
],
"license": "Apache-2.0",
"homepage": "https://impeccable.style",
"repository": {
"type": "git",
"url": "git+https://github.com/pbakaus/impeccable.git"
},
"engines": {
"node": ">=22.12.0"
},
"type": "module",
"bin": {
"impeccable": "cli/bin/cli.js"
},
"main": "./cli/engine/detect-antipatterns.mjs",
"exports": {
".": "./cli/engine/detect-antipatterns.mjs",
"./browser": "./cli/engine/detect-antipatterns-browser.js"
},
"files": [
"cli/",
"LICENSE"
],
"scripts": {
"build:skills": "bun run scripts/build.js --skip-root-sync",
"build:skills:release": "bun run scripts/build.js",
"build:site": "npx astro build",
"build": "bun run build:skills && bun run build:site && cp -R dist build/_data/dist",
"build:release": "bun run build:skills:release && bun run build:site && cp -R dist build/_data/dist",
"build:browser": "node scripts/build-browser-detector.js",
"build:extension": "node scripts/build-extension.js",
"clean": "rm -rf dist build",
"rebuild": "bun run clean && bun run build",
"rebuild:release": "bun run clean && bun run build:release",
"dev": "bun run scripts/gen-dev-api.mjs && npx astro dev",
"preview": "bun run build && npx astro preview",
"deploy": "bun run build && wrangler pages deploy build/",
"test": "node scripts/run-tests.mjs default",
"test:core": "node scripts/run-tests.mjs core",
"test:detector": "node scripts/run-tests.mjs detector",
"test:framework": "node scripts/run-tests.mjs framework",
"test:live": "node scripts/run-tests.mjs live",
"test:cli-e2e": "node scripts/run-tests.mjs cli-e2e",
"test:cli-remote-e2e": "node scripts/run-tests.mjs cli-remote-e2e",
"test:live-e2e": "node scripts/run-tests.mjs live-e2e",
"test:live-e2e-accept-cleanup": "node scripts/run-tests.mjs live-e2e-accept-cleanup",
"test:live-e2e-agent": "node scripts/run-tests.mjs live-e2e-agent",
"test:skill-behavior": "node scripts/run-tests.mjs skill-behavior",
"test:live-svelte-adapter-deepseek": "node scripts/run-tests.mjs live-svelte-adapter-deepseek",
"smoke:hooks": "node scripts/smoke-provider-hooks.mjs",
"bench:detector": "node scripts/benchmark-detector.mjs",
"bench:detector:browser": "node scripts/benchmark-detector.mjs --browser",
"bench:live": "node scripts/benchmark-live.mjs",
"audit": "bun audit --audit-level=moderate",
"prepack": "cp README.md README.repo.md && cp README.npm.md README.md",
"postpack": "cp README.repo.md README.md && rm README.repo.md",
"release:skill": "node scripts/release.mjs skill",
"release:cli": "node scripts/release.mjs cli",
"release:ext": "node scripts/release.mjs extension",
"screenshot": "bun run scripts/screenshot-antipatterns.js",
"og-image": "bun run scripts/generate-og-image.js"
},
"dependencies": {
"css-select": "^7.0.0",
"css-tree": "^3.2.1",
"domutils": "^4.0.2",
"fflate": "^0.8.3",
"htmlparser2": "^12.0.0",
"marked": "^18.0.5"
},
"optionalDependencies": {
"puppeteer": "^25.1.0"
},
"devDependencies": {
"@ai-sdk/anthropic": "^4.0.7",
"@ai-sdk/google": "^4.0.8",
"@ai-sdk/openai": "^4.0.7",
"@anthropic-ai/claude-agent-sdk": "^0.3.165",
"@anthropic-ai/sdk": "^0.110.0",
"@google/genai": "^2.8.0",
"@paper-design/shaders": "^0.0.77",
"ai": "^7.0.14",
"archiver": "^8.0.0",
"astro": "^7.0.0",
"fontkit": "^2.0.4",
"modern-screenshot": "^4.7.0",
"motion": "^12.38.0",
"opentype.js": "^2.0.0",
"playwright": "^1.59.1",
"wrangler": "^4.85.0",
"zod": "^4.3.6"
}
}