spec-optimize
围绕可度量目标建立 measurement scaffold,并运行多轮实验优化。
基本信息
| 字段 | 内容 |
|---|---|
| Skill | spec-optimize |
| 类型 | workflow command |
| 研发链路位置 | Code |
| 入口 | /spec:optimize / $spec-optimize |
| Source | skills/spec-optimize/SKILL.md |
描述
Run metric-driven iterative optimization loops. Define a measurable goal, build measurement scaffolding, then run parallel experiments that try many approaches, measure each against hard gates and/or LLM-as-judge quality scores, keep improvements, and converge toward the best solution. Use when optimizing clustering quality, search relevance, build performance, prompt quality, or any measurable outcome that benefits from systematic experimentation. Inspired by Karpathy's autoresearch, generalized for multi-file code changes and non-ML domains.
何时使用
- 目标能被指标、hard gates 或 judge 标准衡量。
- 需要比较多个实现或 prompt / search / performance 方案。
工作步骤
- 读取 plan、task pack、bug report 或明确实现目标。
- 建立小步任务列表,按现有代码模式做最小必要修改。
- 运行聚焦验证、测试、构建、浏览器或平台检查。
- 把 diff、验证结果和剩余风险交给 review 或 knowledge 阶段。
输出
- 实现 diff、测试结果、构建输出、浏览器截图或运行证据。
- 必要时输出 blocked 原因,而不是扩大 scope。
Agent 调度
- 小任务通常 inline;大任务可按文件边界使用 serial 或 parallel workers。
- 调试、优化、UI、平台专项可引入对应 specialist agents,但 orchestrator 负责最终集成。
边界
- 没有可度量目标时不适合。
- 失败实验必须记录,不能只保留成功叙事。
