refine
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMANDATORY PREPARATION
必做准备
Invoke {{command_prefix}}agent-workflow — it contains workflow principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding — if no workflow context exists yet, you MUST run {{command_prefix}}teach-maestro first.
This is the final quality pass. The workflow works — now make it excellent.
调用 {{command_prefix}}agent-workflow —— 它包含工作流原则、反模式,以及上下文收集协议。在继续操作前请遵循该协议——如果还不存在任何工作流上下文,你必须先运行 {{command_prefix}}teach-maestro。
这是最终质量校验环节。工作流已经可以正常运行——现在要将其打磨得更加完善。
Refinement Checklist
优化检查清单
Prompts
- Every prompt follows the 4-zone pattern (role, context, instructions, output)
- Output schemas are explicit and validated
- Negative instructions clarify what NOT to do
- No contradictory instructions
- Few-shot examples included for ambiguous tasks
- Chain-of-thought used for multi-step reasoning tasks
Tool Descriptions
- Every tool has a multi-line description: what, when to use, when NOT to use, returns
- Input parameters have descriptions and types
- Error responses are documented
- At least one example input/output in the description
Error Messages
- Error messages are specific (not "an error occurred")
- Error messages suggest corrective action
- Errors include context (what was being attempted)
- Errors are structured (code + message + details)
Logging
- Every model call is logged (input tokens, output tokens, latency, cost)
- Tool calls are logged with inputs and outputs
- Errors are logged with full context
- PII is redacted from logs
- Workflow ID traces through all log entries
Configuration
- All magic numbers are named constants
- Environment-specific values are in config, not code
- Defaults are sensible — config is for overrides
- Cost ceilings are set
- Timeout values are set for all external calls
Prompts
- 所有提示词都遵循4区模式(角色、上下文、指令、输出要求)
- 输出模式明确且经过校验
- 包含否定指令,明确说明禁止执行的操作
- 不存在互相矛盾的指令
- 针对模糊任务包含了少样本示例
- 多步推理任务使用了Chain-of-thought提示
工具描述
- 每个工具都有多行描述:功能说明、适用场景、不适用场景、返回值说明
- 输入参数包含描述和类型说明
- 错误响应有完整文档
- 描述中至少包含一个输入/输出示例
错误信息
- 错误信息具体明确(不能仅显示“发生了错误”)
- 错误信息给出修正建议
- 错误包含上下文说明(当时正在尝试执行什么操作)
- 错误是结构化的(错误码 + 信息 + 详情)
日志
- 所有模型调用都有日志记录(输入token数、输出token数、延迟、成本)
- 工具调用的输入和输出都被记录
- 错误记录包含完整上下文
- PII已从日志中脱敏移除
- 工作流ID贯穿所有日志条目可追溯
配置
- 所有魔法数字都定义为命名常量
- 环境相关的配置值存放在配置文件中,而非硬编码在代码里
- 默认值合理——配置仅用于覆盖默认值
- 已设置成本上限
- 所有外部调用都设置了超时时间
Output
输出
For each checklist item that fails, provide:
- What's wrong (specific finding)
- Where it is (file, line, or component)
- How to fix it (concrete suggestion)
- Priority (critical / important / nice-to-have)
对于每一项未通过检查的清单条目,请提供:
- 问题描述(具体发现的问题)
- 问题位置(文件、行号或组件)
- 修复方案(具体建议)
- 优先级(critical / important / nice-to-have)
Priority Matrix
优先级矩阵
| Priority | Criteria | Maestro Action |
|---|---|---|
| Critical | Affects correctness or safety | |
| Important | Affects quality or maintainability | |
| Nice-to-have | Cosmetic or minor inconsistency | Note for next |
| 优先级 | 判断标准 | Maestro 操作 |
|---|---|---|
| Critical | 影响正确性或安全性 | 上线前执行 |
| Important | 影响质量或可维护性 | 当前迭代执行 |
| Nice-to-have | 外观问题或微小不一致 | 记录下来,留到下一次 |
Recommended Next Step
推荐下一步
After refinement is complete, run to verify the polished workflow against realistic scenarios.
{{command_prefix}}evaluateNEVER:
- Skip the checklist — go through every item
- Mark items as passing without checking
- Suggest changes that alter behavior (this is polish, not redesign)
- Refine before the workflow is functionally correct (fix first, refine last)
优化完成后,运行 ,用真实场景验证打磨后的工作流。
{{command_prefix}}evaluate绝对禁止:
- 跳过检查清单——必须逐条目检查
- 未实际检查就标记条目为通过
- 提出会改变原有行为的修改建议(本环节是优化,不是重新设计)
- 在工作流功能未正确实现前就进行优化(先修复功能,最后做优化)