multi-cli-review-action
Multi-CLI Review Action
Version History
- v2.1: Tightened report intake rules, safety gates, and skill-spec alignment for the current workflow contract
Purpose
multi-cli-review-action is the current CLI only skill for consuming reviewer reports that were generated by multi-cli-review.
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.
- 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-idprotocol: 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.
Reviewer Count Rules
- This skill may process 1 to 4 reviewer reports in a round.
0reports is an error.- More than
4reports is an error. - The default reviewer count is owned by the upstream workflow/command, not by this skill.
- In the current project workflow, upstream docs currently use 2 reviewers by default. This skill must stay compatible with that and must not silently redefine the default as
1.
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
- more than four 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
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, or unresolved boundary questions
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
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
- 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 |
| more than four reports | stop and ask the user to narrow the round |
| 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: upstream workflow decides the default count.
- Fixing beyond scope: do not smuggle in refactors or adjacent feature work.
- 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 下 2 份 reviewer 报告
2. 校验 frontmatter 与文件名一致
3. 合并并去重
4. 对每个候选问题重新核对本地代码和任务边界
5. 输出 summary-round-1.md
6. 等待用户确认
7. 执行已确认修复
8. 运行验证命令
9. 写入 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.
More from starforall/ai-coding-toolkit
demand-risk-assessment
Use when 需要对外包/项目/需求做“接/谈判后接/暂停/拒绝”的风险与收益判断,尤其在范围/验收/付款/合规/工期/依赖不清,或出现应急插队、续约变更、多需求排序、AI/LLM 等高不确定信号时。
35multi-cli-review
Use when a reviewer CLI must analyze a skill, command, workflow, document, config, or code artifact and produce a structured defect report for the current CLI to consume, especially after requests like "分析这个 skill 的问题", "输出结构化问题报告", or "做多 CLI 审查".
34collaborating-with-claude
Use the Claude Code CLI to consult Claude and delegate coding tasks for prototyping, debugging, and code review. Supports multi-turn sessions via SESSION_ID. Optimized for low-token, file/line-based handoff.
30example-skill
Minimal example skill template compatible with the Skills CLI (`npx skills add`).
1