feat(helixo): wire UI to real engines + 31 tests#2
Conversation
…plugin Foundation for the Helixo agent — an advanced revenue forecasting and labor scheduling optimization system for restaurants. Includes complete domain type system covering revenue forecasting with multi-variable regression, labor optimization with CPLH/RPLH targets, auto-scheduling with constraint satisfaction, real-time pace monitoring, Toast POS and RESY integrations, and a forecast review/acceptance workflow requiring user approval before labor scheduling runs. https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
…gin entry - ForecastEngine: multi-variable regression with 15-min intervals, weather/holiday/reservation factors - LaborEngine: constraint-based staffing optimization with ramp smoothing and staggered starts - SchedulerEngine: auto-scheduling with availability, skill matching, overtime, and coverage gap detection - PaceMonitor: real-time pace tracking with cut/call/extend staffing recommendations - ToastAdapter: Toast POS sales and labor data integration - ResyAdapter: RESY reservation pacing integration - 8 MCP tools exposing all engines for agent consumption - HelixoPlugin class unifying all components https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
Scaffold Next.js 14 App Router with Tailwind CSS for the Helixo restaurant operations dashboard. Includes sidebar navigation, KPI dashboard, labor planning grid, and format utilities. Pages: Dashboard (/), Labor (/labor) Components: Sidebar, Header Utilities: format.ts (currency, percent, shortCurrency, dayLabel, timeRange) https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
- Forecast page: weekly summary cards, 15-min interval bar charts, comparison panel (YoY, trailing avg, budget target) - Schedule page: weekly calendar grid, open shifts, overtime alerts - Settings page: restaurant profile, labor targets, integrations config - Demo data generator for realistic casual dining numbers https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
…hetic - Dark navy sidebar with categorized nav sections - Clean white cards on light gray background - KPI cards with comparison arrows (green/red deltas) - Updated tailwind config with Leonardo color palette - Minimal header with settings/notification/avatar - Professional data-dense dashboard layout https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
KPI row with comparison arrows, weekly bar chart, daily breakdown table with variance columns, clean white cards on light gray bg. https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
Clean white table grid, dept color-coding, open shifts and OT alerts sections with Leonardo card/table styling. https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
KPI cards with comparison arrows, staffing level bars, department breakdown cards, and staffing actions table in Leonardo style. https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
KPI cards with pace status, interval performance table, numbered recommendation cards matching Leonardo's intelligence panel style. https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
Clean key-value cards for restaurant profile, labor targets, integrations status, and forecast configuration. https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
- Create api.ts layer connecting all 5 UI pages to real ForecastEngine, LaborEngine, SchedulerEngine, and PaceMonitor against demo data - Replace hardcoded static data with engine-generated output - Add loading spinners and error boundaries to all pages - Add vitest config and 31 tests across 4 engine test suites: forecast-engine (8), labor-engine (7), scheduler-engine (6), pace-monitor (10) https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
🔗 Integration Test Results🔗 Cross-Agent Integration Test ReportSession ID: integration-20260325-042904-354cfda6224a6c733689452159781344e0d694f7 Summary
Test Results
Recommendations
Next Steps
Generated by Cross-Agent Integration Test Pipeline |
🔗 Integration Test Results🔗 Cross-Agent Integration Test ReportSession ID: integration-20260325-042920-1ca2df5be50b7d70fbf97dd3879a22fd9646d870 Summary
Test Results
Recommendations
Next Steps
Generated by Cross-Agent Integration Test Pipeline |
…bug fixes, tests, and new pages Comprehensive Helixo plugin improvements: **Forecast Accuracy Tracking** - Add calculateAccuracy() method with WMAPE, MAPE, bias detection - Per-meal-period and per-interval accuracy breakdowns - Confidence band accuracy measurement - Export ForecastAccuracyReport, MealPeriodAccuracy, IntervalAccuracy types **MCP Tool Input Validation** - Add Zod schemas for all 7 tool handlers - validateInput() helper returns structured errors with field paths - System boundary validation per project architecture rules **Bug Fixes & Configurability** - Fix RESY adapter redundant status mapping, use venueCapacity - Fix PaceMonitor interval actuals distribution (proportional) - Extract shared utilities to src/utils.ts (DRY across 4 engines) - Add configurable multipliers to ForecastConfig and LaborConfig - Add isMinor labor law enforcement to scheduler **Test Coverage (80 tests, 8 files)** - Add 4 forecast accuracy tests - Add 13 Toast adapter tests (mocked fetch) - Add 11 RESY adapter tests (mocked fetch) - Add 10 MCP tools validation tests - Add 11 HelixoPlugin integration tests **New UI Pages** - Revenue analysis page with period breakdown - Insights/intelligence page with AI recommendations - API client functions for new pages https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
🔗 Integration Test Results🔗 Cross-Agent Integration Test ReportSession ID: integration-20260325-044417-d6d96e066cd9490bae354e71ea48b8bc74ab93a9 Summary
Test Results
Recommendations
Next Steps
Generated by Cross-Agent Integration Test Pipeline |
- SharePoint adapter: Microsoft Graph API integration for Excel Online workbooks and SharePoint lists with Azure AD OAuth authentication - Excel adapter: local .csv/.xlsx file reader with built-in CSV parser and pluggable XLSX parser interface, plus file watcher support - Webhook listener: Graph webhook subscriptions with auto-renewal and polling fallback for real-time SharePoint change detection - 3 new MCP tools: helixo_sharepoint_sync, helixo_excel_sync, helixo_datasource_status - SpreadsheetColumnMapping for flexible column-to-field mapping - Both adapters transform spreadsheet data into HistoricalSalesRecord[] and ToastLaborData for seamless engine integration https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
…sts) - SharePoint adapter: 26 tests covering auth, Excel rows, list items, sales/labor transforms, column mapping, date parsing, change detection - Excel adapter: 29 tests covering CSV parsing, quoted fields, numeric coercion, date preservation, XLSX parser injection, file watching - Webhook listener: 19 tests covering validation tokens, change notifications, polling fallback, handler registration, lifecycle All 154 tests pass across 11 test files. https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H
🔗 Integration Test Results🔗 Cross-Agent Integration Test ReportSession ID: integration-20260325-203642-40135af829fbac4f98386af19fb2c6af583ba176 Summary
Test Results
Recommendations
Next Steps
Generated by Cross-Agent Integration Test Pipeline |
🔗 Integration Test Results🔗 Cross-Agent Integration Test ReportSession ID: integration-20260325-203900-4da4a34dc569741038eb364ac809a47063dc552c Summary
Test Results
Recommendations
Next Steps
Generated by Cross-Agent Integration Test Pipeline |
Summary
api.ts): Connects all 5 UI pages to real ForecastEngine, LaborEngine, SchedulerEngine, and PaceMonitor running against demo restaurant dataWhat changed
app/src/lib/api.tsapp/src/app/page.tsxapp/src/app/forecast/page.tsxapp/src/app/labor/page.tsxapp/src/app/schedule/page.tsxapp/src/app/pace/page.tsxtests/forecast-engine.test.tstests/labor-engine.test.tstests/scheduler-engine.test.tstests/pace-monitor.test.tsvitest.config.tsTest plan
npx vitest run— 31/31 tests passingcd app && npm run build)https://claude.ai/code/session_01JDugPwsRE9ZKZt2z7tQF7H