> 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/sessions/phase24-session07-static-brief-export/tasks.md).

# Task Checklist

**Session ID**: `phase24-session07-static-brief-export` **Total Tasks**: 25 **Estimated Duration**: 3.5-4 hours **Created**: 2026-06-08

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[SNNMM]` = Session reference (NN=phase number, MM=session number)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 7      | 7      | 0         |
| Implementation | 11     | 11     | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **25** | **25** | **0**     |

***

## Setup (3 tasks)

Initial verification and environment preparation.

* [x] T001 \[S2407] Verify completed Phase 24 prerequisites, current Brief view behavior, Trend Finder schema validation, asset hardening helpers, Workbench local triage non-export boundary, and generated-data privacy rules (`.spec_system/specs/phase24-session03-browser-safe-evidence-assets-file-hardening/validation.md`, `.spec_system/specs/phase24-session06-signal-workbench-local-triage/validation.md`, `src/extensions/trend-finder/views/brief-view.tsx`, `src/extensions/trend-finder/schema.ts`, `scripts/extensions/trend-finder/evidence-assets.ts`)
* [x] T002 \[S2407] Confirm live-data extraction path, default generated export root, existing `.cache/` ignore coverage, package script conventions, and static report fixture strategy (`src/data/live-data.example.json`, `.gitignore`, `package.json`, `tests/e2e/fixtures/live-data.ts`)
* [x] T003 \[S2407] Review Outlier Lab static export references and existing docs language so implementation keeps hosting, public deployment, and generated artifact commits opt-in (`EXAMPLES/outlier-lab/build.py`, `EXAMPLES/outlier-lab/index.html`, `EXAMPLES/outlier-lab/vercel.json`, `docs/extensions/README_docs-extensions.md`, `docs/extensions/trend-finder-pipeline.md`, `docs/extensions/trend-finder-ui-surfaces.md`)

***

## Foundation (7 tasks)

Core contracts and base implementations.

* [x] T004 \[S2407] \[P] Create static Brief export contract types, bounded constants, result summaries, warning codes, and schema-backed safe report validation with exhaustive private-field exclusions (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T005 \[S2407] \[P] Create static Brief renderer primitives for deterministic HTML, text escaping, URL filtering, inline JSON escaping, accessibility landmarks, and no remote script dependencies (`scripts/extensions/trend-finder/static-brief-renderer.ts`)
* [x] T006 \[S2407] Implement live-data loading and Trend Finder branch extraction with schema-validated input and explicit error mapping (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T007 \[S2407] Implement output root resolution, default `.cache/extensions/trend-finder/static-brief/` directory selection, traversal rejection, temporary write paths, and atomic final renames with compensation on failure (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T008 \[S2407] Implement safe report projection for run metadata, source health, top topics, score/actionability labels, public evidence links, spend, enrichment, asset summary, and bounded prediction/retro rows with deterministic ordering (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T009 \[S2407] Implement asset export policy that accepts only report-local validated asset references or falls back to labels when bridge URLs, private cache paths, unsupported content types, or missing files appear (`scripts/extensions/trend-finder/static-brief-export.ts`, `scripts/extensions/trend-finder/evidence-assets.ts`)
* [x] T010 \[S2407] Implement final report privacy scanner for token-shaped strings, private paths, raw logs, prompts, provider responses, Actor/Dataset internals, raw source dumps, account auth, credentials, and local triage notes (`scripts/extensions/trend-finder/static-brief-export.ts`)

***

## Implementation (11 tasks)

Main feature implementation.

* [x] T011 \[S2407] Create static Brief export CLI with `--input`, `--output`, `--dry-run`, `--json`, `--help`, abort handling, safe summaries, and validated external arguments (`scripts/trend-finder-export-brief.ts`)
* [x] T012 \[S2407] Add package script for the opt-in export command without changing default build, dev, aggregate, scheduler, or deployment workflows (`package.json`)
* [x] T013 \[S2407] Render standalone report shell, metadata, summary metrics, source health, top opportunities, public evidence, provenance labels, prediction/retro context, and explicit empty/error states (`scripts/extensions/trend-finder/static-brief-renderer.ts`)
* [x] T014 \[S2407] Add browser-only report interactivity for expanding evidence/source sections, copying safe public links where supported, and resetting transient state on page reload without external dependencies (`scripts/extensions/trend-finder/static-brief-renderer.ts`)
* [x] T015 \[S2407] Write export metadata and manifest summary with generated timestamp, source live-data path label, run ID, row counts, skipped unsafe assets, privacy warnings, and cache-header guidance fields (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T016 \[S2407] Ensure unsupported or unsafe asset references never block the whole export when a safe fallback label can be rendered, but fail closed for path escape or private reference attempts (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T017 \[S2407] Add fixture coverage for exportable top topics, source health, spend, enrichment, asset states, prediction/retro rows, missing evidence, unsafe asset references, and local triage privacy cases (`src/extensions/trend-finder/fixtures.ts`, `tests/e2e/fixtures/live-data.ts`)
* [x] T018 \[S2407] Update extension docs README to replace "generated HTML report output is not implemented" with the implemented opt-in static Brief export boundary (`docs/extensions/README_docs-extensions.md`)
* [x] T019 \[S2407] Update pipeline docs for the export command, generated output root, fail-closed validation, privacy exclusions, asset fallback behavior, and optional cache-header/hosting guidance (`docs/extensions/trend-finder-pipeline.md`)
* [x] T020 \[S2407] Update UI surface docs for Brief export behavior, report sections, local triage and visibility exclusions, safe evidence links, and standalone report limitations (`docs/extensions/trend-finder-ui-surfaces.md`)
* [x] T021 \[S2407] Update runtime/provenance docs for static export provenance labels, generated artifact boundaries, skipped unsafe assets, and no raw runtime/private cache exposure (`docs/extensions/trend-finder-runtime-and-provenance.md`)

***

## Testing (4 tasks)

Verification and quality assurance.

* [x] T022 \[S2407] \[P] Write static export unit tests for projection, branch extraction, invalid payloads, path containment, atomic writes, unsafe asset fallback, private-data rejection, dry-run behavior, and summary counts (`scripts/extensions/trend-finder/__tests__/static-brief-export.test.ts`)
* [x] T023 \[S2407] \[P] Write renderer unit tests for escaped text, escaped attributes, safe URLs, inline JSON escaping, bounded rows, accessibility landmarks, empty states, and no remote script dependencies (`scripts/extensions/trend-finder/__tests__/static-brief-renderer.test.ts`)
* [x] T024 \[S2407] \[P] Write static report browser smoke test that exports from fixture data, opens `index.html`, verifies responsive report sections and public links, and asserts private strings, raw logs, cache paths, account auth, and triage notes are absent (`tests/e2e/trend-finder-static-brief.spec.ts`)
* [x] T025 \[S2407] Run focused static export tests, related Trend Finder tests, script typecheck, app typecheck, lint, docs formatting, ASCII validation, direct browser-open manual check, and git diff review (`package.json`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing or unrelated blockers documented
* [x] All files ASCII-encoded
* [x] implementation-notes.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Run the validate workflow step to verify session completeness.


---

# 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/sessions/phase24-session07-static-brief-export/tasks.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.
