Concrete
Rules

Rule reference

Every rule `concrete check` grades, by the stage that grades it, in the order the stages run.

Every requirement a template must satisfy, one entry each, generated from the rule registry concrete check runs from. A violation names its rule as concrete/<id> and the file it failed at. The venue says what kind of check found it: lint a rule of the ESLint preset, tree a property of the workspace's files, probe a render under the page probe or a section's declaration evaluated, render a render over the fixture corpus, build a measurement of the bundles concrete build writes, and contract an assertion that publishing re-runs over the built artifact. A lint (warning) rule is reported in your editor and never fails concrete check.

No stage stops the run. A stage whose input an earlier stage could not produce is reported as skipped, and a skipped stage is never a pass.

workspace

The workspace loads: template.ts default-exports a defineTemplate value and every module builds and evaluates.

RuleVenueWhat it requires
concrete/workspace/template-missingtreeThe workspace root has no template.ts.
concrete/workspace/template-invalidtreetemplate.ts does not default-export a defineTemplate value.
concrete/workspace/module-invalidtreeA workspace module fails to build or throws when it is evaluated.
concrete/workspace/key-not-nametreeThe template key is not its display name in lowercase kebab-case (Block Website → block-website).
concrete/workspace/duplicate-section-keytreeTwo different exported sections declare the same key.
concrete/workspace/crlf-texttreeA text file in the workspace has CRLF line endings, so the same commit would build a different version than an LF checkout.
concrete/workspace/unportable-nametreeA source file name, the template key, a section key or a fixture id would not name the same file on Windows and macOS: two differ only by case or Unicode form, or one is a reserved device name (con, nul, com1…), ends in a dot or a space, or carries a character Windows refuses in a file name (:, \, ?, *, a control character…). A key or id must also be NFC.
concrete/workspace/duplicate-browser-filetreeTwo of the build's browser files (a stylesheet, a script, an imported image or font) would have one filename. A host answers them by filename alone, and a published site keeps them in one folder.

typecheck

This package's TypeScript compiles the workspace against its own tsconfig.json.

RuleVenueWhat it requires
concrete/typecheck/errortreeTypeScript reports an error in a workspace module or its tsconfig.json.

lint

This package's ESLint preset lints every module in the workspace.

RuleVenueWhat it requires
concrete/lint/parse-errorlintA workspace module cannot be parsed, so no lint rule could grade it.
concrete/correctness/no-base-to-stringlintNo value stringifies to [object Object] or [object File].
concrete/correctness/restrict-template-expressionslintA template literal interpolates only strings, numbers and booleans.
concrete/correctness/restrict-plus-operandslint+ never mixes a string with a number.
concrete/correctness/no-misused-promiseslintNo async function is passed where a void return is expected.
concrete/correctness/no-floating-promiseslintEvery promise is awaited, returned or caught.
concrete/correctness/await-thenablelintawait is applied only to a thenable.
concrete/correctness/no-for-in-arraylintNo for...in loop walks an array.
concrete/correctness/no-implied-evallintNo string is evaluated as code at runtime.
concrete/server/no-nondeterminismlintServer-rendered code reads no clock and no random source.
concrete/server/no-client-runtimelintServer-rendered code uses no effect, state, event handler, network call or browser global.
concrete/server/no-inline-stylelintServer-rendered JSX carries no inline style prop.
concrete/islands/serializable-propslintEvery prop written to an island is JSON-serializable.
concrete/islands/editor-declarationlintEvery island exports a literal editor = { live }, and a literal serverFrame when it declares one.
concrete/islands/editor-reasonlintEvery read of inCanvas that changes behavior carries an editor-reason: comment directly above it.
concrete/islands/no-editor-globalslintNo code reads the editor canvas's internal __tr globals.
concrete/islands/island-idslintAn island composes its own ids from useIslandId(), never React's useId, and only an island calls it.
concrete/slots/no-marker-literallintNo code writes or reads a data-slot-* marker; the slot primitives emit them.
concrete/slots/no-raw-valueslintSlot values are read through bindings, never off a raw slots object.
concrete/style/no-hard-coded-colorlint (warning)Colors come from the theme, not from a hex value or a color function in a class or inline style.
concrete/style/no-px-breakpointlintAn arbitrary min-[…]: or max-[…]: breakpoint is written in rem, never px.

composition

Each page is rendered once under the page probe, and the composition it places parses.

RuleVenueWhat it requires
concrete/pages/non-section-markupprobeA page emits markup that is not a section; a page may contain only sections.
concrete/pages/section-not-exportedprobeA page places a section no module exports, so the build cannot bundle it alone.
concrete/pages/composition-invalidprobeThe composition the pages place breaks a page, canvas or instance rule.

relations

What one placed section's declarations read off another: the sections are placed, the graph is a DAG, and no fill reads a computed value.

RuleVenueWhat it requires
concrete/relations/section-cycleprobeThe placed sections read each other in a loop; a template's sections form a DAG.
concrete/relations/unplaced-readprobeA declaration reads a section no page places, so the read resolves to no instance.
concrete/relations/fill-reads-computedprobeA fill decision reads a sourced slot (a fact, a compute() or a mirror), which settles only after every fill has run.
concrete/relations/mirror-typeprobeA slot mirroring another slot is not its upstream's kind: a value of another value kind, a row of another from table, or a list of another element.

stylesheet

The CSS import graph of template.ts compiles into the template stylesheet exactly as build compiles it.

RuleVenueWhat it requires
concrete/css/tailwind-importtreeThe CSS import graph of template.ts carries no @import "tailwindcss", or more than one.
concrete/css/external-urltreeA rendered template's compiled stylesheet references an external URL, which the renderer cannot reach.
concrete/css/compile-failedtreeA stylesheet reachable from template.ts fails to resolve or compile, so no stylesheet rule could grade it.

logic

Every placed section's logic bundle builds exactly as build builds it.

RuleVenueWhat it requires
concrete/logic/section-build-failedtreeA placed section's logic bundle fails to build, as when React reaches it through a compute closure.

fixtures

The fixtures the fixture list names load, resolve over the composition, and stay out of the bundle.

RuleVenueWhat it requires
concrete/fixtures/nonetreeThe workspace has no fixture: template.ts names no fixture list, or the list names no content fixture; marker coverage has no input.
concrete/fixtures/property-invalidtreeA property fails the platform schema, references a missing file, or repeats an id within a list.
concrete/fixtures/media-not-in-propertytreeA content entry references a media entry its property does not carry.
concrete/fixtures/rows-not-in-propertytreeA content entry states more rows for a directly linked list than its property carries.
concrete/fixtures/value-invalidtreeA content entry states a malformed date, email or phone value.
concrete/fixtures/held-row-not-in-propertytreeA content entry holds a row its property does not carry; the slot loads empty, as a deleted row does.
concrete/fixtures/document-invalidtreeA fixture document does not parse, or does not match the template: an unknown key, slot or field, a value of the wrong kind, a sourced slot stated without its override mark, or one instance stated twice.
concrete/fixtures/reference-invalidtreeA fixture document names a file outside its own folder, or one that does not exist.
concrete/fixtures/instance-not-placedtreeA content entry names an instance the composition does not place.
concrete/fixtures/reachable-from-bundletreeA module reachable from template.ts imports a file the fixture list reaches, or the sample library.

sections

Every placed section materializes: the schema and fill spec parsed.

RuleVenueWhat it requires
concrete/sections/whole-table-readtree (warning)A compute() reads a whole table (fact.property.units), which counts every member of the table as used. Where the value needs only some members, reading those columns (fact.property.units.beds) narrows what the template asks of a property. A hint: it never fails check.
concrete/sections/row-projection-listprobeAn unlocked list's compute() builds its items from a table's columns, losing each item's row: hold rows from the table, the compute returning the rows the list starts with, or declare the list locked.
concrete/sections/schema-invalidprobeA section's materialized schema or fill spec fails to parse.

contracts

Every placed section's schema and fill spec satisfy the contract assertions publishing re-runs.

RuleVenueWhat it requires
concrete/contract/reads-readablecontractEvery fact a section reads is one the fact registry declares.
concrete/contract/decision-kindcontractEvery fill decision names a kind the platform runs: text, number, pick, list or display.
concrete/contract/produces-known-slotcontractEvery fill decision produces only slots the section declares.
concrete/contract/fill-verbcontractA fill names its verb and brief, a pick names its candidates with of and no other verb takes one, and a filled list declares max.
concrete/contract/poi-curationcontractA points-of-interest curation decision produces exactly one slot, a list of points of interest.
concrete/contract/list-fillcontractA list fill declares what its source needs: a brief wherever the model yields the items, a max wherever it writes rather than picks them, and nothing of the model's on a list bound to a table.
concrete/contract/row-fillcontractA list fill plans only unbound fields its object item declares, each of a kind an item field can be filled with.
concrete/contract/count-boundscontractThe items a fill is asked for fit the min and max of the list that holds them, at the top level or inside an item.
concrete/contract/capcontractEvery generated text value has one character budget, declared on its slot, and a fill cap may only be lower.
concrete/contract/writer-reads-factcontractA fill that writes text, its item fields included, reads at least one fact to ground what it writes.
concrete/contract/displaycontractDisplay entries declare one origin and legal cases, and every slot variant gate names a declared case.
concrete/contract/display-evidencecontractA filled display entry has a declared fact read to judge its case from.
concrete/contract/sourcecontractEvery slot and item field source names a known fact, another slot or its own compute binding; the uploads are read, never bound.
concrete/contract/objectcontractAn object groups value slots, rows, lists of value slots and lists of objects one level deep, holds no value of its own, is labelled by its label field, and names no field like its binding's own keys.
concrete/contract/list-sourcecontractA list's source is a list, a table, a list slot or a compute, and its item can take the source's element.
concrete/contract/row-sourcecontractA row names its table in from; its source is a row slot it mirrors, a compute, the element inside an item, or a pick, and is never a table or a list.
concrete/contract/row-rulecontractA member is read only through a row slot or an address in scope that offers it, and fits the slot that reads it.
concrete/contract/reads-acycliccontractNo slot reads itself through its sources, rows and reads.
concrete/contract/record-collectioncontractA list bound to a fact binds a registry table and may only narrow its min and max.
concrete/contract/nested-slot-typescontractAn object's fields, a nested list item's included, are each a value slot, a row or a list, of a kind the catalog declares.
concrete/contract/list-scalarcontractA list declares exactly one legal item, a value element, an object or a row, with satisfiable bounds.
concrete/contract/selectcontractA select names its choices in exactly one place: its values, or a fact it is bound to that declares them.
concrete/contract/urlcontractA url slot's accepts names a link kind or provider that a registered provider implements.
concrete/contract/sourcescontractNo slot declares sources, since a media slot takes a pasted link wherever a link provider claims its kind; a media slot picks from a media list of the property, or owns its asset without one, and processes only what its kind takes; a slot bound to a fact states neither.
concrete/contract/interpolationcontractA fill brief refers to its facts through reads and never interpolates one.

render

Every placed instance renders over every fixture and synthesized empty: deterministic, free of defects, and fully marked for the editor.

RuleVenueWhat it requires
concrete/render/unrenderablerenderA placed instance throws when it is rendered over a fixture.
concrete/render/determinism-driftrenderAn instance renders different markup twice from the same input.
concrete/render/sentinel-textrenderRendered text is [object Object] or a bare null, undefined or NaN.
concrete/render/broken-imagerenderAn <img> renders with no source.
concrete/render/unresolved-mediarenderA rendered fixture media URL names no file the fixture load produced.
concrete/render/missing-slot-markerrenderAn editable slot, row or row field is never rendered as a selectable marker the editor can reach.
concrete/render/group-ancestryrenderAn object's field is marked outside its own Slot.Object.
concrete/render/section-root-marginrenderThe section root carries a margin utility, opening a gap between sections.

bundles

Every placed section bundles exactly as build bundles it, its weights are reported, its renderer and island chunks stay under their ceilings, and each frameless island renders no content.

RuleVenueWhat it requires
concrete/bundles/build-failedbuildA placed section's renderer or one of its island chunks fails to bundle, so build could not write it.
concrete/bundles/renderer-sizebuildA section's renderer bundle is over 300 KB gzip.
concrete/bundles/island-sizebuildAn island chunk is over 1 MB gzip.
concrete/islands/server-framerenderAn island declaring serverFrame = false renders content on the server, which the build would delete from every published page.

dependencies

The workspace's lockfile is current, installs one React, and carries no high-severity advisory.

RuleVenueWhat it requires
concrete/dependencies/lockfile-missingtreeThe workspace has no package-lock.json, so no dependency gate can be measured.
concrete/dependencies/lockfile-staletreeThe lockfile does not satisfy package.json.
concrete/dependencies/single-reacttreeMore than one copy of React is installed.
concrete/dependencies/audit-severitytreenpm audit reports a high or critical advisory.