# Development Roadmap

> **Last Updated:** March 1, 2026
> **Product:** ResolutionFlow (repo: patherly)
> **Target Market:** MSP companies — IT service providers managing infrastructure and support for multiple clients

---

## Completed Work

### 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

### 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

### 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

### 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.

---

## In Progress

| 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: Intelligence & Polish

**Goal:** Make ResolutionFlow smarter — surface insights from usage data and make the day-to-day experience faster.

### 3A: Quick Wins & UX (Priority: Medium)

| 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 |

### 3B: Analytics & Intelligence (Priority: Medium)

| 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 |

### 3C: Content Management (Priority: Medium)

| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| Tree Templates + Import/Export | #66 | Starter templates, JSON/YAML export, community sharing foundation |

### 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: Integrations & Automation

**Goal:** Connect ResolutionFlow to the MSP tools teams already use.

### 4A: PSA Integration (Priority: HIGH)

| Feature | GitHub Issue | Description |
|---------|-------------|-------------|
| ConnectWise / Autotask Integration | #63 | Create tickets from sessions, sync ticket numbers, update notes, pull client context |

This is the highest-priority strategic feature. It turns ResolutionFlow from a standalone tool into part of the MSP workflow.

### 4B: Intelligence Layer (Priority: Strategic)

| 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 |

### 4C: Automation
- PowerShell script execution framework with security sandbox
- Script library management
- Automation toggle at action nodes

### 4D: Enterprise
- SSO integration (SAML/OAuth)
- Advanced RBAC and approval workflows
- White-label configuration

---

## Phase 5: Collaboration & Advanced AI

**Goal:** Team-oriented features and deeper AI integration.

### 5A: Team Features

| 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 |

### 5B: Advanced AI

| 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

- Self-learning flows (improve automatically based on usage patterns)
- Vertical-specific flow libraries (healthcare IT, financial services, education)
- Advanced compliance (SOC 2, ISO 27001)
- Voice-guided troubleshooting

---

## Open GitHub Issues Summary

| # | 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 |
