Skip to content

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

docs(03): create phase plans with verification fixes

Adam Eivyf3b267a4bc46
diff --git a/.planning/phases/03-apple-health-integration/03-01-PLAN.md b/.planning/phases/03-apple-health-integration/03-01-PLAN.md
index dbb91dbb8d..b7f48b2247 100644
--- a/.planning/phases/03-apple-health-integration/03-01-PLAN.md
+++ b/.planning/phases/03-apple-health-integration/03-01-PLAN.md
@@ -5,13 +5,15 @@ type: execute
wave: 1
depends_on: []
files_modified:
+ - server/routes/health.js
+ - server/routes/systemHealth.js
+ - server/index.js
+ - client/src/services/api.js
- server/lib/appleHealthValidation.js
- server/services/appleHealthIngest.js
- server/services/appleHealthQuery.js
- server/routes/appleHealth.js
- server/lib/fileUtils.js
- - server/index.js
- - client/src/services/api.js
autonomous: true
requirements:
- HLT-01
@@ -19,11 +21,15 @@ requirements:
must_haves:
truths:
- - "POST /api/apple-health/ingest accepts Health Auto Export JSON, validates with Zod, and returns success with record counts"
+ - "POST /api/health/ingest accepts Health Auto Export JSON, validates with Zod, and returns success with record counts"
- "Duplicate records (same metric name + timestamp) are silently skipped on re-ingest"
- "Health data is persisted to day-partitioned files at data/health/YYYY-MM-DD.json"
- - "GET /api/apple-health/metrics returns aggregated metric data for a requested date range"
+ - "GET /api/health/metrics returns aggregated metric data for a requested date range"
+ - "Existing system health endpoints moved to /api/system/health and /api/system/health/details without breakage"
artifacts:
+ - path: "server/routes/systemHealth.js"
+ provides: "Renamed system health routes (was health.js)"
+ exports: ["default (router)"]
- path: "server/lib/appleHealthValidation.js"
provides: "Zod schemas for Health Auto Export JSON ingest payload"
exports: ["healthIngestSchema"]
@@ -47,15 +53,19 @@ must_haves:
pattern: "getMetrics"
- from: "server/index.js"
to: "server/routes/appleHealth.js"
- via: "app.use('/api/apple-health', appleHealthRoutes)"
+ via: "app.use('/api/health', appleHealthRoutes)"
pattern: "appleHealthRoutes"
+ - from: "server/index.js"
+ to: "server/routes/systemHealth.js"
+ via: "app.use('/api/system', systemHealthRoutes)"
+ pattern: "systemHealthRoutes"
---
<objective>
-Build the Apple Health data ingest pipeline: Zod validation for Health Auto Export JSON, deduplication by metric+timestamp, day-partitioned file storage at `data/health/YYYY-MM-DD.json`, and query service for reading metrics by date range.
+Build the Apple Health data ingest pipeline: Zod validation for Health Auto Export JSON, deduplication by metric+timestamp, day-partitioned file storage at `data/health/YYYY-MM-DD.json`, and query service for reading metrics by date range. Also resolves the `/api/health` namespace conflict by moving existing system health endpoints to `/api/system/health`.
Purpose: Creates the data foundation that both XML import (Plan 03-02) and dashboard cards (Plan 03-03) depend on.
-Output: Working REST API at `/api/apple-health/ingest` and `/api/apple-health/metrics`, data persisted to day-partitioned files.
+Output: Working REST API at `/api/health/ingest` and `/api/health/metrics`, data persisted to day-partitioned files. System health endpoints relocated to `/api/system/health`.
</objective>
<execution_context>
@@ -72,6 +82,7 @@ Output: Working REST API at `/api/apple-health/ingest` and `/api/apple-health/me
@server/lib/fileUtils.js — PATHS constants, readJSONFile, ensureDir
@server/lib/meatspaceValidation.js — Zod schema patterns
@server/routes/backup.js — Route pattern with asyncHandler, io access
+@server/routes/health.js — EXISTING system health routes (must be renamed to avoid collision)
@server/services/meatspaceAlcohol.js — Service patterns (pure functions, file read/write)
@server/index.js — Route registration pattern
@@ -101,6 +112,24 @@ From server/lib/validation.js:
export function validateRequest(schema, data) { ... }
```
+From server/routes/health.js (EXISTING — must be relocated):
+```javascript
+// Currently registered as: app.use('/api', healthRoutes)
+// Routes: GET /health, GET /health/system
+// These collide with Apple Health's /api/health namespace
+// Must be renamed to: GET /system/health, GET /system/health/details
+```
+
+From client/src/services/api.js (EXISTING — must be updated):
+```javascript
+// Currently:
+export const checkHealth = () => request('/health');
+export const getSystemHealth = (options) => request('/health/system', options);
+// Must become:
+export const checkHealth = () => request('/system/health');
+export const getSystemHealth = (options) => request('/system/health/details', options);
+```
+
Health Auto Export JSON schema (from research):
```json
{
@@ -134,7 +163,85 @@ Day-partitioned file schema:
<tasks>
<task type="auto">
- <name>Task 1: Create validation schemas, ingest service, and day-partitioned storage</name>
+ <name>Task 1: Rename system health routes to free /api/health namespace</name>
+ <files>
+ server/routes/health.js
+ server/routes/systemHealth.js
+ server/index.js
+ client/src/services/api.js
+ </files>
+ <action>
+**Why:** The existing `server/routes/health.js` registers GET `/health` and GET `/health/system`, mounted at `app.use('/api', healthRoutes)` in index.js. This means GET `/api/health` and GET `/api/health/system` are taken. The locked decision from CONTEXT.md specifies Health Auto Export pushes to `/api/health/ingest`. To avoid route collision, we must relocate the system health endpoints to `/api/system/health`.
+
+**1. Rename server/routes/health.js to server/routes/systemHealth.js:**
+
+Use `git mv server/routes/health.js server/routes/systemHealth.js` to preserve git history.
+
+**2. Update route paths inside server/routes/systemHealth.js:**
+
+Change the two route definitions:
+- `router.get('/health', ...)` becomes `router.get('/health', ...)` (unchanged, since mount point changes)
+- `router.get('/health/system', ...)` becomes `router.get('/health/details', ...)` (rename `/system` to `/details` to avoid redundancy with the new `/api/system` mount point)
+
+The routes inside the file should be:
+```javascript
+router.get('/health', async (req, res) => { ... }); // → GET /api/system/health
+router.get('/health/details', async (req, res) => { ... }); // → GET /api/system/health/details
+```
+
+**3. Update server/index.js:**
+
+Change the import:
+```javascript
+// Before:
+import healthRoutes from './routes/health.js';
+// After:
+import systemHealthRoutes from './routes/systemHealth.js';
+```
+
+Change the route registration:
+```javascript
+// Before:
+app.use('/api', healthRoutes);
+// After:
+app.use('/api/system', systemHealthRoutes);
+```
+
+Place the new registration alphabetically among the other `/api/*` routes — near `/api/standardize` or `/api/settings`.
+
+**4. Update client/src/services/api.js:**
+
+Change the two system health API calls:
+```javascript
+// Before:
+export const checkHealth = () => request('/health');
+export const getSystemHealth = (options) => request('/health/system', options);
+// After:
+export const checkHealth = () => request('/system/health');
+export const getSystemHealth = (options) => request('/system/health/details', options);
+```
+
+**5. Search for any other references to the old paths:**
+
+Run `grep -r "/api/health" client/src/ server/` to find any other references to the old `/api/health` or `/health/system` paths. Update any found references. Key places to check:
+- Dashboard components that call `checkHealth()` or `getSystemHealth()` — these call the API functions, not URLs directly, so they should work without changes.
+- Any test files referencing `/api/health` — update to `/api/system/health`.
+ </action>
+ <verify>
+ <automated>cd server && npm test</automated>
+ </verify>
+ <done>
+ - server/routes/health.js renamed to server/routes/systemHealth.js via git mv
+ - System health routes now at GET /api/system/health and GET /api/system/health/details
+ - server/index.js updated: import systemHealthRoutes, mount at /api/system
+ - client/src/services/api.js updated: checkHealth and getSystemHealth use new paths
+ - No stale references to old /api/health or /api/health/system paths remain
+ - All existing tests pass
+ </done>
+</task>
+
+<task type="auto">
+ <name>Task 2: Create validation schemas, ingest service, and day-partitioned storage</name>
<files>
server/lib/appleHealthValidation.js
server/services/appleHealthIngest.js
@@ -192,7 +299,7 @@ Pure functions + file I/O service:
</task>
<task type="auto">
- <name>Task 2: Create query service, REST routes, and client API functions</name>
+ <name>Task 3: Create query service, REST routes, and client API functions</name>
<files>
server/services/appleHealthQuery.js
server/routes/appleHealth.js
@@ -239,18 +346,20 @@ Add import at top (alphabetical with other route imports):
import appleHealthRoutes from './routes/appleHealth.js';
```
-Add route registration (before `/api/meatspace` to avoid path conflicts):
+Add route registration — mount at `/api/health` to match the locked decision path `/api/health/ingest`:
```javascript
-app.use('/api/apple-health', appleHealthRoutes);
+app.use('/api/health', appleHealthRoutes);
```
+Place this before `/api/instances` (alphabetically). Note: The old system health routes were already moved to `/api/system` in Task 1, so `/api/health` is now free.
+
**4. Add client API functions in client/src/services/api.js:**
Add a new section "// Apple Health" (alphabetical placement, near the top after "// Apps"):
```javascript
// Apple Health
-export const ingestAppleHealth = (data) => request('/apple-health/ingest', {
+export const ingestAppleHealth = (data) => request('/health/ingest', {
method: 'POST',
body: JSON.stringify(data)
});
@@ -258,20 +367,20 @@ export const getAppleHealthMetrics = (metricName, from, to) => {
const params = new URLSearchParams();
if (from) params.set('from', from);
if (to) params.set('to', to);
- return request(`/apple-health/metrics/${metricName}/daily?${params}`);
+ return request(`/health/metrics/${metricName}/daily?${params}`);
};
export const getAppleHealthSummary = (metricName, from, to) => {
const params = new URLSearchParams();
if (from) params.set('from', from);
if (to) params.set('to', to);
- return request(`/apple-health/metrics/${metricName}?${params}`);
+ return request(`/health/metrics/${metricName}?${params}`);
};
-export const getAppleHealthRange = () => request('/apple-health/range');
+export const getAppleHealthRange = () => request('/health/range');
export const getAppleHealthCorrelation = (from, to) => {
const params = new URLSearchParams();
if (from) params.set('from', from);
if (to) params.set('to', to);
- return request(`/apple-health/correlation?${params}`);
+ return request(`/health/correlation?${params}`);
};
```
</action>
@@ -279,28 +388,30 @@ export const getAppleHealthCorrelation = (from, to) => {
<automated>cd server && node -e "import('./routes/appleHealth.js').then(m => console.log(m.default ? 'PASS: router exported' : 'FAIL'))" && node -e "import('./services/appleHealthQuery.js').then(m => console.log(typeof m.getMetrics === 'function' && typeof m.getDailyAggregates === 'function' ? 'PASS' : 'FAIL'))"</automated>
</verify>
<done>
- - GET /api/apple-health/metrics/:metricName returns metric summary for date range
- - GET /api/apple-health/metrics/:metricName/daily returns daily aggregated values
- - GET /api/apple-health/range returns available data date range
- - GET /api/apple-health/correlation returns merged HRV+alcohol+steps+blood data
- - POST /api/apple-health/ingest validates and persists Health Auto Export JSON
- - Route registered in index.js at /api/apple-health
- - Client API functions added for all endpoints
+ - GET /api/health/metrics/:metricName returns metric summary for date range
+ - GET /api/health/metrics/:metricName/daily returns daily aggregated values
+ - GET /api/health/range returns available data date range
+ - GET /api/health/correlation returns merged HRV+alcohol+steps+blood data
+ - POST /api/health/ingest validates and persists Health Auto Export JSON
+ - Route registered in index.js at /api/health (namespace freed by Task 1)
+ - Client API functions added for all endpoints using /health/* paths
</done>
</task>
</tasks>
<verification>
-1. `cd server && node -e "import('./lib/appleHealthValidation.js').then(m => console.log('validation OK'))"` -- validation module loads
-2. `cd server && node -e "import('./services/appleHealthIngest.js').then(m => console.log('ingest OK'))"` -- ingest service loads
-3. `cd server && node -e "import('./services/appleHealthQuery.js').then(m => console.log('query OK'))"` -- query service loads
-4. `cd server && node -e "import('./routes/appleHealth.js').then(m => console.log('routes OK'))"` -- routes load
-5. `cd server && npm test` -- all existing tests pass (no regressions)
+1. `curl -s http://localhost:5554/api/system/health | node -e "process.stdin.on('data',d=>{const r=JSON.parse(d);console.log(r.status==='ok'?'PASS':'FAIL')})"` -- system health moved successfully
+2. `cd server && node -e "import('./lib/appleHealthValidation.js').then(m => console.log('validation OK'))"` -- validation module loads
+3. `cd server && node -e "import('./services/appleHealthIngest.js').then(m => console.log('ingest OK'))"` -- ingest service loads
+4. `cd server && node -e "import('./services/appleHealthQuery.js').then(m => console.log('query OK'))"` -- query service loads
+5. `cd server && node -e "import('./routes/appleHealth.js').then(m => console.log('routes OK'))"` -- routes load
+6. `cd server && npm test` -- all existing tests pass (no regressions)
</verification>
<success_criteria>
-- POST /api/apple-health/ingest accepts Health Auto Export JSON and returns record counts
+- Existing system health endpoints relocated to /api/system/health and /api/system/health/details
+- POST /api/health/ingest accepts Health Auto Export JSON and returns record counts (matches locked decision)
- Duplicate records are silently skipped on re-ingest
- Data persists to data/health/YYYY-MM-DD.json files
- Query service returns aggregated metrics for date ranges
diff --git a/.planning/phases/03-apple-health-integration/03-02-PLAN.md b/.planning/phases/03-apple-health-integration/03-02-PLAN.md
index 73560934fe..4c93b260cb 100644
--- a/.planning/phases/03-apple-health-integration/03-02-PLAN.md
+++ b/.planning/phases/03-apple-health-integration/03-02-PLAN.md
@@ -50,7 +50,7 @@ must_haves:
Build the streaming XML import pipeline for bulk Apple Health exports (500MB+) using SAX parsing, and update the Import tab with a working file picker and real-time WebSocket progress bar.
Purpose: Enables importing years of historical Apple Health data from iOS exports without memory issues.
-Output: Working XML upload at POST /api/apple-health/import/xml, real-time progress in Import tab.
+Output: Working XML upload at POST /api/health/import/xml, real-time progress in Import tab.
</objective>
<execution_context>
@@ -83,7 +83,7 @@ export function extractDateStr(dateString) { ... }
From server/routes/appleHealth.js:
```javascript
-// Router with existing POST /ingest and GET endpoints
+// Router mounted at /api/health with existing POST /ingest and GET endpoints
// Add POST /import/xml to this same router
```
@@ -197,7 +197,7 @@ const upload = multer({
Add route:
```javascript
-// POST /api/apple-health/import/xml
+// POST /api/health/import/xml
router.post('/import/xml', upload.single('file'), asyncHandler(async (req, res) => {
const io = req.app.get('io');
const filePath = req.file?.path;
@@ -236,7 +236,7 @@ Add to the "// Apple Health" section (created in Plan 03-01):
export const uploadAppleHealthXml = (file) => {
const formData = new FormData();
formData.append('file', file);
- return fetch(`${API_BASE}/apple-health/import/xml`, {
+ return fetch(`${API_BASE}/health/import/xml`, {
method: 'POST',
body: formData
// No Content-Type header — browser sets multipart boundary automatically
@@ -287,7 +287,7 @@ UI structure (matching the existing TSV import card style):
- On error: Show error card (matching TSV error card style).
</action>
<verify>
- <automated>cd server && npm test</automated>
+ <automated>cd server && npm test && cd ../client && npm run build</automated>
</verify>
<done>
- Apple Health placeholder replaced with working XML file picker
@@ -297,6 +297,7 @@ UI structure (matching the existing TSV import card style):
- Error state displays error message
- Import follows existing TSV import card styling
- Instructions tell user to extract ZIP and upload export.xml
+ - Client builds cleanly with new component
</done>
</task>
@@ -307,12 +308,12 @@ UI structure (matching the existing TSV import card style):
Human verification checkpoint. Verify:
1. The Import tab shows the Apple Health XML Import section (replacing the old placeholder)
2. The file picker accepts only .xml files
-3. POST /api/apple-health/ingest works with curl test data
+3. POST /api/health/ingest works with curl test data
4. Day-partitioned files are created in data/health/
5. Dedup works on repeated ingest
</action>
<verify>
- <automated>curl -s -X POST http://localhost:5554/api/apple-health/ingest -H 'Content-Type: application/json' -d '{"data":{"metrics":[{"name":"step_count","units":"count","data":[{"date":"2024-01-15 08:30:00 -0800","qty":8432}]}]}}' | node -e "process.stdin.on('data',d=>{const r=JSON.parse(d);console.log(r.recordsIngested>0?'PASS':'FAIL')})"</automated>
+ <automated>curl -s -X POST http://localhost:5554/api/health/ingest -H 'Content-Type: application/json' -d '{"data":{"metrics":[{"name":"step_count","units":"count","data":[{"date":"2024-01-15 08:30:00 -0800","qty":8432}]}]}}' | node -e "process.stdin.on('data',d=>{const r=JSON.parse(d);console.log(r.recordsIngested>0?'PASS':'FAIL')})"</automated>
</verify>
<done>XML import pipeline and JSON ingest verified end-to-end, Import tab UI confirmed</done>
<what-built>Apple Health XML import pipeline with streaming SAX parser, WebSocket progress, and Import tab UI</what-built>
@@ -321,7 +322,7 @@ Human verification checkpoint. Verify:
2. Verify the Apple Health XML Import section replaces the old placeholder
3. Verify the file picker only accepts .xml files
4. If you have an Apple Health export.xml available, test importing it. Otherwise, verify the UI renders correctly with proper styling.
- 5. Verify `curl -X POST http://localhost:5554/api/apple-health/ingest -H 'Content-Type: application/json' -d '{"data":{"metrics":[{"name":"step_count","units":"count","data":[{"date":"2024-01-15 08:30:00 -0800","qty":8432}]}]}}'` returns success with recordsIngested count
+ 5. Verify `curl -X POST http://localhost:5554/api/health/ingest -H 'Content-Type: application/json' -d '{"data":{"metrics":[{"name":"step_count","units":"count","data":[{"date":"2024-01-15 08:30:00 -0800","qty":8432}]}]}}'` returns success with recordsIngested count
6. Verify `ls data/health/` shows `2024-01-15.json` was created
7. Re-run the same curl command and verify `recordsSkipped` increases (dedup working)
</how-to-verify>
@@ -332,10 +333,11 @@ Human verification checkpoint. Verify:
<verification>
1. `npm install` in server completes with `sax` and `multer` added to package.json
-2. POST /api/apple-health/ingest accepts and persists Health Auto Export JSON
-3. POST /api/apple-health/import/xml accepts XML upload via multipart form
+2. POST /api/health/ingest accepts and persists Health Auto Export JSON
+3. POST /api/health/import/xml accepts XML upload via multipart form
4. Import tab shows Apple Health XML import section with progress bar
5. `cd server && npm test` — all existing tests pass
+6. `cd client && npm run build` — client compiles cleanly
</verification>
<success_criteria>
@@ -345,6 +347,7 @@ Human verification checkpoint. Verify:
- Sleep XML categorical values are correctly converted to duration data
- Import tab has working file picker replacing the disabled placeholder
- All existing tests pass
+- Client builds without errors
</success_criteria>
<output>
diff --git a/.planning/phases/03-apple-health-integration/03-03-PLAN.md b/.planning/phases/03-apple-health-integration/03-03-PLAN.md
index 34efe6a9a1..ae05dea473 100644
--- a/.planning/phases/03-apple-health-integration/03-03-PLAN.md
+++ b/.planning/phases/03-apple-health-integration/03-03-PLAN.md
@@ -53,11 +53,11 @@ must_haves:
contains: "ActivityBloodCorrelation"
key_links:
- from: "client/src/components/meatspace/tabs/HealthTab.jsx"
- to: "/api/apple-health/metrics/:metricName/daily"
+ to: "/api/health/metrics/:metricName/daily"
via: "api.getAppleHealthMetrics()"
pattern: "getAppleHealthMetrics"
- from: "client/src/components/meatspace/tabs/HealthTab.jsx"
- to: "/api/apple-health/correlation"
+ to: "/api/health/correlation"
via: "api.getAppleHealthCorrelation()"
pattern: "getAppleHealthCorrelation"
- from: "client/src/pages/MeatSpace.jsx"
@@ -104,13 +104,13 @@ export const getAppleHealthCorrelation = (from, to) => ...;
API response shapes:
```javascript
-// GET /api/apple-health/metrics/:metricName/daily
+// GET /api/health/metrics/:metricName/daily
[{ date: "2024-01-15", value: 8432 }, ...]
-// GET /api/apple-health/metrics/:metricName
+// GET /api/health/metrics/:metricName
{ metricName, count, latest, average, from, to, dataPoints: [...] }
-// GET /api/apple-health/correlation
+// GET /api/health/correlation
{ dailyData: [{ date, hrv, alcoholGrams, steps }], bloodTests: [...] }
```
@@ -195,10 +195,10 @@ Tooltip: background '#1a1a1a', border '1px solid #2a2a2a', color '#fff'
- Row 2: SleepCard, HrvCard
- Row 3 (full width): Correlations section (rendered by correlation components from Task 2)
- Pass fetched data and loading state to each card.
-- Import correlation components (AlcoholHrvCorrelation, ActivityBloodCorrelation) — these will be created in Task 2. For now, conditionally render them only if `correlationData` exists. Pass `correlationData` and `range` as props.
+- Row 3 correlations section: Render a placeholder `<div>` with a `{/* Correlation charts — wired in Task 2 */}` comment. Do NOT import AlcoholHrvCorrelation or ActivityBloodCorrelation — those files don't exist yet and will break the build. Task 2 will add the imports and replace this placeholder.
</action>
<verify>
- <automated>cd server && npm test</automated>
+ <automated>cd client && npm run build</automated>
</verify>
<done>
- StepsCard shows hero average + LineChart trend
@@ -209,6 +209,8 @@ Tooltip: background '#1a1a1a', border '1px solid #2a2a2a', color '#fff'
- Range selector buttons (7d/30d/90d/1y) control all cards consistently
- All cards have empty states for when no data exists
- Dark theme tokens used consistently across all charts
+ - Row 3 has a placeholder div for correlations (no correlation imports yet)
+ - Client builds cleanly with all new components
</done>
</task>
@@ -217,6 +219,7 @@ Tooltip: background '#1a1a1a', border '1px solid #2a2a2a', color '#fff'
<files>
client/src/components/meatspace/AlcoholHrvCorrelation.jsx
client/src/components/meatspace/ActivityBloodCorrelation.jsx
+ client/src/components/meatspace/tabs/HealthTab.jsx
client/src/components/meatspace/constants.js
client/src/pages/MeatSpace.jsx
</files>
@@ -267,7 +270,21 @@ Activity vs blood work chart (per locked decision):
- Card wrapper with title: "Activity vs Blood Work"
- Wrap in `ResponsiveContainer`
-**3. Add Health tab to constants.js:**
+**3. Wire correlation components into HealthTab.jsx:**
+
+Now that both correlation component files exist, update `HealthTab.jsx`:
+- Add imports at top: `import AlcoholHrvCorrelation from '../AlcoholHrvCorrelation'` and `import ActivityBloodCorrelation from '../ActivityBloodCorrelation'`
+- Replace the placeholder `<div>` (with the `{/* Correlation charts — wired in Task 2 */}` comment) with the actual correlation components:
+ ```jsx
+ {correlationData && (
+ <>
+ <AlcoholHrvCorrelation data={correlationData} range={range} />
+ <ActivityBloodCorrelation data={correlationData} range={range} />
+ </>
+ )}
+ ```
+
+**4. Add Health tab to constants.js:**
In the TABS array, add (alphabetically between 'genome' and 'lifestyle'):
```javascript
@@ -280,7 +297,7 @@ Wait, looking at constants.js: `Activity` is used for Overview, `HeartPulse` for
Update the import line to include `Stethoscope`.
-**4. Wire Health tab into MeatSpace.jsx:**
+**5. Wire Health tab into MeatSpace.jsx:**
Add import:
```javascript
@@ -294,7 +311,7 @@ case 'health':
```
</action>
<verify>
- <automated>cd server && npm test</automated>
+ <automated>cd client && npm run build && cd ../server && npm test</automated>
</verify>
<done>
- AlcoholHrvCorrelation shows dual-axis chart with auto-generated text summary
@@ -303,6 +320,7 @@ case 'health':
- Health tab appears in MeatSpace tab bar between Genome and Lifestyle
- Clicking Health tab renders HealthTab component via URL routing (/meatspace/health)
- All correlation text summaries are computed from data, not LLM-generated
+ - Client builds cleanly with all new components
</done>
</task>
@@ -318,7 +336,7 @@ Human verification checkpoint. Verify:
5. URL is deep-linkable
</action>
<verify>
- <automated>curl -s http://localhost:5554/api/apple-health/range | node -e "process.stdin.on('data',d=>{console.log('PASS: range endpoint responding')})"</automated>
+ <automated>curl -s http://localhost:5554/api/health/range | node -e "process.stdin.on('data',d=>{console.log('PASS: range endpoint responding')})"</automated>
</verify>
<done>Health tab verified visually with cards, range selector, and correlations</done>
<what-built>MeatSpace Health tab with four metric cards, range selector, and two correlation charts</what-built>
@@ -343,6 +361,7 @@ Human verification checkpoint. Verify:
3. Range selector controls all cards consistently
4. Correlation charts show dual-axis data or threshold messages
5. All existing tests pass: `cd server && npm test`
+6. Client builds cleanly: `cd client && npm run build`
</verification>
<success_criteria>