Pair Programming
Collaborative AI pair programming with intelligent role management, real-time quality monitoring, and comprehensive development workflows.
Behavioral Classification
Type: Interactive Exploration
This skill engages in ongoing dialogue throughout the programming session. Expect frequent interaction and collaboration as we work together.
Interaction Pattern:
- I'll ask clarifying questions as we code
- Role switching prompts at intervals (in switch mode)
- Continuous feedback on code quality
- Real-time suggestions and reviews
What This Skill Does
This skill provides professional pair programming capabilities with AI assistance, supporting multiple collaboration modes, continuous verification, and integrated testing.
Key Capabilities:
- Multiple Modes: Driver, Navigator, Switch, TDD, Review, Mentor, Debug
- Real-Time Verification: Automatic quality scoring with rollback on failures
- Role Management: Seamless switching between driver/navigator roles
- Testing Integration: Auto-generate tests, track coverage, continuous testing
- Code Review: Security scanning, performance analysis, best practice enforcement
- Session Persistence: Auto-save, recovery, export, and sharing
Prerequisites
Required:
- Claude Flow CLI installed (
npm install -g claude-flow@alpha)
- Git repository (optional but recommended)
Recommended:
- Testing framework (Jest, pytest, etc.)
- Linter configured (ESLint, pylint, etc.)
- Code formatter (Prettier, Black, etc.)
Quick Start
Basic Session
# Start simple pair programming
claude-flow pair --start
TDD Session
# Test-driven development
claude-flow pair --start \
--mode tdd \
--test-first \
--coverage 90
Expert Refactoring
# High-quality refactoring session
claude-flow pair --start \
--agent senior-dev \
--focus refactor \
--verify \
--threshold 0.98
Sub-Documentation
For detailed information, see the following files:
| Document |
Contents |
| Modes |
Driver, Navigator, Switch, TDD, Review, Mentor, Debug modes |
| Commands |
All in-session commands with aliases |
| Configuration |
Config files, profiles, environment variables |
| Examples |
Real-world session examples |
Quick Reference
Available Modes
| Mode |
Description |
Best For |
| Driver |
You write code, AI navigates |
Learning, familiar features |
| Navigator |
AI writes code, you direct |
Rapid prototyping, generation |
| Switch |
Alternating roles at intervals |
Long sessions, knowledge sharing |
| TDD |
Test-driven development |
Building with tests |
| Review |
Continuous code review |
Quality focus |
| Mentor |
Learning-focused |
Learning priority |
| Debug |
Problem-solving |
Fixing issues |
Essential Commands
| Command |
Alias |
Purpose |
/suggest |
/s |
Get improvement suggestions |
/explain |
/e |
Explain code |
/test |
/t |
Run tests |
/review |
/r |
Code review |
/commit |
/c |
Commit with verification |
/switch |
/sw |
Switch roles |
/status |
/st |
Session status |
Session Control
# Check status
claude-flow pair --status
# Pause session
/pause [--reason <reason>]
# Resume session
/resume
# End session
claude-flow pair --end [--save] [--report]
Quality Thresholds
| Metric |
Error |
Warning |
Good |
Excellent |
| Truth Score |
<0.90 |
0.90-0.95 |
0.95-0.98 |
>0.98 |
| Coverage |
<70% |
70-80% |
80-90% |
>90% |
| Complexity |
>15 |
10-15 |
5-10 |
<5 |
Built-in Agents
| Agent |
Expertise |
Style |
senior-dev |
Architecture, patterns, optimization |
Thorough |
tdd-specialist |
Testing, mocks, coverage |
Test-first |
debugger-expert |
Debugging, profiling, tracing |
Analytical |
junior-dev |
Learning, basics, documentation |
Educational |
Session Templates
# Quick templates
claude-flow pair --template refactor # High verification (0.98)
claude-flow pair --template feature # Standard verification (0.95)
claude-flow pair --template debug # Problem-solving focus
claude-flow pair --template learn # Mentor mode, slow pace
Best Practices
Session Practices
- Clear Goals - Define session objectives upfront
- Appropriate Mode - Choose based on task type
- Enable Verification - For critical code paths
- Regular Testing - Maintain quality continuously
- Session Notes - Document important decisions
- Regular Breaks - Take breaks every 45-60 minutes
Mode Selection
- Driver Mode: When learning, controlling implementation
- Navigator Mode: For rapid prototyping, generation
- Switch Mode: Long sessions, balanced collaboration
- TDD Mode: Building with tests
- Review Mode: Quality focus
- Mentor Mode: Learning priority
- Debug Mode: Fixing issues
Related Commands
claude-flow pair --help - Show help
claude-flow pair config - Manage configuration
claude-flow pair profile - Manage profiles
claude-flow pair templates - List templates
claude-flow pair agents - List available agents
1---2name: pair-programming-63description: AI-assisted pair programming with multiple modes (driver/navigator/switch), real-time verification, quality monitoring, and comprehensive testing. Supports TDD, debugging, refactoring, and learning sessions. Features automatic role switching, continuous code review, security scanning, and performance optimization with truth-score verification.4---5
6# Pair Programming
7
8Collaborative AI pair programming with intelligent role management, real-time quality monitoring, and comprehensive development workflows.
9
10## Behavioral Classification
11
12**Type**: Interactive Exploration
13
14This skill engages in ongoing dialogue throughout the programming session. Expect frequent interaction and collaboration as we work together.
15
16**Interaction Pattern**:
17- I'll ask clarifying questions as we code
18- Role switching prompts at intervals (in switch mode)
19- Continuous feedback on code quality
20- Real-time suggestions and reviews
21
22---
23
24## What This Skill Does
25
26This skill provides professional pair programming capabilities with AI assistance, supporting multiple collaboration modes, continuous verification, and integrated testing.
27
28**Key Capabilities:**
29- **Multiple Modes**: Driver, Navigator, Switch, TDD, Review, Mentor, Debug
30- **Real-Time Verification**: Automatic quality scoring with rollback on failures
31- **Role Management**: Seamless switching between driver/navigator roles
32- **Testing Integration**: Auto-generate tests, track coverage, continuous testing
33- **Code Review**: Security scanning, performance analysis, best practice enforcement
34- **Session Persistence**: Auto-save, recovery, export, and sharing
35
36---
37
38## Prerequisites
39
40**Required:**
41- Claude Flow CLI installed (`npm install -g claude-flow@alpha`)
42- Git repository (optional but recommended)
43
44**Recommended:**
45- Testing framework (Jest, pytest, etc.)
46- Linter configured (ESLint, pylint, etc.)
47- Code formatter (Prettier, Black, etc.)
48
49---
50
51## Quick Start
52
53### Basic Session
54```bash
55# Start simple pair programming
56claude-flow pair --start
57```
58
59### TDD Session
60```bash
61# Test-driven development
62claude-flow pair --start \
63 --mode tdd \
64 --test-first \
65 --coverage 90
66```
67
68### Expert Refactoring
69```bash
70# High-quality refactoring session
71claude-flow pair --start \
72 --agent senior-dev \
73 --focus refactor \
74 --verify \
75 --threshold 0.98
76```
77
78---
79
80## Sub-Documentation
81
82For detailed information, see the following files:
83
84| Document | Contents |
85|----------|----------|
86| [Modes](./modes.md) | Driver, Navigator, Switch, TDD, Review, Mentor, Debug modes |
87| [Commands](./commands.md) | All in-session commands with aliases |
88| [Configuration](./configuration.md) | Config files, profiles, environment variables |
89| [Examples](./examples.md) | Real-world session examples |
90
91---
92
93## Quick Reference
94
95### Available Modes
96
97| Mode | Description | Best For |
98|------|-------------|----------|
99| **Driver** | You write code, AI navigates | Learning, familiar features |
100| **Navigator** | AI writes code, you direct | Rapid prototyping, generation |
101| **Switch** | Alternating roles at intervals | Long sessions, knowledge sharing |
102| **TDD** | Test-driven development | Building with tests |
103| **Review** | Continuous code review | Quality focus |
104| **Mentor** | Learning-focused | Learning priority |
105| **Debug** | Problem-solving | Fixing issues |
106
107### Essential Commands
108
109| Command | Alias | Purpose |
110|---------|-------|---------|
111| `/suggest` | `/s` | Get improvement suggestions |
112| `/explain` | `/e` | Explain code |
113| `/test` | `/t` | Run tests |
114| `/review` | `/r` | Code review |
115| `/commit` | `/c` | Commit with verification |
116| `/switch` | `/sw` | Switch roles |
117| `/status` | `/st` | Session status |
118
119### Session Control
120
121```bash
122# Check status
123claude-flow pair --status
124
125# Pause session
126/pause [--reason <reason>]
127
128# Resume session
129/resume
130
131# End session
132claude-flow pair --end [--save] [--report]
133```
134
135### Quality Thresholds
136
137| Metric | Error | Warning | Good | Excellent |
138|--------|-------|---------|------|-----------|
139| **Truth Score** | <0.90 | 0.90-0.95 | 0.95-0.98 | >0.98 |
140| **Coverage** | <70% | 70-80% | 80-90% | >90% |
141| **Complexity** | >15 | 10-15 | 5-10 | <5 |
142
143### Built-in Agents
144
145| Agent | Expertise | Style |
146|-------|-----------|-------|
147| `senior-dev` | Architecture, patterns, optimization | Thorough |
148| `tdd-specialist` | Testing, mocks, coverage | Test-first |
149| `debugger-expert` | Debugging, profiling, tracing | Analytical |
150| `junior-dev` | Learning, basics, documentation | Educational |
151
152---
153
154## Session Templates
155
156```bash
157# Quick templates
158claude-flow pair --template refactor # High verification (0.98)
159claude-flow pair --template feature # Standard verification (0.95)
160claude-flow pair --template debug # Problem-solving focus
161claude-flow pair --template learn # Mentor mode, slow pace
162```
163
164---
165
166## Best Practices
167
168### Session Practices
1691. **Clear Goals** - Define session objectives upfront
1702. **Appropriate Mode** - Choose based on task type
1713. **Enable Verification** - For critical code paths
1724. **Regular Testing** - Maintain quality continuously
1735. **Session Notes** - Document important decisions
1746. **Regular Breaks** - Take breaks every 45-60 minutes
175
176### Mode Selection
177- **Driver Mode**: When learning, controlling implementation
178- **Navigator Mode**: For rapid prototyping, generation
179- **Switch Mode**: Long sessions, balanced collaboration
180- **TDD Mode**: Building with tests
181- **Review Mode**: Quality focus
182- **Mentor Mode**: Learning priority
183- **Debug Mode**: Fixing issues
184
185---
186
187## Related Commands
188
189- `claude-flow pair --help` - Show help
190- `claude-flow pair config` - Manage configuration
191- `claude-flow pair profile` - Manage profiles
192- `claude-flow pair templates` - List templates
193- `claude-flow pair agents` - List available agents