> 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/phases/phase_08/legacy_decommission_media_release_gate.md).

# Legacy Decommission And Media Release Gate

**Phase**: 08 - Release Hardening and Legacy Decommission **Session**: 07 - Legacy Evidence Decommission and Media Release Gate **Status**: Implementation complete; validate workflow pending **Created**: 2026-05-31 **Last Updated**: 2026-05-31

***

## Purpose

This is the Session 07 approval and action record for legacy evidence decommission decisions and media release-gate revalidation. It is the successor to the Session 01 candidate-only decommission matrix and is the authority for any retain, archive, reduce, delete, blocked, or unavailable decision made during this session.

No cleanup action is approved unless this record names the exact candidate, stable replacement reference, owner, disposition, gate evidence, and rollback or recovery note.

## Evidence Boundaries

* Preserve conclusions, labels, counts, statuses, docs paths, hashes, booleans, and concise rationale only.
* Do not copy raw prompts, token values, OAuth values, probe output, command bodies, terminal output, sensitive local paths, copied historical code, generated provider payloads, or quarantined media excerpts into stable docs.
* Keep ignored `EXAMPLES/` evidence ignored unless a later approved archive policy changes that boundary.
* Keep quarantined media and generated drafts non-runtime unless source, rights, attribution, optimization, metadata, fallback, accessibility, privacy, and budget blockers all close.
* Treat absent or local-only ignored evidence as unavailable evidence, not as approval to invent content or delete unrelated paths.

## Disposition Vocabulary

| Disposition | Meaning                                                                                                                                            |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| Retain      | Keep the evidence because it remains the safest source, stable docs still cite it as traceability, or no approved archive/delete action is needed. |
| Archive     | Move or preserve evidence in an approved archive after stable docs keep the retained value.                                                        |
| Reduce      | Remove duplicate detail only after stable docs preserve unique requirements, risks, decisions, and provenance conclusions.                         |
| Delete      | Remove only after stable replacements and affected gates pass.                                                                                     |
| Blocked     | Do not change the candidate because replacement coverage, gate evidence, or cleanup authority is incomplete.                                       |
| Unavailable | Candidate is absent from tracked or local evidence; retain conservative wording and do not claim cleanup.                                          |

## Session 07 Action Matrix

Final disposition does not mean release closeout. Gate outcomes still need to be recorded below before validation.

| Candidate                                           | Affected paths                                                                                   | Availability and evidence source                                                                                   | Session 07 disposition                                     | Stable replacement references                                                                    | Owner        | Gate status                        | Rollback or recovery note                                                                      |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------ | ---------------------------------- | ---------------------------------------------------------------------------------------------- |
| Historical API route findings                       | `EXAMPLES/findings/api-routes.txt`                                                               | Ignored local evidence present; reviewed by path and current API docs                                              | Retain ignored evidence                                    | `docs/api/event-api-hook-contracts.md`, `docs/api/README_api.md`, `apps/server/README_server.md` | S0807, S0808 | Docs updated; validation passed    | Restore from ignored local evidence if future route-family gaps are found.                     |
| Historical WebSocket event findings                 | `EXAMPLES/findings/websocket-events.txt`                                                         | Ignored local evidence present; reviewed against protocol/API docs                                                 | Retain ignored evidence                                    | `docs/api/event-api-hook-contracts.md`, `packages/protocol/README_protocol.md`                   | S0807, S0808 | Docs updated; validation passed    | Restore from ignored local evidence if event-family wording drifts.                            |
| Historical Claude hook contract                     | `EXAMPLES/findings/claude-hook-contract.md`                                                      | Ignored local evidence present; reviewed against hook/API docs                                                     | Retain ignored evidence                                    | `apps/hooks/README_hooks.md`, `docs/api/event-api-hook-contracts.md`                             | S0807, S0808 | Docs updated; validation passed    | Restore from ignored local evidence if hook compatibility gaps are found.                      |
| Historical architecture finding                     | `EXAMPLES/findings/architecture.md`                                                              | Ignored local evidence present; reviewed against architecture, hosted, and privacy docs                            | Retain ignored evidence                                    | `docs/ARCHITECTURE.md`, `docs/hosted-services.md`, `docs/privacy-and-security.md`                | S0807, S0808 | Docs updated; validation passed    | Retain locally if hosted, erasure, media, or package-boundary conclusions need recheck.        |
| Historical build links                              | `EXAMPLES/findings/BUILD_LINKS.md`                                                               | Ignored local evidence present; reviewed as pointer evidence                                                       | Retain ignored evidence                                    | `docs/legacy-consolidation.md`, package README files, Git history                                | S0807, S0808 | Docs updated; validation passed    | Restore from ignored local evidence if a source-group pointer is missing.                      |
| Historical prompt findings                          | `EXAMPLES/findings/llm-prompts/`                                                                 | Ignored local evidence present; raw prompt bodies not copied                                                       | Retain ignored evidence; raw copying blocked               | `apps/server/README_server.md`, `docs/privacy-and-security.md`, Phase 01 archives                | S0807, S0808 | Docs updated; validation passed    | Retain privately if prompt-surface rationale is needed; do not track raw prompts.              |
| Copied first-pass artifacts                         | `EXAMPLES/1st-pass-artifacts/`                                                                   | Ignored local evidence present; reviewed by child-group paths, not code bodies                                     | Retain ignored evidence; copied-code tracking blocked      | Package READMEs, `docs/legacy-consolidation.md`, `docs/isolation-and-sandbox.md`, API docs       | S0807, S0808 | Docs updated; validation passed    | Restore locally if hook, template, manifest, Docker, or package lessons drift.                 |
| Historical extraction reports                       | `EXAMPLES/REPORT.md`, `EXAMPLES/REPORT.html`                                                     | Ignored local evidence present; report bodies not copied                                                           | Retain ignored evidence                                    | PRD, UX PRD, API docs, media docs, privacy/security docs, `docs/legacy-consolidation.md`         | S0807, S0808 | Docs updated; validation passed    | Recover from ignored evidence or an approved archive if unique migration rationale is missing. |
| Historical progress ledger                          | `docs/PROGRESS.md`                                                                               | Tracked evidence present; about 432 KB                                                                             | Retain tracked evidence                                    | PRD phase history, stable docs, archived session summaries, Git history                          | S0807, S0808 | Docs updated; validation passed    | Revert tracked change or restore from Git history if resume context is lost.                   |
| Ignored legacy media intake                         | `EXAMPLES/package-0.4.1/frontend/dist/assets/`, other ignored `EXAMPLES/` media and build output | Ignored local evidence present; 261 files under `EXAMPLES/`, about 234 MB total; 195 media-like files by extension | Block release promotion; retain ignored reference evidence | `docs/media-assets.md`, Phase 04 media gap matrix, ADR 0004, this record                         | S0807, S0808 | Media gates passed                 | Keep ignored and non-runtime; recover only for reference inventory work.                       |
| Generated media drafts and provider staging         | `assets/generated/phase04/*`, `tmp/media-generation/phase04-session03/`                          | Tracked redacted manifest present; ignored local run summaries present; raw output not tracked                     | Retain tracked manifest; block raw staging promotion       | `assets/generated/phase04/draft-generation-manifest.json`, `docs/media-assets.md`                | S0807, S0808 | Media and draft gates passed       | Do not track raw provider output; regenerate only through approved dry-run/provider workflow.  |
| Historical service-discovery and sensitive evidence | Historical hosted, token, OAuth, probe, prompt, path, and service-discovery evidence             | Mixed ignored local and stable-doc posture evidence; raw values not copied                                         | Block raw evidence; retain posture conclusions only        | `docs/hosted-services.md`, `docs/privacy-and-security.md`, `docs/environments.md`                | S0807, S0808 | Secret scan and docs review passed | Keep raw evidence out of tracked docs; preserve conclusions only.                              |
| Archived spec-system sessions and phase artifacts   | `.spec_system/archive/`, `.spec_system/archive/phases/phase_08/`                                 | Tracked archive evidence present; 375 archive files at review time                                                 | Retain                                                     | `.spec_system/archive/`, current PRD phase history                                               | S0808        | Not destructive                    | No deletion in Session 07; recovery is Git history plus archive retention.                     |

## Stable Replacement Map

| Retained value                                                                                                                 | Stable owner                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| Current REST, WebSocket, `/event`, hook, unsupported route, and historical route-family conclusions                            | `docs/api/event-api-hook-contracts.md`, `docs/api/README_api.md`, `apps/server/README_server.md`, `apps/hooks/README_hooks.md` |
| Package boundaries, local-first workflow, CLI lifecycle, hooks, adapters, Worker, public demo, and protocol ownership          | `README.md`, package README files, `docs/ARCHITECTURE.md`                                                                      |
| Media provenance, approved battlefield runtime records, conditional public-demo media, generated drafts, and quarantine policy | `docs/media-assets.md`, `assets/generated/phase04/draft-generation-manifest.json`, ADR 0004                                    |
| Public-demo service-worker cache behavior, offline shell, browser validation, and media cache expectations                     | `public-demo/docs_public-demo/validation.md`, `public-demo/sw.js`                                                              |
| Sensitive-output, privacy, hosted-service, and environment no-claim wording                                                    | `docs/privacy-and-security.md`, `docs/hosted-services.md`, `docs/environments.md`                                              |
| Decommission approval, cleanup guardrails, release no-overclaim wording, and Session 08 handoff                                | `docs/release.md`, this record, Phase 08 routing and risk matrices                                                             |
| Milestone chronology and previous phase context                                                                                | PRD phase history, archived session specs and validations, Git history, `docs/legacy-consolidation.md`                         |

## Gate Command Record

The commands below are required after docs and cleanup decisions are applied. Outcomes must be recorded before this session is ready for validation.

| Command                          | Purpose                                                                                               | Outcome                           | Notes                                                                                                                                                                                                                                                                                 |
| -------------------------------- | ----------------------------------------------------------------------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `npm run media:gates:check`      | Aggregate media, docs, browser evidence, cache, draft, and sensitive-output gate                      | Passed                            | Checked 14 catalog records, 2 approved records, 12 blocked records, 11 draft records, 6 docs, 3 browser evidence files, and 2 dependent gates.                                                                                                                                        |
| `npm run media:check`            | Media tooling availability and host verification                                                      | Passed                            | 23 media tooling checks passed.                                                                                                                                                                                                                                                       |
| `npm run media:visual:check`     | Visual promotion config and cache policy                                                              | Passed with expected warnings     | Checked 5 groups, 32 files, 12 mirrors, 15 service-worker cache entries, 7 docs, and 10 non-release records; 33 warnings preserve metadata-pending and non-release blockers.                                                                                                          |
| `npm run media:demo:check`       | Public-demo media inventory and service-worker cache policy                                           | Passed                            | Checked 6 groups, 37 files, 6 lazy files, 31 service-worker cache entries, 3 manifest icons, 3 runtime files, and 5 docs.                                                                                                                                                             |
| `npm run media:drafts:check`     | Generated draft manifest and non-runtime blockers                                                     | Passed                            | `assets/generated/phase04/draft-generation-manifest.json` passed media draft manifest checks.                                                                                                                                                                                         |
| `npm run battlefield:check`      | Battlefield asset parity and precache coverage                                                        | Passed                            | Checked 6 assets; app and public-demo runtime bytes were 668358 each; cache version `factionos-demo-v9`; 34 shell assets.                                                                                                                                                             |
| `npm run security:secrets`       | Tracked secret and sensitive-token scan                                                               | Passed                            | Secret scan passed over 991 tracked text files.                                                                                                                                                                                                                                       |
| Focused no-overclaim `rg` review | Release, media, certification, hosted identity, production-hosted, and trusted-erasure wording review | Passed                            | Matches were no-claim, non-release, or limitation wording; no affirmative overclaim found in changed docs/spec artifacts.                                                                                                                                                             |
| `git diff --check`               | Whitespace validation                                                                                 | Passed                            | No whitespace errors reported.                                                                                                                                                                                                                                                        |
| ASCII/LF scan                    | Encoding and line-ending validation                                                                   | Passed                            | Changed files passed ASCII-only and LF checks.                                                                                                                                                                                                                                        |
| Focused Biome or tests           | Changed code, scripts, media config, public-demo cache, or package docs                               | Passed / not applicable for tests | Direct Markdown-only Biome check processed 0 files because docs are ignored by Biome; focused `npx biome check apps/web public-demo` passed over 203 files. No scripts, tests, media config, public-demo cache logic, or runtime code changed, so no focused Vitest run was required. |

## Cleanup Action Log

| Action                                                                        | Candidate paths                                                                                                                                                                                    | Result                                                                                                                                            | Gate dependency                                               |
| ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| Documentation preservation                                                    | Stable docs and Phase 08 PRD artifacts                                                                                                                                                             | Applied in Session 07 docs updates; validation passed                                                                                             | Docs review, ASCII/LF, secret scan                            |
| Historical findings and reports                                               | `EXAMPLES/findings/`, `EXAMPLES/REPORT.md`, `EXAMPLES/REPORT.html`                                                                                                                                 | Retained as ignored local evidence; no delete, reduce, or archive action applied                                                                  | Stable docs updated; validation passed                        |
| Copied bundles, media intake, drafts, sensitive evidence, and progress ledger | `EXAMPLES/1st-pass-artifacts/`, ignored `EXAMPLES/` media/build output, `assets/generated/phase04/*`, `tmp/media-generation/phase04-session03/`, sensitive historical evidence, `docs/PROGRESS.md` | Retained or blocked as recorded; no delete, reduce, archive movement, raw staging tracking, media promotion, or progress-ledger reduction applied | Media, secret, docs, ASCII/LF, and diff checks passed         |
| Ignored evidence deletion/reduction                                           | `EXAMPLES/` child paths                                                                                                                                                                            | No destructive action approved; ignored evidence retained                                                                                         | Stable replacement coverage plus media/sensitive-output gates |
| Tracked progress-ledger reduction                                             | `docs/PROGRESS.md`                                                                                                                                                                                 | No reduction or deletion approved; tracked evidence retained                                                                                      | Stable milestone coverage plus Session 08 handoff             |
| Public-demo cache change                                                      | `public-demo/sw.js`                                                                                                                                                                                | No cache content change planned; cache version remains `factionos-demo-v9`                                                                        | `media:demo:check`, `battlefield:check`                       |

## Residual Risk Handoff

* Media release readiness remains limited to approved battlefield runtime records until all conditional, generated, public-demo, brand, portrait, showcase, and quarantined-media blockers close.
* Legacy evidence cleanup remains fail-closed. A retained or blocked decision is preferable to deleting evidence without stable replacement coverage.
* Sensitive-output evidence must remain sanitized and must not include raw historical values or raw ignored content.
* Session 08 still owns final release-candidate validation, PRD/security/docs synchronization, and release readiness or exact blocker wording.

## Final Session 07 Summary

| Area                       | Result                                                                                                                                                                                                                                                                          |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Command outcomes           | Media gates, secret scan, no-overclaim review, whitespace, ASCII/LF, and focused Biome checks are recorded above.                                                                                                                                                               |
| Disposition summary        | Historical findings, copied bundles, reports, `docs/PROGRESS.md`, generated draft manifest evidence, and archive records are retained. Ignored media intake, raw provider staging, raw sensitive historical evidence, copied code tracking, and media promotion remain blocked. |
| Cleanup actions            | No files were deleted, reduced, archived, moved, promoted, cached, or copied from ignored evidence. Public-demo precache content was unchanged.                                                                                                                                 |
| Retained unavailable paths | No required candidate group was marked unavailable. Ignored local evidence remains local and ignored; raw provider outputs are not tracked or required for Session 07.                                                                                                          |
| Rollback notes             | Revert tracked doc/spec changes through Git if needed. Ignored evidence remains in place locally for reference. `docs/PROGRESS.md` remains tracked, so no ledger recovery is needed.                                                                                            |
| Residual blockers          | Conditional media blockers, raw historical evidence restrictions, and final release-candidate docs/security/PRD synchronization remain for Session 08.                                                                                                                          |

## Session 08 Handoff

Session 08 should treat this record as evidence for media and legacy decommission posture only. It is not proof of formal certification, hosted identity, hosted storage, analytics capture, production-hosted app readiness, or full trusted unified erasure. Session 08 still owns full release-candidate validation, PRD/UX/security/docs synchronization, and final release readiness or exact blocker wording.


---

# 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/phases/phase_08/legacy_decommission_media_release_gate.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.
