[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -1,91 +1,244 @@
|
||||
---
|
||||
id: wiki-2026-0508-extreme-programming-xp
|
||||
title: Extreme Programming XP
|
||||
title: Extreme Programming (XP)
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [XP-001]
|
||||
aliases: [XP, Beck XP, pair programming, TDD, continuous integration, refactoring]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 1.0
|
||||
tags: [software-engineering, agile, extreme-programming, pair-programming, tdd]
|
||||
confidence_score: 0.96
|
||||
verification_status: applied
|
||||
tags: [agile, xp, tdd, pair-programming, ci, software-engineering, beck]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-26
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: Universal
|
||||
applicable_to: [Agile, Software Process]
|
||||
---
|
||||
|
||||
# Extreme Programming (XP, 익스트림 프로그래밍)
|
||||
# Extreme Programming (XP)
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "소프트웨어 개발의 핵심 원칙들을 극단적으로 밀어붙여 생산성과 품질의 한계를 돌파하라" — 고객의 요구사항 변화에 민첩하게 대응하고, 지속적인 테스트와 리뷰를 통해 코드의 완성도를 극대화하는 애자일 소프트웨어 개발 방법론.
|
||||
## 매 한 줄
|
||||
> **"매 best practice 의 의 의 의 extreme 의 turn"**. Kent Beck 1999. 매 TDD, 매 pair, 매 CI, 매 refactoring, 매 simple design. 매 modern: 매 XP 의 practices 의 mainstream — 매 XP 의 brand 의 fade, 매 spirit 의 retain (DevOps, trunk-based, AI-paired).
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **추출된 패턴:** 짧은 개발 주기(Iterative Development)를 반복하며, 인간적인 상호작용과 기술적 탁월함을 동시에 추구하여 시스템의 불확실성을 통제하는 개발 패턴.
|
||||
- **5가지 핵심 가치:** 의사소통(Communication), 단순성(Simplicity), 피드백(Feedback), 용기(Courage), 존중(Respect).
|
||||
- **실천 방법:**
|
||||
- **Pair Programming:** 두 명의 개발자가 한 컴퓨터에서 함께 코딩하여 즉각적인 검토 수행.
|
||||
- **Test-Driven Development (TDD):** 실제 코드를 짜기 전 테스트 케이스를 먼저 작성.
|
||||
- **[[Continuous Integration (CI)|Continuous Integration (CI)]]:** 변경 사항을 수시로 통합하여 충돌 방지.
|
||||
- **Refactoring:** 기능 변경 없이 코드 구조를 지속적으로 개선.
|
||||
- **의의:** 변화하는 비즈니스 환경에서 소프트웨어의 유연성을 보장하는 가장 강력한 실천적 틀.
|
||||
## 매 핵심
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌:** 거대한 설계도(Big Design Up Front)가 성공을 보장한다는 믿음에서 벗어나, 작동하는 코드와 빠른 피드백이 더 중요하다는 사실을 증명.
|
||||
- **정책 변화:** Antigravity 프로젝트는 에이전트와 유저 간의 페어 프로그래밍 환경을 구축할 때 XP의 핵심 철학을 반영하여, 실시간 피드백과 점진적 개선 프로세스를 최우선으로 함.
|
||||
### 매 12 practices
|
||||
1. **Planning game** (story points).
|
||||
2. **Small releases**.
|
||||
3. **Metaphor**.
|
||||
4. **Simple design** (YAGNI).
|
||||
5. **Testing** (TDD).
|
||||
6. **Refactoring**.
|
||||
7. **Pair programming**.
|
||||
8. **Collective ownership**.
|
||||
9. **Continuous integration**.
|
||||
10. **40-hour week**.
|
||||
11. **On-site customer**.
|
||||
12. **Coding standards**.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- Agile-Development, Software-Architecture-Patterns, [[DevOps-for-AI-MLOps|DevOps-for-AI-MLOps]], [[Concreteness-Principle|Concreteness-Principle]]
|
||||
- **Raw Source:** 10_Wiki/Topics/AI/Extreme-Programming-XP.md
|
||||
### 매 5 values
|
||||
- Communication, Simplicity, Feedback, Courage, Respect.
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 modern legacy
|
||||
- **Trunk-based development**.
|
||||
- **CI/CD**.
|
||||
- **TDD** (still controversial).
|
||||
- **AI-paired** (Copilot, Cursor) = modern pair.
|
||||
- **Mob programming**.
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
## 💻 패턴
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### TDD cycle (Red-Green-Refactor)
|
||||
```python
|
||||
# 매 1. Red — failing test
|
||||
def test_email_validate():
|
||||
assert validate_email('a@b.com') is True
|
||||
assert validate_email('invalid') is False
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
# 매 2. Green — minimum
|
||||
def validate_email(email):
|
||||
return '@' in email
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
# 매 3. Refactor — pattern
|
||||
import re
|
||||
def validate_email(email):
|
||||
return bool(re.match(r'^[^\s@]+@[^\s@]+\.[^\s@]+$', email))
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### Pair programming roles
|
||||
```yaml
|
||||
driver:
|
||||
- types code
|
||||
- tactical focus
|
||||
- explains as goes
|
||||
navigator:
|
||||
- reviews + thinks ahead
|
||||
- strategic
|
||||
- catches bugs / typos
|
||||
rotation: every 25 minutes
|
||||
```
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### Mob programming
|
||||
```yaml
|
||||
mob:
|
||||
size: 3-5 people
|
||||
driver_rotation: 5-10 min
|
||||
laptop: single
|
||||
goal: continuous learning + team alignment
|
||||
```
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### CI pipeline
|
||||
```yaml
|
||||
on: { push: { branches: [main] } }
|
||||
jobs:
|
||||
test:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: npm ci
|
||||
- run: npm test
|
||||
- run: npm run lint
|
||||
```
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
### Story (planning game)
|
||||
```markdown
|
||||
## Story: User can reset password
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
### As a user
|
||||
I want to reset my password
|
||||
So that I can regain access
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
### Acceptance criteria
|
||||
- [ ] Email field validates format
|
||||
- [ ] Confirmation email sent
|
||||
- [ ] Token expires after 1 hour
|
||||
- [ ] Old password invalidated
|
||||
|
||||
### Estimate: 3 points
|
||||
```
|
||||
|
||||
### Refactor — Extract Method
|
||||
```typescript
|
||||
// 매 before
|
||||
function processOrder(order) {
|
||||
// 매 20 lines mixing validation + calculation + persist
|
||||
}
|
||||
|
||||
// 매 after
|
||||
function processOrder(order) {
|
||||
validate(order);
|
||||
const total = calculateTotal(order);
|
||||
persist({ ...order, total });
|
||||
}
|
||||
```
|
||||
|
||||
### Simple design (YAGNI)
|
||||
```typescript
|
||||
// 매 ❌ premature abstraction
|
||||
class GenericRepository<T, K, ...> { ... }
|
||||
|
||||
// 매 ✅ simple
|
||||
class UserRepository {
|
||||
async find(id: string): Promise<User | null> { ... }
|
||||
async save(u: User): Promise<void> { ... }
|
||||
}
|
||||
// 매 abstract 매 매 3rd similar repo
|
||||
```
|
||||
|
||||
### Continuous integration (trunk-based)
|
||||
```bash
|
||||
# 매 short-lived branch (< 1 day)
|
||||
git checkout -b feat/quick-fix
|
||||
# 매 work
|
||||
npm test
|
||||
git add -p; git commit
|
||||
git push
|
||||
# 매 PR → review → merge → CI deploy
|
||||
```
|
||||
|
||||
### TDD with AI pair
|
||||
```python
|
||||
# 매 modern XP: AI as pair
|
||||
# 매 driver: human writes test
|
||||
def test_calculate_discount():
|
||||
assert discount(100, 'STUDENT') == 10
|
||||
assert discount(100, 'NONE') == 0
|
||||
|
||||
# 매 navigator (AI): suggests implementation
|
||||
def discount(amount, code):
|
||||
rules = {'STUDENT': 0.1, 'SENIOR': 0.15}
|
||||
return amount * rules.get(code, 0)
|
||||
```
|
||||
|
||||
### On-site customer (modern proxy)
|
||||
```yaml
|
||||
modern_equivalent:
|
||||
- product_owner: dedicated PM
|
||||
- user_research_loop: weekly
|
||||
- support_rotation: engineers in support 1d/sprint
|
||||
- real_user_feedback: in-app survey + hotjar
|
||||
```
|
||||
|
||||
### Test coverage gate
|
||||
```yaml
|
||||
# 매 fail PR if coverage drops
|
||||
- run: npm run coverage
|
||||
- run: |
|
||||
pct=$(jq '.total.lines.pct' coverage/coverage-summary.json)
|
||||
if (( $(echo "$pct < 80" | bc -l) )); then exit 1; fi
|
||||
```
|
||||
|
||||
### Refactoring catalog (Fowler)
|
||||
```typescript
|
||||
// 매 Inline Variable
|
||||
// before
|
||||
const result = calculate(); return result;
|
||||
// after
|
||||
return calculate();
|
||||
|
||||
// 매 Replace Magic Number
|
||||
const TAX_RATE = 0.08;
|
||||
return total * (1 + TAX_RATE);
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Practice |
|
||||
|---|---|
|
||||
| Greenfield | All-in XP |
|
||||
| Legacy + tests | TDD selectively |
|
||||
| Solo dev | TDD + CI |
|
||||
| Distributed team | CI + async pair |
|
||||
| Scale-up | Trunk + feature flags |
|
||||
| AI-augmented | Copilot + TDD |
|
||||
|
||||
**기본값**: 매 modern XP = TDD + CI/CD + trunk-based + pair (or AI-pair) + simple design + small release.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Agile]] · [[Software-Process]]
|
||||
- 변형: [[Scrum]] · [[Kanban]] · [[Mob-Programming]]
|
||||
- 응용: [[TDD]] · [[CI-CD]] · [[Pair-Programming]] · [[Refactoring]]
|
||||
- Adjacent: [[Trunk-Based-Development]] · [[Development Communication Standards]] · [[Enterprise-Software-Engineering]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 매 small team. 매 high-quality requirement. 매 evolving requirement.
|
||||
**언제 X**: 매 strict regulatory waterfall.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Cherry-pick practices**: 매 synergy lose.
|
||||
- **TDD without refactor**: 매 cruft.
|
||||
- **Pair as overhead**: 매 communication 의 ignore.
|
||||
- **No on-site customer**: 매 wrong product.
|
||||
- **CI without tests**: 매 false safety.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Beck XP Explained 1999/2004).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-04-26 | XP auto |
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — 12 practices + 매 TDD / pair / mob / CI / refactor code |
|
||||
|
||||
Reference in New Issue
Block a user