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 exact import: the stylesheet, the bundle, and the global namespace.
  • The theming attributes — data-signature, data-theme, data-density, data-scale.
  • 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: "Use Prism from window.<namespace>; 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. Import components 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.