故事 #1 · · · Stage 0 — the bare model: an API call that talks but cannot act ✓ 故事 #2 · · · Stage 1 — the agent loop: while stop_reason is tool_use, run tools and feed results back ✓ 故事 #3 · · · Stage 2 — real tools: JSON-schema specs + the validate-before-run boundary ✓ 故事 #4 · · · Stage 3 — the permission gate: allow / ask / deny before every side effect ✓ 故事 #5 · · · Stage 4 — compaction: fold old turns into a summary when the window fills ✓ 故事 #6 · · · Stage 5 — sub-agents: a spawn_agent tool that runs a fresh inner loop and returns one answer ✓ 故事 #7 · · · Stage 6 — assembly: system prompt + loop + tools + gate + compaction + sub-agents = a mini Claude Code ✓