# Contributing to screengraft ## The one rule **Exact perspective match means geometry, not generation.** Anything that makes the composite less deterministic, or that guesses where the screen is without letting a human confirm, is out of scope regardless of how good it looks in one example. ## Running it ```bash python3 scripts/preflight.py --install # venv at ~/.screengraft/venv python3 scripts/ui.py --out-dir ./mockups ``` ## Tests ```bash python test/make_fixtures.py python test/test_warp.py # the compositing engine python test/test_detect.py # detectors, and that they fail honestly python test/test_mcp.py # the plugin's job server python test/test_grade.py # the realism pass python test/test_video.py # the video path (skips if ffmpeg is absent) python test/test_sidecar.py # every parameter that changes output is recorded python scripts/contrast_audit.py # UI contrast, parsed from ui/index.html ``` All of these run in CI on every push. ## Releasing Bump `.claude-plugin/plugin.json` and `package.json` together, and **update `skills/inject-screenshot/SKILL.md` in the same commit**. SKILL.md is not documentation that trails the code. Its frontmatter `description` is what an agent matches on to decide this tool applies at all, so a capability missing from that line is a capability users cannot reach by asking for it in their own words — the tool gained video and, for three versions, a request phrased around a screen recording would not have found it. The body is also what the user is told the tool can do, and it had been promising a Preview popup that no longer existed. `scripts/check_package.py` enforces it: the version SKILL.md claims in its "What ships (vX.Y)" line must match the version being packaged, so a bump cannot land without opening the file. Run it before every release; CI runs it on every push. ## UI changes need the UI audit too `test/ui-audit.js` is run in the browser against the live page — paste it into the console with the UI up. It checks what the Python suites structurally cannot: accessible names, switch/section agreement, keyboard reachability, tooltip containment, horizontal overflow, and ids the script reaches for that don't exist. Run it with the collapsible sections both on and off, and at more than one window width; a collapsed section is a different DOM. It found two real defects the day it was written — a select and a slider with no accessible name, and a native `