> 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/phase35-session09-documentation-and-media-policy-sync/spec.md).

# Session Specification

**Session ID**: `phase35-session09-documentation-and-media-policy-sync` **Phase**: 35 - AI Rogue Audit Hardening And Refactor **Status**: Not Started **Created**: 2026-06-27

***

## 1. Session Overview

This session aligns maintained AI Rogue documentation with the current runtime truth after Phase 34 default enablement and Phase 35 hardening sessions. It is next because the analyzer reports Phase 35 Sessions 01-08 complete, Session 09 unplanned, and Session 10 dependent on the documentation state being current.

The session is documentation-first. Source code is used as evidence for the current Web Audio, media-policy, production default, browser-local state, and public-demo no-bridge contracts, but no new runtime behavior is planned. The main implementation work is to remove or explicitly supersede stale live claims around no-audio, all-assets 200 KB caps, optional audio, ducking, opt-in visibility, and collector or bridge expectations.

The result should leave current docs clear for final release validation: maintained AI Rogue docs describe implemented Web Audio behavior, historical session records are labeled as historical where needed, and media limits match `docs/media-policy.md` and `scripts/check-asset-sizes.sh`.

***

## 2. Objectives

1. Verify AI Rogue docs against current runtime audio, media, enablement, local-state, and public-demo boundaries.
2. Update maintained docs so current behavior is direct Web Audio with local Ogg music and SFX, no sidechain or event-based ducking, and reviewed AI Rogue music caps.
3. Add concise supersession notes to historical optional-audio or no-audio docs that still read like current contracts.
4. Record scan and docs-check evidence so Session 10 can rely on the docs baseline during final release validation.

***

## 3. Prerequisites

### Required Sessions

* [x] `phase35-session01-rebaseline-audit-evidence` - Reconciled live versus historical AI Rogue audit findings and routed doc-drift work to Session 09.
* [x] `phase35-session02-fixed-blocker-regression-coverage` - Confirmed the original default-enable blocker contracts have direct regression evidence.
* [x] `phase35-session03-runtime-accessibility-controls` - Preserved current accessibility, compact control, Large HUD, and mobile route behavior.
* [x] `phase35-session04-renderer-robustness-and-scheduling` - Preserved renderer, asset-load, AudioContext, decode, and silent-fallback contracts.
* [x] `phase35-session05-persistence-schema-contracts` - Preserved browser-local wallet, ledger, save, preference, and reset contracts.
* [x] `phase35-session06-simulation-ownership-refactor` - Narrowed simulation ownership while preserving production behavior.
* [x] `phase35-session07-renderer-and-react-bridge-refactor` - Split renderer, audio adapter, runtime hooks, controls, and assistive summary ownership.
* [x] `phase35-session08-world-types-and-fixture-cleanup` - Completed world, type, fixture, and production-boundary cleanup before documentation sync.

### Required Tools Or Knowledge

* Current AI Rogue docs under `docs/extensions/ai-rogue/`.
* Current media policy in `docs/media-policy.md`.
* Current audio/runtime source in `src/extensions/ai-rogue/runtime/audio.ts`, `src/extensions/ai-rogue/runtime/renderer-audio-adapter.ts`, and `src/extensions/ai-rogue/views/settings-view.tsx`.
* Markdownlint, Prettier, ripgrep, and the project asset-size check.

### Environment Requirements

* Bun 1.3.14 project environment.
* Repository checkout with existing `.spec_system/` artifacts.
* No network, external dashboard, or credential access is required.

***

## 4. Scope

### In Scope (MVP)

* AI Rogue maintainers can trust current docs for audio behavior - update `README.md`, `implementation-baseline.md`, `visual-assets.md`, `game-feel.md`, and `enablement-decision.md` where they drift from current Web Audio, mute/volume preference, lazy decode, loop, one-shot, heartbeat, autoplay unlock, or silent fallback behavior.
* AI Rogue maintainers can trust media caps - keep `docs/media-policy.md` and AI Rogue docs aligned on 200 KB non-logo/non-music assets and 900 KB AI Rogue music tracks.
* AI Rogue maintainers can distinguish current contracts from historical evidence - add concise supersession notes to historical optional-audio or no-audio records such as `content-polish-mobile-notes.md` and `plan-2026-06-21.md` where stale text still reads as live guidance.
* AI Rogue release validation can rely on boundary docs - keep production default enablement, explicit `VITE_CLAUDE_OS_ENABLED_EXTENSIONS=none` opt-out, browser-local state, no collector, no bridge, and public-demo no-runtime statements consistent.

### Out Of Scope (Deferred)

* Implementing new audio ducking behavior - Reason: current runtime has no sidechain, compressor, transient music-gain reduction, or event-based ducking path.
* Adding or replacing media assets - Reason: this session syncs docs and policy, not runtime content.
* Rewriting historical session docs wholesale - Reason: historical evidence should remain intact with explicit current-contract supersession notes.
* Changing extension enablement behavior or runtime privacy boundaries - Reason: Phase 34 and Phase 35 implementation sessions already established those contracts.

***

## 5. Technical Approach

### Architecture

Use the current runtime and policy files as evidence, then update docs at the smallest scope that makes current versus historical behavior unambiguous. The source-of-truth paths are `runtime/audio.ts` for Web Audio behavior, `save-schema.ts` and `settings-view.tsx` for persisted audio preferences, `docs/media-policy.md` and `scripts/check-asset-sizes.sh` for media caps, and `runtime-data-and-enablement.md` for production default and no-collector status.

The implementation should not introduce new source modules, route changes, or tests. Validation is docs-oriented: targeted drift scans, markdown lint, Prettier check, asset-size policy verification, whitespace check, and ASCII/LF verification.

### Design Patterns

* Evidence-backed documentation: Use source and prior validation artifacts before changing current docs.
* Historical supersession notes: Preserve old evidence while explicitly naming the later behavior that supersedes it.
* Targeted docs edits: Prefer small, exact wording changes over broad reflow or speculative documentation.
* Boundary consistency: Keep production enablement, browser-local state, no collector, no hosted write, and no public-demo bridge language repeated consistently across docs.

***

## 6. Deliverables

### Files To Create

| File                                                                                               | Purpose                                                                                   | Est. Lines |
| -------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ---------- |
| `.spec_system/specs/phase35-session09-documentation-and-media-policy-sync/implementation-notes.md` | Record docs drift matrix, evidence scans, edits, and check results during implementation. | \~160      |

### Files To Modify

| File                                                      | Changes                                                                                                                                   | Est. Lines |
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| `docs/extensions/ai-rogue/README.md`                      | Verify and repair current behavior, document map, audio, media, production default, and no-remote/no-collector wording.                   | \~20       |
| `docs/extensions/ai-rogue/implementation-baseline.md`     | Verify and repair baseline audio, media caps, deferred systems, enablement, and browser-local boundaries.                                 | \~25       |
| `docs/extensions/ai-rogue/visual-assets.md`               | Verify and repair image-versus-music cap language and historical no-audio Session 09 note.                                                | \~20       |
| `docs/extensions/ai-rogue/game-feel.md`                   | Verify and repair Web Audio, lazy decode, loop, one-shot, heartbeat, preferences, unlock, and silent fallback contract wording.           | \~15       |
| `docs/extensions/ai-rogue/enablement-decision.md`         | Verify and repair historical Session 10 no-audio and all-assets cap supersession language.                                                | \~20       |
| `docs/extensions/ai-rogue/content-polish-mobile-notes.md` | Add concise historical supersession around no-audio and no-preference claims.                                                             | \~25       |
| `docs/extensions/ai-rogue/plan-2026-06-21.md`             | Add or tighten historical-plan note so optional-audio wording does not supersede current Web Audio behavior.                              | \~20       |
| `docs/extensions/ai-rogue/runtime-data-and-enablement.md` | Verify and repair production default, no collector, host-LiveData, browser-local, and public-demo no-bridge references if drift is found. | \~10       |
| `docs/media-policy.md`                                    | Verify and repair AI Rogue music cap and enforcement wording if drift is found.                                                           | \~15       |

***

## 7. Success Criteria

### Functional Requirements

* [ ] Current AI Rogue docs contain no live claim that AI Rogue lacks audio.
* [ ] Current AI Rogue docs contain no live claim that every runtime asset is capped at 200 KB.
* [ ] Current AI Rogue docs contain no live claim that sidechain or event-based ducking exists.
* [ ] Historical optional-audio or no-audio records include clear supersession notes instead of being silently treated as current contracts.
* [ ] Production default enablement, explicit `none` opt-out, browser-local state, no collector, and public-demo no-bridge statements agree across docs.

### Testing Requirements

* [ ] Targeted stale-claim scans run and allowed historical or negated matches are classified in `implementation-notes.md`.
* [ ] Targeted markdown lint and Prettier checks pass for touched docs.
* [ ] `bash scripts/check-asset-sizes.sh` passes.
* [ ] Whitespace, ASCII, and LF checks pass for changed docs and session files.

### Non-Functional Requirements

* [ ] Documentation changes are concise and avoid unrelated reflow.
* [ ] Historical records remain historically accurate while clearly superseded.
* [ ] No source, dependency, route, media, collector, bridge, hosted write, or runtime behavior changes are introduced.

### Quality Gates

* [ ] All files ASCII-encoded.
* [ ] Unix LF line endings.
* [ ] Code follows project conventions.
* [ ] Documentation describes implemented behavior before planned behavior.

***

## 8. Implementation Notes

### Working Assumptions

* Session 09 is executable now: The analyzer reports `current_phase` 35, `current_session` null, Sessions 01-08 completed, and Sessions 09-10 unfinished. Planning can proceed because Session 09 is the earliest dependency-ordered unfinished candidate.
* The session is docs-only unless verification exposes a docs-command or policy-script mismatch: The stub owns AR-D9-001, AR-D9-002, and doc drift, and source scans show current audio behavior already exists. Planning can proceed by using runtime source as evidence rather than changing runtime code.
* Historical docs may be edited only with supersession notes: The stub says historical optional-audio or no-audio docs should be superseded from current docs and historical rewrites are out of scope. Planning can proceed because concise notes preserve history while avoiding live-contract ambiguity.

### Conflict Resolutions

* Historical Session 09 content-polish notes say the slice intentionally shipped without audio and had no mute/autoplay/audio preference contract, while current source and Phase 35 docs show direct Web Audio with preferences, autoplay unlock, and silent fallback. The chosen interpretation is that the old no-audio text is historical evidence and must be explicitly superseded.
* Older plan language says audio was optional or absent until tradeoffs were settled, while current docs and source show Web Audio is implemented. The chosen interpretation is that the plan remains historical planning context, not the live contract.
* Media-policy wording has both a 200 KB non-logo asset cap and a 900 KB AI Rogue music cap. The chosen interpretation is that non-music runtime assets remain under 200 KB, while AI Rogue music tracks use the reviewed 900 KB cap.

### Key Considerations

* Keep `docs/media-policy.md` as the cap source and avoid duplicating enforcement logic inconsistently.
* Do not claim sidechain, compressor, transient music-gain reduction, or event-based ducking unless code and tests are added in a later session.
* Preserve public-demo static-only and no-bridge language for hosted surfaces.
* Keep current behavior separate from future capability expansion.

### Potential Challenges

* Regex scans will match allowed historical or negated statements: Mitigate by classifying each hit in `implementation-notes.md`, then editing only live ambiguous claims.
* Markdown tooling may report unrelated existing files if run repo-wide: Mitigate by running targeted docs checks for touched files first.
* Historical docs may be tempting to rewrite broadly: Mitigate by using compact supersession notes and leaving old evidence intact.

### Relevant Considerations

* \[P34] **AI Rogue is production default-enabled**: Docs must preserve the production default and explicit `none` opt-out language.
* \[P31-P34] **Pages and AI Rogue CI guards deferred**: Docs should keep manual Pages and AI Rogue gate expectations visible for Session 10.
* \[P31-P34] **Public-demo and AI Rogue gates stay bundled**: Docs should keep no-bridge, private-runtime, asset-size, budget, Pages, and playthrough checks grouped for release validation.
* \[P30/P32/P34] **Do not widen AI Rogue capabilities without review**: The docs sync must not imply collectors, WebGPU, workers, remote loading, hosted writes, or expanded content are now approved.

***

## 9. Testing Strategy

### Unit Tests

* No unit tests are expected because this session does not change application or script behavior.

### Integration Tests

* Run `bash scripts/check-asset-sizes.sh` to verify documented AI Rogue media caps match current enforcement.
* Run targeted markdown lint and Prettier checks for changed AI Rogue docs and the session artifact files.

### Runtime Verification

* Run source/documentation scans for stale no-audio, all-assets 200 KB, ducking, opt-in/default-disabled, collector, bridge, hosted-write, and remote-loading claims.
* Record any allowed historical or negated matches in `implementation-notes.md`.

### Edge Cases

* Historical docs can mention no-audio only when clearly marked as historical and superseded.
* `ducking` can appear only as an explicit non-implemented behavior unless later source and tests implement it.
* The 200 KB cap can describe non-logo/non-music runtime assets, not AI Rogue music tracks.
* Production disable language must describe `VITE_CLAUDE_OS_ENABLED_EXTENSIONS=none` as an explicit opt-out, not the default posture.

***

## 10. Dependencies

### Other Sessions

* Depends on: `phase35-session01-rebaseline-audit-evidence`, `phase35-session02-fixed-blocker-regression-coverage`, `phase35-session03-runtime-accessibility-controls`, `phase35-session04-renderer-robustness-and-scheduling`, `phase35-session05-persistence-schema-contracts`, `phase35-session06-simulation-ownership-refactor`, `phase35-session07-renderer-and-react-bridge-refactor`, `phase35-session08-world-types-and-fixture-cleanup`
* Depended by: `phase35-session10-final-release-gate`

***

## Next Steps

Run the `implement` workflow step to begin implementation.


---

# 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/phase35-session09-documentation-and-media-policy-sync/spec.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.
