app-verify
Skill0 starsChanged 2 months agoMITView on GitHub
A four-rung ladder for proving a UI claim - types, unit arithmetic, browser geometry, and pixel ink - with the rule that if you cannot print the number you are asserting, you are eyeballing. Use before claiming any layout, placement or icon change works, and when deciding what kind of test a change needs.
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- app-adoptSkill
- app-contributeSkill
- app-startSkill
- app-upgradeSkill
- map-cameraSkill
- map-controlsSkill
- map-popupsSkill
- repo-maintainSkill
- ui-bootSkill
- ui-furnitureSkill
- ui-iconsSkill
- ui-stowSkill
- ui-themeSkill
- ui-windowSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
When this fails it says which edge is on the wrong side of which.
- Distinctive: line 81
If a rung fails, say which and quote the number.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Verify in the browser
The rule underneath everything here:
If you cannot print the number you are asserting, you are eyeballing.
The ladder
| rung | command | proves | costs |
| 1 TYPE | npm run typecheck | contracts hold, nothing calls a function that moved | seconds |
| 2 UNIT | npm run test:unit | decisions that are arithmetic: placement, bounds | seconds |
| 3 GEOMETRY | npm test | the popup is not on the panel, the camera cleared the table | ~1 min |
| 4 INK | npm run icons | the glyph is centred within half a pixel | ~20s |
npm run verify runs all four. Each exits non-zero on failure, so they chain.
Which rung does this change need
- Changed a type or a signature: rung 1 catches it, and it is free.
- Changed a decision: placement, bounds, a posture transition. Rung 2. If it needs a browser to test, that is usually a sign it reads the document when it could have been handed the numbers. Fix the function, not the test.
- Changed where something sits: rung 3.
- Changed glyph art or icon sizing: rung 4. Always. Icons are never right by accident.
Write rung 3 as numbers, not pictures
const popup = await box(page, '.sgs-popup');
const panel = await box(page, '#sgs-panel');
expect(overlaps(popup, panel)).toBe(false);When this fails it says which edge is on the wrong side of which. That is a diagnosis. Compare
with a golden-image failure, which says 12,431 pixels differ.
The rung this repo does not ship
Golden screenshots (toHaveScreenshot, toMatchSnapshot). Deliberately absent, and the
reasons are worth knowing rather than inheriting:
- It catches everything and explains nothing. A pixel count is not a diagnosis.
- It breaks on things that are not your change: font rendering, GPU, OS, a new CI image, a driver update. Every one of those is a red build with no bug behind it.
- Because those failures are usually noise, the accepted response becomes "update the snapshots", and at that point it asserts nothing at all.
It does earn its keep in one situation: whole-page regression on a locked CI image where you genuinely cannot enumerate what might change. That is not this repo, and it is probably not your app either. If you add it, add it alongside the measured rungs, never instead of them.
Fixtures are code too
Two bugs in this repo's own tests, both worth generalising:
- A helper clicked the centre of the viewport to hit a polygon. The centre falls in a gap between demo features, so every popup test failed for a reason unrelated to popups. It now asks the map what it has rendered.
- The same helper then found a point that was on a polygon but underneath the panel, so the
click went to the layer list. It now checks
document.elementFromPointas well:queryRenderedFeaturesanswers about the MAP and knows nothing about the DOM over it. - Selectors used
[title^="Show"]to find a button.tooltip.jsLIFTS an element'stitleintodata-tipthe first time it is hovered, so the attribute is gone by the second interaction — a test that hovers once (to trigger a tooltip check) and then tries to select bytitleagain passes on the first pass and hangs on the second.aria-labelis never rewritten, so every spec here selects by that instead.
A test whose setup is a guess reports on the guess.
Reporting
State what you ran and what it said. "13 passed" and a measured table are results. "Looks right" and "should be fine" are not, and neither is a screenshot you looked at yourself.
If a rung fails, say which and quote the number. If you skipped a rung, say which and why.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

