> 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/docs/extensions/ai-rogue/runtime-data-and-enablement.md).

# AI Rogue Runtime Data And Enablement

**Status**: Current **Checked**: 2026-06-27

AI Rogue is a client-local extension. It is registered in reviewed source code and production-enabled by default in the browser registry. It does not have a script-side collector and is not expected to write an `extensions.items["ai-rogue"]` entry into LiveData. Set `VITE_CLAUDE_OS_ENABLED_EXTENSIONS=none` only when a build must explicitly hide all extension entries.

## Phase 34 Closeout Anchor

`phase34-session08-default-enablement-evidence-closeout` reran the AI Rogue closeout gate matrix on 2026-06-26 and recorded the evidence needed for default enablement. The current source applies that product decision: AI Rogue is enabled when `VITE_CLAUDE_OS_ENABLED_EXTENSIONS` is unset, blank, or set to another non-`none` valid list such as `trend-finder`, and `none` is the explicit disable path.

The closeout kept the runtime-data boundary unchanged:

* AI Rogue still uses `runtimeDataMode: "host-live-data"`.
* No AI Rogue collector item is required.
* Public-demo AI Rogue state remains browser-local.
* Targeted scans found no AI Rogue `/__*` bridge call, hosted write, collector, analytics, Function, remote game-content loading, private path, credential, raw prompt, provider body, or raw telemetry path.
* Pages route smoke still rejects `/__*` route requests.

## Phase 35 Final Gate Anchor

`phase35-session10-final-release-gate` reran the final AI Rogue release gate matrix on 2026-06-27 after Phase 35 hardening, refactors, documentation sync, and media-policy updates. The current production posture remains Production Go for the current scope.

The final gate preserved the runtime-data boundary:

* AI Rogue remains production default-enabled in the browser registry.
* `VITE_CLAUDE_OS_ENABLED_EXTENSIONS=none` remains the explicit disable path.
* AI Rogue still uses `runtimeDataMode: "host-live-data"`.
* No AI Rogue collector item is required.
* Browser-local AI Rogue localStorage and IndexedDB state remain the only runtime persistence path for gameplay, wallet, ledger, saves, preferences, and reset state.
* Public-demo AI Rogue state remains browser-local and static-demo safe.
* Targeted source and built-chunk scans found no promoted AI Rogue `/__*` bridge call, hosted write, collector, analytics, Function, remote game-content loading, private path, credential, raw prompt, provider body, raw telemetry, WebGPU-only path, or worker protocol.
* Pages route smoke passed with 48 `pages-demo-chromium` tests and no `/__*` request failures or mobile document-overflow failures.

## Runtime Data Mode

AI Rogue uses:

```ts
runtimeDataMode: "host-live-data";
```

This means the enabled Play route receives the host LiveData payload directly and derives game economy, progression, and readiness from browser-safe host fields. A missing `liveData.extensions.items["ai-rogue"]` item is intentional and must not be treated as a disabled state.

Collector-backed extensions use the other mode:

```ts
runtimeDataMode: "extension-item";
```

That mode expects data under `liveData.extensions.items[extensionId]`. Trend Finder remains collector-backed and reports unknown runtime status until its collector item exists.

## Input Mode Boundary

AI Rogue preferences are browser-local and use raw input-mode values: `auto`, `keyboard`, and `compact`. Raw Auto is the default. Mounted React views resolve Auto from browser capabilities before the runtime sees it:

| Raw Preference | Capability Evidence             | Runtime Mode |
| -------------- | ------------------------------- | ------------ |
| `auto`         | coarse pointer and no hover     | `compact`    |
| `auto`         | fine pointer, hover, or unknown | `keyboard`   |
| `keyboard`     | any                             | `keyboard`   |
| `compact`      | any                             | `compact`    |

The runtime, renderer, and render-model contracts remain concrete-only: `keyboard | compact`. Raw `auto` must stay in persistence, view copy, and the mounted resolver path, not in PixiJS runtime payloads.

## Status Derivation

AI Rogue status should be derived from registry/env enablement plus `runtimeDataMode: "host-live-data"`, not from collector-item presence.

Expected states:

| State                                        | Expected Result                                                   |
| -------------------------------------------- | ----------------------------------------------------------------- |
| Env switch absent, blank, or ignored         | AI Rogue is enabled from the production default.                  |
| Env switch lists another valid non-`none` ID | AI Rogue remains enabled from the production default.             |
| Env switch lists `ai-rogue` or `all`         | AI Rogue is enabled and may read host LiveData.                   |
| Env switch is `none`                         | AI Rogue is explicitly hidden with all extension entries.         |
| Enabled with no AI Rogue collector item      | AI Rogue remains ready because no collector item is required.     |
| Collector-backed extension has no item       | The extension may report unknown until its collector data exists. |

The Settings extension table follows the same distinction: enabled host-LiveData extensions can report ready without a collector item, while collector-backed extensions still depend on their extension item.

## Local Enablement Steps

1. Start the app with no `VITE_CLAUDE_OS_ENABLED_EXTENSIONS` value, leave it blank, or set a non-`none` extension list such as `trend-finder`.
2. Visit `/extensions/ai-rogue/play`.
3. To force an explicit disable, set `VITE_CLAUDE_OS_ENABLED_EXTENSIONS=none` in `.env.local` and restart the Vite dev server.

If the sidebar shows AI Rogue but the view says disabled, check these facts in order:

1. The browser process is not running with `VITE_CLAUDE_OS_ENABLED_EXTENSIONS=none`.
2. The extension registry has the production default `ai-rogue` entry enabled.
3. AI Rogue still declares `runtimeDataMode: "host-live-data"`.
4. No code path is requiring `liveData.extensions.items["ai-rogue"]`.

## Verification Anchors

* `tests/e2e/ai-rogue-enablement.spec.ts` covers an enabled AI Rogue Play route with an empty `extensions.items` object.
* `tests/e2e/ai-rogue-mobile.spec.ts` covers fresh mobile Auto Start plus movement and explicit mobile Keyboard/Compact overrides.
* `tests/e2e/ai-rogue-runtime.spec.ts` covers fresh desktop Auto keyboard-first behavior and explicit Compact desktop overrides.
* `tests/e2e/pages-demo-mobile.spec.ts` covers public-demo AI Rogue gameplay and no local bridge requests.
* The expected browser-level result is a mounted shell/runtime surface without disabled copy.
* `src/lib/__tests__/settings-extensions.test.tsx` covers the Settings status path for AI Rogue host-LiveData status and collector-backed Trend Finder status.
* `src/extensions/README_extensions.md`, `docs/extensions/README_docs-extensions.md`, and `docs/data-contract.md` describe the two runtime-data modes for the wider extension platform.


---

# 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/docs/extensions/ai-rogue/runtime-data-and-enablement.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.
