跳到正文

spec-optimize ​

围绕可度量目标,对已有的系统做迭代实验优化。

ASCII 链路图 ​

text
Codebase -> Spec -> Plan -> Tasks -> Code -> Review -> Knowledge
  |
  v
  spec-optimize
  entry: spec-optimize
  type: workflow command

链路图表示该技能在研发阶段上的位置;阶段之间不是必经顺序,按当前任务直接进入最匹配的入口即可。

基本信息 ​

字段内容
Skillspec-optimize
类型workflow command
研发链路位置Code
当前入口spec-optimize
兼容别名/spec:optimize、$spec-optimize
宿主投递Claude Code: command · Codex: skill · Cursor: skill · Kiro: skill · Qoder: command · OpenCode: command · ZCode: skill · Pi: skill
Sourceskills/spec-optimize/SKILL.md

源码描述(原文) ​

Optimize a working system against a measurable target. Use when a named workload's cost should drop and the change is not already known, or when several variants must be scored and kept. Not for diagnosing failing or slow behavior (spec-debug), and not for implementing a change you already know (spec-work).

Source 契约摘要 ​

以下各条摘自上游 SKILL.md 的契约摘要小节(Workflow Contract Summary 或 Contract Summary),过长时截断。

  • 何时使用 — Use when a measurable outcome can improve through iterative experiments, hard gates, and/or LLM-as-judge scoring.
  • 何时不使用 — Do not use for ordinary implementation, vague improvement requests without a metric, debugging without a feedback loop, or unbounded spend/concurrency. Name the destination when routing out: a bug with no stable repro and no measurement loop is spec-debug's work (or spec-work for settled implementation) — diagnosing the bug inside this workflow to turn it into an optimization goal is adopting the wrong workflow, not adapting it; route out explicitly instead of drafting a spec around the diagnosis.
  • 输入 — An optimization spec or goal, mutable/immutable scope, measurement command or scaffold plan, budget limits, experiment settings, repository instructions, and baseline evidence.
  • 输出 — A measurement scaffold and experiment log, scored experiment results, kept/rejected variants, final integrated changes when appropriate, and post-run recommendations.
  • 产物 — Run state under .spec-first/workflows/spec-optimize/<spec-name>/, experiment worktrees/results, strategy digests, and no hidden workflow state outside the documented log.
  • 失败模式 — Missing metric, missing measurement command, unsafe scope, excessive or uncapped budget, failed baseline, write verification failure, or unavailable dispatch/worktree backend.
  • 流程 — Validate the spec and budget, establish the baseline, run bounded experiments, measure and write results immediately, select winners, integrate only verified improvements, and summarize evidence.
  • 下游消费者 — Code review, benchmark maintainers, release reviewers for performance or relevance changes, and human reviewers inspecting experiment logs.

何时使用 ​

  • 某个具名工作负载的成本需要下降,而改法尚不确定。
  • 需要比较并保留多个变体。

Agent / Persona 列表 ​

该技能挂载了 2 个 agent,源码位置:skills/spec-optimize/references/agents/。agent 可以点开查看详情;persona 只在所属技能的流程里使用,不单独成页。

名称类型摘要
spec-learnings-researcheragentYou are a domain-agnostic institutional knowledge researcher.
spec-repo-research-analystagentYou are an expert repository research analyst specializing in understanding codebases, documentation structures, and project conventions.

边界 ​

  • 没有可度量目标时不适用;诊断失败或变慢的行为请用 spec-debug。
  • 已经知道怎么实现的改动请用 spec-work。
  • 失败实验必须记录,不能只保留成功叙事。

源码校准 ​

本页由脚本从上游 skills/spec-optimize/SKILL.md 生成;入口、兼容别名与宿主投递以 src/cli/contracts/dual-host-governance/skills-governance.json 为准。