Skip to content
New: Customize your theme with an AI assistant. Read the guide

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, then keep or undo.

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

  1. Open the whole Covena project folder in the tool (the folder with package.json and AGENTS.md), not a single file or the unzipped download around it. The tool needs that folder to find AGENTS.md and its own rules file.

  2. Start the site with npm run dev so you can watch the change happen at http://localhost:4321/.

  3. Save a checkpoint. If you use git, commit. If not, copy the folder. See Editing Safely.

  4. Ask for one change. Name the file if you know it. Start your first request with “Read AGENTS.md first.” Most tools load it on their own, and the sentence costs nothing in the others. For a bigger job, add “Follow the matching recipe in SKILLS.md.” The Prompt Library has ready-made requests.

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

  6. Check the result in the browser. npm run dev picks up a saved change to config.toml on its own. Restart it after you change languages, the site URL, or trailingSlash. Ask the assistant to run npm run astro-check, or run it yourself.

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

Give The AI Good Context

The more precise the request, the better the result. Useful things to include:

  • The file. “Edit src/content/fees/english/-index.md”, not “edit the fees”.
  • The page. “The section under the hero on /home-corporate/.”
  • Your firm. One paragraph: what law you practise, for whom, where your offices are, and how you charge. Paste it into every copywriting request.
  • Your real facts. Names, qualifications and admission years of your lawyers, office addresses, phone numbers, fees, your regulator and number. If you don’t give them, tell the assistant to keep the sample values and list them for you to replace.
  • The block name. Each homepage file lists its blocks in a comment at the top, such as heroPortraitNavy or contactSplitForm. Name the block to change a section on one page only.
  • What must not change. “Keep every key, slug, and the number of items.” Slugs such as family-law or daniel-mercer link files together: an attorney’s practiceAreas and office, a result’s practice and attorneys, and the menus all point at them.

Review Checklist

Before you accept a change, check:

  • Only the files you expected were edited.
  • Text was changed in src/content/, src/config/, or src/i18n/, not typed into a component.
  • Every language was updated: the english, french, and arabic folders, each src/i18n/<lang>.json, and each src/config/menu.<lang>.json (unless you removed a language).
  • Internal links have no language prefix: /fees/, not /fr/fees/.
  • Keys, slugs, and indentation in frontmatter, TOML, and JSON still look like the rest of the file.
  • No new hex colours like text-[#123456] in components. Covena uses its tokens (bg-navy, text-ink, bg-bronze).
  • No results, reviews, ratings, client names, awards, qualifications, or fees were made up. Where you didn’t provide them, the assistant kept the sample items and told you which ones to replace.
  • The results disclaimer still shows on /results/ and on each result page.
  • npm run astro-check reports no errors.
  • The changed pages look right in the browser:
    • at about 375 px wide (open the mobile menu too) and at 1280 px
    • in every language: put /fr/ or /ar/ in front of the path. Arabic pages read right to left

astro-check checks the collections that have a schema, page blocks included. It doesn’t catch a misspelled option in a section file, and a block with a wrong name is ignored without an error. Only the page shows those mistakes.

For a bigger change, npm run verify runs every check the theme has, including the build and a search for broken links and links that leave their language.

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 file in src/pages/[…lang]/, the page’s named block, and the section file.” A page block wins over the section file (see How Covena Works). If the change is in config.toml and the terminal printed no Generated line, restart npm run dev.
  • It changed the wrong language, or only English. Ask it to repeat the change in the french and arabic folders, then check /fr/ and /ar/.
  • It keeps going in circles. Undo to your checkpoint, start a new conversation, and ask for a smaller step.
Type something to search...