> 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-session09-intelligence-portal/tasks.md).

# Task Checklist

**Session ID**: `phase38-session09-intelligence-portal` **Total Tasks**: 25 **Estimated Duration**: 3-4 hours **Created**: 2026-06-30

***

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

***

## Progress Summary

| Metric           | Value    |
| ---------------- | -------- |
| Tasks Completed  | 25 / 25  |
| Percent Complete | 100%     |
| Current Task     | Complete |

***

## Setup (3 tasks)

* [x] T001 \[S3809] Verify deterministic project state, Session 05/08 prerequisites, and upstream Intelligence source paths before implementation (`.spec_system/PRD/phase_38/session_09_intelligence_portal.md`)
* [x] T002 \[S3809] Create the Hermes Intelligence component export boundary under existing Hermes conventions (`src/components/hermes/intelligence/index.ts`)
* [x] T003 \[S3809] Create shared typed portal, design, transcript, voice, and activity state contracts with exhaustive unions (`src/components/hermes/intelligence/intelligence-types.ts`)

***

## Foundation (5 tasks)

* [x] T004 \[S3809] \[P] Create shared mind-map cluster, color, interpolation, and state helpers adapted from upstream (`src/lib/mind-map.ts`)
* [x] T005 \[S3809] \[P] Create the explicit idle/demo synthetic visual driver with cleanup on scope exit for timers and generated activity state (`src/lib/synthetic-voice.ts`)
* [x] T006 \[S3809] Create the Hermes Intelligence event mapper from `HermesChatEvent` streams with types matching declared contract and exhaustive enum handling (`src/lib/hermes-intelligence-events.ts`)
* [x] T007 \[S3809] Create the Realtime voice lifecycle hook with broker start, token-gated session fetch, media/WebRTC cleanup on scope exit, denied/restricted/revoked mic handling, and failure-path state projection (`src/hooks/use-hermes-intelligence-voice.ts`)
* [x] T008 \[S3809] Extend Hermes admin chat with a transcript-returning stream method while preserving duplicate-trigger prevention, abort cleanup, explicit error mapping, and the existing boolean `sendPrompt` API (`src/hooks/use-hermes-admin.ts`)

***

## Implementation (10 tasks)

* [x] T009 \[S3809] \[P] Adapt the Aurora canvas stage with reduced-motion fallback, bounded layout, and product-facing nonblank states (`src/components/hermes/intelligence/stage-aurora.tsx`)
* [x] T010 \[S3809] \[P] Adapt the Cosmos canvas stage with reduced-motion fallback, bounded layout, and product-facing nonblank states (`src/components/hermes/intelligence/stage-cosmos.tsx`)
* [x] T011 \[S3809] \[P] Adapt the Classic Hermes mind 3D graph with lazy-safe imports, animation cleanup, and accessible hub interaction (`src/components/hermes/intelligence/hermes-mind-3d.tsx`)
* [x] T012 \[S3809] \[P] Adapt the Oracle Plasma, Rider, Sonar, and Waveform visualizer modules with cleanup on scope exit and deterministic empty/error fallback rendering (`src/components/hermes/intelligence/oracle-plasma.tsx`, `src/components/hermes/intelligence/oracle-rider.tsx`, `src/components/hermes/intelligence/oracle-sonar.tsx`, `src/components/hermes/intelligence/oracle-waveform.tsx`)
* [x] T013 \[S3809] Compose the Intelligence portal shell with Aurora, Cosmos, and Classic modes; explicit loading, empty, error, offline, demo, and recovery states; focus management; and keyboard input support (`src/components/hermes/intelligence/intelligence-portal.tsx`)
* [x] T014 \[S3809] Wire the portal to the voice hook, `ask_hermes` tool-call handler, transcript rendering, and real chat-event visualizer updates with duplicate-trigger prevention while in-flight (`src/components/hermes/intelligence/intelligence-portal.tsx`)
* [x] T015 \[S3809] Integrate route-local portal state, `?intel=1` opening, lazy loading, close/reset behavior, and public-demo live-voice gating (`src/components/hermes/hermes-read-only-page.tsx`)
* [x] T016 \[S3809] Add the Intelligence launcher to the existing Hermes Chat tab with platform-appropriate accessibility labels, focus return, and disabled write-gate states (`src/components/hermes/chat/hermes-chat-tab.tsx`)
* [x] T017 \[S3809] Update Intelligence docs from Session 08 pending-state language to shipped Session 09 behavior without documenting unproven live voice results (`docs/intelligence-view.md`)
* [x] T018 \[S3809] Update local voice docs and implementation notes with env-only key policy, upstream `agent-core-3d.tsx` and `INTEGRATION.md` skips, and safe verification evidence (`docs/local-voice-setup.md`, `.spec_system/specs/phase38-session09-intelligence-portal/implementation-notes.md`)

***

## Testing (7 tasks)

* [x] T019 \[S3809] \[P] Add Hermes admin hook tests for transcript-returning chat success, stream error, abort, duplicate prevention, event capture, and boolean API compatibility (`src/hooks/__tests__/use-hermes-admin.test.tsx`)
* [x] T020 \[S3809] \[P] Add event mapper tests for chunk, error, done, unknown events, cluster activity, and deterministic ordering (`src/lib/__tests__/hermes-intelligence-events.test.ts`)
* [x] T021 \[S3809] \[P] Add voice hook tests for broker start, same-run token use, session credential fetch, Realtime events, `ask_hermes`, cleanup, mic denial, missing key, bad token, provider failure, and offline states (`src/hooks/__tests__/use-hermes-intelligence-voice.test.tsx`)
* [x] T022 \[S3809] \[P] Add portal component tests for open/close, design switching, transcript rendering, recovery states, focus behavior, reduced motion, and demo/live separation (`src/components/hermes/intelligence/__tests__/intelligence-portal.test.tsx`)
* [x] T023 \[S3809] \[P] Add visualizer tests for nonblank fallback render, reduced-motion behavior, animation cleanup, and canvas/3D lifecycle safety (`src/components/hermes/intelligence/__tests__/visualizers.test.tsx`)
* [x] T024 \[S3809] Add Chat tab launcher tests and Playwright browser proof for `/agents/hermes`, `?intel=1`, product-surface copy, mocked `/__hermes_chat` stream behavior, and a recovery state (`src/components/hermes/chat/__tests__/hermes-chat-tab.test.tsx`, `tests/e2e/hermes-intelligence.spec.ts`)
* [x] T025 \[S3809] Run targeted tests, Playwright proof, `bun run typecheck`, `bun run lint`, `bun run build`, ASCII/LF checks, and secret-pattern sweeps for session deliverables (`bun run build`)

***

## 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 `implement` to start the implement -> creview -> validate sequence

***

## 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-session09-intelligence-portal/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.
