Retext
CursorIDEArchitecture Design

Cursor Architecture Design Prompt Template

You get an architecture that fits your team size, scale and constraints, with components, data flow and the tradeoffs spelled out. This version is set up for Cursor: use @ to attach the files or folders the prompt is about, so Cursor reads them instead of guessing. Below you'll find the prompt, how to run it in Cursor, a worked example and answers to common questions.

Installs as a snippet — type ;archdesign to paste this prompt anywhere on your Mac.
Prompt Template
Help me design the architecture for a system.

## What we are building
[one paragraph: the product and its main user actions]

## Scale and constraints
Users and traffic: [e.g. 5,000 users, 50 requests per second at peak]
Team: [e.g. 2 full-stack developers]
Existing stack or hard requirements: [e.g. Postgres, must run on one cloud provider]
Budget or ops limits: [e.g. no dedicated ops person]

## Hard parts
[the features you are worried about, e.g. scheduled reminders, real-time updates]

## Instructions
- Prefer the simplest design that meets the constraints. Do not add services we do not need yet.
- For each component, say what it does and why it exists.
- Show how data flows for the two most important user actions.
- Give the main tradeoffs and what would make you change the design later.

## Output format
1. Components list
2. Data flow for key actions (numbered steps)
3. Tradeoffs and risks
4. What to build first

Context
- Files involved: [list the files, or reference them in the chat]
- How I build and test: [e.g. npm test]

How to use this prompt

  1. 1

    Open Cursor

    Open the chat panel in Cursor and paste the prompt as a new message.

  2. 2

    Give it context

    Use @ to attach the files or folders the prompt is about, so Cursor reads them instead of guessing.

  3. 3

    Review and iterate

    Review each proposed diff before you accept it, then reply in the same chat to adjust.

  4. 4

    Save what you repeat

    Put rules you repeat (stack, style, test command) in a project rules file so every chat starts with them.

Working in Cursor

  • •Cursor works on files in your open project, so name the files and functions you mean.
  • •For a small, local change, select the code and use the inline edit command instead of the chat panel.
  • •Long chats drift. Start a new chat for a new task and re-attach only the files it needs.

Worked example

What you give it

Building: an appointment booking app for small clinics. Patients book a slot, clinics manage calendars, patients get an SMS reminder 24 hours before.
Scale: 5,000 users, low traffic.
Team: 2 full-stack developers, no ops person.
Stack: Postgres required.
Hard part: reminders must go out reliably even if a server restarts.

What a good answer looks like (shortened)

1. Components
- One web app (monolith) serving the UI and API.
- Postgres for clinics, slots, bookings and a reminders table.
- A background job worker using a Postgres-backed queue, so there is nothing new to operate.
- An SMS provider called from the worker.

2. Data flow: booking
1. Patient picks a slot. The app inserts the booking and a reminder row due 24 hours before, in one transaction.
2. The worker polls for due reminders, sends the SMS, and marks the row sent.

3. Tradeoffs
- A monolith is simplest for two people. Split only if one part needs to scale on its own.
- Polling adds up to a minute of delay, which is fine for reminders. Use an idempotency key so a restart never sends twice.

4. Build first: booking with the transactional reminder row.

Tips for better results

  • •The Team line in Scale and constraints does more work than any other. A design is only good if your team can build and operate it.
  • •Name your scariest features in Hard parts. The data flow in item 2 is most useful when it walks through those, not the login page.
  • •Cursor works on files in your open project, so name the files and functions you mean.
  • •Avoid this: Asking for "the best architecture" without the hard parts, so the answer covers easy CRUD in detail and skips what will actually fail.

Get the free prompt pack

Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.

Variations

Review an existing design

Replace What we are building with: Here is our current architecture [paste diagram or description]. Find the weak points at [target scale].

Decision record

Change Output format to: An architecture decision record with context, options considered, decision, and consequences.

Compare two options

Add this line to Instructions: Compare [option A] and [option B] in a table on cost, complexity, failure modes and time to build.

Save it as a Retext snippet

Retext is a free text expander for Mac. Save this prompt once, then type ;archdesign in any app (ChatGPT, Claude, your editor, a browser tab) and the full prompt is pasted in.

  1. Click Add to Retext. The prompt installs as a snippet with the trigger ;archdesign.
  2. Change the trigger in Retext if you prefer a different one.
  3. Type the trigger wherever you want the prompt, then fill in the brackets.

Frequently asked questions

Can AI design system architecture for production?

It is useful for laying out options and tradeoffs quickly, especially when you give real constraints. The final call should come from someone who knows your team, budget and failure history.

Where do I keep instructions Cursor should always follow?

In a project rules file. Keep the prompt on this page for the task itself, and keep stable conventions (framework, naming, test command) in rules.

Why does AI suggest complex architectures for simple apps?

Without constraints it defaults to patterns from large systems. State team size, traffic and ops limits, and ask for the simplest design that works.

How do I reuse this prompt without copying it every time?

Click Add to Retext to save it as a snippet. Then type ;archdesign in any Mac app, including your AI tool, and the full prompt is pasted in.

Related Templates

Get the free prompt pack

Our best coding prompts in one Markdown file, delivered by email. The templates here stay free either way — the pack just saves you the copying.