Multi-CLI Review Action
Version History
- v2.4: Aligned paired intake wording with coordinator-assigned letter-based
reviewer-idslots and CLI identity recorded separately insource-cli - v2.3: Repositioned the skill as a workflow-agnostic action-side pair contract and moved reviewer-count defaults out of the core contract
- v2.2: Added an explicit no-new-problems adoption gate and aligned workflow wording around regression-safe fixes
- v2.1: Tightened report intake rules, safety gates, and skill-spec alignment for the shared paired contract
Purpose
multi-cli-review-action is the action-side skill paired with multi-cli-review.
The current CLI uses it to consume reviewer reports generated by that paired skill. It is intentionally workflow-agnostic: any workflow, command pack, or manual coordinator may use it, as long as the reviewer reports follow the paired contract.
It exists to do one job safely:
- Collect reviewer reports
- Deduplicate and classify findings
- Re-check each candidate against local code and project rules
- Ask for confirmation before edits
- Apply only confirmed, in-scope fixes
- Record decisions and verification results
When to Use
Use this skill when any of the following is true:
- Other CLI instances have already written one or more
multi-cli-reviewreports - The user asks to "汇总这些审查报告"
- The user asks to "处理 multi-cli-review 输出"
- The user asks to "按 reviewer 建议执行修复"
- The current CLI must reconcile multiple reviewer opinions before changing files
When Not to Use
- You only need to generate reviewer findings, not apply fixes: use
multi-cli-review - You are doing a normal implementation task without multi-reviewer handoff
- The reports are still unconfirmed hypotheses and the user has not yet agreed to a fix plan
Core Rules
- Single fixer: reviewer CLIs only produce reports; this skill never delegates edits back to reviewers.
- Reports are evidence, not truth: every finding must be re-checked against the local codebase, task scope, and project rules before adoption.
- No surprise edits: after summary and decisioning, the current CLI must get user confirmation before making concrete file changes.
- No scope expansion: only fix issues that belong to the current task; do not piggyback refactors, new features, or broad cleanups.
- No automatic conflict resolution: mutually exclusive or high-risk suggestions require human judgment.
- Coordinator-owned orchestration: reviewer-count defaults, round planning, and reviewer command packaging belong to the upstream coordinator, workflow, or command pack; this skill only consumes the resulting report set.
- No fix-induced regressions: do not adopt a fix if the current CLI cannot explain why it is unlikely to introduce a new defect, regression, or broader risk than the original issue.
- Verification is mandatory: after edits, run the relevant validation commands before claiming completion.
- Project-root path resolution: relative paths are resolved against the active project root, never system
/tmpor a tool install directory.
Protocols
| Protocol | Status | When Used |
|---|---|---|
action-v2 |
Current | Explicit --task-dir task-level multi-reviewer flow |
action-v1 |
Compatibility only | Legacy single-report flow |
Protocol Selection
- If
--task-diris present, useaction-v2. - If a single legacy report path is provided, use
action-v1. - New work should prefer
action-v2.
Inputs
action-v2
| Parameter | Required | Meaning |
|---|---|---|
--task-dir |
Yes | Task directory, for example tmp/multi-cli-review/<task-id> |
--round |
No | Review round to consume; default is the latest available round |
--force |
No | Re-consume reports already listed in .processed.json |
--dry-run |
No | Produce decisions only; do not edit files and do not mark reports as consumed |
action-v1 Compatibility
| Parameter | Required | Meaning |
|---|---|---|
<report-path> |
Yes | Legacy cur_defect.md path or equivalent single report |
<plan-path> |
No | Optional existing optimization/action draft |
Path Rules
Relative paths must resolve against the active project root.
Do not reinterpret relative paths as:
- the skill repository root
- the user home directory
- system
/tmp - a CLI installation directory
If project root detection is ambiguous, stop and ask for an absolute path instead of guessing.
Report Intake Contract
For action-v2, only consume files that satisfy all of the following:
- The file lives under
{task-dir}/review-round-{N}/ - The basename is exactly
<reviewer-id>.md - The frontmatter includes:
task-idroundreviewer-idsource-cliprotocol: task-level
- Frontmatter values match the directory and filename
- The file is not one of:
summary-*.mdaction.md- ad-hoc notes, scratch docs, or human decision memos
If a file is ambiguous, malformed, or inconsistent with the contract, stop and ask for cleanup instead of consuming it optimistically.
Report Set Rules
- This skill consumes the valid
multi-cli-reviewreports present for the chosen round; it does not define how many reviewers should be launched by default. 0valid reports is an error.- If a coordinator, workflow, or command pack defines reviewer-count defaults or caps, treat those as upstream policy rather than redefining them here.
- In current task-level rounds,
reviewer-idshould be interpreted as the coordinator-assigned reviewer slot ID (a/b/c/d), whilesource-cliidentifies the actual reviewer CLI.
Decision States
Each candidate finding must end in exactly one of these states:
adopted: confirmed against code/spec/task boundary and approved for executionignored: rejected with a concrete reasonmanual-decision: conflict, ambiguity, or risk requires human inputblocked: execution or verification could not proceed
Workflow
Step 1: Resolve Mode and Inputs
- Determine whether this is
action-v2or legacy compatibility mode. - Resolve all relative paths against the active project root.
- Load
.processed.jsonwhen present.
Step 2: Collect Candidate Reports
For action-v2:
- Read only the target
review-round-{N}directory. - Filter files using the report intake contract.
- Reject malformed or mismatched files.
- Skip previously consumed reports unless
--forceis set.
Stop conditions:
- no valid report files
- all valid reports already consumed and
--forceis not set
Step 3: Convert Reports into Candidate Findings
- Merge findings by location and meaning, not by filename alone.
- Preserve all source reviewers for each merged finding.
- Preserve conflicting fix directions instead of flattening them away.
Step 4: Re-check Every Candidate Locally
Before any finding can be marked adopted, the current CLI must verify:
- the issue still exists in the current code
- the issue belongs to the active task boundary
- the proposed fix does not contradict project rules or existing abstractions
- the proposed fix is smaller than the damage it prevents
- the planned change is unlikely to introduce a new bug, regression, or higher-cost side effect in nearby behavior
If any of those checks fail, mark the finding ignored or manual-decision; do not auto-adopt it.
Step 5: Decide
Use this decision policy:
adopted: specific, in-scope, locally verified, safe to changeignored: stale, duplicate, incorrect, out-of-value, or already fixedmanual-decision: conflicting suggestions, unclear ownership, risky side effects, unresolved boundary questions, or no clear low-regression fix path
Every non-adopted item must include a reason that is specific enough to avoid the same report being re-litigated next round.
Step 6: Write the Summary First
Write summary-round-{N}.md before any file edits.
The summary must record:
- reviewer files consumed
- total findings before and after deduplication
- conflicts
- the full decision list
- ignored reasons
- manual-decision items that still need user input
Step 7: Ask for Confirmation Before Edits
After the summary exists, present the fix plan and wait for user confirmation.
Do not edit files yet when:
- the user has not confirmed execution
- any
manual-decisionitem blocks safe progress - the remaining plan would expand scope
- the current CLI cannot justify that the planned fix will not create a new problem or regression
Step 8: Execute Only Confirmed Fixes
In normal mode:
- modify files only for
adopteditems - keep changes inside the confirmed boundary
- record what changed and why in
action.md
In --dry-run mode:
- do not modify source files
- do not mark reports as consumed
- write only decision artifacts that clearly say they are previews
Step 9: Verify Before Completion
After edits, run the smallest command set that can prove the fixes did not introduce new issues:
- lint or formatting checks if relevant
- typecheck if relevant
- tests or targeted regression commands if relevant
Record actual results only: pass, fail, or not run.
Step 10: Finalize State
- Update
action.md - Update
.processed.jsononly for reports actually consumed in a non-dry-run execution - Leave blocked or manual items visible for the next human decision
Output Files
summary-round-{N}.md
Minimum contents:
- task id and round
- reviewer source list
- deduplicated findings table
- conflicts table
- decision summary
- ignored reasons
- pending manual decisions
action.md
Minimum contents:
- execution mode:
normalordry-run - adopted edits actually applied
- ignored items and reasons
- blocked or manual-decision items
- verification commands and outcomes
.processed.json
Use this as internal consumption state only.
Rules:
- do not update it during
--dry-run - do not mark malformed or skipped reports as consumed
- do not use it as a substitute for
action.md
Conflict Handling
Treat a finding as conflicted when reviewers disagree on any of these:
- whether a change is needed at all
- the file or location to change
- the implementation direction
- the risk or severity in a way that changes the recommended action
Conflict policy:
- keep all alternatives visible
- do not choose automatically
- surface the exact conflict to the user
Example prompt:
⚠️ 需要人工介入
冲突问题:src/c.py:30
- reviewer-a:重构整个函数
- reviewer-b:仅修正返回值
请选择:
1. 采纳 reviewer-a
2. 采纳 reviewer-b
3. 自定义方案
4. 忽略该问题
Required Stop Conditions
Stop and ask for human input when any of the following is true:
- conflicting suggestions remain unresolved
- a finding crosses task scope
- a suggested fix would violate project conventions or security expectations
- a suggested fix cannot be reduced to a low-regression change with a defensible rationale
- verification fails
- the report set is malformed or incomplete
- the round already reached the agreed limit and unresolved items remain
Error Handling
| Case | Required Behavior |
|---|---|
| task dir missing | stop and ask for a valid path |
| no valid reports | stop and report the empty round |
| all reports already consumed | stop unless --force is set |
| malformed report metadata | reject the report and ask for cleanup |
| execution failure | mark the item blocked, record why, continue only if safe |
| verification failure | record failure truthfully and do not claim the fix is complete |
Common Mistakes
- Treating reviewer output as ground truth: always re-check locally before adoption.
- Consuming every
.mdfile in the round directory: only accept files that match the report contract. - Redefining reviewer defaults inside this skill: the upstream coordinator or command surface decides the default count.
- Fixing beyond scope: do not smuggle in refactors or adjacent feature work.
- Closing one issue by opening another: if the planned fix has unclear regression or side-effect risk, stop and move it to
manual-decisioninstead of forcing adoption. - Skipping confirmation: summary first, confirmation second, edits third.
- Skipping verification: a changed file without validation can create a new problem while solving the old one.
Examples
Example 1: Current Protocol
用户:/multi-cli-review-action --task-dir tmp/multi-cli-review/skill-review --round 1
CLI:
1. 读取 round-1 下已有的 reviewer 报告
2. 校验 frontmatter 与文件名一致
3. 合并并去重
4. 对每个候选问题重新核对本地代码和任务边界
5. 排除会明显引入新问题或回归的修复方案
6. 输出 summary-round-1.md
7. 等待用户确认
8. 执行已确认修复
9. 运行验证命令
10. 写入 action.md 和 .processed.json
Example 2: Dry Run
用户:/multi-cli-review-action --task-dir tmp/multi-cli-review/skill-review --round 2 --dry-run
CLI:
1. 读取 round-2 报告
2. 输出决策和冲突
3. 生成预览版 summary / action
4. 不改源码
5. 不更新 .processed.json
Related Skills
multi-cli-review: reviewer-side report generationverification-before-completion: post-change verification disciplinebrainstorm: boundary clarification before accepting risky fixes
Compatibility Notes
- Single-report legacy usage may still enter
action-v1, but it must follow the same safety gates: re-check locally, ask before editing, and verify afterward. - New task-level usage should always prefer
action-v2with explicit--task-dir.