Skip to main content

Claude/ChatGPT (or Cursor) Prompt to Plan a Multi-File Feature First

Force any AI coding assistant to produce a multi-file implementation plan before writing code, grouped by layer with risk and commit boundaries.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt

                                

What this prompt does

This prompt forces an AI coding assistant to act as a senior staff engineer who plans a multi-file feature before writing a single line of code. It frames the request around four context variables — [feature_name], [stack], [conventions], and [constraints] — then demands a structured plan: files grouped by layer, a migration sketch, API and contract impact with breaking-change flags, per-file risk ratings, suggested commit boundaries, and open questions. It ends with an explicit instruction to stop and wait for approval.

The structure works because it converts a vague "build this feature" request into a reviewable artifact. By naming [conventions] (for example, Form Requests, service classes, PHPUnit) the model stays inside your repo's existing patterns instead of inventing its own. [constraints] like "no breaking API changes" or "ship behind a feature flag" become hard rails the plan must respect. The approval gate is the load-bearing part: it stops the assistant from sprinting into a sprawling diff before you've sanity-checked the shape.

When to use it

  • Before starting any feature that touches more than two or three files
  • When the change spans layers (routing, service, model, view, test) and order matters
  • When a feature includes a database migration you want reviewed before it lands
  • When you need clean, individually reviewable commits rather than one giant diff
  • When working with a junior or an agent that tends to over-build without a map
  • When a feature must respect hard constraints like feature flags or API compatibility

Example output

You get a checklist-style plan, not code. Expect a grouped file list (routing / service / model / view / test), a short migration sketch for any schema change, a section flagging public API or contract impact, a per-file risk table marked low / medium / high with reasons, a suggested sequence of commit boundaries, and a list of open questions the assistant needs answered. Each item is concrete enough to act on rather than a vague gesture at the work, and the commit boundaries are ordered so that the first commit is the safest place to start. It then stops and waits for your go-ahead, which is the moment to challenge any file you didn't expect to see in the list or any risk rating that looks too optimistic.

Pro tips

  • Fill [conventions] with the specifics your repo actually enforces — vague conventions produce vague plans
  • Use [constraints] to encode the non-negotiables (no breaking changes, behind a flag) so they shape every step
  • Keep [feature_name] narrow; one cohesive feature plans far better than a bundle of loosely related changes
  • Read the open-questions section first — that's usually where the real ambiguity hides
  • If the risk ratings feel hand-wavy, ask it to justify each one before you approve
  • Never skip the approval gate; the cheapest bug to fix is the one you catch in the plan

Frequently Asked Questions

Does this prompt write any code?
No, and that is the point. It explicitly instructs the assistant to write no code until you approve, returning only a structured plan as a checklist. You review the file list, migrations, and commit boundaries first, then approve before any implementation begins.
Which AI assistants does this work with?
It works with any capable chat-based coding assistant such as Claude or ChatGPT, and with editor-integrated tools like Cursor. The prompt is model-agnostic because it relies on plain instructions and your context variables rather than any vendor-specific feature.
What should I put in the conventions variable?
List the patterns your repository actually enforces, like Form Requests for validation, service classes, or PHPUnit over Pest. The more specific you are, the closer the plan stays to code a senior engineer on your team would actually merge.
Can I use this for small single-file changes?
You can, but the value drops sharply. The prompt earns its keep on multi-file features that span layers and need commit boundaries. For a one-line fix, the planning overhead usually outweighs the benefit.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in AI Coding Assistants

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support