Skip to main content

llms.txt & context

llms.txt​

Prism publishes a /llms.txt at the site root, following the emerging convention for an LLM-friendly site summary. It is plain text, fits comfortably in a model's context, and contains:

  • A one-paragraph statement of what Prism is.
  • The rules for AI agents and the seventeen questions from the UI guidelines, verbatim: state the job first, build the phone layout with the fewest elements, add nothing unrequested, say what you left out.
  • How to install: the shadcn registry (recommended), the runtime bundle (prototypes) and prismds for Python.
  • The theming attributes — data-signature, data-theme, data-density, data-scale — and the --brand-* customer ramp.
  • The token rules, stated as rules.
  • Every component, grouped by family, each with a one-line description and a link to its page.

For most assistants, pasting this file into the context at the start of a session is enough to shift output onto the system.

When you need more detail​

llms.txt is the index. When the task centres on specific components, also give the model their entries from the components JSON — that file carries the full prop tables (names, types, required-ness, descriptions) so the model uses real props instead of plausible-looking ones.

Pointing a tool at the system​

  • Chat assistants — paste llms.txt, then the relevant component specs. Add your task and the target data-signature.
  • IDE assistants — keep llms.txt in the repo (for example at the project root or in a docs folder) so it is in the working context. Add a short project rule: "Add Prism components from the registry and import them from @/components/prism/…; theme with data-signature; never hard-code colors or re-implement components."
  • Agents with web access — point them at this site; the component pages and the JSON are linked from llms.txt.

A rule block you can reuse​

Build with the Prism Design System. Add components from the Prism registry and import them from @/components/prism/… (in a no-build prototype, read them from the global namespace given in llms.txt). Theme by setting data-signature on a container, not by overriding component styles. Use semantic role tokens (--accent, --text-primary, --surface-card, --positive/--notice/--negative); never hard-code hex or pixel values where a token exists. Keep the focus ring intact and every interactive element labelled.