智能体与编排

define-goal

试用

把模糊意图改写成可验证、可衡量的目标,让 Agent 能诚实推进。

它能做什么

帮助用户把目标写成包含具体结果、涉及的系统或产物、验证方式、以及明确范围边界的陈述。在创建目标前,它会先通过 `get_goal` 检查现有目标,避免重复,并拒绝像"继续调研""做点改进"这类纯活动型目标,除非被改写为可验证的产出。最终产物是传入 `create_goal` 的一条简洁目标字符串,含验证证据与必要的范围约束。

什么时候用它

  • 为代码改动创建带测试验证条件的目标
  • 为性能优化定义明确的指标与阈值
  • 把模糊请求改写成可验证的目标
  • 针对某个 PR 的评审意见设置明确的通过条件

技能文档

Define Goal

Overview

Shape the user's intent into an objective an agent can pursue honestly. Prefer measurable outcomes, explicit evidence, and bounded scope over activity descriptions.

This skill covers goal definition and goal-tool creation only. Do not create intermediate planning artifacts, durable snapshots, ledgers, decision logs, or resume files from this skill.

Workflow

  1. Confirm that goal definition is actually needed.

    • Use this skill when the user asks for $define-goal, asks to create or set a goal, asks for the goal tool, or wants help turning an intention into a clear objective.
    • If the user only asks for ordinary implementation work, do the work directly instead of forcing goal creation.
  2. Restate the likely goal in concrete terms. A usable goal names:

    • the specific outcome that will be true
    • the main artifact, system, repo, environment, or user-facing behavior involved
    • how completion will be verified
    • what is in scope
    • what is out of scope when ambiguity would matter
    • the stop condition for asking the user instead of grinding
  3. Make it quantitative when the domain supports it. Prefer numbers that represent real success, not decorative precision:

    • pass/fail validators: exact tests, checks, CI jobs, evals, commands, or acceptance criteria
    • quality thresholds: latency, error rate, cost, accuracy, recall, precision, coverage, flake rate, bundle size, memory, uptime, completion rate, or manual review criteria
    • artifact constraints: file paths, affected modules, allowed commands, output formats, target environments, deadlines, or maximum blast radius
    • evidence counts: number of reproduced failures, successful reruns, reviewed examples, migrated records, addressed comments, or verified cases
  4. Repair weak goals before setting them.

    • Rewrite vague goals into measurable objectives when local context makes the rewrite safe.
    • Ask one concise clarification question when the missing detail changes the intended outcome or validation.
    • Reject pure activity goals such as "make progress," "keep investigating," "improve things," or "work on X" unless they are sharpened into a verifiable outcome.
  5. Check active goal state before creating a goal.

    • Call get_goal.
    • If there is no active goal and the objective meets the quality bar, call create_goal.
    • If there is an active goal that still matches the user's intent, continue using it instead of creating a duplicate.
    • If there is an active goal that conflicts with the new request, ask whether to finish the current goal, mark it complete if done, or start a separate goal-backed thread.
  6. Create the goal only after it passes the quality bar.

    • Use a single concise objective string.
    • Include the verification evidence in the objective itself.
    • Include scope bounds when they constrain the work.
    • Include a token budget only when the user explicitly requested one.
    • Do not call create_goal for an ordinary multi-step task unless the user explicitly asked for goal-backed work.

Goal Quality Bar

Before create_goal, the objective should answer:

  • What concrete thing will be true when this is done?
  • What evidence will prove it?
  • What quantitative or binary threshold defines success?
  • What scope boundaries matter?
  • What should cause the agent to stop and ask?

Good:

Reduce checkout API p95 latency below 250 ms for the documented slow path by making the smallest safe server-side change, then verify with npm run test:checkout and the existing local latency benchmark showing p95 under 250 ms across 3 consecutive runs.

Good:

Resolve the open review comments on PR 123 that request code changes, update only the affected auth files and tests, and verify with the targeted auth test command plus gh pr view 123 showing no unresolved change-request threads.

Weak:

Make checkout faster.

Weak:

Keep investigating the PR comments.

Quantification Heuristics

  • For bugs, define success as reproduction first, fix second, and a failing-then-passing validator when possible.
  • For tests, name the exact command and required pass condition.
  • For performance, name the metric, target threshold, measurement method, and number of runs.
  • For quality work, define an observable acceptance bar such as reviewed examples, lint/typecheck/test pass, or user-approved artifact.
  • For research, define the decision the research must enable, the sources or systems in scope, and the evidence standard.
  • For operations, define healthy state, monitoring window, failure threshold, and rollback or escalation trigger.

Clarifying Questions

Ask only when a reasonable rewrite would risk pursuing the wrong outcome. Keep the question short and oriented around the missing validator or scope boundary.

Useful question shapes:

  • "What metric should define success here: latency, cost, accuracy, or user-visible behavior?"
  • "Which environment should I verify against: local, staging, or production?"
  • "What is the minimum evidence you want before I mark this goal complete?"

If the user cannot provide a metric, propose the most honest binary validator available and ask for confirmation.

常见问题

这个技能会管理决策日志、快照这类长期执行产物吗?
不会。它只覆盖目标定义与目标工具的创建,明确不生成中间规划产物、持久化快照、账本、决策日志或恢复文件。
当已经存在活跃目标时它会怎么做?
会先调用 `get_goal`。如果现有目标仍匹配当前意图,就继续使用;如果冲突,则询问是完成当前目标、标记完成,还是另开一条目标线程。
什么情况下它会主动提问,而不是自行改写目标?
当本地上下文允许安全改写时会直接重写;只有当缺失的细节会改变最终结果或验证方式时,才会提出一个简短的问题。

OpenAI 的更多技能

浏览全部技能

用文档优先的流程搭建 ChatGPT Apps SDK 项目,产出工具规划、MCP 服务端与 Widget 脚手架。

作者 OpenAI27.9k 星标

通过复用已发布的设计系统(组件、变量、样式)来构建或更新完整的 Figma 页面。

作者 OpenAI27.9k 星标

按正确顺序在 Figma 中搭建与代码对齐的完整设计系统,覆盖变量、组件与主题。

作者 OpenAI27.9k 星标

figma-use

官方

通过智能体在 Figma 文件中安全、增量地执行 Plugin API JavaScript。

作者 OpenAI27.9k 星标

hatch-pet

官方

从概念、品牌线索或参考图出发,生成符合 Codex 规范的动画宠物图集与打包产物。

作者 OpenAI27.9k 星标

从 OpenAI 开发者文档获取带引用和来源路径的权威、实时答案。

作者 OpenAI27.9k 星标