> 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/phase27-session10-demand-centers/tasks.md).

# Task Checklist

**Session ID**: `phase27-session10-demand-centers` **Total Tasks**: 24 **Estimated Duration**: 3-4 hours **Created**: 2026-06-13

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[SNNMM]` = Session reference (NN=phase number, MM=session number)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 6      | 6      | 0         |
| Implementation | 10     | 10     | 0         |
| Testing        | 5      | 5      | 0         |
| **Total**      | **24** | **24** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

* [x] T001 \[S2710] Verify Session 10 prerequisites, source constraints, and observed-count rules (`.spec_system/PRD/phase_27/session_10_demand_centers.md`)
* [x] T002 \[S2710] Confirm current Trend Finder validation commands and payload budget checks (`package.json`)
* [x] T003 \[S2710] Create implementation-notes scaffold for session progress tracking (`.spec_system/specs/phase27-session10-demand-centers/implementation-notes.md`)

***

## Foundation (6 tasks)

Core structures and base implementations.

* [x] T004 \[S2710] \[P] Create demand cluster helper for question extraction, token clustering, observed labels, and deterministic ordering (`scripts/extensions/trend-finder/demand-clusters.ts`)
* [x] T005 \[S2710] \[P] Extend Trend Finder schema with bounded demand cluster types, defaults, provenance labels, and reference-safe parsing (`src/extensions/trend-finder/schema.ts`)
* [x] T006 \[S2710] \[P] Extend analyst contract for optional demand cluster briefs with schema-validated input and explicit error mapping (`scripts/lib/ai-runtime/trend-analyst.ts`)
* [x] T007 \[S2710] \[P] Add demand cluster view-model projection with bounded labels, related topic labels, evidence links, and exhaustive state handling (`src/extensions/trend-finder/view-model.ts`)
* [x] T008 \[S2710] Define static Brief demand projection fields with sanitized output boundaries and deterministic ordering (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T009 \[S2710] Add bounded demand fixture data for UI and legacy default coverage (`src/extensions/trend-finder/fixtures.ts`)

***

## Implementation (10 tasks)

Main feature implementation.

* [x] T010 \[S2710] Wire demand cluster construction into the collector using existing evidence, topics, and history with no new source calls (`scripts/extensions/trend-finder/collector.ts`)
* [x] T011 \[S2710] Merge analyst demand brief output with deterministic fallback and invented-reference rejection (`scripts/lib/ai-runtime/trend-analyst.ts`)
* [x] T012 \[S2710] Publish demand cluster payload fields through collector warnings, provenance, and caps with timeout-safe failure-path handling (`scripts/extensions/trend-finder/collector.ts`)
* [x] T013 \[S2710] Render dashboard Brief Demand Centers panel with explicit loading, empty, error, and fallback states (`src/extensions/trend-finder/views/brief-view.tsx`)
* [x] T014 \[S2710] Add related topic hash selection in Trends view with state reset or revalidation on re-entry (`src/extensions/trend-finder/views/trends-view.tsx`)
* [x] T015 \[S2710] Add Brief related topic jump-links with platform-appropriate accessibility labels and focus support (`src/extensions/trend-finder/views/brief-view.tsx`)
* [x] T016 \[S2710] Project demand clusters into static Brief rows without raw prompts, private paths, or raw source payloads (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T017 \[S2710] Render static Brief Demand Centers section with escaped text, observed count labels, and derived growth labels (`scripts/extensions/trend-finder/static-brief-renderer.ts`)
* [x] T018 \[S2710] Enforce demand cluster payload caps for cluster count, citations, related topics, and text length (`src/extensions/trend-finder/schema.ts`)
* [x] T019 \[S2710] Preserve legacy payload parsing and empty-state behavior across dashboard and static Brief paths (`src/extensions/trend-finder/schema.ts`)

***

## Testing (5 tasks)

Verification and quality assurance.

* [x] T020 \[S2710] \[P] Add focused helper tests for extraction heuristics, clustering bounds, counts, related topics, growth labels, and fallback briefs (`scripts/extensions/trend-finder/__tests__/demand-clusters.test.ts`)
* [x] T021 \[S2710] \[P] Add schema and analyst tests for invalid references, invented metrics, fallback output, and legacy defaults (`src/lib/__tests__/trend-finder-schema.test.ts`, `scripts/lib/ai-runtime/__tests__/trend-analyst.test.ts`)
* [x] T022 \[S2710] \[P] Add collector tests for demand cluster publication, caps, fallback warnings, and no-new-source behavior (`scripts/extensions/trend-finder/__tests__/collector.test.ts`)
* [x] T023 \[S2710] \[P] Add view-model, dashboard Brief, static export, and static renderer tests for demand labels, empty states, escaping, and jump-links (`src/extensions/trend-finder/__tests__/view-model.test.ts`, `src/lib/__tests__/trend-finder-dashboard.test.tsx`, `scripts/extensions/trend-finder/__tests__/static-brief-export.test.ts`, `scripts/extensions/trend-finder/__tests__/static-brief-renderer.test.ts`)
* [x] T024 \[S2710] Run focused validation, typechecks, ASCII check, and record results in implementation notes (`.spec_system/specs/phase27-session10-demand-centers/implementation-notes.md`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [x] All files ASCII-encoded
* [x] implementation-notes.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Run the validate workflow step for independent verification.


---

# 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/phase27-session10-demand-centers/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.
