> 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/phases/phase_27/session_10_demand_centers.md).

# Session 10: Demand Centers

**Session ID**: `phase27-session10-demand-centers` **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Aggregate question-shaped evidence from already-collected discussion-role sources into cross-topic demand clusters with a creator brief and links to related topic IDs, publishing only observed counts and explicitly labeled estimates, rendered as a Brief panel.

***

## Source Mapping (from the Alpha Radar improvement map, item 4.1)

* **Alpha Radar:** top-level `demand_clusters` -- `question_shape`, `askers_estimate`, `weekly_growth_pct`, `open_window_days`, `creator_brief`, `related_trends` -- rendered as a "Demand Centers" section with jump-links to related trends (`renderDemand()`, `jumpToDemand()` in `EXAMPLES/ai-alpha-radar-submission/public/dashboard.html`).
* **Trend Finder today:** per-topic `audienceQuestions` strings only (`src/extensions/trend-finder/schema.ts`), generated by the analyst or fallback; the metric-only Google Trends demand enrichment (`scripts/extensions/trend-finder/sources/google-trends-demand.ts`, `scripts/lib/ai-runtime/demand-signals.ts`) adjusts momentum but creates no browser surface. Google Trends demand stays opt-in through `FINDTREND_GOOGLE_TRENDS_DEMAND_ENABLED` and documented in `docs/sources/source-compliance-google-trends-demand.md`.
* **Improvement:** aggregate question-shaped evidence (titles/snippets from discussion-role sources already collected) into cross-topic demand clusters with a creator brief and links to related topic IDs. Render as a panel in Brief or a Workbench filter group.
* **Constraints (important):** Alpha Radar's `askers_estimate` and `weekly_growth_pct` are inferred (`"sources": ["inferred"]`). Trend Finder must not invent counts -- publish observed question-evidence counts and labeled estimates only, with the same `estimated` labeling discipline used by spend accounting (`scripts/extensions/trend-finder/spend-accounting.ts` is the pattern to copy).
* **Implement in:** new collector helper (e.g. `scripts/extensions/trend-finder/demand-clusters.ts`), analyst prompt extension in `scripts/lib/ai-runtime/trend-analyst.ts` with deterministic fallback (keyword/question-mark heuristics), schema in `src/extensions/trend-finder/schema.ts`, UI in `src/extensions/trend-finder/views/brief-view.tsx`.

***

## Scope

### In Scope (MVP)

* Question-shaped evidence extraction from existing discussion-role evidence (deterministic heuristics: question marks, question-word openings)
* Cross-topic clustering of similar questions with bounded cluster count
* Observed question-evidence counts per cluster (real counts, not estimates)
* Optional analyst-written cluster brief with deterministic fallback brief
* `relatedTopicIds` linking clusters to current canonical topic IDs with jump-to-topic navigation
* Optional growth context only when the daily series (Session 04) supports an observed week-over-week comparison, labeled `derived`
* Brief panel rendering with explicit empty states
* Tests for extraction heuristics, clustering bounds, count integrity, and fallback briefs

### Out of Scope

* Invented asker counts, open-window day estimates, or any unlabeled projection (explicit non-goal from the mapping)
* New sources or new source calls (works only on already-collected evidence)
* Google Trends scope changes (existing enrichment stays metric-only)

***

## Prerequisites

* [ ] Session 01 completed (Brief layout patterns)
* [ ] Session 04 completed if observed growth context is included

***

## Deliverables

1. Demand cluster helper with deterministic extraction and clustering
2. Bounded schema branch with counts, labels, and related topic IDs
3. Analyst brief extension with validation and fallback
4. Brief panel with cluster cards and topic jump-links
5. Tests covering heuristics, bounds, labeling discipline, and empty states

***

## Success Criteria

* [ ] Every published number is an observed count or carries an explicit `estimated`/`derived` label
* [ ] Clusters cite only real evidence IDs; validator rejects invented references
* [ ] Fallback mode produces useful clusters without AI
* [ ] Payload stays within budget with the bounded cluster count
* [ ] Jump-links select the related topic in the Trends view


---

# 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/phases/phase_27/session_10_demand_centers.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.
