Design [SYSTEM TO DESIGN] for [USERS AND USE CASES]. The expected scale is [SCALE AND SLOS], and these constraints are non-negotiable: [CONSTRAINTS]. The existing stack, integrations, and deployment environment are [CURRENT CONTEXT]. The main risks or quality priorities are [PRIORITIES]. Treat this as a technical design review. Ask up to 3 clarifying questions only if a required input is missing; otherwise state reasonable assumptions separately. Do not invent vendor guarantees, benchmarks, compliance certifications, existing services, or load-test results. Produce a design document with: 1. Scope, non-goals, functional requirements, and measurable non-functional requirements. 2. Back-of-the-envelope capacity estimates: requests, storage, bandwidth, and peak versus average load. Show the arithmetic and label assumptions. 3. A component diagram in Mermaid plus a request flow for the most important write and read paths. 4. Data model and ownership boundaries, including primary keys, indexes, retention, and the consistency model required for each critical operation. 5. API or event contracts with example requests, responses, idempotency behavior, pagination or ordering rules, and versioning decisions. 6. Scaling and reliability: caching, partitioning or sharding if justified, queues, retries with backoff, dead-letter handling, rate limits, timeouts, and observability. 7. Security and privacy controls relevant to the data and actors: authentication, authorization, secrets, audit logging, and abuse prevention. 8. Failure modes and trade-offs, including regional dependency, duplicate delivery, stale reads, hot keys, partial writes, and recovery behavior. 9. A phased implementation plan with the smallest viable first release and tests needed before scale-up. Before answering, verify that every component supports a stated requirement, every asynchronous path explains delivery semantics, and no claimed consistency or availability guarantee conflicts with the proposed architecture.
Fill in
| Placeholder | What to enter | Example |
|---|---|---|
| [SYSTEM TO DESIGN] | Enter the product or technical system to be designed. | a scheduled email-report service that generates weekly usage summaries for B2B customers |
| [USERS AND USE CASES] | Enter the main actors and the actions they must complete. | account admins configure recipients and time zones; the service aggregates tenant usage and sends one report per account |
| [SCALE AND SLOS] | Enter expected traffic, data volume, latency, availability, and growth expectations. | 80,000 accounts, up to 20 recipients each, weekly peak of 30,000 reports per hour, 99.9% monthly availability, reports delivered within 2 hours of local schedule |
| [CONSTRAINTS] | Enter hard requirements such as budget, region, technology, compliance, or delivery timing. | must use AWS, respect tenant isolation, retain delivery events for 13 months, and keep per-report compute below $0.03 |
| [CURRENT CONTEXT] | Enter existing services, languages, databases, and third-party integrations. | TypeScript services, Postgres, S3, Kafka, SES, Kubernetes |
| [PRIORITIES] | Enter the highest-risk qualities, such as low latency, correctness, cost, or abuse resistance. | no duplicate sends, correct tenant data, observability for missed schedules, and controlled email-provider failures |
How to use
- Replace the brackets with real scale figures and constraints; say when a figure is an estimate.
- Paste the prompt and review the assumptions before treating the document as a design decision.
- Challenge each critical path with a failure scenario, such as a timeout after a downstream service processed the request.
- Follow up with: “Now write the sequence diagram and test plan for the duplicate-delivery failure mode.”
Variations
Interview practice
Use for a timed system-design interview response.
Act as an interviewer and candidate for a [DURATION]-minute system-design interview on [SYSTEM]. The expected scale is [SCALE]. First ask the highest-value clarifying questions, then provide a candidate-style answer in this order: requirements, estimates, high-level design, data model, critical flows, bottlenecks, and trade-offs. Include a simple Mermaid diagram and explain what I would say while drawing it. Keep the first design practical, then describe two scale-up changes. Check that calculations and component choices match the stated scale.
Architecture review
Use to evaluate an existing proposal for missing risks.
Review this system-design proposal: [DESIGN DOCUMENT]. Its requirements and constraints are [REQUIREMENTS]. Produce an architecture-review memo with strengths, blocking risks, important unanswered questions, and prioritized recommendations. Inspect data ownership, retry and idempotency behavior, consistency claims, capacity assumptions, authorization boundaries, observability, and operational recovery. Do not redesign components without linking each recommendation to a requirement or failure mode. End with an acceptance checklist and identify any claim that needs a load test or prototype.
API design
Use when the system boundary is known but contracts need to be defined.
Design REST or event APIs for [CAPABILITY] used by [CLIENTS]. The core objects are [OBJECTS], and key operations are [OPERATIONS]. Define resources, endpoints or topics, request and response examples, validation errors, authentication and authorization, idempotency, pagination, ordering, concurrency control, versioning, and webhook delivery semantics if relevant. Explain the data ownership boundary and identify which operations need transactions. Do not assume fields or permissions not supplied. Check that retries cannot create duplicate side effects and that error responses let clients recover safely.
Tips
- Start with explicit non-goals, since a design can appear complete while silently taking responsibility for unrelated workflows.
- Write traffic estimates as average and peak; queues, database connections, and third-party APIs usually fail at the peak.
- For every retried write, decide where idempotency is stored and how long its key remains valid.
- A component diagram is not enough: trace one write, one read, and one degraded dependency path to expose ownership and consistency gaps.
FAQ
Can AI produce a system design ready for production?
It can create a useful first proposal, but production readiness requires validation against your actual traffic, security obligations, operational tools, and failure testing.
What scale information should I provide?
Give users, request rates, payload sizes, retention periods, peak patterns, latency targets, and any expected growth. Estimates are fine when labeled as estimates.
Should I choose technologies before asking for a design?
Include hard stack constraints, but let requirements drive the rest. A good proposal explains why a database, queue, cache, or consistency model is needed.