> 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_33/prd_phase_33.md).

# PRD Phase 33: Cloudflare Pages Real Product Fixtures

**Status**: Complete **Sessions**: 6 (initial estimate) **Estimated Duration**: 6-12 days

**Progress**: 6/6 sessions (100%)

***

## Overview

Phase 33 refreshes the static Cloudflare Pages demo so Trend Finder and Dream Review are powered by frozen, public-safe copies of real local output instead of generic or fallback-feeling fixture data.

Trend Finder should show realistic topics, evidence, source health, scoring, movement, watchlist, Brief support, and Engine Replay state captured from a reviewed local run. Dream Review should show useful prescriptions captured from local AI OS material after allowlist projection and privacy scanning. The hosted demo remains static-only and credential-free.

All standalone planning details for this phase are folded into this PRD and the six session stubs. No external ongoing-project plan file is required to execute the phase.

***

## Progress Tracker

| Session | Name                           | Status   | Est. Tasks | Validated  |
| ------- | ------------------------------ | -------- | ---------- | ---------- |
| 01      | Capture Local Demo Runs        | Complete | \~12-25    | 2026-06-25 |
| 02      | Freeze Public Fixtures         | Complete | \~12-25    | 2026-06-25 |
| 03      | Harden Trend Finder Projection | Complete | \~12-25    | 2026-06-25 |
| 04      | Harden Dream Projection        | Complete | \~12-25    | 2026-06-25 |
| 05      | Polish Public Demo UI States   | Complete | \~12-25    | 2026-06-25 |
| 06      | Scan Build And Deploy          | Complete | \~12-25    | 2026-06-25 |

***

## Completed Sessions

* Session 01: Capture Local Demo Runs - Complete 2026-06-25. Produced and reviewed the local Trend Finder and Dream Review capture candidate, recorded counts, provenance, public-safety caveats, and confirmed sanitized Engine Replay availability while deferring public fixture freezing to Session 02.
* Session 02: Freeze Public Fixtures - Complete 2026-06-25. Regenerated the committed public demo fixtures through the snapshot exporter, added manifest count-summary and Dream field-policy metadata, and verified static Pages privacy, JSON, type, lint, format, and test gates while deferring deeper Trend Finder and Dream projection hardening to Sessions 03 and 04.
* Session 03: Harden Trend Finder Projection - Complete 2026-06-25. Hardened the public demo Trend Finder projection with retained topic, evidence, source, movement, industry event, narrative, prediction, story-log, and sanitized Engine Replay artifacts; regenerated public fixtures; and verified parser-backed reference coherence, privacy scan, focused tests, full tests, coverage, lint, typecheck, format, JSON, ASCII, and LF gates.
* Session 04: Harden Dream Projection - Complete 2026-06-25. Added a bounded public-safe Dream Review projection to the Pages snapshot exporter, regenerated committed public fixtures with 4 allowlisted prescriptions, updated Dream field-policy and count metadata, and verified privacy scan, focused tests, full tests, lint, format, typecheck, JSON, ASCII, and LF gates.
* Session 05: Polish Public Demo UI States - Complete 2026-06-25. Polished hosted public-demo copy and disabled runtime states across Dream Review, Trend Finder routes, sidebar labels, route-matrix checks, and focused tests so frozen data, read-only setup, browser-local controls, and disabled AI runtime behavior are explicit.
* Session 06: Scan Build And Deploy - Complete 2026-06-25. Refreshed the committed public demo snapshot, rebuilt and scanned the static Pages output, passed budget, type, lint, format, unit, desktop, and mobile route-smoke gates, executed the Cloudflare Pages upload, and verified hosted routes, metadata, source commit, and no local bridge requests.

***

## Upcoming Sessions

* None. Phase 33 is complete and ready for phase transition audit.

***

## Objectives

1. Produce reviewed local Trend Finder and Dream Review output for demo use.
2. Freeze the selected output into deterministic public Pages fixtures.
3. Preserve useful Trend Finder artifacts while keeping references coherent.
4. Add a deliberately small public-safe Dream Review projection.
5. Make hosted UI labels honest about frozen data and disabled runtime.
6. Verify, package, and deploy the static Pages demo without private data leaks.

***

## Detailed Requirements

### Objective Detail

Fix the Cloudflare Pages demo so Trend Finder and Dream Review are powered by frozen, public-safe copies of real local output instead of generic placeholder or fallback-feeling demo data.

The hosted demo must show realistic Trend Finder topics, evidence, source health, scoring, movement, watchlist, Brief support, and Engine Replay state captured from real reviewed-source output. It must also show real Dream Review prescriptions captured from local AI OS material after sanitization. The Pages site must remain static, credential-free, and safe to publish.

### Current Static Boundary

The demo website already has a static fixture boundary:

* `demo-website/public/demo/live-data.snapshot.json`
* `demo-website/public/demo/snapshot-metadata.json`
* `demo-website/public/demo/graphs/index.json`
* `demo-website/public/demo/graphs/ai-os.json`
* `demo-website/public/demo/trend-finder-assets/`

`src/lib/use-live-data.ts` switches from the local bridge endpoint `/__live-data` to `/demo/live-data.snapshot.json` when `VITE_AI_OS_PUBLIC_DEMO` is true. The Pages build command in `package.json` sets that environment flag, emits the static TanStack client, and then `scripts/demo/assemble-pages-dist.ts` copies committed `demo-website/public/*` files into `demo-website/dist/`.

`bun run demo:snapshot` currently projects `src/data/live-data.json` through `scripts/lib/pages-demo-snapshot.ts` and writes committed fixtures. The exporter redacts private fields, local paths, auth details, asset references, and unsafe labels before the Pages build consumes the files. `bun run demo:scan:pages` scans both committed fixtures and assembled Pages dist through `scripts/lib/pages-demo-privacy-scan.ts`.

That boundary is correct. This phase makes Trend Finder and Dream Review more deliberate by capturing known-good local output, freezing it, labeling it honestly, and ensuring the UI reads as a polished demo of real product output rather than generic fallback content.

### Current Snapshot Gap

The current public snapshot is mixed:

* It uses `src/data/live-data.json` as input and already contains a bounded Trend Finder branch with 8 topics, 16 evidence items, 12 source summaries, 3 watchlist rows, 8 predictions, 10 retros, and 12 story-log rows.
* The Trend Finder projection omits important run artifacts that the UI can render: `engineTrace`, `collectionHealth`, `runNarratives`, `demandClusters`, `industryEvents`, `movementAnalyses`, and `backtestAggregateSummary`.
* Current Trend Finder provenance labels are still generic fixture labels: `fixture-demo`, `Public demo fixture`, and `Deterministic public snapshot`, even when input came from a real reviewed-source run.
* The exported Trend Finder runtime is intentionally disabled for the hosted demo. That is correct; it should be labeled as a hosted runtime boundary, not as failed runtime state.
* The current public snapshot has `dream` set to `null`. Dream Review should have its own frozen real local data in the public snapshot.

### Codebase Findings

The public demo path is static by design:

* `package.json` defines `demo:snapshot`, `demo:build:pages`, `demo:scan:pages`, `demo:budget:pages`, `demo:deploy:pages`, and `demo:preview:pages`.
* `demo-website/README.md` states that Cloudflare Pages consumes committed fixtures only and must not run collectors, schedulers, account auth, local bridge reads, uploads, or admin mutations.
* `scripts/lib/pages-demo-build.ts` requires `index.html`, `_redirects`, `_headers`, `demo/live-data.snapshot.json`, `demo/snapshot-metadata.json`, and `demo/graphs/index.json` in assembled Pages output, and rejects a top-level `404.html` because it disables Cloudflare Pages native SPA routing.
* `scripts/lib/pages-demo-routes.ts` owns the route coverage matrix used by snapshot metadata and browser smoke tests. It already includes Trend Finder Trends, Engine Replay, Hidden Gems, Sources, Workbench, Watchlist, and Brief routes.

The exporter has the right privacy skeleton, but Trend Finder and Dream need targeted work:

* `projectLiveDataForPublicDemo()` currently sets `isExample: true`, projects host-local dashboard counts, sets `dream: null`, and projects only the `trend-finder` extension under `extensions.items`.
* `projectTrendFinderData()` reparses input with `parseTrendFinderData()`, forces browser runtime to disabled, replaces asset summary state with unavailable counts, projects bounded topics/evidence/sources, and keeps `watchlist` plus `predictionRetroSummary`.
* `projectTrendFinderData()` currently does not copy `engineTrace`, `collectionHealth`, `runNarratives`, `demandClusters`, `industryEvents`, `movementAnalyses`, or `backtestAggregateSummary`, even though `src/extensions/trend-finder/schema.ts`, `engine-replay-model.ts`, `brief-export-model.ts`, and `view-model.ts` all have browser-safe view models for those fields.
* `parseTrendFinderData()` returns an empty default payload when the raw branch fails schema validation. Exporter tests must assert positive content counts after projection, not only privacy scan success.
* `buildManifest()` currently records a Trend Finder field policy but no Dream field policy. When Dream is exported, the manifest must explain what is included and excluded.

Dream Review already has a local private-to-public flow, but the exporter does not consume it yet:

* `bun run scheduler:dream:run` runs `scripts/scheduler-runner.ts --job dream`.
* `scripts/dashboard-dream-run.ts` runs the Dream scheduler and then calls the aggregate pipeline so `src/data/live-data.json` is refreshed after Dream writes output.
* `scripts/lib/dream/loader.ts` reads the latest validated Dream output from primary `~/.ai-os/dreams/` or legacy `~/.claude-os/dreams/`. `scripts/lib/dream/output-reader.ts` only returns output that passes `validateDreamOutput()`.
* `scripts/lib/dream/contracts.ts` defines the full private Dream output: `date`, `model`, `generatedAt`, `prescriptions`, and optional metadata. Each prescription requires `id`, `title`, and `summary`, with optional `rationale`, `nextAction`, `priority`, and `tags`.
* `src/lib/home-transforms.ts` only needs a smaller browser-facing Dream shape: `generatedAt`, `prescriptions[]`, title/headline text, summary or next-action text, evidence/rationale/nextAction, optional `command`, optional `dollarImpact`, and optional `timeImpactMins`.
* `src/lib/validate-live-data.ts` treats `dream` as a loose object and will not enforce a safe public projection by itself. The public exporter must own that allowlist.

### Trend Finder Data Requirements

The demo must include a frozen copy of real Trend Finder data from local generated output:

```
src/data/live-data.json
  -> extensions.items["trend-finder"].data
  -> demo-website/public/demo/live-data.snapshot.json
```

The frozen public copy should keep the useful product-facing parts:

* Ranked topics and hidden-gem topics.
* Public evidence titles, URLs, snippets, source IDs, and timestamps.
* Source health and source setup summaries.
* Collection health and source coverage summaries.
* Score breakdowns, movement state, novelty, momentum, source diversity, and confidence.
* Creator Lens settings that are safe to show.
* Creator angles, suggested hooks, audience questions, watchlist rows, Brief content, prediction summaries, retro summaries, and Engine Replay stages.
* Run narratives, demand clusters, industry-event summaries, movement analyses, and prediction story-log rows when populated and public-scan safe.
* A sanitized `engineTrace` with source, evidence, runtime, score, artifact, decision timeline, stage narration, warning-summary, and run-note state.

The exporter must keep Trend Finder references coherent after bounding arrays. If topics are trimmed, retained evidence, watchlist rows, movement analyses, run narratives, demand clusters, industry events, prediction rows, retro rows, story-log rows, and trace summaries should either reference retained topics or be filtered with the same selection. If evidence is trimmed, retained topics and Brief artifacts must not cite missing evidence IDs.

### Dream Review Data Requirements

The demo must include a frozen copy of real Dream Review data from local generated output:

```
src/data/live-data.json
  -> dream
  -> demo-website/public/demo/live-data.snapshot.json
```

The frozen public copy should keep the useful product-facing parts:

* Dream Review generation time or last run timestamp.
* Prescriptions with safe `id`, `title`, `summary`, `rationale`, `nextAction`, `priority`, and `tags`.
* Browser-facing impact fields when safe, such as time impact or dollar impact.
* Evidence text that explains why the recommendation exists after private details are removed.
* Enough prescriptions to make the home dashboard feel like a real local AI OS review, not an empty hosted shell.

Preferred implementation path: run Dream locally, refresh `src/data/live-data.json` through the aggregate pipeline, then let `demo:snapshot` project `liveData.dream`. If implementation needs a one-off private Dream output authoring input, that file must remain operator-local and must not be read by the Cloudflare build. The committed public output still belongs in `demo-website/public/demo/live-data.snapshot.json`.

The public Dream projection should be deliberately smaller than private `DreamOutput`:

* Keep `generatedAt` and optionally `lastRun` or `date` when useful for UI labels.
* Keep a bounded `prescriptions` array.
* For each prescription, keep safe `id`, `title`, `summary`, `rationale`, `nextAction`, `priority`, `tags`, `evidence`, `dollarImpact`, `timeImpactMins`, and `command` only when each field passes public scanning.
* Drop `model`, provider labels, runtime metadata, warning bodies, raw material fields, output paths, request context, and private diagnostic fields.

### Public Safety Requirements

The frozen public copy must remove or replace private or unsafe data:

* Credentials, account IDs, tokens, API keys, OAuth state, and auth paths.
* Local filesystem paths, private repo paths, cache paths, and log paths.
* Raw source dumps, provider responses, prompts, transcripts, command output, shell logs, and private diagnostics.
* Loopback URLs, private network URLs, local bridge URLs, and hosted mutation endpoints.
* Unreviewed instruction text or private memory text.
* Any source artifact that has not passed the public demo asset policy.

The relevant enforcement points are:

* `collectPublicDemoPrivacyIssues()` for private field names and unsafe string patterns.
* `scanPublicDemoPayload()` for in-memory exporter output.
* `verifySnapshotFilePrivacy()` for committed snapshot files.
* `scanCommittedPagesDemoFixtures()` and `scanGeneratedPagesDemoDist()` for committed fixture and assembled Pages output scans.
* `collectStaticBriefPrivacyIssues()` for Trend Finder static Brief text.
* Dream's `findDreamPrivacyIssues()` and `validateDreamOutput()` before any private Dream output is accepted into local generated data.

### Provenance Requirements

The hosted demo must not imply live collection or live hosted AI analysis. It should say, in data and UI labels, that Trend Finder content is a frozen public demo snapshot derived from a real reviewed-source run and that Dream Review is a frozen public demo snapshot derived from real local AI OS material.

Preferred Trend Finder label language:

* Data state: `frozen-real-demo`
* Data label: `Frozen real Trend Finder snapshot`
* Source state: `reviewed-public-snapshot`
* Source label: `Reviewed public-source snapshot`
* Runtime state: `hosted-runtime-disabled`
* Runtime label: `AI runtime disabled on hosted demo`
* Analysis state should preserve source-run truth where possible: `ai-analyzed` if real AI analysis populated the selected snapshot, otherwise `deterministic-fallback` when the real run used deterministic fallback analysis.

Preferred Dream Review label language:

* Data state: `frozen-real-demo`
* Data label: `Frozen real Dream Review snapshot`
* Source state: `local-material-snapshot`
* Source label: `Frozen local AI OS material`
* Runtime state: `hosted-runtime-disabled`
* Runtime label: `Dream runtime disabled on hosted demo`

Avoid labels that make real frozen data look synthetic when the data came from a real run. Also avoid labels implying the Pages site actively collects sources, calls providers, runs schedulers, or mutates operator data.

The current Trend Finder schema only allows existing provenance states such as `live`, `fixture-demo`, `fallback`, `degraded`, `blocked`, and `unknown`. Implementation can either add schema-supported frozen public demo states or map preferred public labels into existing state values while exposing explicit label fields. Do not put new state strings into the fixture until `TrendFinderProvenanceSchema` accepts them.

### Operating Rule

Cloudflare Pages builds must consume committed frozen fixtures only. They must not run the collector, snapshot exporter, local schedulers, source ingestion, account auth, local bridge reads, uploads, or admin mutations during the Cloudflare build. They must also not run Dream Review or read private Dream output during the Cloudflare build.

Refreshing demo data is an explicit local operator action:

```bash
bun run demo:snapshot
bun run demo:build:pages
bun run demo:scan:pages
bun run demo:budget:pages
```

Only after review should the updated fixture be committed and deployed.

***

## Prerequisites

* Phase 31 completed the static Cloudflare Pages public demo boundary.
* Phase 32 AI Rogue mobile work is complete and remains separate from this public-demo data refresh phase.
* Local `.env.local` supplies Cloudflare deployment credentials when deploy is executed from this repository; values must not be printed or committed.
* `src/data/live-data.json` contains or can be refreshed to contain the selected local Trend Finder and Dream Review payloads.

***

## Planning Assumptions And Resolutions

### Working Assumptions

* Phase 33 is the current public-demo data refresh phase: the master PRD, state phase table, and existing `.spec_system/PRD/phase_33/` artifacts all list it as a six-session phase. This is sufficient evidence to keep Phase 33 as the current phase and avoid creating a duplicate Phase 34.
* Phase 32 is complete: the master PRD says Phase 32 is complete and archived as of 2026-06-25, state marks phase 32 `complete`, and completed-session evidence includes `phase32-session05-gameplay-test-coverage`. Phase 33 can proceed as the active in-progress phase.
* Cloudflare deployment is local to this repository: `.env.local` exposes `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_API_TOKEN` to Bun/Wrangler, while the Pages project name remains an operator deploy argument rather than committed config.
* The current local generated data is a viable first capture candidate: the researched plan records populated Dream output, healthy Trend Finder collection state, realistic Trend Finder counts, and sanitized Engine Replay trace data.
* Current `src/data/live-data.json` was researched as a viable baseline input: generated `2026-06-24T21:00:31.667Z`, Dream has 4 prescriptions, and Trend Finder has 8 topics, 201 evidence items, 12 sources, 3 watchlist rows, 8 predictions, 10 retros, 50 story-log rows, 1 run narrative, 5 industry events, 8 movement analyses, healthy collection health, and sanitized `engineTrace`.
* Current committed `demo-website/public/demo/live-data.snapshot.json` proves the gap: Dream is absent, Trend Finder evidence is trimmed to 16 items, and `engineTrace`, `collectionHealth`, `runNarratives`, `industryEvents`, and `movementAnalyses` are not exported.
* Public demo route verification already belongs to `tests/e2e/pages-demo-routes.spec.ts` and `tests/e2e/pages-demo-mobile.spec.ts`, backed by `scripts/lib/pages-demo-routes.ts`; those tests assert successful route responses and no `/__*` bridge requests.

### Conflict Resolutions

* Earlier Phase 33 planning was created from the supplied plan before official PRD/state tracking listed it: the current run keeps the existing Phase 33 artifacts because the master PRD and state now agree on phase number, objective, session count, and ordering.
* State `current_phase` still pointed at 32 even though Phase 32 is complete and Phase 33 is active: keep `current_phase` at 33 so the next `plansession` run selects Phase 33 Session 02.
* The plan's preferred frozen provenance strings are not currently accepted by `TrendFinderProvenanceSchema`: keep schema-valid state values such as `fixture-demo`, preserve selected run analysis truth where valid, and carry frozen-real meaning in labels and notes unless a later implementation session intentionally migrates schema and tests.
* `TrendFinderProvenanceSchema` currently accepts `dataState` values `live`, `fixture-demo`, and `unknown`; analysis values `ai-analyzed`, `mock`, `disabled`, `deterministic-fallback`, and `unknown`; and source values `live`, `fixture-demo`, `degraded`, `blocked`, `fallback`, and `unknown`.
* A missing or non-sanitized `engineTrace` would make the demo less credible: treat that as a release blocker for this phase and recapture or fail snapshot dry-run instead of silently exporting a missing trace.

***

## Technical Considerations

### Architecture

* Keep the Cloudflare Pages demo static-only. Pages builds consume committed fixtures and must not run collectors, schedulers, account auth, local bridge reads, Dream runtime, source setup writes, uploads, or admin mutations.
* Keep fixture generation as an explicit local operator action through `bun run demo:snapshot`; Cloudflare builds should never refresh fixture data.
* Extend the existing `demo-website/snapshot-manifest.json` with Dream field policy and projection count summaries instead of adding separate committed Trend Finder-only or Dream-only manifests.
* Keep public demo routing under the existing route matrix and no-bridge smoke tests in `tests/e2e/pages-demo-routes.spec.ts`, `tests/e2e/pages-demo-mobile.spec.ts`, and `scripts/lib/pages-demo-routes.ts`.

### Technologies

* Bun demo scripts: `demo:snapshot`, `demo:build:pages`, `demo:scan:pages`, `demo:budget:pages`, `demo:preview:pages`, and `demo:deploy:pages`.
* Static fixture projection in `scripts/lib/pages-demo-snapshot.ts`.
* Public demo privacy scanning in `scripts/lib/pages-demo-privacy-scan.ts`.
* Trend Finder schemas and view models under `src/extensions/trend-finder/`.
* Dream output contracts and browser transforms under `scripts/lib/dream/` and `src/lib/home-transforms.ts`.
* Cloudflare Pages direct upload through Wrangler.

### Risks

* Private local data can leak into committed fixtures: keep allowlist projection, public scans, and negative privacy tests bundled with fixture changes.
* Array trimming can leave dangling references: retain topics first, keep cited evidence, and filter dependent artifacts to retained topic and evidence IDs.
* Hosted copy can imply live runtime behavior: label the demo as frozen and disable or relabel local-only run, scheduler, source setup, upload, and mutation controls.
* Schema drift can silently empty Trend Finder output: add positive projection assertions that exported Trend Finder data parses with expected non-empty counts.
* Deploy credentials can leak through logs or docs: never print token/account values and keep the Pages project name as an operator argument.

### Relevant Considerations

* \[P31] **Pages demo stays static-only**: Use committed fixtures and static Pages output; Functions, hosted collectors, analytics, and writes need a new threat model.
* \[P31] **Static public-demo projection scales**: Separate public-demo mode, allowlist fixtures, and Pages dist assembly are the right boundary to extend.
* \[P31] **Route smoke is a privacy gate**: Route tests must keep proving no `/__*` bridge requests.
* \[P31] **Public-demo release gates stay bundled**: Keep build, scan, budget, private scans, dependency audit, and route-smoke evidence together.
* \[P02] **Extension payloads and labels stay bounded**: Preserve explicit fixture, fallback, degraded, blocked, and unavailable states within payload limits.

***

## Success Criteria

Phase complete when:

* [ ] All 6 sessions completed.
* [ ] Public snapshot includes realistic Trend Finder topics, evidence, source health, watchlist, Brief support, and sanitized Engine Replay state.
* [ ] Public snapshot includes useful non-null Dream Review prescriptions.
* [ ] Trend Finder projection keeps retained topic, evidence, source, and artifact references coherent after bounding arrays.
* [ ] Dream projection includes only allowlisted browser-safe fields.
* [ ] Hosted UI labels data as frozen and runtime as disabled without implying live collection, hosted AI analysis, Dream runtime, source setup writes, scheduler actions, uploads, or fixture mutation.
* [ ] `bun run demo:snapshot --dry-run`, `bun run demo:build:pages`, `bun run demo:scan:pages`, and `bun run demo:budget:pages` pass.
* [ ] Hosted route checks for `/`, Trend Finder Trends, Engine Replay, Hidden Gems, Sources, Watchlist, and Brief return HTTP 200 with no local bridge or mutation requests.
* [ ] Manual review finds no private data, local paths, credentials, raw prompts, provider bodies, or misleading live-runtime claims.

***

## Dependencies

### Depends On

* Phase 31: Cloudflare Pages Public Demo

### Enables

* A stronger public demo release lane for frozen real Trend Finder and Dream Review output.
* Future CI coverage for Pages build, scan, budget, and route smoke checks.


---

# 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_33/prd_phase_33.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.
