> 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_37/session_04_g3_theme_decals.md).

# Session 04: G3 Theme Decals

**Session ID**: `phase37-session04-g3-theme-decals` **Status**: Complete **Completed**: 2026-06-29 **Estimated Tasks**: \~12-25 **Estimated Duration**: 2-4 hours

***

## Objective

Add sector theme identity through additive decals and a small number of tile variants while preserving world-generation rules.

***

## Scope

### In Scope (MVP)

* Select G3 decals and tile variants for Cold Cache, Corrupted Index, Firewall, Model Vault, and Kernel Core.
* Crop, clean, and pack only cells that remain readable and no-text-safe at tile scale.
* Wire theme-to-visual mappings in the least noisy runtime location.
* Add theme tests that confirm rules stay stable while visuals vary by sector.
* Validate each theme visually in the real runtime.

### Out of Scope

* Replacing the whole tileset.
* Changing generated topology, room rules, enemy rules, rewards, or difficulty.
* Using lock, stripe, or pictogram cells that fail no-text-safe review.

***

## Prerequisites

* [x] Sessions 01-03 completed or their atlas/frame contracts are stable.
* [x] G3 source and alpha derivative are available under the generated visual asset directory.
* [x] Existing theme and world-generator tests are passing before edits.

***

## Source Inputs

| Asset            | Path                                                                                                    |
| ---------------- | ------------------------------------------------------------------------------------------------------- |
| Source sheet     | `docs/ongoing-projects/generated/ai-rogue-visual-audio-assets/source/ai-rogue-sector-themes-source.png` |
| Alpha derivative | `docs/ongoing-projects/generated/ai-rogue-visual-audio-assets/alpha/ai-rogue-sector-themes-alpha.png`   |
| Crop manifest    | `docs/ongoing-projects/generated/ai-rogue-visual-audio-assets/crop-manifest.json`                       |

Review lock/stripe pictograms before using them in gameplay. G3 and G8 symbolic cells must be accepted only if they are safe enough for gameplay sprites or edited into more abstract marks.

***

## Detailed Work

Turn the five theme IDs into clearer visual identity without replacing the whole tileset:

* Cold Cache: coolant shine, frosted conduit, dim blue data floor.
* Corrupted Index: magenta corruption cracks, broken index debris.
* Firewall: orange hazard vents, warning-striped walls, ember conduit.
* Model Vault: violet archive slabs, locked cache motifs, heavier vault doors.
* Kernel Core: red core floor, hot machine ribs, boss-sector floor decals.
* Prefer additive decals and a small number of replacement tiles. Keep world rules unchanged.
* Decide whether theme visual mapping belongs directly in `world-generator.ts` or in a small `themeVisuals.ts` mapping based on implementation clarity.

***

## Likely Code Touchpoints

* `src/extensions/ai-rogue/runtime/themes.ts`
* `src/extensions/ai-rogue/runtime/world-generator.ts`
* `src/extensions/ai-rogue/runtime/renderer-layers.ts`
* A small `themeVisuals.ts` mapping if direct generator wiring becomes noisy.
* `src/extensions/ai-rogue/runtime/__tests__/themes.test.ts`

***

## Required Validation

* `scripts/extensions/ai-rogue/pack-visual-assets.py`
* `bun run typecheck`
* `bash scripts/check-asset-sizes.sh`
* Focused theme and world-generator tests proving rules stay stable.
* `bunx playwright test tests/e2e/ai-rogue-runtime.spec.ts`
* `bunx playwright test tests/e2e/ai-rogue-mobile.spec.ts`
* Runtime evidence that each theme has distinct visual identity.

***

## Deliverables

1. G3 crop manifest entries and refreshed atlas outputs.
2. Theme visual mapping in `world-generator.ts`, `themes.ts`, `renderer-layers.ts`, or a small `themeVisuals.ts` module if clearer.
3. Focused theme tests and visual asset documentation updates.
4. Runtime evidence that each theme has distinct visual identity.

***

## Success Criteria

* [x] Each theme has distinct visual identity without changing generated topology or gameplay rules.
* [x] Theme tests pass and no unrelated world-generation snapshots change.
* [x] Atlas size remains under policy after adding theme variants.
* [x] The product outcome is proven end to end: sector identity is visible in AI Rogue runtime play and remains understandable in normal, high-contrast, and reduced-motion contexts where applicable.


---

# 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_37/session_04_g3_theme_decals.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.
