AI Workflow
Skill level: Beginner
Two ways to work, depending on whether your assistant can open your project folder. Pick the tab that matches your tool.
-
Open the whole
lookaproject folder in the tool (the folder withpackage.json), 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 devand keep it open athttp://localhost:4321, so you see each change. -
Save a checkpoint. If you use git, commit. If not, copy the folder. See Editing Content Safely.
-
Ask for one change. Name the file if you know it. The tools listed in the AI Overview load the theme’s rules on their own. If your tool isn’t listed, or its answers ignore the rules, start your first request with “Read AGENTS.md first.” 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 (“diff”). Check the list against the review checklist below before you accept.
-
Check the result in the browser, at a narrow window and at
/ar/.npm run devgenerates the config fromconfig.tomland keeps watching it, and picks up saved content changes on its own. Restart it after you changesrc/config/fonts.json,src/config/language.json,trailingSlash, or anything in[settings.multilingual]: Astro reads those only when it starts. Ask the assistant to runnpm run astro-check, or run it yourself.
-
Give it the rules. Open
AGENTS.mdfrom the theme folder, copy all of it, and paste it into a new conversation with one line: “These are the rules for the Astro theme I am customizing. Follow them.” -
Paste the file you want to change, with its path. For example: “Here is
src/content/sections/english/home-banner.md:” and the whole file. -
Ask for the change, and say what must stay the same: “Keep every key, option, and icon name. Only change the text values.”
-
Copy the answer back into the same file in your editor, save, and look at the page.
-
Repeat for every language. Ask for the French and Arabic versions of the same file in the same conversation, so the keys stay identical.
Chat assistants work best for text: rewriting copy, translating, writing blog posts, service descriptions, and job ads. For a change that touches several files, such as a new section or a new language, an AI editor saves a lot of copying.
What To Tell The Assistant
The more of this you give, the less it has to invent.
- The file. “Edit
src/content/sections/english/services-section.md”, not “edit the services”. - The page. “The section under the hero on
/about/.” - Your firm. One paragraph: what you do, for which industries, and what makes you different. Paste it into every copywriting request.
- Your real figures. Fees, team size, years in business, client results you can back up. If you don’t give them, tell the assistant to keep the sample values and list them for you to replace.
- The option name. Copy it from the comment next to the option in the section file: “set
showServicesAsto[VALUE]”. - What must not change. “Keep every key, option, and the number of items.”
- The recipe. For bigger jobs, point to
SKILLS.md, which most tools don’t read on their own: “Follow the ‘Add or remove a language’ skill in SKILLS.md.”
Review Checklist
Go through this before you accept a change.
- Text was changed in
src/content/,src/config/, orsrc/i18n/, not typed into a component. - Every language was updated: each language folder under
src/content/,src/i18n/<language>.json, andsrc/config/menu.<language>.json(unless you turned a language off). - Prices and other numbers are identical in the pricing file of every language, and the plan labels still match
common.monthlyPlanin that language’s i18n file. - Keys, ids, and indentation in Markdown frontmatter, TOML, and JSON still look like the rest of the file.
- A new page block is actually passed to its section in the route file.
- No new colors like
text-[#123456]in components. Looka uses its theme tokens (bg-primary,bg-accent,bg-theme-light,text-dark). Note thatlightis a grey text color, whiletheme-lightis the pale background. - New or changed CSS uses logical classes (
ms,me,ps,pe,text-start), notml,pr, ortext-left. - No client names, testimonials, case-study results, metrics, or prices were made up. Where you didn’t provide them, the assistant kept the sample items and told you which ones to replace.
-
npm run astro-checkreports no errors. - The changed pages look right in the browser:
- at about 375 px wide and at 1280 px
- in every language (the language switch, or
/fr/or/ar/in front of the path). Arabic pages should read right to left
astro-check validates only blog, services, case-studies, and pages. In those four, a key the schema does not list is dropped without an error, so the component never sees it. Everywhere else a wrong key or option value passes the check, and a wrong icon name fails only in the browser. Only the page shows those mistakes.
When Something Goes Wrong
- The build or the check fails. Paste the whole error, including the file and line, and ask for the cause and the smallest fix.
astro-checkcomplains about the config. Runnpm run toml:watchonce to generate.astro/config.generated.json.- The change does nothing. Ask: “Which file does this text come from on this page? Check the block in the page’s frontmatter, whether the route file in
src/pages/[...lang]/passes that block to the section, and the section file insrc/content/sections/english/.” The block wins when it is passed (see How The Theme Is Organized). If the change is inconfig.toml, restartnpm run dev. - A section disappeared. Check
enablein its section content file:enable: falsehides it without removing it. - A new field is ignored. In
blog,services,case-studies, andpages, a key that is not insrc/content.config.tsis dropped. Ask the assistant to add it to the schema. - The layout broke at
/ar/. Ask the assistant to replace physical classes with logical ones, and to addrtl:handling fortranslate-x-*, transform origins, and gradient directions, which don’t flip by themselves. - It keeps ignoring a rule. Say “Re-read AGENTS.md, section [NAME], then redo this.”