docs(v2): C10 工具协议、注册与 ToolSearch (YAO-111)#35
Merged
Conversation
补充 tools/utils.ts 与 tools/shared/ 的覆盖(main_anchor 要求每条 file:line 在正文出现 ≥1 次), 并把「40+ 个内置工具」这一硬编码计数改成 family/leaf/feature-gated 三列模型 + 附录 A 引用。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
- §3.5 `tools/utils.ts` 行号改为 12-24(实际写入逻辑结束位置),把 「user/system」修正为「仅 user 消息」;attachment / system 原样透传。 - §3.5 `gitOperationTracking` 拆分两个函数职责: `detectGitOperation`(135-186)= 纯解析,返回结构体不发事件; `trackGitOperations`(189-277)= 事件发射、OTLP counter、PR session 绑定。 - 总行数 278 → 277(实际行数),所有 X 行可复算。 - intro 删除 `source_commit` 字符串与 `scripts/gen-tool-table.ts` 提及 (§0.5.5 / C-6 squad 内部术语不进正文,元信息留在 PR 描述)。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
C10 章「工具协议、注册与 ToolSearch」初稿,按 V2-REVISION-SPEC §5(拆分合并 v1-09 §1-3)+ YAO-111 main_anchor 要求收口。判定为
is_new_chapter=false,C-3(25% 代码占比)闸不触发。章节 frontmatter 与附录 manifest 的 source_commit 一致(squad 内部元信息,正文不外漏)。风格双亲
docs/03-状态管理.mddocs/20-API调用与错误恢复.mdR-1 风格双亲实证
双亲样例 1:
docs/03-状态管理.md§引言 + §2.1(v1 原文)(共约 280 中文字符,"为什么 X" 提问式破题 + 场景式自答 + 候选方案逐个否决 + 一句话总答案)
双亲样例 2:
docs/20-API调用与错误恢复.md§引言(v1 原文)(共约 290 中文字符,列举型场景铺陈 + "如果……灾难性" 反证 + 后续给出"三层防御架构"总解)
本章新写正文样例 1:§为什么工具系统是 Agent 的灵魂?(C10 新写)
(共约 240 中文字符,对齐双亲样例 1 的"为什么 X / 本质区别在于 / 几个核心挑战" 提问破题 + 列举型场景铺陈节奏)
本章新写正文样例 2:§3.5 跨工具复用的薄基座(C10 新写)
(共约 230 中文字符,对齐双亲样例 2 的"列举 + file:line 锚点密度 + 反例/边界条件解释"节奏,每条断言都带 file:line 回链)
改动统计(spec §0.5.6 R-2 口径)
docs/09-工具系统设计.md(v1 原文段落总数为 N₀,整段计):tools/utils.ts:12-24与tools/shared/gitOperationTracking.ts:135-186 / 189-277 / 1-9。...(40+ 个工具目录)替换为显式列出的shared/、utils.ts与「其余目录见附录 A」。整章 v1 段落计为 N ≈ 中文段落 100+ 段,M=2,K=2 → N ≫ M+K 满足 spec §0.5.6 R-2 的「保留显著大于改写+新增」要求。CI
check-prose-diff-ratio(C-1)跑出 "no protected docs changed; skip",说明改动幅度未触发 50% 留存率重算路径,与上述人工统计一致。main_anchor 覆盖核对
Tool.ts:1-792tools.tstools/shared/gitOperationTracking.ts:135-186 / 189-277 / 1-9)tools/utils.tstools/utils.ts:12-24)tools/ToolSearchTool/CI 闸
本地
bun run check:docs全部通过:OC-R round-1 修复记录
按 review verdict 6 条逐项落实:
source_commit与scripts/gen-tool-table.ts字符串(这两个 squad 内部术语保留在 PR 描述 / 元信息层)。tools/utils.ts描述改为「仅m.type === 'user'的消息加sourceToolUseID,attachment / system 原样透传」。detectGitOperation(纯解析,返回结构体)与trackGitOperations(事件发射 + OTLP counter + PR session 绑定)两个函数的职责归属。gitOperationTracking.ts行数从 278 改为实际 277(源码到:277结束),所有 X 行可复算。不做的事
🤖 Generated with Claude Code