# Release v1.7.x - Changelog

Released: YYYY-MM-DD

## Overview

Personalized taste prompting, behavioral feedback loop, mortality-aware goal tracking, and expanded aesthetic domains for the Digital Twin.

## Features

### Personalized Taste Prompting (M42 P2.5)
- Added LLM-generated personalized follow-up questions that reference identity documents (BOOKS.md, AUDIO.md, CREATIVE.md, PREFERENCES.md, PERSONALITY.md, enrichment answers, existing taste responses)
- "Go Deeper" button appears after a section's static questions are complete — generates a personalized question using identity context and selected AI provider
- Personalized questions shown with distinct purple "Personalized — referencing your identity" badge
- Answers to personalized questions stored with `source: 'personalized'` metadata and the generated question text for audit trail
- Identity context aggregation reads up to 2000 chars from each identity doc, cross-section taste responses, and enrichment progress to build a ~4000 char context window for the LLM
- New API endpoint: `POST /api/digital-twin/taste/:section/personalized-question`

### New Taste Sections: Fashion & Digital
- **Fashion & Texture** (`fashion`): material/fabric preferences, color wardrobe, formality spectrum, style identity, anti-fashion positions — with follow-ups for texture sensitivity, natural materials, minimalist wardrobe, color expression, and vintage aesthetics
- **Digital & Interface** (`digital`): dark/light mode preferences, information density, animation tolerance, tool aesthetics, notification/attention style — with follow-ups for dark mode specifics, minimal vs dense UI, software craftsmanship, and digital focus management
- Total taste sections expanded from 5 to 7

### Behavioral Feedback Loop (M34 P3)
- "Sounds like me" / "Not quite" / "Not me" validation buttons on behavioral test responses and taste profile summaries
- Feedback stored with content type, snippet, provider/model attribution, and timestamp
- Feedback statistics dashboard in TestTab: total ratings, validation rate percentage, per-validation breakdown, and recent accuracy trend (improving/declining/stable)
- Document weight recalculation from feedback history — documents consistently associated with validated responses get boosted, contradicted ones get reduced
- New API endpoints: `POST /api/digital-twin/feedback`, `GET /api/digital-twin/feedback/stats`, `POST /api/digital-twin/feedback/recalculate`, `GET /api/digital-twin/feedback/recent`

### Mortality-Aware Goal Tracking (M42 P3)
- **Longevity derivation**: Extracts 5 longevity markers (FOXO3A, IGF1R, CETP, IPMK, TERC) and 6 cardiovascular markers (Factor V, CAD 9p21, LPA, Prothrombin, IL-6, TNF-alpha) from genome data
- **Life expectancy estimation**: SSA actuarial baseline (78.5y) adjusted by genome marker signals — longevity markers add/subtract up to 5 years, cardiovascular risk adjusts up to 4 years
- **Time horizons**: Age, years remaining, healthy years remaining (85% estimate), and percent life complete — calculated from birth date + adjusted life expectancy
- **Goal CRUD with urgency scoring**: Create goals with title, description, time horizon (1y/3y/5y/10y/20y/lifetime), and category (creative/family/health/financial/legacy/mastery). Urgency auto-calculated from remaining life years relative to goal horizon
- **Milestone tracking**: Add milestones with optional target dates, mark complete individually, progress bar on goal cards
- **Goals Tab UI**: New "Goals" tab in Digital Twin with life expectancy dashboard (4-stat grid), goal list with expandable detail, milestone management, genome marker detail view, and completed goals section
- **Identity status extended**: Longevity and goals sections added to identity orchestrator status
- New API endpoints: `GET/POST /api/digital-twin/identity/longevity`, `GET/POST/PUT/DELETE /api/digital-twin/identity/goals`, `PUT /api/digital-twin/identity/goals/birth-date`, milestone CRUD
- 38 new tests (1143 total) covering marker extraction, life expectancy computation, urgency scoring, and goal CRUD

### Identity Tab UI (M42 P4)
- New **Identity** tab in Digital Twin providing a unified dashboard across all 5 identity sections (Genome, Chronotype, Longevity, Aesthetics, Goals)
- Completeness header with progress bar and per-section status chips (green=active, yellow=pending, gray=unavailable)
- Genome summary card with marker count and link to full genome view
- Chronotype card showing type, confidence, deep work/caffeine recommendations, and genetic marker signals with inline "Derive Chronotype" action
- Longevity card with adjusted life expectancy, years remaining, percent complete, and marker counts with inline "Derive Longevity" action
- Aesthetic taste card with section completion dots and link to taste questionnaire
- Life goals card with top-3 urgency-sorted goals, category icons, and urgency badges
- All summary cards link to their respective deep-dive tabs
- **Navigation restructure**: Digital Twin promoted to top-level collapsible section with all 13 sub-tabs as alphabetically ordered children; Brain promoted to standalone top-level nav item; former "Identity" grouping removed

### Apple Health XML Import (03-02)
- Added SAX streaming parser for Apple Health export.xml files (500MB+) without loading into memory
- POST /api/health/import/xml accepts multipart file upload with multer diskStorage (2GB max)
- HK identifiers normalized to metric names matching existing JSON ingest format (step_count, heart_rate, etc.)
- Sleep categorical values parsed into duration-based stage data (deep, REM, core, awake, inBed)
- Step counts aggregated per day (sum of all per-activity readings into daily total)
- WebSocket progress events emitted every 10k records (health:xml:progress) and on completion (health:xml:complete)
- Temp file cleaned up after import completes
- Import tab Apple Health placeholder replaced with working XML file picker and progress bar
- Progress bar shows live record count during import; success card shows days and records imported
