Skip to content

feat(multi-review): add feature-missing built-in persona#253

Merged
Svtter merged 2 commits into
mainfrom
feature-missing-persona
Jun 10, 2026
Merged

feat(multi-review): add feature-missing built-in persona#253
Svtter merged 2 commits into
mainfrom
feature-missing-persona

Conversation

@Svtter

@Svtter Svtter commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

What

Port the standalone feature-missing action's audit prompt into multi-review as a built-in reviewer persona.

Why

feature-missing was the only review-type action without a corresponding persona in multi-review. After this change all 7 review-type actions have persona coverage:

Action Persona Status
quality quality.yaml ✅ existing
architecture architecture.yaml ✅ existing
security security.yaml ✅ existing
performance performance.yaml ✅ existing
regression-test-missing regression-test.yaml ✅ existing
test-value-detector test-value.yaml ✅ existing
spec-coverage spec-coverage.yaml ✅ existing
feature-missing feature-missing.yaml this PR

Changes

  • New multi-review/reviewers/feature-missing.yaml — prompt from feature-missing/action.yml
  • Added feature-missing:1 to DEFAULT_TEAM in multi-review/src/reviewers.ts
  • Added feature-missing.yaml to loadBuiltInReviewers file list

Testing

  • npm run build passes
  • Test failures are pre-existing (same on main)

Refs

Port the feature-missing action's prompt into multi-review as a built-in
reviewer persona (feature-missing.yaml). This enables multi-review users to
run feature-missing audits alongside other reviewers via default-team or
MULTI_REVIEW_DEFAULT_TEAM, eliminating the need for a separate action step.

Changes:
- New reviewers/feature-missing.yaml with the feature-missing prompt
- Added feature-missing to DEFAULT_TEAM and loadBuiltInReviewers file list
@github-actions

Copy link
Copy Markdown

✅ 可合并 / CAN MERGE

所有 6 位 reviewer 均无阻塞项、警告项或建议项。PR 遵循现有 reviewer 扩展模式,仅新增 YAML 配置文件和注册入队,无安全、性能或架构风险。

ℹ️ No issues found / 未发现问题

💰 Review Cost — $0.0000
Role Cost (USD) Input Output Reasoning Cache Read Cache Write
quality $0.0000 10,072 109 252 0 0
security $0.0000 10,081 214 1,018 0 0
performance $0.0000 10,084 79 321 0 0
architecture $0.0000 10,085 285 411 0 0
regression-test $0.0000 10,522 154 216 0 0
test-value $0.0000 12,210 159 910 0 0
coordinator $0.0000 9,677 142 136 0 0
Total $0.0000 72,731 1,142 3,264 0 0
📋 各 Reviewer 详细审查结果
quality

可合并 / CAN MERGE

PR 新增 feature-missing reviewer persona,用于审计 PR 是否遗漏了 spec 中要求实现的功能。修改内容简洁:添加了 YAML 配置文件(feature-missing.yaml),并在 DEFAULT_TEAMloadBuiltInReviewers 数组中注册,完全遵循现有 reviewer 的注册模式,无代码质量问题。

阻塞项:无

警告项:无

建议项:无

security

安全无虞 / SECURE

该 PR 新增了一个 feature-missing 审查角色(YAML 提示文件)并将其注册到审查员列表中。分析未发现安全风险:

  • 输入验证与清理:无用户输入处理逻辑变更。YAML 文件为静态配置文件,提示内容硬编码。
  • 身份认证与授权:无相关逻辑变更。
  • 注入漏洞:提示中包含 gh pr view 等命令,但命令及参数均为硬编码字符串,不依赖用户输入构造,不存在命令注入风险。
  • 敏感数据泄露:无密钥、令牌或 PII 处理逻辑。
  • 不安全的依赖:未引入新的依赖。
  • OWASP Top 10:未引入任何新风险。

阻塞项:无

警告项:无

建议项:无

performance

性能良好 / GOOD

该 PR 仅添加了一个新的 review 角色(feature-missing)及其对应的 prompt 配置文件,对性能影响极小。主要变更仅包括增加一个 YAML prompt 文件读取和在默认 team 中引入一个额外 reviewer。

阻塞项:无

警告项:无

建议项:无

architecture

架构合理 / SOUND

该 PR 在架构上完全遵循现有的 reviewer 扩展模式,无结构性问题。

  • 耦合: 无新增依赖,feature-missing reviewer 与其他 reviewer 处于同一层级,互不依赖。
  • 模块放置: 新 YAML 文件放在 multi-review/reviewers/ 目录下,与 quality.yamlsecurity.yaml 等同级,位置正确。命名 feature-missing.yaml 符合 kebab-case 惯例(与 regression-test.yamlspec-coverage.yaml 一致)。
  • 分层: 仅涉及 reviewer 配置层(YAML 文件)和 reviewer 注册层(reviewers.ts 中的列表),无跨域混用。
  • 接口设计: 遵循统一接口(name + prompt 字段的 YAML),抽象级别恰当。
  • 霰弹修改: 仅 1 个新文件 + reviewers.ts 中 2 处单行追加,修改范围极小且集中。
  • 一致性: 注册方式(DEFAULT_TEAM 字符串、loadBuiltInReviewers 数组)与现有全部 reviewer 完全一致。

阻塞项:无

警告项:无

建议项:无

regression-test

无需回归测试 / NO REGRESSION TESTS NEEDED

PR 类型:NEW_FEATURE

分析:该 PR 新增了一个 feature-missing 审核者(reviewer),用于检查 PR 中是否遗漏了规格说明中的功能实现。变更包括:

  • 新增文件 multi-review/reviewers/feature-missing.yaml(审核者配置)
  • DEFAULT_TEAM 字符串中追加 feature-missing:1
  • loadBuiltInReviewers 列表中追加 "feature-missing.yaml"

这是一个纯新增功能,未修改任何现有行为逻辑,不存在需要回归测试覆盖的 bug fix 或 behavior change,因此无需回归测试。

test-value

该 PR 不包含任何测试文件变更。PR diff 仅包含:

  1. 新增 multi-review/reviewers/feature-missing.yaml(prompt 配置文件,非测试)
  2. 修改 multi-review/src/reviewers.ts(将 feature-missing 加入默认团队和内置列表)

没有测试文件被添加或修改,因此不存在低价值测试问题。

ALL TESTS HAVE VALUE

CRITICAL: 无
MEDIUM: 无
LOW: 无

阻塞项:无
警告项:无
建议项:无

@github-actions

Copy link
Copy Markdown

✅ 可合并 / CAN MERGE

所有 reviewer 均同意合并,无阻塞项。跨 reviewer 交叉验证无冲突。

🟢 建议项 / Suggestions (3)

  • Prompt 前后矛盾(security 发现):feature-missing.yaml 中同时写了 "DO NOT use bash or shell commands" 和 Run \gh pr view`use `gh issue view`。建议统一:允许命令则删除禁止声明,不允许则删除 gh` 命令调用步骤。
  • 缺乏内置 reviewer 加载测试(test-value 发现):feature-missing:1 已加入 DEFAULT_TEAM,但无测试验证 loadBuiltInReviewers 能成功加载 feature-missing.yaml 或验证其 name/prompt 字段合法性。建议在 multi-review/src/reviewers.test.ts 中新增测试覆盖。
  • Reviewer 命名风格(quality 发现):feature-missing 是缺陷导向命名,与其他正向命名(qualitysecurity)风格不一致,建议后续考虑统一,如改为 spec-implementationrequirement-coverage
💰 Review Cost — $0.0000
Role Cost (USD) Input Output Reasoning Cache Read Cache Write
quality $0.0000 11,758 128 78 0 0
security $0.0000 10,502 323 3,599 0 0
performance $0.0000 10,505 186 362 0 0
architecture $0.0000 10,506 51 560 0 0
regression-test $0.0000 10,943 146 154 0 0
test-value $0.0000 18,124 400 2,235 0 0
coordinator $0.0000 9,737 297 207 0 0
Total $0.0000 82,075 1,531 7,195 0 0
📋 各 Reviewer 详细审查结果
quality

可合并 / CAN MERGE

这个 PR 新增了一个 feature-missing 审阅者(reviewer),用于检查 PR 中是否遗漏了 spec 中要求的功能。改动很小且清晰。

阻塞项:无

警告项:无

建议项:

  • reviewer 名称 feature-missing 是"缺陷/缺失"导向的命名,与 qualitysecurity 等其他正向命名风格略有不同,建议后续统一命名风格,例如考虑 spec-implementationrequirement-coverage 等名称。不过这属于风格偏好,不影响功能正确性。
security

安全无虞 / SECURE

本次 PR 仅做了两项变更:1)在默认审核团队成员列表中加入 feature-missing:1;2)新增 feature-missing.yaml 作为内置审核人配置,以及对应的 TypeScript 源码更新。未发现安全漏洞。

阻塞项:无

警告项:无

建议项:

  • feature-missing.yaml 的 prompt 中既写了 "DO NOT use bash or shell commands",又写了 Run \gh pr view`use `gh issue view`,前后矛盾。建议统一语义:如果工具允许 LLM 执行命令,删除 "DO NOT use bash or shell commands";如果不允许,删除 gh` 命令调用步骤。
performance

性能良好 / GOOD

此 PR 仅新增一个 feature-missing reviewer 到已有 reviewers 系统中,改动极小:

  • DEFAULT_TEAM 字符串末尾添加 feature-missing:1parseTeam 的 O(n) split 操作常数级增加,无性能影响
  • loadBuiltInReviewers 的 file 数组中添加一个条目,增加一次 readFileSync 调用读取一个 54 行的 YAML 文件,开销微不足道
  • 无数据库查询、无循环/递归变更、无内存分配模式变化、无并发改动
  • 新增 reviewer 执行时会发起额外的 gh 命令和 LLM 调用,但这属于功能设计行为,非性能问题

阻塞项:无

警告项:无

建议项:无

architecture

架构合理 / SOUND

该 PR 在 multi-review 系统中新增 feature-missing reviewer,遵循了已有的架构模式,改动干净、局部化。

阻塞项:无

警告项:无

建议项:无

regression-test

无需回归测试 / NO REGRESSION TESTS NEEDED

NEW_FEATURE

该 PR 新增了一个名为 feature-missing 的 reviewer persona,用于审计 PR 中遗漏的功能实现。改动包括:

  • 新增 multi-review/reviewers/feature-missing.yaml 配置文件
  • DEFAULT_TEAM 中注册 feature-missing reviewer
  • loadBuiltInReviewers 的 YAML 文件列表中注册 feature-missing.yaml

这些改动仅添加新功能,未修改任何现有行为、未修复任何 bug、也未重构核心逻辑,因此不需要回归测试。

test-value

发现低价值测试 / LOW-VALUE TESTS FOUND

CRITICAL
无 / None

MEDIUM
无 / None

LOW

  • multi-review/src/reviewers.test.ts:19multi-review/src/custom-reviewers.test.ts:17:两个测试文件均将 MULTI_REVIEW_DEFAULT_TEAM 硬编码为 "quality:1"(或 "database:1"),绕过 DEFAULT_TEAM 默认值。PR 将 feature-missing:1 加入了 DEFAULT_TEAM,但没有任何测试验证 loadBuiltInReviewers 能成功加载 feature-missing.yaml、验证其 name/prompt 字段合法,或验证 DEFAULT_TEAM 的新值被正确解析。新增代码路径完全未被覆盖。

阻塞项:无 / Blocking Issues: None

警告项:无 / Warnings: None

建议项 / Suggestions:

  • multi-review/src/reviewers.test.tscustom-reviewers.test.ts 均避免加载所有内置 reviewer。建议新增一个测试,使用默认 DEFAULT_TEAM(或显式包含 feature-missing:1),验证 loadBuiltInReviewers 能正确加载 feature-missing.yaml 且其 name/prompt 字段符合 PersonaYAML 接口要求。

@Svtter Svtter merged commit 47a715e into main Jun 10, 2026
3 checks passed
@Svitter Svitter added agent OpenCode agent SDK integration feat New feature or enhancement review:p2 Minor review findings triaged Issue has been triaged labels Jun 10, 2026
@Svitter

Svitter commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

P2 — opt-in build, but two things to resolve before merge.

The persona port itself is solid: multi-review/reviewers/feature-missing.yaml is a faithful adaptation of the standalone feature-missing/action.yml prompt (multi-review severity buckets, read-only DO NOT use bash or shell commands guard, verdict rule preserved). Registering it in loadBuiltInReviewers matches the pattern set by test-value and regression-test.

Two issues block the merge as-is:

1. Blocking — stale multi-review/dist/index.cjs. The action ships from the dist, not the TS source. git grep feature-missing multi-review/dist/index.cjs returns nothing on this branch — the bundled DEFAULT_TEAM and the persona file list are still the pre-PR versions. .github/workflows/ci.yml:27-37 (dist-check job: npm run buildgit diff --quiet -- multi-review/dist/) will reject this PR. Every prior persona-add PR rebuilt dist in the same commit (1b0dd05 test-value, b4b3787 regression-test, 2611e4a spec-coverage). Fix: cd multi-review && npm ci && npm run build, commit multi-review/dist/index.cjs.

2. Should-fix — DEFAULT_TEAM is a default-behavior flip, not a port. Adding feature-missing:1 to DEFAULT_TEAM changes runtime and token cost for every existing user who doesn't override default-team. AGENTS.md flags this as P2-capping. The closest analog (spec-coverage persona, #225) explicitly opted out of DEFAULT_TEAM "to avoid high token cost by default". Default to opt-in: register the YAML, leave DEFAULT_TEAM alone, and let users add feature-missing:1 explicitly. If the #252 v4 deprecation plan actually calls for inclusion, please link the confirmation in the PR body.

Nit: multi-review/README.md:22 persona list omits test-value, spec-coverage, and now feature-missing (drift pre-existed but grows).

Re-rank to P0 once dist is rebuilt and the DEFAULT_TEAM question is settled. Classified as review:p2 / feat / agent.

Note: a submit_pr_review call is being rejected by GitHub (422) while carrying these findings as staged inline comments; posting this summary as a top-level comment so the substance is not lost. The actual review with inline anchors will be retried separately.

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

Labels

agent OpenCode agent SDK integration feat New feature or enhancement review:p2 Minor review findings triaged Issue has been triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants