Skip to content

Latest commit

 

History

History
337 lines (282 loc) · 10.7 KB

TODO.md

File metadata and controls

337 lines (282 loc) · 10.7 KB

Deputy Development TODO

Current Sprint: Room-Based Chat System Implementation

✅ Completed Features

  • ✅ JWT authentication system implemented
  • ✅ django-ninja API setup completed
  • ✅ Enhanced testing infrastructure established
  • ✅ Caddy ingress proxy and development configuration finalized
  • ✅ Custom User model with invitation system
  • ✅ Base models with UUID primary keys and timestamps

🚧 In Progress: Room-Based Chat Architecture

P0 - Room Model & Core Infrastructure

  • Create Room model and app structure

    • Create deputy/apps/rooms/ Django app
    • Implement Room model with:
      • UUID primary key
      • slug (URL-friendly unique identifier)
      • topic (CharField)
      • start_date, completion_date (DateTimeField)
      • summary (TextField)
      • user_participants (M2M with User)
      • agent_participants (M2M - for future agent entities)
    • Add model methods: is_active(), mark_completed()
    • Acceptance Criteria: Room model created with migrations, admin interface configured
  • Message model implementation

    • Create Message model linking to Room
    • Support user and agent message types
    • Implement message ordering and timestamps
    • Add support for @mentions detection
    • Acceptance Criteria: Messages can be created and retrieved for rooms

P0 - Inquiry Triage Workflow

  • Implement InquiryTriageWorkflow

    • Create workflow class for inquiry evaluation
    • Design structured output: InquiryTriageResponse
    • Implement room suggestion logic
    • Add methods: evaluate_inquiry(), suggest_rooms(), create_new_room()
    • Acceptance Criteria: Workflow can determine room assignment strategy
  • Create begin-new-inquiry endpoint

    • django-ninja endpoint at /api/begin-new-inquiry
    • Input validation for inquiry data
    • Integration with InquiryTriageWorkflow
    • Return structured response with room suggestions
    • Handle uncertainty with multiple suggestions
    • Acceptance Criteria: Endpoint creates or suggests rooms based on inquiry

P1 - Room Interaction APIs

  • Implement send-message endpoint

    • Create /api/rooms/{room_slug}/send-message
    • Add message to room without necessarily waking agents
    • Handle @agent mentions for wake triggers
    • Support different message types (text, code, files)
    • Acceptance Criteria: Messages can be sent to rooms with proper handling
  • Implement trigger_completion endpoint

    • Create /api/rooms/{room_slug}/trigger-completion
    • Explicitly wake specified agent
    • Track agent activation state
    • Queue agent processing tasks
    • Acceptance Criteria: Agents can be explicitly triggered for room processing

P1 - Django-Ergo Integration Research

  • Research django-ergo agent assignment

    • Analyze how ergo assigns agents/workflows to conversations
    • Map ergo's conversation model to our Room model
    • Design integration adapters
    • Document agent lifecycle management
    • Acceptance Criteria: Clear integration strategy documented
  • Implement ergo-room adapter

    • Create adapter classes for ergo integration
    • Map Room to ergo conversation context
    • Implement agent assignment logic
    • Add workflow persistence
    • Acceptance Criteria: Rooms can use ergo workflows and agents

Sprint 2: Advanced Room Features (Next 2 weeks)

P0 - Real-time Communication

  • WebSocket support for rooms

    • Implement Django Channels for WebSocket
    • Real-time message delivery
    • Typing indicators
    • Agent status updates
    • Acceptance Criteria: Real-time updates work in rooms
  • Room participant management

    • Add/remove participants APIs
    • Participant permissions (viewer, contributor, admin)
    • Notification system for participant events
    • Acceptance Criteria: Multi-user room collaboration works

P1 - Room Management Features

  • Room search and filtering

    • Full-text search on topics and messages
    • Filter by participants, date, status
    • Room archival system
    • Acceptance Criteria: Users can find rooms efficiently
  • Room templates and presets

    • Create room templates for common workflows
    • Quick-start room creation
    • Template sharing between users
    • Acceptance Criteria: Users can create rooms from templates

Sprint 3: Agent Integration & MCP (Weeks 5-6)

P0 - Agent Container Infrastructure

  • Design agent container architecture

    • Define agent container specifications
    • Create Dockerfile templates for agents
    • Design container networking for room communication
    • Plan security isolation between containers
    • Acceptance Criteria: Agent architecture documented
  • Implement Docker agent spawning

    • Docker client integration service
    • Agent lifecycle management (create, monitor, destroy)
    • Container health checks
    • Container-to-room communication channels
    • Acceptance Criteria: Agents spawn in containers and connect to rooms

P1 - MCP Protocol Integration

  • MCP tooling for agents

    • Research Model Context Protocol spec
    • Design Deputy-specific MCP implementation
    • Create MCP message handling for rooms
    • Build tool registration system
    • Acceptance Criteria: Agents can use MCP tools in rooms
  • Agent capability discovery

    • Agent capability registration
    • Dynamic tool discovery
    • Capability-based agent selection
    • Acceptance Criteria: System knows agent capabilities

Sprint 4: Frontend Room UI (Weeks 7-8)

P0 - Vite+React Migration & Room UI

  • Complete frontend migration to Vite+React

    • Set up Vite+React+TypeScript structure
    • Migrate authentication components
    • Remove Next.js completely
    • Acceptance Criteria: New frontend stack operational
  • Room chat interface

    • Chat message components with markdown
    • Room participant list
    • Message history and scrolling
    • File upload and sharing
    • Acceptance Criteria: Full-featured room chat UI
  • Room management UI

    • Room creation wizard
    • Room list and search
    • Room settings and participant management
    • Agent activation controls
    • Acceptance Criteria: Users can manage rooms through UI

P1 - Enhanced UI Features

  • Rich message formatting
    • Code syntax highlighting
    • File previews
    • Agent response formatting
    • Copy/download functionality
    • Acceptance Criteria: Professional message display

Medium-Term Goals (3-4 months)

Advanced Workflow Management

  • Hierarchical room structures

    • Parent-child room relationships
    • Room inheritance and templates
    • Cross-room agent coordination
    • Acceptance Criteria: Complex multi-room workflows
  • Workflow automation

    • Scheduled room actions
    • Trigger-based agent activation
    • Workflow templates and sharing
    • Acceptance Criteria: Automated room workflows

Agent Marketplace

  • Agent discovery and installation
    • Agent registry and marketplace
    • Agent rating and reviews
    • Custom agent development SDK
    • Acceptance Criteria: Users can discover and use community agents

Analytics & Insights

  • Room analytics dashboard
    • Message volume and patterns
    • Agent performance metrics
    • User engagement tracking
    • Cost and resource usage
    • Acceptance Criteria: Comprehensive room analytics

Long-Term Vision (6+ months)

Enterprise Features

  • Organization-wide room management

    • Organization room templates
    • Compliance and audit logging
    • Advanced permission systems
    • SSO and enterprise auth
    • Acceptance Criteria: Enterprise-ready room system
  • AI-powered room optimization

    • Automatic agent selection
    • Predictive room suggestions
    • Smart routing and load balancing
    • ML-based workflow optimization
    • Acceptance Criteria: AI enhances room efficiency

Platform Ecosystem

  • Public API and SDK

    • Comprehensive room management API
    • Client SDKs for multiple languages
    • Webhook system for integrations
    • Plugin architecture
    • Acceptance Criteria: Third-party room integrations
  • Cross-platform clients

    • Mobile apps (iOS/Android)
    • Desktop apps (Electron)
    • CLI tools for rooms
    • IDE integrations
    • Acceptance Criteria: Rooms accessible everywhere

Future Development Tickets

Room Features

  1. Room templates marketplace
  2. Voice/video in rooms (WebRTC)
  3. Room analytics and insights
  4. Scheduled room events
  5. Room-based billing and quotas
  6. Room export/import functionality
  7. Room version control and history
  8. Collaborative editing in rooms
  9. Room-specific agent training
  10. Cross-organization room sharing

Agent Enhancements

  1. Agent skill trees and specialization
  2. Multi-agent coordination protocols
  3. Agent performance benchmarking
  4. Custom agent development framework
  5. Agent cost optimization
  6. Agent fallback and redundancy
  7. Agent security sandboxing
  8. Agent marketplace and monetization
  9. Agent fine-tuning per room
  10. Agent collaboration patterns

Platform Improvements

  1. GraphQL API alongside REST
  2. Real-time collaboration cursors
  3. Advanced search with Elasticsearch
  4. Message encryption (E2E)
  5. Federated room networks
  6. Blockchain-based audit trails
  7. AR/VR room interfaces
  8. Natural language room commands
  9. Predictive text and autocomplete
  10. Smart notifications and digests

Development Guidelines

Code Quality Standards

  • Test Coverage: Maintain > 90% test coverage
  • Type Safety: Full TypeScript/Python typing
  • Documentation: OpenAPI specs for all endpoints
  • Performance: < 100ms API response times

Security Requirements

  • Room Isolation: Strict data separation
  • Agent Sandboxing: Container security
  • Input Validation: All inputs sanitized
  • Audit Logging: All room actions logged

Architecture Principles

  • Domain-Driven Design: Clear bounded contexts
  • Event-Driven: Room events for extensibility
  • API-First: All features via API
  • Progressive Enhancement: Graceful degradation

Task Prioritization

P0 (Critical)

  • Core room functionality
  • Basic agent integration
  • Security and authentication

P1 (High)

  • Enhanced user experience
  • Performance optimization
  • Developer tools

P2 (Medium)

  • Advanced features
  • Third-party integrations
  • Analytics and insights

P3 (Low)

  • Experimental features
  • Nice-to-have improvements
  • Long-term research

Success Metrics

Technical Metrics

  • Room creation: < 1 second
  • Message delivery: < 100ms
  • Agent spawn time: < 5 seconds
  • System uptime: > 99.9%

User Metrics

  • Daily active rooms: > 100
  • Messages per room: > 50/day
  • Agent utilization: > 60%
  • User retention: > 70% (7-day)

Business Metrics

  • Room completion rate: > 80%
  • Agent efficiency: > 10x human
  • Cost per room: < $0.10
  • Revenue per user: > $50/month