ai-cms
The content engine for FivePaths microsites. It gives a site a typed content model, a renderer that emits pristine HTML, an image pipeline, and a gate that blocks any change failing WCAG AAA. The primary editor is an LLM running in Claude Code against the site's git repo; the source stays plain markdown and HTML that a person can open and edit.
It is a dependency, not a framework you live inside. A site repo installs a pinned version, keeps its own content, its own site.css, and its own prompt overrides, and upgrades the engine on its own schedule.
Developing it
npm install && npm run dev
DEVELOPMENT.md covers the workspace: the engine is symlinked into two sites under dev/sites/, and the dev server watches the engine as well as the site, so a component template edit shows up in the page immediately.
Documents
- ARCHITECTURE.md: the system. Repo shapes, the render and media pipelines, the validation gate, the Claude Code layer, git and deploy, and the seams left for multi-tenancy.
- CONTENT-MODEL.md: the page format, the block schema system, and the component catalogue mapped to the shared design system.
- ACCESSIBILITY.md: how AAA is enforced. What the machine checks, what a person has to attest, and how attestations expire.
- COMPONENTS.md: the component library. What ships with the engine, what a site keeps, and the test that separates them.
- MEDIA.md: images. The sidecar, how widths are derived from the component slot, and how to override that by hand.
- FONTS.md: bringing a site's own face. Self-hosting, the licence gate, and subsetting.
- DEPLOY.md: the pipeline. Why production requires a passing gate and a preview does not.
- BUDGETS.md: what a page weighs, measured from the build rather than from a browser.
- MARKUP.md: what pristine HTML means concretely. The class rule, and the audit proposing a v3 of the shared stylesheet.
- SITE-CONTEXT.md: how a site keeps the decisions, rejections, and vocabulary that git does not record, so a new session inherits them.
- AGENT-INTERFACE.md: the standing rules every command, error, and schema follows so an LLM can work here.
- TRANSLATION.md: the locale dimension, how a translation goes stale, and what translation costs the rest of the system.
- INGEST.md: taking an existing site of under fifty pages and rebuilding it in this format, including how its brand colours become token overrides that clear 7:1.
- ROADMAP.md: build order, with gtfs.media as the acceptance test.
The shape of a site
site-repo/
package.json pins the engine version; `cms` resolves from node_modules
src/
content/<locale>/ markdown pages, one file per URL
media/ original images with alt-text sidecars
assets/ site.css, fonts, favicon, anything served verbatim
data/ site.yml, nav.yml, fonts.yml, strings.<locale>.yml
generators/ modules that turn a data file into blocks
layouts/ override only, empty on most sites
partials/ override only
components/ override only
docs/components/ the human component reference, generated
.cms/
prompts/ site-specific prompt overrides, not full prompts
budgets.json performance, font, and site.css budgets
media.lock.json image manifest
translations.lock.yml
conformance.yml the AAA attestation ledger
.claude/ generated skill and hook config, no logic
public/ build output, gitignored
Everything above is either this site's content or a file generated from it. The engine's code, and its default components, layouts, partials, and prompts, stay in node_modules/@fivepaths/ai-cms/ and are never vendored in. The four directories marked override are consulted first and fall through to the engine's defaults, so a site that has not overridden anything leaves them empty.
cms is a project-local binary, not a global install: a global one would pin every site on a machine to the same engine version, which is the opposite of upgrading per site.
cms dev runs the site locally with live reload. Pushing to the self-hosted GitLab builds, checks, and deploys to Cloudflare Workers static assets: a branch gets a preview URL on its merge request, the default branch goes to production.
src/ is the source of truth and the thing a person edits. public/ is generated and never hand-touched.
Design system
Sites link cdn.fivepaths.com/microsite/v2/base.css and add a short site.css. The engine reads both sheets to build the class allowlist the renderer is held to, so the markup can only use classes the CSS actually defines. Design rules live in DESIGN_GUIDE.md in the fivepaths-cdn repo and copy rules in its WRITING_GUIDE.md. Both are fed to the editing agent as prompt layers.
Status
Planning. Nothing is built yet. Read ARCHITECTURE.md, then ROADMAP.md.