/** * CC `hook_agent` 臂(`type:"agent"` 钩子条目)的评估者系统提示 —— **CC 逐字移植**([ref] P2-5 修: * 此前 agent 臂一个字的系统提示都不发,评估者拿不到「你在判什么/可以用工具去查/少走几步」任何一条, * 判词质量静默劣化且黑盒极难察觉;`cc-stop-prompt.ts` 把孪生的 prompt 臂做到字节级 ALIGNED,本臂却整块 * 漏在考据之外=UNANCHORED)。 * * ── 出处(第一手核过)──────────────────────────────────────────────────────────────────────── * `sema-agent/cc-decoded` 的 `pretty223.js:645295-645313`(`querySource:"hook_agent"` 在 `:645360`)。 * CC 该臂与 prompt 臂(`cc-stop-prompt.ts`)**不是同一批文本**:两档头句按事件名选 * (`r === "Stop" || r === "SubagentStop"` ⇒ verify 档,其余 ⇒ evaluate 档),尾段共用。 * * ── 登记偏离(载体差异,[ref] 锚定纪律:能逐字的逐字,搬不动的显式登记而非静默改写)────────── * CC 的完整模板还有两段本仓**刻意不搬**: * 1. transcript 文件句("The conversation transcript is available at: ${路径}\nYou can read this * file to analyze the conversation history if needed.")——CC 给评估者落一个转录**文件**并往 * session allow 规则里加 `Read(/)`;本仓 agent 载体(main.ts hookAgent = runTask 读-only * 子代理)没有转录文件设施,照搬=指向不存在文件的幻觉指令,比不发更糟。 * 2. 判词形句("When done, return your result using the ${结构化工具} tool with:\n- ok: true …\n * - ok: false with reason …")——CC 给评估者挂了一只专用结构化输出工具并按 {ok, reason} 转译; * 本仓决策面=子代理 final 文本折伪 stdout 走 `parseHookStdout`(JSON=SyncHookOutput 决策, * 非 JSON=该事件对 plain text 的既有语义),判词形由 hook 作者自己的 prompt 承担——系统提示再 * 指定一个 {ok, reason} 形会与作者 prompt 的输出指令**打架**,且本仓没有那只工具。 * 另两处已有登记的正当偏离(不在本文件):步数上限 CC `M = 50` vs 本仓 `maxTurns: 10`(成本收窄, * main.ts 成文);`thinkingConfig`/`mode:"dontAsk"` 等 CC 载体旋钮不适用本仓 runTask 形。 */ /** Stop / SubagentStop 档头句(CC 逐字)。 */ export declare const CC_AGENT_HOOK_HEAD_STOP = "You are verifying a stop condition in Claude Code. Your task is to verify that the agent completed the given plan."; /** 其余事件档头句(CC 逐字,`${event}` 为事件名插值——CC 原文即模板插值形)。 */ export declare function ccAgentHookHeadFor(event: string): string; /** 工具指令段(CC 逐字;两档共用尾段中可搬的部分——transcript 句与判词形句见头注登记偏离)。 */ export declare const CC_AGENT_HOOK_TOOLS_SEGMENT = "Use the available tools to inspect the codebase and verify the condition.\nUse as few steps as possible - be efficient and direct."; /** agent 臂评估者的完整系统提示:两档头句 + 工具指令段。 */ export declare function ccAgentHookSystemFor(event: string): string; //# sourceMappingURL=cc-agent-hook-prompt.d.ts.map