> 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/phase28-session12-brief-qa-markdown-export-and-kpi-strip/tasks.md).

# Task Checklist

**Session ID**: `phase28-session12-brief-qa-markdown-export-and-kpi-strip` **Total Tasks**: 25 **Estimated Duration**: 3-4 hours **Created**: 2026-06-14

***

## 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 | 10     | 10     | 0         |
| Testing        | 5      | 5      | 0         |
| **Total**      | **25** | **25** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

* [x] T001 \[S2812] Verify Session 12 prerequisites, existing static Brief export behavior, and browser-safe payload boundaries (`.spec_system/PRD/phase_28/session_12_brief_qa_markdown_export_and_kpi_strip.md`)
* [x] T002 \[S2812] Inspect Trends-Finderz QA/report reference files and map only portable structural checks into Trend Finder paths (`EXAMPLES/trends-finderz/lib/trends/daily-brief-qa.ts`)
* [x] T003 \[S2812] Confirm current Brief, Trends, and export test coverage before editing (`src/extensions/trend-finder/views/brief-view.tsx`)

***

## Foundation (7 tasks)

Core structures and base implementations.

* [x] T004 \[S2812] \[P] Create static Brief QA contracts, issue codes, severity model, and deterministic result shape with bounded issue output (`scripts/extensions/trend-finder/static-brief-qa.ts`)
* [x] T005 \[S2812] Add static Brief structural QA checks for required sections, meaningful top-angle content, source rows, decisions, movement groups, and evidence (`scripts/extensions/trend-finder/static-brief-qa.ts`)
* [x] T006 \[S2812] Add static Brief leak scan rules for private paths, private hosts, local-storage keys, token-shaped fields, and env-name leaks with explicit error mapping (`scripts/extensions/trend-finder/static-brief-qa.ts`)
* [x] T007 \[S2812] \[P] Create browser-safe Brief export projection and Markdown composer with bounded sections, escaped text, sparse-data fallbacks, and private-string exclusion (`src/extensions/trend-finder/brief-export-model.ts`)
* [x] T008 \[S2812] Extend Brief export model with optional JSON string composition from the same safe projection and no raw source dumps (`src/extensions/trend-finder/brief-export-model.ts`)
* [x] T009 \[S2812] Add run-summary KPI projection for topics, active sources, evidence rows, hidden gems, and run freshness with deterministic labels and tones (`src/extensions/trend-finder/view-model.ts`)
* [x] T010 \[S2812] Add fixture data for QA warnings, Markdown creator-angle output, sparse Brief output, and stale/fresh KPI states (`src/extensions/trend-finder/fixtures.ts`)

***

## Implementation (10 tasks)

Main feature implementation.

* [x] T011 \[S2812] Wire static Brief QA into export projection and rendered HTML validation before any output write with idempotency protection, transaction boundaries, and compensation on failure (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T012 \[S2812] Record bounded QA status, checked-section counts, issue counts, warning counts, and generated timestamp in the manifest without leaking local paths (`scripts/extensions/trend-finder/static-brief-export.ts`)
* [x] T013 \[S2812] Preserve renderer section anchors and QA markers for required Brief sections without exposing raw internals (`scripts/extensions/trend-finder/static-brief-renderer.ts`)
* [x] T014 \[S2812] Add Brief view QA status line with pass, warning, fail, and unavailable states derived from safe projection (`src/extensions/trend-finder/views/brief-view.tsx`)
* [x] T015 \[S2812] Add copy-as-Markdown action with accessible labels, focus support, clipboard denied handling, and duplicate-trigger prevention while in-flight (`src/extensions/trend-finder/views/brief-view.tsx`)
* [x] T016 \[S2812] Add optional JSON export or copy action using the safe Brief projection with state reset on data change and no direct file-system access (`src/extensions/trend-finder/views/brief-view.tsx`)
* [x] T017 \[S2812] Add Brief visibility menu entry and feedback state reset so copy/export controls remain keyboard reachable and revisitable (`src/extensions/trend-finder/views/brief-view.tsx`)
* [x] T018 \[S2812] Replace ad hoc Trends KPI row values with the tested run-summary KPI projection, including freshness labels and source/evidence detail (`src/extensions/trend-finder/views/trends-view.tsx`)
* [x] T019 \[S2812] Update static Brief export tests for QA manifest fields, rendered HTML QA pass, leak failure, and output preservation on failure (`scripts/extensions/trend-finder/__tests__/static-brief-export.test.ts`)
* [x] T020 \[S2812] Update UI surfaces documentation for shipped Brief QA status, copy-as-Markdown behavior, JSON export if included, and KPI strip labels (`docs/extensions/trend-finder-ui-surfaces.md`)

***

## Testing (5 tasks)

Verification and quality assurance.

* [x] T021 \[S2812] \[P] Add static Brief QA unit tests for structural checks, leak scans, issue limits, deterministic ordering, and blocking severity (`scripts/extensions/trend-finder/__tests__/static-brief-qa.test.ts`)
* [x] T022 \[S2812] \[P] Add Brief export model tests for Markdown composition, JSON composition, sparse payloads, escaping, and private-string exclusion (`src/extensions/trend-finder/__tests__/brief-export-model.test.ts`)
* [x] T023 \[S2812] \[P] Add Brief view component tests for QA status, clipboard success, clipboard failure, duplicate-trigger prevention, and feedback reset (`src/extensions/trend-finder/views/__tests__/brief-view.test.tsx`)
* [x] T024 \[S2812] \[P] Extend view-model tests for run-summary KPI projection, freshness labels, degraded-source tones, empty states, and deterministic ordering (`src/extensions/trend-finder/__tests__/view-model.test.ts`)
* [x] T025 \[S2812] Run focused tests, type checks, and ASCII validation for all session files, documenting unrelated repo-wide failures (`package.json`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [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/phase28-session12-brief-qa-markdown-export-and-kpi-strip/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.
