# Build a Prompt-Driven Design System: From a Brand Folder to Polished Posts in One Message

Source: https://abduelmorsi.com.tr/articles/prompt-driven-design-system

![Cover: "Design by prompt". A terminal with a one-line brief turns into a finished feed post.](https://abduelmorsi.com.tr/og-images/articles/prompt-design-system.png)

## Introduction

If you've asked an image model for a social media post, you know the result. The layout looks fine at a glance, then you notice the text is garbled, the logo is "inspired by" yours, the colours drift, and every post looks like it came from a different designer.

The fix: **don't let the AI draw the design. Let it operate a design system.**

When it's done, you type something like this:

```text
Make a post for our open day on Saturday 7 March, 10:00–16:00
in the main hall, free entry, registration at example.com/open-day.
Make the story version too.
```

and get a finished feed post, a story, a caption and a scannable QR code, all on brand.

> **You don't need to write any code.** The AI agent writes every file. Your job is the part only you can do: hand over the brand's real files, paste the prompts in this guide, and say what looks wrong. If you can describe a post in a sentence, you can build this.

---

## Proof: My Own Brand

I built a design system for this website and LinkedIn in one day by following the steps below: 5 templates (article cover, project cover, site preview card, and two LinkedIn post formats). Every article cover and featured-project cover on this site now comes from it, each from a one-line brief, including this article's. For a website project, the agent took a real screenshot of the live site and framed it in the same layout.

Here is the same kind of cover made both ways. On the left, an image model: a resume for someone called "Alex Morgan", invented match scores, and a look no other cover on the site shares. On the right, the design system: the article's real title and claim, my photo and name, and the same layout every other cover uses.

![Left: an AI-generated cover with a made-up resume and fake scores. Right: the same cover from the design system, with the real title, a line drawing and my byline.](https://abduelmorsi.com.tr/images/articles/prompt-driven-design-system/generated-vs-system.webp)

---

## Why This Beats Generating Images

| | Image generation | Design system |
|---|---|---|
| Text | Often garbled, especially in non-Latin scripts | Real fonts, always correct |
| Logos | Redrawn, distorted | The real files |
| Colours | Drift between images | Exactly the brand's |
| Consistency | Each design is a new guess | Same layouts every time |
| Editing | Regenerate and hope | Ask for one change, re-render |
| Other languages | Hard | Swap the text, flip the direction |

The AI still does a lot. It writes the copy, picks the layout, sizes things, and catches its own mistakes. The design system makes those decisions **cheap and repeatable**.

---

## How It Works, in Plain Words

The agent builds one folder with four kinds of things in it:

1. **A style file.** Your colours, fonts, spacing and every recurring element (title, date line, photo frame), written once.
2. **Templates.** One finished example post per post type: an invitation, an announcement, a quote. A new post is a copy of the closest template with new words.
3. **A rulebook.** A plain-English file, `AGENTS.md`, that tells any AI agent how your brand works: what to deliver, which template to pick, what it must never do, how to check its work.
4. **A renderer.** A tiny script that opens a post in Chrome and saves it as a PNG.

Posts are built like web pages, so text is real text and logos are your real files. That's why nothing comes out garbled. Image generation is only used for art (an illustration or a background photo), never for text or logos.

The rulebook is the real product. It's where your taste lives, so a fresh AI session makes the same calls you would.

<details>
<summary>Under the hood: the folder</summary>

```text
brand.css          colours, fonts + every element as a CSS class
brand.js           small helpers (icons, auto-fitting long titles)
render.mjs         posts/x.html -> posts/x.png (headless Chrome)
templates/*.html   one file per post type + a rendered preview
AGENTS.md          the rulebook: workflow, brand, templates, checks
CLAUDE.md          one line, "@AGENTS.md", so Claude Code reads it too
assets/logos/      transparent logo PNGs in every colour
assets/_reference/ screenshots of real past posts
posts/             output: HTML + PNG + caption per post
```

</details>

---

## Before You Start

You need:

- **An AI coding agent** that can read and write files and run commands: [Claude Code](https://claude.com/claude-code) or Codex. It does all the building; you talk to it in plain language.
- **Chrome or Edge**, which you almost certainly have, and **Node.js**. If Node isn't installed, ask the agent to check and walk you through it.
- **Your brand's real files:** logos, the designer's source files (`.ai`, `.psd`, `.fig` or PDFs) if you have them, your colour palette, and screenshots of 10–15 of your best past posts.
- **Optional: an image tool** the agent can use for illustrations, such as Codex's built-in image generation.

Open the agent in an empty folder, put your brand files inside it, and work through these six steps in order. Each one is a prompt to paste; replace everything in `[BRACKETS]`.

1. Hand over the brand, and find what only it has.
2. Let the agent build the foundation.
3. Get your templates.
4. Write the rulebook, then test it.
5. Make real posts.
6. Teach it your taste.

> **Want a head start?** The [starter repo](https://github.com/abduelmorsi/prompt-design-system-starter) has all of this already set up for a plain, made-up brand: the style file, four templates, a filled-in `AGENTS.md`, the renderer and a QR tool. On GitHub, click **Use this template** (or **Code → Download ZIP**), open your agent in the folder, and paste the first prompt from its README. Its two prompts cover the first four steps here: the agent audits your brand, swaps the sample for it, then tests the rulebook. Don't keep the sample look; it's there to be replaced.

---

## Hand Over the Brand

**What you do:** collect the real files. Don't describe your brand as "teal-ish, modern, friendly"; give the agent the sources and let it pull out the facts. This is what makes the result look like *your* brand and not "a nice template".

**Paste this:**

```text
I want to build a design system for [BRAND NAME] that an AI agent
can operate: I describe a post in one message and get a finished
PNG that matches our existing style. It must be deterministic:
HTML/CSS rendered to PNG with headless Chrome. Image generation is
only for art (illustrations, textures, background photos), never
for text or logos. I don't write code, so you build everything.

Brand sources:
- Logos / design files: [FOLDER PATH or DRIVE LINK]
- Past posts to match: [SOCIAL PROFILE URL or FOLDER OF
  SCREENSHOTS]
- Colour palette (if documented): [HEX CODES or IMAGE]
- Languages and script direction: [e.g. English / Arabic RTL]
- Formats: [e.g. feed 1080x1350, stories 1080x1920]

First, audit the sources and report back before building anything:
1. The exact fonts. Read them from inside the design files
   (PDF/.ai/.psd embed them), and say which are free on Google
   Fonts.
2. The palette with hex codes. Sample any gradients or extra
   colours from real designs.
3. The logo files and which colour variants we need.
4. The 5–8 recurring post types, and the recurring visual "moves"
   (shadows, frames, textures, patterns) that make our posts
   recognisable.
5. 8–12 things that belong to us and no competitor: our place,
   objects, materials, rituals, the printed things of our world
   (a ticket, a menu, a timetable). Mark the ones that could
   become a signature move or a picture.

Save screenshots of 10–15 representative real posts in
assets/_reference/.
```

**What you get:** a short report of your fonts, colours, logos, post types and the things only your brand has. Read it and correct anything that's off before moving on.

> **The competitor test:** put your nearest competitor's name in front of each item on that last list. If it still fits them ("books", "coffee", "a laptop"), it belongs to the category, not to you. The items that survive (your street, your building, your one-batch-a-month rule) are where distinctive designs come from.

> **Why it works:** design files embed the fonts they use, so the agent can read the exact names instead of guessing from screenshots. Master logo files often hold every variant, which the agent can split into clean transparent PNGs. Often the brand fonts turn out to be free on Google Fonts.

---

## Let the Agent Build the Foundation

**What you do:** paste the prompt and wait. Nothing to decide yet.

```text
Now build the system in this folder:
- brand.css: tokens (colours, fonts, spacing) and one class per
  component, sized in real pixels for a [1080x1350] canvas
  (.post), plus .story [1080x1920]. Name classes after what they
  are in our brand. Comment anything non-obvious, including why.
- brand.js: only what CSS can't do (inline icons, auto-fitting
  long titles).
- render.mjs: renders any post HTML to PNG with installed
  Chrome/Edge, no npm packages; canvas size comes from the .post
  class.
- assets/logos/: every logo as a tight, transparent PNG in each
  colour variant we need.
Use only the brand's real fonts, colours and logo files. Never
approximate a logo.
```

**What you get:** the style file, the renderer and clean logo files. You never need to open them.

<details>
<summary>Under the hood: what the agent writes</summary>

The style file starts with your brand's values as named tokens:

```css
:root {
  --ink:    #1A2B3C;   --primary: #2F6F73;
  --paper:  #F5F0E8;   --accent:  #E4572E;  /* ≤ 10% of a post */
  --f-body:    'Inter Tight', sans-serif;
  --f-display: 'Fraunces', serif;           /* titles only */
  --pad: 72px;                              /* safe margin */
}
```

Then one class per element, sized in real pixels:

```css
.post       { width: 1080px; height: 1350px; padding: var(--pad); }
.post.story { height: 1920px; }
.title      { font: 700 140px/1.1 var(--f-display); }
.title.pop  { text-shadow: 6px 6px 0 var(--accent); }
.facts      { display: flex; }      /* date / place / price */
.photo-frame { background: #fff; padding: 18px; }
```

The renderer is a dozen lines that ask headless Chrome for a screenshot:

```js
execFileSync(chrome, [
  '--headless=new', '--hide-scrollbars',
  '--force-device-scale-factor=1',
  `--window-size=1080,${height}`,
  '--virtual-time-budget=10000',   // let web fonts load
  `--screenshot=${out}`, pathToFileURL(file).href,
]);
```

No React, no build step, no design-tool API. Every colour is a token, and elements are named after what they are in the brand (`.facts`, `.photo-frame`), which makes them easy for the agent to reason about.

</details>

---

## Get Your Templates

**What you do:** paste the prompt, then look at the contact sheet it makes and say what feels off.

```text
Create one template per recurring post type from the audit, in
templates/. Each is a complete, realistic post with real-looking
content (no lorem ipsum), built only from brand.css classes, with
a comment at the top saying what it's for and what to edit. No two
templates share a layout, and none uses icon-in-a-circle fact
cards or rows of identical cards. Render
every template to PNG, look at each image, fix overlaps and
spacing, and make a contact sheet of all templates side by side.
Compare it with assets/_reference/ and tell me where ours looks
more generic than the real posts.
```

**What you get:** 5–8 finished example posts and one image showing them all. Start with your most common post types; you can add more any time.

---

## Write the Rulebook, Then Test It

**What you do:** paste the first prompt. Then test the rulebook with an agent that has never seen your conversation.

```text
Write AGENTS.md: the rulebook a fresh AI agent follows to turn a
one-line brief into a finished post. Include: defaults (what to
deliver, what extra words trigger); the workflow (extract brief,
pick template, copy, edit content only, render, look at the PNG,
QA, caption, reply with paths); colour roles and proportions; the
type scale; copy rules (write the words before the design; the
title fits in two lines; one supporting sentence; what, when and
where in large type, never only in small print); date, time and
number formats; layout rules; a "Never" list that starts with
"never invent a fact: no made-up price, link, name or time; ask
once if the date or place is missing"; a table of our signature
moves mapped to classes; the templates with a decision rule for
choosing; art-generation prompt recipes with a reject list; our caption format copied from real
captions; and a QA checklist. Add CLAUDE.md containing
"@AGENTS.md".
```

```text
Spawn a fresh subagent that knows nothing about this conversation.
Give it only this brief: "[A REAL UPCOMING POST IN ONE SENTENCE],
and a story too". Tell it to read AGENTS.md and follow it exactly,
without changing brand.css or the templates. When it finishes,
have it report every place AGENTS.md was unclear, wrong or missing
something it needed. Then fix the rulebook and the system for each
point.
```

**What you get:** a rulebook, a test post, and a list of gaps the test agent found (a detail the brief had but no template had room for, an unclear date format, a broken helper). Each gap gets fixed in the rulebook. This is the cheapest quality check you'll ever do.

> **The most important habit:** when you correct the agent, ask it to update the rulebook. A one-off fix helps one post. A rule helps every post after it.

---

## Make Real Posts

From here on, this is all you type:

```text
Make a post for [EVENT or TOPIC]: [DATE], [TIME], [PLACE], [PRICE
or free]. Registration link: [URL] (put a QR code on the design
and the link in the caption). Logo of our partner attached. Make
the story version too.
```

Two more you'll use often:

```text
Make a [LANGUAGE] version of this post and its story. Mirror the
layout if the script direction changes, and use a font that
supports the language.
```

```text
Give me 3–5 genuinely different design directions for this post
as one labelled contact sheet (A–E), and recommend one.
```

After every post the agent looks at its own PNG and runs the checklist from the rulebook: nothing overlaps, nothing crosses the margins, the weekday matches the date, the QR code still scans after it's been placed. Ask it to turn every "it looks fine" into a check it can run.

---

## Teach It Your Taste

The first versions will be good but generic. Quality comes from short feedback rounds, each turned into a rule rather than a one-off fix. Say what you see, in plain words:

- **"This looks like a generic template."** It compares against your real posts and replaces the generic part (often icon-in-a-circle cards or glassy boxes) with how your posts actually do it.
- **"The background art is distracting."** It tones it down and makes that the default.
- **"Don't put the price on the design."** It moves to the caption, and the rule says so from then on.
- **"The partner's logo is bigger than ours."** Partner logos get the same outer size as yours, every time.
- **"That colour is too strong here."** Ask for 4–5 options side by side, pick one, and keep it as a named variant.

Then paste this so the fix sticks:

```text
[YOUR FEEDBACK, e.g. "this looks like a generic template" / "the
background art is distracting"]. Fix it in this post, then change
the system so it never happens again: update brand.css or the
template if it's a component problem, and add the rule to
AGENTS.md so future sessions follow it. Show me the rule you
added.
```

When you're unsure what you want, ask for options. A labelled sheet gives you something to react to, which is faster than describing it. This is the sheet I picked my own brand from: I took A's dark background, type and amber, and C's line drawings.

![A contact sheet of five design directions, A to E, each shown as an article cover and a LinkedIn post.](https://abduelmorsi.com.tr/images/articles/prompt-driven-design-system/directions.webp)

### Borrow a taste ruleset

Your own feedback is the best source of taste, but you don't have to start from zero. [taste-skill](https://github.com/leonxlnx/taste-skill) is an open-source agent skill for designing pages that don't look AI-made. This guide already follows its method: take the idea from the subject (the inventory in the first step), choose between directions instead of accepting the first one (the options sheet above), and judge the rendered image, not the code. Its house rules map straight onto posts too:

- **No eyebrows.** No small label above the title ("NEW ARTICLE", "~/articles"). Put that context in the subtitle or the byline.
- **No monospace outside real code**, and no index numbers ("01", "Step 2").
- **No thin rules, gradients, shadows, glows or outlined chips.** Separate things with space or a step in tone.
- **One accent colour, used on one thing**, and never as a coloured word inside the headline.
- **Headlines fit in two lines.** Shorten the words before you shrink the type.

The rules are for the defaults an agent reaches for, not for your brand's real signature. If your posts have always had a hard shadow behind the title, keep it and write it into the rulebook as an exception. And when removing ornament leaves a post looking empty, don't add another ornament: make the main thing bigger, use a real photo, or say more.

```text
Apply the house rules from taste-skill
(github.com/leonxlnx/taste-skill) to every template: no eyebrows,
no monospace outside code, no index numbers, no thin rules,
gradients, shadows or chips, one accent on one thing, headlines in
two lines. Show me before/after renders side by side, then add the
rules I keep to AGENTS.md and the QA checklist.
```

Here's one of my templates before and after that pass:

![Before: an amber headline word, a monospace label above the title and a caption under the drawing. After: one white headline, no label, the amber left on the cursor only.](https://abduelmorsi.com.tr/images/articles/prompt-driven-design-system/taste-before-after.webp)

---

## Extras Once It Works

- **Stories**: the same templates at 1080×1920, with the top and bottom kept clear of the app's interface.
- **Other languages**: one switch that mirrors the layout for right-to-left or left-to-right scripts and changes to a font that supports the language.
- **Registration QR codes**: in brand colours, with tracking parameters stripped so the code is less dense, and decoded from the final image every time.
- **Matching assets**: form headers, banners and slides from the same style file, at their own sizes.
- **Pictures, in this order**: your own photos first. Then generated art, with one concrete subject, your palette as hex codes, no text or letters, no faces, and a candid phone-photo look for photos. Then real, freely licensed pictures of your world (an old map of your street, a museum print of your craft), credited in the caption. Anything with strict structure (borders, patterns, maps, charts, QR codes) is drawn in code, never generated.

```text
Generate the hero art for this post with [IMAGE TOOL]: [SUBJECT].
Use the illustration (or photo) recipe from AGENTS.md exactly: our
palette hexes, no text or letters, no faces, transparent
background for illustrations, candid phone-photo look for photos.
Trim it, place it, render the post, and reject and regenerate if
you see letters, warped geometry, off-palette colours, glow or
more than one subject.
```

---

## Common Pitfalls

- **Describing the brand instead of handing it over.** Real font files, sampled colours and reference screenshots produce *your* brand. Adjectives produce a template.
- **Fixing posts instead of the system.** If you correct the same thing twice, it belongs in the rulebook.
- **Generating anything with structure.** Text, logos, patterns and QR codes come out almost right, which is the worst outcome. Have the agent draw them in code.
- **Trusting "looks fine".** Tight descenders, QR codes that stop scanning when shrunk, and art drawn under text are easy to miss by eye and easy to catch with a check.
- **Filling empty space with decoration.** Badges, thin lines, glows and icon cards are what make a post read as AI-made. Fill space with a bigger title, a real picture or the full information instead.
- **Skipping real photos.** The system makes generated art passable. Real photos make it good. Use your own whenever you have them.

---

## Conclusion

A prompt-driven design system doesn't replace a designer. It captures a designer's work (the palette, the fonts, the layouts, the small moves that make a brand recognisable) in a form an AI can apply correctly every time. After that, a polished, on-brand post takes one sentence, and anyone on the team can make one, with no code.

This is the set I built for my own brand by following this guide:

![The finished template set: an article cover, a project cover, a site preview card, and two LinkedIn post formats, all dark with bold white titles and one amber detail.](https://abduelmorsi.com.tr/images/articles/prompt-driven-design-system/templates.webp)

Start small: three templates, a short rulebook, and one real post. Let the feedback rounds do the rest.
