正在打开每日关注
正在打开每日关注
先完成需求梳理与研究,再调用 set_goal 形成可验证目标,以缩小搜索空间并提升执行效率。
codex tip: just ask codex to set its own goal when you set a goal with /goal codex takes the prompt verbatim and sets it as a goal however by asking codex to do the necessary research (via prompt or subagents) and set_goal, you help it by: - reducing the search space of the problem - helping it come up with a way to verify the goal rule of thumb: if codex can verify a goal it’ll likely be more token efficient and faster at solving the problem
codex tip: ask codex to do its research first and then use set_goal to set an appropriate goal instead of /goal It results in massively better prompt and downstream results! all my prompts would start with requirements gathering and research and once done set_goal
是什么
这是一条关于 Agent 工作流的实践建议:不要直接把用户原话交给 /goal,而是让 Codex 先完成需求梳理和必要研究,再根据已有信息调用 set_goal,生成更精确、可验证的目标。
核心设计 它把任务拆成“探索—收敛—执行—验证”链路。前置研究负责识别约束、缩小候选方案与搜索空间;目标设定负责把开放式请求转换成明确的完成条件;可验证性则帮助 Agent 选择检查方式,减少无效推理和反复尝试。
关键洞察 目标不是越早写下越好,而应在上下文足够后形成。让 Agent 自己设定目标,相当于把研究结果压缩成执行计划,可能同时改善提示词质量、Token 消耗和完成速度,对复杂任务尤其适合。
边界与风险 这不是自动保证正确性的技巧。Agent 的研究可能遗漏关键约束,或设定出看似可验证但偏离真实意图的目标,因此仍需人工确认范围、成功标准和禁止事项。简单且目标清晰的任务直接执行更省步骤。