Check an implementation against a contract
check_implementationMeasure an implementation URL against a saved visual contract to verify UI layout, styles, and states match the reference after changes, returning deviations, pass rate, and missing selectors.
Instructions
Measures an implementation URL against a previously saved visual contract: box position and size, computed styles, hover and focus states, and pseudo-elements. Call this after building or changing a UI to verify it matches the reference without a human looking at it. Needs contractPath from a prior extract_contract call. Returns a formatted deviation table (capped at 40 rows, with a note on how many were left out) plus the numeric totals, the pass rate, any missing selectors, and ok, which is true only when nothing deviated and nothing is missing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The implementation URL to measure against the contract. | |
| wait | No | Extra settle time in milliseconds after navigation. Defaults to 2000. | |
| timeout | No | Navigation timeout in milliseconds. Defaults to 30000. | |
| headless | No | Run the browser headless. Defaults to true. | |
| selector | No | CSS selector to scope the check to. Defaults to the contract root. | |
| viewport | No | Viewport name to check, for example desktop. Defaults to the first viewport in the contract. | |
| maxStates | No | Maximum interactive elements to probe. Defaults to 120. | |
| tolerance | No | Allowed pixel tolerance for box and length values. Defaults to 1. | |
| contractPath | Yes | Path to a contract JSON file previously written by extract_contract. |