npm package: @oneqode/cjc-orchestrator-mcp
Description: CJC Orchestrator MCP - The Infinite Context Brain for Agent Workflows
Author: OneQode
Latest version: 5.3.10

# CJC Orchestrator MCP v5.1.0 🔥

The **INFINITE CONTEXT BRAIN** for the Cracked Jacked Claude Framework!

## 🚀 What's New in v5.1.0

### 🏗️ PEER MCP ARCHITECTURE FIX
- **No longer spawns TaskMaster** - Works as proper peer MCP service
- **Accepts task data from Claude** - Claude coordinates between TaskMaster and Orchestrator
- **Fallback to local files** - Can read tasks.json directly if needed
- **Fixed initialization loops** - Storage no longer causes infinite loops

## 🚀 What's New in v5.0.0

### 🐛 CRITICAL BUG FIXES
- **Fixed multiline content corruption** - Bash commands and code blocks are now preserved exactly
- **Proper markdown parsing** - Uses the `marked` library for robust content handling
- **No more truncated commands** - Task details maintain their original formatting

### 🏗️ SELF-CONTAINED ARCHITECTURE
- **Project-agnostic** - Works with ANY project, not tied to CJC framework
- **Auto-creates `.orchestrator/` directory** - All state stored in your project
- **No framework dependencies** - Updates via npm, no manual framework changes needed

### 🧠 ENHANCED FEATURES
- **Better context synthesis** - Intelligently selects relevant context within token limits
- **Pattern extraction** - Learns from your work and builds knowledge over time
- **Persistent storage** - Maintains context across orchestrator restarts

## 📦 Installation

```bash
# Install globally
npm install -g @oneqode/cjc-orchestrator-mcp@latest

# Or use with npx
npx @oneqode/cjc-orchestrator-mcp@latest
```

## 🔧 MCP Configuration

The orchestrator works alongside TaskMaster as peer MCP services:

```json
{
  "mcpServers": {
    "taskmaster": {
      "command": "npx",
      "args": ["-y", "@oneqode/taskmaster-mcp@latest"]
    },
    "orchestrator": {
      "command": "npx", 
      "args": ["-y", "@oneqode/cjc-orchestrator-mcp@latest"],
      "env": {
        "PROJECT_ROOT": "/path/to/your/project"
      }
    }
  }
}
```

## 🔧 How It Works

The orchestrator creates a `.orchestrator/` directory in your project root containing:

```
.orchestrator/
├── state/          # Agent workflow states
├── knowledge/      # Learned patterns and decisions
├── summaries/      # Task completion summaries
├── cache/          # Temporary cache data
└── config.json     # Orchestrator configuration
```

## 🎯 Key Features

### 1. Multiline Content Preservation
```bash
# Your task details with bash commands:
mv bread-of-life/bread-of-life/* .
rm -rf bread-of-life/bread-of-life
chmod +x scripts/*.sh

# Are preserved EXACTLY as written!
```

### 2. Intelligent Context Management
- Synthesizes prompts within token limits
- Prioritizes relevant context
- Includes code examples and patterns

### 3. Knowledge Building
- Extracts patterns from completed work
- Remembers technical decisions
- Builds project understanding over time

## 🔌 MCP Integration

The orchestrator exposes these tools:

- `get_next_prompt` - Get optimized prompt for next task
- `store_summary` - Store task completion summary
- `get_workflow_state` - Check current workflow state
- `reset_context` - Mark context as cleared

## 🧪 Testing

Comprehensive test coverage including:
- Unit tests for markdown parsing
- Integration tests for workflow
- Container tests with Dagger
- Edge case handling

## 🚨 Breaking Changes from v4.x

1. **Storage location** - Now uses `.orchestrator/` in project root
2. **Self-contained** - No longer depends on framework directories
3. **API changes** - Some internal APIs have been updated

## 📊 Performance

- Prompt generation: ~200-500ms
- Summary storage: ~50ms
- Pattern extraction: Automatic during storage
- Memory efficient with disk-based storage

## 🤝 Contributing

See the main CJC Framework repository for contribution guidelines.

## 📄 License

MIT

---

🔥 Built with MAXIMUM ENERGY by the CJC team! 💪