> 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/demo-website/readme_demo-website.md).

# AI OS Public Demo Fixtures

`demo-website/` contains the committed, browser-safe fixture boundary for the AI OS public demo. It is not a fork of the React app and it does not own the normal Cloudflare Worker deployment path.

## Boundary

Pages demo routes consume files under `demo-website/public/demo/`:

* `live-data.snapshot.json` - bounded LiveData projection for host and extension routes.
* `snapshot-metadata.json` - small provenance payload for labels and route surfaces.
* `graphs/index.json` and `graphs/*.json` - Knowledge Graph fixtures parsed through the graph contracts.
* `trend-finder-assets/` - reviewed public Trend Finder assets only.

The source of truth for authoring fixtures is the local-only command:

```sh
bun run demo:snapshot
```

The command may read private local inputs such as `src/data/live-data.json`, but it must project through an allowlist and pass privacy scans before writing any public fixture. Raw local runtime data, credentials, prompts, transcripts, command output, private memory text, bridge URLs, local paths, and private source logs must never be copied into this tree.

## Current Snapshot

The current committed Phase 33 snapshot was captured at `2026-06-25T05:03:40.752Z` from source commit `7681a517980f`. It contains a public-safe Trend Finder fixture with 8 topics, 32 evidence rows, 3 sources, 3 watchlist rows, 1 run narrative, 8 movement analyses, 1 industry event, and a sanitized Engine Replay trace. It also contains an allowlisted Dream Review fixture with 4 prescriptions and 12 tags.

The snapshot manifest records 5 private fields removed, 9 local paths removed, 3 auth details removed, 10 arrays trimmed, 9 labels replaced, and a scan status of `pass` with 0 issues. Route coverage contains 24 public demo routes.

## Pages Build Rule

Cloudflare Pages builds consume the committed fixture files. They do not run `bun run demo:snapshot`, fetch live data, call local bridge URLs, run schedulers, collect sources, upload files, or perform account-auth flows.

The Pages build command is:

```sh
bun run demo:build:pages
```

This command runs the app in public demo mode and assembles the generated TanStack client output plus committed `demo-website/public/*` files into `demo-website/dist/`. The final directory is a static Pages root containing a top-level `index.html`, `_redirects`, `_headers`, and `/demo/*` fixture assets. `demo-website/dist/` is generated output and remains ignored.

Client-side routes rely on Cloudflare Pages native SPA rendering, which applies when the final Pages root does not contain a top-level `404.html` file:

```
https://developers.cloudflare.com/pages/configuration/serving-pages/#single-page-application-spa-rendering
```

The `_redirects` file is still kept as an explicit Pages routing boundary, but it does not contain the older `/* /index.html 200` catch-all rule because Wrangler Pages dev flags that rule as an infinite loop in current releases.

## Cloudflare Pages Git Settings

Use these settings for a Git-backed Cloudflare Pages project:

```
Root directory: repo root
Build command: bun run demo:build:pages
Build output directory: demo-website/dist
Production branch: main or the selected demo branch
Environment variables: BUN_VERSION=1.3.14
```

The Pages project name is an operator deployment detail and is not committed to this repository.

## Local Static Preview

Run:

```sh
bun run demo:preview:pages
```

The command rebuilds the static output and serves `demo-website/dist` through `wrangler pages dev`. It does not use Vite middleware and does not start the normal Worker preview path.

If Wrangler Pages dev reads repository Worker configuration instead of the static Pages root, serve an isolated copy of `demo-website/dist` and run the same route smoke checks against that temporary directory.

## Pages Bundle Budget

After building the Pages output, measure the generated static client assets:

```sh
bun run demo:build:pages
bun run demo:budget:pages
```

The Pages budget script points the shared bundle checker at `demo-website/dist/assets`. The normal Worker budget path remains `bun run budget:check`.

## Direct Upload

The production public demo URL is `https://demo.aiagentsos.com`, backed by the `ai-os-public-demo` Cloudflare Pages project. The current production direct upload was deployed on 2026-06-25 from source commit `079d26316793`; Cloudflare returned deployment URL `https://032a8040.ai-os-public-demo.pages.dev`.

After the operator creates or selects a Pages project, direct upload is:

```sh
bun run demo:build:pages
bun run demo:deploy:pages --project-name <pages-project-name> --branch main
```

The deploy helper validates the project name and prints a dry-run command by default. Add `--execute` to run `wrangler pages deploy` after reviewing the command. Replace `<pages-project-name>` with the operator-supplied Pages project name; this repository does not commit that external deployment detail.

The Phase 33 direct upload used project `ai-os-public-demo`, branch `main`, custom domain `demo.aiagentsos.com`, and source commit `7681a517980f`; hosted verification initially passed at `https://ad0c5fdf.ai-os-public-demo.pages.dev`.

## Deployment Boundaries

* Do not reuse `bun run worker:deploy` for this public demo path.
* Do not add `pages_build_output_dir` to the root `wrangler.jsonc` for v1.
* Keep the existing Cloudflare Worker deployment independent of the Pages demo.
* Keep the Pages demo static-only for v1; do not add Pages Functions or advanced `_worker.js` mode without revisiting `_redirects` and `_headers`.
* Keep v1 analytics-free unless a separate privacy review approves analytics.

## Regenerating Fixtures

Run the exporter from the repository root:

```sh
bun run demo:snapshot
```

After regeneration, review:

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

The manifest records input sources, redaction counts, route coverage, scan results, exporter version, source commit, capture time, Trend Finder count summary, Dream count summary, and field policies.


---

# 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/demo-website/readme_demo-website.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.
