Skip to content

research: 对比连续 Advisor 与按需 Reviewer,验证独立监督是否值得常驻成本 #162

Open

Description

@tt-a1i

一句话结论

OMP 提供可选的连续 Advisor:独立模型增量审阅主 Agent transcript,可在发现 concern/blocker 时 steer 当前或后续 turn。OpenPI 当前把 advisor 做成由 parent model 按需 spawn 的只读角色。

两种设计都合理,但优化目标不同。建议做单变量对照,回答“连续监督在哪些任务上显著降低失败,以及它的 token、latency、cache 和误打断成本”。在证据出来前,不把第二模型常驻进 OpenPI 默认路径。

固定证据

对比固定在:

  • OpenPI main@2a69d3f32994da4123f1312b7fa84ef3d6119be1
  • OMP main@151dc754e8cd9314721aa6c78a168a205a4b0e4c

OMP 当前:

  • Advisor 默认需要显式 advisor.enabled: true,可配置一个或多个 reviewer model:enable/model contract
  • 它按 primary transcript delta 增量审阅,并在 history rewrite 时 reset/re-prime,避免继续使用旧 branch context:transcript contract
  • nit、concern、blocker 有不同投递/steer 语义;late terminal concern 通常只保留为 card,blocker 可重新触发 turn:severity semantics
  • emission guard 做归一化、空洞建议过滤、去重和每 update 一条上限:emission guard
  • 可选 syncBacklog 在 Advisor 落后时最多等待 30 秒,但 Advisor failure 不应永久阻塞 primary:catch-up contract

OpenPI 当前:

  • advisor 是 built-in read-only Agent Type,由 parent model 决定何时 spawn;默认继承 parent model,也可经统一 setup 分配角色模型:advisor role
  • 它与 explorer/reviewer 一样沿 Direct Subagent / Workflow 的普通 Pi child lifecycle 工作,没有独立常驻 transcript watcher。
  • OpenPI 的优势是普通任务不支付第二模型请求,也不让 reviewer 自动改变主 Agent 的执行节奏。

需要验证的假设

连续 Advisor 可能在以下任务更有价值:

  • 高风险长链修改,早期方向错误的返工成本很高;
  • 主模型容易 hallucinate API、忽略约束或陷入重复工具循环;
  • 用户要求边执行边独立审计;
  • 无法在结束后通过普通 code review 挽回的外部副作用。

按需 Reviewer 可能更适合:

  • 强模型、短任务和明确修改;
  • 审查点天然位于 diff/test 之后;
  • token/cache/latency 比早期纠偏更重要;
  • 连续 Advisor 缺少高质量新证据,只会产生泛化建议。

建议实验

至少四臂:

  1. Bare OpenPI:无 reviewer;
  2. OpenPI 按需 reviewer/advisor,由 parent 自主决定;
  3. OpenPI 固定 phase-boundary reviewer(例如实现后、合并前);
  4. OMP 连续 Advisor。

需要冻结相同模型、任务、权限和工具 profile,并记录:

  • 最终 verifier / review defects;
  • 首个有效纠偏出现在哪个阶段;
  • Advisor note 被采纳、忽略、误打断的比例;
  • 主模型请求数、Reviewer 请求数、tokens、cache、wall time;
  • 因提前纠偏避免的返工与因监督造成的额外回合;
  • Advisor 自己的失败、超时、重复/空洞建议和 unsafe output。

OpenPI 应保留的优势

  • model owns delegation:按需 Reviewer 仍是默认方向;
  • continuous supervision 必须 opt-in,不能靠任务关键词自动开启;
  • Reviewer authority 默认只读,不能因“Advisor”身份扩大权限;
  • advice 是 evidence,不是 approval 或 canonical completion;
  • 对 terminal answer 的 late concern 不应无条件重启;
  • 不增加 Workflow acceptance judge 或第二个完成真相。

非目标

  • 不先实现 OMP Advisor runtime 再找用例;
  • 不以“多一个模型一定更可靠”为前提;
  • 不把 Reviewer 分数当 merge gate;
  • 不只比较 pass rate 而隐藏成本;
  • 不让 Advisor 修改仓库或批准外部副作用;
  • 不用 system prompt 模拟 runtime interruption invariants。

完成条件

  • 预注册任务、模型、工具/权限 profile 和四臂比较协议
  • Advisor adoption、有效纠偏、误打断、重复建议有可审计标注
  • quality、requests、tokens、cache、latency、cost 分开报告
  • 至少包含一个早期纠偏可能有价值的高风险任务和一个普通短任务
  • 区分“存在 Advisor”与“Advisor 实际触发并改变结果”
  • 只有质量收益可重复且成本可接受时,才设计 OpenPI opt-in mechanism
  • 若按需 Reviewer 持平或更优,明确记录不引入连续 watcher

与现有 Issue 的关系

Activity

  1. added
    documentation
    on Aug 25, 2026
  2. 627150795 commented on Aug 29, 2026

    @627150795
    Contributor

    I am taking a focused research slice: turn the proposed four-arm Advisor versus Reviewer comparison into a reproducible benchmark protocol with pre-registered tasks, fixed model/tool profiles, cost and latency counters, and adoption or false-interruption labels. This pass will be docs/design-only and will not claim experimental results or justify a runtime watcher.

  3. 627150795 commented on Aug 29, 2026

    @627150795
    Contributor

    I opened #262 (#262) for the focused protocol slice. It defines a four-arm, pre-registered comparison of bare OpenPI, on-demand review, phase-boundary review, and continuous Advisor supervision, with separate quality, adoption, false-positive, cost, latency, and failure counters. The docs checks passed: git diff --check, bun run lint, and bun run typecheck. It contains no benchmark result and does not add a runtime watcher.

  4. tt-a1i commented on Sep 9, 2026

    @tt-a1i
    CollaboratorAuthor

    Source-read slice only: Agent Types vs community markdown roles / second-model advisors. No install, no runtime, no watcher.

    Record (uncommitted on this checkout): docs/research/EXPERIMENT_AGENT_TYPES_2026-09-09.md.

    What this does not change about #162:

    • OpenPI advisor / reviewer remain on-demand read-only children with the same harness allowlist (read grep find ls fd rg git_show git_diff git_log). The difference is one-line body text, not a resident transcript watcher.
    • Community packages that reuse the word “advisor” (@juicesharp/rpiv-advisor 2.9.0, pi-advisor-flow 0.5.5, OMP watchdog @ 151dc754) are a second parent-session model, sometimes with gates. They are not a drop-in for agent_type: "advisor".
    • #262 is still closed/unmerged. This pass does not re-file the protocol and does not claim four-arm results.

    What the role-file comparison adds:

    • OpenPI already enforces “read-only” at the harness (tools: ∩ child denylist; unknown restriction keys reject the type; a broken higher-precedence file blocks fallback). Official Pi example reviewer.md still tells the model to treat bash as read-only because “permissions are not perfectly enforceable.”
    • Project .pi/agents/*.md must stay trust-gated. pi-subagents-j0k3r 1.5.15 loads project agents/subagents with no projectTrusted check. @ferris1225/pi-subagents 4.3.17 does gate on trust, but is a second subagent OS; its scout name-lock and sentinel+bash are not stealable.
    • @akagilnc/pi-workflow-roles is an explicit soul pack + external ak-role CLI. Steal nothing from it.

    No implementation Issue from this slice. The only in-repo inconsistency noted (not fixed here): PLAN_MODE_CHILD_TOOLS omits the three git-read tools that the built-in read-only types declare, so the /plan spawn error that says “use explorer, reviewer, advisor” is not consistent with the allowlist math.

  5. tt-a1i commented on Sep 9, 2026

    @tt-a1i
    CollaboratorAuthor

    Source-read follow-up (2026-09-09), not four-arm results and not a role-allowlist redo. Record: https://github.com/openpi-dev/openpi/blob/a9b40f0044ee59c360a6077c1c0bdbdbd30da10b/docs/research/EXPERIMENT_SUGGESTIONS_2026-09-09.md — that path is a local research draft on this checkout and may still be uncommitted.

    Three products share the word “advisor / suggest” and should stay separate in this issue:

    1. OpenPI next-action Suggestion (extensions/suggestions/): opt-in, /openpi-setup must name a registry model, TUI-only after agent_settled, predicts the user’s next line, Right accepts without submit, never appendEntry / sendMessage, never enters session or model context. The published benchmark protocol already freezes this disabled.
    2. OpenPI built-in Agent Type advisor: on-demand read-only child. Already scoped in the Agent Types note; not a continuous watcher.
    3. Community second-model advisors (@juicesharp/rpiv-advisor 2.9.0, pi-advisor-flow 0.5.5, RimuruW pi-advisor 0.3.0, @ribbons-digital/pi-advisor 0.4.1): completeSimple (or an isolated Advisor session) whose tool result or sendMessage({ deliverAs: "steer"|"followUp" }) enters the executor context. Flow’s default gates can block-session. Ribbons is the closest community shape to arm 4.

    Do not treat (1) as a cheap stand-in for (3), and do not implement (3) as a Suggestion upgrade. If the four-arm protocol is revived, keep next-action suggestions off so user-ghost tokens are not counted as supervision cost. This pass did not pi install or run any community package.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions