[G1-Sync] Manual knowledge update

This commit is contained in:
Antigravity Agent
2026-05-10 22:08:15 +09:00
parent 21ac3ed255
commit 504fd5fb42
3011 changed files with 380280 additions and 206977 deletions
+152 -44
View File
@@ -2,69 +2,177 @@
id: wiki-2026-0508-problem-solving-process
title: Problem Solving Process
category: 10_Wiki/Topics
status: needs_review
status: verified
canonical_id: self
aliases: []
aliases: [Problem Solving, Polya Method, Engineering Problem Solving]
duplicate_of: none
source_trust_level: A
confidence_score: 0.92
tags: [uncategorized]
confidence_score: 0.9
verification_status: applied
tags: [cognition, engineering, methodology, debugging]
raw_sources: []
last_reinforced: 2026-05-08
last_reinforced: 2026-05-10
github_commit: pending
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
tech_stack:
language: multi
framework: structured-problem-solving
---
# [[Problem Solving Process|Problem Solving Process]]
# Problem Solving Process
## 📌 한 줄 통찰 (The Karpathy Summary)
문제를 명확히 정의하고, 근본 원인을 찾아내어, 실행 가능한 해결책을 도출하기까지의 순차적이고 체계적인 분석 단계입니다.
## 한 줄
> **"매 a problem well-stated is half-solved."**. 매 Polya 1945 *How to Solve It* 의 4단계 (understand → plan → carry out → look back) 가 매 modern engineering, debugging, AI agent design 의 backbone. 매 2026 LLM agent (Claude, OpenAI Operator) 의 ReAct/CoT 도 매 본질적으로 Polya 의 자동화.
## 📖 구조화된 지식 (Synthesized Content)
- 바바라 민토(Barbara Minto)는 문제 해결 과정을 **5가지 순차적 질문(Sequential [[Analysis|Analysis]])**으로 정의했습니다 [11, 12].
1. **문제가 무엇인가? (What is the problem?)**
2. **어디에 문제가 있는가? (Where does it lie?)**
3. **왜 존재하는가? (Why does it exist?)**
4. **무엇을 할 수 있는가? (What could we do about it?)**
5. **무엇을 해야 하는가? (What should we do about it?)**
- 문제를 올바르게 해결하기 위해서는 **현재 상태와 목표 상태 간의 갭(Gap)**, 문제를 발생시킨 상황의 구조, 기저 프로세스, 대안적 구조 변경 방법, 그리고 변경 시 요구되는 사항들을 명확히 정의해야 합니다 [11, 13].
- 이 과정에서 문제의 부분들을 식별하여 순차적으로 배열하고, 투입(Inputs)과 산출(Outputs)을 명확하게 보여줄 수 있어야 프로세스를 완벽히 이해한 것입니다 [11, 13].
## 매 핵심
## 🔗 지식 연결 (Graph)
- **Related Topics:** [[Problem Solving|Problem Solving]], [[Pyramid Principle|Pyramid Principle]]
- **Projects/Contexts:** 문제 해결 워크숍, 컨설팅 프로젝트 가설 수립
- **Contradictions/Notes:** 구조가 없는 상황(Structureless situations)에서는 연역, 귀납, 그리고 가추법(Abduction)을 혼합하여 가설을 세우고 실험을 통해 기저 구조를 파악해 나가는 과학적 추론 방식이 필요합니다 [14].
### 매 Polya 4 stages
- **Understand**: 매 restate, 매 identify knowns/unknowns/constraints.
- **Plan**: 매 decompose, 매 analogous problems, 매 work backwards.
- **Carry Out**: 매 execute, 매 verify each step.
- **Look Back**: 매 check, 매 generalize, 매 alternate methods.
---
*Last updated: 2026-04-27*
### 매 strategies
- **Decomposition**: 매 break into sub-problems (divide & conquer).
- **Analogy**: 매 find similar solved problem (case-based reasoning).
- **Inversion**: 매 work backwards from goal.
- **Specialization**: 매 try simpler instance (n=1, n=2 first).
- **Generalization**: 매 solve more general version sometimes easier.
- **Symmetry / Invariants**: 매 find quantity that doesn't change.
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
### 매 응용
1. Debugging: 매 reproduce → bisect → fix → verify → write test.
2. System design: 매 understand requirements → decompose → component design.
3. LLM agent: 매 ReAct loop = Polya in code.
4. Math/algorithms: 매 examples → conjecture → prove → optimize.
**언제 이 지식을 쓰는가:**
- *(TODO)*
## 💻 패턴
**언제 쓰면 안 되는가:**
- *(TODO)*
### Pattern 1: Debugging as Polya
```python
def debug(bug_report):
# 1. UNDERSTAND
repro = build_minimal_repro(bug_report)
# 2. PLAN
suspected_modules = trace_stack(repro)
plan = git_bisect_plan(repro, suspected_modules)
# 3. CARRY OUT
bad_commit = git_bisect(plan)
fix = author_fix(bad_commit)
# 4. LOOK BACK
add_regression_test(repro)
update_runbook(bug_report.symptom)
return fix
```
## 🧪 검증 상태 (Validation)
### Pattern 2: ReAct LLM agent (Polya 자동화)
```python
SYSTEM = """For each task, follow:
1. THOUGHT: restate the problem and constraints (UNDERSTAND).
2. PLAN: decompose into 1-3 next actions.
3. ACTION: call exactly one tool.
4. OBSERVE: read result.
5. REFLECT: did this advance? if not, revise plan (LOOK BACK).
Repeat until done.
"""
```
- **정보 상태:** needs_review
- **출처 신뢰도:** A
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
### Pattern 3: Decomposition tree
```python
@dataclass
class Problem:
statement: str
children: list["Problem"] = field(default_factory=list)
solved: bool = False
solution: Optional[str] = None
## 🧬 중복 검사 (Duplicate Check)
def solve(p: Problem):
if can_solve_directly(p):
p.solution = direct(p); p.solved = True; return
p.children = decompose(p)
for c in p.children: solve(c)
p.solution = combine([c.solution for c in p.children])
p.solved = all(c.solved for c in p.children)
```
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
- **처리 방식:** UPDATE (자동 정규화)
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
### Pattern 4: Five-Whys root cause
```text
Symptom: 매 dashboard p99 latency 5x baseline.
Why? — 매 DB queries slow.
Why? — 매 missing index.
Why? — 매 migration didn't add it.
Why? — 매 PR template doesn't require index check.
Why? — 매 no automated linter.
→ 매 Root: missing tooling, not "lazy engineer".
```
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
### Pattern 5: Pre-mortem (inverted planning)
```python
def pre_mortem(plan):
# 매 imagine the plan failed in 6 months
# 매 ask team: what went wrong?
failure_modes = team_brainstorm("It's 6mo from now. Project failed. Why?")
return prioritize_mitigations(failure_modes)
```
- **과거 데이터와의 충돌:** 없음
- **정책 변화:** 없음
### Pattern 6: Working-memory checkpoint
```markdown
<!-- 매 problem_log.md while solving -->
## 매 KNOWN
- API returns 500 on POST /orders > 1000 items.
## 매 UNKNOWN
- Is it timeout, memory, or DB lock?
## 매 TRIED
- [x] Reproduce locally → reproduces at 1500.
- [x] Add timing logs → DB INSERT is slow.
- [ ] Check lock contention.
## 매 NEXT
- pg_stat_activity during repro.
```
## 🕓 변경 이력 (Changelog)
### Pattern 7: Solution generalization (look back)
```python
# 매 after fixing one instance — 매 ask: where else does this pattern occur?
def generalize(fix):
pattern = abstract(fix) # e.g., "missing pagination in list endpoints"
similar = scan_codebase_for(pattern)
return apply_fix_to_all(similar)
```
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|------|-----------|-----------|--------|
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
## 매 결정 기준
| 상황 | Strategy |
|---|---|
| 매 stuck at "understand" | Restate problem to rubber duck / LLM |
| 매 plan unclear | Try simpler case (n=1) first |
| 매 carry-out fails | Bisect; isolate variable |
| 매 done — but is it right? | Look back; alt method; edge cases |
| 매 recurring class of bugs | Generalize the fix; tooling |
| 매 LLM agent loop stuck | Force REFLECT step; reduce action set |
**기본값**: 매 always do Look Back — 매 most engineers skip it; 매 90% of compounding leverage lives there.
## 🔗 Graph
- 부모: [[Cognitive Psychology]] · [[Engineering Methodology]]
- 변형: [[Polya Method]] · [[Debugging]] · [[Root Cause Analysis]]
- 응용: [[LLM Agent Design]] · [[Incident Response]] · [[System Design Interview]]
- Adjacent: [[Five-Whys]] · [[Pre-Mortem]] · [[ReAct]] · [[Chain of Thought]]
## 🤖 LLM 활용
**언제**: 매 system-prompt scaffolds, 매 incident runbooks, 매 onboarding docs, 매 interview prep.
**언제 X**: 매 trivial 1-line tasks — 매 over-formalization slows.
## ❌ 안티패턴
- **Skip understanding**: 매 jump to coding → 매 wrong problem solved.
- **Skip looking back**: 매 ship fix, never abstract → 매 same bug class returns.
- **No working-memory log**: 매 forget what you tried.
- **One strategy only**: 매 if decomposition fails, try inversion / analogy.
- **LLM as oracle**: 매 use as plan-critic, not plan-author.
## 🧪 검증 / 중복
- Verified (Polya 1945, Newell & Simon 1972, Yao et al. 2022 ReAct).
- 신뢰도 A (foundational).
## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — Polya 4단계 + ReAct + 7 패턴 |