> 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/phase39-session04-existing-media-floor-four/tasks.md).

# Task Checklist

**Session ID**: `phase39-session04-existing-media-floor-four` **Total Tasks**: 16 **Estimated Duration**: 3-4 hours **Created**: 2026-06-30

***

Legend: `[x]` completed; `[ ]` pending; `[P]` parallelizable; `[SNNMM]` session ref; `TNNN` task ID.

***

## Setup (2 tasks)

* [x] T001 \[S3904] Verify Session 01-03 artifacts, active registry/save parity gates, and the Session 04 reused-media stub before editing source (`.spec_system/PRD/phase_39/session_04_existing_media_floor_four.md`)
* [x] T002 \[S3904] Audit current non-authored depth-4 fallback values and final-level validation constraints so the authored spec reuses existing IDs with schema-validated input and explicit error mapping (`src/extensions/ai-rogue/runtime/content/levels.ts`, `src/extensions/ai-rogue/runtime/content/validate.ts`)

***

## Foundation (4 tasks)

* [x] T003 \[S3904] Append the depth-4 `firewall-gauntlet` `AiRogueLevelSpec` and move final-authored metadata from depth 3 to depth 4 while preserving existing IDs and exhaustive enum coverage (`src/extensions/ai-rogue/runtime/content/levels.ts`)
* [x] T004 \[S3904] Update registry tests for depths `[1, 2, 3, 4]`, the depth-4 reused-media profile, depth-3 non-final metadata, depth-4 finale metadata, and depth-5 lookup rejection (`src/extensions/ai-rogue/runtime/content/__tests__/levels.test.ts`)
* [x] T005 \[S3904] Update current playable content baseline expectations for depth 4 helper routing, generation profile, reward profile, objective, lesson, and max-depth value (`src/extensions/ai-rogue/runtime/__tests__/content-baseline.test.ts`)
* [x] T006 \[S3904] Update depth resolver tests so authored depth 4 uses the registry and legacy fallback assertions shift to the first non-authored depth (`src/extensions/ai-rogue/runtime/__tests__/depth-resolver.test.ts`)

***

## Implementation (6 tasks)

* [x] T007 \[S3904] Extend generated-world route-safety coverage to depth 4, including reachable exit, no spawn overlap, adjacent `kernel-sentinel` guard, `hazard-cache` prefab, `patch-mirror` terminal, and vault passability behavior (`src/extensions/ai-rogue/runtime/__tests__/world.test.ts`)
* [x] T008 \[S3904] Extend golden determinism coverage to depth 4 world summaries and first-turn run summaries with deterministic ordering and product-safe event copy (`src/extensions/ai-rogue/runtime/__tests__/golden-determinism.test.ts`)
* [x] T009 \[S3904] Update run-loop tests so `AI_ROGUE_MAX_DEPTH` is 4, depth 3 descends to depth 4, and depth 4 is the final winning floor with duplicate-trigger-safe command sequencing (`src/extensions/ai-rogue/runtime/__tests__/roguelike-loop.test.ts`)
* [x] T010 \[S3904] \[P] Add objective-lock coverage for the depth-4 floor objective and final-floor unlock path with state reset or revalidation on re-entry (`src/extensions/ai-rogue/runtime/__tests__/objective-lock.test.ts`)
* [x] T011 \[S3904] \[P] Add durable save parse and hydration coverage for a depth-4 run without a save schema version bump or new persisted ID arrays (`src/extensions/ai-rogue/__tests__/save-schema.test.ts`)
* [x] T012 \[S3904] Keep final presentation tests explicit about crafted final-depth fixtures after authored max depth moves to 4, without adding renderer or audio branches (`src/extensions/ai-rogue/runtime/__tests__/biome-final.test.ts`)

***

## Testing (4 tasks)

* [x] T013 \[S3904] \[P] Run focused content and resolver suites (`bunx vitest run src/extensions/ai-rogue/runtime/content/__tests__/levels.test.ts src/extensions/ai-rogue/runtime/__tests__/content-baseline.test.ts src/extensions/ai-rogue/runtime/__tests__/depth-resolver.test.ts`)
* [x] T014 \[S3904] \[P] Run focused runtime, objective, golden, and save suites (`bunx vitest run src/extensions/ai-rogue/runtime/__tests__/world.test.ts src/extensions/ai-rogue/runtime/__tests__/golden-determinism.test.ts src/extensions/ai-rogue/runtime/__tests__/roguelike-loop.test.ts src/extensions/ai-rogue/runtime/__tests__/objective-lock.test.ts src/extensions/ai-rogue/runtime/__tests__/biome-final.test.ts src/extensions/ai-rogue/__tests__/save-schema.test.ts`)
* [x] T015 \[S3904] Run typecheck and save-schema parity to prove no type, parser, or persisted ID drift (`bun run typecheck`, `bunx vitest run src/extensions/ai-rogue/__tests__/save-schema-parity.test.ts`)
* [x] T016 \[S3904] Validate ASCII and LF requirements for session artifacts and touched AI Rogue files (`.spec_system/specs/phase39-session04-existing-media-floor-four/tasks.md`)

***

## Completion Checklist

* [x] All tasks marked `[x]`
* [x] All tests and checks passing
* [x] All files ASCII-encoded with LF line endings
* [x] implementation-notes.md updated
* [x] Ready for `creview` to review and repair the implementation

***

## Next Steps

Run the `creview` workflow step.


---

# 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/phase39-session04-existing-media-floor-four/tasks.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.
