> 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-session05-enemy-metadata-and-derived-asset-checks/tasks.md).

# Task Checklist

**Session ID**: `phase39-session05-enemy-metadata-and-derived-asset-checks` **Total Tasks**: 18 **Estimated Duration**: 3-4 hours **Created**: 2026-06-30

***

## Progress Summary

| Metric          | Value            |
| --------------- | ---------------- |
| Tasks Completed | 18 / 18          |
| Last Updated    | 2026-06-30 22:22 |

***

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

***

## Setup (2 tasks)

* [x] T001 \[S3905] Verify Phase 39 Sessions 01-04 artifacts, the Session 05 stub, and current AI Rogue enemy/audio/asset validation boundaries before editing source (`.spec_system/PRD/phase_39/session_05_enemy_metadata_and_derived_asset_checks.md`)
* [x] T002 \[S3905] Audit current enemy template spreading, audio-family switch behavior, manual required frame lists, audio basename maps, and provenance files so metadata does not leak into saved runtime state (`src/extensions/ai-rogue/runtime/entities.ts`, `src/extensions/ai-rogue/runtime/audio.ts`, `src/extensions/ai-rogue/runtime/assets.ts`)

***

## Foundation (5 tasks)

* [x] T003 \[S3905] Define `AiRogueEnemyAudioFamily`, standard enemy frame-set, boss frame-set, and enemy template metadata types with exhaustive enum handling (`src/extensions/ai-rogue/runtime/types-entities.ts`)
* [x] T004 \[S3905] Update enemy template typing and `createAiRogueEnemy()` projection so source metadata stays out of `AiRogueEnemyState` and saved runs (`src/extensions/ai-rogue/runtime/entities.ts`)
* [x] T005 \[S3905] Populate `audioFamily` and standard frame-set metadata for every enemy template with deterministic frame arrays and explicit handling for missing alternate idle frames (`src/extensions/ai-rogue/runtime/entities.ts`)
* [x] T006 \[S3905] Add Kernel Sentinel boss frame metadata for idle, charge, telegraph, attack, shielded, hit, and shutdown without introducing the Session 06 boss behavior contract (`src/extensions/ai-rogue/runtime/entities.ts`)
* [x] T007 \[S3905] Add metadata lookup helpers and template completeness tests with types matching declared contracts and exhaustive enemy-kind coverage (`src/extensions/ai-rogue/runtime/entities.ts`, `src/extensions/ai-rogue/runtime/__tests__/ecology.test.ts`)

***

## Implementation (7 tasks)

* [x] T008 \[S3905] Replace the `audioFamilyForEnemyKind()` switch with enemy-template metadata lookup and a generic fallback for undefined or unknown metadata (`src/extensions/ai-rogue/runtime/audio.ts`)
* [x] T009 \[S3905] Extend audio tests for each enemy audio family, actor-kind-only sentry and boss fallbacks, unknown/generic fallback behavior, and unchanged cue selection (`src/extensions/ai-rogue/runtime/__tests__/audio.test.ts`)
* [x] T010 \[S3905] Add derived gameplay frame requirement helpers from themes, enemies, boss frames, protocols, objectives, statuses, pickups, and level specs with schema-validated input and explicit error mapping (`src/extensions/ai-rogue/runtime/content/validate.ts`)
* [x] T011 \[S3905] Split shared static gameplay frame requirements from derived content gameplay frame requirements while preserving required atlas validation (`src/extensions/ai-rogue/runtime/assets.ts`)
* [x] T012 \[S3905] \[P] Add asset validation tests for derived gameplay frames, deterministic missing-frame messages, and the static/manual frame boundary (`src/extensions/ai-rogue/runtime/__tests__/assets.test.ts`)
* [x] T013 \[S3905] \[P] Add audio asset validation tests for SFX, music, ambience, imported Ogg URL coverage, and provenance JSON coverage (`src/extensions/ai-rogue/runtime/__tests__/audio.test.ts`, `src/assets/ai-rogue/audio/sfx/provenance.json`, `src/assets/ai-rogue/audio/music/provenance.json`)
* [x] T014 \[S3905] \[P] Align content registry tests with derived frame and audio validation, including malformed metadata issue codes and safe error text (`src/extensions/ai-rogue/runtime/content/__tests__/levels.test.ts`)

***

## Testing (4 tasks)

* [x] T015 \[S3905] \[P] Run focused metadata, audio, asset, and content validation suites (`bunx vitest run src/extensions/ai-rogue/runtime/__tests__/ecology.test.ts src/extensions/ai-rogue/runtime/__tests__/audio.test.ts src/extensions/ai-rogue/runtime/__tests__/assets.test.ts src/extensions/ai-rogue/runtime/content/__tests__/levels.test.ts`)
* [x] T016 \[S3905] \[P] Run focused behavior-preservation suites for combat, boss presentation, render model, and renderer audio adapter (`bunx vitest run src/extensions/ai-rogue/runtime/__tests__/combat.test.ts src/extensions/ai-rogue/runtime/__tests__/boss-presentation.test.ts src/extensions/ai-rogue/runtime/__tests__/render-model.test.ts src/extensions/ai-rogue/runtime/__tests__/renderer-audio-adapter.test.ts`)
* [x] T017 \[S3905] Run typecheck and asset-size verification when provenance or asset maps changed (`bun run typecheck`, `bash scripts/check-asset-sizes.sh`)
* [x] T018 \[S3905] Validate ASCII and LF requirements for session artifacts and touched AI Rogue files (`.spec_system/specs/phase39-session05-enemy-metadata-and-derived-asset-checks/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 continue the implement -> creview -> validate sequence

***

## 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-session05-enemy-metadata-and-derived-asset-checks/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.
