> For the complete documentation index, see [llms.txt](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase38-session03-aggregate-and-dream-health/tasks.md).

# Task Checklist

**Session ID**: `phase38-session03-aggregate-and-dream-health` **Total Tasks**: 22 **Estimated Duration**: 3-4 hours **Created**: 2026-06-29

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Progress Summary

| Metric              | Value   |
| ------------------- | ------- |
| Tasks Completed     | 22 / 22 |
| Estimated Remaining | 0 hours |
| Blockers            | 0       |

***

## Setup (3 tasks)

* [x] T001 \[S3803] Verify Session 02 platform helper exports and upstream 1.2 aggregate hunk mapping before edits (`scripts/lib/platform.ts`)
* [x] T002 \[S3803] Record baseline aggregate, Dream, scanner, sanitizer, and live-data validation test owners (`.spec_system/specs/phase38-session03-aggregate-and-dream-health/implementation-notes.md`)
* [x] T003 \[S3803] Characterize current aggregate Dream output and current `src/data/live-data.json` Dream shape before changing the writer (`scripts/lib/aggregate-orchestration.ts`)

***

## Foundation (5 tasks)

* [x] T004 \[S3803] Create Dream health status mapper with sanitized hints for healthy, never-ran, stale, and silent-failure states (`scripts/lib/dream/health.ts`)
* [x] T005 \[S3803] \[P] Type additive Dream health fields for browser-safe live data without rejecting legacy Dream payloads (`src/lib/live-data-types.ts`)
* [x] T006 \[S3803] \[P] Validate bounded Dream health status and fix-hint fields while preserving old Dream objects (`src/lib/validate-live-data.ts`)
* [x] T007 \[S3803] \[P] Extend sanitizer coverage for Windows usernames, full names, drive/home paths, emails, and configured redaction names (`scripts/lib/sanitize.ts`)
* [x] T008 \[S3803] \[P] Add shared path normalization use where scan helpers expose aggregate path labels (`scripts/lib/scan-helpers.ts`)

***

## Implementation (7 tasks)

* [x] T009 \[S3803] Add Windows-aware app and terminal detection with Start Menu, local app data, Program Files, CLI, and unavailable-location degradation (`scripts/lib/app-detection.ts`)
* [x] T010 \[S3803] Ensure aggregate CLI detection uses shared Windows executable names and candidate directories with timeout and failure-path handling (`scripts/lib/tool-detection.ts`)
* [x] T011 \[S3803] Normalize session scanner workspace and project labels so slash direction and drive-letter casing do not create duplicate counts (`scripts/lib/session-scanner.ts`)
* [x] T012 \[S3803] Normalize skill scanner source paths and labels so Windows path variants remain deterministic (`scripts/lib/skill-scanner.ts`)
* [x] T013 \[S3803] Add Windows Obsidian registry/config discovery with missing and unreadable source fallback behavior (`scripts/lib/memory-scanner.ts`)
* [x] T014 \[S3803] Attach Dream health metadata during aggregate assembly with stale and failed lifecycle handling (`scripts/lib/aggregate-orchestration.ts`)
* [x] T015 \[S3803] Preserve generated live-data privacy checks for Windows private paths and Dream fix hints at the write boundary (`scripts/lib/aggregate-live-data-write.ts`)

***

## Testing (7 tasks)

* [x] T016 \[S3803] \[P] Add Dream health mapper tests for healthy, never-ran, stale, silent-failure, and sanitized fix hints (`scripts/lib/__tests__/dream-health.test.ts`)
* [x] T017 \[S3803] \[P] Add Windows app/tool detection and terminal inference regression tests (`scripts/lib/__tests__/app-detection.test.ts`)
* [x] T018 \[S3803] \[P] Add path normalization tests for session, skill, memory, and sanitizer behavior (`scripts/lib/__tests__/session-scanner.test.ts`, `scripts/lib/__tests__/skill-scanner.test.ts`, `scripts/lib/__tests__/sanitize.test.ts`)
* [x] T019 \[S3803] \[P] Add Obsidian fallback, aggregate assembly, aggregate write, and Dream validation tests (`scripts/lib/__tests__/memory-scanner.test.ts`, `scripts/lib/__tests__/aggregate-orchestration.test.ts`, `scripts/lib/__tests__/aggregate-live-data-write.test.ts`, `src/lib/__tests__/nested-validation.test.ts`)
* [x] T020 \[S3803] Run targeted script and live-data tests (`bun run test -- scripts/lib/__tests__/app-detection.test.ts scripts/lib/__tests__/tool-detection.test.ts scripts/lib/__tests__/session-scanner.test.ts scripts/lib/__tests__/skill-scanner.test.ts scripts/lib/__tests__/memory-scanner.test.ts scripts/lib/__tests__/sanitize.test.ts scripts/lib/__tests__/dream-health.test.ts scripts/lib/__tests__/aggregate-orchestration.test.ts scripts/lib/__tests__/aggregate-live-data-write.test.ts src/lib/__tests__/nested-validation.test.ts`)
* [x] T021 \[S3803] Run script/app typechecks and the real aggregate write (`bun run typecheck:scripts`, `bun run typecheck`, `bun run aggregate`)
* [x] T022 \[S3803] Inspect generated `src/data/live-data.json` for Dream health fields, redaction, ASCII/LF compliance, and macOS/Linux regression evidence (`src/data/live-data.json`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] `implementation-notes.md` updated
* [x] Ready for `creview` to review and repair uncommitted changes before validation

***

## Next Steps

Run the `creview` workflow step.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ai-os-and-trend-finder.gitbook.io/ai-os-and-trend-finder-docs/.spec_system/archive/sessions/phase38-session03-aggregate-and-dream-health/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
