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
docs: refresh roadmap and add Health & Longevity as core goal
Adam Eivyeb4a754290b7
diff --git a/.changelog/v1.13.x.md b/.changelog/v1.13.x.mdnew file mode 100644index 0000000000..eedd8b692d--- /dev/null+++ b/.changelog/v1.13.x.md@@ -0,0 +1,17 @@+# Release v1.13.x - Changelog++Released: YYYY-MM-DD++## Overview++Roadmap and goals refresh — added Health & Longevity as a core goal, defined M45-M47, cleaned up completed milestones and stale backlog items.++## Improvements++- **GOALS.md: Health & Longevity core goal** — added Goal 10 covering MeatSpace health tracking, mortality projections, LEV tracking, and meatspace goal management; updated tagline and purpose to reflect health as a project pillar+- **GOALS.md: Secondary goals cleanup** — removed shipped items (Behavioral Feedback Loop, Mortality-Aware Goal Tracking), added forward-looking items (Apple Health Integration, Chronotype-Aware Scheduling)+- **GOALS.md: Current State refresh** — updated all goal statuses, replaced stale Direction section with PLAN.md pointer+- **PLAN.md: New milestones** — added M45 (Data Backup & Recovery), M46 (Unified Search Cmd+K), M47 (Push Notifications) with full specs+- **PLAN.md: Completed milestones** — moved M42 P1-P4 and M44 P1-P5 to Completed section, added In Progress section for M44 P6 migration cleanup+- **PLAN.md: Tier backlog cleanup** — marked shipped Tier 1 items (Mortality-Aware Goal Widget, Behavioral Feedback Loop), updated partial items with current status notes, promoted Unified Search from Tier 4 to M46+- **PLAN.md: Next Actions** — replaced stale strikethrough list with active prioritized queuediff --git a/GOALS.md b/GOALS.mdindex 22b844cbf7..9fc2c160aa 100644--- a/GOALS.md+++ b/GOALS.md@@ -1,10 +1,10 @@# PortOS — Goals-> A self-hosted operating system for your dev machine that centralizes app management, AI agent orchestration, personal knowledge capture, and digital identity modeling into a single dashboard — accessible anywhere via Tailscale.+> A self-hosted operating system for your dev machine that centralizes app management, AI agent orchestration, personal knowledge capture, digital identity modeling, and health tracking into a single dashboard — accessible anywhere via Tailscale.## Purpose-PortOS transforms a local development machine into an intelligent personal operating system. This app is intended to help the user manage their life, their goals, their projects, and their machines. It exists to solve the fragmentation of developer workflows — managing apps, orchestrating AI agents, capturing knowledge, and modeling personal identity are all scattered across dozens of tools with no unified interface. PortOS brings these together in a single dashboard that runs on your own hardware, keeps your data local, and is accessible from any device on your private Tailscale network.+PortOS transforms a local development machine into an intelligent personal operating system. This app is intended to help the user manage their life, their health, their goals, their projects, and their machines. It exists to solve the fragmentation of developer workflows — managing apps, orchestrating AI agents, capturing knowledge, tracking health, and modeling personal identity are all scattered across dozens of tools with no unified interface. PortOS brings these together in a single dashboard that runs on your own hardware, keeps your data local, and is accessible from any device on your private Tailscale network.## Core Goals@@ -44,11 +44,15 @@ Preserve personal knowledge, identity, decision-making patterns, and life storyTailscale VPN enables secure access from any device without public internet exposure. The entire system — dashboard, shell, browser, AI agents — is available from your phone, tablet, or any remote machine on your mesh network.+### 10. Health & Longevity++Help the user live a long, healthy life. MeatSpace tracks physical health data — alcohol consumption, blood work, body metrics, epigenetic age, eye health, genome markers, and lifestyle factors — and surfaces it alongside mortality projections and longevity escape velocity tracking. Combined with genome-derived life expectancy and mortality-aware goal scoring, the system makes health data actionable: not just recording what happened, but informing what to do next. The same goal-tracking system that manages digital projects manages meatspace goals — exercise targets, biomarker improvements, habit changes — with the same urgency scoring and progress visualization.+## Secondary Goals-- **Behavioral Feedback Loop**: "Sounds like me" response validation with adaptive weighting to continuously refine the digital twin-- **Mortality-Aware Goal Tracking**: Birth date + genome longevity markers to urgency-score goals based on projected lifespan- **Multi-Modal Identity Capture**: Voice, video, and image-based identity modeling beyond text+- **Apple Health Integration**: Live sync from iOS and bulk historical import to unify all health data in one place+- **Chronotype-Aware Scheduling**: Align task scheduling to natural energy patterns derived from genome sleep markers## Non-Goals@@ -64,29 +68,20 @@ PortOS is built for Adam Eivy — a single developer managing active git repos,## Current State+See [PLAN.md](./PLAN.md) for detailed milestone tracking and roadmap.+| Goal | Status | Notes ||------|--------|-------|-| Centralized App Management | Complete | Core infrastructure (M0-M4, M9, M17-M18) all shipped. |-| Autonomous AI Orchestration | In Progress | CoS fully operational (M14, M19-M31, M35, M37, M40). Learning system active. Continuous refinement. |-| Personal Knowledge Management | In Progress | Brain (M32) and Memory (M16, M31) complete. Digest system running. Ongoing quality tuning. |-| Digital Identity Modeling | In Progress | Soul (M33), Digital Twin (M34 P1-P2,P4), Genome, Autobiography complete. Identity orchestrator (M42) planned next. |-| Developer Productivity Toolkit | Complete | Shell, git, browser (M36), history, usage, CyberCity (M41) all shipped. |-| Self-Improving Intelligence | In Progress | Task learning (M25), self-improvement (M23), autonomous jobs (M37) active. Self-healing metrics recently added. |-| Full Digital Autonomy | In Progress | Agent tools (M38), Moltworld (M43), scheduling (M26, M30) operational. Expanding platform coverage. |-| Knowledge Legacy | Early | Autobiography prompts (M34 P5) launched. Genome data captured. Long-term preservation strategy not yet defined. |+| Centralized App Management | Complete | Core infrastructure, app wizard, streaming import, PM2 standardization. |+| Autonomous AI Orchestration | Ongoing | CoS, agent runner, skill system, autonomous jobs, task learning all operational. Continuous refinement. |+| Personal Knowledge Management | Ongoing | Brain capture, semantic memory, weekly digests, memory classification all complete. Quality tuning continues. |+| Digital Identity Modeling | Ongoing | Soul, digital twin, identity orchestrator (M42 P1-P4), behavioral feedback, taste profiling, autobiography all shipped. Cross-insights engine (M42 P5) next. |+| Developer Productivity Toolkit | Complete | Shell, git, browser, history, usage, JIRA, CyberCity all shipped. |+| Self-Improving Intelligence | Ongoing | Task learning, self-improvement analysis, autonomous jobs, self-healing metrics active. |+| Full Digital Autonomy | Ongoing | Agent tools, Moltworld, scheduling, skill system operational. Expanding platform coverage and autonomy tiers. |+| Knowledge Legacy | Early | Autobiography, genome, behavioral profiles captured. Legacy export format not yet built. || Anywhere Access | Complete | Tailscale integration working. Mobile-responsive UI. All features accessible remotely. |--## Direction--PortOS is entering its **identity integration phase**. The next major work (M42) unifies the digital twin, genome, chronotype, and behavioral data under a single identity orchestrator. This enables:--1. **Chronotype-aware scheduling** — CoS tasks aligned to your natural energy patterns derived from genome sleep markers-2. **Personalized AI prompting** — Every AI interaction informed by unified identity context-3. **Mortality-aware goals** — Urgency scoring based on projected lifespan--Beyond M42, the trajectory is toward deeper autonomy (agents that need less supervision), richer identity modeling (multi-modal capture, behavioral feedback loops), and knowledge preservation as a durable legacy.--Recent momentum: 43 milestones shipped, security audit (S1-S10) complete, v0.18.5 on dev. The project iterates rapidly — 3 minor versions in the last month with both features and hardening in each release.+| Health & Longevity | Ongoing | MeatSpace shipped with death clock, LEV tracker, alcohol/blood/body/epigenetic/eye/genome/lifestyle tracking. Apple Health integration planned. |## Operational Goalsdiff --git a/PLAN.md b/PLAN.mdindex e85de352da..61db87c0cb 100644--- a/PLAN.md+++ b/PLAN.md@@ -70,16 +70,23 @@ pm2 logs- [x] **M39**: Agent-Centric Drill-Down - Redesigned Agents section with agent-first hierarchy, deep-linkable URLs, and scoped sub-tabs- [x] **M40**: Agent Skill System - Task-type-specific prompts, context compaction, negative routing examples, deterministic workflow skills. See [Agent Skills](./docs/features/agent-skills.md)- [x] **M41**: CyberCity Immersive Overhaul - Procedural synthwave audio, enhanced post-processing, reflective wet-street ground, settings system+- [x] **M42 P1-P3**: Unified Digital Twin Identity System - Identity orchestrator, chronotype derivation, personalized taste prompting, behavioral feedback loop, mortality-aware goal tracking+- [x] **M42 P4**: Unified Digital Twin Identity System - Identity Tab UI dashboard with completeness header, 5 summary cards, derive actions- [x] **M43**: Moltworld Platform Support - Second platform integration for AI agents in a shared voxel world+- [x] **M44 P1-P5**: MeatSpace - Health tracker with death clock, LEV 2045 tracker, alcohol logging, blood/body/epigenetic/eye tracking, lifestyle questionnaire, TSV import, dashboard widget, compact grid overview++### In Progress++- [ ] **M44 P6**: MeatSpace - Genome/Epigenetic Migration cleanup (genome routes moved, but route comments still reference `/api/digital-twin/genome/` and IdentityTab still renders a Genome card with broken link to `/digital-twin/genome`)### Planned- [ ] **M34 P5-P7**: Digital Twin - Multi-modal capture, advanced testing, personas-- [x] **M42 P4**: Unified Digital Twin Identity System - Identity Tab UI dashboard with completeness header, 5 summary cards, derive actions- [ ] **M42 P5**: Unified Digital Twin Identity System - Cross-Insights Engine. See [Identity System](./docs/features/identity-system.md)-- [x] **M44 P1-P5**: MeatSpace - Health tracker with death clock, LEV 2045 tracker, alcohol logging, blood/body/epigenetic tracking, lifestyle questionnaire, TSV import, dashboard widget, compact grid overview-- [ ] **M44 P6**: MeatSpace - Genome/Epigenetic Migration from Digital Twin to MeatSpace- [ ] **M44 P7**: MeatSpace - Apple Health Integration (live sync via Health Auto Export app + bulk XML import)+- [ ] **M45**: Data Backup & Recovery - Scheduled backup of `./data/` to external drive or NAS. All persistence is JSON files with zero redundancy — one bad write or disk failure loses brain, identity, health, and memory data. Incremental backup with restore verification.+- [ ] **M46**: Unified Search (Cmd+K) - Global search across brain, memory, history, agents, tasks, and apps. Hybrid vector + BM25 extended to all data sources. Keyboard-driven launcher overlay.+- [ ] **M47**: Push Notifications - Webhook-based alerts when agents complete tasks, critical errors occur, or goals stall. Discord/Telegram integration for mobile awareness without needing the dashboard open.---@@ -111,12 +118,87 @@ Bring Apple Health data into MeatSpace via two complementary paths: live sync fr*Touches: server/routes/health.js, server/services/healthIngest.js, MeatSpace UI, data/health/*+### M45: Data Backup & Recovery++All PortOS data lives in `./data/` as JSON files with no redundancy. A corrupted write, accidental deletion, or disk failure loses everything — brain captures, digital identity, health records, memory embeddings, agent state, and run history.++**Scheduled Backup**+- Configurable backup target (external drive path, NAS mount, or rsync destination)+- Incremental backups using file modification timestamps — only copy changed files+- Configurable schedule (daily default) via existing automation scheduler+- Retention policy: keep N daily + N weekly snapshots, prune older+- Backup manifest with file checksums for integrity verification++**Restore**+- `POST /api/backup/restore` — restore from a named snapshot+- Dry-run mode that shows what would change before applying+- Per-directory selective restore (e.g., restore only `data/brain/` without touching `data/cos/`)++**Dashboard Widget**+- Last backup time, next scheduled backup, total backup size+- Backup health status (green/yellow/red based on age and integrity)+- One-click manual backup trigger++*Touches: new server/services/backup.js, server/routes/backup.js, Dashboard widget, settings.json, automation scheduler*++### M46: Unified Search (Cmd+K)++Global keyboard-driven search across all PortOS data sources from any page.++**Search Sources**+- Brain captures (ideas, projects, people, admin)+- Semantic memory (vector + BM25 hybrid, already exists)+- Command history and AI run history+- Agent activity and task logs+- Apps registry+- Digital twin documents, autobiography, taste summaries+- MeatSpace health entries++**UI**+- `Cmd+K` / `Ctrl+K` opens search overlay from any page+- Type-ahead with categorized results (Brain, Memory, Apps, History, etc.)+- Result cards with source icon, snippet, and timestamp+- Click navigates to deep-linked location (e.g., specific brain capture, agent run, history entry)++**Implementation**+- Server-side `/api/search` endpoint that fans out to existing service search functions+- Client-side `GlobalSearch` component mounted in Layout.jsx+- Debounced input with 200ms delay+- Results ranked by relevance with source-type boosting++*Touches: new server/routes/search.js, new server/services/search.js, new client/src/components/GlobalSearch.jsx, Layout.jsx*++### M47: Push Notifications++External notification delivery for critical events when not actively viewing the dashboard.++**Notification Channels**+- Discord webhook (post to a private channel)+- Telegram bot (send to chat ID)+- Generic webhook (POST JSON to any URL)+- Configurable per-channel: which event types to send++**Events**+- Agent task completed (with success/failure status and summary)+- Critical errors (PM2 crash, autofixer triggered)+- Goal milestone reached+- CoS health alert (agent stuck, high failure rate)+- Backup completed or failed (M45)++**Configuration**+- Settings page section for notification channels+- Per-channel event type toggles+- Test button to verify delivery+- Rate limiting to prevent notification spam (max N per hour per channel)++*Touches: new server/services/pushNotify.js, server/routes/settings.js, Settings UI, cosEvents.js, errorRecovery.js*+### Tier 1: Identity Integration (aligns with M42 direction)-- **Chronotype-Aware Scheduling** — Derive peak-focus windows from genome sleep markers; schedule deep-work tasks during peak hours, routine tasks during low-energy. Display energy curve on Schedule tab. *Touches: taskSchedule.js, genome.js, CoS Schedule tab*-- **Identity Context Injection** — Build identity brief from EXISTENTIAL.md, taste, personality, autobiography; inject as system preamble for AI calls via toolkit. Per-task-type toggle. *Touches: portos-ai-toolkit, runner.js, CoS Config*-- **Mortality-Aware Goal Widget** — Life urgency score per goal from birth date + genome longevity markers. Visual timeline of projected remaining years. *(Overlaps M42 P3)* *Touches: Dashboard widgets, goalProgress.js, genome.js*-- **Behavioral Feedback Loop** — "Sounds like me / Doesn't sound like me" toggle on agent-generated content. Adaptive style model with weighted scoring. *(Overlaps M34 P3)* *Touches: Agent Tools UI, Digital Twin service*+- **Chronotype-Aware Scheduling** — Chronotype derivation exists (M42 P1) but isn't applied to task scheduling yet. Use peak-focus windows from genome sleep markers to schedule deep-work tasks during peak hours, routine tasks during low-energy. Display energy curve on Schedule tab. *Touches: taskSchedule.js, genome.js, CoS Schedule tab*+- **Identity Context Injection** — Identity context is used for taste questions (M42 P2.5) but not yet injected as a system preamble for general AI calls. Build identity brief from EXISTENTIAL.md, taste, personality, autobiography; inject via toolkit. Per-task-type toggle. *Touches: portos-ai-toolkit, runner.js, CoS Config*+- ~~**Mortality-Aware Goal Widget**~~ ✅ Shipped as M42 P3+- ~~**Behavioral Feedback Loop**~~ ✅ Shipped as M34 P3### Tier 2: Deeper Autonomy@@ -134,7 +216,7 @@ Bring Apple Health data into MeatSpace via two complementary paths: live sync fr### Tier 4: Developer Experience-- **Unified Search (Cmd+K)** — Global search across brain, memory, history, agents, tasks, apps. Hybrid vector + BM25 extended to all data sources. *Touches: New GlobalSearch component, Layout.jsx*+- ~~**Unified Search (Cmd+K)**~~ → Promoted to M46- **Dashboard Customization** — Drag-and-drop widget reordering, show/hide toggles, named layouts ("morning briefing", "deep work"). *Touches: Dashboard.jsx, settings.js, dnd-kit*- **Workspace Contexts** — Active project context that syncs shell, git, tasks, and browser to current project. Persists across navigation. *Touches: Settings state, Layout context, Shell/Git/Browser*- **Inline Code Review Annotations** — Surface self-improvement findings as inline annotations in a code viewer. One-click "fix this" spawns CoS task. *Touches: New code viewer, selfImprovement.js*@@ -188,8 +270,8 @@ All 10 audit items (S1–S10) from the 2025-02-19 security audit have been resol## Next Actions-1. ~~**M42 P1: Identity Orchestrator & Chronotype**~~ ✅ - Identity service, chronotype derivation from genome sleep/caffeine markers, 4 API endpoints, 36 tests-2. ~~**M42 P2.5: Personalized Taste Prompting**~~ ✅ - LLM-personalized follow-ups using identity context, 2 new taste sections (Fashion & Digital), "Go Deeper" flow-3. **M7: App Templates** - Implement template management UI and app scaffolding from templates-4. ~~**M34 P3: Behavioral Feedback Loop**~~ ✅ - "Sounds like me" validation on test responses and taste summaries, feedback stats dashboard, document weight recalculation-5. ~~**M42 P3: Mortality-Aware Goal Tracking**~~ ✅ - Longevity/cardiovascular marker extraction, life expectancy estimation, goal CRUD with urgency scoring, Goals tab UI, 38 new tests+1. **M44 P6**: Finish genome/epigenetic migration cleanup — update route comments, remove Genome card from IdentityTab or redirect to `/meatspace/genome`+2. **M42 P5**: Cross-Insights Engine — connect genome + taste + personality + goals into derived insights+3. **M45**: Data Backup & Recovery — protect `./data/` from data loss+4. **M44 P7**: Apple Health Integration — live sync + bulk XML import (spec above)+5. **M46**: Unified Search (Cmd+K) — cross-cutting search across all data sourcesdiff --git a/package-lock.json b/package-lock.jsonindex c4e043eedd..a8509cf280 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "portos",- "version": "1.13.4",+ "version": "1.13.5","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "portos",- "version": "1.13.4",+ "version": "1.13.5","license": "MIT","dependencies": {"express": "^4.21.2",diff --git a/package.json b/package.jsonindex 1edbc6ff83..4676edd6ce 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "portos",- "version": "1.13.4",+ "version": "1.13.5","private": true,"description": "Local dev machine App OS portal","author": "Adam Eivy (@antic|@atomantic)",