03 · Own

AI pair programming

shippedprinciple → decision → workflow → artifact

Principle

Pair programming with AI is synchronous collaboration: you hold context, intent, and accountability; the model holds stamina for boilerplate, search, and first drafts. It is not autopilot. The quality ceiling is still your judgment; the floor rises when you run tight loops.

The habit that separates productive pairs from messy repos: small diffs, explicit intent, immediate verification.

The decision

DEC_010

  Intent (ticket + constraints)
│
▼
Model proposes diff
│
▼
You review ──► reject / edit / accept
│
▼
Verify (run, test, read)
│
▼
Commit with message that states why
The pair loop — intent, diff, verify, commit. Skip a step and debt compounds.

Session hygiene

  1. Start from a clean tree — know what is already dirty; stash unrelated work.
  2. Point at files@path, selections, or “only edit src/auth/.”
  3. State non-goals — “do not add dependencies,” “no schema changes.”
  4. One concern per session — auth fix ≠ sidebar redesign.
  5. Run the verifier — build, test, or manual repro before you move on.
  6. Commit — chat history is not version control.

Review what the model writes

CheckWhy
Does it match the ticket?Scope creep is the default
New dependencies?Each one is a maintenance bet
Error handlingModels love happy paths
Names and typesGarbage names hide wrong logic
SecretsNever accept pasted keys
TestsDid it assert behavior or itself?

If you cannot summarize the diff aloud in thirty seconds, split the task.

Workflow

  1. Write or paste the spec stub — outcome, non-goals, acceptance checks.
  2. Open pair session with repo context (rules file, relevant files).
  3. Implement → review → verify loop until acceptance passes.
  4. You commit; message references the decision, not the model brand.
  5. Note surprises in the ticket — fodder for AGENTS.md updates.

Tooling

Cursor, Claude Code, Copilot, Cody — interchangeable if the loop is disciplined. Terminal access helps; blind acceptance does not.

Common mistakes

Artifacts

Further reading