---
title: Quality linter
description: Brilliant checks every agent edit twice. A validator reads each row first, and a composition linter inspects the real geometry after layout.
section: developers
order: 2
featured: false
related: developers/blueprint, ai/what-the-ai-can-do, agents/overview
---

# Quality linter

Brilliant checks every agent edit to a canvas twice: a validator reads each row before it touches the canvas, and a composition linter inspects the real geometry after layout. Both run by themselves, and the agent gets the problem, and in most cases the fix, in the same response. You never run them by hand.

## What do the two checks do?

The validator catches what is wrong with a row, and the linter catches what only shows once the layout solver has run.

| What | Validator | Composition linter |
|---|---|---|
| Runs | On each row, before it applies | After the block lands |
| Reads | The parsed row | The elements on the canvas, with their solved sizes |
| Scope | The rows in this block | Only the elements this block created or modified, so a large canvas stays quiet |
| Codes | `B` codes, such as `B101` | `C` codes, such as `C301` |
| Outcome | A bad property is dropped with a note. A row whose element can't exist stops the block | A note for the agent. The elements stay as they landed |

## What does the composition linter catch?

It catches layouts that read fine row by row and look wrong on screen.

| Code | What it flags |
|---|---|
| `C101` | Siblings sharing one name under a parent, usually an agent re-creating work |
| `C201` | Text with no fill, which defaults to white and can vanish on a light background |
| `C301` | An element with a zero side after layout, such as a fill child in a hug ancestor |
| `C401` | Text wider than the space its parent has |
| `C403`, `C404` | Auto layout children overflowing their parent |
| `C405` | Content cut off by a clipping frame |
| `C406` | A thin line or gridline crossing through text |
| `C407`, `C408` | A sibling painted under, or fully covering, another sibling |
| `C601` | A top-level element added far from the rest of the work |
| `C701` | A `ds(brand)` whose brand file isn't found from that canvas, so it renders the default palette |

Smaller checks cover abs misuse (`C402`), constrain on a fill axis (`C409`), chart strokes in clip frames (`C501` to `C504`), and mask shapes (`C410`).

## What does the agent read?

The `edit` tool answers with JSON, and `compositionNotes` and `autoCorrections` hold warnings and info notes, one entry per problem, and `diagnostics` holds errors: the sentence, then the fix when there is one. Here is a composition note for a frame that collapsed.

```text title="C301, in compositionNotes"
"Image Slot" is 0×120 - may be collapsed. a fill child inside a hug ancestor takes its content size: give it a fixed size, or an ancestor a fixed or fill size on that axis.
```

A validator note adds the line number and echoes the row. This one is `B101`, which is a warning: the frame lands, without the bad alignment.

```text title="B101, the row applied without y(sb)"
ℹ Line 1: spaceBetween is only valid on the main axis (x for al(h)); the value was dropped. Move sb to x(): x(sb) y(c).
  | al(h,y(sb),g(8)) s(hug,hug) "Row" #row
```

An error is the one case that stops the block. This is `B601`.

```text title="B601, the row did not apply"
Line 1 NOT applied: line() has no stroke, open path renders nothing without st[(...)]. Add a stroke: st[(#hex,w(N))].
  | line(len(120))
```

In the app's chat, the agent reads the same composition sentences under Composition notes. A response lists up to 50 warnings, then one line counting the rest, and identical ones are merged so the first keeps its line number.

### What is in a diagnostic?

Each one has a severity, a category (syntax, property, layout, reference or composition), a code and a message, and most carry a suggestion. The sentence and the fix are what those lists show. The code shows in the text render summary, as [`C301`] before the sentence.

| Severity | What happened to the row |
|---|---|
| Error | Not applied, and the block stops at that row |
| Warning | Applied, but it looks wrong or lost a property. The agent should fix it |
| Info | Applied, possibly auto-corrected. The agent should learn from it |

## How does the agent see what landed?

A `preview(#card)` row at the end of a `bl` fence adds a rendered image of that element to the response. A client that can't read inline images passes `vision: false` to the `init` tool and gets a text render summary instead: each element's bounds, the same layout checks, and its fill or text. [The Blueprint DSL](/docs/developers/blueprint) page covers the row syntax.

## Do I need to do anything with these?

No. The notes are written for the agent, which can act on them in its next call. Judging hierarchy, copy and brand is yours: the linter measures geometry, and contrast beyond the no-fill case belongs in your own review.

## Where next?

- Learn the language these checks read: [The Blueprint DSL](/docs/developers/blueprint).
- Point your own agent at the canvas: [Use with AI agents](/docs/agents/overview).
- See what the built-in chat can build: [What the AI can do](/docs/ai/what-the-ai-can-do).
- Fix a `C701` by adding the brand file: [Modes and brands](/docs/design-system/modes-and-brands).
- Read how Blueprint came to be: [Blueprint blog post](/blog/blueprint).
