"매 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 의 자동화.
매 핵심
매 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.
매 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.
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.
"""
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".
Pattern 5: Pre-mortem (inverted planning)
defpre_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?")returnprioritize_mitigations(failure_modes)
Pattern 6: Working-memory checkpoint
<!-- 매 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.
Pattern 7: Solution generalization (look back)
# 매 after fixing one instance — 매 ask: where else does this pattern occur?defgeneralize(fix):pattern=abstract(fix)# e.g., "missing pagination in list endpoints"similar=scan_codebase_for(pattern)returnapply_fix_to_all(similar)
매 결정 기준
상황
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.