Skip to content

docs(tools): align tool descriptions and prompts with behavior - #41

Open
asto18089 wants to merge 1 commit into
Pinvou:pinvou3-cleanfrom
asto18089:docs/tool-description-accuracy
Open

docs(tools): align tool descriptions and prompts with behavior#41
asto18089 wants to merge 1 commit into
Pinvou:pinvou3-cleanfrom
asto18089:docs/tool-description-accuracy

Conversation

@asto18089

Copy link
Copy Markdown

背景

对 Pinvou Agent 及 CodeWhale 的模型向文档(注入 LLM 上下文的工具 description / schema / prompt 文本)做了一次全量审计(30 个分区,约 16 万行),本 PR 修复其中属于引擎层的发现。所有修改仅触及注入模型的字符串与对应测试,不改行为逻辑

主要修复(按审计四轴)

错误(描述指向不存在的工具名/与实现相反)

  • verify 描述仍教模型调用已退役的 run_verifiersregistry_sync/file_search/search 引用 exec_shellfetch_url/web_search 互相引用对方的退役名 → 全部改为现行面(Run action / Bash / Web action),并把 verify、registry MCP 三工具加入 no_advertised_tool_teaches_a_retired_name 守卫测试的 registry,堵住漏网
  • web_search 描述称 API 后端 "DuckDuckGo then Bing" 降级,实现与 forkguard 测试是 configured→Bing 单跳
  • web.run screenshot 未说明仅支持 PDF 且返回文本页;Web 声称全部 action 网络策略感知但 wait 只限 loopback 且不走策略
  • shell/task_shell_starttimeout_msbackground=true 完全不生效,未告知模型
  • workflow script 的 pipeline(thunks) 签名错误(实为 pipeline(items, ...stages),照抄会静默零分发);source_path 限定 ".workflow.js 且必须在 workspace 内" 与实现(.ts/~/.codewhale/workflows)不符
  • agenttype=custom 引用 schema 中不存在的 allowed_tools → 补 schema 属性(解析器本就接受)

遗漏

  • send_latermessage 必填、github close 的脏工作区拒绝、gitignore 在两个搜索工具间的不对称、image_ocr 不支持的 PDF、terminal 系列的 512KiB 缓冲丢弃/超时只放弃等待/Unix-only、Bash 30KB 流级截断、remember workspace 需带 origin 的 git 仓库、runtime_mcp 运行时白名单、workflow verify 失败把 run 终态翻为 Failed、create_goal 建议"clear"但模型侧无清除工具等 → 均补入描述/schema

重复/矛盾(提示层)

  • scout 输出契约教模型输出 <codewhale:subagent.done> 哨兵(应由运行时独占生成);scout 角色引言谈 CHANGES 节但 scout 契约已裁掉该节 → 删除两处
  • translation 开启时与 LANGUAGE_PROMPT 语言规则互斥 → 补 override 声明
  • 宿主安装 static composer 后 AUTHORITY_RECAP 仍无条件追加,指向不存在的 "### Whose word wins" 章节 → composer 存在时跳过 recap,附单测
  • 补齐 set_locale_preamble/closer_*_override setter(原覆盖单元格只有声明无 setter,宿主的 zh/ja 替换意图落空)

验证

  • cargo check -p codewhale-tui 通过;cargo fmt --all -- --check 通过
  • cargo test -p codewhale-tui --lib --locked forkguard_:57 passed / 0 failed
  • 定向测试全绿(退役名守卫、mode 词数预算、output contract、schedule 等)

说明

  • 本 PR 为文档精度修复,合入后父仓需按 r11/r12 惯例做 gitlink 提升 + docs/fork-modifications.md/scripts/fork-guard.sh 指纹登记
  • 已知但在本 PR 处理的行为类问题(建议单独 PR):image_query 绕过网络策略;grep_filestruncated 恒 false;Web/WebSearch/web.run 三份 search schema 手抄漂移;fetch_urlWeb 包装器描述借用重构

Model-facing doc audit fixes across tui tools and prompts: stop
advertising retired tool names (run_verifiers, exec_shell, fetch_url,
web_search) in model-visible descriptions and extend the retired-name
guard registry; fix web screenshot semantics (PDF-only, text output)
and the search backend chain description; document shell background
timeout limits, terminal buffer/timeout semantics, workflow pipeline
signature and plan gates; declare required send_later message, github
dirty-worktree refusal, gitignore asymmetry, and OCR format limits;
add missing agent schema keys (allowed_tools), fix scout output
contract and sentinel teaching, note translation rule precedence,
skip the authority recap when a static composer owns the prompt, and
add locale override setters for embedders.

Signed-off-by: Pinvou Agent Review <review@pinvou.local>
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Thanks @asto18089 for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

@asto18089

Copy link
Copy Markdown
Author

交叉引用:本 PR 对 crates/tui/src/tools/web_search.rs description 的修改(DuckDuckGo→Bing 链尾表述、退役名 fetch_url 改为 Web action=fetch)与 #39(r12 review leftovers 的同一处链尾 copy 修复)存在同行冲突。两处语义一致(都以 #35 的 configured→Bing 单跳为准);建议先合其一,另一个 rebase。本 PR 其余 28 个文件的改动与 #39/#40 无交集。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant