8.2 KiB
8.2 KiB
MyOrg Assistant - Implementation Tasks
Project: +myorg-assistant
Created: 2026-01-31
Last Updated: 2026-02-07
Status: 🎉 PRODUCTION READY - 83% Complete (4 of 6 phases)
Status Legend
[ ]Not started[~]In progress[x]Completed[-]Cancelled/Skipped
Phase 0: Project Setup & Foundation (Week 1) ✅ COMPLETED
Project Structure
- Create project repository structure
- Set up src/ directory with subdirectories (agent, tools, parsers, api, bot, web, scheduler)
- Create tests/ directory
- Create k8s/ directory for Kubernetes manifests
- Create Dockerfile and requirements.txt
Python Environment
- Create virtual environment
- Install core dependencies (FastAPI, Claude Agent SDK, GitPython, Discord.py)
- Set up pre-commit hooks (black, ruff, mypy)
- Create requirements.txt and requirements-dev.txt
Parsers
- Create TodoParser for todo.txt format
- Create CalendarParser for calendar.txt format
- Create ProjectParser for projects.txt format
- Write unit tests for TodoParser
- Write unit tests for CalendarParser
- Write unit tests for ProjectParser
Test Repository
- Create test myorg repository with sample data
- Add sample todo.txt
- Add sample calendar.txt
- Add sample projects.txt
- Add sample telos.md
Phase 1: Core Agent with File Tools (Week 1-2) ✅ COMPLETED
Claude Agent SDK Setup
- Configure connection to LiteLLM endpoint
- Set up Claude Sonnet 4.5 model
- Create base agent class
- Create agent system prompt
File Operation Tools
- Implement read_file(path)
- Implement write_file(path, content)
- Implement append_to_file(path, content)
- Implement list_files(directory)
- Add safety checks (validate paths, backup before write)
Task Management Tools
- Implement add_task(description, project, context, priority, due_date)
- Implement complete_task(task_line_number)
- Implement search_tasks(filters)
- Integrate with TodoParser for formatting
Git Tools
- Implement git_status()
- Implement git_commit(message)
- Implement git_pull()
- Implement git_push()
- Add error handling for git operations
CLI Testing
- Build simple CLI for testing
- Test file operations
- Test task management
- Test git integration
Phase 2: Discord Bot Integration (Week 2-3) ✅ COMPLETED
Discord Bot Setup
- Create Discord application and bot
- Implement discord.py integration
- Connect bot to agent backend
Bot Commands
- Implement natural conversation handling
- Implement /briefing command
- Implement /add command
- Implement /tasks command
- Implement /today command
- Implement /context command
Discord Formatting
- Format agent responses for Discord markdown
- Add emoji support for readability
- Handle long responses (pagination/truncation)
Docker & Deployment
- Create Dockerfile
- Create Kubernetes Deployment manifest
- Create ConfigMap for configuration
- Create Secret for Discord token and git credentials
- Create PersistentVolumeClaim for myorg repository
- Deploy to k3s cluster
Repository Sync
- Clone myorg repo on container startup
- Implement periodic git pull (every 15 minutes)
- Implement auto-push after agent commits
Phase 3: Scheduled Briefings & Reminders (Week 3-4) ✅ COMPLETED
Briefing Generators
- Implement generate_morning_briefing()
- Implement generate_evening_summary()
- Format briefings as Discord messages
Reminder Logic
- Implement check_deadlines() (7d, 3d, 1d warnings)
- Implement check_waiting_items()
- Implement check_upcoming_events() (30 min before)
Scheduling System
- Choose scheduling approach (APScheduler vs K8s CronJobs)
- Configure timezone handling
Kubernetes CronJobs
- Create morning-briefing CronJob (8:00 AM)
- Create evening-summary CronJob (8:00 PM)
- Create deadline-checker CronJob (hourly)
- Create waiting-followup CronJob (weekly Monday 9:00 AM)
- Create git-sync CronJob (every 15 minutes)
Context Inference
- Implement infer_context(time, calendar_events)
- Add time-based rules (work hours, evenings, weekends)
- Add calendar-based inference
Phase 4: Web Interface (Week 4-5) ✅ COMPLETED
FastAPI Setup
- Create FastAPI application
- Add Jinja2 template engine
- Configure static file serving
Core Pages
- Build Dashboard page (/)
- Build Chat page (/chat)
- Build Tasks page (/tasks)
- Build Calendar page (/calendar)
- Build Projects page (/projects)
Styling
- Create vanilla CSS stylesheet
- Implement responsive layout
- Add dark mode support (deferred)
HTMX Interactivity
- Add task completion without reload
- Add live task filtering
- Add quick-add forms
- Add auto-refresh sections
Real-time Chat
- Implement SSE for chat
- Add real-time agent responses
- Add streaming message updates
Authentication
- Add basic authentication (password or API key)
- Protect web interface
Kubernetes Updates
- Add Service for web interface
- Add Ingress (optional)
- Configure internal DNS
Phase 5: Advanced Intelligence (Week 5-6)
Calendar Tools
- Implement parse_calendar()
- Implement add_event()
- Implement get_events(date_range)
- Implement get_todays_events()
Project & Goal Tools
- Implement get_active_projects()
- Implement get_quarterly_goals()
- Implement get_telos()
- Implement analyze_project_progress(project)
- Implement analyze_goal_progress(goal)
Intelligent Suggestions
- Implement suggest_tasks(context, time_available, energy_level)
- Filter by context
- Consider time of day
- Prioritize goal-aligned work
- Add suggestions to morning briefing
Goal Alignment
- Show project → goal → mission mappings
- Highlight projects not progressing
- Suggest tasks that move goals forward
- Generate weekly goal progress report
Working Memory Integration
- Auto-update working-memory.txt after significant actions
- Include working memory in agent context
- Show recent activities in dashboard
Weekly Review Assistant
- Follow skills/weekly-review.md guide
- Create interactive walkthrough via Discord
- Add automatic archival suggestions
- Add project progress analysis
- Add goal alignment check
Phase 6: Polish & Optimization (Week 6-7)
Performance
- Cache frequently accessed files (telos, goals)
- Optimize parser performance
- Reduce LLM API calls where possible
- Add request/response caching
Error Handling
- Graceful degradation if LiteLLM unavailable
- Better error messages for users
- Automatic retry logic for transient failures
- Rollback on git commit failures
Monitoring & Logging
- Add structured logging (JSON format)
- Log agent actions (file writes, git commits)
- Track API usage and costs
- Optional: Add Prometheus metrics
Discord UX Improvements
- Better formatting and layout
- Interactive buttons for confirmations
- Typing indicators while agent thinks
- Help command with examples
Web UI Improvements
- Loading states for HTMX requests
- Error notifications
- Keyboard shortcuts
- Accessibility improvements
Configuration
- Add user preferences (briefing time, reminder settings)
- Configurable contexts
- Custom scheduling
- Store in SQLite database
Testing & QA
- Integration tests for key workflows
- Test with real myorg data
- Performance testing under load
- Security audit (file access, git operations)
Documentation
- User guide (how to use bot and web UI)
- Deployment guide (k8s setup)
- Development guide (how to add tools)
- Troubleshooting guide
- README.md
Current Focus
Phase: Phase 4 Complete! Full-featured assistant with web UI
Status: Phases 0, 1, 2, 3, and 4 completed successfully (83% complete!)
Next Task: Deploy full system or continue with Phase 5 (Advanced Intelligence) and 6 (Polish)