mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
基于源码验证和官方文档对照,修正三份 Agent 文档的内容准确性: coordinator-and-swarm.mdx: - 对齐官方术语:Leader→Team Lead, teammate→Teammate, 引入 Mailbox 消息系统 - 修正 Swarm 门控为 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1(原文"默认启用"不准确) - 拓扑描述改为"星型+P2P混合"(官方有 Team Lead 角色,非纯网状) - 新增架构组件表、Mailbox 消息系统、Hook 事件(TeammateIdle/TaskCreated/TaskCompleted)、限制说明 - 新增持久化存储路径(~/.claude/teams/, ~/.claude/tasks/) - 移除虚构的"高水位标记"(claimTask 仅使用文件锁) - 修正 Scratchpad 描述(Workers 获得,非 Coordinator 拥有) - 修复引号不匹配 sub-agents.mdx: - 修正为三路径路由(命名 Agent / Fork / GP 回退),原文仅两种 - 补充 isForkSubagentEnabled() 三前提(feature flag + 非Coordinator + 非非交互式) - 新增模型解析优先级(4级链 + inherit 运行时解析) - 新增内置 Agent 表(Explore/Plan/GP/statusline-setup/claude-code-guide) - 新增 Hook 事件表(frontmatter + settings.json 双级别) - 补充异步生命周期完整链路(finalizeAgentTool → getWorktreeResult) - 补充 transcript 存储路径和结果格式细节 worktree-isolation.mdx: - 区分 createWorktreeForSession vs createAgentWorktree 两种函数 - 修正清理机制为 cleanupWorktreeIfNeeded(非 ExitWorktreeTool 手动操作) - 补充 usedSparsePaths 字段