Blocks
A block is data: { id, kind, props?, children? }. Every kind is described once in convex/lib/blocks.ts (what it's for, its props, whether it holds children). That one list feeds:
- the renderer (
src/components/Renderer.tsx, one function per kind), - the checks (
checkBlueprintrefuses unknown kinds, missing or wrong props, duplicate ids), - the AI's system prompt (it can only use kinds on the list).
Adding a block #
- Add its description to
BLOCKSinconvex/lib/blocks.ts. - Add its renderer to
RENDERERSinsrc/components/Renderer.tsx. - Nothing else: HQ and the AI pick it up from the list.
Keep blocks abstract: a stat is a number with a label, not a "streak counter".
Today #
stack, heading, text, image, button, list, card, stat, divider, miniapp, and the HQ system blocks hq.proposals, hq.history, hq.blueprint.