9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
5.9 KiB
5.9 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-yagni-you-aren-t-gonna-need-it | YAGNI (You Aren't Gonna Need It) | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
YAGNI (You Aren't Gonna Need It)
매 한 줄
"매 지금 매 필요한 것 만 만들어라 — 매 미래의 매 것 매 추측 의 매 X". 매 Kent Beck 의 매 Extreme Programming 1999 — 매 speculative generality (premature abstraction) 매 매 가장 큰 cost 의 source. 매 2026 매 LLM-assisted 의 매 quick refactor 가능 매 YAGNI 매 더 강해짐 — "needed when needed" 매 거의 free.
매 핵심
매 비용 4 가지 (Martin Fowler)
- Cost of build: 매 안 쓰일 feature 매 짓는 시간.
- Cost of delay: 매 그 시간 매 진짜 needed feature 매 늦어짐.
- Cost of carry: 매 maintenance, test, security patch.
- Cost of repair: 매 잘못 추측 매 wrong abstraction 매 제거 의 cost.
매 vs SOLID / DRY
- DRY: 매 ≥3 occurrences 매 해야지, 매 2 의 X (Rule of Three).
- Open-Closed: extension point 매 매 actually-needed 시 매.
- Strategy / Factory pattern 매 매 진짜 다양성 매 발견 시 매.
매 응용
- API: 매 v1 매 minimal endpoint, 매 versioning infra 의 매 시작 X.
- DB schema: 매 nullable column 의 매 lazy add — 매 not "future-proof" up front.
- Config: 매 env var 의 매 hardcode 부터 — 의 의 의 변할 시 추출.
- Plugin system: 매 첫 plugin 시까지 매 X — interface 매 그때 design.
- Microservice: 매 monolith first, 매 split-when-painful.
💻 패턴
Refactor when needed (not before)
// 매 step 1 — single use case, hardcoded
function sendWelcomeEmail(user: User) {
return mailgun.send({
to: user.email,
template: "welcome",
vars: { name: user.name },
});
}
// 매 step 2 — second template 추가 시 매 추출 (매 그 전 X)
type Template = "welcome" | "reset_password";
function sendTemplated(user: User, template: Template, vars: Record<string, string>) {
return mailgun.send({ to: user.email, template, vars });
}
Avoid premature config
// ❌ premature
const CONFIG = {
retries: process.env.RETRIES ?? 3,
timeout: process.env.TIMEOUT ?? 30_000,
/* …10 more knobs nobody touches */
};
// ✅ inline 부터
fetch(url, { signal: AbortSignal.timeout(30_000) });
// 매 진짜 다른 timeout 필요 시 그때 param.
No speculative interface
// ❌ premature: single impl 매 의 의 interface
interface PaymentProvider { charge(amt: number): Promise<void> }
class StripeProvider implements PaymentProvider { /* … */ }
// ✅ direct
async function charge(amt: number) {
return await stripe.charges.create({ amount: amt });
}
// 매 PayPal 매 추가 시 매 그때 interface 추출.
"Worst code first" (start ugly, refactor with tests)
// 매 step 1 — 의 의 작동
function checkout(items: Item[], userId: string) {
let total = 0;
for (const i of items) total += i.price * i.qty;
if (total > 100) total *= 0.9; // discount
if (userId.startsWith("vip_")) total *= 0.95;
db.insert("orders", { userId, total });
email.send(userId, `Order: $${total}`);
return total;
}
// 매 step 2 — 매 second variant 등장 시 매 split.
Feature flag instead of speculative branch
// 매 unfinished feature 매 main 에 머지 X — flag 매 통제
if (flags.newCheckout) return newCheckout(items);
return legacyCheckout(items);
// 매 ready 시 flip + 매 dead branch 제거.
LLM-assisted refactor (2026 reality)
# 매 단순 abstraction 추출 매 LLM 매 1 분 — speculative build 매 더 의미 없음
$ claude refactor "extract PaymentProvider interface from StripeProvider, \
create PayPalProvider stub" --apply
매 결정 기준
| 상황 | Approach |
|---|---|
| 신규 feature, 단일 use case | YAGNI — minimal direct implementation |
| 동일 pattern 2회 등장 | 매 잠시 wait — 매 3rd 시 추출 |
| 동일 pattern 3회+ | 매 추출 (Rule of Three) |
| 외부 contract (public API, DB schema) | 의 매 forward-think 필요 — YAGNI 의 매 X |
| 보안 / cryptographic | 매 conservative — 매 "not needed yet" 의 매 위험 |
기본값: 매 inline 부터, 매 second variant 시 conditional, 매 third 시 abstraction.
🔗 Graph
- 변형: KISS · Rule of Three
- 응용: Refactoring_Best_Practices · Feature Flag · MVP
- Adjacent: DRY · SOLID · Premature Optimization · Speculative Generality
🤖 LLM 활용
언제: Code review (premature abstraction 잡기), refactor 결정, MVP scope. 언제 X: 매 forward-compat 가 매 hard contract — public API, file format, network protocol — 매 careful design needed.
❌ 안티패턴
- Speculative generality: "we might need plugins one day" — 매 거의 매 wrong shape.
- Configuration over code: 매 모든 magic number 매 env var — 매 cognitive load 폭발.
- Layered architecture without need: Service / Repository / Mapper 매 1-table CRUD 의 X.
- Premature microservices: 매 monolith 의 매 split easier than merge — start mono.
- YAGNI as excuse for hack: 매 testability / observability 의 매 YAGNI 의 매 X — 매 always invest.
- Forgetting public API stability: 매 broken consumer 의 매 cost 가 큼.
🧪 검증 / 중복
- Verified (Kent Beck "Extreme Programming Explained" 1999, Martin Fowler "Yagni" essay 2015).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — 4 costs framing, refactor-when-needed patterns |