← Commit history

v0.2.0: Ralph pass as the always-present visual layer (depends on adom/ralph-loop-test)

Drew Owens ·8d7cac7c86 · ·parent 71bdb34
2 files changed +45−4
SKILL.md+37
@@ -299,6 +299,40 @@ anti-alias jitter make it flaky:   every run) — track only `screenshots/baseline/`. - Pillow + numpy is enough: `ratio = (abs(cur-base).max(axis=2) > NOISE).mean()*100`. ++### The Ralph pass — the always-present visual layer (via `adom/ralph-loop-test`)++Assertions can prove a page *works*; they cannot judge whether it *looks right*.+A layout that collapses gracefully, chips that clip awkwardly at 393px, spacing+that reads as broken — all pass every gate above. That judgment layer is the+**Ralph loop**, and it is a standing part of every suite built with this skill,+not an optional extra.++Ralph is NOT vendored here. It lives as its own skill — **`adom/ralph-loop-test`**+(John Lauer) — declared as a dependency of this package so installing+`app-testing` installs it too, and John's updates flow through on `pkg update`+without touching this skill. If it is somehow missing:++```bash+adom-wiki pkg install adom/ralph-loop-test+```++**How the two halves hand off:**++- The functional suite's `--keep` screenshots (every state the coverage walk+  rendered, plus the mobile shots) are Ralph's INPUT — run the suite first, then+  ralph the frames it left behind instead of re-driving the app blind.+- Ralph runs against the same **hermetic harness server** the suite spawns+  (seeded, deterministic) — never against prod. Fix, reload, re-shoot, loop.+- When a Ralph pass lands visual changes, finish by re-running the functional+  suite (the coverage gate catches any control the restyle added or dropped)+  and, if you keep golden baselines, bless them (`visual_test.py --update`) so+  the visual-regression layer inherits the approved look.++**When Ralph is mandatory, not optional:** any new screen, any restyle, any+change to responsive/viewport behavior, and once before first shipping a suite+(the baseline you bless should be a look a human — or Ralph — actually judged).+ ## Running  ```bash@@ -336,3 +370,6 @@ golden baselines live in `screenshots/baseline/` (committed). - [ ] **Visual-regression**: diff screens vs committed golden baselines with a       noise floor + gate %; dimension change / missing screen = fail; `--update`       to re-bless; per-run shots git-ignored, baselines committed.+- [ ] **Ralph pass** (`adom/ralph-loop-test`, installed as a dependency): run the+      screenshot→judge→fix loop over the suite's `--keep` frames before blessing+      any golden baseline, and on every new/restyled screen thereafter.
package.json+8−4
@@ -2,7 +2,7 @@   "slug": "app-testing",   "title": "App Testing",   "type": "skill",-  "version": "0.1.0",+  "version": "0.2.0",   "description": "Build a browser-driven end-to-end test suite that RENDERS your web app in real Chrome, clicks every control, fails on any page error, and gates on interaction coverage so a new untested button turns the suite red.",   "tags": [     "skill",@@ -11,9 +11,12 @@     "puppeteer",     "ui",     "coverage",-    "quality"+    "quality",+    "ralph"   ],-  "dependencies": {},+  "dependencies": {+    "adom/ralph-loop-test": "^1.0.0"+  },   "discovery_triggers": [     "test my web app",     "add UI tests",@@ -21,7 +24,8 @@     "why did the tests pass while the app was broken",     "set up puppeteer tests",     "catch UI regressions",-    "end-to-end test my UI"+    "end-to-end test my UI",+    "ralph test my app"   ],   "discovery_pitch": "Reach for this to build UI tests that actually render the app and can't go green while it's broken \u2014 plus a coverage gate that fails when a control ships untested.",   "sample_prompts": [