Loading...
Loading...
Compare original and translation side by side
Platform note: This skill works best with agents that support subagent spawning. On platforms without that capability, simulate the reviewer step by opening a fresh chat context, pasting only the work product (no prior reasoning), and asking it to score 1-10 with specific feedback.
平台说明: 此技能在支持子代理生成的Agent平台上效果最佳。 在不具备该能力的平台上,可以通过打开新的聊天上下文,仅粘贴工作成果(不包含之前的推理过程),并要求其给出1-10分的评分和具体反馈,以此模拟审阅者环节。
"implement X, use review-loop""run review-loop on the file I just wrote""实现X,use review-loop""对我刚写的文件run review-loop"| Setting | Default |
|---|---|
| Min loops | 2 |
| Max loops | 4 |
| Quality gate | 8/10 |
| Worker model | (your current model) |
| Reviewer model | (your current model or fast/balanced alternative) |
| 设置项 | 默认值 |
|---|---|
| 最小循环次数 | 2 |
| 最大循环次数 | 4 |
| 质量门槛 | 8/10 |
| 工作者模型 | (当前使用的模型) |
| 审阅者模型 | (当前使用的模型或快速/平衡替代模型) |
| Task Complexity | Worker Capability | Reviewer Capability | Rationale |
|---|---|---|---|
| Simple/mechanical (CRUD, formatting, boilerplate) | Fast / Lightweight | Balanced | Lightweight worker is fast, balanced reviewer easily catches issues |
| Standard (features, refactors, docs) | Balanced | Balanced | Good mix of cost, speed, and quality |
| Complex (multi-file, integration, design) | Balanced | Advanced / Reasoning | Advanced reviewer catches subtle architecture issues, balanced worker can implement them |
| Very complex (security, quant, distributed systems) | Advanced / Reasoning | Advanced / Reasoning | Both need full context and reasoning power. Reviewer MUST match worker power. |
| 任务复杂度 | 工作者能力 | 审阅者能力 | 理由 |
|---|---|---|---|
| 简单/机械性(CRUD、格式化、模板代码) | 快速/轻量型 | 平衡型 | 轻量型工作者速度快,平衡型审阅者能轻松发现问题 |
| 标准型(功能开发、重构、文档) | 平衡型 | 平衡型 | 在成本、速度和质量之间达到良好平衡 |
| 复杂型(多文件、集成、设计) | 平衡型 | 高级/推理型 | 高级审阅者能捕捉细微的架构问题,平衡型工作者可实现相应修改 |
| 极复杂型(安全、量化、分布式系统) | 高级/推理型 | 高级/推理型 | 两者都需要完整的上下文和推理能力。审阅者模型必须与工作者模型能力匹配 |
"implement X with review-loop, quality gate 9, use advanced model for review, max 5 loops"
"polish this, 2 loops minimum, gate at 8"
"run review-loop with fast reviewer, max 2 loops"
"use review-loop, reasoning reviewer, quality gate 9, min 3 max 6""实现X并use review-loop,质量门槛设为9,使用高级模型作为审阅者,最大循环次数5次"
"polish this,最小循环次数2次,质量门槛8"
"run review-loop,使用快速审阅者,最大循环次数2次"
"use review-loop,推理型审阅者,质量门槛9,最小3次最大6次循环"flowchart TD
A[Do the work] --> B[Spawn reviewer subagent]
B --> C{Min loops met?}
C -- no, always continue --> E[Revise based on feedback]
C -- yes --> D{Score >= quality gate?}
D -- yes --> F[Final polish pass]
D -- no --> G{Max loops reached?}
G -- yes, stop anyway --> F
G -- no --> E
E --> B
F --> H([Done])flowchart TD
A[完成工作] --> B[生成审阅者子代理]
B --> C{达到最小循环次数?}
C -- 未达到,继续循环 --> E[根据反馈修订]
C -- 已达到 --> D{评分≥质量门槛?}
D -- 是 --> F[最终润色]
D -- 否 --> G{达到最大循环次数?}
G -- 是,强制停止 --> F
G -- 否 --> E
E --> B
F --> H([完成])You are a critical reviewer. Score the following work 1-10 and provide specific, actionable feedback.你是一名严格的审阅者。请对以下工作成果给出1-10分的评分,并提供具体、可落地的反馈。undefinedundefinedLoop {N}/{max}: Score {X}/10
- {summary of key feedback points}第{N}/{max}次循环:评分{X}/10
- {关键反馈要点总结}| Task Type | Reviewer Should Focus On |
|---|---|
| Code | Correctness, edge cases, error handling, readability, no security issues |
| Spec/Design | Completeness, feasibility, no hand-waving, implementability |
| Refactor | No behavior changes, no regressions, cleaner than before |
| Writing | Clarity, structure, audience-appropriate, no fluff |
| Bug fix | Root cause addressed, regression test exists, no side effects |
| Infrastructure / IaC | Idempotency, least privilege, no hardcoded secrets, destroy safety |
| Database migration | Reversibility, index strategy, data loss risk, performance at scale |
| API design | Backward compatibility, auth, versioning, error contract |
| Test suite | Edge case coverage, no test interdependency, meaningful assertions |
| 任务类型 | 审阅者重点关注 |
|---|---|
| 代码 | 正确性、边界情况、错误处理、可读性、无安全问题 |
| 规格/设计文档 | 完整性、可行性、无含糊表述、可实现性 |
| 重构 | 无行为变更、无回归问题、比之前更简洁 |
| 写作 | 清晰度、结构、符合受众需求、无冗余内容 |
| Bug修复 | 解决根本原因、存在回归测试、无副作用 |
| 基础设施/IaC | 幂等性、最小权限原则、无硬编码密钥、销毁安全性 |
| 数据库迁移 | 可逆性、索引策略、数据丢失风险、大规模场景下的性能 |
| API设计 | 向后兼容性、认证、版本控制、错误契约 |
| 测试套件 | 边界场景覆盖、无测试依赖、有意义的断言 |
User: "Implement the caching layer. Use review-loop, quality gate 8."
You:
1. Implement caching layer
2. Spawn reviewer → Score 6, feedback: missing eviction, no TTL
3. Revise: add eviction + TTL
4. Spawn reviewer → Score 8, feedback: minor naming nit
5. Final polish, done用户:"实现缓存层。Use review-loop,质量门槛8。"
你:
1. 实现缓存层
2. 生成审阅者 → 评分6,反馈:缺少淘汰机制、无TTL
3. 修订:添加淘汰机制 + TTL
4. 生成审阅者 → 评分8,反馈:minor命名问题
5. 最终润色,完成User: "Run review-loop on the auth module I just wrote"
You:
1. Read the auth module
2. Spawn reviewer → Score 5, feedback: SQL injection, no rate limiting
3. Fix: parameterize queries, add rate limiter
4. Spawn reviewer → Score 8, approved
5. Done用户:"对我刚写的认证模块run review-loop"
你:
1. 读取认证模块
2. 生成审阅者 → 评分5,反馈:存在SQL注入风险、无速率限制
3. 修复:参数化查询、添加速率限制器
4. 生成审阅者 → 评分8,通过
5. 完成--- Review Loop: {task name} ---
Loop 1/4: Score 6/10
Reviewer: Missing input validation, no error handling for network timeout,
function too long (80 lines).
Action: Fixing all three issues.
Loop 2/4: Score 8/10
Reviewer: Clean. Minor: variable name `d` could be more descriptive.
Action: Quality gate met (8 >= 8). Final polish.
Result: 8/10 in 2 loops. Done.--- 审阅循环:{任务名称} ---
第1/4次循环:评分6/10
审阅者反馈:缺少输入验证、无网络超时错误处理、
函数过长(80行)。
行动:修复所有三个问题。
第2/4次循环:评分8/10
审阅者反馈:代码简洁。Minor问题:变量名`d`可更具描述性。
行动:达到质量门槛(8≥8)。进行最终润色。
结果:2次循环后评分8/10。完成。