Skip to content

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.

WhatValidatorComposition linter
RunsOn each row, before it appliesAfter the block lands
ReadsThe parsed rowThe elements on the canvas, with their solved sizes
ScopeThe rows in this blockOnly the elements this block created or modified, so a large canvas stays quiet
CodesB codes, such as B101C codes, such as C301
OutcomeA bad property is dropped with a note. A row whose element can’t exist stops the blockA 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.

CodeWhat it flags
C101Siblings sharing one name under a parent, usually an agent re-creating work
C201Text with no fill, which defaults to white and can vanish on a light background
C301An element with a zero side after layout, such as a fill child in a hug ancestor
C401Text wider than the space its parent has
C403, C404Auto layout children overflowing their parent
C405Content cut off by a clipping frame
C406A thin line or gridline crossing through text
C407, C408A sibling painted under, or fully covering, another sibling
C601A top-level element added far from the rest of the work
C701A 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.

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.

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.

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.

SeverityWhat happened to the row
ErrorNot applied, and the block stops at that row
WarningApplied, but it looks wrong or lost a property. The agent should fix it
InfoApplied, 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 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?