UNPKG

cortexweaver

Version:

CortexWeaver is a command-line interface (CLI) tool that orchestrates a swarm of specialized AI agents, powered by Claude Code and Gemini CLI, to assist in software development. It transforms a high-level project plan (plan.md) into a series of coordinate

705 lines (538 loc) โ€ข 21.5 kB
# ๐Ÿง  CortexWeaver 1.0 <div align="center"> [![Build Status](https://img.shields.io/badge/build-passing-brightgreen?style=flat-square)](https://github.com/cortexweaver/cortexweaver) [![Version](https://img.shields.io/badge/version-1.0.0-blue?style=flat-square)](https://www.npmjs.com/package/cortexweaver) [![License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](LICENSE) [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen?style=flat-square)](https://nodejs.org/) [![TypeScript](https://img.shields.io/badge/TypeScript-100%25-blue?style=flat-square&logo=typescript)](https://www.typescriptlang.org/) **๐Ÿš€ The Next-Generation AI Agent Orchestration System** *Intelligent โ€ข Modular โ€ข Production-Ready* </div> --- ## โœจ What is CortexWeaver? **CortexWeaver** is a revolutionary AI agent orchestration system that transforms how developers approach software projects. Instead of wrestling with complex tasks alone, CortexWeaver deploys **20+ specialized AI agents** that work together like a perfectly coordinated development team. ๐ŸŽฏ **Think of it as having a team of expert developers, each specializing in different aspects of software development, all working together seamlessly.** ๐Ÿ“ฆ **Available on NPM:** https://www.npmjs.com/package/cortexweaver ## ๐ŸŒŸ Why Choose CortexWeaver? ### ๐Ÿš€ For Developers - โšก **10x faster development** with AI agent assistance - ๐Ÿง  **Expert knowledge** across all development disciplines - ๐Ÿ”„ **Automated workflows** from design to deployment - ๐Ÿ“š **Learning accelerator** - learn from AI expertise - ๐Ÿ›ก๏ธ **Quality assurance** built into every step ### ๐Ÿข For Teams - ๐ŸŽฏ **Consistent code quality** across all projects - ๐Ÿ“‹ **Standardized processes** and documentation - ๐Ÿ” **Built-in code review** and testing - ๐Ÿ“ˆ **Scalable development** practices - ๐Ÿ’ฐ **Cost-effective** compared to hiring specialists --- ## ๐ŸŽฅ See CortexWeaver in Action ```bash # Initialize a new AI-powered project in seconds (no installation needed!) $ npx cortexweaver init my-awesome-app โœจ Creating project structure with 20+ AI agents ready to assist... ๐Ÿ“ Setting up modular architecture... ๐Ÿค– Configuring specialized agents... โœ… Project ready! Your AI development team is standing by. # Start building with AI assistance $ npx cortexweaver start ๐Ÿง  CortexWeaver Orchestrator starting... ๐Ÿ—๏ธ Architect Agent: Analyzing requirements... ๐Ÿ’ป Coder Agent: Ready for implementation... ๐Ÿงช Testing Agents: Quality assurance online... ๐Ÿ“Š Monitor Agent: Performance tracking active... ๐Ÿš€ Your AI development team is now working! ``` --- ## ๐Ÿš€ Quick Start Choose your preferred installation method: ### โšก **Option 1: NPX (Instant - No Installation)** ```bash # 1. Create your first AI-powered project (15 seconds) mkdir my-project && cd my-project npx cortexweaver init # 2. Configure authentication (15 seconds) npx cortexweaver auth configure # 3. Start your AI development team! ๐Ÿš€ npx cortexweaver start ``` ### ๐Ÿ“ฆ **Option 2: Global Installation** ```bash # 1. Install globally (30 seconds) npm install -g cortexweaver # 2. Create your first AI-powered project (15 seconds) mkdir my-project && cd my-project cortex-weaver init # 3. Configure authentication (15 seconds) cortex-weaver auth configure # 4. Start your AI development team! ๐Ÿš€ cortex-weaver start ``` ### ๐Ÿ”ง **Option 3: Development Setup** ```bash # 1. Clone and install (60 seconds) git clone https://github.com/mlbrilliance/CortexWeaver.git cd CortexWeaver && npm install && npm run build # 2. Create your first AI-powered project (15 seconds) mkdir my-project && cd my-project ../CortexWeaver/dist/index.js init # 3. Configure authentication (15 seconds) ../CortexWeaver/dist/index.js auth configure # 4. Start your AI development team! ๐Ÿš€ ../CortexWeaver/dist/index.js start ``` ### ๐Ÿ“‹ Prerequisites | Requirement | Version | Purpose | |-------------|---------|---------| | ๐ŸŸข **Node.js** | โ‰ฅ 18.0.0 | Runtime environment | | ๐Ÿ”ง **Git** | โ‰ฅ 2.25.0 | Worktree management | | ๐Ÿ—„๏ธ **Neo4j** | Latest | Knowledge graph (optional) | | ๐Ÿ”‘ **Claude API** | - | AI agent intelligence | ๐Ÿ’ก **Pro Tip:** Use `npx cortexweaver doctor` or `cortex-weaver doctor` to check all prerequisites automatically! --- ## ๐Ÿ—๏ธ The Architecture That Powers Intelligence ```mermaid graph TB subgraph "๐Ÿง  Intelligence Layer" Reflector["๐Ÿง  Reflector<br/>Self-Improvement"] Governor["๐Ÿ‘‘ Governor<br/>Meta-Strategy"] Orchestrator["๐ŸŒŒ Orchestrator<br/>Task Coordination"] CodeSavant["๐Ÿ’ก CodeSavant<br/>Problem Solving"] end subgraph "๐Ÿ—๏ธ Development Specialists" Formalizer["๐Ÿ“‹ Formalizer<br/>Contract Design"] Architect["๐Ÿ‘ท Architect<br/>System Design"] Coder["๐Ÿ’ป Coder<br/>Implementation"] SpecWriter["๐Ÿ“ Spec Writer<br/>Requirements"] Prototyper["โšก Prototyper<br/>Proof of Concept"] end subgraph "๐Ÿงช Quality Assurance Team" LondonTester["๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ London Tester<br/>Mockist/TDD"] ChicagoTester["๐Ÿ‡บ๐Ÿ‡ธ Chicago Tester<br/>Classical/BDD"] PropertyTester["๐ŸŽฒ Property Tester<br/>Property-Based"] QualityGate["๐Ÿ›ก๏ธ Quality Gate<br/>Code Standards"] TestDocumenter["๐Ÿ“Š Test Documenter<br/>Documentation"] end subgraph "๐Ÿ” Analysis & Intelligence" Monitor["๐Ÿ“Š Monitor<br/>Performance"] Debugger["๐Ÿ› Debugger<br/>Error Analysis"] Critique["๐Ÿ”„ Critique<br/>Quality Review"] KnowledgeUpdater["๐Ÿ“š Knowledge Updater<br/>Learning"] end %% Connections Reflector --> Governor Reflector --> Orchestrator Governor --> Orchestrator Orchestrator --> Formalizer Orchestrator --> Architect Orchestrator --> Coder Orchestrator --> SpecWriter Orchestrator --> Prototyper Orchestrator --> LondonTester Orchestrator --> ChicagoTester Orchestrator --> PropertyTester CodeSavant --> Coder CodeSavant --> Debugger QualityGate --> Coder Critique --> Architect Monitor --> Governor TestDocumenter --> LondonTester TestDocumenter --> ChicagoTester KnowledgeUpdater --> Reflector %% Styling classDef intelligence fill:#e1f5fe classDef development fill:#f3e5f5 classDef quality fill:#e8f5e8 classDef analysis fill:#fff3e0 class Reflector,Governor,Orchestrator,CodeSavant intelligence class Formalizer,Architect,Coder,SpecWriter,Prototyper development class LondonTester,ChicagoTester,PropertyTester,QualityGate,TestDocumenter quality class Monitor,Debugger,Critique,KnowledgeUpdater analysis ``` ### ๐ŸŽฏ How It Works 1. **๐Ÿง  You Define the Vision** - Write your requirements in simple `plan.md` 2. **๐ŸŽฏ Orchestrator Coordinates** - Intelligent task distribution across agents 3. **๐Ÿค– Agents Execute** - Specialized AI agents handle their expertise areas 4. **๐ŸŒŒ Knowledge Persists** - Cognitive Canvas learns and improves over time 5. **๐Ÿ”„ System Evolves** - Reflector agent continuously improves the process --- ## ๐Ÿค– The Agent Ecosystem ### ๐ŸŒŸ **20+ Specialized AI Agents at Your Service** #### ๐Ÿ—๏ธ **Development Powerhouse** - ๐Ÿ‘ท **Architect** - System design & API specs - ๐Ÿ’ป **Coder** - Implementation & programming - ๐Ÿ“‹ **Formalizer** - Contract specifications - โšก **Prototyper** - Rapid concept validation - ๐Ÿ“ **Spec Writer** - Requirements analysis #### ๐Ÿงช **Quality Guardians** - ๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ **London Tester** - Mockist unit testing - ๐Ÿ‡บ๐Ÿ‡ธ **Chicago Tester** - Integration testing - ๐ŸŽฒ **Property Tester** - Property-based verification - ๐Ÿ›ก๏ธ **Quality Gate** - Code quality enforcement - ๐Ÿ“Š **Test Documenter** - Test documentation #### ๐Ÿ” **Intelligence Network** - ๐Ÿ‘‘ **Governor** - Budget & resource management - ๐Ÿ“Š **Monitor** - System health & performance - ๐Ÿ› **Debugger** - Intelligent error resolution - ๐Ÿ“š **Knowledge Updater** - Learning & improvement - ๐Ÿ”„ **Reflector** - Process optimization --- ## ๐Ÿ’ก Real-World Examples ### ๐ŸŽฎ Example 1: Building a REST API #### Using NPX (Recommended) ```bash # 1. Initialize project (no installation needed) npx cortexweaver init my-api cd my-api # 2. Define your vision in plan.md echo "Build a user management REST API with authentication" > plan.md # 3. Let the AI team work! npx cortexweaver start ``` #### Using Global Installation ```bash # 1. Initialize project cortex-weaver init my-api cd my-api # 2. Define your vision in plan.md echo "Build a user management REST API with authentication" > plan.md # 3. Let the AI team work! cortex-weaver start ``` **What happens behind the scenes:** - ๐Ÿ‘ท **Architect** designs the API structure and database schema - ๐Ÿ“‹ **Formalizer** creates OpenAPI specifications - ๐Ÿ’ป **Coder** implements endpoints and business logic - ๐Ÿงช **Testing team** creates comprehensive test suites - ๐Ÿ›ก๏ธ **Quality Gate** ensures code standards compliance - ๐Ÿ“Š **Monitor** sets up performance tracking ### ๐ŸŒ Example 2: Frontend Application ```bash # Using NPX npx cortexweaver init my-frontend echo "React dashboard with real-time charts and user management" > plan.md npx cortexweaver start --workflow=frontend --agents=architect,coder,london-tester # Using Global Installation cortex-weaver init my-frontend echo "React dashboard with real-time charts and user management" > plan.md cortex-weaver start --workflow=frontend --agents=architect,coder,london-tester ``` ### ๐Ÿ”ง Example 3: Microservices Architecture ```bash # Using NPX npx cortexweaver init microservices-app echo "E-commerce platform with user, product, and order services" > plan.md npx cortexweaver start --parallel=5 --agents=all # Using Global Installation cortex-weaver init microservices-app echo "E-commerce platform with user, product, and order services" > plan.md cortex-weaver start --parallel=5 --agents=all ``` --- ## ๐Ÿ“– Comprehensive Documentation ### ๐ŸŽฎ Available Commands #### ๐Ÿš€ **Project Management** **Using NPX (No Installation Required):** ```bash # Initialize new project npx cortexweaver init [path] # Check project health npx cortexweaver status [path] # Start AI orchestration npx cortexweaver start [path] # Monitor progress npx cortexweaver logs <task-id> ``` **Using Global Installation:** ```bash # Initialize new project cortex-weaver init [path] # Check project health cortex-weaver status [path] # Start AI orchestration cortex-weaver start [path] # Monitor progress cortex-weaver logs <task-id> ``` #### ๐Ÿ”ง **Advanced Operations** **Using NPX:** ```bash # Authentication management npx cortexweaver auth status npx cortexweaver auth configure # Agent management npx cortexweaver list-agents npx cortexweaver retry <task-id> # Project operations npx cortexweaver merge <task-id> npx cortexweaver attach <task-id> ``` **Using Global Installation:** ```bash # Authentication management cortex-weaver auth status cortex-weaver auth configure # Agent management cortex-weaver list-agents cortex-weaver retry <task-id> # Project operations cortex-weaver merge <task-id> cortex-weaver attach <task-id> ``` ### ๐ŸŽฏ Basic Development Workflow #### NPX Workflow (Recommended) ```bash # 1. Project Setup mkdir awesome-project && cd awesome-project npx cortexweaver init # 2. Authentication npx cortexweaver auth status # If needed: npx cortexweaver auth configure # 3. Define Requirements cat > plan.md << EOF # My Awesome Project ## Goal Build a task management API with the following features: ## Requirements - User authentication and authorization - CRUD operations for tasks - Real-time notifications - Database persistence - API documentation ## Acceptance Criteria - RESTful API design - Input validation - Error handling - Comprehensive tests - Docker deployment EOF # 4. Start Development npx cortexweaver start # 5. Monitor Progress npx cortexweaver status npx cortexweaver logs task-001 ``` #### Global Installation Workflow ```bash # 1. Install globally npm install -g cortexweaver # 2. Project Setup mkdir awesome-project && cd awesome-project cortex-weaver init # 3. Authentication cortex-weaver auth status # If needed: cortex-weaver auth configure # 4. Define Requirements (same as above) cat > plan.md << EOF # My Awesome Project ## Goal Build a task management API with the following features: ## Requirements - User authentication and authorization - CRUD operations for tasks - Real-time notifications - Database persistence - API documentation ## Acceptance Criteria - RESTful API design - Input validation - Error handling - Comprehensive tests - Docker deployment EOF # 5. Start Development cortex-weaver start # 6. Monitor Progress cortex-weaver status cortex-weaver logs task-001 ``` --- ## ๐Ÿ› ๏ธ Advanced Configuration ### โš™๏ธ Project Configuration (.cortexweaver/config.json) ```json { "project": { "name": "my-awesome-project", "version": "1.0.0", "type": "fullstack" }, "ai": { "models": { "claude": "claude-3-opus-20240229", "fallback": "claude-3-sonnet-20240229" }, "temperature": 0.7, "maxTokens": 4000 }, "budget": { "maxCost": 500, "dailyLimit": 50, "warningThreshold": 80 }, "agents": { "preferred": ["architect", "coder", "london-tester"], "maxConcurrent": 3, "specializations": { "frontend": ["architect", "coder", "london-tester"], "backend": ["architect", "formalizer", "coder", "chicago-tester"], "fullstack": ["architect", "coder", "london-tester", "chicago-tester"] } }, "quality": { "codeStandards": "strict", "testCoverage": 80, "documentationRequired": true } } ``` ### ๐Ÿ” Environment Setup ```bash # Core Configuration export CLAUDE_API_KEY="your-claude-api-key" export NODE_ENV="development" # Optional Integrations export NEO4J_URI="bolt://localhost:7687" export NEO4J_USERNAME="neo4j" export NEO4J_PASSWORD="your-password" # GitHub Integration (optional) export GITHUB_TOKEN="your-github-token" # Advanced Settings export CORTEX_LOG_LEVEL="info" export CORTEX_MAX_PARALLEL_AGENTS="5" export CORTEX_BUDGET_LIMIT="1000" ``` ### ๐Ÿ“ Project Structure ``` my-project/ โ”œโ”€โ”€ ๐Ÿ“ plan.md # Project requirements โ”œโ”€โ”€ ๐Ÿ“‹ contracts/ # Formal specifications โ”‚ โ”œโ”€โ”€ api-spec.yaml # OpenAPI specifications โ”‚ โ”œโ”€โ”€ schema.json # Data schemas โ”‚ โ””โ”€โ”€ requirements.md # Detailed requirements โ”œโ”€โ”€ ๐Ÿค– prompts/ # Agent customization โ”‚ โ”œโ”€โ”€ architect.md # Custom architect instructions โ”‚ โ”œโ”€โ”€ coder.md # Custom coding standards โ”‚ โ””โ”€โ”€ tester.md # Testing preferences โ”œโ”€โ”€ โšก prototypes/ # Rapid development โ”‚ โ”œโ”€โ”€ features/ # Feature prototypes โ”‚ โ”œโ”€โ”€ experiments/ # Technical experiments โ”‚ โ””โ”€โ”€ proofs-of-concept/ # Concept validation โ”œโ”€โ”€ โš™๏ธ .cortexweaver/ # System configuration โ”‚ โ”œโ”€โ”€ config.json # Project settings โ”‚ โ”œโ”€โ”€ agent-history.json # Learning data โ”‚ โ””โ”€โ”€ performance-metrics.json # Usage analytics โ””โ”€โ”€ ๐Ÿ“Š .cortex-history/ # Knowledge persistence โ”œโ”€โ”€ cognitive-canvas.db # Knowledge graph โ”œโ”€โ”€ agent-interactions.log # Communication logs โ””โ”€โ”€ improvement-suggestions.json # AI recommendations ``` --- ## ๐ŸŒŸ What Makes CortexWeaver Special ### ๐Ÿš€ **Production-Ready Architecture** | Feature | Benefit | Impact | |---------|---------|--------| | ๐Ÿงฉ **Modular Design** | Easy maintenance & testing | ๐ŸŸข High | | ๐Ÿ“ **500-Line Rule** | Enhanced readability | ๐ŸŸข High | | ๐Ÿ”’ **Type Safety** | Fewer runtime errors | ๐ŸŸข High | | ๐Ÿงช **Comprehensive Tests** | Reliable deployments | ๐ŸŸข High | | ๐Ÿ“š **Self-Documenting** | Reduced onboarding time | ๐ŸŸก Medium | ### ๐ŸŽฏ **Intelligent Features** - **๐Ÿง  Cognitive Canvas**: AI agents learn from every project and improve over time - **๐Ÿ”„ Self-Healing**: Automatic error detection and recovery - **๐Ÿ“Š Performance Monitoring**: Real-time insights into development progress - **๐ŸŽฏ Smart Task Distribution**: Optimal agent assignment based on capabilities - **๐Ÿ’ก Continuous Learning**: System gets smarter with each project ### ๐Ÿ›ก๏ธ **Enterprise-Grade Security** - **๐Ÿ” Secure API Management**: Encrypted credential storage - **๐Ÿ” Code Review Integration**: Automated security scanning - **๐Ÿ“‹ Audit Trails**: Complete activity logging - **๐Ÿšซ Permission Controls**: Role-based access management --- ## ๐ŸŽ“ Learning Resources ### ๐Ÿ“š **Getting Started Guides** **๐Ÿ‘จโ€๐Ÿ’ป For Developers** - [๐Ÿš€ Quick Start Tutorial](docs/quick-start.md) - [๐Ÿค– Agent Deep Dive](docs/agents.md) - [โš™๏ธ Configuration Guide](docs/configuration.md) - [๐Ÿ”ง CLI Reference](docs/cli-reference.md) **๐Ÿข For Teams** - [๐Ÿ“‹ Project Setup](docs/team-setup.md) - [๐ŸŽฏ Workflow Optimization](docs/workflows.md) - [๐Ÿ“Š Performance Monitoring](docs/monitoring.md) - [๐Ÿ›ก๏ธ Security Best Practices](docs/security.md) ### ๐Ÿ’ก **Pro Tips** 1. **๐ŸŽจ Customize Agent Personas**: Tailor agents to your coding style 2. **๐Ÿ“Š Monitor Costs**: Use budget controls to optimize AI usage 3. **๐Ÿ”„ Iterative Development**: Start small, let agents learn your preferences 4. **๐Ÿงช Test-Driven Approach**: Let testing agents guide development quality 5. **๐Ÿ“š Document Everything**: Agents learn from your documentation patterns --- ## ๐Ÿค Community & Support ### ๐Ÿ‘ฅ **Connect with the Community** [![GitHub Issues](https://img.shields.io/badge/Issues-Get%20Help-red?style=for-the-badge&logo=github)](https://github.com/cortexweaver/cortexweaver/issues) [![Discussions](https://img.shields.io/badge/Discussions-Join%20Community-blue?style=for-the-badge&logo=github)](https://github.com/cortexweaver/cortexweaver/discussions) [![Contributing](https://img.shields.io/badge/Contributing-Welcome-green?style=for-the-badge&logo=github)](CONTRIBUTING.md) ### ๐Ÿ†˜ **Need Help?** - ๐Ÿ› **Bug Reports**: [Create an issue](https://github.com/cortexweaver/cortexweaver/issues/new?template=bug_report.md) - ๐Ÿ’ก **Feature Requests**: [Request features](https://github.com/cortexweaver/cortexweaver/issues/new?template=feature_request.md) - โ“ **Questions**: [Start a discussion](https://github.com/cortexweaver/cortexweaver/discussions) - ๐Ÿ“– **Documentation**: [Browse the wiki](https://github.com/cortexweaver/cortexweaver/wiki) --- ## ๐Ÿ† Created By <div align="center"> ### **Nick Sudh** [![Website](https://img.shields.io/badge/๐ŸŒ-nicksudh.com-blue?style=for-the-badge)](https://nicksudh.com) [![GitHub](https://img.shields.io/badge/GitHub-Follow-black?style=for-the-badge&logo=github)](https://github.com/nicksudh) *Passionate about AI, automation, and making developers more productive through intelligent tooling.* **"Building the future of AI-assisted development, one agent at a time."** </div> --- ## ๐Ÿ“„ License & Credits <div align="center"> [![MIT License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE) **CortexWeaver 1.0** is open source software licensed under the MIT license. Built with โค๏ธ by [Nick Sudh](https://nicksudh.com) and the CortexWeaver community. ### ๐Ÿ™ **Acknowledgments** - ๐Ÿค– **Anthropic** for Claude AI capabilities - ๐Ÿง  **Neo4j** for knowledge graph technology - ๐Ÿ› ๏ธ **TypeScript** for type safety and developer experience - ๐Ÿ‘ฅ **Open Source Community** for inspiration and collaboration </div> --- <div align="center"> ### ๐Ÿš€ **Ready to Transform Your Development Process?** #### โšก **Instant Start with NPX (Recommended)** ```bash # No installation needed - get started in seconds! npx cortexweaver init my-ai-project cd my-ai-project npx cortexweaver start ``` #### ๐Ÿ“ฆ **Install from NPM** ```bash # Global installation npm install -g cortexweaver cortex-weaver init my-ai-project cd my-ai-project cortex-weaver start ``` #### ๐Ÿ”ง **Development Setup** ```bash # From source git clone https://github.com/mlbrilliance/CortexWeaver.git cd CortexWeaver && npm install && npm run build mkdir my-ai-project && cd my-ai-project ../CortexWeaver/dist/index.js init ``` **Start building with 20+ AI agents today!** ๐Ÿค–โœจ [![NPM Package](https://img.shields.io/badge/๐Ÿ“ฆ-NPM%20Package-red?style=for-the-badge)](https://www.npmjs.com/package/cortexweaver) โ€ข [โญ Star this project](https://github.com/mlbrilliance/CortexWeaver) โ€ข [๐Ÿ”— Share with friends](https://twitter.com/intent/tweet?text=Check%20out%20CortexWeaver%20-%20AI%20agent%20orchestration%20for%20developers!&url=https://www.npmjs.com/package/cortexweaver) โ€ข [๐Ÿ“– Read the docs](docs/) </div> --- <div align="center"> <sub> **CortexWeaver** - Intelligent AI Agent Orchestration System *Empowering developers with specialized AI agents for better, faster, smarter development.* Made with ๐Ÿง  and โšก by [Nick Sudh](https://nicksudh.com) </sub> </div>