docs: rewrite roadmap to reflect current state, add post-work checklist to CLAUDE.md

Rewrote 03-DEVELOPMENT-ROADMAP.md — replaced outdated week-by-week format with
phase-based structure reflecting actual project state. Integrated all 13 open
GitHub issues into appropriate phases. Added "After Completing Work" checklist
to CLAUDE.md coding standards and roadmap/issues to quick reference table.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-01 00:30:13 -05:00
parent dfa05a9b25
commit 459792019a
2 changed files with 124 additions and 473 deletions

View File

@@ -1,525 +1,167 @@
# Development Roadmap
## Phase 1: MVP (Weeks 1-3)
**Goal:** Get Michael using this on real tickets ASAP
### Week 1: Foundation
**Backend:**
- [x] Project setup (Python FastAPI, project structure)
- [x] Database schema design and creation (PostgreSQL)
- [x] User authentication (register, login, JWT tokens)
- [x] Basic CRUD API for trees
- [x] Session tracking API
**Frontend:**
- [x] Project setup (React + Vite, Tailwind CSS)
- [x] Authentication UI (login, register)
- [x] Basic layout and navigation
- [x] Tree selection/browsing interface
**DevOps:**
- [x] Docker setup for local development
- [x] Database migrations (Alembic)
- [x] Environment configuration
### Week 2: Core Functionality
**Backend:**
- [x] Session decision tracking
- [x] Export API (plain text, markdown, HTML)
- [ ] File upload API (basic) - *Deferred to Phase 3*
- [x] Tree retrieval optimizations
**Frontend:**
- [x] Tree navigation interface
- [x] Display questions/decisions
- [x] Yes/No buttons
- [x] Multiple choice options
- [x] Notes input at each step
- [x] Back button (undo decision)
- [x] Progress indicator (breadcrumb)
- [x] Session management
- [x] Start new session
- [x] Save progress
- [x] Complete session
- [x] Export functionality
- [ ] Preview export - *Not yet implemented*
- [ ] Copy to clipboard - *Not yet implemented*
- [x] Download as file
**Content:**
- [x] Create 7 comprehensive decision trees via `backend/scripts/seed_trees.py`:
**Tier 1 - Help Desk:**
1. [x] Password Reset/Account Lockout (20+ nodes)
2. [x] Outlook/Email Problems (15+ nodes)
3. [x] VPN Connection Failures (15+ nodes)
4. [x] Printer Problems (15+ nodes)
**Tier 2 - Desktop Support:**
5. [x] Slow Computer Troubleshooting (15+ nodes)
6. [x] Network Connectivity Issues (15+ nodes)
**Tier 3 - Systems:**
7. [x] File Share Access Problems (20+ nodes)
### Week 3: Polish & Testing
**Backend:**
- [x] Error handling improvements
- [x] API documentation (automatic via FastAPI)
- [x] Performance optimization
**Frontend:**
- [x] UI/UX refinements - Markdown rendering, micro-interactions, design polish
- [x] Responsive design (desktop + mobile)
- [x] Loading states
- [x] Error handling and user feedback (ErrorBoundary)
- [x] Markdown rendering in session player and node editor
- [ ] Keyboard shortcuts - *Not yet implemented*
- [x] User preferences - **COMPLETE**
- [x] Theme toggle (dark/light/system)
- [x] Persist preferences in localStorage
- [x] Settings page accessible from user menu at `/settings`
- [x] Default export format preference
**Testing:**
- [x] Michael tests on 5-10 real tickets
- [x] Bug fixes based on feedback
- [x] Documentation updates
**Deployment:**
- [x] Deploy to Railway - **PRODUCTION LIVE**
- [x] Setup production database
- [x] Configure environment variables
- [x] SSL/HTTPS setup
- [x] Custom domain (resolutionflow.com / api.resolutionflow.com)
- [x] PR environments for testing
### MVP Success Criteria
- [x] Michael can log in
- [x] Michael can navigate through a decision tree
- [x] Michael can add notes at each step
- [x] Michael can export clean, formatted notes
- [x] Notes make sense and show work performed
- [x] System is stable and responsive
- [ ] Michael actually uses it for real tickets - *Testing in progress*
> **Last Updated:** March 1, 2026
> **Product:** ResolutionFlow (repo: patherly)
> **Target Market:** MSP companies — IT service providers managing infrastructure and support for multiple clients
---
## Phase 2: Team-Ready (Weeks 4-6)
## Completed Work
### Week 4: Team Features
**Backend:**
- [x] Team model and API
- [x] Role-based access control (super_admin, team_admin, engineer, viewer)
- [x] Tree authorship controls (who can edit)
- [x] Multi-user session tracking
### Phase 1: MVP
- FastAPI backend with 25+ API endpoints, PostgreSQL, Docker, Alembic migrations
- JWT auth with refresh token rotation, invite codes, password complexity
- Trees CRUD, sessions, export (Markdown/Text/HTML), full-text search
- React 19 + Vite + TypeScript + Tailwind frontend
- Tree navigation (session player), session history, export download
- Production deployment on Railway (resolutionflow.com)
- 7 seed decision trees, 100+ integration tests
**Frontend:**
- [x] Team management UI
- [x] User role display
- [x] Tree editor permissions (permission-based guards)
- [x] User profile/settings page
### Phase 2: Team-Ready
- RBAC (super_admin, team_admin, engineer, viewer) with `usePermissions` hook
- Tree Editor — form-based with visual canvas preview, Zustand + immer + zundo (undo/redo)
- Tree organization — categories, tags (autocomplete), user folders (3-level hierarchy)
- Admin panel — 8 pages (users, invite codes, audit logs, plan limits, feature flags, settings, categories)
- Session enhancements — timer, keyboard hints, repeat last, auto-recovery, scratchpad (Ctrl+/)
- Session outcomes with step timing tracking
- Mobile-responsive design
- Security hardening (Phases A-D) — rate limiting, audit logs, soft delete, SQL escaping
**Content:**
- [ ] Add 5-10 more decision trees based on Michael's feedback
- [ ] Refine existing trees based on usage data
### Phase 2.5: Step Library & Procedural Flows (Partially Complete)
- **Step Library backend** — CRUD, search, ratings, reviews, visibility filtering, verified-use badge
- **Procedural flows** — `procedural` tree type, step-by-step execution engine, intake forms, section headers, resume support, type-aware routing
- **Maintenance flows** — `maintenance` tree type, batch session launch, saved target lists, APScheduler cron scheduling, maintenance detail page
- **Session sharing** — ShareSessionModal, SharedSessionPage, MySharesPage, share links with copy/manage
- **Export improvements** (Phases A-C) — step cutoff, summary block, detail levels, editable preview, sensitive data redaction
- **Rebrand** — Patherly → ResolutionFlow branding, dark-first purple gradient design system
### Week 5: Tree Management
**Backend:**
- [x] Tree categories and tagging
- [x] Tree search API (full-text)
- [ ] Tree usage statistics
- [x] Session history API
**Frontend:**
- [x] Tree editor UI
- [ ] Visual tree builder (drag-and-drop nodes) - *Form-based implemented instead*
- [x] Add/edit/delete nodes
- [x] Set question types (yes/no, multiple choice, action)
- [x] Add help text and documentation links
- [x] Markdown preview in description fields
- [x] Save and publish
- [x] Tree library/browser
- [x] Category filters
- [x] Search functionality (full-text)
- [x] Sort by usage, date, name
- [x] Tag filters with autocomplete
- [x] Folder organization (hierarchy support)
- [x] Session history viewer
- [x] List past sessions
- [x] View session details
- [x] Re-export past sessions
### Week 6: Mobile & Polish
**Frontend:**
- [x] Mobile-responsive design
- [x] Touch-friendly buttons
- [x] Optimized layouts for small screens
- [x] Responsive navigation and forms
- [ ] Custom branches during navigation - *In Progress*
- [ ] "Add custom step" button
- [ ] Quick branch creation
- [ ] Custom branches saved to session (not tree)
- [x] UI improvements based on feedback
- [x] Micro-interactions and transitions
- [x] Global thin scrollbar styling
- [x] Design consistency and polish
**Testing:**
- [ ] Onboard 2-3 team members
- [ ] Gather feedback
- [ ] Bug fixes and refinements
### Phase 2 Success Criteria
- [x] Tree editor is functional and intuitive
- [x] Mobile interface is usable
- [x] RBAC and permissions implemented
- [x] Tree organization (categories, tags, folders)
- [ ] 3-5 engineers actively using the tool - *Pending user testing*
- [ ] Custom branches work smoothly - *In Progress*
- [ ] Team reports positive feedback - *Pending user testing*
### Recently Completed (Feb-Mar 2026)
- **AI Flow Assist** — Conversational AI chat builder for generating troubleshooting and procedural flows. Multi-phase interview (scope → structure → details), progressive tree generation with live preview, save to flow library. Backend: Anthropic Claude API with streaming, AI tree validation, scaffold/refine pipeline. Frontend: ChatPanel, StaticTreePreview, ChatToolbar, Zustand store.
- **Cross-Reference / Loop-Back Support** — Ghost references allowing any node to link to any other node in the tree (loop-backs, re-verification patterns). Backend validation relaxed for cross-refs. Frontend: cross-reference edge rendering (dashed purple arrows), node picker dropdowns in action/decision forms, circular reference detection changed to warnings.
---
## Phase 2.5: Personal Branching & Step Library (Weeks 7-8)
**Goal:** Enable personalized troubleshooting workflows without modifying official trees
## In Progress
**Dependencies:** Requires Phase 2 completion (Tree Editor, Session History, User Permissions)
### Week 7: Step Library & Custom Steps
**Backend:**
- [x] Step categories table and seed data (10 global categories)
- [x] Step Library database schema and migrations
- [x] Step CRUD API endpoints at `/api/v1/steps`
- [x] Step search with full-text indexing
- [x] Step rating and review system
- [x] Visibility filtering (private/team/public)
- [x] Session custom steps tracking (JSONB field)
- [x] Step usage logging for "Verified Use" badge
**Frontend:**
- [ ] "+ Add Custom Step" button in tree navigation - *In Progress*
- [ ] Custom step creation modal
- [ ] "Type My Own" tab with step form
- [ ] "Browse Library" tab with search/filter
- [ ] Step library browser component
- [ ] Category filter dropdown
- [ ] Tag filter (popular tags as chips)
- [ ] Minimum rating filter
- [ ] Sort options (recent, popular, rating)
- [ ] Step preview/detail modal with ratings
- [ ] Custom step indicator in session view
- [x] Custom steps in export output (backend support complete)
- [ ] Rate/review modal after using a step
### Week 8: Tree Forking & Personal Trees
**Backend:**
- [ ] User trees database schema and migrations
- [ ] Fork tree API endpoint
- [ ] User trees CRUD endpoints
- [ ] Share token generation for link sharing
- [ ] Public tree access (no auth) endpoint
- [ ] Save session as tree endpoint
- [ ] Fork tracking and lineage
**Frontend:**
- [ ] "My Trees" dashboard page
- [ ] Fork button on tree detail view
- [ ] Save session as tree prompt (post-completion)
- [ ] Tree sharing modal
- [ ] Visibility options (private/link/team/public)
- [ ] Share link generation
- [ ] Copy link functionality
- [ ] Fork notification when original updates
- [ ] Basic diff view for tree changes
**Admin Features:**
- [ ] Category management UI (create, rename, archive)
- [ ] Community step approval queue
- [ ] Admin curated steps management
- [ ] Review moderation (hide abusive reviews)
### Phase 2.5 Success Criteria
- [ ] Users can add custom steps during any session - *Backend ready, UI in progress*
- [x] Custom steps included in session exports
- [x] Step library backend complete with search API
- [ ] Step library frontend UI complete - *In Progress*
- [ ] Users can fork and save personal tree versions - *Backend schema ready*
- [ ] Sharing via link works for non-authenticated users
- [x] Team visibility respects team membership (RBAC complete)
- [x] Ratings API with "Verified Use" tracking complete
- [x] No cross-user data leakage (permissions audit complete)
| Task | Status | Notes |
|------|--------|-------|
| Step Library Frontend UI | In Progress | Backend complete, frontend browse/search/rate UI pending |
| Procedural Flows Lifecycle | In Progress | Resume done, run chooser/reuse pending |
---
## Phase 3: Professional Tool (Weeks 9-14)
## Phase 3: Intelligence & Polish
### Week 9-10: File Attachments
**Backend:**
- [ ] S3-compatible storage setup (MinIO/DigitalOcean Spaces)
- [ ] File upload with validation (type, size)
- [ ] Generate pre-signed URLs
- [ ] Attachment metadata storage
- [ ] Include attachments in exports
**Goal:** Make ResolutionFlow smarter — surface insights from usage data and make the day-to-day experience faster.
**Frontend:**
- [ ] File upload UI at decision nodes
- [ ] Drag-and-drop upload
- [ ] Screenshot paste support (Ctrl+V)
- [ ] File preview (images)
- [ ] Multiple files per node
- [ ] Attachment gallery in session view
- [ ] Download attachments
### 3A: Quick Wins & UX (Priority: Medium)
### Week 11-12: Advanced Features
**Backend:**
- [ ] Offline data sync API
- [ ] Client-specific context storage
- [ ] Advanced export templates
- [ ] Tree analytics API
| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| Quick Actions Dashboard | #70 | Landing page with recent sessions, pinned flows, one-click actions |
| Step Feedback Flag | #58 | "This Step is Wrong" flag during sessions — feeds back to tree authors |
| Quick-Start from Clipboard | #62 | Paste a ticket description, AI suggests the best matching flow |
**Frontend:**
- [ ] Offline capability (Service Workers + IndexedDB)
- [ ] Cache trees locally
- [ ] Queue decisions while offline
- [ ] Auto-sync when online
- [ ] Offline indicator
- [ ] Client context system
- [ ] Save client-specific details (server names, topologies)
- [ ] Auto-populate known values
- [ ] Client selection at session start
- [ ] Export enhancements
- [ ] PDF export
- [ ] Custom export templates
- [ ] Include/exclude attachments
- [ ] Format for specific ticket systems
### 3B: Analytics & Intelligence (Priority: Medium)
### Week 13-14: Analytics & Optimization
**Backend:**
- [ ] Tree usage analytics
- [ ] Common paths analysis
- [ ] Team performance metrics
- [ ] Automation framework foundation
| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| Tree Effectiveness Dashboard | #61 | Usage stats, common paths, avg completion time, success rates per flow |
| Recurring Issue Detection | #60 | Identify repeat problems across sessions — surface patterns to team leads |
**Frontend:**
- [ ] Analytics dashboard
- [ ] Tree usage stats
- [ ] Most common paths
- [ ] Average completion time
- [ ] Success rates
- [ ] "Send to engineer" feature
- [ ] Generate simplified checklist
- [ ] Share via link (read-only)
- [ ] Print-friendly format
- [ ] Performance optimizations
- [ ] Lazy loading
- [ ] Code splitting
- [ ] Image optimization
### 3C: Content Management (Priority: Medium)
**Documentation:**
- [ ] User guide
- [ ] Tree creation best practices
- [ ] Video tutorials (basic)
| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| Tree Templates + Import/Export | #66 | Starter templates, JSON/YAML export, community sharing foundation |
### Phase 3 Success Criteria
- [ ] Attachments work reliably
- [ ] Offline mode functions correctly
- [ ] Exports are professional and comprehensive
- [ ] Analytics provide useful insights
- [ ] Tool feels polished and complete
- [ ] Michael using it for 50%+ of tickets
### 3D: Remaining Infrastructure
- File attachments for sessions (S3-compatible storage, drag-and-drop, screenshot paste)
- Tree forking UI (backend schema exists — migration 022)
- Step Library frontend completion
---
## Phase 4: MSP Platform (Months 4-6)
## Phase 4: Integrations & Automation
### Month 4: API & Integrations
**Backend:**
- [ ] Public API design (versioned)
- [ ] API key management
- [ ] Webhook system
- [ ] Rate limiting
- [ ] API documentation (OpenAPI/Swagger)
**Goal:** Connect ResolutionFlow to the MSP tools teams already use.
**Integrations:**
- [ ] ConnectWise PSA integration (Phase 4a)
- [ ] Create tickets from sessions
- [ ] Sync ticket numbers
- [ ] Update ticket notes
- [ ] Kaseya integration (Phase 4b)
- [ ] LabTech/Automate integration (Phase 4c)
### 4A: PSA Integration (Priority: HIGH)
**Frontend:**
- [ ] API key management UI
- [ ] Webhook configuration UI
- [ ] Integration status dashboard
| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| ConnectWise / Autotask Integration | #63 | Create tickets from sessions, sync ticket numbers, update notes, pull client context |
### Month 5: Automation Integration
**Backend:**
- [ ] PowerShell script execution framework
- [ ] Parameter handling and validation
- [ ] Output capture and logging
- [ ] Security sandbox (execution limits)
- [ ] Script library management
This is the highest-priority strategic feature. It turns ResolutionFlow from a standalone tool into part of the MSP workflow.
**Frontend:**
- [ ] Automation toggle at action nodes
- [ ] Script parameter input
- [ ] Execution progress indicator
- [ ] Output display
- [ ] Error handling UI
### 4B: Intelligence Layer (Priority: Strategic)
**Content:**
- [ ] Create automation scripts for common tasks:
- [ ] Restart Citrix services
- [ ] Clear FSLogix cache
- [ ] Test AD replication
- [ ] VPN tunnel diagnostics
- [ ] Network connectivity tests
| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| Client Intelligence Sidebar | #64 | Per-client context panel — past sessions, known issues, environment details |
| Intelligence Loop / Analytics Engine | #65 | Cross-session pattern analysis, auto-suggest flow improvements, team benchmarking |
### Month 6: Enterprise Features
**Backend:**
- [ ] Tree versioning system
- [ ] Tree approval workflow
- [ ] Advanced RBAC
- [ ] SSO integration (SAML/OAuth)
- [ ] Audit logging
- [ ] White-label configuration
### 4C: Automation
- PowerShell script execution framework with security sandbox
- Script library management
- Automation toggle at action nodes
**Frontend:**
- [ ] Tree version history
- [ ] Approval request UI
- [ ] Advanced permission management
- [ ] White-label theme customization
- [ ] Comprehensive admin panel
**Infrastructure:**
- [ ] Multi-tenancy support
- [ ] Data isolation
- [ ] Scalability improvements
- [ ] Backup and recovery automation
### Phase 4 Success Criteria
- [ ] API is functional and documented
- [ ] At least 1 major PSA integration works
- [ ] Automation executes reliably and safely
- [ ] Enterprise features meet basic needs
- [ ] System scales to 50+ concurrent users
### 4D: Enterprise
- SSO integration (SAML/OAuth)
- Advanced RBAC and approval workflows
- White-label configuration
---
## Phase 5: Growth & Enhancement (Months 7-12)
## Phase 5: Collaboration & Advanced AI
### Marketplace Development
- [ ] Community tree sharing
- [ ] Tree rating and review system
- [ ] Tree submission process
- [ ] Revenue sharing model
- [ ] Quality control process
**Goal:** Team-oriented features and deeper AI integration.
### Advanced Analytics
- [ ] Predictive analytics (suggest next steps)
- [ ] Pattern recognition (common failure modes)
- [ ] Resolution time predictions
- [ ] Team benchmarking
### 5A: Team Features
### AI Integration
- [ ] Natural language tree navigation
- [ ] Auto-suggest tree improvements
- [ ] Intelligent documentation generation
- [ ] Anomaly detection
| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| Team Activity Feed | #71 | Real-time feed of team activity — new sessions, shared flows, completions |
| Push Steps to Active Sessions | #67 | Senior engineers can push guidance to an active session in real-time |
### Mobile Apps
- [ ] React Native app development
- [ ] App store deployment (iOS/Android)
- [ ] Push notifications
- [ ] Offline-first architecture
### 5B: Advanced AI
### Additional Integrations
- [ ] Microsoft 365 integration
- [ ] Slack integration (notifications, commands)
- [ ] Teams integration
- [ ] ServiceNow integration
- [ ] Jira Service Management integration
| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| AI Copilot — In-Session Intelligence | #69 | Real-time AI suggestions during troubleshooting based on context and history |
| Multi-Tree Sessions | #68 | Navigate across multiple flows in a single session, AI-suggested flow transitions |
### 5C: Platform Growth
- Public API with key management and webhooks
- Community tree marketplace
- Mobile apps (React Native)
- Slack / Teams integration
---
## Long-Term Vision (Year 2+)
## Long-Term Vision
### Product Evolution
- Self-learning system (trees improve automatically based on usage)
- Voice-guided troubleshooting (hands-free operation)
- AR/VR support (on-site equipment identification)
- AI co-pilot (real-time suggestions during troubleshooting)
### Market Expansion
- Vertical-specific tree libraries (healthcare IT, financial services, education)
- Certification program for tree authors
- Professional services (custom tree development)
- Training and consultation services
### Platform Maturity
- 99.9% uptime SLA
- Global CDN deployment
- Self-learning flows (improve automatically based on usage patterns)
- Vertical-specific flow libraries (healthcare IT, financial services, education)
- Advanced compliance (SOC 2, ISO 27001)
- Enterprise support tiers
- White-glove onboarding
- Voice-guided troubleshooting
---
## Risk Mitigation
## Open GitHub Issues Summary
### Technical Risks
| Risk | Impact | Likelihood | Mitigation |
|------|--------|------------|------------|
| Database performance issues | High | Medium | Proper indexing, query optimization, monitoring |
| File storage costs | Medium | High | Compression, retention policies, tiered storage |
| Offline sync conflicts | Medium | Medium | Conflict resolution UI, clear sync indicators |
| Automation security | High | Low | Sandboxing, strict validation, audit logging |
### Product Risks
| Risk | Impact | Likelihood | Mitigation |
|------|--------|------------|------------|
| Users don't adopt tool | High | Medium | Focus on ease of use, quick value demonstration |
| Trees become outdated | Medium | High | Usage analytics, update reminders, version control |
| Tree creation is too complex | High | Medium | Simple editor, templates, guided creation wizard |
| Exports don't fit workflows | High | Low | Customizable templates, user feedback loop |
### Business Risks
| Risk | Impact | Likelihood | Mitigation |
|------|--------|------------|------------|
| Competition from established tools | Medium | Medium | Focus on MSP-specific features, tight integrations |
| Hosting costs exceed revenue | High | Low | Efficient architecture, pricing that covers costs |
| Security breach | High | Low | Security best practices, regular audits, insurance |
| Key person dependency (Michael) | Medium | High | Documentation, involve team early, open communication |
---
## Success Metrics by Phase
### Phase 1 (MVP)
- Michael uses tool for 5+ tickets in week 3
- Export quality rated 8/10 or higher
- Zero critical bugs after week 2
### Phase 2 (Team-Ready)
- 3-5 engineers onboarded
- 20+ trees created
- Average 10+ sessions per day
### Phase 3 (Professional Tool)
- 50+ sessions per week
- Offline mode used successfully
- Export time < 30 seconds
- User satisfaction 8/10+
### Phase 4 (MSP Platform)
- At least 1 PSA integration in production
- 5+ automation scripts available
- API used by external developers
- 100+ active users
### Phase 5 (Growth)
- Marketplace launched with 10+ community trees
- Mobile app released
- AI features in beta
- 500+ active users
| # | Title | Priority | Phase |
|---|-------|----------|-------|
| #63 | PSA Integration (ConnectWise / Autotask) | HIGH | 4A |
| #70 | Quick Actions Dashboard | Medium | 3A |
| #66 | Tree Templates + Import/Export | Medium | 3C |
| #62 | Quick-Start from Clipboard | Medium | 3A |
| #61 | Tree Effectiveness Dashboard | Medium | 3B |
| #60 | Recurring Issue Detection | Medium | 3B |
| #58 | Step Feedback Flag | UX | 3A |
| #64 | Client Intelligence Sidebar | Strategic | 4B |
| #65 | Intelligence Loop / Analytics Engine | Strategic | 4B |
| #71 | Team Activity Feed + Collaboration | Low | 5A |
| #69 | AI Copilot — In-Session Intelligence | Low | 5B |
| #68 | Multi-Tree Sessions | Low | 5B |
| #67 | Push Steps to Active Sessions | Low | 5A |