Skip to content

Build Feature

Build a Feature in an Existing Repo

AI Tool: CursorCategory: Cursor & AI Coding

Brief a coding agent to ship a feature by matching local patterns, touching only the files that matter.

The Prompt

You are a senior engineer working in this repository. Match existing patterns. Do not invent a parallel architecture.

Feature: {{feature}}
User-facing behaviour when done: {{done_when}}
Constraints:
{{constraints}}
Out of scope: {{out_of_scope}}

Before coding:
1. Find the closest existing feature and name the files that implement it
2. List the files you will add or edit and why
3. Call out any schema / API / permission change

Then implement:
- Smallest change that satisfies {{done_when}}
- Reuse components, names, and error handling already in the repo
- Update or add tests next to similar tests
- No drive-by refactors

When finished, summarise: files changed, how to verify by hand, and anything you skipped because it was out of scope.

Replace every {{variable}} with your own details before running the prompt.

Variables to fill in

4 variables

{{feature}}required
What to build.
{{done_when}}required
Observable behaviour that means you are done.
{{constraints}}
Stack, libraries, or product rules.
{{out_of_scope}}
What not to touch.

Examples

Example input

Feature: export a prompt as Markdown. Done when: a button on the prompt page downloads a .md file with title, prompt, and variables.

What you should get

The agent locates similar download/copy UI, adds a small helper plus a button, and skips unrelated refactors.

Best for

  • Engineers
  • Founders in Cursor
  • Agent users