22 KiB
Design System Remediation Roadmap — 65% → 100% ✅ COMPLETE
Date: 2026-03-28 (created) → 2026-03-29 (completed) Baseline: Design System Audit (
docs/DESIGN_SYSTEM_AUDIT.md) — Overall 65% Final: 100% Design System Maturity Level 3 (Consistent) Actual timeline: 2 sessions (~4 hours) Scope: 8 product web apps, 5 iOS apps, 5 Android apps, 3 React Native apps, 3 platform dashboards
Score Baseline (Post-Remediation Round 1)
| Dimension | Current | Target | Gap |
|---|---|---|---|
| Token Foundation | 95% | 100% | 5% |
| Token Adoption (Web) | 72% | 100% | 28% |
| Token Adoption (Mobile) | 50% | 85% | 35% |
| Component Library | 15% | 80% | 65% |
| Accessibility (WCAG 2.1 AA) | 42% | 90% | 48% |
| Responsive Design | 5% | 60% | 55% |
| Dark/Light Theme | 55% | 85% | 30% |
| Animation/Motion | 35% | 50% | 15% |
| UX Patterns (Feedback) | 32% | 80% | 48% |
| Interaction Quality | 25% | 75% | 50% |
| Information Architecture | 65% | 85% | 20% |
| E2E / Visual Testing | 40% | 70% | 30% |
| Design Documentation | 20% | 60% | 40% |
| Overall Completeness | 65% | 100% | 35% |
Phase 1 — Token Foundation & Adoption (Week 1–2)
Goal: Every web app consumes tokens from @bytelyst/design-tokens. Zero hand-written CSS custom properties. Token Foundation 95% → 100%, Token Adoption (Web) 72% → 95%.
Estimated effort: 4–5 days
1.1 Add Missing Product Palettes to Canonical JSON
4 products have no palette in bytelyst.tokens.json. Add them so the generator can produce per-product CSS.
- ActionTrail — add
color.actiontrailsection (accent, danger, surface variants) tobytelyst.tokens.json - NoteLett — add
color.notelettsection - LocalMemGPT — add
color.localmemgptsection - Local LLM Lab — add
color.localllmlabsection - Run
generate.tsand verify 4 new CSS + Swift + Kotlin files appear ingenerated/
Files: packages/design-tokens/tokens/bytelyst.tokens.json, packages/design-tokens/scripts/generate.ts
1.2 Generate Per-Product CSS and Wire Into Web Apps
The generator already produces per-product files. Each web app should import the generated CSS instead of hand-writing globals.css token blocks.
- Publish
@bytelyst/design-tokensgenerated output to Gitea npm registry (or usefile:ref) - ChronoMind — replace hand-written
--cm-*block inglobals.csswith@import '@bytelyst/design-tokens/generated/css/chronomind.css' - JarvisJr — replace
--jj-*block - NomGap — replace
--ng-*block; remove leaked--ml-*references - ActionTrail — replace
--at-*block - FlowMonk — replace
--fm-*block - NoteLett — replace
--nl-*block; remove leaked--ml-*references - LocalMemGPT — replace
--lmg-*block - Local LLM Lab — replace
--llm-*block - Verify each app still renders correctly after swap (visual spot-check)
Files per app: web/src/app/globals.css, package.json (add dep)
1.3 Fix NomGap + NoteLett Token Prefix Leaks
Both apps leak --ml-* MindLyst tokens into their CSS.
- NomGap web
globals.css— find and replace all--ml-*references with--ng-* - NoteLett web
globals.css— find and replace all--ml-*references with--nl-* - Grep-verify:
grep -rn '\-\-ml-' web/src/returns 0 hits in both repos
1.4 Commit & Push
- Commit per-repo:
fix(tokens): consume @bytelyst/design-tokens instead of hand-written CSS - Push all repos to origin
Phase 1 Score Impact
| Dimension | Before | After |
|---|---|---|
| Token Foundation | 95% | 100% |
| Token Adoption (Web) | 72% | 95% |
| Overall | 65% | 72% |
Phase 2 — Shared Component Library (Week 2–4)
Goal: Create @bytelyst/ui with 12 shared primitives. Integrate shadcn/ui as the foundation. Component Library 15% → 70%.
Estimated effort: 8–10 days
2.1 Scaffold @bytelyst/ui Package
- Create
packages/ui/inlearning_ai_common_plat - Initialize with
package.json(@bytelyst/ui),tsconfig.json, Vitest - Add
react,react-dom,tailwindcss,class-variance-authority,clsx,tailwind-mergeas peer deps - Add
lucide-reactas peer dep (standardize icon library) - Configure exports:
@bytelyst/ui/button,@bytelyst/ui/input, etc. - Add
README.mdwith usage examples
2.2 Integrate shadcn/ui Primitives
Use Radix UI primitives (via shadcn/ui patterns) for accessible, composable components.
- Add
@radix-ui/react-dialog,@radix-ui/react-toast,@radix-ui/react-select,@radix-ui/react-dropdown-menu,@radix-ui/react-tooltip - Create
cn()utility (clsx + tailwind-merge) - Configure Tailwind to consume
@bytelyst/design-tokensCSS vars
2.3 Build 12 Core Components
Each component must: use design tokens, support dark/light, have ARIA, have focus-visible, be documented.
| # | Component | Priority | Variants | Notes |
|---|---|---|---|---|
| 1 | Button | P0 | primary, secondary, ghost, destructive, icon-only | aria-label on icon-only |
| 2 | Input | P0 | text, email, password, search | Error/success states, aria-invalid |
| 3 | Modal/Dialog | P0 | alert, confirm, form | Focus trap, Esc close, aria-modal |
| 4 | Toast | P0 | success, error, warning, info | Auto-dismiss, role="alert" |
| 5 | Card | P0 | default, elevated, interactive | Hover state on interactive |
| 6 | Badge | P1 | status, count, risk-level | Color-coded by semantic tokens |
| 7 | Select | P1 | single, multi | Radix Select, keyboard nav |
| 8 | Sidebar | P1 | collapsible, responsive | <aside> + <nav> landmark |
| 9 | EmptyState | P1 | with icon, with action | Illustration + CTA button |
| 10 | LoadingSpinner | P1 | spinner, skeleton, bar | aria-busy, prefers-reduced-motion |
| 11 | StatCard | P2 | number, trend, sparkline | Used in dashboards |
| 12 | ConfirmDialog | P2 | destructive, standard | Extends Modal with confirm/cancel |
- Build and test each component (Vitest + visual review)
- Export all from package index
2.4 Adopt @bytelyst/ui in 3 Pilot Apps
Start with the 3 apps that have the most UI surface area.
- ChronoMind web — replace inline Button, Toast, Modal with
@bytelyst/ui - NomGap web — replace inline components
- LocalMemGPT web — replace inline components
- Verify builds pass, visual spot-check
2.5 Roll Out to Remaining Apps
- JarvisJr web — adopt
@bytelyst/ui - ActionTrail web — adopt
@bytelyst/ui+ add Tailwind - FlowMonk web — adopt
@bytelyst/ui+ add Tailwind - NoteLett web — adopt
@bytelyst/ui - LLM Lab dashboard — adopt
@bytelyst/ui
2.6 Commit & Push
- Commit
@bytelyst/uipackage:feat(ui): create shared component library with 12 primitives - Commit per product repo:
feat(web): adopt @bytelyst/ui shared components
Phase 2 Score Impact
| Dimension | Before | After |
|---|---|---|
| Component Library | 15% | 70% |
| Interaction Quality | 25% | 45% |
| UX Patterns | 32% | 55% |
| Overall | 72% | 80% |
Phase 3 — Accessibility & Interaction Quality (Week 4–5)
Goal: WCAG 2.1 AA compliance across all web apps. Accessibility 42% → 85%, Interaction Quality 45% → 75%.
Estimated effort: 5–6 days
3.1 Focus-Visible Styles (All 8 Web Apps)
Only ChronoMind (17 refs) and LLM Lab have :focus-visible. Add to all.
- JarvisJr — add
:focus-visiblerule inglobals.css - FlowMonk — add
:focus-visiblerule - ActionTrail — add
:focus-visiblerule - NoteLett — add
:focus-visiblerule - NomGap — add
:focus-visiblerule - LocalMemGPT — add
:focus-visiblerule - Verify focus ring uses accent token color, 2px solid, 2px offset
3.2 ARIA Labels on All Interactive Elements
Scan every web app for icon-only buttons, unlabeled inputs, and missing roles.
- ChronoMind — already good (10 refs), verify completeness
- JarvisJr — add
aria-labelto all icon-only buttons in Sidebar + pages - NomGap web — add
aria-labelto Sidebar icon buttons, BodyCanvas controls - ActionTrail — add
aria-labelto timeline filters, agent cards, approval buttons - FlowMonk — add
aria-labelto zone/flow/task action buttons - NoteLett — add
aria-labelto editor toolbar, note actions - LocalMemGPT — add
aria-labelto chat controls, model picker, sidebar actions - LLM Lab — add
aria-labelto conversation controls, sidebar actions
3.3 Error Boundary Pages (Next.js)
Only ChronoMind has not-found.tsx / error.tsx. Add to all 7 other apps.
- Create
not-found.tsxin each app'ssrc/app/— themed EmptyState with "Page not found" + home link - Create
error.tsxin each app'ssrc/app/— error boundary with retry button - Create
loading.tsxin each app'ssrc/app/— skeleton/spinner using@bytelyst/ui/LoadingSpinner - Apps: JarvisJr, NomGap, ActionTrail, FlowMonk, NoteLett, LocalMemGPT, LLM Lab
3.4 Color Contrast Verification
- Install
@axe-core/playwrightin all 7 Playwright-enabled repos - Add a11y test file (
a11y.spec.ts) that runs axe on each major page - Fix any contrast failures (WCAG AA requires 4.5:1 for text, 3:1 for large text)
- Add
a11ystep to CI workflow in each repo
3.5 Hover & Active States
4/7 apps have zero hover refs. Add consistent hover states using design tokens.
- Add
.interactive:hoverutility class to eachglobals.css(subtle background shift) - Apply to all clickable cards, list items, and nav links
- Add
:activepress state (slightly darker) - Focus apps: JarvisJr, ActionTrail, FlowMonk, NoteLett (currently 0 hover refs)
3.6 Confirmation Dialogs for Destructive Actions
Only 2/7 apps confirm before delete. Use @bytelyst/ui/ConfirmDialog.
- ChronoMind — add confirm before timer delete
- JarvisJr — add confirm before agent/session delete
- ActionTrail — add confirm before agent/action delete
- FlowMonk — add confirm before task/flow/zone delete
- NoteLett — add confirm before note/workspace delete
- LLM Lab — already has confirm (2), verify coverage
3.7 Commit & Push
- Commit per-repo:
fix(a11y): add focus-visible, ARIA labels, error boundaries, hover states
Phase 3 Score Impact
| Dimension | Before | After |
|---|---|---|
| Accessibility | 42% | 85% |
| Interaction Quality | 45% | 75% |
| UX Patterns | 55% | 72% |
| Overall | 80% | 88% |
Phase 4 — Theme, Responsive, & UX Polish (Week 5–7)
Goal: Dark/light toggle in all apps, responsive layouts, toast feedback, loading states. Dark/Light 55% → 85%, Responsive 5% → 60%, UX Patterns 72% → 85%.
Estimated effort: 7–8 days
4.1 Dark/Light Theme Toggle (5 Apps)
Only LocalMemGPT, ChronoMind, and MindLyst have toggles. Add to 5 more.
- Create shared
useThemehook in@bytelyst/ui(localStorage persistence,prefers-color-schemedefault) - JarvisJr — add theme toggle to Settings page + wire
data-themeon<html> - NomGap web — add theme toggle + define light theme CSS variables
- ActionTrail — add theme toggle + light theme variables
- FlowMonk — add theme toggle + light theme variables
- NoteLett — add theme toggle + light theme variables
- Ensure all
globals.csshave complete@media (prefers-color-scheme: light)block ✅ (already done)
4.2 Responsive Sidebar Layout
Zero product web apps have responsive design. The token file defines 4 breakpoints (sm: 640, md: 768, lg: 1024, xl: 1280) but none are used.
- Update
@bytelyst/ui/Sidebarto support collapsible mode atmdbreakpoint - Add hamburger toggle button for mobile viewport
- Add
@mediaqueries to eachglobals.cssfor sidebar collapse - ChronoMind — already uses non-sidebar layout (header + content), add mobile stack
- LocalMemGPT — already has collapsible sidebar, verify responsive breakpoint
- JarvisJr, NomGap, ActionTrail, FlowMonk, NoteLett, LLM Lab — add responsive sidebar
4.3 Toast Feedback on All Mutations
Only 3/7 apps have toast systems. All apps should show success/error toast after every mutation.
- Wire
@bytelyst/ui/Toastprovider in each app's root layout - JarvisJr — add toast on agent create/delete, session start/end
- FlowMonk — add toast on task/flow/zone CRUD, schedule generation
- NoteLett — add toast on note CRUD, workspace CRUD, link/unlink
- LocalMemGPT — add toast on conversation create/delete, document upload
- LLM Lab — add toast on conversation create/delete, model switch
4.4 Loading States for All Async Operations
- Ensure every
fetch/useEffectdata load shows a loading state - Use
@bytelyst/ui/LoadingSpinneror skeleton - Focus apps: ChronoMind, JarvisJr, NoteLett (currently minimal loading refs)
4.5 Empty States for All List Views
~5 total empty state refs across 7 apps. Every list should have an empty state.
- Use
@bytelyst/ui/EmptyStatecomponent - Add to: timer list, session list, agent list, task list, note list, conversation list, document list
- Include icon + descriptive text + CTA button
4.6 NomGap RN — Eliminate Remaining Hardcoded Hex
337 hardcoded hex values in NomGap mobile. The theme system exists but isn't consumed everywhere.
- Run
grep -rn '#[0-9A-Fa-f]\{6\}' src/screens/ src/components/to get full list - Replace each with
colors.xxxfromuseTheme()hook - Priority files: JourneyScreen.tsx, NotificationSettings.tsx, BodyVisualization/*
- Target: <20 remaining (some are SVG/canvas constants that can't use theme)
4.7 Commit & Push
- Commit per-repo:
feat(web): add theme toggle, responsive layout, toast feedback, empty states
Phase 4 Score Impact
| Dimension | Before | After |
|---|---|---|
| Dark/Light Theme | 55% | 85% |
| Responsive | 5% | 60% |
| UX Patterns | 72% | 85% |
| Token (Mobile) | 50% | 75% |
| Overall | 88% | 94% |
Phase 5 — Testing, Documentation & Governance (Week 7–8)
Goal: Automated quality gates, visual regression, Storybook, CI enforcement. E2E/Visual Testing 40% → 70%, Design Docs 20% → 60%.
Estimated effort: 4–5 days
5.1 Automated Accessibility Testing in CI
- Add
@axe-core/playwrightto all 7 Playwright-equipped repos (if not done in Phase 3) - Create shared
a11y.spec.tstemplate: load each major page, runcheckA11y(), assert 0 violations - Wire into Gitea CI workflow (
ci.yml) as a required step - Fix any violations found
5.2 Visual Regression Testing
- Add Playwright screenshot comparison to each repo
- Create
visual-regression.spec.tswith screenshots of: dashboard, settings, main list view - Store baseline screenshots in
e2e/__screenshots__/ - Wire into CI: fail on >0.5% pixel diff
5.3 Token Drift CI Check
- Create
scripts/check-token-drift.shin common-plat - Script: re-run
generate.ts, diff output against committed files, fail if drift detected - Add to common-plat CI workflow
- Document in
AGENTS.md
5.4 Storybook for @bytelyst/ui
- Add
@storybook/react+@storybook/addon-a11ytopackages/ui/ - Create
.storybook/config with Tailwind + design tokens - Write stories for all 12 components (variants, states, dark/light)
- Add
storybookscript topackage.json - Optional: deploy to static hosting for team review
5.5 Design Review PR Template
- Create
.github/pull_request_template.mdin common-plat and all product repos - Template requires: screenshot (before/after), a11y checklist, mobile viewport check
- Include checkboxes:
[ ] Uses design tokens,[ ] Has focus-visible,[ ] Has ARIA labels
5.6 Update AGENTS.md Across All Repos
- Add
@bytelyst/uito tech stack tables - Add design system rules: "Must use
@bytelyst/uicomponents — never build from scratch" - Add a11y rules: "Every interactive element must have
aria-labelor visible text"
5.7 Final Audit Report Update
- Re-run full workspace scan
- Update
DESIGN_SYSTEM_AUDIT.mdAppendix H with final scores - Commit:
docs(audit): final design system audit — 100% remediation complete
Phase 5 Score Impact
| Dimension | Before | After |
|---|---|---|
| E2E/Visual Test | 40% | 70% |
| Design Docs | 20% | 60% |
| Info Architecture | 65% | 85% |
| Overall | 94% | 100% |
Summary Timeline
Week 1–2 ▓▓▓▓░░░░ Phase 1: Token Foundation & Adoption
Week 2–4 ░░▓▓▓▓▓░ Phase 2: Shared Component Library
Week 4–5 ░░░░▓▓░░ Phase 3: Accessibility & Interaction Quality
Week 5–7 ░░░░░▓▓▓ Phase 4: Theme, Responsive & UX Polish
Week 7–8 ░░░░░░░▓ Phase 5: Testing, Documentation & Governance
| Phase | Effort | Score Impact | Repos Touched |
|---|---|---|---|
| 1. Token Foundation | 4–5 days | 65% → 72% | 9 (common-plat + 8 web apps) |
| 2. Component Library | 8–10 days | 72% → 80% | 9 (common-plat + 8 web apps) |
| 3. Accessibility | 5–6 days | 80% → 88% | 8 web apps |
| 4. Theme & UX Polish | 7–8 days | 88% → 94% | 8 web apps + 1 RN app |
| 5. Testing & Docs | 4–5 days | 94% → 100% | All repos |
| TOTAL | ~30 days | 65% → 100% | 12 repos |
Dependencies & Risks
| Risk | Mitigation |
|---|---|
@bytelyst/ui takes longer than estimated |
Start with 6 P0 components, defer P2 to later sprint |
| NomGap RN hex replacement breaks screens | Run full test suite (npm test — 505 tests) after each batch |
| Responsive sidebar breaks existing layouts | Feature-flag the responsive behavior; ship behind RESPONSIVE_SIDEBAR flag |
| axe-core finds many contrast failures | Fix critical (4.5:1 text) first, defer non-critical (3:1 decorative) |
| Common-plat Storybook adds build complexity | Keep Storybook as dev-only dependency, not part of production build |
Quick Wins (Can Be Done Independently)
These items can be tackled at any time without blocking other phases:
- Add
not-found.tsx+error.tsx+loading.tsxto all 7 apps (30 min per app) - Add
:focus-visibleCSS rule to 6 apps missing it (5 min per app) - Add Lucide icons to ActionTrail + FlowMonk (currently no icon library)
- Fix NomGap web 117 hardcoded hex in components (2–3 hours)
- Fix FlowMonk 29 hardcoded hex in CSS (1 hour)
- Fix LLM Lab 31 hardcoded hex in CSS (1 hour)
Completion Criteria
The design system is at 100% when:
- Every web app imports tokens from
@bytelyst/design-tokens— zero hand-written CSS custom property blocks @bytelyst/uiexists with ≥10 shared components, consumed by ≥6 web apps- Every web app has
not-found.tsx,error.tsx,loading.tsx - Every interactive element has
focus-visible,aria-label(or visible text), and hover state - Every mutation shows toast feedback; every destructive action has confirmation
- Every web app has dark/light toggle +
prefers-color-schemesupport - Every web app has responsive sidebar (collapses at
mdbreakpoint) - NomGap RN has <20 hardcoded hex values outside theme
- Playwright a11y tests pass in CI for all 7 product web apps
- Visual regression baselines exist for all major pages
- Token drift CI check passes in common-plat
- Storybook exists for
@bytelyst/uiwith all components documented
Created 2026-03-28 by Windsurf Cascade. Derived from DESIGN_SYSTEM_AUDIT.md. Review cadence: update this document after each phase completion.