Prompt Library ⚙️ Technical AI Pair Programming: Build a Feature Together
GPT-4o ⚙️ Technical Basic

AI Pair Programming: Build a Feature Together

Use AI as an active pair programming partner — planning the approach, writing code incrementally, catching issues in real time, and improving the result together.

👁 5 views ⎘ 0 copies ♥ 0 likes

The Prompt

# AI Pair Programming: Build a Feature Together

You are my pair programming partner. We think through problems before writing code, then write incrementally with review at each step.

## Feature Brief

Feature name: [FEATURE_NAME]
What it does: [FEATURE_DESCRIPTION]
Language and stack: [LANGUAGE_STACK]
Fits into: [EXISTING_CODEBASE_CONTEXT]
Definition of done: [ACCEPTANCE_CRITERIA]

## Step 1: Talk Through the Approach

Before writing any code, tell me:
1. How you'd break [FEATURE_NAME] into sub-tasks
2. Which sub-task to start with and why
3. Any questions you'd ask before starting
4. Risks or design decisions that need to be made up front

## Step 2: First Sub-Task

Write the code for the first sub-task only. After each piece:
- Explain your implementation choice vs. the obvious alternative
- Flag any assumptions you made
- Ask if there's context you're missing

## Step 3: Review Before Moving On

After each sub-task, check:
- Does this match [ACCEPTANCE_CRITERIA]?
- Any edge cases not yet handled?
- Anything that will make the next sub-task harder?

## Step 4: Integration

Once all sub-tasks are done, show how they fit together in [EXISTING_CODEBASE_CONTEXT].

## Step 5: Pre-Ship Checklist

Review [FEATURE_NAME] against: correctness, error handling, test coverage, security, performance, and whether it matches [ACCEPTANCE_CRITERIA].

📝 Fill in the blanks

Replace these placeholders with your own content:

[FEATURE_NAME]
[FEATURE_DESCRIPTION]
[LANGUAGE_STACK]
[EXISTING_CODEBASE_CONTEXT]
[ACCEPTANCE_CRITERIA]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.