AI Coding Assistants

Pair Programming With AI, The Solo Developer's Way

Pair programming used to mean one person coding, one person reviewing. Today solo developers run the same loop alone — generator on the left, reviewer on the right — using a single AI coding assistant for both roles. This article breaks down the prompt structure, review cadence, and collaboration loops that keep AI-generated code fast and correct.

FreeLast tested: 2026-07-28Audience: Solo developers, small teams

Why solo developers pair with AI

The original pair-programming model had two jobs: the driver writes code, the navigator catches mistakes and spots blind spots. Solo developers used to do both sequentially, which slows iteration and lets errors accumulate. Modern AI coding assistants — GitHub Copilot, Cursor, Claude, ChatGPT — let you split those two jobs in real time.

The key insight is not to ask the assistant to "write the whole feature." That is the single most common mistake. Instead you run a generator / reviewer split: one prompt produces a solution, the next prompt plays navigator and finds the weaknesses before you ever commit.

RoleWhat it doesWho plays it
DriverWrites the code, commits, integratesYou (with AI autocomplete)
NavigatorReviews for correctness, edge cases, styleAI in a second prompt session
ArchitectDecides structure before writing beginsYou + AI, before coding

The three-pass loop

A reliable pair-programming loop with AI has three passes. Skip any of them and you end up with code that compiles but is hard to maintain.

Pass 1 — Architect before writing

Before you write a line, describe the feature to the assistant in plain language and ask for a structural plan, not code. This surfaces requirements you had not thought about.

Describe this feature: a user-auth module for a FastAPI service, with email + password login and JWT tokens. Don't write code yet. List the files, the data flow, the failure modes I should handle, and the dependencies. Call out anything you need from me before writing.

Pass 2 — Generate in small slices

Generate one file or one function at a time. If the assistant outputs 300 lines, it is too much. Slice the output to < 100 lines per prompt and review each slice before moving on. See our earlier article on onboarding with AI coding assistants for the right context window size.

Pass 3 — Review in a separate session

Open a fresh chat and paste the generated code back in. Ask the assistant to review it as a senior engineer, not to improve it. Force it to find problems first, then suggest fixes. This second session is the real pair-programming moment.

Prompt templates for each role

These three templates cover 90% of solo-pair sessions. Save them locally and reuse them.

Architect prompt

I'm building [feature]. Target stack: [stack]. Users: [who]. Constraints: [perf, compliance, scale]. Before writing code, list: 1. Files and modules I'll need. 2. Data flow from input to output. 3. Three likely failure modes and how we handle each. 4. What you need from me before you write.

Driver prompt

Implement [single function / file] for [feature]. Acceptance criteria: [3 bullet points]. Write only this slice. No surrounding files. Type hints, docstring, one edge-case test. If you'd need more context, say so first.

Navigator (review) prompt

Review this code as a senior engineer doing a code review. 1. List every bug or correctness issue. 2. List style or readability problems. 3. Suggest the minimal fixes, not a rewrite. 4. Rate overall quality 1-10. Code: [ paste here ]

For a deeper look at structured code review with AI, see our article on AI code review workflows.

Common failure modes

These are the mistakes that turn AI pair programming into slow, brittle code generation.

Making it sustainable

The loop only works if you stay in control. The assistant is the navigator, not the driver. Keep three rules:

  1. You write the acceptance criteria.
  2. You choose what to commit and what to throw away.
  3. You run the tests — AI does not ship code for you.

This pattern scales to small teams. When you grow from one developer to three, the same three-pass loop applies: the team decides the architecture, each person generates and reviews their own slices, and the code review pass catches cross-file issues. Pair programming is not about having another human in the room anymore — it is about having another voice in the loop. AI is that voice, as long as you drive.

Related reading