Open kernel workspace tools and the markdown-source build pipeline (quality P3) #120

Merged
weichen merged 1 commits from feature/agent-quality-phase03 into main 2026-10-09 18:29:38 +00:00
Owner

摘要

P3(裁定 1/3):工具开放 + 交付物 MD 源码化。Dev 任务卡 feature/agent-quality-phase03;主记录 Documents 2026-10-09-agent-quality-improvement-plan.md §4。

  1. 内核工作区工具进直连:WorkspaceToolsCheckpointed(read_file 行号分页 / edit_file / multi_edit 先读后写 / grep / glob / list_dir,检查点接线)注册进直连运行,沙箱=会话工作区;plan 模式只留只读子集;无沙箱不注册。内核工具结果镜像产品路径的摘要/证据登记。
  2. python3 -m housestyle.build:.md 源确定性渲染 docx(docx_kit + 主题),写入即诊断(每次 build 自动 lint + 回读结构,error 退出 1,诊断指向源段落);Excel/PPT/图片仍走 run_python + kit(裁定 3 保留全类型)。
  3. 提示词/SKILL 更新:base-tools(专用工具优先于 cat/sed)、base-deliverables + house-style SKILL(改源+重建工作流)。

真实模型对照(before=P2 后 main,after=本构建)

指标(4 任务合计) P2 后 P3 后
整篇重跑 15 2(9→0、2→0)
minutes-basic 工具/失败 15/5 12/2

MD 源码工作流被自然采纳(一轮 edit_file×29、build×13)——诊断的「整段脚本重写 8 次」模式消失。
新观察(归 P4/P5):编辑过度碎化(一轮 117 次工具的自我审阅螺旋)、可读性评分死循环重现、未核实数字仍 11 个。

Evidence

  • Go 单测(read→edit→grep 真文件、无沙箱隐藏)+ recipes Python 9 例 + 组合 make test 全绿(evidence 行 SELF)
  • 真实模型对照 evidence 行 + 报告 .task/phase03-eval/after-p3.json

Impact

直连对话获得精确文件读写能力;Word 交付物成为「改源码→重建→看诊断」循环。无契约/存储变更。

## 摘要 P3(裁定 1/3):工具开放 + 交付物 MD 源码化。Dev 任务卡 feature/agent-quality-phase03;主记录 Documents `2026-10-09-agent-quality-improvement-plan.md` §4。 1. **内核工作区工具进直连**:`WorkspaceToolsCheckpointed`(read_file 行号分页 / edit_file / multi_edit 先读后写 / grep / glob / list_dir,检查点接线)注册进直连运行,沙箱=会话工作区;plan 模式只留只读子集;无沙箱不注册。内核工具结果镜像产品路径的摘要/证据登记。 2. **`python3 -m housestyle.build`**:.md 源确定性渲染 docx(docx_kit + 主题),**写入即诊断**(每次 build 自动 lint + 回读结构,error 退出 1,诊断指向源段落);Excel/PPT/图片仍走 run_python + kit(裁定 3 保留全类型)。 3. 提示词/SKILL 更新:base-tools(专用工具优先于 cat/sed)、base-deliverables + house-style SKILL(改源+重建工作流)。 ## 真实模型对照(before=P2 后 main,after=本构建) | 指标(4 任务合计) | P2 后 | **P3 后** | |---|---|---| | 整篇重跑 | 15 | **2**(9→0、2→0) | | minutes-basic 工具/失败 | 15/5 | **12/2** | **MD 源码工作流被自然采纳**(一轮 edit_file×29、build×13)——诊断的「整段脚本重写 8 次」模式消失。 新观察(归 P4/P5):编辑过度碎化(一轮 117 次工具的自我审阅螺旋)、可读性评分死循环重现、未核实数字仍 11 个。 ## Evidence - Go 单测(read→edit→grep 真文件、无沙箱隐藏)+ recipes Python 9 例 + 组合 make test 全绿(evidence 行 SELF) - 真实模型对照 evidence 行 + 报告 `.task/phase03-eval/after-p3.json` ## Impact 直连对话获得精确文件读写能力;Word 交付物成为「改源码→重建→看诊断」循环。无契约/存储变更。
weichen added 1 commit 2026-10-09 18:25:02 +00:00
Why: User rulings 1 and 3. The direct conversation path exposed only
run_shell/run_python, so any file edit meant rewriting and re-running whole
generation scripts (diagnosis: 24 calls with 9 failures in one turn, 6KB
scripts regenerated 8 times). The kernel already ships line-numbered reads,
exact edit/multi_edit with read-before-write, grep and glob; they were wired
only into the squad path. Deliverables had no editable source: docx output
came from one-shot python scripts, so "make section 3 more detailed" rebuilt
everything.

Now: WorkspaceToolsCheckpointed (sandbox = conversation workspace, checkpoint
hooks wired) is registered into the direct run and its decls join the tool
surface (plan mode keeps the read-only subset). Word deliverables get a
markdown-source pipeline - python3 -m housestyle.build renders .md
deterministically via docx_kit and runs lint + outline on every build
(write-time diagnostics, exit 1 on error so the model fixes the source and
rebuilds). run_python kits remain for xlsx/pptx/images (ruling 3).
base-tools/base-deliverables prompts and the house-style SKILL document the
new loop.

Evidence: SELF - TestDirectRunExposesKernelWorkspaceTools (read->edit->grep
against the real sandbox FS), TestDirectRunWithoutSandboxHidesKernelTools,
three new BuildTests in recipes (renders+lint passes, heading-skip errors
exit 1, CLI entry); go vet + go test ./... pass; live before/after on the
golden task set recorded on the phase03 task card per the policy clause.

Impact: Direct conversations can now read and edit workspace files
surgically; docx deliverables become edit-source + rebuild instead of
regenerate. No contract or storage changes.
weichen merged commit 5b9406dd91 into main 2026-10-09 18:29:38 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#120