Your Brand Rules Folder: One Folder Every AI-Built Page Follows
Every time you ask an agent for a new page it makes its own choices, and your pages drift apart. Keep a brand folder (logo, colours, font, a short rules file) in the project, point the agent at it, and every page comes out matching.
What you will learn
- Set up a brand folder with a logo, a colours file, a fonts file and a plain-words rules file
- Ask a coding agent for a new page with one short line that points at the folder
- Check the result by eye against the rules
- Change the brand colour in one file and have the agent update the pages
Before you start
- Using an AI agent in your editor (PyCharm, IntelliJ or VS Code)
Every time you ask an agent for a new page, it makes its own choices about colours, fonts and buttons. Page by page, your site slowly stops matching. The fix is one folder in your project that holds your brand: the logo, the colours, the font, and a short rules file written in plain words.
The example is Northleaf, a small travel site, built in PyCharm with the AI Chat panel set to Claude Agent. IntelliJ and VS Code work the same way.
What goes in the folder
Next to the usual pages (index.html, about.html) sits a folder called brand with four files:
northleaf-site/
brand/
logo.svg
colours.md
fonts.md
rules.md
index.html
about.html
The heart of it is rules.md. It's just a few lines in plain words:
# Northleaf brand rules
- Use the logo from logo.svg at the top.
- One accent colour, only for the main action.
- Everything else stays calm and light.
- Rounded corners on buttons and fields.
- Lots of breathing room around each group.
- One font family, from fonts.md.
- Never use purple gradients.
- Never use emoji as icons.
The last two lines matter. A purple gradient and emoji icons are two of the most common signs of an AI-built page, so the rules say "never" outright. Anyone on the team can read this file, and so can the agent.
The other three files are just as simple. The logo is the one your company already uses. colours.md names the palette:
# Northleaf colours
- Main action: Pine
- Text: Ink
- Background: Paper
- Lines and borders: Mist
fonts.md says which font to use (Segoe UI in the lesson): bold for headings, regular for body text. Notice there's nothing to measure in any of these files. They are names and pictures.
Ask the agent with one short line
With the AI Chat panel set to Claude Agent, the whole request is:
Follow the brand folder and build a sign-up page.
Watch what the agent does first. It reads the folder, and only then creates files:
Read brand/rules.md
Read brand/colours.md
Read brand/fonts.md
Read brand/logo.svg
Created signup.html
Created style.css
The preview shows a sign-up page with the Northleaf logo, the brand font and the brand colour. Not one rule was repeated in the prompt. The folder said it.
Check it by eye against the rules
Open the page and go down the rules file:
- The logo from the folder sits at the top.
- There's one accent colour, and it's only on the main action, the Create account button.
- The button and the fields are rounded, and every group has room to breathe.
- There are no purple gradients and no emoji icons anywhere.
If a rule is broken, tell the agent which one and ask it to fix that line.
Change the palette in one place
Say the company changes its main colour. Open brand/colours.md, change Pine to Ocean, and save:
- Main action: Ocean
Then one line to the agent:
The brand colour changed, update the pages.
It reads the colours file again and edits the stylesheet. In the preview, the button, the link and the logo all turn blue. One change in one folder, one short prompt, and the page followed.
The same idea in Claude Code
In Claude Code you can keep these rules as a project folder, in a CLAUDE.md file or as a skill, so every session follows them without being told. See The CLAUDE.md Hierarchy for where that file lives. When you want a fuller design rulebook with exact sizes, the next step is a DESIGN.md, as in Reference-Driven Design.
Common mistakes
- Repeating the rules in every prompt. Put them in the folder once and point at it.
- Writing rules nobody can check. "Make it nice" isn't a rule. "One accent colour, only for the main action" is.
- Forgetting the "never" lines. Say what the agent must not do, like purple gradients and emoji icons.
- Editing colours in the stylesheet by hand. Change
colours.mdand let the agent update the pages, so the folder stays the source of truth.
Try it yourself
Create a brand folder for one of your own projects with the four files. Ask your agent for a log-in page with "Follow the brand folder", then check the result against each line of rules.md.
Related course on Udemy
The Python Architect Masterclass: Full Stack to AI Engineer
Python, Django, FastAPI, React, Docker, AWS, LLMs, RAG, agents and MCP, from first steps to AI engineer.View on Udemy ↗: The Python Architect Masterclass: Full Stack to AI Engineer (paid course, opens in a new tab)Related posts
One Request, Two Answers: the Same Post as an HTML Page and as JSON
Ask a Django blog for the same post twice: once as a 12,731-byte HTML page built by a template, once as 2,976 bytes of JSON built by a serializer. Compare the headers, see who builds the page, and why the server still owns every write.
A Blog Design from a Prompt: Downloading Figma Make Code and Reading App.tsx and BlogCard.tsx
Make a blog design from a prompt in Figma Make, download src.zip, unzip it with Python's zipfile module, and read the two files that matter: App.tsx with its selectedPost state and BlogCard.tsx with its props.
How a Web Page Works: HTML Tags, Elements and Attributes
A web page is a text file full of labelled pieces. Learn tags, attributes and nesting with three tiny pages, and see what breaks when an attribute or a closing tag is wrong.
Semantic HTML: header, nav, main, aside and footer as Page Landmarks
The same page written as div soup and with semantic tags looks identical, but only one gives screen readers and search engines landmarks and an outline. Plus tables, div, span and the one-main rule.
