Files
pbakaus_impeccable/package.json
T
Paul BakausandClaude Opus 4.7 d26ccac1be feat(test): pluggable LLM agent for live-mode E2E suite
tests/live-e2e/agents/llm-agent.mjs: a Claude-backed VariantAgent that
implements the same one-method interface as the fake agent
(generateVariants(event, context) → { scopedCss, variants[] }). Default
model claude-haiku-4-5; override via IMPECCABLE_E2E_LLM_MODEL.

Prompt caching is on — the system prompt (instructions + the live-mode
spec from reference/live.md) is the cacheable prefix. First call writes
~10K tokens to cache; subsequent fixtures pay only the cache-read rate.
JSON output is validated for shape (scopedCss, variants[N].innerHtml),
with light error messages on parse failure.

tests/live-e2e.test.mjs: read IMPECCABLE_E2E_AGENT (fake|llm). When 'llm',
construct the LLM agent and skip the case cleanly if ANTHROPIC_API_KEY is
unset. Param-manifest assertions are gated to fake mode (LLM may emit
zero-param "fixed point" variants per the live.md spec). The accepted-h1
class assertion now allows hero-title as one of multiple classes so an
LLM agent that adds classes alongside the original still passes.

Test timeouts widen for LLM mode: 25s first-pass on conditional-render
fixtures (vs 5s for fake), 60s on direct waits (vs 30s). Without these,
the LLM's 3-8s generate latency races the orchestration's state-loss
recovery window.

tests/live-e2e/ui.mjs: clickGo retries up to 3× on stability failures.
Required because conditional-render fixtures (modal/tabs) animate the bar
mid-transition when preActions trigger framework HMR; a single click can
land during a re-render and Playwright's stability gate times out.

Pass rate on a typical sweep: 18/19 in LLM mode, 19/19 in fake mode.
The modal fixture's intrinsic state-loss flake (Fast Refresh resetting
useState(open) when source changes) is amplified by LLM latency and may
need a re-run; documented in CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 01:06:06 -07:00

81 lines
2.5 KiB
JSON

{
"name": "impeccable",
"version": "2.1.7",
"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": ">=18"
},
"type": "module",
"bin": {
"impeccable": "bin/cli.js"
},
"main": "./src/detect-antipatterns.mjs",
"exports": {
".": "./src/detect-antipatterns.mjs",
"./browser": "./src/detect-antipatterns-browser.js"
},
"files": [
"bin/",
"src/",
"LICENSE"
],
"scripts": {
"build": "bun run scripts/build.js",
"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",
"dev": "bun run server/index.js",
"preview": "bun run build && wrangler pages dev",
"deploy": "bun run build && wrangler pages deploy build/",
"test": "bun test tests/build.test.js tests/detect-antipatterns.test.js && node --test tests/detect-antipatterns-fixtures.test.mjs && node --test tests/detect-antipatterns-browser.test.mjs && node --test tests/cleanup-deprecated.test.mjs && node --test tests/live-wrap.test.mjs && node --test tests/live-accept.test.mjs && node --test tests/live-inject.test.mjs && node --test tests/live-server.test.mjs && node --test tests/framework-fixtures.test.mjs",
"test:live-e2e": "node --test --test-timeout=600000 tests/live-e2e.test.mjs",
"prepack": "cp README.md README.repo.md && cp README.npm.md README.md",
"postpack": "cp README.repo.md README.md && rm README.repo.md",
"screenshot": "bun run scripts/screenshot-antipatterns.js",
"og-image": "bun run scripts/generate-og-image.js"
},
"dependencies": {
"jsdom": "^29.0.0",
"marked": "^16.1.0"
},
"optionalDependencies": {
"puppeteer": "^24.39.1"
},
"devDependencies": {
"@ai-sdk/anthropic": "^3.0.69",
"@ai-sdk/openai": "^3.0.53",
"@anthropic-ai/claude-agent-sdk": "^0.2.110",
"@anthropic-ai/sdk": "^0.91.1",
"@google/genai": "^1.50.1",
"ai": "^6.0.162",
"archiver": "^7.0.1",
"modern-screenshot": "^4.7.0",
"motion": "^12.38.0",
"playwright": "^1.58.2",
"wrangler": "^4.75.0",
"zod": "^4.3.6"
}
}