Files
pi-agent-config/docs/evidence/2026-08-27-curator-phase0-prompt.md
Kai cf61a72bd2 feat(curator): deploy the phase-0 system prompt, and correct a misleading README figure
The workspace now holds .pi/SYSTEM.md and .pi/APPEND_SYSTEM.md and nothing else.

SYSTEM.md is rewritten for what is actually deployed. The version committed in
07dd648 described five tools that will not exist until phase 3; shipping it would
have invited the model to call tools it does not have. The capability section now
states plainly that the agent has no tools and that every fact arrives in the
request. The phase-3 target, including the full tool-bearing launch contract, is
recorded in the plan as §4b together with why each part cannot be enabled sooner.

profile.toml likewise describes the deployed configuration rather than the target,
so that deploy-scenario.sh validates against reality and the path check means
something.

Recovered from the retired SKILL.md and folded into SYSTEM.md: the rule that the
current request's schema and length limits override everything else, and that a
JSON task returns exactly one JSON value with no fences. Phase 0's four prompt
types all depend on it, and it was the one part of that file not already covered.

Measured before and after on the real workspace, with flags read from the code
rather than transcribed (docs/evidence/2026-08-27-curator-phase0-prompt.md):

- expert coding assistant framing: present -> gone
- pointer to pi's own documentation: present -> gone
- the 64-line media policy: absent -> present
- workspace AGENTS.md: loaded -> blocked
- parent-directory AGENTS.md: LEAKED -> blocked
- <available_skills>: absent both times

Two things this confirms on the production configuration rather than a synthetic
probe. --skill was genuinely a no-op: it pointed at a real 64-line SKILL.md and
the skills block was still absent, because pi emits it only when a tool named
read is active and --no-tools deactivates everything. And --no-context-files is
the only switch that stops parent-directory pollution: a marker planted in
/home/claw/pi-workspaces/AGENTS.md reached the prompt before and not after.

Deleting the now-dead AGENTS.md and SKILL.md from the workspace changed the
prompt length by zero bytes, which is the proof that they were dead.

README corrected. Its table cited 960 characters as Curator's system prompt after
the change; that figure came from a few-line stub SYSTEM.md in the isolation
probe, and the real prompt is 3539 -- larger, not smaller. Presenting the stub
measurement as Curator's was misleading, and "72% smaller" was wrong. The prompt
grew because roughly 1.9 KB of pi scaffolding was replaced by domain policy that
had never loaded at all. The mechanism claim is unaffected.
2026-08-27 23:09:20 -07:00

3.9 KiB
Raw Permalink Blame History

Curator 阶段 0 系统提示实测

日期:2026-08-27 · pi 0.84.3 · 零 token(单条 RPC get_state,不触达 provider

探针:probe-harness/curator-phase0-probe.ts。它不注册任何工具 —— 阶段 0 用 --no-tools,基于工具的探针根本不会被调用。

两次运行都在真实 workspace 上进行,flag 直接来自代码 (python3 -c "print(PiCurator._isolation_args())"),不是手抄的:

--no-tools --no-extensions --no-skills --no-prompt-templates --no-themes --no-context-files --approve

"改动前"用备份 pre-refactor-20260827T053600Z/workspace-curator.tar.gz 解出的 原始 workspace(只有 AGENTS.md.pi/skills/curator-media/SKILL.md,无 .pi/SYSTEM.md),配原 flag --approve --no-tools --skill <SKILL.md> --no-prompt-templates

两次都在 workspace 的父目录 /home/claw/pi-workspaces/AGENTS.md 埋了 PARENT_LEAK_MARKER

结果

探测项 改动前 改动后 说明
P_LEN 2548 3539 变长,见下文
expert coding assistant true false 编码助手人格已移除
Pi documentation true false pi 自身文档指引已移除
guidelines true false 默认 guidelines 段落已移除
.pi/SYSTEM.md 内容 false true 策展人格已生效
.pi/APPEND_SYSTEM.md 内容 false true 长期职责已生效
"你没有任何工具" false true 能力边界已声明
"不是指令"(注入防护) false true 不可信数据条款已生效
"只输出一个合法 JSON 值" false true schema 服从条款已生效
workspace AGENTS.md true false -nc 阻断
父目录 AGENTS.md 标记 true false -nc 阻断
available_skills 段落 false false 两边都没有
P_SKILLNAMES [] [] 两边都为空
P_ACTIVE_TOOLS [] [] 两边都无工具

三个结论

1. --skill 确实是空操作,在真实生产配置上得到确认。 改动前那一列里,--skill 明确指向了 64 行的 curator-media/SKILL.md,而 available_skills=falseSKILLNAMES=[]。那份媒体策略从未进入过系统提示。 原因是 pi 只在存在激活的 read 工具时生成 skills 段落 dist/core/system-prompt.js:59,113),而 --no-tools 关掉了全部工具。 服务上线以来一直如此,README 与部署手册描述的机制并未发生。

2. 只有 -nc 能阻断父目录污染。 改动前,workspace 自己的 AGENTS.md 和父目录 /home/claw/pi-workspaces/AGENTS.md 的标记进入了系统提示。加 --no-context-files 后两者都消失。 AGENTS.override.md 做不到这件事(另见 pi-runtime-notes.md §9)。

3. 系统提示变长了,这是修复的结果而不是代价。 2548 → 3539 字符。改动前那 2548 里,约 1.9 KB 是 pi 的编码助手框架、工具纪律和 pi 文档指引 —— 对一个书影音 agent 全是噪音甚至风险(文档指引是注入文本的现成 提权路径);真正属于 Curator 的领域策略一个字都没有。改动后这 3539 全部是 Curator 自己的内容。

这一点纠正了本仓库 README 早先的写法。isolation-probe.md 里那个 960 字符 是用一个几行的 stub SYSTEM.md 测出来的,用来演示替换机制;把它当成 Curator 的实际数字就成了误导。机制结论(skills 依赖 read)成立, "缩小 72%" 这个说法不适用于真实的 Curator 系统提示。

复现

# 改动后
cd /home/claw/pi-workspaces/curator
printf '{"id":"1","type":"get_state"}\n' | pi --mode rpc --no-session \
  -e <repo>/docs/evidence/probe-harness/curator-phase0-probe.ts \
  --no-tools --no-extensions --no-skills --no-prompt-templates \
  --no-themes --no-context-files --approve \
  --provider zenmux --model openai/gpt-5.6-luna 2>&1 >/dev/null | grep '^P_'