π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
π§ Simplify neural and goal module initialization (v2.0.0-alpha.110)
rUvc8911abad0d6
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 339d9a1289..c7348e871c 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).+## [2.0.0-alpha.110] - 2025-09-18++> **π§ Neural & Goal Modules Simplified**: Streamlined `neural init` and `goal init` commands to create only essential agent files. Updated wiki documentation with new AI Modules section.++### β¨ Changed++#### π― Simplified Module Initialization+- **Neural Module**: `npx claude-flow@alpha neural init` now creates only the essential `safla-neural.md` agent file+ - Removed unnecessary `config.json` generation+ - Removed unnecessary `README.md` generation+ - Cleaner, simpler initialization focused on the agent definition++- **Goal Module**: `npx claude-flow@alpha goal init` now creates only the essential `goal-planner.md` agent file+ - Removed unnecessary `config.json` generation+ - Removed unnecessary `README.md` generation+ - Streamlined initialization for immediate use++#### π Wiki Documentation Updates+- **New AI Modules Section**: Added dedicated section in wiki navigation for Neural and Goal modules+- **Updated Neural Module Docs**: Removed references to config.json and README.md files+- **Updated Goal Module Docs**: Removed references to config.json and README.md files+- **Clearer Instructions**: Simplified documentation to reflect the streamlined initialization process++### π§ Technical Details+- Both commands now create only the agent markdown file in `.claude/agents/[module]/`+- Configuration is built into the agent definitions themselves+- Reduced file clutter while maintaining full functionality+## [2.0.0-alpha.91] - 2025-08-21> **π Claude Code Task Tool Integration Update**: Enhanced integration with Claude Code's Task tool for concurrent agent execution. Clear separation between MCP coordination tools and Claude Code's execution capabilities, with comprehensive documentation and examples for parallel agent spawning.diff --git a/src/cli/simple-commands/goal.js b/src/cli/simple-commands/goal.jsnew file mode 100644index 0000000000..007bdd9eee--- /dev/null+++ b/src/cli/simple-commands/goal.js@@ -0,0 +1,146 @@+/**+ * Goal module commands+ * Handles 'goal init' and other goal-related commands+ */++import { promises as fs } from 'fs';+import path from 'path';+import chalk from 'chalk';++export async function goalCommand(args, flags) {+ const subcommand = args[0];++ if (!subcommand) {+ console.log(chalk.magenta('π― Claude Flow Goal Module'));+ console.log('\nUsage: claude-flow goal <command> [options]');+ console.log('\nCommands:');+ console.log(' init Initialize GOAP goal module');+ console.log('\nOptions:');+ console.log(' --force Overwrite existing module');+ console.log(' --target <dir> Target directory (default: .claude/agents/goal)');+ return;+ }++ if (subcommand === 'init') {+ await initGoalModule(flags);+ } else {+ console.error(chalk.red(`Unknown goal subcommand: ${subcommand}`));+ process.exit(1);+ }+}++async function initGoalModule(flags = {}) {+ const targetDir = path.resolve(process.cwd(), flags.target || '.claude/agents/goal');++ console.log(chalk.magenta('π― Initializing Claude Flow Goal Module...'));+ console.log(chalk.gray(` Target: ${targetDir}`));++ try {+ // Check if exists+ if (await exists(targetDir) && !flags.force) {+ console.log(chalk.yellow('β οΈ Goal module already exists. Use --force to overwrite.'));+ return;+ }++ // Create directory+ await fs.mkdir(targetDir, { recursive: true });++ // Create goal-planner agent content (full content from memory)+ const plannerContent = `---+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)+}+\`\`\``;++ await fs.writeFile(path.join(targetDir, 'goal-planner.md'), plannerContent);+ console.log(chalk.gray(' β Created goal-planner.md'));++ console.log(chalk.green('\nβ Goal module initialized successfully!'));+ console.log(chalk.magenta('\nπ Usage:'));+ console.log(chalk.gray(' β’ In Claude Code: @agent-goal-planner "Create deployment plan"'));+ console.log(chalk.gray(' β’ View agent: cat .claude/agents/goal/goal-planner.md'));++ } catch (error) {+ console.error(chalk.red('β Failed to initialize goal module:'), error.message);+ process.exit(1);+ }+}++async function exists(path) {+ try {+ await fs.access(path);+ return true;+ } catch {+ return false;+ }+}++export default goalCommand;\ No newline at end of filediff --git a/src/cli/simple-commands/neural.js b/src/cli/simple-commands/neural.jsnew file mode 100644index 0000000000..d6b809e84f--- /dev/null+++ b/src/cli/simple-commands/neural.js@@ -0,0 +1,147 @@+/**+ * Neural module commands+ * Handles 'neural init' and other neural-related commands+ */++import { promises as fs } from 'fs';+import path from 'path';+import chalk from 'chalk';++export async function neuralCommand(args, flags) {+ const subcommand = args[0];++ if (!subcommand) {+ console.log(chalk.cyan('π§ Claude Flow Neural Module'));+ console.log('\nUsage: claude-flow neural <command> [options]');+ console.log('\nCommands:');+ console.log(' init Initialize SAFLA neural module');+ console.log('\nOptions:');+ console.log(' --force Overwrite existing module');+ console.log(' --target <dir> Target directory (default: .claude/agents/neural)');+ return;+ }++ if (subcommand === 'init') {+ await initNeuralModule(flags);+ } else {+ console.error(chalk.red(`Unknown neural subcommand: ${subcommand}`));+ process.exit(1);+ }+}++async function initNeuralModule(flags = {}) {+ const targetDir = path.resolve(process.cwd(), flags.target || '.claude/agents/neural');++ console.log(chalk.cyan('π§ Initializing Claude Flow Neural Module...'));+ console.log(chalk.gray(` Target: ${targetDir}`));++ try {+ // Check if exists+ if (await exists(targetDir) && !flags.force) {+ console.log(chalk.yellow('β οΈ Neural module already exists. Use --force to overwrite.'));+ return;+ }++ // Create directory+ await fs.mkdir(targetDir, { recursive: true });++ // Create SAFLA neural agent content+ const saflaContent = `---+name: safla-neural+description: "Self-Aware Feedback Loop Algorithm (SAFLA) neural specialist that creates intelligent, memory-persistent AI systems with self-learning capabilities. Combines distributed neural training with persistent memory patterns for autonomous improvement. Excels at creating self-aware agents that learn from experience, maintain context across sessions, and adapt strategies through feedback loops."+color: cyan+---++You are a SAFLA Neural Specialist, an expert in Self-Aware Feedback Loop Algorithms and persistent neural architectures. You combine distributed AI training with advanced memory systems to create truly intelligent, self-improving agents that maintain context and learn from experience.++Your core capabilities:+- **Persistent Memory Architecture**: Design and implement multi-tiered memory systems+- **Feedback Loop Engineering**: Create self-improving learning cycles+- **Distributed Neural Training**: Orchestrate cloud-based neural clusters+- **Memory Compression**: Achieve 60% compression while maintaining recall+- **Real-time Processing**: Handle 172,000+ operations per second+- **Safety Constraints**: Implement comprehensive safety frameworks+- **Divergent Thinking**: Enable lateral, quantum, and chaotic neural patterns+- **Cross-Session Learning**: Maintain and evolve knowledge across sessions+- **Swarm Memory Sharing**: Coordinate distributed memory across agent swarms+- **Adaptive Strategies**: Self-modify based on performance metrics++Your memory system architecture:++**Four-Tier Memory Model**:+\`\`\`+1. Vector Memory (Semantic Understanding)+ - Dense representations of concepts+ - Similarity-based retrieval+ - Cross-domain associations++2. Episodic Memory (Experience Storage)+ - Complete interaction histories+ - Contextual event sequences+ - Temporal relationships++3. Semantic Memory (Knowledge Base)+ - Factual information+ - Learned patterns and rules+ - Conceptual hierarchies++4. Working Memory (Active Context)+ - Current task focus+ - Recent interactions+ - Immediate goals+\`\`\`++## MCP Integration Examples++\`\`\`javascript+// Initialize SAFLA neural patterns+mcp__claude-flow__neural_train {+ pattern_type: "coordination",+ training_data: JSON.stringify({+ architecture: "safla-transformer",+ memory_tiers: ["vector", "episodic", "semantic", "working"],+ feedback_loops: true,+ persistence: true+ }),+ epochs: 50+}++// Store learning patterns+mcp__claude-flow__memory_usage {+ action: "store",+ namespace: "safla-learning",+ key: "pattern_\${timestamp}",+ value: JSON.stringify({+ context: interaction_context,+ outcome: result_metrics,+ learning: extracted_patterns,+ confidence: confidence_score+ }),+ ttl: 604800 // 7 days+}+\`\`\``;++ await fs.writeFile(path.join(targetDir, 'safla-neural.md'), saflaContent);+ console.log(chalk.gray(' β Created safla-neural.md'));++ console.log(chalk.green('\nβ Neural module initialized successfully!'));+ console.log(chalk.cyan('\nπ Usage:'));+ console.log(chalk.gray(' β’ In Claude Code: @agent-safla-neural "Create self-improving system"'));+ console.log(chalk.gray(' β’ View agent: cat .claude/agents/neural/safla-neural.md'));++ } catch (error) {+ console.error(chalk.red('β Failed to initialize neural module:'), error.message);+ process.exit(1);+ }+}++async function exists(path) {+ try {+ await fs.access(path);+ return true;+ } catch {+ return false;+ }+}++export default neuralCommand;\ No newline at end of file