Back to cookbook

AI Prompt to Write a Technical Design Document (RFC) for a New Feature

0 views Updated

Make this prompt yours

Share

This technical design document prompt, sometimes called an RFC prompt, is for engineers and tech leads who need to turn a feature idea into a document their team can actually review. Instead of a vague paragraph describing what to build, it produces a structured design doc covering the problem, proposed approach, alternatives considered, and the tradeoffs that reviewers will ask about.

The prompt is built around the parts of a design doc that actually get scrutinized in review: what happens at the edges, what the rollback story looks like, and which alternatives were rejected and why. Asking the model to fill in "alternatives considered" explicitly, rather than leaving it out, is what separates a document that survives review from one that gets bounced back with questions the first draft should have answered.

It works for a new service, a schema change, or a significant refactor, and produces output that reads like an internal engineering doc rather than marketing copy about the feature.

Prompt template

Make this prompt yours

prompt-template
261 tokens
ROLE: You are a senior engineer writing a technical design document for team review. CONTEXT: - Feature or change: [WHAT IS BEING BUILT OR CHANGED] - Problem it solves: [THE CONCRETE PROBLEM OR PAIN POINT] - Current system constraints: [EXISTING ARCHITECTURE, TEAM SIZE, DEADLINE, OR OTHER LIMITS] - Proposed approach: [HIGH-LEVEL DESCRIPTION OF THE SOLUTION] - Known alternatives considered: [ANY OTHER APPROACHES ALREADY DISCUSSED, IF ANY] CONSTRAINTS: - Do not invent specific performance numbers, benchmarks, or capacity figures that were not provided - Include at least one alternative approach and explain why it was not chosen - Flag any open questions or risks explicitly rather than glossing over them - Keep the document scannable: short paragraphs, no filler language OUTPUT FORMAT: 1. Problem statement (what's broken or missing today) 2. Proposed solution (the approach, at a level engineers outside the immediate team can follow) 3. Alternatives considered (at least one, with reasons it was rejected) 4. Risks and open questions 5. Rollback plan (what happens if this needs to be reverted) Write the design document now using only the information provided above.

Want it sharper? Optimize this prompt with Prompt Optimizer, check it with the Prompt Debugger or shorten it with the Token Optimizer.

Example input

example-input
104 tokens
Feature: Moving the notification service from synchronous HTTP calls to an async message queue Problem: Notification sends are currently blocking the main checkout request, adding 400-900ms of latency under load Constraints: Team of 4 backend engineers, 3-week timeline, existing system runs on AWS with SQS already in use elsewhere Proposed approach: Publish notification events to an SQS queue and process them with a separate consumer service Known alternatives: Team previously discussed just adding a timeout and retry to the existing synchronous call

Example output

example-output
270 tokens

Problem Statement Notification sends currently happen synchronously inside the checkout request path, adding measurable latency under load and creating a single point of failure: if the notification service is slow or down, checkout fails along with it.

Proposed Solution Move notification delivery to an asynchronous model using SQS, which the team already operates elsewhere. The checkout service publishes a notification event to a queue and returns immediately. A separate consumer service processes the queue and handles actual delivery, retries, and failure logging independently of the checkout path.

Alternatives Considered Adding a timeout and retry to the existing synchronous call was discussed first. This was rejected because it reduces worst-case latency but doesn't remove the coupling: a persistently failing notification service would still degrade checkout, just with a bounded delay instead of an unbounded one.

Risks and Open Questions

  • Message ordering is not guaranteed by SQS standard queues; confirm this doesn't matter for notification delivery.
  • Need monitoring on queue depth to catch a stuck consumer before it causes delayed notifications.
  • Open question: should failed notification deliveries trigger a customer-facing retry, or fail silently with internal alerting only?

Rollback Plan The synchronous call path will remain in the codebase behind a feature flag for one release cycle. If the queue-based approach causes issues, the flag can be flipped back to synchronous delivery with no schema changes required.

When to use it

  • Proposing a new service or significant architecture change that needs team sign-off
  • Turning a Slack thread or whiteboard sketch into a reviewable written proposal
  • Documenting a schema or API change that will affect other teams
  • Preparing a design doc ahead of a review meeting so reviewers can read it beforehand

Best practices

  • Give the model the actual constraints (team size, deadline, existing systems) instead of asking it to guess context
  • Explicitly ask for at least one rejected alternative and why it was rejected, not just the chosen approach
  • Request a section on what happens if the change needs to be rolled back
  • Have a teammate who wasn't involved in writing the prompt review the draft before it goes to the full team

Common mistakes

  • Asking only for the chosen solution, which leaves reviewers wondering what else was considered
  • Skipping concrete failure modes and edge cases in favor of only describing the happy path
  • Letting the model invent specific latency numbers or capacity figures that weren't actually measured
  • Treating the generated draft as final instead of using it as a starting point for team discussion

FAQs

What should a technical design document include at minimum?

At minimum: the problem being solved, the proposed approach, at least one alternative that was considered and rejected, and the risks or open questions reviewers should weigh in on.

How long should an engineering RFC be?

Most effective RFCs run one to three pages. Long enough to answer the obvious review questions, short enough that teammates actually read it before the review meeting.

Should a design doc include a rollback plan?

Yes, for any change touching production systems. A rollback section forces the author to think through failure scenarios before they happen, not during an incident.

How can I check the quality of this design-doc prompt before using it on a real feature?

Intelligence Score — grades a filled-in prompt's clarity and specificity on a 0-100 scale with concrete suggestions, which is useful for catching vague constraints before you send a draft prompt to your model.

Found this prompt useful? Share it.

Share

More in Engineering

Engineering

AI Prompt to Design an API Error-Handling and Retry Strategy

This AI prompt for error handling helps engineers design a consistent retry and failure strategy for an API client or backend service before…

Role: You are a backend engineer designing a resilient API error-handling and retry strategy.

Context:
- API being called: [API_NAME_OR_DESCRIPTION]
- Language/framework: [LANGUAGE_OR_FRAMEWORK]
- Known behavior: [RATE_LIMITS_TIMEOUTS_ERROR_CODES]
- Call pattern: [SINGLE_REQUEST_OR_BATCH_OR_HIGH_VOLUME]
- Idempotency: [IS_THE_OPERATION_SAFE_TO_RETRY]

Task:
1. Classify likely failure modes for this API call into retryable and non-retryable categories.
2. Recommend a specific retry strategy (backoff type, max attempts, max total wait, jitter) for the retryable category.
3. Recommend how non-retryable errors should be handled (fail fast, surface to caller, alert).
4. Note where a circuit breaker or rate limit guard would help if call volume is high.
5. Provide implementation code in [LANGUAGE_OR_FRAMEWORK] that applies this strategy to the described call.

Constraints:
- Do not retry non-retryable errors.
- Include logging at each retry attempt and final failure.
- Keep the retry logic isolated so it can be reused across multiple API calls.

Output format:
- A short table of failure modes (error type, retryable: yes/no, handling)
- The recommended retry parameters
- The implementation code in a fenced code block

Make this prompt yours

Engineering

AI Prompt to Write a Rollback Plan for a Risky Deployment

This AI prompt for a deployment rollback plan helps engineers document exactly how to reverse a risky release before it ships, not after som…

ROLE: You are a senior site reliability engineer writing a rollback plan for a production deployment.

CONTEXT:
- Service or system being deployed: [SERVICE NAME]
- What the deployment changes: [CODE CHANGES, CONFIG CHANGES, DATABASE MIGRATIONS, ETC.]
- Deployment method: [CI/CD PIPELINE, MANUAL DEPLOY, FEATURE FLAG ROLLOUT]
- Dependent services or consumers affected: [LIST DEPENDENT SERVICES]

TASK:
Write a rollback plan for this deployment that includes:
1. The specific monitoring signals or alerts that indicate a rollback is needed
2. Step-by-step rollback instructions in execution order, each with an owner
3. Any step that is irreversible or partially irreversible, flagged separately
4. A verification step to confirm the rollback succeeded
5. An estimated time to complete the rollback

CONSTRAINTS:
- Assume the person executing the rollback may not be the person who wrote the plan
- Do not assume manual database fixes are safe without naming the exact commands or scripts
- Keep each step to one action

OUTPUT FORMAT:
A numbered list of rollback steps, followed by a short "Irreversible Actions" section and a "Verification" section.

Make this prompt yours

Engineering

Secure API Request Handler

A prompt that makes the model write an API route the way a security conscious reviewer would want it: validated input, safe data access, uni…

Write a Node.js Express route handler for a [METHOD] request to '[PATH]'.

Requirements:
- Validate the body with Zod: [FIELDS AND CONSTRAINTS].
- Use parameterized queries / the ORM only. No string-concatenated SQL.
- Wrap the logic in try/catch.
- Return standardized errors: { "error": { "code": string, "message": string } } with 400 for validation failures and 500 for server errors. Never leak stack traces.
- Add a short comment above any security-relevant line.

Return only the code.

Make this prompt yours