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
Markdown
# ๐ง CortexWeaver 1.0
<div align="center">
[](https://github.com/cortexweaver/cortexweaver)
[](https://www.npmjs.com/package/cortexweaver)
[](LICENSE)
[](https://nodejs.org/)
[](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**
[](https://github.com/cortexweaver/cortexweaver/issues)
[](https://github.com/cortexweaver/cortexweaver/discussions)
[](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**
[](https://nicksudh.com)
[](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">
[](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!** ๐คโจ
[](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>