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.
keyis 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. Itssourcedecides which elements it holds, itsitemwhat each is made of; fields that belong together are anobject, and a table row's members are read only through arow(slots). - Render every slot through its primitive. The primitive is the marker:
Slot.Textand its siblings put the editor's identity on the element you named throughas, 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 aneditordeclaration, imported and rendered like any component (server and client). - Write the design system in CSS. Tokens are Tailwind
@themedeclarations and fonts are@font-facerules; 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.tsmay 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
objectinslots, rendered once throughSlot.Object, and slot order is the order you wrote the slots (sections). - Never add tooling configuration.
tsconfig.jsonandeslint.config.mjsdefer 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:
concrete devrenders the template over its fixtures with the editor, so you can see what you changed (fixtures,concrete dev).concrete checkis the whole bar: it typechecks, lints, renders every fixture and grades the result (concrete check).- 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). - Repeat until
concrete checkis green, thenconcrete publishbuilds, 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 need | Read |
|---|---|
| The route from nothing to a published template | Start |
| Why the framework works the way it does | Concepts |
| One task, front to back | Guides |
| An exact signature, option or value shape | Reference |
| Every flag of a command | concrete on the command line |
Why a concrete check failure fired | Every 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.
