[{"data":1,"prerenderedAt":422},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fsite-kit\u002Fai-agents":3,"docs-navigation":273,"docs-surround-\u002Fdocs\u002Fsite-kit\u002Fai-agents":419},{"id":4,"title":5,"body":6,"description":265,"extension":266,"icon":267,"meta":268,"navigation":267,"path":269,"seo":270,"stem":271,"__hash__":272},"docs\u002Fdocs\u002F4.site-kit\u002F08.ai-agents.md","Work with an AI agent",{"type":7,"value":8,"toc":257},"minimark",[9,13,17,22,47,54,58,137,141,212,215,219,241,247],[10,11,5],"h1",{"id":12},"work-with-an-ai-agent",[14,15,16],"p",{},"A kit site is made for changes by AI coding agents, such as Claude Code, Codex or Cursor. Content is in plain files, the build checks every change, and the kit gives the agent its rules.",[18,19,21],"h2",{"id":20},"the-rules-an-agent-reads","The rules an agent reads",[23,24,25,38,44],"ul",{},[26,27,28,29,33,34,37],"li",{},"The site's ",[30,31,32],"code",{},"AGENTS.md"," points the agent to the kit's rules, in ",[30,35,36],{},"node_modules\u002F@hostsmith\u002Fsite-kit-astro\u002FAGENTS.md",", and holds the notes for this site only. Add those notes below its heading.",[26,39,28,40,43],{},[30,41,42],{},"CLAUDE.md"," loads both files for Claude Code.",[26,45,46],{},"The kit's rules come with the package, so a kit update updates them too.",[14,48,49,50,53],{},"Before an agent's first change, the site needs its packages installed, with ",[30,51,52],{},"npm ci",", so the kit's rules are there to read.",[18,55,57],{"id":56},"what-the-rules-tell-an-agent","What the rules tell an agent",[23,59,60,71,85,91,97,107,121,127],{},[26,61,62,70],{},[63,64,65,66,69],"strong",{},"Content goes in ",[30,67,68],{},"src\u002Fcontent\u002F","."," Pick a library section type that fits a block before writing a new one.",[26,72,73,76,77,80,81,84],{},[63,74,75],{},"A fact is written once."," The phone number, the address or a license number go in the settings' ",[30,78,79],{},"facts",", and the content writes ",[30,82,83],{},"{phone}",". A header button, opening hours or a link column is a block in the settings, never a new component.",[26,86,87,90],{},[63,88,89],{},"No visible text in templates."," A label in the site's own markup is an interface string, translated with the rest of the content.",[26,92,93,96],{},[63,94,95],{},"Every locale."," A new page or entry gets its translations, or the agent says which locales go without it. Translations keep their section ids.",[26,98,99,102,103,106],{},[63,100,101],{},"Styles go through the theme."," Colors only in the color presets, fonts only in the type tokens, kit parts styled through their ",[30,104,105],{},"sk-"," hooks.",[26,108,109,112,113,116,117,120],{},[63,110,111],{},"The kit stays the kit's."," The agent never edits ",[30,114,115],{},"node_modules"," or the assembled CMS config, ",[30,118,119],{},"public\u002Fadmin\u002Fconfig.yml",", and never copies the kit's code into the site.",[26,122,123,126],{},[63,124,125],{},"No new packages."," The site uses only the kit, Astro and Tailwind. A change that seems to need another package is raised with you instead.",[26,128,129,132,133,136],{},[63,130,131],{},"Third-party files need a license."," A font or image from elsewhere is added only under a license that allows it, and listed in ",[30,134,135],{},"CREDITS.md",". One whose license is unknown, such as a font from the old site, is listed as awaiting confirmation, and the agent tells you.",[18,138,140],{"id":139},"the-checks-an-agent-runs","The checks an agent runs",[142,143,144,157],"table",{},[145,146,147],"thead",{},[148,149,150,154],"tr",{},[151,152,153],"th",{},"After",[151,155,156],{},"Command",[158,159,160,174,184,194],"tbody",{},[148,161,162,169],{},[163,164,165,166],"td",{},"a change to ",[30,167,168],{},"public\u002Fadmin\u002Fconfig.site.yml",[163,170,171],{},[30,172,173],{},"npm run decap-config",[148,175,176,179],{},[163,177,178],{},"a change to a collection's or section's schema",[163,180,181],{},[30,182,183],{},"npx site-kit schema",[148,185,186,189],{},[163,187,188],{},"a style change",[163,190,191],{},[30,192,193],{},"npm run check:styles",[148,195,196,199],{},[163,197,198],{},"any change",[163,200,201,204,205,208,209],{},[30,202,203],{},"npm run build",", then ",[30,206,207],{},"npm run check:urls"," and ",[30,210,211],{},"npm run check:styles -- --built",[14,213,214],{},"The deploy workflow runs the style checks and the build again on every push, so a change that fails them never deploys.",[18,216,218],{"id":217},"review-a-change","Review a change",[220,221,222,225,234],"ol",{},[26,223,224],{},"Ask the agent for the change on a branch, such as \"On a new branch, add an FAQ section to the services page with these three questions, then push it\".",[26,226,227,228,233],{},"The push deploys the branch to the ",[229,230,232],"a",{"href":231},"\u002Fdocs\u002Fsite-kit\u002Fdeploy","preview site",". Check it, and send the client the link.",[26,235,236,237,240],{},"Merge the branch to ",[30,238,239],{},"main"," once the client approves: the merge deploys it to production.",[14,242,243,244,69],{},"Every change is a commit, so you can see what the agent changed, and undo it with ",[30,245,246],{},"git revert",[14,248,249,250,256],{},"The kit's rules are ",[229,251,255],{"href":252,"rel":253},"https:\u002F\u002Fgithub.com\u002Fhostsmith\u002Fsite-kit-astro\u002Fblob\u002Fmain\u002Fpackages\u002Fsite-kit-astro\u002FAGENTS.md",[254],"nofollow","in its repository",", in full.",{"title":258,"searchDepth":259,"depth":259,"links":260},"",2,[261,262,263,264],{"id":20,"depth":259,"text":21},{"id":56,"depth":259,"text":57},{"id":139,"depth":259,"text":140},{"id":217,"depth":259,"text":218},"How an AI coding agent changes a kit site - the kit's rules for agents, what they allow, the checks an agent runs, and reviewing its change in a preview.","md",null,{},"\u002Fdocs\u002Fsite-kit\u002Fai-agents",{"title":5,"description":265},"docs\u002F4.site-kit\u002F08.ai-agents","qP8C47kkyzq-wN1YaMeZmGN5xVR1kkGcqrelb60aqdU",[274],{"title":275,"path":276,"stem":277,"children":278,"page":418},"Docs","\u002Fdocs","docs",[279,306,318,353,400],{"title":280,"path":281,"stem":282,"children":283,"page":-1,"icon":285},"Getting Started","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started\u002Findex",[284,286,290,294,298,302],{"title":280,"path":281,"stem":282,"icon":285},"solar:rocket-bold",{"title":287,"path":288,"stem":289},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction",{"title":291,"path":292,"stem":293},"Quick Start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F1.getting-started\u002F2.quick-start",{"title":295,"path":296,"stem":297},"Sites","\u002Fdocs\u002Fgetting-started\u002Fsites","docs\u002F1.getting-started\u002F3.sites",{"title":299,"path":300,"stem":301},"Custom Domains","\u002Fdocs\u002Fgetting-started\u002Fcustom-domains","docs\u002F1.getting-started\u002F4.custom-domains",{"title":303,"path":304,"stem":305},"Support","\u002Fdocs\u002Fgetting-started\u002Fsupport","docs\u002F1.getting-started\u002F5.support",{"title":307,"path":308,"stem":309,"children":310,"page":-1,"icon":312},"Integrations","\u002Fdocs\u002Fintegrations","docs\u002F2.integrations\u002Findex",[311,313],{"title":307,"path":308,"stem":309,"icon":312},"ph:usb-bold",{"title":314,"path":315,"stem":316,"icon":317},"n8n","\u002Fdocs\u002Fintegrations\u002Fn8n","docs\u002F2.integrations\u002F1.n8n","simple-icons:n8n",{"title":319,"path":320,"stem":321,"children":322,"page":-1,"icon":324},"MCP","\u002Fdocs\u002Fmcp","docs\u002F3.mcp\u002Findex",[323,325,329,333,337,341,345,349],{"title":319,"path":320,"stem":321,"icon":324},"solar:plug-circle-bold",{"title":326,"path":327,"stem":328},"Quick start","\u002Fdocs\u002Fmcp\u002Fquick-start","docs\u002F3.mcp\u002F1.quick-start",{"title":330,"path":331,"stem":332},"Clients","\u002Fdocs\u002Fmcp\u002Fclients","docs\u002F3.mcp\u002F2.clients",{"title":334,"path":335,"stem":336},"Authentication","\u002Fdocs\u002Fmcp\u002Fauthentication","docs\u002F3.mcp\u002F3.authentication",{"title":338,"path":339,"stem":340},"Tools","\u002Fdocs\u002Fmcp\u002Ftools","docs\u002F3.mcp\u002F4.tools",{"title":342,"path":343,"stem":344},"Recipes","\u002Fdocs\u002Fmcp\u002Frecipes","docs\u002F3.mcp\u002F5.recipes",{"title":346,"path":347,"stem":348},"Limits and errors","\u002Fdocs\u002Fmcp\u002Flimits-and-errors","docs\u002F3.mcp\u002F6.limits-and-errors",{"title":350,"path":351,"stem":352},"FAQ","\u002Fdocs\u002Fmcp\u002Ffaq","docs\u002F3.mcp\u002F7.faq",{"title":354,"path":355,"stem":356,"children":357,"page":-1,"icon":359},"Site kit","\u002Fdocs\u002Fsite-kit","docs\u002F4.site-kit\u002Findex",[358,360,364,368,372,376,380,383,387,388,392,396],{"title":354,"path":355,"stem":356,"icon":359},"solar:layers-bold",{"title":361,"path":362,"stem":363},"Overview","\u002Fdocs\u002Fsite-kit\u002Foverview","docs\u002F4.site-kit\u002F01.overview",{"title":365,"path":366,"stem":367},"Start a site","\u002Fdocs\u002Fsite-kit\u002Fstart-a-site","docs\u002F4.site-kit\u002F02.start-a-site",{"title":369,"path":370,"stem":371},"Content","\u002Fdocs\u002Fsite-kit\u002Fcontent","docs\u002F4.site-kit\u002F03.content",{"title":373,"path":374,"stem":375},"Design","\u002Fdocs\u002Fsite-kit\u002Fdesign","docs\u002F4.site-kit\u002F04.design",{"title":377,"path":378,"stem":379},"Languages","\u002Fdocs\u002Fsite-kit\u002Flanguages","docs\u002F4.site-kit\u002F05.languages",{"title":381,"path":231,"stem":382},"Deploy with Hostsmith","docs\u002F4.site-kit\u002F06.deploy",{"title":384,"path":385,"stem":386},"Keep old URLs","\u002Fdocs\u002Fsite-kit\u002Fold-urls","docs\u002F4.site-kit\u002F07.old-urls",{"title":5,"path":269,"stem":271},{"title":389,"path":390,"stem":391},"Kit updates","\u002Fdocs\u002Fsite-kit\u002Fupdates","docs\u002F4.site-kit\u002F09.updates",{"title":393,"path":394,"stem":395},"Existing Astro sites","\u002Fdocs\u002Fsite-kit\u002Fexisting-astro-sites","docs\u002F4.site-kit\u002F10.existing-astro-sites",{"title":397,"path":398,"stem":399},"External CMS","\u002Fdocs\u002Fsite-kit\u002Fexternal-cms","docs\u002F4.site-kit\u002F11.external-cms",{"title":401,"path":402,"stem":403,"children":404,"page":-1,"icon":406},"Developers","\u002Fdocs\u002Fdevelopers","docs\u002F5.developers\u002Findex",[405,407,410,414],{"title":401,"path":402,"stem":403,"icon":406},"solar:code-bold",{"title":334,"path":408,"stem":409},"\u002Fdocs\u002Fdevelopers\u002Fauthentication","docs\u002F5.developers\u002F1.authentication",{"title":411,"path":412,"stem":413},"API Explorer","\u002Fdocs\u002Fdevelopers\u002Fapi-explorer","docs\u002F5.developers\u002F2.api-explorer",{"title":415,"path":416,"stem":417},"Node.js SDK","\u002Fdocs\u002Fdevelopers\u002Fsdk","docs\u002F5.developers\u002F3.sdk",false,[420,421],{"title":384,"path":385,"stem":386,"children":-1},{"title":389,"path":390,"stem":391,"children":-1},1792842401969]