Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
chore: triage CODEX 5.5 review residue into PLAN.md
[._.]/ Adam Eivy8a9015cfe9cb
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdnew file mode 100644index 0000000000..1bcf107edc--- /dev/null+++ b/.changelog/NEXT.md@@ -0,0 +1,13 @@+# Unreleased Changes++## Added++## Changed++- **PLAN.md — CODEX 5.5 review residue folded in.** Triaged the 2026-04-25 CODEX 5.5 product/engineering review: confirmed the six concrete bugs (Brain Feeds + Time Capsule nav coverage, `/cos/scripts` dead target, `/ask` full-height workaround, client lint, route/nav contract tests) are all shipped, and added 15 unaddressed strategic items to PLAN.md under a new `### CODEX 5.5 review residue` Backlog section (perf/bundle, polling consolidation, client error reporter, network exposure UI, unified Review Queue, health provenance chips, dashboard intent layouts, autonomy guardrails, onboarding capability map, mobile task flows, operating-loop dashboard, sidebar IA collapse, visual modes, decision/provenance pattern, teaching empty states). Enriched the existing Knowledge Legacy Future Idea with the bundle scope from the review.++## Fixed++## Removed++- **`CODEX5.5_REVIEW.md`** at repo root — obsolete now that the concrete bugs are shipped and the strategic items are tracked in PLAN.md.diff --git a/CODEX5.5_REVIEW.md b/CODEX5.5_REVIEW.mddeleted file mode 100644index 82e8817c39..0000000000--- a/CODEX5.5_REVIEW.md+++ /dev/null@@ -1,322 +0,0 @@-# CODEX 5.5 Deep Product, Design, and Engineering Review--Review date: 2026-04-25--## Executive Summary--PortOS has a strong product thesis: a local-first personal operating system for one developer, combining app/process control, AI agent orchestration, second-brain capture, digital-twin modeling, health tracking, and private-network access. The project is unusually feature-rich and has several good execution patterns already in place: deep-linkable route tabs, command-palette/voice navigation backed by a shared manifest, server-side validation, a large test suite, source-backed Ask conversations, and a dashboard layout system.--The main product risk is now coherence, not capability. The app has outgrown a page-list navigation model. Important features are hidden, duplicated, or inconsistently reachable across sidebar, Cmd+K, voice, and tab bars. The dashboard and Ask surfaces are the right strategic direction, but they need to become the primary orchestration layer so the product feels like an operating system instead of a collection of powerful panels.--The main engineering risk is surface-area drift. Navigation is declared in multiple places, some routes point to non-existent tabs, some valid tabs are absent from sidebar/palette, lint is currently unusable, and the production client bundle still has a very large entry chunk. The server test suite is healthy, but client quality gates and route/nav contract tests need to catch regressions before they reach the UI.--## Verification Performed--- `npm test --prefix server`: passed, 95 test files and 2549 tests.-- `npm run build`: passed, but Vite warned that `dist/assets/index-*.js` is about 2.95 MB minified and about 736 KB gzip.-- `npm run lint --prefix client`: failed before linting source with `TypeError: expand is not a function` from `minimatch`, likely caused by the `brace-expansion` override forcing an incompatible major under ESLint's `minimatch@3` dependency.--## Highest-Priority Product and UX Findings--### P0: Navigation Has Drifted Across Sidebar, Page Tabs, Cmd+K, and Voice--PortOS declares navigation in at least three places: `client/src/components/Layout.jsx`, `server/lib/navManifest.js`, and each feature's local `TABS` constants. The comments say the nav manifest is the single source of truth for command palette and voice, but the visual sidebar still owns a separate large tree. This is now causing real UX defects.--Concrete examples:--- `Brain` has a valid `Feeds` tab in `client/src/components/brain/constants.js` and `Brain.jsx` renders it, but the sidebar omits `/brain/feeds` and `server/lib/navManifest.js` omits it. Users can only discover it if they already know the URL.-- `Digital Twin` has a valid `Time Capsule` tab in `client/src/components/digital-twin/constants.js` and `DigitalTwin.jsx` renders it, but the sidebar and nav manifest omit it.-- `Chief of Staff` sidebar and nav manifest include `/cos/scripts`, but `client/src/components/cos/constants.js` does not include a `scripts` tab. `ChiefOfStaff.jsx` derives valid tabs from that constants file, so selecting Scripts redirects/falls back to Tasks.--Recommendation: make `server/lib/navManifest.js` or a shared JSON/JS nav contract the real source for sidebar, palette, voice, and route/tab validation. Add a route/nav contract test that fails when a visible nav item points to an invalid tab or a feature tab is not discoverable unless intentionally hidden.--### P0: The Product Needs a Home-Level "Operating Loop"--The app has many domains, but the first-run and daily-return experience does not yet answer the user's core question: "What should I do now?" The dashboard is customizable and useful, but it is still a grid of widgets rather than a prioritized operating loop.--Recommended design update:--- Add a top-level daily command center with 3-5 prioritized cards: Critical System Issues, Today Calendar Commitments, Active Agent Work, Goal Next Action, Health/Recovery Signal.-- Give each card a single primary action and one secondary drill-down.-- Let the user explicitly mark a day mode: `Focus`, `Ops`, `Health`, `Review`, or `Autonomous`.-- Use the Digital Twin, chronotype, calendar, goals, and CoS state to rank the cards instead of showing each system equally.--This would turn PortOS from "everything available" into "the system makes judgment calls on my behalf", which directly matches the project goals.--### P1: Ask Yourself Should Become the Primary Cross-Domain Surface--The `/ask` implementation is strategically valuable because it finally unifies Brain, Memory, Autobiography, Goals, and Calendar. The current UI is credible, with modes and source chips, but it is still a standalone chat page.--Recommended functionality updates:--- Add one-click promotions per assistant answer: Save as Brain note, Create CoS task, Attach to Goal, Add calendar block, Draft message.-- Add source health warnings: "No calendar source used", "No goal source found", "Only stale memories found".-- Add answer confidence/provenance summaries so users know whether the system is guessing or grounded.-- Add typed prompt starters for common jobs: "What should I do today?", "What am I avoiding?", "Draft as me", "What changed since yesterday?", "What should CoS run next?"-- Make Ask callable inline from dashboard widgets and Cmd+K, not just as a destination page.--### P1: Sidebar Scale Is Past the Point Where Hierarchy Alone Works--The sidebar carries a very large number of items and nested sections. Cmd+K helps power users, but visual browsing on mobile and tablet is still too heavy. The current IA also mixes domains, tools, settings, social agents, and experiments at the same level.--Recommended design update:--- Keep the sidebar for 8-10 top-level domains only: Home, Ask, Apps, CoS, Brain, Calendar, Goals, Health, Dev Tools, Settings.-- Move deep tabs into each page's local tab bar and into Cmd+K.-- Add "Recent" and "Pinned" sections in the sidebar for the user's actual working set.-- Add contextual breadcrumbs or page header actions so a user knows which domain they are in without scanning the whole sidebar.--### P1: Dashboard Editing Is Powerful but Too Technical--Dashboard layout persistence and arranging are well-executed, but "Arrange" exposes a grid mechanic rather than a product concept. Users need intention-first controls.--Recommended design update:--- Rename layouts around user intent, not layout mechanics: `Morning Review`, `Deep Work`, `Ops`, `Health`, `Agent Watch`.-- Add "Make this my morning default" and time-window defaults.-- Add widget suggestions based on hidden available data: "You have calendar data but no calendar widget in this layout."-- On mobile, expose layout switching and widget order, but keep spatial arrangement disabled as it is today.--### P1: Health and Mortality Features Need Trust Framing--MeatSpace, genome, death clock, blood work, alcohol/nicotine tracking, and longevity scoring are compelling but sensitive. The UX should be explicit about whether a recommendation is data-backed, inferred, experimental, or just a prompt.--Recommended design update:--- Add confidence labels and source panels to health insights, mirroring Ask's source-chip approach.-- Separate tracking facts from recommendations and speculative projections.-- Add a disclaimer and "what would change this estimate?" explainer for mortality/longevity views.-- Add clinician/export views for blood and lifestyle data, even if the product is single-user.--## Concrete Bugs and Execution Issues--### P0: Client Lint Is Broken by Dependency Overrides--`npm run lint --prefix client` crashes before source linting. `client/package.json` overrides `brace-expansion` to `^5.0.5`, while ESLint's config stack depends on `minimatch@3`, which expects the older CommonJS `brace-expansion` API. The observed failure is `TypeError: expand is not a function`.--Impact: client lint currently cannot protect against regressions, unused code, hook dependency problems, or accessibility mistakes.--Recommended fix: narrow the security override so `minimatch@3` can resolve a compatible `brace-expansion`, or upgrade the ESLint dependency chain to versions compatible with `brace-expansion@5`. After fixing, add client lint to the normal verification path.--### P0: `/cos/scripts` Is a Dead Navigation Target--Evidence:--- Sidebar includes `{ to: '/cos/scripts', label: 'Scripts' }`.-- `server/lib/navManifest.js` includes `nav.cos.scripts`.-- `client/src/components/cos/constants.js` has no `scripts` tab.-- `ChiefOfStaff.jsx` treats valid tabs as `new Set(TABS.map(t => t.id))`, so unknown tabs fall back to Tasks.--Impact: sidebar, Cmd+K, and voice can route the user to a page that silently does not exist.--Recommended fix: either implement a Scripts tab or remove `/cos/scripts` from both sidebar and nav manifest.--### P1: Hidden Valid Tabs Reduce Feature Discoverability--Evidence:--- `Brain` supports `feeds`, but sidebar and nav manifest omit it.-- `Digital Twin` supports `time-capsule`, but sidebar and nav manifest omit it.--Impact: shipped features look missing, and voice/Cmd+K cannot reach them.--Recommended fix: add the missing entries or explicitly mark them hidden/experimental in a shared nav contract so the omission is deliberate and testable.--### P1: `/ask` Is Wrapped Like a Normal Content Page but Implements a Full-Height App--`Layout.jsx` only treats selected routes as full-width/full-height. `/ask` is not included, so it is rendered inside the default padded `max-w-7xl` wrapper. `Ask.jsx` then compensates with `h-[calc(100vh-4rem)] -m-4`, which is brittle and mismatched with the layout shell.--Impact: chat sidebars and transcript height can feel cramped on desktop and risk scroll/viewport issues on mobile.--Recommended fix: classify `/ask` as full-width in `Layout.jsx` and remove the negative-margin workaround from `Ask.jsx`.--### P1: Production Entry Chunk Is Too Large--The production build passes, but the main `index-*.js` chunk is about 2.95 MB minified / 736 KB gzip. `App.jsx` still statically imports several heavy pages and many dashboard widgets are pulled into the initial graph.--Impact: slower cold load over Tailscale/mobile, especially on phones and tablets, which are part of the product promise.--Recommended fix:--- Lazy-load more route pages, especially `Brain`, `DigitalTwin`, `MeatSpace`, `Messages`, `Dashboard` widget internals, and other non-home domains.-- Split dashboard widgets by registry entry using lazy components.-- Use bundle visualization in CI to track regressions.--### P2: Polling Is Inconsistent and Overused--Several pages use local `setInterval` polling while other systems already use Socket.IO. Examples include Brain, Digital Twin, Chief of Staff, Links, Processes, Browser, CyberCity, and many widgets.--Impact: unnecessary network chatter, duplicated loading logic, inconsistent freshness, and harder mobile battery behavior.--Recommended fix: standardize on `useAutoRefetch` for low-priority polling and Socket.IO subscriptions for event-driven domains. Add a route visibility pause so background tabs do not keep polling aggressively.--### P2: Global Error Handling Hides Client Failures From Product Feedback Loops--`main.jsx` logs global errors and unhandled rejections to console, but the product's premise is self-improvement and autonomous issue capture. These client errors should feed the same notification/review/CoS pathway as server errors.--Recommended fix: add a client error reporter endpoint with redaction and rate limits. Surface grouped client errors in Review Hub and optionally create CoS tasks.--## Design System Recommendations--### Establish Product-Specific Visual Modes--The current visual language is consistent but heavily default-dark-dashboard. CyberCity, CoS avatars, and some pixel fonts show a stronger identity. Bring that intentionality into the main surfaces:--- `Ops` mode: dense, terminal-like, high signal, minimal animation.-- `Focus` mode: quiet, spacious, only next actions.-- `Health` mode: warmer, less cyber, clearer trust/explanation.-- `Review` mode: document-like, optimized for reading and decisions.--### Add a Decision/Provenance Pattern Everywhere--Ask source chips are a good pattern. Reuse it across CoS, Insights, Health, Goals, and Dashboard:--- "Why am I seeing this?"-- "What data backs this?"-- "What changed?"-- "What can I do next?"--### Make Empty States Teach the Workflow--For a personal OS, empty states should not just say "no data". They should guide setup:--- "Connect calendar to unlock schedule-aware goals."-- "Add birth date and genome file to unlock longevity estimates."-- "Capture 10 notes to improve Ask Yourself."-- "Configure one API provider to enable autonomous CoS."--## Functionality Recommendations--### 1. Unified Review Queue--Create one cross-domain Review Queue that collects:--- Brain inbox items needing classification review.-- Ask answers ready for promotion.-- CoS completed tasks needing approval.-- Message drafts awaiting send.-- Health anomalies needing acknowledgement.-- Failed syncs/imports/backups.--This should be the user's "inbox zero" for PortOS.--### 2. Autonomy Guardrails and Audit Trail--The project goal includes full digital autonomy. Before expanding autonomy, add visible controls:--- Autonomy level per domain, not just CoS globally.-- Dry-run vs execute mode.-- Spending/time/token budgets.-- Destructive-action confirmation policy.-- "What did agents do while I was away?" briefing.--### 3. Onboarding and Capability Map--Even for a single-user product, setup debt matters. Add a capability map showing which systems are active, partially configured, or blocked:--- Providers-- Calendar-- Brain/memory embeddings-- Voice-- Tailscale HTTPS-- Genome/health imports-- Telegram/messages-- App registry/PM2--### 4. Mobile Task Flows--The README promises mobile-first access. Prioritize 5 phone-native flows:--- Check system health and restart an app.-- Capture a thought by voice/text.-- Ask "what should I do now?"-- Approve/reject CoS result.-- Log health/lifestyle event in under 10 seconds.--### 5. Personal Knowledge Legacy Export--GOALS.md calls out Knowledge Legacy as early. Add an export bundle that includes:--- Autobiography-- Brain notes and memories-- Key decisions-- Goals and milestones-- Digital twin prompt-- Health summaries with source caveats-- Machine-readable manifest--## Engineering Recommendations--### 1. Add Route/Nav Contract Tests--Tests should assert:--- Every sidebar route exists.-- Every nav manifest route exists.-- Every feature `TABS` entry is reachable by sidebar or Cmd+K unless marked hidden.-- No nav item points to a tab rejected by the destination page.--### 2. Fix Client Lint and Add Frontend Test Coverage--The server has strong coverage; the client has little visible automated protection. After lint is fixed, add targeted tests for:--- Command palette ranking and dispatch.-- Dashboard layout save/reconcile behavior.-- Ask streaming state transitions.-- Route/tab validation.-- Sidebar mobile open/close behavior.--### 3. Reduce App-Shell Bundle Weight--Move more pages and widget components behind lazy imports. Keep the shell, dashboard skeleton, command palette, theme, notifications, and current route in the initial bundle; everything else can load on demand.--### 4. Normalize API Error and Loading UX--Many client calls silently catch failures or return null. For an operating system UI, failures should be visible, grouped, and actionable.--Recommended pattern:--- Use a standard `LoadState` wrapper for loading/error/empty/success.-- Log swallowed errors with context.-- Route recurring failures into Review Hub.--### 5. Treat Local-Only Security as Product UX, Not Just Docs--The docs correctly say the app is meant for private Tailscale networks. The UI should still display network exposure state:--- Current bind address and scheme.-- Whether HTTPS is active.-- Whether voice/mic will work remotely.-- Whether public exposure is detected.-- Links to hardening docs.--## Suggested Roadmap--### Next 1-2 Days--- Fix client lint dependency conflict.-- Remove or implement `/cos/scripts`.-- Add missing nav entries for Brain Feeds and Digital Twin Time Capsule, or mark them intentionally hidden.-- Add `/ask` to the full-width route list and remove the negative-margin layout workaround.--### Next 1-2 Weeks--- Add route/nav contract tests.-- Add a unified Review Queue MVP.-- Convert dashboard into a prioritized "Today / Now / Next" operating loop.-- Add Ask answer promotion actions.-- Begin route-level lazy loading to reduce the entry chunk.--### Next 1-2 Months--- Collapse sidebar to top-level domains plus pinned/recent.-- Add capability map and setup health.-- Add autonomy guardrails and away-briefing.-- Add trust/provenance panels to health, insights, and CoS recommendations.-- Add legacy export format.--## Overall Assessment--PortOS is past the "can this work?" phase. It works, it has breadth, and the server-side execution discipline is better than typical personal tools. The next step is product editing: make the system more opinionated, reduce navigation entropy, and turn the dashboard/Ask/Review Hub triad into the center of gravity.--The highest-leverage technical work is not adding another feature. It is enforcing navigation contracts, restoring client lint, cutting the initial bundle, and making every autonomous or AI-generated output explainable and promotable.diff --git a/PLAN.md b/PLAN.mdindex 41412d9069..f57c939190 100644--- a/PLAN.md+++ b/PLAN.md@@ -136,6 +136,34 @@ _Nothing currently parked — pick the next item from the Backlog._- [ ] [shots-aware-scene-output-contract-partial-split] **Shots-aware scene-output-contract partial.** Split into `_partials/scene-fields-core.md` + `_partials/scene-fields-shots.md` when a third shots-using stage appears.- [ ] [per-panel-scene-image-progress-in-the-pipeline-ui] **Per-panel/scene image progress in the Pipeline UI.** ComicPages and Storyboards record `jobId` but don't subscribe to the media-job SSE for live preview.+### CODEX 5.5 review residue (deferred from product/engineering review, 2026-04-25)++The 2026-04-25 CODEX 5.5 review's concrete bugs (Brain Feeds nav, Time Capsule nav, `/cos/scripts` dead target, `/ask` full-height, client lint, route/nav contract tests) are all shipped. These are the strategic items left open from that review.++**Engineering / performance**++- [ ] [codex5-bundle-lazy-routes] **[P1][PERF]** Route-level + dashboard-widget lazy loading. Review measured `dist/assets/index-*.js` at ~2.95 MB minified / ~736 KB gzip. `App.jsx` statically imports several heavy pages (`Brain`, `DigitalTwin`, `MeatSpace`, `Messages`, `Dashboard`) and the widget registry pulls all widgets into the initial graph. Lazy-load via `React.lazy` + `Suspense`; convert `widgetRegistry.jsx` entries to lazy components so widgets only download when their layout includes them. Add a bundle-visualization step (`rollup-plugin-visualizer`) and track regressions.+- [ ] [codex5-polling-consolidation] **[P2][PERF]** Standardize polling on `useAutoRefetch` + sockets + visibility pause. Brain, Digital Twin, CoS, Links, Processes, Browser, CyberCity, and several widgets still spin local `setInterval`s. Pick a single hook (`client/src/hooks/useAutoRefetch.js` if it exists, otherwise extract one), add `document.visibilityState === 'hidden'` short-circuit, and migrate domains that already have Socket.IO event streams to event-driven refetch.+- [ ] [codex5-client-error-reporter] **[P2][OBSERVABILITY]** Funnel client errors into Review Hub. `client/src/main.jsx`'s `window.onerror` + `unhandledrejection` listeners only `console.log` today. Add `POST /api/client-errors` with redaction (drop tokens / long payloads) + rate-limit (~1/sec, drop duplicates by message+stack hash). Surface grouped client errors in the Review Hub feed; optionally raise a CoS task at a configurable threshold.+- [ ] [codex5-network-exposure-ui] **[P2][SECURITY-UX]** Network-exposure status banner / settings panel. Surface in-app: current bind address + scheme (HTTP vs HTTPS), whether the loopback HTTP mirror on `:5553` is active, voice/mic availability over the current scheme, Tailscale-vs-public bind detection, and a link to `docs/PORTS.md`. CLAUDE.md is explicit that PortOS is single-user behind Tailscale — this widget enforces that as visible product UX rather than a docs-only invariant.++**Product UX — concrete, medium scope**++- [ ] [codex5-unified-review-queue] **[P1][PRODUCT]** Cross-domain Review Queue (the "inbox zero" for PortOS). One page (`/review` or `/inbox`) that collects: Brain inbox items needing classification, Ask answers ready for promotion, CoS completed tasks pending approval, Message drafts awaiting send, Health anomalies pending acknowledgement, and failed syncs / imports / backups. Each row has accept / dismiss / drill-down. Build the surface aggregator first, then opt each producer into it.+- [ ] [codex5-health-provenance-chips] **[P1][HEALTH][TRUST]** Extend Ask's source-chip pattern to MeatSpace / genome / death clock / longevity views. Each insight tags itself as `data-backed | inferred | experimental | speculative` with a "what would change this?" explainer and a clinician-export view for blood + lifestyle data. Pairs with `[codex5-decision-provenance-everywhere]`.+- [ ] [codex5-dashboard-intent-layouts] **[P2][DASHBOARD]** Intent-named layouts + morning default + widget suggestions. Rename built-in layouts to user-intent (`Morning Review`, `Deep Work`, `Ops`, `Health`, `Agent Watch`); update `server/services/dashboardLayouts.js` seeded built-ins. Add a "make this my morning default" toggle that activates a layout in a configured time window. Add a "widget suggestion" hint: when a layout omits a widget whose data source is populated (e.g. layout has no calendar widget but calendar is connected), surface an inline "Add Calendar?" affordance.+- [ ] [codex5-autonomy-guardrails] **[P1][AUTONOMY]** Per-domain autonomy levels + dry-run + budgets + while-away briefing. Today CoS has a single global autonomy posture. Split into per-domain knobs (Brain auto-classify, Memory auto-extract, CoS auto-run, Messages auto-send) each with `off | dry-run | execute`. Add spending / time / token budgets per domain. Add a "what did agents do while I was away?" digest pulling from the existing CoS / agent run logs into a daily briefing card.+- [ ] [codex5-onboarding-capability-map] **[P2][ONBOARDING]** Capability map of connected systems. One page showing each integration's status: Providers (per-provider configured/available/throttled), Calendar, Brain/memory embeddings, Voice (mic + TTS), Tailscale + HTTPS, Genome/health imports, Telegram/messages, App registry/PM2. Each row links to the relevant settings page. Doubles as a setup checklist and a runtime health overview.+- [ ] [codex5-mobile-task-flows] **[P2][MOBILE]** Five phone-native flows: (1) system health + one-tap restart of an app, (2) one-tap voice/text Brain capture, (3) "what should I do now?" Ask, (4) approve / reject a CoS result from a notification, (5) log a health/lifestyle event in ≤10 seconds. Each should be reachable in ≤2 taps from a Tailscale-launched mobile session.++**Product UX — vision / large redesigns**++- [ ] [codex5-operating-loop-dashboard] **[P0][PRODUCT]** Top-level daily command center / operating loop. Replace the homepage-equivalent dashboard with 3–5 prioritized cards: Critical System Issues, Today's Calendar Commitments, Active Agent Work, Goal Next Action, Health/Recovery Signal. Each card gets one primary action + one drill-down. Add an explicit day-mode selector (`Focus | Ops | Health | Review | Autonomous`) that re-ranks the cards. Pulls signals from Digital Twin, chronotype, calendar, goals, and CoS. Treat as a multi-PR design spike — investigation + mockups first.+- [ ] [codex5-sidebar-collapse-ia] **[P1][IA]** Collapse sidebar to 8–10 top-level domains + Pinned + Recent. Today the sidebar carries deep nested tabs at the same level as top-level domains; review recommends `Home, Ask, Apps, CoS, Brain, Calendar, Goals, Health, Dev Tools, Settings` only at the top level with deep tabs pushed into each page's local tab bar and Cmd+K. Add Pinned + Recent sections driven by the user's actual working set. Touch every consumer of `Layout.jsx`'s nav tree; expect alphabetical ordering convention to survive.+- [ ] [codex5-visual-modes] **[P2][DESIGN]** Product-specific visual modes: `Ops` (dense terminal-like, minimal animation), `Focus` (quiet, spacious, only next actions), `Health` (warmer, less cyber, more explanation), `Review` (document-like, optimized for reading + decisions). Tied to the day-mode selector from `[codex5-operating-loop-dashboard]`. Extend the existing Tailwind token system rather than introducing a parallel theming layer.+- [ ] [codex5-decision-provenance-everywhere] **[P2][DESIGN]** Decision/provenance pattern across CoS, Insights, Health, Goals, Dashboard widgets. Each AI-generated or rule-driven surface answers: "Why am I seeing this?", "What data backs this?", "What changed?", "What can I do next?" Reuse the Ask source-chip component. Pairs with `[codex5-health-provenance-chips]`.+- [ ] [codex5-empty-states-teach] **[P3][ONBOARDING]** Workflow-teaching empty states. Each "no data" state replaces "Nothing here" with a setup hint that names the next action: "Connect calendar to unlock schedule-aware goals", "Add birth date + genome file to unlock longevity estimates", "Capture 10 notes to improve Ask Yourself", "Configure one API provider to enable autonomous CoS". Inventory empty states first, then prioritize by which pages new users hit earliest.+---## Deferred Architecture (human-led planning)@@ -182,7 +210,7 @@ God-file decomposition candidates — none are bugs; pick up when touching the f- **Goal Decomposition Engine** — auto-decompose goals into task sequences.- **Knowledge Graph Visualization** — extend BrainGraph 3D to full knowledge graph.- **Autobiography Prompt Chains** — LLM follow-ups building on prior answers.-- **Legacy Export Format** — identity as portable Markdown/PDF (closes GOALS "Knowledge Legacy" gap currently at Early status).+- **Legacy Export Format** — identity as portable Markdown/PDF (closes GOALS "Knowledge Legacy" gap currently at Early status). Bundle scope: autobiography, Brain notes + memories, key decisions, goals + milestones, digital-twin prompt, health summaries with source caveats, and a machine-readable manifest.- **Workspace Contexts** — project context syncing across shell, git, tasks.- **Inline Code Review Annotations** — one-click fix from self-improvement findings.- **Major Dependency Upgrades** — React 19, Zod 4, PM2 6, Vite 8.