DESIGN.md vs Prompt for AI Website Design
Decide which instructions belong in a reusable DESIGN.md and which belong in the prompt for an individual page, using a pricing-page example.
“Add annual billing” is a good prompt. Six weeks from now, the person building an invoice screen probably won’t need that instruction. They will need to know how your product formats prices, styles secondary actions and displays a selected option.
Split a pricing brief into two pieces
Put the current task in the prompt: “Add a monthly and annual switch. Show the annual total beside the monthly equivalent. Keep the existing checkout destination.” That gives the agent a change you can test.
Put recurring decisions in DESIGN.md. For example, prices use lining numerals, totals align to the right in comparison tables, and each plan has one prominent action. Include a reference to the approved pricing component so the agent can inspect how those choices work together.
Follow a design decision through a second feature
Suppose the pricing screen now looks right. Two weeks later you add a coupon field to checkout. The pricing prompt has served its purpose, but your agent still needs to know how to present an amount that changed. This is where the scope of a rule becomes visible.
| Decision | Where to keep it | Why |
|---|---|---|
| Show an annual total for these three plans | Pricing task | It depends on this page and its billing options. |
| Align amounts to the decimal in a comparison | DESIGN.md | The same convention fits invoices and quotes. |
| Calculate the discount before tax | Billing logic and tests | Money calculations need executable checks. |
| Reuse the existing price component | Component reference in DESIGN.md | A future contributor can find the working example. |
Try a fresh chat with one instruction: “Read the design file, then add a coupon summary to this checkout.” Review where the discount appears and whether it can be understood without color. If the agent has to invent how a changed amount should read, add the accepted before-and-after example to the component documentation. Keep temporary campaign terms in the campaign brief so they expire with the offer.
Decide where a correction belongs
During review, suppose every plan gets an oversized badge. If only the enterprise plan needs a custom label, correct the page brief. If badges dominate every screen the agent builds, document the shared badge size and emphasis once.
You can inspect a DESIGN.md example in the catalog before writing your own. Take one recurring decision from it and try that rule on a second screen. A rule that needs a paragraph of exceptions may belong closer to the component.