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 automation"4disable-model-invocation: false5---67# FlowMaster Frontend Skill89---1011## ⛔ CRITICAL UI DESIGN RULES — READ BEFORE WRITING ANY CODE1213These are absolute constraints. No exceptions without explicit user request.1415| Rule | Enforcement |16|---|---|17| **NO dashboards** | Do not build KPI card grids, metric panels, or summary widget layouts |18| **NO meaningless colors** | Only use semantic tokens: success=green, warning=amber, danger=red, brand=primary. No decorative palette (no purple, teal, indigo, etc.) |19| **NO theme deviation** | Use theme CSS variables only. No hardcoded hex, no ad-hoc Tailwind color classes that aren't in the token system |20| **NO icons unless requested** | Do not add icons. If not explicitly asked for, use text. Existing icons may stay |2122### v3 Design Token Reference (Blue theme — default)23```24--brand: #0F3460 → primary actions, active nav25--success: #10b981 → pass, active, healthy26--warning: #f59e0b → warn, pending, degraded27--danger: #dc2626 → fail, error, critical28--text: #0f172a → primary text29--text-secondary: #47556930--text-muted: #94a3b831--border: #cbd5e132--bg-subtle: #f1f5f933--sidebar-bg: #f0f4f834```3536### v3 Spacing & Scale Reference37```38font-size: 12px base, line-height: 1.439--topbar-h: 34px --sidebar-w: 210px40Toolbar buttons: h-22px, icons 13×1341Nav items: 11px text, 14×14 icons, 4px 8px 4px 14px padding42No box-shadow (except nodes/dropdowns)43Border-radius: 2-5px max44```4546---4748## Overview49FlowMaster frontend comprises three independent applications serving different user roles in a process automation platform:501. **Frontend Admin** - Admin dashboard for process/service management512. **Engage App** - Employee-facing task execution interface with AI assistance523. **DXG Frontend** - Development/testing UI for DXG (Data eXperience Generator)5354Plus two supporting tools: SDX Frontend (data mapping) and planned Manager App (escalation handling).5556## 1. Frontend Admin (flowmaster-frontend-nextjs)5758### Stack & Architecture59- **Framework**: Next.js 14+ (React/TypeScript) with 236 TS/TSX files60- **UI Library**: Radix UI components (shadcn/ui), TailwindCSS for styling61- **Forms**: React Hook Form + Zod validation for type-safe inputs62- **Architecture**: Feature-based organization (process design, execution, task management)6364### Core Components65- **Admin Dashboard**: Overview of system health, active processes, user activity66- **Process Management UI**:67 - Process Explorer: Browse and view all defined processes68 - Process Designer: Visual workflow builder with drag-drop support69 - Process configuration and version control70- **User Management**: Create, edit, remove users and manage roles71- **Service Monitoring**: View status and metrics for backend services72- **Authentication Flow Integration**: Handle login, session management, token refresh7374### API Connections75- **API Gateway**: REST endpoints at port 9000 for process/service data76- **WebSocket Gateway**: Real-time updates for process execution status and system events7778### Known Gaps (per baseline)79- R08: Field mapping confirmation UI (SDX integration)80- R17: Affiliated Organizations management81- D12: Process Designer integration completeness8283---8485## 2. Engage App (flowmaster-engage)8687### Stack & Architecture88- **Framework**: Next.js 16 (React 19/TypeScript) with 242 TS/TSX files89- **Purpose**: Employee-facing app for executing workflow process steps with AI-powered task intelligence90- **Design Pattern**: Progressive disclosure - show only what's needed at each step9192### Key Routes & Screens9394#### `/tasks` - Task Queue Dashboard95- Displays all assigned tasks in filterable table96- Filters: Status, Priority, Due Date97- Status badges: Not Started, In Progress, Pending Review, Completed98- Quick navigation to individual task detail pages99100#### `/tasks/[id]` - Task Detail & Execution101**Left Panel (Task Briefing)**:102- `ContextBriefingPanel`: AI-generated case summary with key facts103- `SmartReviewForm`: DXG-generated pre-filled HTML form for task data input104 - Auto-filled with AI suggestions (shows confidence levels)105 - Employee can modify/override values106 - Field-level provenance (shows where data came from)107108**Right Sidebar**:109- `InteractiveQueryChat`: Ask AI questions about task context110 - Example: "What was the customer's previous order?"111 - "When is the deadline for escalation?"112113**Footer Actions**:114- Save Draft (persist partial completion)115- Approve & Submit (advance process to next step)116- Reject (return to sender with reason)117118#### `/dashboard` - Overview Dashboard119- Cards showing task metrics (open, pending review, completed today)120- Recent activity stream121- Quick stats on process adherence122123#### `/history` - Task History124- Completed tasks with execution timeline125- View submitted forms and approval chain126- Audit trail of changes127128#### `/agents` - AI Agent Management129- View active AI agents assisting with task execution130- Agent performance metrics131- Configure AI behavior preferences132133### DXG Integration (Next.js API Proxy)134Engage proxies requests to DXG backend via `/api/dxg/*` endpoints:135136```137GET /api/dxg/analyze/{taskId}138 → DXG unified analysis: domain context, case summary, key metrics, risk flags139140GET /api/dxg/smart-form/{taskId}141 → DXG form generation: pre-filled HTML form based on task data + LLM142143POST /api/dxg/query/{taskId}144 → DXG interactive Q&A: employee asks questions, AI responds with context-aware answers145```146147### Task Execution Flow1481. Employee opens `/tasks` → fetch assigned tasks from Human Task Service (REST)1492. Click task card → navigate to `/tasks/{id}`1503. Parallel DXG calls: `analyzeTask()` + `getSmartForm()`1514. Display briefing panel + smart form + enable chat sidebar1525. Employee reviews pre-filled form and modifies as needed1536. Click "Approve & Submit" → `POST /api/tasks/{taskId}/complete`1547. Execution Engine advances process to next step155156### Design Patterns157- **Pre-filled Forms**: AI suggests values, employee confirms/overrides158- **Contextual Briefing**: Show relevant case info before form159- **Inline Help**: Chat sidebar for Q&A without leaving task160- **Data Provenance**: Display where each form value came from161- **Draft Saving**: Allow incomplete submissions for later resumption162163### Known Gaps (per baseline)164- R25: Full case data loading completeness165- R26: Complete AI Q&A functionality166- R27: Preemptive contextual info (showing task context without asking)167- R28-R29: Design-time analytics (track form accuracy, task completion times)168169---170171## 3. DXG Frontend (dxg)172173### Stack & Architecture174- **Framework**: React + Vite + TypeScript (development/testing UI)175- **Purpose**: NOT end-user facing; used by developers/designers to build and test DXG experiences176177### Panels & Layout178- **Left Panel**: Prompt editor, configuration settings, saved designs library179- **Center Panel**: Real-time HTML preview of generated UI180- **Right Panel**: Data structure inspector, LLM API traffic viewer, error logs181- **UIRenderer Component**: Sandboxed HTML preview with style isolation182183### Workflow1841. Developer writes natural language prompt: "Create a customer complaint form with escalation path"1852. Click "Generate" → calls DXG backend `/api/v1/generate`1863. Backend returns HTML + metadata1874. Vite preview renders HTML with sandboxing1885. Developer inspects generated form structure, field types, validation rules1896. Refine prompt → iterate until satisfied1907. Export/save design → used by Engage app191192### Backend Endpoints (consumed by both DXG Frontend & Engage)193```194POST /api/v1/generate195 Input: { prompt, context, rules }196 Output: { html, fields, metadata, validationRules }197198GET /api/v1/analyze/{task_id}199 Output: { domain, caseSummary, keyMetrics, riskFlags }200201GET /api/v1/smart-form/{task_id}202 Output: { html, fieldValues, confidence, provenance }203204POST /api/v1/query/{task_id}205 Input: { question }206 Output: { answer, sources, confidence }207208GET /api/v1/briefing/{task_id}209 Output: { summary, timeline, activeAlerts }210```211212---213214## 4. SDX Frontend (sdx-frontend)215216### Stack & Architecture217- **Framework**: React218- **Purpose**: Data source registration and semantic field mapping UI219220### Screens221- Data source explorer222- Field mapping workflow (map source fields to domain entities)223- Semantic type assignment (mark fields as Customer ID, Order Date, etc.)224- Visual data lineage diagrams225226### Integration Gap (R08)227- Needs to integrate into Process Designer field mapping workflow228- Currently standalone; should be embedded in process design step229230---231232## 5. Manager App (PLANNED - R30-R33)233234### Stack & Architecture235- **Framework**: React (mobile-optimized; can share codebase with Engage)236- **Purpose**: Manager-only interface for escalation handling ONLY237 - NOT for case approval (that's Engage employees)238 - ONLY for agent blockage resolution and guidance239240### Planned Screens241- Escalation queue (tasks escalated by AI agents)242- Blockage resolution (provide context to help agent proceed)243- Guidance provision (share internal policies, precedents)244- Escalation metrics dashboard245246---247248## Integration Architecture249250```251┌─────────────────────────────────────────────────┐252│ Frontend Admin (Next.js) │253│ - Process Designer, User Management, Monitoring │254└──────────────┬──────────────────────────────────┘255 │ REST256 ▼257 ┌──────────────┐258 │ API Gateway │ (:9000)259 └──────────────┘260 │261 ┌──────────┼──────────┐262 │ │ │263 ▼ ▼ ▼264[Services] [Auth] [WebSocket]265266┌──────────────────────────────────┐267│ Engage App (Next.js 16) │268│ - Task queue, execution, AI help │269└────────────┬─────────────────────┘270 │ Next.js API Routes271 ▼272 ┌────────────┐273 │ DXG Service│ (:8005)274 │ + Human │275 │ Task Srv │276 └────────────┘277278┌──────────────────────────────────┐279│ DXG Frontend (React + Vite) │280│ - UI design, testing, iteration │281└────────────┬─────────────────────┘282 │ REST283 ▼284 ┌────────────┐285 │ DXG Backend│ (:8005)286 │ (FastAPI) │287 └────────────┘288289┌──────────────────────────────────┐290│ SDX Frontend (React) │291│ - Data mapping, field lineage │292└────────────┬─────────────────────┘293 │ REST294 ▼295 ┌────────────┐296 │ SDX API │297 └────────────┘298```299300---301302## Design System & Patterns303304### Form Interaction Patterns305- **Progressive Disclosure**: Show complex fields only when relevant306- **Validation Feedback**: Real-time field validation with clear error messages307- **Auto-fill with Override**: AI suggests, human confirms/changes308- **Field Provenance**: Display source of pre-filled values (e.g., "From customer CRM", "AI prediction 87%")309310### Navigation Patterns311- **Breadcrumb Trail**: Show path in process (e.g., Task > Approval > Handoff)312- **Sidebar Menu**: Quick access to main app sections313- **Tab Navigation**: Organize related content (Details, History, Related Tasks)314315### Data Display316- **Color-Coded Status**: Pending (yellow), Active (blue), Completed (green), Blocked (red)317- **User Avatars**: Show assignee/reviewer with hover card details318- **Timeline Views**: Show task progression and handoff points319- **Empty States**: Helpful message and CTA when no tasks/data320321### Real-time Features322- WebSocket updates for task status changes323- Live notifications for new task assignments324- Collaborative awareness (see who's viewing same task)325326---327328## When to Use This Skill329330Use this skill when you need to:331- Build or modify employee task execution interfaces (Engage App)332- Design AI-assisted form pre-filling experiences (DXG integration)333- Develop admin dashboards for process monitoring and management334- Implement real-time task queue updates via WebSocket335- Create data mapping workflows for semantic field configuration (SDX)336- Debug DXG HTML generation or form pre-fill issues337- Extend task execution with new AI analysis features338- Build manager escalation handling interfaces339- Implement progressive disclosure and contextual UI patterns340- Design mobile-friendly employee task interfaces