Skip to content

相关工作:基于 pi-agent 的方案 #191

Description

@Svtter

调研发现以下 pi-agent 生态的 action 和扩展,可能为 multi-review 提供现成方案:

GitHub Actions

1. shaftoe/pi-coding-agent-action (Marketplace)

  • 通过 /pi 评论或 prompt 输入触发
  • 内置 GitHub 工具(get_pr_diffcreate_pull_requestget_issue_or_pr_thread
  • 支持通过 extensions 输入加载 Pi 扩展(关键能力)
  • 暴露 responsecostduration_seconds 等输出
  • 适配 GitHub、Codeberg、自托管 Forgejo

2. cv/pi-action (Marketplace)

  • 通过 @pi 评论触发
  • 支持自定义 prompt 模板({{diff}}{{title}}{{body}} 等占位符)
  • 通过 secret gist 共享会话
  • 单代理设计,不支持多 reviewer 并行

多审查关键扩展

3. messense/pi-parallel-agents — 最匹配 multi-review 需求

  • 5 种模式:单任务、并行任务、顺序链、模型竞争、团队模式(DAG)
  • 团队模式支持:security reviewer + performance reviewer + test reviewer + synthesizer 并行运行,最后合成
  • 任务间支持 depends 依赖声明,独立任务自动并行
  • 支持迭代改进(worker → reviewer 循环)
  • 安装:pi install npm:pi-parallel-agents
  • 可直接在 shaftoe action 中使用:
    - uses: shaftoe/pi-coding-agent-action@v2
      with:
        extensions: npm:pi-parallel-agents
        prompt: 'Review this PR from security, performance, and testing angles using team mode'

4. earendil-works/pi-review (225 stars)

  • Pi 官方 review 扩展
  • 支持 /review/end-review 命令
  • 可审查未提交变更、分支 diff、特定 commit、GitHub PR
  • REVIEW_GUIDELINES.md 加载自定义审查规则
  • 单代理,不直接支持多 reviewer 并行

5. nicobailon/pi-subagents

  • Pi 扩展,将工作委托给专注的子代理
  • 用例:代码审查、侦察、实施、并行审计
  • pi.dev/packages 上架

与现有方案的对比

工具 多审查 机制 适合作为 Action
pi-parallel-agents DAG 团队模式(并行 reviewer + synthesizer) ✅ 通过 shaftoe action
pi-subagents 子代理委托,并行审计 ✅ 通过 shaftoe action
pi-review 单代理 review ⚠️ 可配合但不直接支持多审
cv/pi-action 单 Pi 代理调用 ✅ 独立 action
shaftoe/pi-coding-agent-action 通过扩展 加载 pi-parallel-agents ✅ 独立 action

初步评估

shaftoe/pi-coding-agent-action + pi-parallel-agents 是最接近我们 multi-review 需求的组合方案:

  • 天然解决了之前 opencode github run subprocess 无法获取 review 内容的问题(pi 的扩展直接在 agent 内部运行,输出可控)
  • DAG 团队模式直接对应我们之前设计的 reviewer persona + coordinator 架构
  • 不需要自己管理 subprocess、worktree 隔离等复杂逻辑

可以考虑作为方案 E加入讨论。

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions