Prompts for having an AI agent build, clone or edit a website on the CMS. Answer a few questions, one step at a time, and the builder assembles a complete prompt with everything the agent needs to know: how to use the API, how the CMS builds pages, and the coding conventions to follow.
Prompt modules
The building blocks the builder combines, in order. A complete prompt includes every module whose "Use when" applies, with placeholders replaced:
{{CREDENTIALS}}
- Where the agent finds the API credentials, usually
credentials.json.
{{SOURCE_URLS}}
- For a clone: the address of each site to recreate.
{{SCOPE}}
- For a clone: the whole site, or a list of pages.
{{LOOK_URL}}
- For a look-alike: the site whose look to share.
{{BRIEF}}
- For a new site: what it is for, and what it should contain.
{{RESTYLE_BRIEF}}
- For a redesign: what the new look should be like.
{{REDESIGN_PAGES}}
- Which pages to redesign, and how.
{{NEW_PAGES}}
- The pages to add.
{{REWRITE}}
- Which text to rewrite, and what it should do better.
{{IMAGE_CHANGES}}
- Which images were converted, cropped or resized, and how.
{{FORM_DETAILS}}
- Which form, on which page, and what it should ask.
{{OTHER}}
- Any other change to an existing site.
{{DESIGN_COUNT}}
- How many design concepts to show, from 2 to 5.
{{DESIGN_KINDS}}
- When there is an existing look, which directions the concepts should cover, such as keeping it, refreshing it, or something new. Leave the line out if you have no preference.
{{DESIGN_DIRECTION}}
- For a single design: the one direction to follow.
{{EXTRA}}
- Any additional instructions.
Task: build a new site
Use when: building a new site.
Build a new website on my CMS.
What the site is for, and what it should contain:
{{BRIEF}}
You have latitude on structure, design and wording.
Task: clone an existing site
Use when: cloning an existing site.
Recreate the existing website below on my CMS:
{{SOURCE_URLS}}
Scope: {{SCOPE}}
The directions that follow were written generically for building sites on this CMS, so some of them may not apply to this particular source site.
Task: new site with the look of an existing site
Use when: building a new site that shares the look of an existing site.
Build a new website on my CMS that shares the look and feel of this existing site:
{{LOOK_URL}}
Match its visual language: color palette, typography, spacing, header and footer structure, button and link styles, imagery style and layout patterns. Do not copy its text. The new site's content is:
{{BRIEF}}
Reuse logos, photos or other images from that site only if I confirm they belong to the same organization. Otherwise leave clearly named placeholder files in images/ and list them for me.
Task: change a site already in the CMS
Use when: changing a site already in the CMS.
Work on the site that already exists in my CMS. The jobs I want done follow below.
Before changing anything, read what exists: list the pages, headers, footers, CSS, JS, forms, error pages and redirects, and read the content of every object you will touch. Follow the conventions already in use (naming, class structure, CSS organization) unless I ask you to change them. Never delete or rename an existing object without asking me first. Renaming a page adds a redirect from its old path automatically. Change only what the jobs need.
Job: redesign the whole site
Use when: redesigning a whole site already in the CMS.
## Job: redesign the whole site
Give the whole site a new look, keeping its content. What the new look should be:
{{RESTYLE_BRIEF}}
Keep every page's text, page name (URL), title, description and keywords as they are. Change the CSS, and the markup of headers, footers and pages only where the new design needs it, and include the error pages and form response pages. List any content you think should change, and ask me before changing it.
Job: redesign some pages
Use when: redesigning some pages of a site already in the CMS.
## Job: redesign some pages
Redesign these pages, keeping their content:
{{REDESIGN_PAGES}}
Keep each page's text, page name (URL), title, description and keywords unless I said otherwise. The rest of the site must look exactly as before: put styles for these pages in their own CSS file, attached only to them, rather than changing the shared CSS, unless a shared rule is clearly at fault. Ask me before changing the shared header or footer.
Job: add new pages
Use when: adding pages to a site already in the CMS.
## Job: add new pages
Add these pages to the site:
{{NEW_PAGES}}
First propose each page's name (which controls its URL), title, H1, outline, and where it belongs in the navigation (if anywhere), and wait for my approval. Then create each page with its final properties, reusing the site's header, footer, CSS and markup patterns so it fits in, and add CSS only where the existing files cannot style it. Link to the new pages from the navigation and from related pages where they belong, and ask me if unsure.
Job: rewrite or improve text
Use when: rewriting or improving text.
## Job: rewrite or improve text
Rewrite or improve the text described here:
{{REWRITE}}
Keep every fact exactly as it is: names, prices, dates, addresses, phone numbers and claims. Never invent facts; mark anything missing as [NEEDED: ...]. Keep the page's HTML structure, classes, links and images, so its design and links still work, and keep the heading order. For each page, show me the current and proposed text side by side, and wait for my approval before saving. Update the page's title and description too if the text's focus changes, and show those changes as well.
Job: update the site after converting or resizing images
Use when: updating a site after converting or resizing images.
## Job: update the site after converting or resizing images
I converted, cropped or resized images in the CMS's File Management. What I did:
{{IMAGE_CHANGES}}
1. Read every page, header, footer, error page, form response page and CSS file, and list every image they use: src and srcset attributes, links to images, and url() in CSS.
2. Work out the new address of every image my changes affect. Check that each new file exists with an HTTP HEAD request to the site; uploaded files are live at once, without publishing. Then download each one with GET and read its real width and height from the file itself.
3. Change each reference to the new address. Set the width and height attributes of each <img> to the file's real size, or to the same proportions where the page shows it smaller. Check the CSS that styles these images or their containers for fixed widths, heights or aspect-ratio values that no longer match, and adjust them so nothing is stretched, squashed or cut off.
4. If a file I said I converted does not exist under its new name, leave its references unchanged, and tell me which file is missing and the address you checked.
5. Change nothing else. Finish with a list of every change you made, the files that were missing, and the old files that still exist (check them with HEAD too), which I can delete once the changes are published.
Job: add or change a form
Use when: adding or changing a form.
## Job: add or change a form
What I want:
{{FORM_DETAILS}}
For a form that already exists, read its options and schema before changing it, and keep every field's key, since existing submissions are already stored with them. For a new form, ask me which fields I want and which address should be notified, if I have not said. Place a form on a page by its numeric id, in the spot I asked for, and style it to match the CSS that page already uses.
Job: fix broken links
Use when: fixing broken links.
## Job: fix broken links
Run the links_broken action. For each broken internal link, find the correct target (list the pages to see what exists), read the content of the page, header, footer, form response page or error page that contains it, and fix only the broken href. If the right target is unclear, ask me. Finish with a list of every change, then run links_broken again to confirm it is clean.
Job: improve titles, descriptions and search
Use when: improving titles, descriptions and search.
## Job: improve titles, descriptions and search
Read every page with its name, title, description, keywords and content. For each page, identify the search phrase it should rank for, and check its title (about 50 to 60 characters), description (about 140 to 160 characters) and keywords, whether the phrase appears in the title, H1, first paragraph, description and an H2, its headings, internal links and their anchor text, image file names and alt text, its JSON-LD, and whether another page competes for the same phrase. Treat the lengths as guidelines, not reasons to cut meaning. Show me a table of findings and proposed changes per page, and wait for my approval. Apply approved property changes with page_save, sending back every other property unchanged. Do not rename any page without my explicit approval; renaming one adds a redirect from its old path automatically.
Job: check accessibility
Use when: checking accessibility.
## Job: check accessibility
Read every page, header, footer, error page and CSS file. Check each page against WCAG 2.2 AA: one <h1> and headings in order without skipped levels, landmarks, alt text, descriptive link text, form labels, color contrast in every color scheme, visible focus, keyboard access to the menu, and reduced-motion handling. Report the problems by page and severity, propose fixes, and wait for my approval before changing anything.
Job: add site search
Use when: adding site search to an existing site.
## Job: add site search
Add the CMS's site search to the site, as described under Site search below, in the shared header, styled to fit the existing design.
Job: improve the error pages
Use when: improving the error pages of an existing site.
## Job: improve the error pages
Improve the site's error pages, as described under Error pages below, so they match the rest of the site.
Job: other changes
Use when: other changes to a site already in the CMS.
## Job: other changes
{{OTHER}}
Plan before building
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site.
## Plan before building
Before writing any pages, produce a site plan and wait for my approval:
- The site architecture: every page with its CMS page name (and so its URL), title, and place in the navigation.
- For each page, a short brief: its audience, its purpose (what a visitor arriving there is looking for), its primary search phrase and a few supporting terms, its page name, its H1, its planned H2/H3 outline, its main call to action if it has one, and the internal links it should carry.
- The visual direction: colors, fonts, layout, and the header and footer structure.
- For a clone, the mapping of every source URL to its new page name, and the improvements you intend to make.
Keep the plan proportionate: a few lines per page is enough.
Design concepts to choose from
Use when: you want several designs to choose from.
## Design concepts to choose from
Before building the site, or the new pages, show me {{DESIGN_COUNT}} different design concepts and let me choose. When there is a site plan, get it approved first; the concepts then take the place of its single visual direction.
{{DESIGN_KINDS}}
- Build each concept locally as static HTML and CSS, following the conventions in these directions: the home page, or the most representative page when working on existing pages, and one typical inner page. Use the real content, never placeholder text.
- Within any directions above, make the concepts clearly different from one another in color palette, typography, layout, and header and navigation, rather than small variations on one idea, and make each one fit the site's purpose, audience and content.
- Render each concept in a headless browser at desktop and phone widths, and show me the screenshots side by side, with the local file paths so I can open them myself. Label the concepts A, B, C and so on, and describe each in a few lines: its mood, palette (with hex values), fonts and layout.
- Do not upload any concept to the CMS. Wait for my choice, then build only the design I pick.
- If I asked for a plan only, describe each concept in words instead of building it, and stop there.
Mixing and matching designs
Use when: you want to mix and match parts of different designs.
## Mixing and matching designs
I may want to combine parts of different concepts, such as the palette of one with the header of another.
- Build every concept from the same named parts: color palette, typography, header and navigation, page layout (the opening section and the sections below it), and components such as buttons, cards and forms. Refer to each part by its concept's letter, such as "A palette" or "B header".
- Organize each concept's CSS by those parts, so they can be combined cleanly.
- When I name a combination, build it as one more concept and show me its screenshots. Build the site only once I approve it.
Design direction
Use when: you chose one design direction.
## Design direction
{{DESIGN_DIRECTION}}
The CMS API
Use when: every prompt.
## The CMS and its API
The CMS API is documented at https://cmsdocs.cirqlive.com/api/. Before making any request, read the API reference (https://cmsdocs.cirqlive.com/api/reference.html) and the site building guide (https://cmsdocs.cirqlive.com/api/site-building.html) in full. My API credentials are in {{CREDENTIALS}}. Never print, log or copy the private key anywhere.
The site's address is https:// followed by the domain in {{CREDENTIALS}}, and every request goes there. Before anything else, read that domain, show me the full address, and wait for me to confirm it is the site I mean. A credentials file from another site would send all the work to the wrong place.
Key facts:
- Every request carries a single parameter, `token`: a JWT you sign yourself with EdDSA (Ed25519). Its claims are aud = the credentials' domain, sub = its user, iat, and an exp about 60 seconds ahead. Mint a fresh token for every request.
- The command goes in the `action` claim, and all of its parameters go, URL-encoded, in the `query` claim. Never put parameters in the URL or body directly.
- Use GET for read actions and POST (form-encoded body) for write actions. The id of a newly created object is in the X-ID response header.
- Objects and their content are separate: create an object with /cms/api/cms, then write its HTML, CSS or JS with /cms/api/content. Pass contentId=0 for a new object.
- contentId protects other people's work, so it must be the id of the version your new content is based on: the id from the read your change started from, or the X-ID of your own last write to that object. Never read an object just to get its current id and then write over it: that silently discards anything someone else saved in between. Upload only the objects you changed, never the whole site again.
- A 409 means someone saved after your read. Read the new version, merge your change into it while keeping theirs, and only then write, with the new id. If the two conflict, show me both and ask. If the message says another save occurred at the same moment, wait a second, then read and write again.
- A content read takes an optional version (an id from the object's *-history action) to return an earlier revision. If you overwrite someone's work by mistake, read their revision that way, tell me, and restore it as described in the API reference.
- page_new and page_save need every key present, even the empty ones. page_save has no version check, so it can undo someone else's change to a page's title, description or other properties. Use page_save only when changing a page's properties, and write content only when changing its content: never re-send one because you changed the other. Just before each page_save, read that page with the pages action and its id, and send back the properties you aren't updating exactly as that read returned them.
- If your Ed25519 library rejects the key (for example with "DECODER routines::unsupported"), extract the 32-byte seed that follows the bytes 04 22 04 20 in the key's DER and sign with that, as the reference's working clients do.
- If the jwtsign command is available (it may be in this folder as jwtsign or jwtsign.exe), you may use it to sign tokens instead (see the API reference §7.1): jwtsign --credentials {{CREDENTIALS}} --claim action=... --query name=value. It takes aud, sub and the key from the credentials file, adds iat itself, and URL-encodes --query values; --claim values are passed through as given.
- The CMS re-indents saved HTML and lowercases attribute names. CSS and JS are stored exactly as sent.
How the CMS builds pages
Use when: every prompt.
## How the CMS builds pages
My CMS serves XHTML5 pages assembled from components. The overall anatomy of a page is:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title</title>
<link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="Description" />
<meta name="keywords" content="Keywords" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<header></header>
<main></main>
<footer></footer>
</body>
</html>
- A header object contains the HTML elements that end up inside <header>, a footer object those inside <footer>, and a page those inside <main>. Never include the <header>, <footer> or <main> tags themselves, only their children. The CMS adds the wrapping tag.
- A page's properties are its title, description and keywords; which existing header and footer it uses, if any; which CSS and JS files it links (several of each is fine); and whether the CMS generates a table of contents and footnotes for it.
- Create the headers, footers, CSS and JS before any pages, so pages are created with their final properties and never need updating later.
- Page names map to URLs: "index" is published as /, "about" as /about.html, "animal/index" as /animal/, and "animal/cow" as /animal/cow.html.
- Links within the site are root-relative: they begin with a slash (/) and end with .html, or with / for an index page.
- Links to other sites get target="_blank" and a rel attribute. Use rel="noopener" for the client's own external presence (their social profiles, their partner marketplace listings), and rel="noopener noreferrer" for genuine third-party content.
Organizing CSS
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or redesigning a whole site already in the CMS, or redesigning some pages of a site already in the CMS, or adding pages to a site already in the CMS, or adding or changing a form, or adding site search to an existing site, or improving the error pages of an existing site, or other changes to a site already in the CMS.
## Organizing CSS and JS files
- Usually a site has a single header and footer that are always used together. Then make one CSS file named "nav" that styles them and the base typography, and link it from every page that uses them.
- If there are several header and footer combinations, make CSS for each header and each footer instead, and link the relevant files from each page.
- If several pages share the same CSS for their main content, make a shared CSS file named "pages". If there are many kinds of page groups, give each group its own clearly named CSS file.
- The home page usually has CSS unique to it, named "home" or "front". If many pages have their own CSS files, use a clear, consistent naming scheme.
- When a page links several JS files, they load in alphabetical order of name.
Writing HTML
Use when: every prompt.
## Writing HTML
- Keep the HTML simple and clean, and structure it with semantic HTML. Use modern elements where appropriate (header, nav, section, article, aside, figure, details, time and so on) instead of older hacks such as layout tables or spacer images.
- Give every page exactly one <h1>, and keep heading levels in order: an <h3> always sits under an <h2>, an <h4> under an <h3>, and so on, without skipping a level. Choose a heading level for its place in the outline, never for its size; size headings in CSS, and never use a heading just to make text big or bold. (The CMS's table of contents is built from these headings, so a broken outline shows there too.)
- Use lists, tables, definition lists, figures and other semantic elements wherever they make content easier to understand, and use tables only for tabular data, never for layout.
- Prefer a single class on a section, and style its children in CSS through the HTML hierarchy rather than putting a class on each element. That makes it easy to "promote" a section to a new class later.
- People may later edit the HTML in CKEditor 5, which normalizes it: it re-wraps some elements in <p> tags and may delete empty elements. Be careful with sibling selectors and hierarchical relationships, and never leave something like an <input> floating on its own. If an element must exist but stay empty for CSS or JS to use, put inside it.
- When a person later edits a page in the admin UI, the editor strips the attributes data-end, data-index-in-node, data-list-item-id, data-number, data-path-to-node, data-pm-slice, data-start and data-tight. Do not use those names for your own data attributes.
- Never put CSS or JS into the HTML itself (no <style>, <script>, or on...="" attributes). It is either stripped or blocked by the Content Security Policy. The only exception is JSON-LD structured data in <script type="application/ld+json">.
- Inline SVG is fine for a graphic used on one page. The CMS stores SVG names in lowercase (viewbox), which browsers correct automatically. An SVG reused across pages, such as an icon in a shared header or a repeated decoration, belongs in the CSS instead.
- For videos from DailyMotion, Rumble, Vimeo and YouTube, use the CMS's oEmbed support, <oembed url="https://..." />, rather than any other technique.
- Other embeds will not work: the site's Content Security Policy only allows frames from those video providers, so maps, social media widgets and third-party booking or chat widgets are blocked. Link to them instead (for a map, a link to the address on a map service).
Writing CSS
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or redesigning a whole site already in the CMS, or redesigning some pages of a site already in the CMS, or adding pages to a site already in the CMS, or adding or changing a form, or adding site search to an existing site, or improving the error pages of an existing site, or other changes to a site already in the CMS.
## Writing CSS
- Use rem for all sizing, and set a base font-size on the html and body selectors in a CSS file every page links (normally "nav").
- Format CSS like this:
@media screen and (min-width: 0px) and (max-width: 62.4375rem)
{
html, body { font-size: 17px; }
body:has(#pad-menu-toggle:checked) { overflow: hidden; }
body > header > nav > ul > li:last-child { border-bottom: none; }
/* Staggered fade-in for each open-menu item */
body > header > nav:has(#pad-menu-toggle:checked) > ul > li
{
animation: nav-item-in 0.35s ease both;
overflow-y: auto;
}
}
- Do effects and animations in CSS rather than JavaScript whenever possible. Keep motion purposeful and subtle, and turn it off under @media (prefers-reduced-motion: reduce).
- Put SVGs into CSS as background-image or mask-image URLs. Keep those URLs minimal: they do not need base64 encoding, and most characters need no escaping (# must be written as %23).
- Do not add -webkit- or other vendor-prefixed CSS for very old browsers.
- People add pictures in the admin's CKEditor 5, so style the markup it produces in the site's main CSS, even if your own pages do not use it: <figure class="image"> containing an <img> and an optional <figcaption>; the placement classes image-style-align-left and image-style-align-right (text wraps around the picture), image-style-block-align-left, image-style-block-align-right and image-style-align-center (on its own line), and image-style-side; and inline images, which are an <img> inside a <p>. Give every image max-width: 100% and height: auto, float the wrapped ones with a margin, and stop floating them on narrow screens.
- For fonts, use a standard stack or one of the CMS's built-in fonts: any family listed in the site's /js/fonts.json (feel free to download it). Name the family in font-family; the CMS loads built-in fonts itself, so add no @font-face rules or imports.
Responsive design
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or redesigning a whole site already in the CMS, or redesigning some pages of a site already in the CMS, or adding pages to a site already in the CMS, or adding or changing a form, or adding site search to an existing site, or improving the error pages of an existing site, or other changes to a site already in the CMS.
## Responsive design
- Make sure the HTML and CSS look good on a variety of screen sizes: small phones, small tablets, large tablets, typical desktops and very large screens.
- When the screen is too narrow for the header menu, hide it and show a three-line menu button instead. A CSS-only toggle does not require JavaScript: a checkbox with an id such as "pad-menu-toggle" inside the header's nav can be read with :has().
- If the header has a logo, make it a link to /, and do not put "Home" in the header menu for larger screens. Do include "Home" in the menu that opens on smaller screens.
Accessibility
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or redesigning a whole site already in the CMS, or redesigning some pages of a site already in the CMS, or adding pages to a site already in the CMS, or adding or changing a form, or adding site search to an existing site, or improving the error pages of an existing site, or other changes to a site already in the CMS, or checking accessibility, or rewriting or improving text, or updating a site after converting or resizing images.
## Accessibility
Target WCAG 2.2 Level AA. In particular:
- Everything works with a keyboard alone, in a logical tab order that follows the reading order, with a clearly visible focus indicator.
- Landmarks are correct: one header, nav, main and footer, and an aria-label on each nav when there is more than one.
- Text and interface elements have sufficient contrast (4.5:1 for body text, 3:1 for large text and for controls), in every color scheme the site supports.
- Link text says where the link goes; avoid bare "click here" or "read more" unless the surrounding context makes it clear.
- Every meaningful image has alt text describing what it conveys; purely decorative images have alt="".
- Interactive things are real controls: <a> for navigation, <button> for actions. The mobile menu and any dialog are operable by keyboard and screen reader (the checkbox menu toggle has an accessible label, and Escape closes what it can). Do not use <a href="#">: it does not behave well, and people who try to open such a link in a new tab or window get unexpected behavior. Prefer buttons.
- Pages stay usable at 200% zoom and at 320 CSS pixels wide, without horizontal scrolling of the page.
Metadata and search engines
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or adding pages to a site already in the CMS, or rewriting or improving text, or improving titles, descriptions and search.
## Metadata and search engines
- Every page gets its own title, description and keywords, written for that page. Never reuse or duplicate them across pages, and never leave a generic placeholder.
- Titles say what the page is and whose site it is. Aim for about 50 to 60 characters.
- Descriptions summarize what a visitor gets from the page. Aim for about 140 to 160 characters.
- Treat those lengths as guidelines: do not cut meaning to hit them.
- The CMS generates <head> itself, so you cannot add other meta tags, canonical links or social preview tags. Put your effort into the title, description, keywords and the page content.
- Describe each page's content with JSON-LD structured data as set out under "Structured data (JSON-LD)".
Search engine optimization
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or adding pages to a site already in the CMS, or rewriting or improving text, or improving titles, descriptions and search.
## Search engine optimization
Every page should be easy for search engines to understand and rank for what it is about, without compromising how it reads to people.
- Give each page one primary search phrase: the words its intended visitors would actually type into a search engine to find it (for example "roof repair austin", not "our solutions"). Add a few supporting terms and natural variations. No two pages should target the same phrase; if two pages compete for one, merge them or change one's focus.
- Choose page names (the URL) with care. Use short, lowercase words separated by hyphens that contain the primary phrase and describe the page: "services/roof-repair", not "services/page2", "services/roof_repair" or "services/our-amazing-roof-repair-services". Use folders to reflect the site's structure, and avoid ids, dates and filler words unless they carry meaning.
- Treat a page name as permanent. A page that ranks loses its standing when its URL changes. On a site that already exists, never rename a page just for SEO without asking me. When a name does change, the CMS adds a redirect from the old path automatically.
- Put the important words high up. The primary phrase belongs in:
- the title, near its start, with the brand at the end ("Roof Repair in Austin | Smith Roofing");
- the H1;
- the first paragraph, within roughly the first hundred words;
- the description;
- at least one H2, where it reads naturally.
- Open each page with what it is about and the key facts a visitor came for, not with a long introduction or a hero section of slogans alone. Content near the top carries the most weight with search engines and with readers.
- Write headings that describe their section in the words people search with.
- Cover the topic thoroughly enough to answer the visitor's question. Merge thin pages that say little on their own.
- Link related pages to each other with descriptive anchor text that names the destination's topic ("our roof inspection service", not "click here"). Link important pages from the navigation or the home page. No page should be reachable only through search or the sitemap.
- Name image files descriptively ("roof-repair-crew-austin.jpg", not "IMG_0423.jpg"). Give them honest alt text. Keep them compressed and no larger than they are displayed, and give <img> width and height attributes so the layout does not jump while loading.
- For a business serving a particular area, name the place naturally in the titles, H1s and copy of the pages where it matters, alongside consistent contact details.
- Use the keywords property for a short, honest list of the page's main terms, but expect little from it: search engines rank on the title, the URL, headings and content.
- Never hide text, stuff keywords into copy, alt text or headings, or write for a search engine at the expense of the reader.
Structured data (JSON-LD)
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or adding pages to a site already in the CMS, or improving titles, descriptions and search.
## Structured data (JSON-LD)
Give pages schema.org structured data so search engines and AI assistants can identify the site, its owner and what each page is about.
- Write it as JSON-LD: a <script type="application/ld+json"> block in the page content. The CMS publishes it as valid JSON, and the admin editor keeps it. Prefer one block per page, using "@graph" to group several items.
- Choose types to fit the content:
- Home page: WebSite (name, url) and the owner, as Organization or the most specific LocalBusiness subtype that fits (Restaurant, Dentist, LegalService and so on). Include name, url, logo, description, contact details, and "sameAs" with the owner's official profiles elsewhere.
- A place customers visit: address (PostalAddress), telephone, openingHoursSpecification, and priceRange or areaServed where they apply.
- Services: Service, with provider and areaServed.
- Articles, news and blog posts: Article or BlogPosting, with headline, description, datePublished, dateModified, author and image.
- Products: Product, with offers (price, priceCurrency, availability) only where the price is shown on the page.
- Events: Event, with startDate, location and offers.
- Team and about pages: Person, for the people the page presents.
- Any page below the top level: BreadcrumbList, matching the site's hierarchy (Home > Section > Page).
- Every other page: WebPage, or a more specific type such as AboutPage, ContactPage or CollectionPage.
- Give the site's main entities a stable "@id" on the home page, such as "https://example.com/#organization" and "https://example.com/#website", and refer to them from other pages ("publisher": {"@id": "https://example.com/#organization"}) instead of repeating their details.
- Use absolute https URLs on the site's own domain, ISO 8601 dates (2026-11-15), and E.164 phone numbers (+15555550100).
- Describe only what the page visibly shows, with exactly the same names, prices, hours and details. Never add ratings, reviews or a FAQPage unless that content genuinely appears on the page, and never invent values to fill in a property.
- Inside JSON strings, write </ as <\/ so a string can never end the script early.
- Check every block locally by parsing it as JSON, and confirm its types and required properties against schema.org before uploading.
Writing JavaScript
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or redesigning a whole site already in the CMS, or redesigning some pages of a site already in the CMS, or adding pages to a site already in the CMS, or adding or changing a form, or adding site search to an existing site, or improving the error pages of an existing site, or other changes to a site already in the CMS.
## Writing JavaScript
Keep JavaScript minimal. When you write it, follow this house style exactly:
- Never use the "continue" keyword. Restructure the loop body with if/else instead.
- Avoid early returns and guard clauses. Do not handle the least common case first. Handle the most common case first in the "if", and let exceptional cases (typically a throw) fall into the "else" blocks below it. This is the inverse of the usual guard-clause idiom; do not "fix" it. A pile of else { throw ... } blocks together at the bottom of a function is ideal, because it makes every odd case visible at a glance.
- Deep nesting and arrow-shaped code are explicitly fine. Do not flatten them or complain about them.
- Single-line conditional and loop bodies still have braces.
- The opening brace goes on the line after the if/else/for. Exception: a single short statement may be written inline, with the closing brace on the same line. "else" starts on a new line.
- Use two spaces for indentation.
Writing content
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or adding pages to a site already in the CMS, or rewriting or improving text.
## Writing content
Write for people first. Content that is clear to people is also what search engines and AI assistants understand best.
- Make the essentials easy to find: who the site belongs to, what they offer, who it is for, and how to take the next step.
- Organize each page into focused sections with descriptive headings. Each section should make sense on its own while keeping enough context. Use a question as a heading only when it is a question real visitors ask.
- Use plain language and accurate terminology, and explain unfamiliar terms the first time they appear.
- Keep names and facts consistent everywhere: the organization's name, people's names and roles, service names, places, contact details and links to external profiles.
- Never invent facts. That includes testimonials, reviews, client names, statistics, credentials, awards, prices and sources. Where content I have not provided is needed, write a clearly marked placeholder such as [TESTIMONIAL NEEDED], and list every placeholder in your final report.
- No keyword stuffing, no filler, and no artificial question-and-answer sections written to attract search engines or AI assistants.
Images, documents and media
Use when: building a new site, or cloning an existing site, or building a new site that shares the look of an existing site, or redesigning a whole site already in the CMS, or redesigning some pages of a site already in the CMS, or adding pages to a site already in the CMS, or updating a site after converting or resizing images.
## Images, documents and media
I upload asset files to the CMS myself. Place them in local folders that mirror their public paths. File names on the CMS are case-sensitive, and subdirectories are fine in every folder.
- Images: the local images/ folder is an exact copy of the CMS's /images/ folder, and I upload its contents as they are, subfolders included. A page that uses /images/team/anna.webp needs the file at images/team/anna.webp, not images/anna.webp. A file anywhere else shows as broken.
- Name each image subfolder for what its images show, or for the part of the site that uses them, such as images/team/, images/products/ or images/about/. Don't create a folder for the job itself, such as a redesign, design concepts or a comparison of them: the folder stays on the site after the job is done. Don't put every image into one folder named for the site or organization either: /images/ already contains only this site's images, so that adds a level without providing any benefit.
- When you show design concepts, give every image the name and folder it will have on the finished site.
- Prepare images for the web before I upload them: crop them to the shape the layout uses, make them no larger than they are displayed (about 2000 pixels wide at most for full-width images, 1200 to 1600 for images in the text), save photos as WebP, and keep PNG or lossless WebP for logos and graphics with sharp edges or transparency.
- Favicon: images/favicon.ico, published as /images/favicon.ico. It must be a proper .ico file, not a renamed PNG. If you cannot make one, give me a square PNG or SVG of the logo, and I will convert it to ICO with the admin's image tools (https://cmsdocs.cirqlive.com/ui/favicon.html). The CMS also serves it at /favicon.ico, so pages need no <link rel="icon">.
- Uploaded files go live at once, without publishing, while page changes wait for publishing. If a file replaces one with a different name, tell me, so I delete the old file only after the pages that use the new name are published.
- Documents such as PDFs: the CMS serves them under /docs/. Put them in a local docs/ directory and link to them there. Follow the same rules for subfolders as with images.
- Audio and video: the CMS serves them under /audio/ and /video/. Put them in local audio/ and video/ directories, and embed them with oEmbed using the root-relative path, for example <oembed url="/video/intro.mp4" />. Follow the same rules for subfolders as with images.
Before you report, check every /images/, /docs/, /audio/ and /video/ address in every page, header, footer and CSS file: each needs a local file at the same path (/images/team/anna.webp at images/team/anna.webp). Fix any that don't match.
Every report you give me ends with a section titled "Files to upload". It lists each file, its local path and the CMS folder it goes in, for example "Upload the contents of images/ to Images (/images/) in File Management, including the subfolders". This applies to follow-up requests too: whenever you add, replace or rename a file, list it in that reply. If there are none, say "No files to upload." (File Management is described at https://cmsdocs.cirqlive.com/ui/files.html.)
Business or organization site
Use when: the site is for a business or organization.
## Business or organization site
- In the site plan, also define: the primary and secondary audiences; the value proposition and what sets the organization apart; the main action each page leads to (call, book, request a quote, buy, sign up), so every page has a clear next step; the trust evidence available (case studies, project examples, credentials, memberships, genuine reviews); and the voice and tone.
- If I ask for a small business site and give no structure, use Home, About, Services, Work (or Case studies) and Contact.
- If the site needs legal or policy pages (a privacy policy when a form collects personal data, terms, accessibility statement, cookie notice), add them as extra utility pages linked from the footer. Never replace a requested page with one. Do not write legal text yourself: create the page with a clearly marked placeholder for me to fill in, unless I provide the text.
- Show contact details (name, address, phone, email, opening hours) identically everywhere they appear. Describe them with schema.org structured data (Organization, or LocalBusiness for a place customers visit), keeping it identical to the visible details.
- Ask me for anything the site needs that you cannot find, such as services, prices, service area, team members, credentials and case studies, rather than inventing it.
Sections with many pages
Use when: the site has sections with many similar pages (blog, articles, products, case studies).
## Sections with many pages
For a blog, news, articles, products, case studies or any other section with many similar pages:
- Give the section a folder name: its landing page is "section/index" (published as /section/) and each entry is "section/entry-name" (published as /section/entry-name.html).
- Use one consistent page structure per section, and one shared CSS file for it. Build the first entry fully, then create the others from it with page_duplicate.
- The section's index page lists its entries. When you add an entry, update the index (and any "latest" lists elsewhere) in the same pass.
- Put dates in <time datetime="YYYY-MM-DD">, and link each entry back to its section and to related entries.
Site search
Use when: the site should have search, or adding site search to an existing site.
## Site search
The CMS has a built-in search engine. Add an element with the id cms-search-button, usually in the shared header, for example <div id="cms-search-button"> </div>. Set it to display: none in CSS; the JavaScript the CMS injects into each page reveals it when search is available. Style it as a clear search button (an SVG magnifying glass via mask-image works well). Results appear in a dialog with the id cms-search-dialog, using an iframe with the id cms-search-frame; style those too.
Tables of contents and footnotes
Use when: the site has long, structured pages (tables of contents, footnotes).
## Tables of contents and footnotes
- The CMS can generate a table of contents for a page from its <h2> to <h6> headings (the page's generate_toc property). It places it in an element with the id cms-table-of-contents, after the first <h1> or otherwise at the top of the page. Enable it when there is enough structured content to warrant it, but not on sectioned landing pages where a TOC would look odd, and give those pages CSS for it. Its markup looks like:
<div id="cms-table-of-contents">
<details>
<summary>Table of Contents</summary>
<ul>
<li><a href="#cms-heading-introduction">Introduction</a></li>
<li>
<a href="#cms-heading-whyavoid">Why Avoid</a>
<ul>
<li><a href="#cms-heading-harmfulpractices">Harmful Practices</a></li>
</ul>
</li>
</ul>
</details>
</div>
- Heading ids: a heading that already has an id keeps it, and the table of contents links to that id. Other headings get a generated id while generate_toc is on: "cms-heading-" followed by the heading text in lowercase, with everything except letters, digits, underscores and hyphens removed ("7.5 End-to-end: publishing a page" becomes cms-heading-75end-to-endpublishingapage; accented letters are dropped, so "Café" becomes cms-heading-caf). If that id is already used by any element on the page, such as an earlier heading with the same text, the heading's position among all the page's headings (counting from 0) is added as a suffix, so it shifts when headings are added above it. Generated ids change when the text changes, and do not exist at all without generate_toc. So give a short, stable, lowercase id (such as id="pricing") to every heading that a menu, another page or an in-page link points to, and link only to those ids.
- The CMS can also generate footnotes (the generate_footnotes property). It finds each <span> or <a> with the class cms-footnote, moves it to the bottom of the page, puts a numbered link in its place, and adds a backlink with the class cms-footnote-backlink. Enable it on pages that use footnotes, and give them CSS for it.
Forms
Use when: the site has forms, or adding or changing a form.
## Forms
Forms are CMS objects, not hand-written HTML. Read https://cmsdocs.cirqlive.com/api/form-schema.html and https://cmsdocs.cirqlive.com/api/form-css.html first.
- Read the form-options action for valid spam_level and anti_robot values, create the form with form_new, write its fields with /cms/api/form, and write its response page (shown after submission) with /cms/api/content using type=form-response.
- Ask only for what is needed to follow up. Every field has a clear label (the CMS renders labels and help text from the schema). Use the right field types (email, tel, url, date) and mark only genuinely required fields as required.
- The CMS validates input in the browser and on the server, and shows errors itself. Do not add your own validation script, but make sure its error states (.cms-form-error, .cms-form-summary, .cms-form-field-error) are styled clearly and accessibly.
- Write a response page that says plainly that the message was received, and what happens next. Show the visitor their reference with <cms-field name="reference"></cms-field>, so they can quote it if they get in touch, and the date with <cms-field name="date"></cms-field>. These placeholders are described at https://cmsdocs.cirqlive.com/api/reference.html#response-placeholders.
- Base the form's CSS on /cms/css/form.css: copy its rules into the site's stylesheet and adapt them to the site's design, instead of writing form CSS from scratch. Keep what form-css.html describes under "Checkboxes, radio buttons and the required marker": select text fields by input type, not with a rule for every input; keep each checkbox and radio button on the same line as its label, including the anti-robot boxes (labels above text fields are fine); and keep the asterisk that marks a required field right after its label's text.
- When the form collects personal data, put a short privacy notice next to it, with a link to the privacy policy.
- Place the form on a page with <cms-form id="FORM_ID"></cms-form>, where FORM_ID is the form's numeric id (the X-ID that form_new returns, or the id in the forms list), never its name. People can also place a form themselves in the admin's editor, which writes the same element.
- Style it through its cms-form classes in the page's CSS. Keep .cms-form-trap off-screen with the documented rule (never display: none), keep .cms-form-field-robot visible, and never hide [data-when-field] fields in CSS.
- Ask me for the notification email address rather than guessing one.
- If a source site uses a third-party form service, ask me whether to recreate it as a CMS form.
Email addresses
Use when: the site shows email addresses.
## Email addresses
Write email addresses as ordinary mailto: links. The CMS publishes each one as an encrypted <button class="cms-email-address">, so style that button (details: https://cmsdocs.cirqlive.com/api/email-css.html). A button whose text is the author's own words must look like the site's other links (reset its border, background and padding, and use font: inherit). The kind with the extra class cms-email-address-reveal may look like a button. Never hide .cms-email-address or its noscript text.
Error pages
Use when: the site needs its error pages designed, or improving the error pages of an existing site.
## Error pages
The 401, 403, 404 and 500 error pages already exist with placeholder content. Give them the site's header, footer and CSS with error-page_save, then replace their content (read each one first to get its contentId). If someone visits the site with a bad URL, the 404 page must not be a dead end: give it something friendly and appropriate, a link to the home page, and links to the main sections of the site. Give the other error pages similarly helpful content.
Cloning rules
Use when: cloning an existing site.
## Cloning rules
- Do not copy pages verbatim. "Upgrade" them for the CMS: clean them up, structure them with semantic HTML, and use newer HTML elements where appropriate instead of the older hacks currently in place.
- The new site does not have to look exactly like the current one. You have latitude to improve on it where that is warranted, while keeping its content, brand and overall feel.
- Before writing replacement content for a page, extract and cross-check every distinct image on the source page from an <img> inventory (src and alt), not by eyeballing a screenshot. Include decorative icons, hero banners, CSS background images and product or partner logos, not just obvious photos. Download each one into images/ with a clear name.
- Preserve the source site's substance: its important information and brand meaning, business details (contact details, opening hours, prices, service descriptions), and legal text. Never remove valuable content just to make the design cleaner. Improve wording and structure, but where a change would alter a claim, an offer or how the business presents itself, keep the original and list your suggestion in the report instead.
- Keep the source site's URL structure where you can. Whenever a page is dropped or renamed during the clone, set up a redirect from its old path automatically (redirect_new). Redirect sources must be lowercase; tell me about any old URLs that cannot be redirected.
- If the source site offers documents (such as PDFs), or embeds its own audio or video, download them into docs/, audio/ and video/, and link or embed them from /docs/, /audio/ and /video/.
- If source pages carry structured data (JSON-LD or microdata), carry its information over into the new pages' JSON-LD, corrected to their new URLs and content.
- Keep a mapping of every source URL to its new page name and include it in your final report.
Workflow: build, check, upload
Use when: the agent uploads to the CMS itself.
## Workflow
1. Plan first: list the headers, footers, CSS, JS and pages you will create, with their names, and settle anything uncertain with me.
2. Build everything locally first, as one file per header, footer, page, CSS and JS, plus a small script that assembles complete HTML pages for previewing.
3. Check pages for correctness and appearance locally, before uploading: render them in a headless browser at several widths (for example 360, 768, 1024, 1440 and 2560 pixels), look at the screenshots, and fix what you find. You will not be able to view the finished pages on the CMS until after I publish them.
4. Upload with a repeatable script, in dependency order: headers, footers, CSS and JS (each object, then its content), then pages, error pages and redirects. Record every id the CMS returns. When the script runs again, it must write only the objects whose local file changed since its last run, send the recorded id as contentId, and stop at a 409 instead of fetching a fresh id.
5. Use the links_broken action to make sure every internal link you created is correct, and fix anything it reports.
6. Everything lands in staging. A person reviews the changes there before publishing them to the live site. Finish with a report: what you created (names and ids), the files I need to upload, any redirects, any placeholders, and anything you were unsure about.
Do not describe the work as finished, complete or production-ready until all of these are true, and report any that are not:
- Every planned page exists, with its final properties and content.
- The navigation works at every screen size, including the mobile menu, and every call to action and form works as intended.
- Every page has its own title, description and keywords.
- Every page has a descriptive page name, and its primary search phrase appears in its title, H1 and opening paragraph.
- Headings are in order on every page, with one <h1> each.
- links_broken reports nothing.
- You have looked at screenshots of every page at every test width.
- You have checked accessibility: keyboard navigation, focus visibility, contrast, alt text, and form labels.
- Every asset address in the pages, headers, footers and CSS has a local file at the same path.
- The report ends with a "Files to upload" section.
- Every page's JSON-LD parses as JSON, uses valid schema.org types and properties, and matches the visible content.
Workflow: build locally only
Use when: the agent builds locally only, without uploading.
## Workflow (local only)
Do not upload anything to the CMS and do not call any write action. Read actions are fine for inspecting what exists.
1. Plan first: list the headers, footers, CSS, JS and pages you will create, with their names, and settle anything uncertain with me.
2. Build everything locally in folders named headers/, footers/, css/, js/ and pages/: one file per object, with page files named after their CMS page names (pages/about.html, pages/animal/cow.html). Add a manifest.json listing every object and its properties (title, description, keywords, header, footer, CSS, JS, table of contents, footnotes), plus any redirects.
3. Check pages for correctness and appearance: assemble complete HTML pages, render them in a headless browser at several widths (for example 360, 768, 1024, 1440 and 2560 pixels), look at the screenshots, and fix what you find.
4. Finish with a report: the files and manifest you produced, the asset files I need to upload, any placeholders, and anything you were unsure about.
Do not describe the work as finished, complete or production-ready until all of these are true, and report any that are not:
- Every planned page exists, with its final properties and content.
- The navigation works at every screen size, including the mobile menu, and every call to action and form works as intended.
- Every page has its own title, description and keywords.
- Every page has a descriptive page name, and its primary search phrase appears in its title, H1 and opening paragraph.
- Headings are in order on every page, with one <h1> each.
- Every internal link points to a page in your manifest.
- You have looked at screenshots of every page at every test width.
- You have checked accessibility: keyboard navigation, focus visibility, contrast, alt text, and form labels.
- Every asset address in the pages, headers, footers and CSS has a local file at the same path.
- The report ends with a "Files to upload" section.
- Every page's JSON-LD parses as JSON, uses valid schema.org types and properties, and matches the visible content.
Workflow: plan only
Use when: the agent only plans, and builds nothing yet.
## Workflow (plan only)
Do not build or upload anything yet, and do not call any write action. Read actions are fine for inspecting what exists, and you may read any source or reference site.
Produce the plan described above (or, when working on an existing site, a plan of the changes): the pages and objects you would create or change, with their names, properties, outlines and briefs, the CSS and JS files, any redirects, the assets needed, and open questions. Then stop and wait for my review.
Questions
Use when: every prompt.
## Questions
If you have any questions, find an ambiguity in these directions, or are unsure how to handle something, ask me. If you cannot figure out how to do something, ask before you try to debug or decipher it yourself.