For coding agents
Texuli for agents
A closed catalog, emit tiers, a sink-free renderer and local tools—so agents build real interfaces without inventing components or HTML sinks.
How agents build with Texuli
Six surfaces every agent workflow should know before emitting UI.
Closed catalog
Manifests
Every emittable component is described by an authored manifest: id, props, use-when rules, accessibility notes and examples.
- Build-time validation — invalid manifests fail the catalog build
- Content-addressed catalog file: catalog-<sha256>.json
- Groups discover automatically (display, forms, overlays, layouts, …)
Emit tiers
Trust
Developer tier may use app chrome. Untrusted model output is limited to Tier U content components and content layouts.
- Untrusted never gets dialogs, menus, shells or focus traps
- isTierU(catalog, id) answers the renderer’s emit check
- agentEmittable defaults to false so missing flags stay closed
Sink-free renderer
Security
Agent trees become safe render nodes: unknown ids become placeholders, schema failures drop nodes, class/style never pass through.
- No HTML sinks — no {@html}, innerHTML or string-built scripts
- Tree limits (depth, nodes, bytes) before render
- Hostile corpus asserts script URLs, bidi tricks and giant trees stay inert
MCP server
Tools
A local stdio MCP server exposes catalog lookup so coding agents can search components without inventing props.
- Read-only tools over the closed catalog
- Runs in-process with the monorepo — no remote catalog fetch
- Pair with llms.txt for prose context and MCP for structured props
CLI
Workflow
texuli add copies styled sources with provenance. llms generation writes agent docs. Updates stay on local paths only.
- Never copies primitives into consumer apps
- Path containment refuses .. escapes and symlink writes
- All file writers share packages/tools internal path rules
Golden set
Quality
A curated set of components and flows every release must keep green: behavior checks, visual baselines, axe and the hostile corpus.
- Playwright behavior checks for every primitive, held to the WAI-ARIA APG patterns
- Visual snapshots on real themes in light and dark
- WCAG 2.x contrast is the contrast gate (APCA out of scope)
Setup order
A practical sequence for coding agents working in this repository or a consumer app.
Install the monorepo skill
Point your coding agent at the Texuli skill pack so it follows AGENTS.md, layers and gates.
Load llms.txt
Fetch /llms/llms.txt from this site build (or regenerate with @texuli/tools/llms) for component orientation.
Attach the catalog
Use catalog-<hash>.json or /catalog/catalog.json so the agent only emits known ids and props.
Run MCP locally
Start the Texuli MCP server from the repo for structured catalog lookup during implementation.
Render untrusted trees safely
Pass model output through @texuli/catalog/render (limits, renderer, frame, hostile checks) before UI.
Agent resources
These files ship with the static site build. No runtime network — open them from the same origin as this page.
llms.txt
File
Compact agent index of catalog components (llmstxt.org-style).
/llms/llms.txt
llms-full.txt
File
Full concatenated component docs generated from manifests.
/llms/llms-full.txt
Catalog JSON
File
Closed catalog snapshot (format texuli-catalog) for offline agents and CI.
/catalog/catalog.json
Docs shell
Page
Documentation layout used by longer guides on this site.
/docs-shell/