Agent docs

README

The shared UI system every Versable app is built from.
versable-builder

The shared UI system every Versable app is built from
A component kit, a written design language, and the recipes that say what a request for a screen actually brings along.

React TypeScript pnpm Node
kit components canon consumers



packages/ui · docs/design-language · docs/app-patterns · apps/playground · docs/SCRIPTURE.md · CONTRIBUTING.md


What is this?#

Not an app. This repo holds the things more than one Versable app needs, so a second app does not re-decide them and a third gets cheaper still. Three published packages, and three layers of writing that govern how they are used.

What it isWhere
The kit43 components in the gallery (34 with a contract doc), table feature hooks, decision-carrying hookspackages/ui
The toolkitframework-free utilities, zero React by design; published, no consumer yetpackages/toolkit
qsyncURL-state sync for tables and filters; the playground consumes itpackages/qsync
The canonthe visual law: 13 traits, principles, presets, worked casesdocs/design-language
The patternshow an app is built and documented, plus request-shaped recipesdocs/app-patterns
The playgroundevery component in isolation, and the only home of some primitivesapps/playground
The templateswhat you copy to start a new app, one per app shapeapps/_templates
Consumed bywalmart-mvp, speedway, and apps/playground heresibling repos

Versable builds a small number of customer apps (Speedway and a Walmart MVP today) and every screen in them is drawn from the one shared kit. When a correction is made on a shipping screen it flows back here and becomes law for everyone; nothing flows the other way. The reason for all of it is that a fix should be made once and stop being a thing that gets forgotten; that is the first claim the scripture makes about itself (docs/SCRIPTURE.md, section 1).

One finding worth knowing before you use any of it. Across 73 owner corrections mined from the two shipped apps, there were zero retrieval failures. Every gap was law that had never been written down, not law someone failed to find. So the value of this repo is accumulation rather than lookup, and the next app gets cheaper only if what it learns comes back here.


Architecture#

Code flows down, law flows sideways, and nothing flows up.

sibling repos this repo
┌──────────────────────┐
│ walmart-mvp │ imports ┌───────────────────────┐
│ pins ^0.0.24 │────────────▶│ packages/ui │
├──────────────────────┤ │ every component │
│ speedway │ declares │ @versable-git/ui │
│ ^0.0.14, flagship │────────────▶└───────────┬───────────┘
└──────────────────────┘ │ may import
▲ ▼
│ corrections ┌───────────────────────┐
│ flow back │ packages/toolkit │
│ as law │ pure functions │
│ └───────────────────────┘
┌─────────┴────────────────────────────────────────────────┐
│ docs/design-language 13 traits · the visual law │
│ docs/app-patterns methods · recipes · primitives │
│ packages/ui/docs one contract per component │
└──────────────────────────────────────────────────────────┘
governs the kit without the kit depending on it

The upward arrow is the one that matters. A correction caught in a shipped app becomes a canon rule here, which is why this repo grows from the apps rather than the other way round.


Quick Start#

git clone https://github.com/versable-git/versable-builder.git
cd versable-builder
pnpm install

This is a pnpm workspace. Run pnpm, not npm, inside it.

Using the kit in an app (not this repo): packages/ui/README.md, the prerequisites, the registry line and token, the install and pin, the theme import, the bundler contract, and the upgrade checklist.

Working on this repo (adding a component, a pattern, a doc): CONTRIBUTING.md.

Playground (port 5104, and live at https://versable-builder-playground.vercel.app/), the fastest way to see a component render:

pnpm dev # from the repo root

Everything else:

pnpm typecheck # every package, in parallel
pnpm test # every package
pnpm build # every package
pnpm lint:tokens # the design-token lint

Who reads what#

Two audiences share this repo and they read different files. If a document reads like it was written for a machine, it probably was.

You areStart withWhy
a person who wants to understand the projectthis page, then the playgroundthe pitch, the architecture picture, every piece running
a person who will work in the repoCONTRIBUTING.mdhow to set up, run, and add a component, a pattern, or a doc
a person putting the kit in an apppackages/ui/README.mdprerequisites, install, the bundler contract, upgrading
an agent working hereAGENTS.md, then CLAUDE.mdthe ground rules and the doc map; not written for people
anyone deciding whether to trust a ruledocs/SCRIPTURE.mdwhy the project exists and an honest list of where it has failed its own goals

By what you came to do#

I want toGo toWhat you will find
see itthe playground, pnpm dev then http://localhost:5104every component and pattern rendered live, both themes, and every document below readable in place under /docs
put the kit in my apppackages/ui/README.mdprerequisites, the registry and token, the install and pin, the theme import, the bundler contract, the upgrade checklist
know why any of this existsdocs/SCRIPTURE.mdintent, goals, non-goals, and the failure modes the project admits to
know what a screen should look likedocs/design-language/thirteen traits, each with principles, presets, and cases cited to the line of code that ships them
know how a screen gets built and written updocs/app-patterns/ and docs/GUIDEBOOK.mddata loading, the surface-doc template, how an app comes onto the kit, and what went wrong the first two times
know what a component takespackages/ui/docs/one contract per component: props, banned combinations, where each shape ships today
know what was decided and whydocs/adr/the architecture decision records: framework, auth, design tokens, schema codegen, docs publishing
know what is banneddocs/DO-NOTS.mdevery banned combination and canon do-not in one place, regenerated from source
find my way around the written systemdocs/index.mdthe docs map: what each layer can do for you, where truth lives for a component, the showcase surfaces
see how the repo is runscripts/README.mdthe scripts, what each is for, and what each must never do
dig through the archivedocs/plan/, docs/evidence/, docs/reference/plans, research artifacts, mockups; useful, dated, not swept into the playground on purpose

The owning statement of how the layers relate (canon is law, component docs are contract, recipes are what a request brings along) is docs/index.md; this table routes, the map governs.


Releasing the kit#

The owning copy of the release procedure is the Releasing section of packages/ui/README.md (bump, scripts/ship-kit.sh, never a laptop publish, [skip kit] to hold). Consumers pin independently and upgrade on their own customer-facing work, never because the kit moved; docs/GUIDEBOOK.md section 4 carries that ruling.


Documentation#

WhereWhat it covers
docs/design-language/the visual canon, 13 trait docs, each with principles, presets and worked cases
docs/app-patterns/methods and recipes: data loading, surface docs, E2E derivation, deploying, migration, the two recipes
packages/ui/docs/one contract per component, every component covered
docs/adr/architecture decision records
docs/plan/build plans and the tracking board; TRACKING.md is the live one
docs/reference/reference material that is neither law nor method
docs/index.mdthe docs map: what the docs can do, where truth lives for a component, the showcase surfaces
docs/GUIDEBOOK.mdbringing an app onto the kit, and the retrospective on the two that did
docs/SCRIPTURE.mdwhy the kit exists, its goals, and the failure modes it admits
pipelines/shipping pipelines, currently the docs site template
user_docs/the owner's files; agents read these and never commit them

How work happens here#

The owner looks at the playground and writes down what is wrong, in their own words, with a stable ID per item (docs/plan/63-showcase-feedback-5.md is one such round). Agents group those IDs into a batch of work, build it, verify each item live in both themes at desktop and phone width, and put the result on the board, docs/plan/TRACKING.md, under "To be reviewed" for the owner to cross off. The kit ships when the owner bumps its version and pushes; a workflow publishes it. Consumer apps stay on their pinned kit version until they upgrade on purpose; an upgrade rides the next customer-facing piece of work in an app, because an upgrade for its own sake buys the business nothing. Product behaviour in Speedway is frozen at the moment; UI and kit work go on.

The source is private, so every GitHub link on the site returns 404 unless you are signed in with access. The board carries a queue of agent-complete work the owner has not reviewed yet; the scripture grades that its one MISSING failure mode (docs/SCRIPTURE.md, section 6, F3).

Where to start. If you have ten minutes: run the playground and click around. If you have an hour: read docs/SCRIPTURE.md, then one design-language doc, then the contract doc for the component it talks about, in that order. That is the whole system in miniature: why, what it should be, what it promises.


Repo Structure#

versable-builder/
├── packages/
│ ├── ui/ → @versable-git/ui · React 19 · published
│ │ ├── src/ · components, table hooks, the sync seam
│ │ ├── theme/ · theme files, imported by subpath
│ │ └── docs/ · one contract per component
│ ├── toolkit/ → @versable-git/toolkit · zero React · published, no consumer yet
│ └── qsync/ → @versable-git/qsync · URL-state sync
├── apps/
│ ├── playground/ → Next 16 · port 5104 · every component in isolation
│ └── _templates/ → what you copy to start a new app: next, react-router-ssr, vite-spa
├── docs/
│ ├── design-language/ · the visual law, 13 traits
│ ├── app-patterns/ · methods and request-shaped recipes
│ ├── adr/ · decision records
│ └── plan/ · build plans, TRACKING.md is live
├── pipelines/ → shipping pipelines, docs-pages today
├── scripts/ · repo tooling, six scripts, each explained in scripts/README.md
└── user_docs/ · owner-authored, never agent-committed
@versable-git/ui · reference, canon, and method, read in place