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.
-
Open the whole Covena project folder in the tool (the folder with
package.jsonandAGENTS.md), not a single file or the unzipped download around it. The tool needs that folder to findAGENTS.mdand its own rules file. -
Start the site with
npm run devso you can watch the change happen at http://localhost:4321/. -
Save a checkpoint. If you use git, commit. If not, copy the folder. See Editing Safely.
-
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.
-
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.
-
Check the result in the browser.
npm run devpicks up a saved change toconfig.tomlon its own. Restart it after you change languages, the site URL, ortrailingSlash. Ask the assistant to runnpm run astro-check, or run it yourself. -
Keep it or undo it. Commit if you’re happy. If not, ask the tool to revert, or restore your checkpoint.
For ChatGPT, Claude, Gemini, or any assistant in a browser tab.
-
Give it the rules once per conversation. Open
AGENTS.mdin your editor, copy all of it, and paste it with: “These are the rules of the website theme I’m editing. Follow them in every answer.” -
Paste the file you want to change, with its path. For example: “Here is
src/content/practice-areas/english/employment.md:” and the whole file. -
Ask for the change and the full file back: “Return the complete file, ready to paste, and change nothing else.”
-
Paste the answer over the file in your editor and save.
-
Check the result in the browser. If the terminal shows an error, copy the error and paste it back into the chat.
Chat assistants work best for text: rewriting a practice area page, an attorney profile, or an insights post, or translating one. A change that touches several files, such as a new attorney (an entry in each language folder plus links from practice areas), is much less copying in an AI editor.
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
heroPortraitNavyorcontactSplitForm. 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-lawordaniel-mercerlink files together: an attorney’spracticeAreasandoffice, a result’spracticeandattorneys, 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/, orsrc/i18n/, not typed into a component. - Every language was updated: the
english,french, andarabicfolders, eachsrc/i18n/<lang>.json, and eachsrc/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-checkreports 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.tomland the terminal printed noGeneratedline, restartnpm run dev. - It changed the wrong language, or only English. Ask it to repeat the change in the
frenchandarabicfolders, then check/fr/and/ar/. - It keeps going in circles. Undo to your checkpoint, start a new conversation, and ask for a smaller step.