Add the working-method prompt set and demote the compose rewrite (quality P4) #121

Merged
weichen merged 1 commits from feature/agent-quality-phase04 into main 2026-10-09 23:40:29 +00:00
Owner

摘要

P4(裁定 4):工作方法提示词 + composeFinal 降级。Dev 任务卡 feature/agent-quality-phase04;主记录 §4 P4。

  1. base.method 工作方法段(第九个基座块):先计划再动手(≥3 步/产文件先 update_plan)、失败两次换路、写脚本前查 API 签名、编辑粒度(multi_edit 批量改、改完即验证,不逐行连发)、坚持到完成(结尾不许是承诺)、数字/日期/人名回到材料(找不到标推测)、终稿如实。
  2. 工具描述重写:read_file/edit_file/grep/glob/run_python/run_shell(专用工具优先于 cat/sed;Word 走 .md 源 + housestyle.build)。
  3. 计划提醒常开:无任何计划而连续多工具轮 → 每 run 一次可忽略轻提醒(TestPlanlessNudgeFiresOnce)。
  4. composeFinal 默认关(裁定 4):转录权威后工作模型自带完整证据;重写层只见 160 字摘要、实测虚构章节/承诺未做之事。保留空正文兜底与显式开启。

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

指标 P3 后 P4 后
plan-followup 工具总数(碎片螺旋) 117 47
plan-followup 检查失败 4 0
计划使用(followup/pm-tool) 0/0 8/5
minutes-basic 工具/整篇重跑 12/2 9/0

未核实数字仍 10 个 → P5 事实一致性核查。

Evidence

go vet + go test ./... 全绿;组合 make test PASS(evidence 行 SELF);真实模型对照 evidence 行 + 报告 .task/phase04-eval/after-p4.json。

Impact

行为面变更(提示词/设置默认值);无契约/存储变更。

## 摘要 P4(裁定 4):工作方法提示词 + composeFinal 降级。Dev 任务卡 feature/agent-quality-phase04;主记录 §4 P4。 1. **base.method 工作方法段**(第九个基座块):先计划再动手(≥3 步/产文件先 update_plan)、失败两次换路、写脚本前查 API 签名、编辑粒度(multi_edit 批量改、改完即验证,不逐行连发)、坚持到完成(结尾不许是承诺)、数字/日期/人名回到材料(找不到标推测)、终稿如实。 2. **工具描述重写**:read_file/edit_file/grep/glob/run_python/run_shell(专用工具优先于 cat/sed;Word 走 .md 源 + housestyle.build)。 3. **计划提醒常开**:无任何计划而连续多工具轮 → 每 run 一次可忽略轻提醒(TestPlanlessNudgeFiresOnce)。 4. **composeFinal 默认关**(裁定 4):转录权威后工作模型自带完整证据;重写层只见 160 字摘要、实测虚构章节/承诺未做之事。保留空正文兜底与显式开启。 ## 真实模型对照(before=P3 后 main,after=本构建) | 指标 | P3 后 | **P4 后** | |---|---|---| | plan-followup 工具总数(碎片螺旋) | 117 | **47** | | plan-followup 检查失败 | 4 | **0** | | 计划使用(followup/pm-tool) | 0/0 | **8/5** | | minutes-basic 工具/整篇重跑 | 12/2 | **9/0** | 未核实数字仍 10 个 → P5 事实一致性核查。 ## Evidence go vet + go test ./... 全绿;组合 make test PASS(evidence 行 SELF);真实模型对照 evidence 行 + 报告 `.task/phase04-eval/after-p4.json`。 ## Impact 行为面变更(提示词/设置默认值);无契约/存储变更。
weichen added 1 commit 2026-10-09 23:36:02 +00:00
Add the working-method base prompt and demote the compose rewrite
ci / vet-and-test (pull_request) Successful in 38s
6be8980c17
Why: User rulings 4 plus the P3 live evidence. The base library taught layout
standards but not how to work: no planning discipline (plan tool used in 2 of
31 tool runs), no retry-escalation rule (same failing call retried verbatim),
no check-API-first rule (phantom API calls), and nothing about edit
granularity - the P3 after-run showed one turn of 27 single-line edits plus a
self-review spiral (117 tools). The final-reply rewrite layer sees only
160-char summaries and fabricated chapters/promised unfinished work; with the
transcript now authoritative the working model already has full evidence, so
per ruling 4 the rewrite defaults off (kept as fallback when a work loop ends
with no user-facing text at all, plus opt-in setting).

Changes: new base.method module (plan-first for 3+ steps, switch approach
after two failures, check API signatures before scripting, batch edits with
multi_edit, persist to completion - never end on a promise, trace numbers/
dates/names back to source material or mark speculation, honest final
report); tool-description overrides for read_file/edit_file/grep/glob/
run_python/run_shell (dedicated tools over cat/sed, build pipeline for Word);
plan reminder now also nudges once when NO plan exists after several tool
turns (ignorable, once per run); runtime.composeFinal default true->false
with empty-body fallback.

Evidence: SELF - TestPlanlessNudgeFiresOnce (fires once, never repeats),
TestResolveSystemDefaultBase updated for the ninth base block; go vet +
go test ./... pass; live before/after on the golden task set recorded on the
phase04 task card per the policy clause.

Impact: Behavior-surface change only; no contract or storage changes.
weichen merged commit 1a3fbfb3d8 into main 2026-10-09 23:40:29 +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#121