# Customize Lotline With AI

## Customize Lotline With AI

**Skill level:** Beginner · **Works with:** Claude, Cursor, GitHub Copilot, Gemini, Windsurf, Codex, ChatGPT, and any other assistant

Lotline is set up so an AI assistant can change it without guessing. Three things make that work:

1. **Content is separate from code.** Almost every change is an edit to a Markdown, TOML, or JSON file: your agency details in `config.toml`, homes in `src/content/properties/`, agents in `src/content/agents/`, neighborhoods in `src/content/neighborhoods/`. AI tools handle this kind of edit well.
2. **Content files explain themselves.** Listing, agent, neighborhood, and section files list their options and allowed values in comments, and sample facts are marked `# sample`. The assistant can see what is possible, and what you still have to replace.
3. **The theme ships instruction files for AI tools.** They describe the folder structure and the rules for changing it. Most AI coding tools load them on their own when you open the project folder.

### The AI Instruction Files In Lotline
Lotline ships four instruction files at the top of the theme folder and three in hidden folders. Folders that start with a dot (`.github/`, `.cursor/`, `.windsurf/`) are hidden by default in Finder and File Explorer, but your code editor shows them. You don't need to edit any of these files. They are there for your assistant.

| File                                    | Read by                                                        | What it contains                                                                 |
| --------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `AGENTS.md`                             | OpenAI Codex, Cursor, Windsurf, GitHub Copilot, and other tools that follow the `AGENTS.md` convention | The full rules: commands, project map, content model (listings, agents, developments, neighborhoods), sections and page blocks, menus, styling, right-to-left, languages, motion, forms, and what the checks can't catch |
| `SKILLS.md`                             | Any assistant you point to it                                  | Step-by-step recipes: add a listing, an agent, a development or a neighborhood, change listing settings, switch a layout, add a page or section, edit menus, add or remove a language, rebrand, verify |
| `CLAUDE.md`                             | Claude Code                                                    | Imports `AGENTS.md`, then a short list of the most important rules              |
| `GEMINI.md`                             | Gemini CLI                                                     | The same as `CLAUDE.md`, for Gemini                                              |
| `.github/copilot-instructions.md`       | GitHub Copilot (coding agent, VS Code, CLI)                    | A short summary that points to `AGENTS.md` and `SKILLS.md`                       |
| `.cursor/rules/theme-architecture.mdc`  | Cursor (always on)                                             | The architecture rules, with a pointer to `AGENTS.md`                            |
| `.windsurf/rules/theme-architecture.md` | Windsurf (always on)                                           | The same rules for Windsurf                                                      |

The `.vscode/` folder holds editor settings and recommended extensions (Astro, TOML, Tailwind CSS), not AI rules.

Chat assistants in a browser (ChatGPT, Claude, Gemini) can't read your folder. You paste `AGENTS.md` into the conversation yourself. See [AI Workflow](/lotline/ai-customization/ai-workflow/).

These files tell an assistant to:

- keep editable text, links, images, and options in `src/content/`, not in components
- make every change in every language: each language folder, `src/i18n/<language>.json`, and `src/config/menu.<language>.json`
- link listings to agents and neighborhoods by file name, and never type a phone number, price format, or currency into a component
- switch a section's look with `options.layout` instead of building a new section
- reuse Lotline's cards (`PropertyCard`, `AgentCard`), buttons, icons, and the color tokens in `src/styles/theme.css`
- use logical classes so every page still works right to left
- never invent listings, prices, reviews, ratings, or figures
- check changed pages at about 375 px and 1280 px wide, in every language, and run `npm run astro-check` at the end

### Two Ways To Work With AI
<CardGrid>
  <Card title="AI that can open your files" icon="laptop">
    Cursor, Windsurf, Claude Code, GitHub Copilot in VS Code, Gemini CLI, Codex.
    Open the Lotline project folder in the tool and describe the change. It reads
    the instruction files, edits the files, and can run the checks.
    **This is the best way to work.**
  </Card>
  <Card title="Chat assistants" icon="comment">
    ChatGPT, Claude, or Gemini in the browser. They can't see your project, so
    you paste `AGENTS.md` and the file you want changed, and copy the answer
    back. Fine for rewriting text, one file at a time.
  </Card>
</CardGrid>

### What AI Does Well In Lotline
- Putting your agency name, phone, email, address, and opening hours in `[business]` once, so every page shows them
- Turning your listing notes into a property file: price, beds, baths, floor area, features, and a description
- Adding agents and their bios, and linking them to the neighborhoods they cover
- Writing a neighborhood guide from facts you give it: schools, parks, transport, shops, and the commute
- Rewriting the sample copy for your agency, in every language
- Setting your currency, area unit, and the price steps in the search
- Picking header, footer, and section layouts, and reordering homepage sections
- Translating the site, adding a language, or turning one off
- Explaining an error message and fixing it

### What To Check Yourself
- **Listings.** Prices, floor areas, bedrooms, and addresses must match the real home. An assistant only knows what you give it. Check each property page after it adds one.
- **Facts.** AI writes convincing copy, and it can invent reviews, star ratings, review counts, sales figures, years of experience, and awards. Check every quote, number, and claim before you publish. Neighborhood guides need the same care: school names, transport times, and parks should be real.
- **Phone, email, and address.** The sample phone numbers use the fictional 555-01xx range, and the agent emails end in `example.com`. Replace them all, in `[business]` and in each agent file.
- **Longer names and labels.** An agency name, button label, menu item, or listing title longer than the sample can wrap or crowd the layout. Check the header, the property cards, and the hero at phone width.
- **Legal pages.** The privacy policy, terms, and cookie policy are placeholders. Have them reviewed for your agency.
- **The result in the browser.** `npm run astro-check` doesn't validate the `sections` and `contact` files, and a property that points at an agent or neighborhood file that doesn't exist passes the check. Only the page shows those mistakes.
- **Forms.** Send one viewing request, one valuation request, and one contact message on the live site, and check that they arrive.

<Aside type="tip" title="Five rules for good results">
  1. One task per request. "Add this listing" works better than "redo the site".
  2. Name the file when you know it. Every page in these docs tells you which one.
  3. Say what must stay the same: "keep every key and option, only change the text".
  4. Ask for every language, or say which languages you use.
  5. Save a checkpoint first (a git commit or a copy of the folder), so any change can be undone.
</Aside>

Ready? Go to the [Prompt Library](/lotline/ai-customization/prompt-library/) for copy-paste prompts.