AI Development with Luna

If you build with an AI agent (Claude Code, Cursor, Copilot, or anything that can fetch a URL), this site is set up for it. Every docs page is published in a machine-readable form, so your agent can work from the same material you read, without scraping HTML.

The two endpoints

  • /llms.txt: a curated markdown index of the entire docs site in the llms.txt format. It is generated from the site's navigation, so it never drifts from what humans see. Each entry carries a one-line summary and links to the raw version of the page.
  • /raw/<path>.md: every page served as source markdown. The pattern is the page URL with a raw/ prefix and .md suffix: this page is /luna/ai-development, so its raw form is /raw/luna/ai-development.md (the .md is optional). No HTML chrome, no scripts, just the markdown.

This covers the whole site: Luna pages, the UI Toolkit guides, and the docs for every CupkekGames package (inventory, gamesave, rpgstats, and the rest).

Pointing your agent at the docs

The reliable pattern is the same everywhere:

  1. Give the agent /llms.txt first. It is the map; agents that read it stop guessing URLs and stop hallucinating APIs that are not there.
  2. Have it fetch the raw pages for the task at hand, not the whole site. Wiring a save/load screen means /raw/luna/views/saveload.md and /raw/gamesave/luna.md, nothing more.
  3. Persist the pointer if your tool supports project instructions (a CLAUDE.md, Cursor rules, or equivalent): a line like "Luna UI docs: fetch /llms.txt from the docs site and read the relevant /raw/... pages before writing Luna code" is enough.

What agents do well with Luna

  • Migration mechanics. Converting a C#-built UITK screen (or a uGUI screen) to UXML plus a UIViewComponent subclass is pattern-following work. Feed the agent /raw/luna/firstview.md plus the relevant migration guide (UITK or uGUI) and hand it one screen at a time.
  • Authoring new views. First View plus the component pages give an agent everything it needs to produce a themed, working screen.
  • Styling passes. The Styling and Theme Stack pages let an agent restyle with theme tokens and utility classes instead of inventing inline styles.

Prompts that work well, adapted to your project paths:

Read /llms.txt on the Luna docs site, then read /raw/luna/migrate-uitk.md and /raw/luna/firstview.md. Convert Assets/Scripts/UI/ShopScreen.cs (a C#-built UITK screen) into ShopScreen.uxml plus a UIViewComponent subclass. Keep the existing public methods so callers do not change. Query elements only in OnUILoaded.

Read /raw/luna/theme-stack.md and /raw/luna/styling/colors.md. Restyle my existing UXML screens to use Luna theme tokens and utility classes. Do not set inline styles; use USS classes.

Read /raw/luna/features/spotlight.md. Add a three-step onboarding tour over my existing HUD that highlights the inventory button, the quest tracker, and the settings gear.

Ground rules worth giving your agent

These are the mistakes agents make most often with Luna; putting them in your project instructions saves review cycles:

  • Query in OnUILoaded, never in Awake. The visual tree arrives asynchronously through PanelRenderer.
  • View prefabs under navigation do not set Panel Settings. The host's NavConfigSO owns it (Theme Stack).
  • One top-level element per view UXML. Multiple top-level siblings break fades (First View).
  • USS classes over inline styles. Inline values beat every stylesheet rule and silently block the theme.
  • class="btn" on buttons. The one standard control that does not auto-skin.
  • Luna custom controls use the luna: UXML namespace prefix, and Luna's ProgressBar is not Unity's ui:ProgressBar.

Sample code as reference material

The imported samples are real, working reference implementations: Assets/Samples/LunaUI/<version>/Showcase/ contains a full game-style shell, a per-component storybook, and single-feature scenes. Pointing your agent at a sample screen that resembles what you want ("build my quest log like the Showcase Quests tab, read those files first") consistently beats describing the goal from scratch. The Samples page maps every demo scene to its feature docs.

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL