Check Comprehension
check-comprehensionChecks interface copy for clarity with three tests: whether a person outside the team understands it, whether the screen can be explained in 15 seconds, and whether a screenshot alone says what the screen does. Pass the headline, body and action labels, or the markup. Returns each finding with a severity and a suggested fix. knownTerms lists words the audience already knows. surface: "slide" adds a density test for slides. It reads text only, not screenshots or visual hierarchy, so a pass is not visual approval. Better Design runs the checks itself and calls no other API.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Supporting copy, one string per visible line or paragraph. | |
| code | No | JSX, TSX or HTML for the screen. Copy is extracted from it when headline/body/actions are omitted. | |
| screen | Yes | What this screen is, e.g. 'lesson end card', 'billing page'. | |
| actions | No | Visible button and link labels, e.g. ['Claim badge', 'Not now']. Search fields, filters and selects are not actions. | |
| surface | No | "slide" adds the slide density test and withholds a pass until a screenshot review. Defaults to "slide" when the screen name says slide, deck or presentation. | |
| headline | No | The screen's title, if you are passing copy rather than markup. | |
| knownTerms | No | Words this audience already knows, so they are not flagged as insider language. |