MCP GitHub Issue Server
by sammcj
- src
- task
# Task Management System
The task management system is the core functionality of the Atlas Task Manager, providing
comprehensive task tracking with hierarchical organization, dependency management, and rich metadata
support.
## Overview
The task system provides:
- Hierarchical task organization
- Dependency tracking
- Status management
- Rich metadata support
- Event-driven updates
## Architecture
### Core Components
#### TaskManager
- Central task coordination
- Task lifecycle management
- Event handling
- Cache management
#### Core Subsystems
##### Task Store
- Task persistence
- Query optimization
- Batch operations
- Transaction handling
##### Task Validator
- Input validation
- Schema enforcement
- Relationship validation
- Status transitions
##### Task Cache
- Performance optimization
- Memory management
- Cache invalidation
- Consistency maintenance
##### Task Operations
- Task CRUD operations
- Bulk operations
- Status updates
- Dependency resolution
## Task Structure
```typescript
interface Task {
path: string;
name: string;
description?: string;
type: 'TASK' | 'MILESTONE';
status: TaskStatus;
parentPath?: string;
dependencies?: string[];
metadata?: {
priority?: 'low' | 'medium' | 'high';
tags?: string[];
reasoning?: string;
technicalRequirements?: {
language?: string;
framework?: string;
dependencies?: string[];
environment?: string;
};
progress?: {
percentage: number;
milestones?: string[];
lastUpdated: number;
};
};
notes?: {
planning?: string[];
progress?: string[];
completion?: string[];
troubleshooting?: string[];
};
}
```
## Usage Examples
```typescript
// Create a task
const task = await taskManager.createTask({
path: 'project/backend/auth',
name: 'Implement Authentication',
type: 'TASK',
description: 'Implement user authentication system',
metadata: {
priority: 'high',
tags: ['security', 'backend'],
},
});
// Update task status
await taskManager.updateTask('project/backend/auth', {
status: 'IN_PROGRESS',
metadata: {
progress: {
percentage: 30,
lastUpdated: Date.now(),
},
},
});
// Get task hierarchy
const tasks = await taskManager.getTaskHierarchy('project/backend');
// Bulk operations
await taskManager.bulkOperation([
{
type: 'create',
path: 'project/backend/oauth',
data: {
/* task data */
},
},
{
type: 'update',
path: 'project/backend/auth',
data: { status: 'COMPLETED' },
},
]);
```
## Best Practices
1. **Task Organization**
- Use clear path hierarchies
- Maintain reasonable depth
- Group related tasks
- Track dependencies
2. **Status Management**
- Follow status transitions
- Update parent status
- Handle blocked tasks
- Track progress
3. **Metadata Usage**
- Include relevant context
- Track technical details
- Document decisions
- Maintain history
4. **Performance**
- Use bulk operations
- Leverage caching
- Optimize queries
- Handle large sets
5. **Data Integrity**
- Validate inputs
- Maintain consistency
- Handle conflicts
- Preserve history