# ad-hoc-pair-programming — Pair Programming Prompt & Workflow

A new `pair-programming.prompt.md` that drives implementation one step at a time with explicit human approval before each commit. The coding agent derives the step list from the approved `implementation-plan.md` (falling back to `requirements.md`), implements exactly one step, presents a concise summary, and waits. Inline corrections re-trigger the current step without committing. An explicit approval keyword triggers a commit and advances to the next step. This tight feedback loop keeps each reviewable chunk small, makes mid-course corrections cheap, and produces a clean, independently-reviewable commit per step.

**Commit:** `feat: add pair-programming prompt with step-locked human approval loop`

---

## What Changed

- Created `.github/prompts/pair-programming.prompt.md` — new workflow prompt
- Updated `.github/base/prompts-definition.md` — registered the new prompt
- Updated `AGENTS.md` — added prompt row to Section 6 catalogue table

---

## Acceptance Criteria

- AC-1: A `pair-programming.prompt.md` file exists in `.github/prompts/`.
- AC-2: The prompt reads `requirements.md` and `implementation-plan.md` at session start and derives the ordered step list from them; if `implementation-plan.md` is absent, falls back to the `## Implementation Plan` section of `requirements.md`.
- AC-3: The prompt implements exactly one step per round and pauses with a concise summary before any commit.
- AC-4: Any non-approval reply (inline correction, question, or feedback) is treated as a correction — the agent re-implements the step and presents a new diff before waiting for approval again.
- AC-5: An explicit approval keyword (`ok`, `works`, `approved`, `looks good`, `yes`, `proceed`, `next`) commits the step with the message `feat/fix: step X -- <description> <TICKET_ID>` and advances to the next step.
- AC-6: For medium/large steps (≥3 files changed, or any new export/interface), `typecheck` and `lint` pass before the step is presented to the human.
- AC-7: Cache and findings are updated after every step is committed.
- AC-8: Ad-hoc mode is supported — if no approved `requirements.md` exists, the user provides a description and the agent creates a minimal step list; TICKET_ID defaults to `NOISSUE`.

