> 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_24/session_07_static_brief_export.md).

# Session 07: Static Brief Export

**Session ID**: `phase24-session07-static-brief-export` **Status**: Not Started **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Add an opt-in static report path that exports only browser-safe Trend Finder output.

***

## Planning Source

* `PRD_phase_24.md` folded source memo, S07 coverage.
* Findings covered: 7, 10, and 13.

***

## Active EXAMPLES References

* [EXAMPLES/outlier-lab/build.py:500](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/EXAMPLES/outlier-lab/build.py:500): standalone HTML generation shape and browser-only interactivity reference.
* [EXAMPLES/outlier-lab/index.html:1](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/EXAMPLES/outlier-lab/index.html:1): static first-run fallback page.
* [EXAMPLES/outlier-lab/.github/workflows/refresh.yml:35](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/EXAMPLES/outlier-lab/.github/workflows/refresh.yml:35): scheduled regeneration reference.
* [EXAMPLES/outlier-lab/.github/workflows/refresh.yml:40](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/EXAMPLES/outlier-lab/.github/workflows/refresh.yml:40): generated artifact commit pattern, referenced only as something Trend Finder must not enable by default.
* [EXAMPLES/outlier-lab/vercel.json:13](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/EXAMPLES/outlier-lab/vercel.json:13): immutable asset cache header reference.
* [EXAMPLES/outlier-lab/vercel.json:24](https://github.com/moshehbenavraham/ai-os/blob/main/home/aiwithapex/projects/aios/EXAMPLES/outlier-lab/vercel.json:24): revalidated HTML cache header reference.

These are implementation references only. Hosting and generated artifact commits remain opt-in documentation, not default Trend Finder behavior.

***

## Source Memo Coverage

* Finding 7: add optional static Brief export that writes a browser-safe standalone report from the current validated Trend Finder payload.
* Finding 10: export delivery may use immutable cache headers only for content-addressed allowed assets while the report payload revalidates.
* Finding 13: any local preview/file-serving path must use the hardened file bridge rules from Session 03.
* Rejected direct copy: do not default to public Vercel deployment, scheduled generated artifact commits, or exporting private runtime data/media.

***

## Scope

### In Scope (MVP)

* Add a static Brief export command that reads the current validated Trend Finder payload and writes a standalone report to an explicit generated export directory.
* Export only safe summary fields, source health, public evidence links, provenance labels, score/actionability labels, bounded prediction/retro context, and allowed evidence asset references.
* Exclude raw prompts, provider responses, raw source dumps, private snapshots, private caches, logs, credentials, hidden local triage notes, and account auth.
* Use the Session 03 file hardening rules for any local preview or file-serving path.
* Include cache-header guidance for immutable content-addressed assets and revalidated HTML/report payloads, while keeping hosting/deployment opt-in docs only.
* Add CLI tests, schema tests, and a browser smoke test for the exported report.

### Out of Scope

* Public Vercel deployment as a default workflow.
* Auto-committing generated private runtime data, media assets, caches, or reports.
* Exporting local triage notes or private cache paths by default.

***

## Primary Implementation Areas

* New `scripts/trend-finder-export-brief.ts` or equivalent script location
* `src/extensions/trend-finder/schema.ts`
* `src/extensions/trend-finder/views/brief-view.tsx` as display logic reference
* `src/extensions/trend-finder/reference-docs.ts`
* `tests/e2e/trend-finder*.spec.ts`
* `docs/extensions/README_docs-extensions.md`
* `docs/extensions/trend-finder-pipeline.md`
* `docs/extensions/trend-finder-ui-surfaces.md`

***

## Prerequisites

* [ ] Confirm Session 03 asset and file-serving hardening is available.
* [ ] Confirm validated Trend Finder payload read path.
* [ ] Confirm generated export directory is gitignored or otherwise safe by default.

***

## Deliverables

1. Static Brief export command and generated-output directory contract.
2. Export schema guards and fail-closed behavior for invalid or unsafe payloads.
3. Standalone browser-safe report output with safe asset references.
4. CLI, schema, and browser smoke tests.
5. Updated extension README, pipeline, and UI surface docs.

***

## Success Criteria

* [ ] Export command fails closed when the payload is missing, invalid, or contains unsupported asset references.
* [ ] Exported output contains no private cache paths, credentials, raw logs, raw transcripts, raw source dumps, account auth, or local triage notes.
* [ ] Documentation makes hosting optional and does not prescribe committing private generated runtime data.
* [ ] Asset references follow the hardened file/asset contract from Session 03.


---

# 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_24/session_07_static_brief_export.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.
