AI Pair-Programming Mindset
Pairing with AI looks like human-colleague pairing but has different traits. Avoiding both "dumping" and "swallowing" is the biggest trick to leveraging AI.
2 Failure Patterns
Pattern A: Dumping Syndrome
- Ask "do it all" at once
- Adopt the result without reading it
- Hotbed of failure: spec misread, arbitrary assumptions, meaningless refactor
Pattern B: Swallowing Syndrome
- Adopt AI output as-is without reading
- "It runs" only, no quality check
- Hotbed of failure: bugs, security vulnerabilities, useless dependency additions, meaningless comments
Principles of Good Pairing
1. Split Tasks Small
Over "implement feature X entirely," stage it: "1 type defs → 2 core function → 3 error handling → 4 tests." Confirm/fix at each stage.
2. Share Context
Tell AI "what this project aims for," "why this design." Use CLAUDE.md or Cursor Rules.
3. Have AI Talk Through the Plan
Before implementing, ask "how will you implement? first give 3 plans." You can course-correct at the design stage.
4. Read the Code
Read all of AI's code. For parts you don't understand, have AI explain "what does this do?" Adopt only code you understand.
5. Guarantee with Tests
Best chemistry with "test-first." Write tests first and ask "make these pass." Without tests, neither AI nor you can be confident.
Phrase Collection for Asking
Planning Stage
"I want to implement feature X. First make a plan. List file structure, data flow, exceptions to consider as bullets"
Implementation Stage
"Plan OK. First implement from file A. Don't touch B and C"
Confirmation Stage
"Point out 5 problems with the implemented code. If none, reply 'none'"
Test Stage
"Write tests for this code. At least one each: normal, abnormal, edge case"
Requests to Avoid
- "Make it nice": too vague
- "Fix everything": scope too broad
- "Optimize": what's optimal is vague
- "Refactor": goal unclear
Signs AI Is "Anxious"
- Frequent "I think..."
- Re-reading the same file repeatedly
- Spec questions increase
- → Lack of context. Add details
Signs AI Is "Overconfident"
- Says "complete" without running tests
- Confidently calls APIs it hasn't used
- → Demand "actually run and confirm"
In-Session Review
- Every 30 min: "summarize the changes so far"
- Every hour: "where's a good commit break?"
- At session end: "5 next TODOs"
Team Operation
- AI-generated code also requires review
- An "AI-generated" flag in commit messages (optional)
- Unify everyone's AI output with Skills / Rules
- Share bad AI-generated examples for team learning
Long-Term Habits
- 30+ min/day working with AI: you get the feel
- Record prompts that worked: turn into personal Skills
- Share failure cases: into team knowledge
Next Step
Guardrail design when introducing AI to an existing codebase is in the next article.