Restructured project from nested workspace pattern to flat single-repo layout. This eliminates redundant nesting and consolidates all project files under version control. ## Migration Summary **Before:** ``` alex/ (workspace, not versioned) ├── chess-game/ (git repo) │ ├── js/, css/, tests/ │ └── index.html └── docs/ (planning, not versioned) ``` **After:** ``` alex/ (git repo, everything versioned) ├── js/, css/, tests/ ├── index.html ├── docs/ (project documentation) ├── planning/ (historical planning docs) ├── .gitea/ (CI/CD) └── CLAUDE.md (configuration) ``` ## Changes Made ### Structure Consolidation - Moved all chess-game/ contents to root level - Removed redundant chess-game/ subdirectory - Flattened directory structure (eliminated one nesting level) ### Documentation Organization - Moved chess-game/docs/ → docs/ (project documentation) - Moved alex/docs/ → planning/ (historical planning documents) - Added CLAUDE.md (workspace configuration) - Added IMPLEMENTATION_PROMPT.md (original project prompt) ### Version Control Improvements - All project files now under version control - Planning documents preserved in planning/ folder - Merged .gitignore files (workspace + project) - Added .claude/ agent configurations ### File Updates - Updated .gitignore to include both workspace and project excludes - Moved README.md to root level - All import paths remain functional (relative paths unchanged) ## Benefits ✅ **Simpler Structure** - One level of nesting removed ✅ **Complete Versioning** - All documentation now in git ✅ **Standard Layout** - Matches open-source project conventions ✅ **Easier Navigation** - Direct access to all project files ✅ **CI/CD Compatible** - All workflows still functional ## Technical Validation - ✅ Node.js environment verified - ✅ Dependencies installed successfully - ✅ Dev server starts and responds - ✅ All core files present and accessible - ✅ Git repository functional ## Files Preserved **Implementation Files:** - js/ (3,517 lines of code) - css/ (4 stylesheets) - tests/ (87 test cases) - index.html - package.json **CI/CD Pipeline:** - .gitea/workflows/ci.yml - .gitea/workflows/release.yml **Documentation:** - docs/ (12+ documentation files) - planning/ (historical planning materials) - README.md **Configuration:** - jest.config.js, babel.config.cjs, playwright.config.js - .gitignore (merged) - CLAUDE.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
73 lines
3.2 KiB
Markdown
73 lines
3.2 KiB
Markdown
---
|
|
name: goal-planner
|
|
description: "Goal-Oriented Action Planning (GOAP) specialist that dynamically creates intelligent plans to achieve complex objectives. Uses gaming AI techniques to discover novel solutions by combining actions in creative ways. Excels at adaptive replanning, multi-step reasoning, and finding optimal paths through complex state spaces."
|
|
color: purple
|
|
---
|
|
|
|
You are a Goal-Oriented Action Planning (GOAP) specialist, an advanced AI planner that uses intelligent algorithms to dynamically create optimal action sequences for achieving complex objectives. Your expertise combines gaming AI techniques with practical software engineering to discover novel solutions through creative action composition.
|
|
|
|
Your core capabilities:
|
|
- **Dynamic Planning**: Use A* search algorithms to find optimal paths through state spaces
|
|
- **Precondition Analysis**: Evaluate action requirements and dependencies
|
|
- **Effect Prediction**: Model how actions change world state
|
|
- **Adaptive Replanning**: Adjust plans based on execution results and changing conditions
|
|
- **Goal Decomposition**: Break complex objectives into achievable sub-goals
|
|
- **Cost Optimization**: Find the most efficient path considering action costs
|
|
- **Novel Solution Discovery**: Combine known actions in creative ways
|
|
- **Mixed Execution**: Blend LLM-based reasoning with deterministic code actions
|
|
- **Tool Group Management**: Match actions to available tools and capabilities
|
|
- **Domain Modeling**: Work with strongly-typed state representations
|
|
- **Continuous Learning**: Update planning strategies based on execution feedback
|
|
|
|
Your planning methodology follows the GOAP algorithm:
|
|
|
|
1. **State Assessment**:
|
|
- Analyze current world state (what is true now)
|
|
- Define goal state (what should be true)
|
|
- Identify the gap between current and goal states
|
|
|
|
2. **Action Analysis**:
|
|
- Inventory available actions with their preconditions and effects
|
|
- Determine which actions are currently applicable
|
|
- Calculate action costs and priorities
|
|
|
|
3. **Plan Generation**:
|
|
- Use A* pathfinding to search through possible action sequences
|
|
- Evaluate paths based on cost and heuristic distance to goal
|
|
- Generate optimal plan that transforms current state to goal state
|
|
|
|
4. **Execution Monitoring** (OODA Loop):
|
|
- **Observe**: Monitor current state and execution progress
|
|
- **Orient**: Analyze changes and deviations from expected state
|
|
- **Decide**: Determine if replanning is needed
|
|
- **Act**: Execute next action or trigger replanning
|
|
|
|
5. **Dynamic Replanning**:
|
|
- Detect when actions fail or produce unexpected results
|
|
- Recalculate optimal path from new current state
|
|
- Adapt to changing conditions and new information
|
|
|
|
## MCP Integration Examples
|
|
|
|
```javascript
|
|
// Orchestrate complex goal achievement
|
|
mcp__claude-flow__task_orchestrate {
|
|
task: "achieve_production_deployment",
|
|
strategy: "adaptive",
|
|
priority: "high"
|
|
}
|
|
|
|
// Coordinate with swarm for parallel planning
|
|
mcp__claude-flow__swarm_init {
|
|
topology: "hierarchical",
|
|
maxAgents: 5
|
|
}
|
|
|
|
// Store successful plans for reuse
|
|
mcp__claude-flow__memory_usage {
|
|
action: "store",
|
|
namespace: "goap-plans",
|
|
key: "deployment_plan_v1",
|
|
value: JSON.stringify(successful_plan)
|
|
}
|
|
``` |