---
name: goal-plan-fcb32cec16f9
description: Create and execute Goal-Oriented Action Plans (GOAP) with precondition analysis, cost optimization, and adaptive replanning
argument-hint: "<goal-description>"
allowed-tools: mcp__claude-flow__task_create mcp__claude-flow__task_list mcp__claude-flow__task_status mcp__claude-flow__task_assign mcp__claude-flow__task_update mcp__claude-flow__task_complete mcp__claude-flow__task_summary mcp__claude-flow__memory_store mcp__claude-flow__memory_search mcp__claude-flow__neural_predict mcp__claude-flow__workflow_create mcp__claude-flow__workflow_execute mcp__claude-flow__workflow_status mcp__claude-flow__hooks_intelligence_trajectory-start mcp__claude-flow__hooks_intelligence_trajectory-step mcp__claude-flow__hooks_intelligence_trajectory-end Bash Read Write Edit
---

# 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

1. **Define goal state** — what does "done" look like? List concrete success criteria
2. **Assess current state** — what's true now? What assets, code, infrastructure exist?
3. **Identify gap** — what must change between current and goal state?
4. **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)
5. **Generate plan** — find the optimal action sequence using A* through the state space
6. **Record trajectory** — call `mcp__claude-flow__hooks_intelligence_trajectory-start` to begin tracking
7. **Create tasks** — call `mcp__claude-flow__task_create` for each action in the plan
8. **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__claude-flow__hooks_intelligence_trajectory-step`
9. **Monitor & replan** — if an action fails or produces unexpected results:
   - Reassess current state
   - Recalculate optimal path from new state
   - Update remaining tasks
10. **Complete trajectory** — call `mcp__claude-flow__hooks_intelligence_trajectory-end`
11. **Store successful plan** — call `mcp__claude-flow__memory_store` with namespace `goap-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


---
Source attribution: wodeh
Original project: https://github.com/wodeh/ruflo-kimi/blob/257ccb7e80a2619f8af236554ae6f0ca362abfa6/plugins/ruflo-goals/skills/goal-plan/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2024-2026 ruvnet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: wodeh
Original project: https://github.com/wodeh/ruflo-kimi/blob/257ccb7e80a2619f8af236554ae6f0ca362abfa6/plugins/ruflo-goals/skills/goal-plan/SKILL.md
Attribution basis: Source repository record

Fields of work: Operations, Project & Program Management
Roles: Business Process Analyst, Operations Manager, Project Manager
Specialties: Specialty not specified
Tools: Mcp__Claude Flow__Hooks_Intelligence_Trajectory End, Mcp__Claude Flow__Hooks_Intelligence_Trajectory Start, Mcp__Claude Flow__Hooks_Intelligence_Trajectory Step, Mcp__Claude Flow__Memory_Search, Mcp__Claude Flow__Memory_Store, Mcp__Claude Flow__Neural_Predict, Mcp__Claude Flow__Task_Assign, Mcp__Claude Flow__Task_Complete, Mcp__Claude Flow__Task_Create, Mcp__Claude Flow__Task_List, Mcp__Claude Flow__Task_Status, Mcp__Claude Flow__Task_Summary, Mcp__Claude Flow__Task_Update, Mcp__Claude Flow__Workflow_Create, Mcp__Claude Flow__Workflow_Execute, Mcp__Claude Flow__Workflow_Status
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 2654ffc4c9be2c82bfada918874f69f8d9713b600346a5b786538dad92666c23
