> 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_31/session_02_snapshot_exporter_and_fixtures.md).

# Session 02: Snapshot Exporter And Fixtures

**Session ID**: `phase31-session02-snapshot-exporter-and-fixtures` **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Create the committed public-safe snapshot boundary consumed by the hosted demo.

***

## Scope

### In Scope (MVP)

* Create `demo-website/` source structure.
* Add `demo-website/public/demo/` fixture directories.
* Add `demo-website/snapshot-manifest.json`.
* Add `demo-website/public/demo/snapshot-metadata.json`.
* Add generated-only `demo-website/dist/` gitignore coverage.
* Add `scripts/demo/export-pages-snapshot.ts`.
* Add `demo:snapshot` package script.
* Project `src/data/live-data.json` or `src/data/live-data.example.json` through an allowlist-first exporter.
* Copy or generate approved graph snapshots from `src/data/graphs/`.
* Copy or generate approved Trend Finder payloads, static Brief outputs, and selected static media.
* Add redaction tests and scan logic for private paths, bridge URLs, auth terms, secrets, memory text, prompts, transcripts, command output, and private labels.

### Out of Scope

* Cloudflare Pages static build output.
* Route-specific UI conversion to demo data.
* Running the exporter during Cloudflare builds.
* Publishing raw `src/data/live-data.json`.

***

## Folded Source Details

Target source and fixture shape:

```
demo-website/
|-- README.md
|-- snapshot-manifest.json
|-- public/
|   |-- _headers
|   |-- _redirects
|   `-- demo/
|       |-- live-data.snapshot.json
|       |-- graphs/
|       |-- trend-finder-assets/
|       `-- snapshot-metadata.json
`-- dist/                  # generated-only; gitignored build output
```

`demo:snapshot` is local authoring only:

```
bun run demo:snapshot
```

Inputs:

* `src/data/live-data.json` when present, treated as private local input.
* `src/data/live-data.example.json` as fallback.
* `src/data/graphs/` seed files.
* Trend Finder browser-safe fixture/generated data.
* Trend Finder static Brief outputs when they pass public-safe projection.
* Public image assets under `public/assets/`.
* Selected `src/assets/` media only when reviewed as public-safe.

Outputs:

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

Manifest fields:

* `capturedAt`
* `sourceCommit`
* exporter version
* input sources used
* redaction counts
* route coverage
* scan results

Always remove or replace:

* Absolute local paths such as `/home/...`, `/Users/...`, and tool config locations.
* Auth state details, token/account metadata, key presence, OAuth state, and credential counts.
* Agent memory text, transcripts, raw prompts, raw command output, and private note/document snippets.
* Raw local project names that are not intended for public demo.
* Private source logs, cache paths, debug traces, and local scheduler paths.
* Any `.env`, secret, token, key, credential, or account-auth indicators.
* `file://`, loopback URLs, private-LAN URLs, query-bearing local URLs, and bridge URLs beginning with `/__`.

Safe replacements:

* Public project labels such as `AI OS`, `Creator Radar`, and `Local Knowledge Base`.
* Rounded or bounded usage totals that demonstrate layout without revealing real operator telemetry.
* Trend Finder public evidence, provenance labels, source health summaries, score breakdowns, creator angles, watchlist items, and Engine Replay stages when already sanitized and source-compliance docs allow the published fields.
* Demo-specific agent/session rows that are visibly fixture-backed.
* Dated labels such as `Frozen snapshot captured Jun 2026`.
* Never use "live" unless the source was genuinely live at capture time and is safe to describe that way.

Open question to carry forward inside implementation notes: which Trend Finder generated fields pass source-compliance review and which must fall back to fixture/demo labels.

***

## Prerequisites

* [ ] Session 01 public demo flag shape is available.
* [ ] Current live-data and graph fallback data contracts are understood.
* [ ] Trend Finder fields selected for public snapshot are reviewed against source-compliance docs.
* [ ] `.gitignore` can be updated for generated-only `demo-website/dist/`.

***

## Deliverables

1. Local-only snapshot exporter.
2. Committed `demo-website/public/demo/*` fixtures and metadata.
3. Snapshot manifest with capture time, source commit, exporter version, inputs, route coverage, redaction counts, and scan results.
4. Tests proving private runtime fields are rejected or removed.
5. Gitignore coverage for generated Pages output.
6. Explicit documentation that Pages builds consume committed fixtures and do not run `demo:snapshot`.

***

## Success Criteria

* [ ] `bun run demo:snapshot` refreshes only public demo fixtures and metadata.
* [ ] Snapshot outputs contain no absolute local paths, `file://` URLs, loopback or private-LAN URLs, `/__*` bridge URLs, token/key-shaped strings, raw prompts, transcripts, command output, or private memory text.
* [ ] Committed fixtures are sufficient to populate the major demo routes.
* [ ] The Pages build can consume committed fixtures without running the exporter.
* [ ] `src/data/live-data.json` is never copied raw into the repo or Pages output.


---

# 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_31/session_02_snapshot_exporter_and_fixtures.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.
