Kanban Board Integration System#
Table of Contents#
System Overview#
The Kanban Board Integration system is Marcusβs bridge to external project management platforms, enabling the AI project manager to create, read, update, and manage tasks across different kanban providers. This system transforms Marcus from a theoretical AI manager into a practical tool that can interact with real project management workflows.
Core Responsibilities#
Task Management: CRUD operations on tasks across different kanban platforms
Board State Synchronization: Keeping Marcusβs internal state aligned with external boards
Multi-Provider Support: Unified interface across Planka, Linear, and GitHub Projects
Natural Language Processing: Converting descriptions into structured tasks
AI-Enhanced Task Assignment: Intelligent task matching and instruction generation
Architecture#
The system follows a layered architecture with clear separation of concerns:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Tools Layer β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β request_next β β report_progress β β report_blocker β β
β β _task β β β β β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Natural Language Layer β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β NLP Tools β β Pipeline Track β β Safety Checker β β
β β (create_proj, β β (Visualization) β β (Dependencies) β β
β β add_feature) β β β β β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Analysis Engine β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β Task Assignment β β Blocker Resolve β β Risk Analysis β β
β β Optimization β β AI Suggestions β β Health Monitor β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Abstraction Layer β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β KanbanInterface β β KanbanFactory β β KanbanClient β β
β β (Abstract Base) β β (Provider Sel.) β β (MCP Wrapper) β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Provider Layer β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β Planka Provider β β Linear Provider β β GitHub Provider β β
β β (MCP via β β (Direct API) β β (GraphQL API) β β
β β kanban-mcp) β β β β β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β External Services β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
β β Planka Board β β Linear Project β β GitHub Project β β
β β (Self-hosted) β β (SaaS) β β (Cloud/Enter.) β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Marcus Ecosystem Integration#
The Kanban integration sits at the heart of Marcusβs operational ecosystem:
Data Flow#
Inbound: External board state β Internal Marcus models
Processing: AI analysis β Task optimization β Dependency resolution
Outbound: Marcus decisions β External board updates
Key Integration Points#
Core Models: Task, ProjectState, WorkerStatus objects
Error Framework: Structured error handling with proper context
Context System: Dependency tracking and interface recommendations
Cost Tracking: AI usage monitoring and token accounting
Event Pipeline: Visualization and monitoring of all operations
Workflow Integration#
The kanban system is invoked at specific points in the typical Marcus workflow:
create_project β register_agent β request_next_task β report_progress β report_blocker β finish_task
β β β β β β
[CREATE] [INIT] [READ/ASSIGN] [UPDATE] [ANALYZE] [UPDATE]
β β β β β β
ββ NLP Tools ββ Board Setup ββ AI Matching ββ Progress ββ AI ββ Status
ββ Task Gen ββ Client Init ββ Task Filter ββ Comments ββ Suggest ββ Complete
ββ Batch ββ Config Load ββ Assignment ββ Status ββ Resolve ββ Move
Create API Call Update Steps Card
Invocation Points#
1. Project Creation (create_project)#
Tool:
src.marcus_mcp.tools.nlp.create_projectKanban Action: Batch task creation via
KanbanClientWithCreateAI Integration: PRD parsing, task decomposition, dependency mapping
2. Agent Registration (register_agent)#
Tool:
mcp__marcus__register_agentKanban Action: Board configuration validation
AI Integration: Skill-based board analysis
3. Task Assignment (request_next_task)#
Tool:
mcp__marcus__request_next_taskKanban Action:
get_available_tasks()β AI analysis βassign_task()AI Integration: Optimal task-agent matching with context awareness
4. Progress Reporting (report_progress)#
Tool:
mcp__marcus__report_task_progressKanban Action:
add_comment()+ status updatesAI Integration: Progress analysis and bottleneck detection
5. Blocker Resolution (report_blocker)#
Tool:
mcp__marcus__report_blockerKanban Action:
report_blocker()β AI analysis β suggestionsAI Integration: Context-aware resolution strategies
6. Task Completion (finish_task)#
Tool: Task completion via progress reporting
Kanban Action:
complete_task()βmove_task_to_column()AI Integration: Completion validation and next task recommendations
What Makes This Special#
1. Multi-Provider Abstraction#
Unlike typical integrations that are tightly coupled to one platform, Marcus provides a unified interface across three major kanban providers with completely different APIs and data models.
2. AI-Native Design#
Every operation is enhanced by AI analysis:
Task assignment considers skills, capacity, and project context
Blocker resolution provides intelligent, agent-specific suggestions
Risk analysis identifies patterns across project history
3. MCP-First Architecture#
Built specifically for the Model Context Protocol, enabling:
Secure, sandboxed external service access
Standardized tool interfaces for AI agents
Robust error handling and recovery mechanisms
4. Natural Language Processing#
Converts human descriptions into structured project plans:
PRD parsing with requirement extraction
Feature decomposition with dependency mapping
Safety checks for logical task ordering
5. Pipeline Visualization#
Every operation is tracked and visualized:
Real-time progress monitoring
Performance bottleneck identification
Quality assessment metrics
Technical Implementation#
Core Interfaces#
KanbanInterface (Abstract Base Class)#
class KanbanInterface(ABC):
@abstractmethod
async def get_available_tasks(self) -> List[Task]
@abstractmethod
async def assign_task(self, task_id: str, assignee_id: str) -> bool
@abstractmethod
async def update_task_progress(self, task_id: str, progress_data: Dict[str, Any]) -> bool
@abstractmethod
async def report_blocker(self, task_id: str, blocker_description: str, severity: str) -> bool
KanbanClient (MCP Implementation)#
class KanbanClient:
"""Simple MCP client following proven reliability patterns"""
async def get_available_tasks(self) -> List[Task]:
# Creates new MCP session for each operation
server_params = StdioServerParameters(
command="node",
args=["../kanban-mcp/dist/index.js"],
env=os.environ.copy()
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
# Fetch and filter tasks
Design Patterns#
1. Session-Per-Operation Pattern#
Each kanban operation creates a fresh MCP session rather than maintaining persistent connections. This approach has proven more reliable in practice, eliminating connection timeouts and state corruption issues.
2. Graceful Degradation#
All AI-enhanced features have fallback implementations:
async def match_task_to_agent(self, tasks, agent, project_state):
if not self.client: # AI unavailable
return self._fallback_task_matching(tasks, agent)
# ... AI logic
3. Error Context Enrichment#
Structured error handling with Marcus Error Framework:
from src.core.error_framework import KanbanIntegrationError, ErrorContext
raise KanbanIntegrationError(
board_name=self.board_id,
operation="task_creation",
context=ErrorContext(
operation="create_task",
integration_name="kanban_client",
custom_context={"task_name": task.name}
)
)
4. Dependency Injection#
All components are loosely coupled via interfaces:
# Can inject any KanbanInterface implementation
creator = NaturalLanguageProjectCreator(
kanban_client=kanban_interface, # SQLite, Planka, Linear, or GitHub
ai_engine=ai_analysis_engine,
subtask_manager=None, # optional
complexity="standard" # optional
)
Provider Implementations#
SQLite Provider (Recommended for Getting Started)#
Technology: Local SQLite database via Python stdlib
Strengths: Zero external dependencies, sub-millisecond operations, no Docker required
Architecture: Direct
sqlite3calls with WAL mode for concurrent agent accessSpecial Features: Full attachment support (filesystem-backed), blocker tracking table, composite indexes for fast task queries
When to use: Local development, getting started, single-user experiments, CI/CD pipelines
Location:
src/integrations/providers/sqlite_kanban.py
Planka Provider#
Technology: MCP via kanban-mcp server
Strengths: Full MCP compliance, self-hosted control, web UI for visual board management
Architecture: Node.js MCP server β Planka REST API
Special Features: Rich comment system, custom fields support
When to use: Team environments where a visual board UI is needed
Linear Provider#
Technology: Direct GraphQL API
Strengths: Native API integration, rich metadata
Architecture: Python client β Linear GraphQL
Special Features: Workflow automation, team synchronization
GitHub Provider#
Technology: GitHub Projects v2 API
Strengths: Code integration, enterprise features
Architecture: REST + GraphQL hybrid
Special Features: Repository linking, milestone tracking
AI Analysis Engine#
The AIAnalysisEngine provides intelligent enhancement to all kanban operations:
Task Assignment Optimization#
async def match_task_to_agent(self, available_tasks, agent, project_state):
# AI prompt considers:
# 1. Agent skills vs task requirements
# 2. Current capacity and workload
# 3. Task priority and dependencies
# 4. Project timeline and critical path
prompt = """Analyze and recommend the SINGLE BEST task for this agent..."""
response = await self._call_claude(prompt)
return self._find_recommended_task(response, available_tasks)
Blocker Resolution#
async def analyze_blocker(self, task_id, description, severity, agent, task):
# Generates agent-specific resolution steps
# Considers skill level and provides learning opportunities
# Recommends collaborators based on expertise gaps
return {
"root_cause": "analysis",
"resolution_steps": ["step1 tailored to agent skills"],
"learning_opportunities": ["skill gaps identified"],
"recommended_collaborators": ["team members with needed skills"]
}
Project Risk Analysis#
async def analyze_project_risks(self, project_state, recent_blockers, team_status):
# Identifies patterns in blockers
# Assesses team capacity and velocity trends
# Predicts potential bottlenecks
return [
ProjectRisk(
risk_type="timeline",
description="Critical path delay risk",
mitigation_strategy="Reallocate resources to blocked tasks"
)
]
Natural Language Processing#
The NLP system converts human descriptions into structured project plans:
Project Creation Pipeline#
Context Detection: Analyze board state and recommend processing mode
PRD Parsing: Extract functional/non-functional requirements
Task Generation: Decompose requirements into actionable tasks
Safety Checking: Apply logical dependencies (testing after implementation)
Board Creation: Batch create tasks with proper metadata
Feature Addition Pipeline#
Feature Analysis: Classify feature type and complexity
Integration Detection: Find existing tasks that need integration
Task Enrichment: Add context-aware metadata and dependencies
Dependency Mapping: Link to existing project infrastructure
Task Classification System#
class TaskType(Enum):
DESIGN = "design"
IMPLEMENTATION = "implementation"
TESTING = "testing"
DEPLOYMENT = "deployment"
DOCUMENTATION = "documentation"
INTEGRATION = "integration"
INFRASTRUCTURE = "infrastructure"
OTHER = "other"
class TaskClassifier:
@classmethod
def classify(cls, task: Task) -> TaskType:
# Analyzes task name, description, and labels
# Returns appropriate task type for workflow ordering
Task Complexity Handling#
The system handles different task complexities through multiple strategies:
Simple Tasks (1-4 hours)#
Processing: Direct assignment with minimal AI analysis
Instructions: Template-based with basic context
Dependencies: Simple prerequisite checking
Example: βFix button styling on login pageβ
Complex Tasks (8+ hours)#
Processing: Full AI analysis with decomposition suggestions
Instructions: Detailed, step-by-step guidance with architectural context
Dependencies: Deep dependency analysis with interface recommendations
Example: βImplement user authentication system with JWT tokensβ
Project-Level Tasks (20+ hours)#
Processing: Automatic decomposition into subtasks
Instructions: Architectural guidance with design phase separation
Dependencies: Full project timeline analysis
Example: βBuild e-commerce platform with payment processingβ
Adaptive Strategies#
Simple Task Fast-Path#
if task.estimated_hours <= 4:
# Skip AI analysis for speed
return self._simple_assignment_algorithm(task, available_agents)
Complex Task Deep Analysis#
if task.estimated_hours >= 8:
# Full AI context analysis
instructions = await self.ai_engine.generate_task_instructions(
task, agent, project_context
)
dependencies = await self.ai_engine.analyze_task_dependencies(
task, project_tasks
)
Board-Specific Considerations#
Planka Boards#
Strength: Full control, custom workflows
Limitation: Requires self-hosting and maintenance
Best For: Internal teams, custom business processes
MCP Integration: Native via kanban-mcp server
Linear Boards#
Strength: Developer-optimized, great API
Limitation: SaaS pricing, limited customization
Best For: Software teams, sprint planning
Integration Pattern: Direct API calls with caching
GitHub Projects#
Strength: Tight code integration, enterprise features
Limitation: Complex API, frequent changes
Best For: Open source projects, development workflows
Integration Pattern: Hybrid REST/GraphQL with webhook support
Board State Synchronization#
Each provider handles state differently:
# Planka: Explicit list-based states
"TODO" β "In Progress" β "Done"
# Linear: Workflow-based with custom states
"Backlog" β "Ready" β "In Development" β "Review" β "Done"
# GitHub: Custom column-based
Configurable workflow states with automation rules
Pros and Cons#
Pros#
Technical Advantages#
Multi-Provider Support: Single codebase supports three major platforms
AI Enhancement: Every operation benefits from intelligent analysis
MCP Native: Built specifically for AI agent interactions
Graceful Degradation: Works even when AI services are unavailable
Error Resilience: Comprehensive error handling with context preservation
Pipeline Visualization: Full operational transparency
Business Advantages#
Vendor Independence: Not locked into single kanban provider
Cost Optimization: AI usage tracking and optimization
Team Adaptation: Matches existing team workflows
Learning Integration: Provides growth opportunities for team members
Cons#
Technical Limitations#
Complexity: Multi-layer architecture increases maintenance overhead
Performance: Session-per-operation adds latency
Dependencies: Requires external MCP servers and AI services
Sync Challenges: Real-time board synchronization is limited
Operational Challenges#
Setup Complexity: Initial configuration requires technical expertise
Provider Differences: Feature parity varies across providers
API Limitations: Constrained by external service capabilities
Cost Accumulation: AI calls can become expensive at scale
Why This Approach#
Design Decisions#
1. Multi-Provider Strategy#
Decision: Support multiple kanban providers rather than focusing on one Rationale: Organizations have different tool preferences and constraints Trade-off: Increased complexity for broader adoption
2. Session-Per-Operation Pattern#
Decision: Create fresh MCP sessions for each operation Rationale: Persistent connections proved unreliable in testing Trade-off: Higher latency for improved reliability
3. AI-First Design#
Decision: Make AI analysis the primary path with fallbacks Rationale: Maximize intelligent behavior while maintaining functionality Trade-off: Higher operational cost for better decision quality
4. Abstract Interface Pattern#
Decision: Use abstract base classes with concrete implementations Rationale: Enable provider swapping without code changes Trade-off: Additional abstraction layers for flexibility
5. Natural Language Integration#
Decision: Support both programmatic and natural language task creation Rationale: Lower barrier to entry for non-technical users Trade-off: Increased system complexity for broader usability
Future Evolution#
Short-Term Improvements (3-6 months)#
Real-Time Sync: WebSocket-based board synchronization
Batch Operations: Optimize multiple task operations
Advanced Caching: Reduce API calls with intelligent caching
Provider Parity: Ensure feature consistency across providers
Medium-Term Enhancements (6-12 months)#
Workflow Automation: Custom workflow creation and management
Advanced Analytics: Predictive project health monitoring
Team Optimization: AI-driven team composition recommendations
Integration Expansion: Support for Jira, Asana, Notion
Long-Term Vision (1-2 years)#
Autonomous Management: Fully AI-driven project management
Cross-Platform Workflows: Unified workflows across multiple tools
Predictive Planning: AI-powered project planning and estimation
Enterprise Features: Advanced security, audit trails, compliance
Architectural Evolution#
Performance Optimization#
Connection pooling for frequently accessed boards
Intelligent prefetching of related tasks
Background synchronization processes
AI Capabilities#
Multi-modal understanding (code, images, documents)
Continuous learning from project outcomes
Advanced risk prediction and mitigation
Integration Ecosystem#
Plugin architecture for custom integrations
Marketplace for community-contributed providers
Enterprise connectors for SAP, ServiceNow, etc.
Analytics Integration#
NOTE: Cato (the dashboard) reads kanban state directly from the board (SQLite/Planka/etc.) rather than through a callable analytics class inside Marcus. There is no
CatoClientclass inside Marcus that exposes methods likeanalyze_project_description(),generate_project_structure(), oranalyze_task_complexity()β those examples in the snippets below are illustrative of where Cato could plug in, not a current API.
The kanban integration contributes data to Marcusβs broader intelligence systems through existing components:
Data Contributions#
Task Metrics: Completion rates, velocity trends, quality indicators
Team Performance: Individual and collective productivity data
Project Health: Risk indicators, bottleneck identification
Process Efficiency: Workflow optimization opportunities
This document provides a comprehensive technical overview of Marcusβs Kanban Board Integration system. For implementation details, see the source code in /src/integrations/. For configuration guidance, see /docs/user-guide/kanban-setup.md.