unified-review

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Table of Contents

目录

Unified Review Orchestration

统一评审编排

Intelligently selects and executes appropriate review skills based on codebase analysis and context.
基于代码库分析和上下文智能选择并执行合适的评审Skill。

Quick Start

快速开始

bash
undefined
bash
undefined

Auto-detect and run appropriate reviews

Auto-detect and run appropriate reviews

/full-review
/full-review

Focus on specific areas

Focus on specific areas

/full-review api # API surface review /full-review architecture # Architecture review /full-review bugs # Bug hunting /full-review tests # Test suite review /full-review all # Run all applicable skills
**Verification:** Run `pytest -v` to verify tests pass.
/full-review api # API surface review /full-review architecture # Architecture review /full-review bugs # Bug hunting /full-review tests # Test suite review /full-review all # Run all applicable skills
**验证:** 运行`pytest -v`确认测试通过。

When To Use

适用场景

  • Starting a full code review
  • Reviewing changes across multiple domains
  • Need intelligent selection of review skills
  • Want integrated reporting from multiple review types
  • Before merging major feature branches
  • 启动全量代码评审
  • 跨多个领域的变更评审
  • 需要智能选择评审Skill
  • 希望从多种评审类型中获得集成报告
  • 合并大型功能分支之前

When NOT To Use

不适用场景

  • Specific review type known
    • use bug-review
  • Test-review
  • Architecture-only focus - use architecture-review
  • Specific review type known
    • use bug-review
  • 已明确具体评审类型
    • 请使用bug-review
  • 测试评审
  • 仅关注架构 - 请使用architecture-review
  • 已明确具体评审类型
    • 请使用bug-review

Review Skill Selection Matrix

评审Skill选择矩阵

Codebase PatternReview SkillsTriggers
Rust files (
*.rs
,
Cargo.toml
)
rust-review, bug-review, api-reviewRust project detected
API changes (
openapi.yaml
,
routes/
)
api-review, architecture-reviewPublic API surfaces
Test files (
test_*.py
,
*_test.go
)
test-review, bug-reviewTest infrastructure
Makefile/build systemmakefile-review, architecture-reviewBuild complexity
Mathematical algorithmsmath-review, bug-reviewNumerical computation
Architecture docs/ADRsarchitecture-review, api-reviewSystem design
General code qualitybug-review, test-reviewDefault review
代码库模式评审Skill触发条件
Rust文件(
*.rs
Cargo.toml
rust-review, bug-review, api-review检测到Rust项目
API变更(
openapi.yaml
routes/
api-review, architecture-review公共API层面变更
测试文件(
test_*.py
*_test.go
test-review, bug-review测试基础设施变更
Makefile/构建系统makefile-review, architecture-review构建逻辑复杂度较高
数学算法math-review, bug-review数值计算相关代码
架构文档/ADRarchitecture-review, api-review系统设计相关变更
通用代码质量bug-review, test-review默认评审逻辑

Workflow

工作流

1. Analyze Repository Context

1. 分析仓库上下文

  • Detect primary languages from extensions and manifests
  • Analyze git status and diffs for change scope
  • Identify project structure (monorepo, microservices, library)
  • Detect build systems, testing frameworks, documentation
  • 从文件扩展名和配置清单识别主要开发语言
  • 分析git状态和diff确定变更范围
  • 识别项目结构(单仓、微服务、库)
  • 检测构建系统、测试框架、文档资源

2. Select Review Skills

2. 选择评审Skill

python
undefined
python
undefined

Detection logic

Detection logic

if has_rust_files(): schedule_skill("rust-review") if has_api_changes(): schedule_skill("api-review") if has_test_files(): schedule_skill("test-review") if has_makefiles(): schedule_skill("makefile-review") if has_math_code(): schedule_skill("math-review") if has_architecture_changes(): schedule_skill("architecture-review")
if has_rust_files(): schedule_skill("rust-review") if has_api_changes(): schedule_skill("api-review") if has_test_files(): schedule_skill("test-review") if has_makefiles(): schedule_skill("makefile-review") if has_math_code(): schedule_skill("math-review") if has_architecture_changes(): schedule_skill("architecture-review")

Default

Default

schedule_skill("bug-review")
**Verification:** Run `pytest -v` to verify tests pass.
schedule_skill("bug-review")
**验证:** 运行`pytest -v`确认测试通过。

3. Execute Reviews

3. 执行评审

  • Run selected skills concurrently
  • Share context between reviews
  • Maintain consistent evidence logging
  • Track progress via TodoWrite
  • 并发运行选中的Skill
  • 不同评审之间共享上下文
  • 保持统一的证据日志记录规则
  • 通过TodoWrite跟踪进度

4. Integrate Findings

4. 归总发现结果

  • Consolidate findings across domains
  • Identify cross-domain patterns
  • Prioritize by impact and effort
  • Generate unified action plan
  • 整合跨领域的发现结果
  • 识别跨领域的共性问题
  • 按影响和投入成本排序优先级
  • 生成统一的行动计划

Review Modes

评审模式

Auto-Detect (default)

自动检测(默认)

Automatically selects skills based on codebase analysis.
基于代码库分析自动选择合适的Skill。

Focused Mode

聚焦模式

Run specific review domains:
  • /full-review api
    → api-review only
  • /full-review architecture
    → architecture-review only
  • /full-review bugs
    → bug-review only
  • /full-review tests
    → test-review only
仅运行指定领域的评审:
  • /full-review api
    → 仅运行api-review
  • /full-review architecture
    → 仅运行architecture-review
  • /full-review bugs
    → 仅运行bug-review
  • /full-review tests
    → 仅运行test-review

Full Review Mode

全量评审模式

Run all applicable review skills:
  • /full-review all
    → Execute all detected skills
运行所有适用的评审Skill:
  • /full-review all
    → 执行所有检测到的Skill

Quality Gates

质量门禁

Each review must:
  1. Establish proper context
  2. Execute all selected skills successfully
  3. Document findings with evidence
  4. Prioritize recommendations by impact
  5. Create action plan with owners
每个评审必须满足:
  1. 建立正确的上下文
  2. 所有选中的Skill成功执行
  3. 所有发现结果都附带证据记录
  4. 建议按影响程度排序优先级
  5. 创建带负责人的行动计划

Deliverables

交付物

Executive Summary

执行摘要

  • Overall codebase health assessment
  • Critical issues requiring immediate attention
  • Review frequency recommendations
  • 代码库整体健康度评估
  • 需要立即处理的严重问题
  • 评审频率建议

Domain-Specific Reports

领域专属报告

  • API surface analysis and consistency
  • Architecture alignment with ADRs
  • Test coverage gaps and improvements
  • Bug analysis and security findings
  • Performance and maintainability recommendations
  • API层面分析与一致性检查结果
  • 架构与ADR的对齐情况
  • 测试覆盖缺口与改进建议
  • Bug分析与安全发现结果
  • 性能与可维护性建议

Integrated Action Plan

集成行动计划

  • Prioritized remediation tasks
  • Cross-domain dependencies
  • Assigned owners and target dates
  • Follow-up review schedule
  • 按优先级排序的修复任务
  • 跨领域依赖关系
  • 分配的负责人与目标完成日期
  • 后续评审计划

Modular Architecture

模块化架构

All review skills use a hub-and-spoke architecture with progressive loading:
  • pensive:shared
    : Common workflow, output templates, quality checklists
  • Each skill has
    modules/
    : Domain-specific details loaded on demand
  • Cross-plugin deps:
    imbue:evidence-logging
    ,
    imbue:diff-analysis/modules/risk-assessment-framework
This reduces token usage by 50-70% for focused reviews while maintaining full capabilities.
所有评审Skill采用集线器辐条架构,支持渐进式加载:
  • pensive:shared
    :通用工作流、输出模板、质量检查清单
  • 每个Skill都有
    modules/
    目录
    :按需加载的领域专属详情
  • 跨插件依赖
    imbue:evidence-logging
    imbue:diff-analysis/modules/risk-assessment-framework
这种架构在保留完整能力的同时,可将聚焦模式评审的token使用量降低50-70%。

Exit Criteria

退出标准

  • All selected review skills executed
  • Findings consolidated and prioritized
  • Action plan created with ownership
  • Evidence logged per structured output format
  • 所有选中的评审Skill都已执行
  • 发现结果已完成归总并排序优先级
  • 已创建带责任人的行动计划
  • 已按结构化输出格式记录证据

Supporting Modules

支撑模块

  • Review workflow core - standard 5-step workflow pattern for all pensive reviews
  • Output format templates - finding entry, severity, action item templates
  • Quality checklist patterns - pre-review, analysis, evidence, deliverable checklists
  • 评审工作流核心 - 所有pensive评审通用的5步工作流模式
  • 输出格式模板 - 发现条目、严重等级、行动项模板
  • 质量检查清单模式 - 预评审、分析、证据、交付物检查清单

Troubleshooting

故障排查

Common Issues

常见问题

If the auto-detection fails to identify the correct review skills, explicitly specify the mode (e.g.,
/full-review rust
instead of just
/full-review
). If integration fails, check that
TodoWrite
logs are accessible and that evidence files were correctly written by the individual skills.
如果自动检测未能识别正确的评审Skill,请明确指定模式(例如使用
/full-review rust
而非仅
/full-review
)。如果集成失败,请检查
TodoWrite
日志是否可访问,以及各个Skill是否正确写入了证据文件。