| name | investigate |
| description | Use when something broke โ a bug surfaced, a test regressed, a deploy misbehaved, or a user reported weird behavior. Enforces root-cause investigation BEFORE any fix. Separates proximate cause (what broke) from root cause (why it was possible) from systemic cause (why this class of bug exists in this codebase). |
Investigate
๋ฌธ์ ๊ฐ ๋ฐ์ํ์ ๋ ์์ธ ํ์
์ fix ๋ฅผ ์๋ํ์ง ์๊ฒ ๋ง๋ skill.
์ธ์ ์ฐ๋๊ฐ
- ๋ฒ๊ทธ / ํ๊ท / ์ด์ ๋์ ๊ด์ฐฐ๋จ
- ๊ฐ์ ์คํจ๊ฐ 2ํ ์ด์ ๋ฐ๋ณต๋จ (
learnings.jsonl ์ secondary-stuck-retry-2x ๋ฅ ํจํด)
- ๋ฐฐํฌ ํ ์ด์ ์ ํธ (์๋ฌ ๋ก๊ทธ / ์งํ ์ด์)
- "์ ์ด๊ฒ ์ด๋ ๊ฒ ๋์ํ์ง?" ๊ฐ ๋จธ๋ฆฌ์ ๋งด๋๋ ๋ชจ๋ ์๊ฐ
์ธ์ ์ฐ์ง ์๋๊ฐ
- ์์ธ์ด ์ด๋ฏธ ๋ช
๋ฐฑ ํ trivial ์์ (์คํ, ๋ณ์๋ช
์ค์)
- ์์ง ์ฆ์ ์ฌํ๋ ๋ชป ํจ (๊ทธ๋ฌ๋ฉด ๋จผ์ ์ฌํ ๋จ๊ณ ํ์)
ํต์ฌ ๊ท์จ
์์ธ ํ์
์ ์ fix ๋ฅผ ์๋ํ์ง ์๋๋ค.
"์ผ๋จ ๊ณ ์น๊ณ ๋ณด์" = ๋ฐ๋ณต ๋ฐ์ ์ํ + ์ค์ ์์ธ ์ํ. Gate โข
learning ๊ธฐ๋ก์ ์์ธ๊น์ง ๋ถํด๋ ํ ์ ์๋ฏธ๊ฐ ์๋ค.
๋จ๊ณ
1. ์ฌํ (Reproduction)
2. Timeline ์ฌ๊ตฌ์ฑ
"์ด๋์ ๋น๋กฏ๋๋" ๋ฅผ ๊ธฐ๋ก ๊ธฐ๋ฐ ์ผ๋ก:
git log / git blame โ ์ธ์ ์ด ๊ฒฝ๋ก๊ฐ ๋ฐ๋์๋
.claude/events.jsonl โ ์ต๊ทผ gate blocks / reviews / scope ๋ณ๊ฒฝ
.claude/learnings.jsonl โ ๋น์ทํ ํจํด์ด ๊ณผ๊ฑฐ ์์๋ (load_by_pattern)
.claude/reviews/ โ ์ต๊ทผ ์ด ํ์ผ์ ๋ํ ๋ฆฌ๋ทฐ
.claude/test-runs/run-*.log โ Gate โฃ ๊ฐ ์ ์ด ๋ณ๊ฒฝ์ ์ ์ก์๋
๊ธฐ๋์ ๋ค๋ฅธ ์ง์ ์ ์๊ฐ ์์ ๋ก ๋์ด.
3. 3๋จ ์์ธ ๋ถ๋ฆฌ
Proximate cause (๋ฌด์์ด broken?)
- ์ ํํ ์ด๋ค ์ฝ๋ ์ค / ์ํ / ํ๋ฆ์ด ์๋ชป๋ ๊ฒฐ๊ณผ๋ฅผ ๋๋
- "null pointer" ์์ค ์๋. ๊ทธ null ์ด ์ ๊ฑฐ๊ธฐ ์์๋๊น์ง 1๋จ๊ณ
Root cause (์ proximate ๊ฐ ๊ฐ๋ฅํ๋?)
- ์ด๋ค invariant ๋ฅผ ๋ฏฟ์๋๋ฐ ์ค์ ๋ก๋ ์ง์ผ์ง์ง ์์๋
- ์ด๋ค ๋ฐ์ดํฐ ํ์์ด ์์๊ณผ ๋ฌ๋๋
- ์ด๋ค ์์ ๊ฐ์ ์ด ํ๋ ธ๋
Systemic cause (์ ์ด ํด๋์ค์ ๋ฒ๊ทธ๊ฐ ์ด ์ฝ๋๋ฒ ์ด์ค์์ ๊ฐ๋ฅํ๊ฐ?)
- ์ธ์ด / ์ํคํ
์ฒ / ํ
์คํธ ๋ฐฉ์์ด ์ด ๋ฒ๊ทธ๋ฅผ ํ์ฉํ ๊ตฌ์กฐ์ ์ด์
- "์ฌ๊ธฐ๋ง ๋ฌธ์ " ๊ฐ ์๋๋ผ "์ด๋ฐ ํจํด์ ๋ ์๊ธธ ์ ์์"
์์ธ์ด ํ ์ค๋ก ์ ์ฐ์ด๋ฉด โ ์์ง ๋ ์กฐ์ฌ๋จ.
4. Fix ๊ฒฝ๋ก ์ค๊ณ (์์ง ๊ตฌํ X)
- ์ฆ์ fix (Proximate): ์ง๊ธ ์ฆ์ ๋ฉ์ถ๊ธฐ
- ๊ตฌ์กฐ fix (Root): ์ด invariant ๋ฅผ ์ด๋ป๊ฒ ๊ฐ์ ํ๋
- ํ์ง fix (Systemic): ๊ฐ์ ํด๋์ค ๋ฒ๊ทธ๋ฅผ ๋ค์์ ์ก์ signal
๊ตฌํ์ ์ด skill ์ด ๋๋ ๋ค /vibe-coding-workflow ๋ก.
5. Learning ๊ธฐ๋ก
์์ธ ํ์
๋๋๋ฉด ๋ฐ๋์ learnings.jsonl ์ ๊ธฐ๋ก:
python3 scripts/harness/learning_log.py append <gate> <pattern> \
"<proximate: ํ ๋ฌธ์ฅ>" "<fix: ํ ๋ฌธ์ฅ>"
ํจํด์ด FAILURE_TAXONOMY ์ ์๋ ์ ๊ท๋ฉด โ taxonomy-proposals.md ์ ์๋ ๊ธฐ๋ก (taxonomy_learner.py ์ฃผ๊ธฐ ์คํ).
์ถ๋ ฅ ํ์
# Investigation โ <YYYY-MM-DD> โ <slug>
## Reproduction
- ์
๋ ฅ:
- ๋จ๊ณ:
- ๊ธฐ๋:
- ์ค์ :
- ๋น๋:
## Timeline
- T0 <ts>: <first symptom or relevant change>
- T1 <ts>: <next>
- T2 <ts>: <discovery>
## Proximate cause
<1-2 ๋ฌธ์ฅ>
## Root cause
<1-2 ๋ฌธ์ฅ>
## Systemic cause
<1-2 ๋ฌธ์ฅ. ์ด ํด๋์ค์ ๋ฒ๊ทธ๊ฐ ์ด ์ฝ๋๋ฒ ์ด์ค์์ ๊ฐ๋ฅํ ๊ตฌ์กฐ์ ์ด์ >
## Did existing learnings.jsonl predict this?
- <ts> โ <๊ด๋ จ entry or "no prior warning">
## Fix plan (not yet implemented)
### Immediate (proximate)
- <concrete change>
### Structural (root)
- <invariant to enforce, new test to add, data validation to insert>
### Detection (systemic)
- <what signal would catch this class earlier>
## Learning recorded
- pattern: <FAILURE_TAXONOMY slug or proposed new>
- mistake: <1 sentence>
- fix: <1 sentence>
์ ์ฅ: .claude/audits/investigation-<ts>-<slug>.md
๊ฐ๋๋ ์ผ
- Fix ๋จผ์ , ์กฐ์ฌ ๋์ค ๊ธ์ง โ fix ๋ ์ด skill ์๋ฃ ํ ๋ณ๋ ๋จ๊ณ
- Proximate ๋ง ์ ๊ณ ๋๋ด์ง ์๋๋ค โ Root / Systemic ๊น์ง ์ฐ๊ธฐ
- "์์ธ ๋ชจ๋ฅด๊ฒ ์" ์ verdict ๊ฐ ๋ ์ ์๋ค โ ๊ทธ ๊ฒฝ์ฐ ์ถ๊ฐ ๊ด์ฐฐ ๊ณํ ์ Fix plan ๋์ ์ ๋๋ค
- ์ด investigation ๊ฒฐ๊ณผ๋
/vibe-coding-workflow ์ ์ plan ๊ธฐ๋ฐ์ด ๋๋ค (ํฐ ์์ ์ด๋ฉด)
๋จผ์ ์ฝ์ ๊ฒ
.claude/events.jsonl ์ต๊ทผ entries
.claude/learnings.jsonl (๋น์ทํ pattern ๊ฒ์: learning_log.py by-pattern <slug>)
git log --since="2 weeks ago" -- <path> โ ์ต๊ทผ ๋ณ๊ฒฝ ์ด๋ ฅ
.claude/sealed-prompts/failure-analysis.md โ sealed prompt ๊ตฌ์กฐ ๊ธฐ์ค