mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-12 06:06:37 +03:00
Adds a full annotation pipeline to /impeccable live. On Go, the browser
captures the selected element as a PNG (with annotations composed in),
uploads it to the live helper, and sends the generate event with the
screenshot path so the agent reads user intent visually instead of from
HTML alone.
Annotation tools (while an element is picked):
- Click inside the outline to drop a magenta comment pin with a text input
- Drag to paint a magenta SVG stroke (5 px click-vs-drag threshold)
- Click a pin to edit; double-click to delete; drag a pin to reposition
- Click a stroke to delete it (wider invisible hit path)
- Clear chip top-right wipes everything; hidden when no annotations
Capture pipeline:
- modern-screenshot vendored as an IIFE (scripts/modern-screenshot.umd.js)
and lazy-loaded from the live helper
- Font fix: cross-origin @font-face rules are fetched and fonts are inlined
as base64 data URIs before being handed to modern-screenshot via
font.cssText, since SVGs rasterized via canvas can't fetch external
resources (fix for "Impeccable" rendering bold-serif and items wrapping
wrong in the capture)
- Annotations are temporarily attached to the live element (not only the
clone) so computed styles resolve during the embed pass
- Session screenshots live in .impeccable-live/annotations/session-*/ in
the project root (gitignored) so the agent's Read tool doesn't trip a
per-path permission prompt
Loading shader (activates during GENERATING):
- WebGL overlay rendering the captured PNG as a halftone — cells with
luma-driven dot radius, rendered on paper-cream underneath a magenta
roller that sweeps top-to-bottom with a 3.4s cycle and clean overshoot
- Fixed asymmetric bandAt() using one-sided smoothsteps (previous reversed
smoothstep was undefined on d>0, giving "trail=1 everywhere below")
- Graceful <img> fallback when WebGL is unavailable; prefers-reduced-motion
freezes the band at t=0
Server:
- POST /annotation endpoint (raw image/png body, token + eventId query),
session-scoped tmpdir cleaned up on shutdown
- GET /modern-screenshot.js serves the vendored UMD with aggressive caching
- Optional screenshotPath / comments / strokes fields on generate events
- Fixed pre-existing /source crash on ENOENT (writeHead called twice)
Agent side:
- reference/live.md step 0 tells the agent to Read the screenshot first,
with four rules for interpreting annotations: comments are position-
anchored and scoped to the sub-element under their {x,y}; strokes are
gestures (loop=focus, arrow=direction, cross=delete); comments and
strokes are independent unless adjacent; don't silently guess on
ambiguous strokes
Also:
- Generating bar no longer claims "Generating 1 of 3..." (variants arrive
atomically) — now says "Generating N variants..."
- tests/live-server.test.mjs fixed to read the PID file from project root,
matching the server; adds coverage for the new endpoints and validator
fields
- .impeccable-live/ added to .gitignore
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
70 lines
1.7 KiB
Plaintext
70 lines
1.7 KiB
Plaintext
# Dependencies
|
|
node_modules/
|
|
|
|
# npm lockfile (project uses bun.lock; npm may regenerate this as a side
|
|
# effect of npm subprocesses, but it should not be tracked)
|
|
package-lock.json
|
|
|
|
# Generated files
|
|
dist/
|
|
build/
|
|
|
|
# Build artifacts
|
|
*.log
|
|
|
|
# OS files
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# IDE
|
|
.vscode/
|
|
.idea/
|
|
|
|
# Claude Code local state
|
|
.claude/projects/
|
|
.claude/scheduled_tasks.lock
|
|
.claude/settings.local.json
|
|
|
|
# Environment
|
|
.env
|
|
.env.local
|
|
|
|
# Cloudflare
|
|
.wrangler/
|
|
|
|
# Live mode session file + annotation screenshots (cleaned up on server stop)
|
|
.impeccable-live.json
|
|
.impeccable-live/
|
|
|
|
# Per-project live mode injection config (generated once per project by the
|
|
# skill; wiped on skill update, regenerated on next live run)
|
|
**/skills/impeccable/scripts/config.json
|
|
|
|
# Extension build artifacts
|
|
extension/detector/
|
|
|
|
# Legacy design context (pre-v3.1, auto-migrated to PRODUCT.md by load-context.mjs)
|
|
.impeccable.md
|
|
# Note: PRODUCT.md and DESIGN.md are INTENTIONALLY tracked in this repo —
|
|
# they serve as reference implementations for users installing impeccable.
|
|
# Users of impeccable in their own projects can choose whether to track them.
|
|
|
|
# Evals (private, commercial)
|
|
evals/
|
|
tests/evals-v2/
|
|
|
|
# Generated sub-pages (built from source/skills + content/site at build time)
|
|
public/docs/
|
|
public/anti-patterns/
|
|
public/tutorials/
|
|
public/visual-mode/
|
|
|
|
# Note: harness skill directories (.claude/skills/, .cursor/skills/, etc.)
|
|
# are intentionally tracked. npx skills reads them from this repo at install
|
|
# time, and they enable clean submodule use. Run `bun run build` to refresh
|
|
# them after editing source/skills/.
|
|
#
|
|
# Codex CLI consumes `.agents/skills/`; `.codex/` is not used. Ignore it so
|
|
# local artifacts or old trees are never committed.
|
|
.codex/
|