xp-practices
关于
This skill helps developers implement Extreme Programming practices like TDD, pair programming, and continuous integration. Use it to improve team collaboration, adopt technical excellence, and establish sustainable agile workflows. It provides actionable guidance on prioritizing and adapting core XP practices for immediate value.
快速安装
Claude Code
推荐/plugin add https://github.com/proffesor-for-testing/agentic-qegit clone https://github.com/proffesor-for-testing/agentic-qe.git ~/.claude/skills/xp-practices在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Extreme Programming (XP) Practices
<default_to_action> When applying XP practices:
- START with practices that give immediate value
- BUILD supporting practices gradually
- ADAPT to your context
- MEASURE results
Core XP Practices (Prioritized):
| Practice | Start Here | Why First |
|---|---|---|
| TDD | ✅ Yes | Foundation for everything |
| Continuous Integration | ✅ Yes | Fast feedback |
| Pair Programming | ✅ Yes | Knowledge sharing |
| Collective Ownership | After CI+TDD | Needs safety net |
| Small Releases | After CI | Infrastructure dependent |
Pairing Quick Start:
Driver-Navigator (Classic):
- Driver: Writes code
- Navigator: Reviews, thinks ahead
- Rotate every 20-30 min
Ping-Pong (with TDD):
A: Write failing test
B: Make test pass + refactor
B: Write next failing test
A: Make test pass + refactor
</default_to_action>
Quick Reference Card
The Five XP Values
| Value | Meaning | Practice |
|---|---|---|
| Communication | Everyone knows what everyone does | Daily standups, pairing |
| Simplicity | Simplest thing that works | YAGNI, small design |
| Feedback | Get feedback early and often | TDD, CI, short iterations |
| Courage | Tell truth, adapt | Refactor, admit mistakes |
| Respect | Everyone contributes value | Sustainable pace, pairing |
Core Practices
| Practice | Description | Benefit |
|---|---|---|
| Pair Programming | Two devs, one workstation | Quality + knowledge sharing |
| TDD | Red-Green-Refactor | Confidence + design |
| CI | Integrate multiple times/day | Fast feedback |
| Collective Ownership | Anyone can change anything | No bottlenecks |
| Sustainable Pace | 40-hour weeks | Long-term productivity |
| Small Releases | Ship frequently | Risk reduction |
Pair Programming
When to Pair
| Context | Pair? | Why |
|---|---|---|
| Complex/risky code | ✅ Always | Needs multiple perspectives |
| New technology | ✅ Always | Learning accelerator |
| Onboarding | ✅ Always | Knowledge transfer |
| Critical bugs | ✅ Always | Two heads better |
| Simple tasks | ❌ Skip | Not worth overhead |
| Research spikes | ❌ Skip | Pair to discuss findings |
Pairing Dos and Don'ts
Do:
- ✅ Switch roles every 20-30 min
- ✅ Take breaks together
- ✅ Think out loud
- ✅ Ask questions
- ✅ Keep sessions 2-4 hours max
Don't:
- ❌ Grab keyboard without asking
- ❌ Check phone while pairing
- ❌ Dominate conversation
- ❌ Pair all day (exhausting)
Ensemble (Mob) Programming
Setup: 3+ developers, one screen, rotating driver
[Screen]
↓
[Driver] ← Directions from navigators
↑
[Navigator 1] [Navigator 2] [Navigator 3]
Rotation: Driver switches every 5-10 min
Best for:
- Complex problem solving
- Architectural decisions
- Learning new frameworks
- Resolving blockers
Continuous Integration
CI Workflow:
1. Pull latest from main
2. Make small change (<2 hrs work)
3. Run tests locally (all pass)
4. Commit and push
5. CI runs tests automatically
6. If fail → fix immediately
Best Practices:
- Commit frequently (small changes)
- Keep build fast (<10 min)
- Fix broken builds immediately
- Never commit to broken build
Four Rules of Simple Design
(In priority order)
- Passes all tests - Works correctly
- Reveals intention - Clear, expressive code
- No duplication - DRY principle
- Fewest elements - No speculative code
Agent Integration
// Agent-human pair testing
const charter = "Test payment edge cases";
const tests = await Task("Generate Tests", { charter }, "qe-test-generator");
const reviewed = await human.review(tests);
await Task("Implement", { tests: reviewed }, "qe-test-generator");
// Continuous integration with agents
await Task("Risk Analysis", { prDiff }, "qe-regression-risk-analyzer");
await Task("Generate Tests", { changes: prDiff }, "qe-test-generator");
await Task("Execute Tests", { scope: 'affected' }, "qe-test-executor");
// Sustainable pace: agents handle grunt work
const agentWork = ['regression', 'data-generation', 'coverage-analysis'];
const humanWork = ['exploratory', 'risk-assessment', 'strategy'];
Agent Coordination Hints
Memory Namespace
aqe/xp-practices/
├── pairing-sessions/* - Pair/ensemble session logs
├── ci-metrics/* - CI health metrics
├── velocity/* - Team velocity data
└── retrospectives/* - XP retrospective notes
Fleet Coordination
const xpFleet = await FleetManager.coordinate({
strategy: 'xp-workflow',
agents: [
'qe-test-generator', // TDD support
'qe-test-executor', // CI integration
'qe-code-reviewer' // Collective ownership
],
topology: 'parallel'
});
Common Objections
| Objection | Response |
|---|---|
| "Pairing is 2x slower" | 15% slower writing, 15% fewer bugs, net positive |
| "No time for TDD" | Debugging takes longer than testing |
| "CI is hard to setup" | Start simple: one action, one test |
| "Collective ownership = chaos" | Only without tests + CI |
Related Skills
- tdd-london-chicago - TDD deep dive
- refactoring-patterns - Safe refactoring
- pair-programming - AI-assisted pairing
Remember
XP practices work as a system. Don't cherry-pick randomly:
- TDD enables collective ownership
- CI enables small releases
- Pairing enables collective ownership
- Sustainable pace enables everything
With Agents: Agents amplify XP. Pair humans with agents. Agents handle repetitive work, humans provide judgment and creativity.
GitHub 仓库
相关推荐技能
sparc-methodology
开发SPARC Methodology为开发者提供了一套从需求分析到部署监控的17种开发模式,通过多智能体协作实现系统化软件开发。它支持TDD工作流和架构设计,适用于复杂项目的全生命周期管理。开发者可以按需调用特定模式来提升代码质量和开发效率。
tdd-london-chicago
其他该Skill帮助开发者在测试驱动开发中选择伦敦学派(基于模拟)或芝加哥学派(基于状态)的测试风格。它能根据代码类型(领域逻辑或外部依赖)推荐合适的测试方法,并指导完整的“红-绿-重构”TDD周期。适用于实践TDD或为特定上下文选择测试策略的开发场景。
sparc-methodology
开发SPARC Methodology是一个系统化的多智能体开发框架,提供从需求规范到代码完成的17种专项模式。它通过Specification、Pseudocode、Architecture、Refinement、Completion五个阶段,结合TDD工作流和智能体编排,帮助开发者结构化地构建复杂软件系统。该Skill特别适合需要严谨架构设计、团队协作或处理大型项目的开发场景。
github-project-management
其他该Skill为开发者提供全面的GitHub项目管理能力,支持团队协同的问题跟踪、项目板自动化和迭代规划。它通过AI群体协调实现智能问题管理和项目板同步,特别适合需要自动化管理GitHub项目的开发团队。使用前需配置GitHub CLI和MCP服务器,并具备仓库访问权限。
