FlowMaster Frontend Skill
⛔ CRITICAL UI DESIGN RULES — READ BEFORE WRITING ANY CODE
These are absolute constraints. No exceptions without explicit user request.
| Rule |
Enforcement |
| NO dashboards |
Do not build KPI card grids, metric panels, or summary widget layouts |
| NO meaningless colors |
Only use semantic tokens: success=green, warning=amber, danger=red, brand=primary. No decorative palette (no purple, teal, indigo, etc.) |
| NO theme deviation |
Use theme CSS variables only. No hardcoded hex, no ad-hoc Tailwind color classes that aren't in the token system |
| NO icons unless requested |
Do not add icons. If not explicitly asked for, use text. Existing icons may stay |
v3 Design Token Reference (Blue theme — default)
--brand: #0F3460 → primary actions, active nav
--success: #10b981 → pass, active, healthy
--warning: #f59e0b → warn, pending, degraded
--danger: #dc2626 → fail, error, critical
--text: #0f172a → primary text
--text-secondary: #475569
--text-muted: #94a3b8
--border: #cbd5e1
--bg-subtle: #f1f5f9
--sidebar-bg: #f0f4f8
v3 Spacing & Scale Reference
font-size: 12px base, line-height: 1.4
--topbar-h: 34px --sidebar-w: 210px
Toolbar buttons: h-22px, icons 13×13
Nav items: 11px text, 14×14 icons, 4px 8px 4px 14px padding
No box-shadow (except nodes/dropdowns)
Border-radius: 2-5px max
Overview
FlowMaster frontend comprises three independent applications serving different user roles in a process automation platform:
- Frontend Admin - Admin dashboard for process/service management
- Engage App - Employee-facing task execution interface with AI assistance
- DXG Frontend - Development/testing UI for DXG (Data eXperience Generator)
Plus two supporting tools: SDX Frontend (data mapping) and planned Manager App (escalation handling).
1. Frontend Admin (flowmaster-frontend-nextjs)
Stack & Architecture
- Framework: Next.js 14+ (React/TypeScript) with 236 TS/TSX files
- UI Library: Radix UI components (shadcn/ui), TailwindCSS for styling
- Forms: React Hook Form + Zod validation for type-safe inputs
- Architecture: Feature-based organization (process design, execution, task management)
Core Components
- Admin Dashboard: Overview of system health, active processes, user activity
- Process Management UI:
- Process Explorer: Browse and view all defined processes
- Process Designer: Visual workflow builder with drag-drop support
- Process configuration and version control
- User Management: Create, edit, remove users and manage roles
- Service Monitoring: View status and metrics for backend services
- Authentication Flow Integration: Handle login, session management, token refresh
API Connections
- API Gateway: REST endpoints at port 9000 for process/service data
- WebSocket Gateway: Real-time updates for process execution status and system events
Known Gaps (per baseline)
- R08: Field mapping confirmation UI (SDX integration)
- R17: Affiliated Organizations management
- D12: Process Designer integration completeness
2. Engage App (flowmaster-engage)
Stack & Architecture
- Framework: Next.js 16 (React 19/TypeScript) with 242 TS/TSX files
- Purpose: Employee-facing app for executing workflow process steps with AI-powered task intelligence
- Design Pattern: Progressive disclosure - show only what's needed at each step
Key Routes & Screens
/tasks - Task Queue Dashboard
- Displays all assigned tasks in filterable table
- Filters: Status, Priority, Due Date
- Status badges: Not Started, In Progress, Pending Review, Completed
- Quick navigation to individual task detail pages
/tasks/[id] - Task Detail & Execution
Left Panel (Task Briefing):
ContextBriefingPanel: AI-generated case summary with key facts
SmartReviewForm: DXG-generated pre-filled HTML form for task data input
- Auto-filled with AI suggestions (shows confidence levels)
- Employee can modify/override values
- Field-level provenance (shows where data came from)
Right Sidebar:
InteractiveQueryChat: Ask AI questions about task context
- Example: "What was the customer's previous order?"
- "When is the deadline for escalation?"
Footer Actions:
- Save Draft (persist partial completion)
- Approve & Submit (advance process to next step)
- Reject (return to sender with reason)
/dashboard - Overview Dashboard
- Cards showing task metrics (open, pending review, completed today)
- Recent activity stream
- Quick stats on process adherence
/history - Task History
- Completed tasks with execution timeline
- View submitted forms and approval chain
- Audit trail of changes
/agents - AI Agent Management
- View active AI agents assisting with task execution
- Agent performance metrics
- Configure AI behavior preferences
DXG Integration (Next.js API Proxy)
Engage proxies requests to DXG backend via /api/dxg/* endpoints:
GET /api/dxg/analyze/{taskId}
→ DXG unified analysis: domain context, case summary, key metrics, risk flags
GET /api/dxg/smart-form/{taskId}
→ DXG form generation: pre-filled HTML form based on task data + LLM
POST /api/dxg/query/{taskId}
→ DXG interactive Q&A: employee asks questions, AI responds with context-aware answers
Task Execution Flow
- Employee opens
/tasks → fetch assigned tasks from Human Task Service (REST)
- Click task card → navigate to
/tasks/{id}
- Parallel DXG calls:
analyzeTask() + getSmartForm()
- Display briefing panel + smart form + enable chat sidebar
- Employee reviews pre-filled form and modifies as needed
- Click "Approve & Submit" →
POST /api/tasks/{taskId}/complete
- Execution Engine advances process to next step
Design Patterns
- Pre-filled Forms: AI suggests values, employee confirms/overrides
- Contextual Briefing: Show relevant case info before form
- Inline Help: Chat sidebar for Q&A without leaving task
- Data Provenance: Display where each form value came from
- Draft Saving: Allow incomplete submissions for later resumption
Known Gaps (per baseline)
- R25: Full case data loading completeness
- R26: Complete AI Q&A functionality
- R27: Preemptive contextual info (showing task context without asking)
- R28-R29: Design-time analytics (track form accuracy, task completion times)
3. DXG Frontend (dxg)
Stack & Architecture
- Framework: React + Vite + TypeScript (development/testing UI)
- Purpose: NOT end-user facing; used by developers/designers to build and test DXG experiences
Panels & Layout
- Left Panel: Prompt editor, configuration settings, saved designs library
- Center Panel: Real-time HTML preview of generated UI
- Right Panel: Data structure inspector, LLM API traffic viewer, error logs
- UIRenderer Component: Sandboxed HTML preview with style isolation
Workflow
- Developer writes natural language prompt: "Create a customer complaint form with escalation path"
- Click "Generate" → calls DXG backend
/api/v1/generate
- Backend returns HTML + metadata
- Vite preview renders HTML with sandboxing
- Developer inspects generated form structure, field types, validation rules
- Refine prompt → iterate until satisfied
- Export/save design → used by Engage app
Backend Endpoints (consumed by both DXG Frontend & Engage)
POST /api/v1/generate
Input: { prompt, context, rules }
Output: { html, fields, metadata, validationRules }
GET /api/v1/analyze/{task_id}
Output: { domain, caseSummary, keyMetrics, riskFlags }
GET /api/v1/smart-form/{task_id}
Output: { html, fieldValues, confidence, provenance }
POST /api/v1/query/{task_id}
Input: { question }
Output: { answer, sources, confidence }
GET /api/v1/briefing/{task_id}
Output: { summary, timeline, activeAlerts }
4. SDX Frontend (sdx-frontend)
Stack & Architecture
- Framework: React
- Purpose: Data source registration and semantic field mapping UI
Screens
- Data source explorer
- Field mapping workflow (map source fields to domain entities)
- Semantic type assignment (mark fields as Customer ID, Order Date, etc.)
- Visual data lineage diagrams
Integration Gap (R08)
- Needs to integrate into Process Designer field mapping workflow
- Currently standalone; should be embedded in process design step
5. Manager App (PLANNED - R30-R33)
Stack & Architecture
- Framework: React (mobile-optimized; can share codebase with Engage)
- Purpose: Manager-only interface for escalation handling ONLY
- NOT for case approval (that's Engage employees)
- ONLY for agent blockage resolution and guidance
Planned Screens
- Escalation queue (tasks escalated by AI agents)
- Blockage resolution (provide context to help agent proceed)
- Guidance provision (share internal policies, precedents)
- Escalation metrics dashboard
Integration Architecture
┌─────────────────────────────────────────────────┐
│ Frontend Admin (Next.js) │
│ - Process Designer, User Management, Monitoring │
└──────────────┬──────────────────────────────────┘
│ REST
▼
┌──────────────┐
│ API Gateway │ (:9000)
└──────────────┘
│
┌──────────┼──────────┐
│ │ │
▼ ▼ ▼
[Services] [Auth] [WebSocket]
┌──────────────────────────────────┐
│ Engage App (Next.js 16) │
│ - Task queue, execution, AI help │
└────────────┬─────────────────────┘
│ Next.js API Routes
▼
┌────────────┐
│ DXG Service│ (:8005)
│ + Human │
│ Task Srv │
└────────────┘
┌──────────────────────────────────┐
│ DXG Frontend (React + Vite) │
│ - UI design, testing, iteration │
└────────────┬─────────────────────┘
│ REST
▼
┌────────────┐
│ DXG Backend│ (:8005)
│ (FastAPI) │
└────────────┘
┌──────────────────────────────────┐
│ SDX Frontend (React) │
│ - Data mapping, field lineage │
└────────────┬─────────────────────┘
│ REST
▼
┌────────────┐
│ SDX API │
└────────────┘
Design System & Patterns
Form Interaction Patterns
- Progressive Disclosure: Show complex fields only when relevant
- Validation Feedback: Real-time field validation with clear error messages
- Auto-fill with Override: AI suggests, human confirms/changes
- Field Provenance: Display source of pre-filled values (e.g., "From customer CRM", "AI prediction 87%")
Navigation Patterns
- Breadcrumb Trail: Show path in process (e.g., Task > Approval > Handoff)
- Sidebar Menu: Quick access to main app sections
- Tab Navigation: Organize related content (Details, History, Related Tasks)
Data Display
- Color-Coded Status: Pending (yellow), Active (blue), Completed (green), Blocked (red)
- User Avatars: Show assignee/reviewer with hover card details
- Timeline Views: Show task progression and handoff points
- Empty States: Helpful message and CTA when no tasks/data
Real-time Features
- WebSocket updates for task status changes
- Live notifications for new task assignments
- Collaborative awareness (see who's viewing same task)
When to Use This Skill
Use this skill when you need to:
- Build or modify employee task execution interfaces (Engage App)
- Design AI-assisted form pre-filling experiences (DXG integration)
- Develop admin dashboards for process monitoring and management
- Implement real-time task queue updates via WebSocket
- Create data mapping workflows for semantic field configuration (SDX)
- Debug DXG HTML generation or form pre-fill issues
- Extend task execution with new AI analysis features
- Build manager escalation handling interfaces
- Implement progressive disclosure and contextual UI patterns
- Design mobile-friendly employee task interfaces
1---2name: flowmaster-frontend3description: FlowMaster frontend components and UI patterns for process automation4---56# FlowMaster Frontend Skill78---910## ⛔ CRITICAL UI DESIGN RULES — READ BEFORE WRITING ANY CODE1112These are absolute constraints. No exceptions without explicit user request.1314| Rule | Enforcement |15|---|---|16| **NO dashboards** | Do not build KPI card grids, metric panels, or summary widget layouts |17| **NO meaningless colors** | Only use semantic tokens: success=green, warning=amber, danger=red, brand=primary. No decorative palette (no purple, teal, indigo, etc.) |18| **NO theme deviation** | Use theme CSS variables only. No hardcoded hex, no ad-hoc Tailwind color classes that aren't in the token system |19| **NO icons unless requested** | Do not add icons. If not explicitly asked for, use text. Existing icons may stay |2021### v3 Design Token Reference (Blue theme — default)22```23--brand: #0F3460 → primary actions, active nav24--success: #10b981 → pass, active, healthy25--warning: #f59e0b → warn, pending, degraded26--danger: #dc2626 → fail, error, critical27--text: #0f172a → primary text28--text-secondary: #47556929--text-muted: #94a3b830--border: #cbd5e131--bg-subtle: #f1f5f932--sidebar-bg: #f0f4f833```3435### v3 Spacing & Scale Reference36```37font-size: 12px base, line-height: 1.438--topbar-h: 34px --sidebar-w: 210px39Toolbar buttons: h-22px, icons 13×1340Nav items: 11px text, 14×14 icons, 4px 8px 4px 14px padding41No box-shadow (except nodes/dropdowns)42Border-radius: 2-5px max43```4445---4647## Overview48FlowMaster frontend comprises three independent applications serving different user roles in a process automation platform:491. **Frontend Admin** - Admin dashboard for process/service management502. **Engage App** - Employee-facing task execution interface with AI assistance513. **DXG Frontend** - Development/testing UI for DXG (Data eXperience Generator)5253Plus two supporting tools: SDX Frontend (data mapping) and planned Manager App (escalation handling).5455## 1. Frontend Admin (flowmaster-frontend-nextjs)5657### Stack & Architecture58- **Framework**: Next.js 14+ (React/TypeScript) with 236 TS/TSX files59- **UI Library**: Radix UI components (shadcn/ui), TailwindCSS for styling60- **Forms**: React Hook Form + Zod validation for type-safe inputs61- **Architecture**: Feature-based organization (process design, execution, task management)6263### Core Components64- **Admin Dashboard**: Overview of system health, active processes, user activity65- **Process Management UI**:66 - Process Explorer: Browse and view all defined processes67 - Process Designer: Visual workflow builder with drag-drop support68 - Process configuration and version control69- **User Management**: Create, edit, remove users and manage roles70- **Service Monitoring**: View status and metrics for backend services71- **Authentication Flow Integration**: Handle login, session management, token refresh7273### API Connections74- **API Gateway**: REST endpoints at port 9000 for process/service data75- **WebSocket Gateway**: Real-time updates for process execution status and system events7677### Known Gaps (per baseline)78- R08: Field mapping confirmation UI (SDX integration)79- R17: Affiliated Organizations management80- D12: Process Designer integration completeness8182---8384## 2. Engage App (flowmaster-engage)8586### Stack & Architecture87- **Framework**: Next.js 16 (React 19/TypeScript) with 242 TS/TSX files88- **Purpose**: Employee-facing app for executing workflow process steps with AI-powered task intelligence89- **Design Pattern**: Progressive disclosure - show only what's needed at each step9091### Key Routes & Screens9293#### `/tasks` - Task Queue Dashboard94- Displays all assigned tasks in filterable table95- Filters: Status, Priority, Due Date96- Status badges: Not Started, In Progress, Pending Review, Completed97- Quick navigation to individual task detail pages9899#### `/tasks/[id]` - Task Detail & Execution100**Left Panel (Task Briefing)**:101- `ContextBriefingPanel`: AI-generated case summary with key facts102- `SmartReviewForm`: DXG-generated pre-filled HTML form for task data input103 - Auto-filled with AI suggestions (shows confidence levels)104 - Employee can modify/override values105 - Field-level provenance (shows where data came from)106107**Right Sidebar**:108- `InteractiveQueryChat`: Ask AI questions about task context109 - Example: "What was the customer's previous order?"110 - "When is the deadline for escalation?"111112**Footer Actions**:113- Save Draft (persist partial completion)114- Approve & Submit (advance process to next step)115- Reject (return to sender with reason)116117#### `/dashboard` - Overview Dashboard118- Cards showing task metrics (open, pending review, completed today)119- Recent activity stream120- Quick stats on process adherence121122#### `/history` - Task History123- Completed tasks with execution timeline124- View submitted forms and approval chain125- Audit trail of changes126127#### `/agents` - AI Agent Management128- View active AI agents assisting with task execution129- Agent performance metrics130- Configure AI behavior preferences131132### DXG Integration (Next.js API Proxy)133Engage proxies requests to DXG backend via `/api/dxg/*` endpoints:134135```136GET /api/dxg/analyze/{taskId}137 → DXG unified analysis: domain context, case summary, key metrics, risk flags138139GET /api/dxg/smart-form/{taskId}140 → DXG form generation: pre-filled HTML form based on task data + LLM141142POST /api/dxg/query/{taskId}143 → DXG interactive Q&A: employee asks questions, AI responds with context-aware answers144```145146### Task Execution Flow1471. Employee opens `/tasks` → fetch assigned tasks from Human Task Service (REST)1482. Click task card → navigate to `/tasks/{id}`1493. Parallel DXG calls: `analyzeTask()` + `getSmartForm()`1504. Display briefing panel + smart form + enable chat sidebar1515. Employee reviews pre-filled form and modifies as needed1526. Click "Approve & Submit" → `POST /api/tasks/{taskId}/complete`1537. Execution Engine advances process to next step154155### Design Patterns156- **Pre-filled Forms**: AI suggests values, employee confirms/overrides157- **Contextual Briefing**: Show relevant case info before form158- **Inline Help**: Chat sidebar for Q&A without leaving task159- **Data Provenance**: Display where each form value came from160- **Draft Saving**: Allow incomplete submissions for later resumption161162### Known Gaps (per baseline)163- R25: Full case data loading completeness164- R26: Complete AI Q&A functionality165- R27: Preemptive contextual info (showing task context without asking)166- R28-R29: Design-time analytics (track form accuracy, task completion times)167168---169170## 3. DXG Frontend (dxg)171172### Stack & Architecture173- **Framework**: React + Vite + TypeScript (development/testing UI)174- **Purpose**: NOT end-user facing; used by developers/designers to build and test DXG experiences175176### Panels & Layout177- **Left Panel**: Prompt editor, configuration settings, saved designs library178- **Center Panel**: Real-time HTML preview of generated UI179- **Right Panel**: Data structure inspector, LLM API traffic viewer, error logs180- **UIRenderer Component**: Sandboxed HTML preview with style isolation181182### Workflow1831. Developer writes natural language prompt: "Create a customer complaint form with escalation path"1842. Click "Generate" → calls DXG backend `/api/v1/generate`1853. Backend returns HTML + metadata1864. Vite preview renders HTML with sandboxing1875. Developer inspects generated form structure, field types, validation rules1886. Refine prompt → iterate until satisfied1897. Export/save design → used by Engage app190191### Backend Endpoints (consumed by both DXG Frontend & Engage)192```193POST /api/v1/generate194 Input: { prompt, context, rules }195 Output: { html, fields, metadata, validationRules }196197GET /api/v1/analyze/{task_id}198 Output: { domain, caseSummary, keyMetrics, riskFlags }199200GET /api/v1/smart-form/{task_id}201 Output: { html, fieldValues, confidence, provenance }202203POST /api/v1/query/{task_id}204 Input: { question }205 Output: { answer, sources, confidence }206207GET /api/v1/briefing/{task_id}208 Output: { summary, timeline, activeAlerts }209```210211---212213## 4. SDX Frontend (sdx-frontend)214215### Stack & Architecture216- **Framework**: React217- **Purpose**: Data source registration and semantic field mapping UI218219### Screens220- Data source explorer221- Field mapping workflow (map source fields to domain entities)222- Semantic type assignment (mark fields as Customer ID, Order Date, etc.)223- Visual data lineage diagrams224225### Integration Gap (R08)226- Needs to integrate into Process Designer field mapping workflow227- Currently standalone; should be embedded in process design step228229---230231## 5. Manager App (PLANNED - R30-R33)232233### Stack & Architecture234- **Framework**: React (mobile-optimized; can share codebase with Engage)235- **Purpose**: Manager-only interface for escalation handling ONLY236 - NOT for case approval (that's Engage employees)237 - ONLY for agent blockage resolution and guidance238239### Planned Screens240- Escalation queue (tasks escalated by AI agents)241- Blockage resolution (provide context to help agent proceed)242- Guidance provision (share internal policies, precedents)243- Escalation metrics dashboard244245---246247## Integration Architecture248249```250┌─────────────────────────────────────────────────┐251│ Frontend Admin (Next.js) │252│ - Process Designer, User Management, Monitoring │253└──────────────┬──────────────────────────────────┘254 │ REST255 ▼256 ┌──────────────┐257 │ API Gateway │ (:9000)258 └──────────────┘259 │260 ┌──────────┼──────────┐261 │ │ │262 ▼ ▼ ▼263[Services] [Auth] [WebSocket]264265┌──────────────────────────────────┐266│ Engage App (Next.js 16) │267│ - Task queue, execution, AI help │268└────────────┬─────────────────────┘269 │ Next.js API Routes270 ▼271 ┌────────────┐272 │ DXG Service│ (:8005)273 │ + Human │274 │ Task Srv │275 └────────────┘276277┌──────────────────────────────────┐278│ DXG Frontend (React + Vite) │279│ - UI design, testing, iteration │280└────────────┬─────────────────────┘281 │ REST282 ▼283 ┌────────────┐284 │ DXG Backend│ (:8005)285 │ (FastAPI) │286 └────────────┘287288┌──────────────────────────────────┐289│ SDX Frontend (React) │290│ - Data mapping, field lineage │291└────────────┬─────────────────────┘292 │ REST293 ▼294 ┌────────────┐295 │ SDX API │296 └────────────┘297```298299---300301## Design System & Patterns302303### Form Interaction Patterns304- **Progressive Disclosure**: Show complex fields only when relevant305- **Validation Feedback**: Real-time field validation with clear error messages306- **Auto-fill with Override**: AI suggests, human confirms/changes307- **Field Provenance**: Display source of pre-filled values (e.g., "From customer CRM", "AI prediction 87%")308309### Navigation Patterns310- **Breadcrumb Trail**: Show path in process (e.g., Task > Approval > Handoff)311- **Sidebar Menu**: Quick access to main app sections312- **Tab Navigation**: Organize related content (Details, History, Related Tasks)313314### Data Display315- **Color-Coded Status**: Pending (yellow), Active (blue), Completed (green), Blocked (red)316- **User Avatars**: Show assignee/reviewer with hover card details317- **Timeline Views**: Show task progression and handoff points318- **Empty States**: Helpful message and CTA when no tasks/data319320### Real-time Features321- WebSocket updates for task status changes322- Live notifications for new task assignments323- Collaborative awareness (see who's viewing same task)324325---326327## When to Use This Skill328329Use this skill when you need to:330- Build or modify employee task execution interfaces (Engage App)331- Design AI-assisted form pre-filling experiences (DXG integration)332- Develop admin dashboards for process monitoring and management333- Implement real-time task queue updates via WebSocket334- Create data mapping workflows for semantic field configuration (SDX)335- Debug DXG HTML generation or form pre-fill issues336- Extend task execution with new AI analysis features337- Build manager escalation handling interfaces338- Implement progressive disclosure and contextual UI patterns339- Design mobile-friendly employee task interfaces