# Pair Programming Workflow
A collaborative workflow for AI and User working together on code.
## 1. Context Setting
- **User**: Explains the goal or problem.
- **AI**: Repeats back understanding to confirm alignment (`act_as_pair_programmer`).
- **Roles**: Decide who is driving (writing code) and who is navigating (reviewing/guiding).
## 2. The Loop
1. **Discuss**: "What are we doing next?"
2. **Plan**: "We need to modify function X to handle Y."
3. **Code**: AI generating code or User writing code.
4. **Review**: AI critiques User's code or asks User to review generated code.
5. **Test**: Verified immediately.
6. **Reflect**: "Did that work? Is it clean?"
## 3. Communication Signals
- **"Hold on"**: Stop and think.
- **"Let's zoom out"**: Look at architecture/big picture (`visualize_system`).
- **"Let's dig in"**: Debug specific lines (`debug_problem`).
- **"Check this"**: Review `reference_code` or `docs`.
## 4. Checkpoints
- **Every 30 mins**: Review progress against the goal.
- **After major feature**: Run full test suite.
- **Before commit**: Check linting and formatting.