Learn Claude Code

学习路径

s01 到 s12:渐进式 Agent 设计

层次图例

Tools & Execution
Planning & Coordination
Memory Management
Concurrency
Collaboration
01
s01Single-tool agent loop

The Agent LoopBash is All You Need

35 行代码1 个工具

“The minimal agent kernel is a while loop + one tool”

了解更多
02
s02Tool dispatch map

ToolsOne Handler Per Tool

36 行代码4 个工具

“The loop stays the same; new tools register into the dispatch map”

了解更多
03
s03TodoManager + nag reminder

TodoWritePlan Before You Act

33 行代码5 个工具

“An agent without a plan drifts; list the steps first, then execute”

了解更多
04
s04Subagent spawn with isolated messages[]

SubagentsClean Context Per Subtask

29 行代码5 个工具

“Subagents use independent messages[], keeping the main conversation clean”

了解更多
05
s05SkillLoader + two-layer injection

SkillsLoad on Demand

102 行代码5 个工具

“Inject knowledge via tool_result when needed, not upfront in the system prompt”

了解更多
06
s06micro-compact + auto-compact + archival

CompactThree-Layer Compression

31 行代码5 个工具

“Context will fill up; three-layer compression strategy enables infinite sessions”

了解更多
07
s07TaskManager with file-based state + dependency graph

TasksTask Graph + Dependencies

34 行代码8 个工具

“A file-based task graph with ordering, parallelism, and dependencies -- the coordination backbone for multi-agent work”

了解更多
08
s08BackgroundManager + notification queue

Background TasksBackground Threads + Notifications

37 行代码6 个工具

“Run slow operations in the background; the agent keeps thinking ahead”

了解更多
09
s09TeammateManager + file-based mailbox

Agent TeamsTeammates + Mailboxes

55 行代码9 个工具

“When one agent can't finish, delegate to persistent teammates via async mailboxes”

了解更多
10
s10request_id correlation for two protocols

Team ProtocolsShared Communication Rules

61 行代码12 个工具

“One request-response pattern drives all team negotiation”

了解更多
11
s11Task board polling + timeout-based self-governance

Autonomous AgentsScan Board, Claim Tasks

75 行代码14 个工具

“Teammates scan the board and claim tasks themselves; no need for the lead to assign each one”

了解更多
12
s12Composable worktree lifecycle + event stream over a shared task board

Worktree + Task IsolationIsolate by Directory

89 行代码16 个工具

“Each works in its own directory; tasks manage goals, worktrees manage directories, bound by ID”

了解更多

代码量增长

s01
35
s02
36
s03
33
s04
29
s05
102
s06
31
s07
34
s08
37
s09
55
s10
61
s11
75
s12
89