# The AI Workflow

## The AI Workflow

**Skill level:** Beginner · **Time:** 5 minutes to set up

The same loop works for every change: **save a checkpoint → ask → review → check → keep or undo.**

<Tabs>
  <TabItem label="AI editors and agents">

    For Cursor, Windsurf, Claude Code, GitHub Copilot in VS Code, Codex, and similar tools.

    <Steps>

    1. **Open the whole `consultiz` project folder** in the tool (the folder with `package.json` and `AGENTS.md`), not a single file. The tool needs that folder to find its rules.

    2. **Start the site** with `npm run dev` so you can watch the change happen at [http://localhost:4321/](http://localhost:4321/).

    3. **Save a checkpoint.** If you use git, commit. If not, copy the folder. See [Editing Safely](/consultiz/beginner/editing-safely/).

    4. **Ask for one change.** Name the file if you know it. If your tool doesn't load `AGENTS.md` on its own, or its answers ignore the rules, start with "Read AGENTS.md first." The [Prompt Library](/consultiz/ai-customization/prompt-library/) has ready-made requests.

    5. **Review what changed.** Every tool shows a list of edited files and the changes ("diff"). Check them against the review checklist below before you accept.

    6. **Check the result** in the browser, in English and French, and on a narrow window. Ask the assistant to run `npm run astro-check`, or run it yourself.

    7. **Keep it or undo it.** Commit if you are happy. If not, ask the tool to revert, or restore your checkpoint.

    </Steps>

  </TabItem>
  <TabItem label="Chat assistants">

    For ChatGPT, Claude, Gemini, or any assistant in a browser tab.

    <Steps>

    1. **Give it the rules once per conversation.** Open `AGENTS.md`, copy all of it, and paste it with: "These are the rules of the website theme I'm editing. Follow them in every answer."

    2. **Paste the file you want to change**, with its path. For example: "Here is `src/content/sections/english/banner-slider.md`:" and the whole file.

    3. **Ask for the change and the full file back**: "Return the complete file, ready to paste, and change nothing else."

    4. **Paste the answer over the file** in your editor and save.

    5. **Check the result** in the browser. If the terminal shows an error, copy it and paste it back into the chat.

    </Steps>

  </TabItem>
</Tabs>

### Give The AI Good Context
- **The file.** "Edit `src/content/pricing/english/-index.md`", not "edit the pricing".
- **The page.** "The FAQ on `/pricing/`."
- **Your firm.** One paragraph: what you do, who your clients are, where you work, and your main services. Paste it into every copywriting request.
- **The block name.** "Change the `corporateFaq` block on the pricing page." [Sections](/consultiz/customization/sections/#page-blocks-by-page) lists them.
- **What must not change.** "Keep every key, option, and the number of items."

### Review Checklist
Before you accept a change, check:

- [ ] Only the files you expected were edited.
- [ ] Text was changed in `src/content/` (or `src/i18n/`), not typed into a component.
- [ ] Both `english/` and `french/` files were updated (unless you use one language).
- [ ] Keys and indentation in frontmatter, TOML, and JSON still look like the rest of the file.
- [ ] No new one-off colors such as `text-[#123456]` in components. Consultiz uses its theme tokens (`bg-primary`, `text-dark`).
- [ ] No testimonials, client names, logos, statistics, ratings, awards, or fees were made up. Where you didn't provide them, the assistant kept the samples and told you which to replace.
- [ ] `npm run astro-check` reports no errors.
- [ ] The changed pages look right in the browser. Section files are only loosely checked, and a misnamed page block is ignored without an error, so only the page shows these mistakes.

### When The AI Gets Stuck
- **There is an error in the terminal.** Copy the whole error, including the file name and line number, and paste it with: "Fix this error. Explain the cause in one sentence."
- **The change does nothing.** Ask: "Which file does this text come from on this page? Check the page's named block and the section file." A page block overrides the section file (see [How Consultiz Works](/consultiz/getting-started/how-consultiz-works/)).
- **It keeps going in circles.** Undo to your checkpoint, start a new conversation, and ask for a smaller step.

<Aside type="caution">
  Never paste passwords, API keys, or private client data into an AI chat.
  Consultiz doesn't need any to be customized: form endpoints and analytics IDs
  are public values.
</Aside>