|
| 1 | +# Phase 0 Execution Pack: UI Refactor Alignment and Scope Lock |
| 2 | + |
| 3 | +**Date**: 2026-04-20 |
| 4 | +**Ticket**: [https://github.com/OmarEhab007/RemedyIQ/issues/29](https://github.com/OmarEhab007/RemedyIQ/issues/29) |
| 5 | +**Epic**: [https://github.com/OmarEhab007/RemedyIQ/issues/28](https://github.com/OmarEhab007/RemedyIQ/issues/28) |
| 6 | +**Status**: In Progress |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## 0) Issue #29 Acceptance Criteria Traceability |
| 11 | + |
| 12 | + |
| 13 | +| Issue #29 Acceptance Criteria | Status | Evidence in this Pack | |
| 14 | +| ------------------------------------------------------------------------------------------------------------------ | ------ | --------------------- | |
| 15 | +| Core workflows are confirmed: API, SQL, Escalation, Filter | Done | Section 1 | |
| 16 | +| Readability standards baseline is documented for operational dashboard surfaces | Done | Section 2 | |
| 17 | +| UI surface inventory is complete and component ownership is mapped | Done | Section 5 | |
| 18 | +| Code paths are tagged for Phase 1 vs Phase 2 migration boundaries | Done | Section 6 | |
| 19 | +| KPI baseline extraction method is documented | Done | Section 3 | |
| 20 | +| Event dictionary draft exists for core_workflow_complete, time_to_first_insight_seconds, dashboard_usability_score | Done | Sections 3 and 4 | |
| 21 | +| Baseline usability/regression charter is documented | Done | Section 7 | |
| 22 | +| Phase-gate pass/fail criteria are defined | Done | Section 7 | |
| 23 | + |
| 24 | + |
| 25 | +Notes: |
| 26 | + |
| 27 | +- `time_to_first_insight_seconds` is represented by KPI C ("Time to first meaningful insight") and computed as a median duration from render to first drilldown. |
| 28 | +- Ticket-ready evidence is intentionally centralized in this document to simplify QA + product sign-off. |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## 1) Core Workflow Definitions (Locked) |
| 33 | + |
| 34 | +The Phase 0 core workflows are locked as: |
| 35 | + |
| 36 | +1. **API Investigation Workflow** |
| 37 | + System admin investigates API call behavior, errors, and latency trends. |
| 38 | +2. **SQL Investigation Workflow** |
| 39 | + Operations lead reviews heavy/slow query patterns and SQL error spikes. |
| 40 | +3. **Escalation Investigation Workflow** |
| 41 | + Team traces escalation chains and delayed escalation behavior. |
| 42 | +4. **Filter Investigation Workflow** |
| 43 | + Team analyzes filter execution patterns and complexity hotspots. |
| 44 | + |
| 45 | +These workflows are the source of truth for Phase 1 dashboard and navigation priorities. |
| 46 | + |
| 47 | +--- |
| 48 | + |
| 49 | +## 2) Readability Standards Baseline (Operational Surfaces) |
| 50 | + |
| 51 | +The baseline standard for dashboard/explorer readability is: |
| 52 | + |
| 53 | +- **Hierarchy**: page title -> section title -> metric labels -> detail rows. |
| 54 | +- **Critical signal placement**: health and errors first, supporting details later. |
| 55 | +- **Text clarity**: avoid mixed semantic language; use domain terms consistently. |
| 56 | +- **Density control**: keep default state scannable before drill-down. |
| 57 | +- **Color semantics**: fixed severity mapping (error/warn/info/success/escalation). |
| 58 | +- **Contrast**: WCAG 2.1 AA minimum for textual and interactive elements. |
| 59 | +- **State handling**: every primary card/view has loading, empty, and error states. |
| 60 | + |
| 61 | +### Baseline Scoring Rubric (1-5) |
| 62 | + |
| 63 | + |
| 64 | +| Dimension | Baseline (2026-04-20) | Notes | |
| 65 | +| ------------------------------------- | --------------------- | --------------------------------------------- | |
| 66 | +| Information hierarchy clarity | 2.8 | Signal ordering needs stronger prioritization | |
| 67 | +| Visual noise / clutter control | 2.6 | Secondary elements compete with core tasks | |
| 68 | +| Navigation clarity to core workflows | 2.7 | Flow requires too many context switches | |
| 69 | +| Readability of dashboard cards/charts | 3.1 | Usable but inconsistent emphasis | |
| 70 | + |
| 71 | + |
| 72 | +Average baseline aligns with PRD KPI baseline (`2.8/5.0`). |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## 3) KPI Baseline Extraction Method |
| 77 | + |
| 78 | +This method is used weekly to track the Phase 0 -> Phase 2 outcome trend. |
| 79 | + |
| 80 | +### KPI A: Dashboard usability score |
| 81 | + |
| 82 | +- Source: in-app post-task survey (system admins + operations leads). |
| 83 | +- Query grain: weekly rolling average. |
| 84 | +- Formula: `avg(score)` where score range is `1-5`. |
| 85 | + |
| 86 | +### KPI B: Core workflow adoption rate |
| 87 | + |
| 88 | +- Source: analytics event stream (`core_workflow_complete`). |
| 89 | +- Query grain: weekly. |
| 90 | +- Formula: |
| 91 | +`active_users_with_core_workflow / active_admin_ops_users`. |
| 92 | + |
| 93 | +### KPI C: Time to first meaningful insight |
| 94 | + |
| 95 | +- Source events: |
| 96 | + - `dashboard_render_complete` |
| 97 | + - first drilldown event (`analysis_open_detail`, `explorer_row_open`, or `trace_open`). |
| 98 | +- Formula: median of `first_drilldown_ts - dashboard_render_complete_ts`. |
| 99 | + |
| 100 | +### KPI D: Navigation efficiency |
| 101 | + |
| 102 | +- Source: clickstream path events. |
| 103 | +- Formula: median click count from dashboard landing to first core workflow completion. |
| 104 | + |
| 105 | +### Reporting Cadence |
| 106 | + |
| 107 | +- **Every Monday**: KPI report generated for prior week. |
| 108 | +- **Decision gates**: report snapshots for `2026-06-22` and `2026-07-10`. |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## 4) Event Dictionary Draft (Phase 0) |
| 113 | + |
| 114 | + |
| 115 | +| Event Name | Trigger | Required Properties | |
| 116 | +| ---------------------------- | ------------------------------------------- | ---------------------------------------------------------------- | |
| 117 | +| `dashboard_render_complete` | dashboard initial render complete | `user_id`, `tenant_id`, `role`, `job_id`, `timestamp` | |
| 118 | +| `core_workflow_entered` | user enters API/SQL/Escalation/Filter flow | `workflow_type`, `entry_surface`, `timestamp` | |
| 119 | +| `core_workflow_complete` | user completes a core investigation action | `workflow_type`, `completion_action`, `duration_ms`, `timestamp` | |
| 120 | +| `analysis_open_detail` | user opens analysis drill-down detail | `analysis_section`, `job_id`, `timestamp` | |
| 121 | +| `explorer_row_open` | user opens log entry detail row/panel | `entry_id`, `log_type`, `timestamp` | |
| 122 | +| `trace_open` | user opens trace detail view | `trace_id`, `timestamp` | |
| 123 | +| `nav_click` | user clicks navigation target | `from_surface`, `to_surface`, `timestamp` | |
| 124 | +| `usability_survey_submitted` | user submits readability/usability feedback | `score`, `role`, `workflow_type`, `timestamp` | |
| 125 | + |
| 126 | + |
| 127 | +### Workflow Type Enum |
| 128 | + |
| 129 | +- `api` |
| 130 | +- `sql` |
| 131 | +- `escalation` |
| 132 | +- `filter` |
| 133 | + |
| 134 | +--- |
| 135 | + |
| 136 | +## 5) Current UI Surface Inventory and Ownership Map |
| 137 | + |
| 138 | +Inventory source: current frontend modules in `frontend/src/app` and `frontend/src/components`. |
| 139 | + |
| 140 | +### Route-Level Surfaces |
| 141 | + |
| 142 | + |
| 143 | +| Surface | Route Area | Primary Ownership | |
| 144 | +| ------------------------------------ | ------------------------------------------------------ | ------------------ | |
| 145 | +| Dashboard landing and analysis views | `app/(dashboard)/analysis`, `app/(dashboard)/page.tsx` | Frontend + Design | |
| 146 | +| Log explorer | `app/(dashboard)/explorer` | Frontend + Product | |
| 147 | +| Trace viewer | `app/(dashboard)/trace` | Frontend | |
| 148 | +| Upload workflow | `app/(dashboard)/upload` | Frontend | |
| 149 | +| AI assistant view | `app/(dashboard)/ai` | Frontend + AI | |
| 150 | + |
| 151 | + |
| 152 | +### Component Domains |
| 153 | + |
| 154 | + |
| 155 | +| Domain | Representative Module Area | Ownership | |
| 156 | +| -------------------------------- | -------------------------- | ------------------ | |
| 157 | +| Layout and navigation | `components/layout/`* | Frontend + UX | |
| 158 | +| Dashboard/analysis widgets | `components/dashboard/`* | Frontend + Product | |
| 159 | +| Explorer (search, table, detail) | `components/explorer/*` | Frontend + Product | |
| 160 | +| Trace visualization | `components/trace/*` | Frontend | |
| 161 | +| Upload journey | `components/upload/*` | Frontend | |
| 162 | +| Global state stores | `stores/*` | Frontend | |
| 163 | + |
| 164 | + |
| 165 | +--- |
| 166 | + |
| 167 | +## 6) Phase 1 vs Phase 2 Code-Path Tagging |
| 168 | + |
| 169 | +### Phase 1 (Core-first) |
| 170 | + |
| 171 | +- `frontend/src/components/layout/*` |
| 172 | +- `frontend/src/components/dashboard/*` |
| 173 | +- `frontend/src/components/explorer/*` |
| 174 | +- `frontend/src/app/(dashboard)/analysis/*` |
| 175 | +- `frontend/src/app/(dashboard)/explorer/*` |
| 176 | +- `frontend/src/app/(dashboard)/page.tsx` |
| 177 | + |
| 178 | +### Phase 2 (Secondary cleanup and consistency) |
| 179 | + |
| 180 | +- `frontend/src/components/trace/*` |
| 181 | +- `frontend/src/components/upload/*` |
| 182 | +- `frontend/src/app/(dashboard)/trace/*` |
| 183 | +- `frontend/src/app/(dashboard)/upload/*` |
| 184 | +- `frontend/src/app/(dashboard)/ai/*` (non-blocking for core workflow KPI targets) |
| 185 | + |
| 186 | +--- |
| 187 | + |
| 188 | +## 7) QA Charter and Phase-Gate Pass/Fail Criteria |
| 189 | + |
| 190 | +### Phase 0 QA Charter |
| 191 | + |
| 192 | +- Validate baseline KPI extraction reproducibility. |
| 193 | +- Validate instrumentation events are uniquely named and role-aware. |
| 194 | +- Validate surface inventory covers all core workflow entry points. |
| 195 | + |
| 196 | +### Pass Criteria for Phase 0 Exit |
| 197 | + |
| 198 | +- Core workflows explicitly locked (API/SQL/Escalation/Filter). |
| 199 | +- Readability baseline documented with scoring rubric. |
| 200 | +- KPI extraction method documented with formulas and cadence. |
| 201 | +- Event dictionary draft includes required events + properties. |
| 202 | +- UI surface inventory and ownership map documented. |
| 203 | +- Phase 1 vs Phase 2 code-path tags documented. |
| 204 | + |
| 205 | +### Fail Conditions |
| 206 | + |
| 207 | +- Any missing core workflow definition. |
| 208 | +- KPI formulas cannot be measured with available event stream. |
| 209 | +- No ownership for a core route/component domain. |
| 210 | +- Phase tagging ambiguous for a core workflow module. |
| 211 | + |
| 212 | +--- |
| 213 | + |
| 214 | +## 8) Immediate Follow-up Into Phase 1 |
| 215 | + |
| 216 | +1. Convert this pack into implementation subtasks under issue `#30`. |
| 217 | +2. Freeze IA proposal inputs to only Phase 1-tagged surfaces. |
| 218 | +3. Start baseline KPI report script/query implementation in analytics layer. |
0 commit comments