> 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/phases/phase_36/session_05_sector_theme_audio_pack.md).

# Session 05: Sector Theme Audio Pack

**Session ID**: `phase36-session05-sector-theme-audio-pack` **Status**: Complete **Completed**: 2026-06-28 **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Generate, optimize, document, and wire the selected sector theme ambience or music assets.

***

## Scope

### In Scope (MVP)

* Create five theme-specific assets for coolant, corrupted index, firewall, vault, and kernel core identity.
* Optimize committed runtime assets and update music or SFX provenance as appropriate.
* Wire assets into the Session 04 routing contract.
* Manually review each sector identity in browser.

### Out of Scope

* Enemy-family SFX work.
* Adaptive stingers or engine-bus expansion outside the Session 04 contract.
* Weakening asset-size policy to accommodate oversized loops.

***

## Prerequisites

* [x] Session 04 theme audio routing contract is complete.
* [x] Selected asset type, location, bus behavior, and size policy are known.

***

## Deliverables

1. Five committed theme audio assets in the selected runtime location.
2. Updated provenance and media-policy documentation.
3. Runtime wiring for each theme ID.

***

## Success Criteria

* [ ] Each sector theme has an audible identity in browser review.
* [ ] Theme assets respect mute, music or ambience volume, autoplay unlock, and silent fallback.
* [ ] `bash scripts/check-asset-sizes.sh` passes.
* [ ] The product outcome is proven end to end: each actual sector theme is audibly distinct in AI Rogue, asset-load failures recover safely, and provenance plus size checks prove the committed media is shippable.

## Folded Source Detail Routed To This Session

### Source Findings Owned

* A4 says themes already exist in simulation and text but music mostly follows depth rather than theme.
* Batch 4 is the Sector Theme Ambience Or Music Pack.

### Theme Asset Targets

* Coolant hum.
* Corrupted index glitch bed.
* Firewall alarm bed.
* Vault sub-bass.
* Kernel core drive.

### Batch 4 Goal And Value

* Make each sector theme audible.
* Use five subtle ambience beds, or five theme-specific music loops if the media budget allows it.
* Preserve theme-to-audio routing keyed by `snapshot.theme`.
* Keep provenance and size-policy notes for every committed file.
* Audio should make sectors feel like different spaces without changing gameplay rules.

### Media Guardrails

* Generate masters in a scratch location.
* Commit only optimized runtime assets and provenance.
* Prefer shorter, subtler ambience beds over full loops if asset budget or fatigue is a concern.
* If full music loops exceed the appropriate budget, switch to shorter ambience beds instead of weakening asset policy.
* Keep perceived loudness consistent across cue families and music/ambience layers.
* Do not remote-stream game content.

## Implementation Evidence

Session 05 selected the Session 04 ambience-bed contract: five low-gain local Ogg Opus loops under `src/assets/ai-rogue/audio/music/`, sharing the existing master mute and music volume behavior. `docs/media-policy.md` already assigns theme ambience to the AI Rogue music workflow and 900 KB music-track cap.

Generated scratch masters stay in gitignored `tmp/ai-rogue-theme-ambience/`. The repeatable local generator is `scripts/generate-ai-rogue-theme-ambience.ts`; it uses `ffmpeg`/`ffprobe` and does not require credentials or network APIs.

Delivered final files:

| Theme           | Final File                           | Bytes  | Duration | Format                     |
| --------------- | ------------------------------------ | ------ | -------- | -------------------------- |
| Cold Cache      | `theme_cold_cache_ambience.ogg`      | 140196 | 16.0065s | Ogg Opus, stereo, 48000 Hz |
| Corrupted Index | `theme_corrupted_index_ambience.ogg` | 159650 | 16.0065s | Ogg Opus, stereo, 48000 Hz |
| Kernel Core     | `theme_kernel_core_ambience.ogg`     | 144865 | 16.0065s | Ogg Opus, stereo, 48000 Hz |
| Firewall        | `theme_firewall_ambience.ogg`        | 150857 | 16.0065s | Ogg Opus, stereo, 48000 Hz |
| Model Vault     | `theme_model_vault_ambience.ogg`     | 141674 | 16.0065s | Ogg Opus, stereo, 48000 Hz |

`src/assets/ai-rogue/audio/music/provenance.json` records each source prompt, raw scratch path, final file, render byte count, duration, codec, channels, and sample rate. Browser proof was updated to fetch and source-start all five real committed theme ambience files without injected URL overrides; final validation commands remain tracked in the session implementation notes.


---

# 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/phases/phase_36/session_05_sector_theme_audio_pack.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.
