> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase04-session06-public-demo-media-parity-and-offline-loading/tasks.md).

# Task Checklist

**Session ID**: `phase04-session06-public-demo-media-parity-and-offline-loading` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-05-29

***

## 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     | 5      | 5      | 0         |
| Implementation | 8      | 8      | 0         |
| Testing        | 4      | 4      | 0         |
| **Total**      | **20** | **20** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

### Cross-cutting

* [x] T001 \[S0406] Verify Session 02, Session 04, and Session 05 prerequisites plus current public-demo media files and gates (`.spec_system/specs/phase04-session06-public-demo-media-parity-and-offline-loading/implementation-notes.md`)
* [x] T002 \[S0406] Record current public-demo media inventory, service-worker cache policy, lazy music policy, and catalog coverage gaps (`.spec_system/specs/phase04-session06-public-demo-media-parity-and-offline-loading/implementation-notes.md`)
* [x] T003 \[S0406] Create session implementation notes and security compliance artifacts for media, cache, and standalone-boundary review (`.spec_system/specs/phase04-session06-public-demo-media-parity-and-offline-loading/security-compliance.md`)

***

## Foundation (5 tasks)

Core structures and base implementations.

### Repository tooling

* [x] T004 \[S0406] \[P] Create public-demo media config for images, icons, speech, music, manifest entries, cache policy, lazy-load exceptions, docs references, and safe path prefixes (`scripts/public-demo-media-config.mjs`)
* [x] T005 \[S0406] \[P] Add current public-demo media catalog records or explicit conditional blockers for speech, music, showcase, icons, and mirror media (`apps/web/src/data/mediaCatalog.ts`)
* [x] T006 \[S0406] Create public-demo media checker helpers for repository-relative paths, catalog or exception mapping, manifest validation, service-worker cache validation, and workspace-import exclusion with schema-validated input and explicit error mapping (`scripts/check-public-demo-media.mjs`)
* [x] T007 \[S0406] \[P] Define Vitest fixtures for cached media, lazy media, missing files, stale cache entries, manifest drift, unsafe paths, and workspace imports (`tests/publicDemoMedia.test.ts`)
* [x] T008 \[S0406] Add the root `media:demo:check` command and keep script naming consistent with existing media gates (`package.json`)

***

## Implementation (8 tasks)

Main feature implementation.

### Repository tooling

* [x] T009 \[S0406] Implement public-demo media check CLI orchestration, deterministic report ordering, stable issue codes, nonzero exit behavior, and explicit empty, error, and unsupported-tool states (`scripts/check-public-demo-media.mjs`)
* [x] T010 \[S0406] Validate public-demo file inventory, expected byte ranges, media durations where available, supported formats, and docs references with timeout and failure-path handling (`scripts/check-public-demo-media.mjs`)
* [x] T011 \[S0406] Validate catalog coverage or documented standalone exceptions for every declared public-demo media group without marking conditional or blocked records release-ready (`scripts/check-public-demo-media.mjs`)
* [x] T012 \[S0406] Enforce service-worker cache version, shell asset coverage, runtime CDN policy, offline navigation fallback, and lazy music exclusion with cache-list revalidation on changes (`public-demo/sw.js`)
* [x] T013 \[S0406] Audit and update public-demo relative media constants, speech click handling, music toggle/resume behavior, and visible fallback copy with duplicate-trigger prevention while playback is in flight (`public-demo/index.html`)
* [x] T014 \[S0406] Update public-demo browser validation to cover failed media requests, speech/music paths, service-worker readiness, offline reload, and desktop/mobile visual evidence (`tests/e2e/public-demo.e2e.ts`)

### Shared docs

* [x] T015 \[S0406] Document public-demo media parity command usage, cache-version remediation, lazy music policy, and standalone boundary rules (`scripts/README_scripts.md`)
* [x] T016 \[S0406] Update media and public-demo docs for current demo media records, conditional blockers, cache behavior, validation commands, and limitations (`docs/media-assets.md`, `public-demo/README_public-demo.md`, `public-demo/docs_public-demo/validation.md`)

***

## Testing (4 tasks)

Verification and quality assurance.

### Cross-cutting

* [x] T017 \[S0406] Add Vitest coverage for public-demo media config, path rejection, catalog mapping, manifest checks, cache drift, lazy media policy, and workspace-import guards (`tests/publicDemoMedia.test.ts`)
* [x] T018 \[S0406] Update app media catalog tests for current public-demo media records, blocked generated replacements, and deterministic helper output (`apps/web/tests/mediaCatalog.test.ts`)
* [x] T019 \[S0406] Run focused validation for `npm run media:demo:check`, battlefield, visual media, draft media, catalog, and public-demo Playwright gates (`.spec_system/specs/phase04-session06-public-demo-media-parity-and-offline-loading/implementation-notes.md`)
* [x] T020 \[S0406] Run final format, lint, ASCII/LF, git diff whitespace, and privacy/quarantine validation before handoff (`.spec_system/specs/phase04-session06-public-demo-media-parity-and-offline-loading/implementation-notes.md`)

***

## 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://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase04-session06-public-demo-media-parity-and-offline-loading/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.
