Concrete

Agents

You are a coding agent about to edit a Concrete workspace — read this first.

This page is the brief. It states what is true of every Concrete workspace and links the page that owns each claim; it states no signature, because the reference does that and a second copy here would go stale. Follow a link before you write the code it describes.

Your training data is older than the framework you are editing. Concrete ships a major per breaking change, and every page of this corpus is compiled against the package it describes — your memory is not. Check which version this workspace has (CONCRETE_VERSION, below), read the corpus for that version, and treat a name you remember but cannot find on a reference page as a name that no longer exists.

A template workspace is an ordinary private npm package that depends on @homepages/concrete. It has exactly one reserved file, template.ts; everything else is reached from it — pages, sections, the stylesheet and the icon by import, the fixtures by the fixture list it names — and is yours to name and place. .concrete/ is the framework's scratch directory and .env holds the publisher key, and both are gitignored. The framework owns the toolchain, so the workspace declares no TypeScript, no ESLint, no bundler and no Tailwind of its own (the workspace and versioning).

Always:

  • Declare a section's identity. key is the section's identity in the platform's catalog and is never derived from the export name or the file name, so renaming a variable must not mint a new section (sections, section).
  • Expose editable content as a slot. A slot is a type crossed with a source: the builder picks the type, and its one source — a fact, a slot ref, compute() or a fill (fill.write, fill.pick, fill.find) — decides where the value comes from (slots, slot builders). Where the value comes from is its own decision (facts and provenance, sources; AI fill, fill).
  • Declare anything repeating as one list. Its source decides which elements it holds, its item what each is made of; fields that belong together are an object, and a table row's members are read only through a row (slots).
  • Render every slot through its primitive. The primitive is the marker: Slot.Text and its siblings put the editor's identity on the element you named through as, and there is no other route it can arrive by (the marker contract). What a bound slot hands your markup at render is value shapes.
  • Put interactivity in an island — a "use client" module with an editor declaration, imported and rendered like any component (server and client).
  • Write the design system in CSS. Tokens are Tailwind @theme declarations and fonts are @font-face rules; there is no theme object and no configuration file (styling).
  • End every change on a green concrete check — the loop is below.

Never:

  • Never let a page contain anything but sections. Fragments and your own wrapper components are fine, as long as what they finally contain is sections; the composition is then derived from that placement rather than declared (pages and composition, template.ts, pages/non-section-markup).
  • Never make a renderer impure. A page and a section's render function run once, at check time, and their answer is stamped into the artifact — so state, effects, event handlers, browser APIs, the clock and randomness belong in an island instead (server and client, server/no-nondeterminism, server/no-client-runtime).
  • Never let a fixture reach a bundle. Fixtures are JSON documents — a fixture list, content fixtures, property documents — and no module reachable from template.ts may import a file the fixture list reaches, or the sample-property library (fixtures, fixtures/reachable-from-bundle).
  • Never write a raw value or a marker attribute by hand. Content that is not behind a primitive is content the editor cannot reach (slots/no-raw-values, slots/no-marker-literal).
  • Never hard-code a colour or a pixel breakpoint where a token or a utility belongs (style/no-hard-coded-color, style/no-px-breakpoint).
  • Never declare twice what the framework derives. There is no layout declaration, no anchor option and no group table: slots that belong together are one object in slots, rendered once through Slot.Object, and slot order is the order you wrote the slots (sections).
  • Never add tooling configuration. tsconfig.json and eslint.config.mjs defer to the framework and hold nothing of their own, so an upgrade never has to rewrite them (the workspace and versioning).
  • Never invent an export. If a name is not on a reference page, the package does not have it.

The author loop. Write, run, fix by rule id, repeat — and nothing that goes wrong arrives without an id:

  1. concrete dev renders the template over its fixtures with the editor, so you can see what you changed (fixtures, concrete dev).
  2. concrete check is the whole bar: it typechecks, lints, renders every fixture and grades the result (concrete check).
  3. Every failure carries a rule id, and /rules/<id> is that rule's page — the requirement, why it exists, and how to resolve it. Fix the cause it names, never the symptom (every rule).
  4. Repeat until concrete check is green, then concrete publish builds, checks, assembles the artifact and sends it (publishing and environments).

A command that finds this workspace behind the published release says so on stderr, and concrete upgrade is the crossing: it installs the target first and runs the codemods that shipped inside it second (concrete upgrade).

CONCRETE_VERSION

Signature

import { CONCRETE_VERSION } from "@homepages/concrete";

const installed: string = CONCRETE_VERSION;

Constraints

Always check this against the version of the docs you are reading. The site's root describes the current major; every superseded major is kept as a snapshot under /v<N>/, and a snapshot page is never edited. If this workspace is a major behind, read the snapshot for its major rather than the root, and read the workspace and versioning before you upgrade.

Example

import { CONCRETE_VERSION } from "@homepages/concrete";

const banner = `workspace is on Concrete ${CONCRETE_VERSION}`;

See also

The corpus is four tiers and a rule index, each answering a different question. Go to the one that matches what you are stuck on:

When you needRead
The route from nothing to a published templateStart
Why the framework works the way it doesConcepts
One task, front to backGuides
An exact signature, option or value shapeReference
Every flag of a commandconcrete on the command line
Why a concrete check failure firedEvery rule, one page per id

The whole corpus is also served as one plain-text index at llms.txt, and every page as markdown at its own URL with .mdx appended.