Prompts / Coding & Software Engineering

ChatGPT prompt for software architecture

This prompt turns product and technical constraints into an architecture proposal that engineers can review. Use it before committing to a system design, major integration, or service boundary.

PromptOpen ChatGPTOpen Claude
Design the architecture for [SYSTEM OR FEATURE]. The users and main jobs are [USERS AND WORKFLOWS]. The current stack and existing constraints are [CURRENT SYSTEM]. Expected scale and reliability needs are [SCALE AND SLOS]. The integrations, data types, and compliance constraints are [INTEGRATIONS AND DATA].

Assume this is a proposal for an engineering review, not an invitation to invent missing requirements. Ask up to 3 clarifying questions only if a required input is missing. Otherwise, state assumptions explicitly and proceed.

Produce a design document with:
1. Problem statement, goals, non-goals, and the critical user flows.
2. A component diagram in Mermaid plus a concise explanation of each service, queue, datastore, cache, and external dependency.
3. Data ownership and lifecycle: source of truth, schema sketch, retention, encryption, access control, and deletion or correction behavior where applicable.
4. API or event contracts with realistic request and response examples, authentication, versioning, idempotency keys, pagination, and error formats.
5. At least two viable architecture options, a decision matrix, and a recommendation tied to constraints rather than fashion.
6. A phased implementation plan including migrations, backward compatibility, observability, rollout, rollback, and test strategy.
7. Small, working code examples in [LANGUAGE OR FRAMEWORK] for the riskiest boundary, with comments only where they clarify a decision.

Address failure modes concretely: duplicate delivery, retries, partial writes, race conditions, timeouts, rate limits, schema changes, poisoned messages, permission failures, and degraded third-party dependencies. Do not claim a component is highly available, secure, or compliant without explaining the mechanism. Before answering, verify that each critical workflow has an owner, persistence path, failure behavior, and observable signal. Also flag decisions that require load tests, threat modeling, or domain-owner confirmation.

Fill in

PlaceholderWhat to enterExample
[SYSTEM OR FEATURE]Describe the system or feature you need to design.A self-service CSV import pipeline that creates customer records and reports row-level errors.
[USERS AND WORKFLOWS]List the user types and the key actions they must complete.Operations managers upload files, view progress, fix failed rows, and download an error report; admins audit imports.
[CURRENT SYSTEM]State existing languages, services, infrastructure, architectural constraints, and technical debt that matter.Node.js 22, TypeScript, PostgreSQL, Redis, AWS ECS; a monolith already owns customer records.
[SCALE AND SLOS]Provide expected traffic, data volume, latency targets, uptime needs, and recovery expectations.Up to 200 files per hour, 250,000 rows per file, progress visible within 10 seconds, no duplicate customer creation.
[INTEGRATIONS AND DATA]List external systems, important data categories, and regulatory or contractual constraints.S3 for files, internal customer API, email notifications; files contain names and work emails and must be deleted after 30 days.
[LANGUAGE OR FRAMEWORK]Name the language or framework for the requested code examples.TypeScript with Fastify

How to use

  1. Describe existing ownership boundaries before asking for new services; this prevents a design that duplicates data authority.
  2. Paste the architecture into a design review and challenge every stated assumption, especially scale estimates and recovery objectives.
  3. Run the suggested API examples against your real conventions for errors, authorization, and identifiers.
  4. Follow up with: “Create an ADR for the recommended option and list the load-test scenarios that could disprove it.”

Variations

Architecture review

Use this to review an existing design before implementation.

Variation
Review this proposed architecture for [SYSTEM]: [DESIGN OR DIAGRAM]. Its key requirements are [REQUIREMENTS], and the existing platform constraints are [CONSTRAINTS]. Produce a review memo with blocking risks, important questions, and lower-priority improvements. Trace each critical workflow through data ownership, failure handling, authorization, and observability. Identify hidden coupling, single points of failure, inconsistent consistency models, and migration hazards. For each issue, give a concrete remedy and its trade-off. Do not invent system behavior not present in the materials; mark unknowns. Check that recommendations distinguish must-fix items from preferences.

API design

Use this when the main architectural decision is a public or internal API contract.

Variation
Design an API contract for [CAPABILITY] used by [CLIENTS]. Existing entities and identifiers are [DOMAIN MODEL], while constraints are [AUTHORIZATION, SCALE, AND COMPATIBILITY]. Return an OpenAPI-style endpoint table, request and response JSON examples, validation rules, error codes, pagination or filtering rules, idempotency behavior, and versioning approach. Explain authorization at the resource level, not just the endpoint level. Include contract-test cases for malformed input, retrying a write, stale data, and forbidden access. Flag domain rules that need product-owner confirmation before implementation.

Migration plan

Use this when changing a live system without a disruptive cutover.

Variation
Plan a safe migration from [CURRENT DESIGN] to [TARGET DESIGN]. The traffic pattern, data size, and uptime requirements are [OPERATING CONDITIONS]. The irreversible risks are [RISKS]. Produce ordered phases for preparation, dual-read or dual-write behavior if needed, backfill, verification, progressive rollout, rollback, and decommissioning. Specify ownership of each data copy, how to detect divergence, and the exact condition for advancing phases. Include example metrics and alerts. Do not assume a big-bang cutover or zero downtime unless the constraints support it. Check that rollback remains possible until the stated commit point.

Tips

  • Treat a service boundary as a data-ownership decision, not merely a way to divide code repositories.
  • Require idempotency at every externally retried write path; retries are normal behavior, not an exceptional edge case.
  • Write down the consistency users actually need, such as “an import result may lag for 30 seconds,” rather than defaulting to strong consistency everywhere.
  • Make observability part of each workflow: a request or job should have a correlation ID, success metric, failure metric, and actionable alert.

FAQ

Can AI choose microservices versus a monolith?

It can frame the trade-off, but the answer depends on team ownership, deployment maturity, failure isolation, and the current codebase. A modular monolith is often the safer starting point.

Should I ask for code in an architecture prompt?

Yes, but only for the riskiest interface or mechanism. Small examples expose unresolved decisions more effectively than a large generated codebase.

How do I validate an AI architecture proposal?

Review assumptions with domain owners, use threat modeling for sensitive data, and test the proposed design under representative load and failure conditions.

Related prompts

All Coding & Software Engineering prompts →

Get a few prompts like this every week

Something Big is a free AI newsletter read by 50,000+ professionals. About three short emails a week with prompts and tools that work, plus what changed in AI and what to do about it.