goal-plan
它能做什么
这项技能把复杂目标规划为一系列行动,每个行动都说明执行前必须成立的条件以及它会带来的改变。适合进行多步骤项目、希望计划清晰且可调整的人。
适用场景
- ✓当一个目标包含许多相互依赖的步骤时。
- ✓当你想在开始前知道最佳的行动顺序时。
- ✓当情况发生变化,计划需要重新检查时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-goals/skills/goal-plan/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把我们店铺从旧结账方式迁移到新结账方式的步骤按正确顺序规划出来。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能定义“完成”的标准,列出可用行动及其前提条件和效果,并找到合理的顺序。然后它创建任务,按顺序完成,并在某一步失败时重新规划。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Goal Plan
Create and execute intelligent plans using Goal-Oriented Action Planning (GOAP).
When to use
When you have a complex objective that requires multiple steps, has dependencies between steps, and may need adaptive replanning as conditions change.
Steps
- Define goal state — what does "done" look like? List concrete success criteria
- Assess current state — what's true now? What assets, code, infrastructure exist?
- Identify gap — what must change between current and goal state?
- Inventory actions — list available actions with:
- Preconditions (what must be true before this action)
- Effects (what becomes true after this action)
- Cost estimate (time, complexity, risk)
- Generate plan — find the optimal action sequence using A* through the state space
- Record trajectory — call
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-startto begin tracking - Create tasks — call
mcp__plugin_ruflo-core_ruflo__task_createfor each action in the plan - Execute — work through tasks in dependency order:
- Before each action: verify preconditions still hold
- After each action: verify effects achieved
- Record each step via
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-step
- Monitor & replan — if an action fails or produces unexpected results:
- Reassess current state
- Recalculate optimal path from new state
- Update remaining tasks
- Complete trajectory — call
mcp__plugin_ruflo-core_ruflo__hooks_intelligence_trajectory-end - Store successful plan — call
mcp__plugin_ruflo-core_ruflo__memory_storewith namespacegoap-plans
Plan output format
Goal: [concrete objective]
Current State: [key facts]
Plan Cost: [estimated effort]
Steps:
1. [action] — precondition: [X], effect: [Y], cost: [Z]
2. [action] — precondition: [Y], effect: [W], cost: [Z]
...
Risk Factors: [what could force a replan]
Fallback: [alternative approach if primary path fails]
Replanning triggers
- Action fails (precondition no longer met)
- Unexpected side effects detected
- New information changes goal definition
- Cost exceeds threshold
- External dependency becomes unavailable
常见问题
每一步之前它会检查什么?
它先确认该步骤的前提条件仍然成立,然后在之后检查预期结果。
如果某一步失败了会怎样?
这项技能会重新评估当前状态,并从该处重新规划。
它会保留工作记录吗?
会。它把每一步记录在操作轨迹中,以便之后审查工作。
详情
作者的原始描述
Create and execute Goal-Oriented Action Plans (GOAP) with precondition analysis, cost optimization, and adaptive replanning
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1626
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。