> 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-session06-boss-and-finale-contracts/tasks.md).

# Task Checklist

**Session ID**: `phase39-session06-boss-and-finale-contracts` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-06-30

***

## Progress Summary

| Metric          | Value            |
| --------------- | ---------------- |
| Tasks Completed | 20 / 20          |
| Last Updated    | 2026-06-30 23:36 |

***

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

***

## Setup (3 tasks)

* [x] T001 \[S3906] Verify Session 02, Session 03, and Session 05 prerequisites and record any implementation-relevant notes (`.spec_system/PRD/phase_39/session_06_boss_and_finale_contracts.md`)
* [x] T002 \[S3906] Inventory current Kernel Sentinel and final-defense literal callsites before editing (`src/extensions/ai-rogue/runtime/boss-presentation.ts`)
* [x] T003 \[S3906] Confirm existing boss frame metadata and finale level metadata are the source facts for the migration (`src/extensions/ai-rogue/runtime/entities.ts`)

***

## Foundation (5 tasks)

* [x] T004 \[S3906] Create typed boss and finale contract helpers with `AiRogueBossSpec`, `bossSpecForEnemyKind()`, and `isBossEnemyKind()` with types matching declared contract and exhaustive enum handling (`src/extensions/ai-rogue/runtime/boss-contracts.ts`)
* [x] T005 \[S3906] Implement boss-spec-based frame selection while preserving Kernel Sentinel frame priority and unknown-kind fallback behavior (`src/extensions/ai-rogue/runtime/boss-presentation.ts`)
* [x] T006 \[S3906] Implement authored-finale display helpers that use level finale metadata instead of raw depth comparisons with explicit invalid-depth fallback handling (`src/extensions/ai-rogue/runtime/boss-presentation.ts`)
* [x] T007 \[S3906] Update content finale boss typing to consume the boss contract where practical without widening persisted save shape (`src/extensions/ai-rogue/runtime/content/types.ts`)
* [x] T008 \[S3906] Update content registry validation to validate finale boss references through boss specs with schema-validated input and explicit error mapping (`src/extensions/ai-rogue/runtime/content/validate.ts`)

***

## Implementation (6 tasks)

* [x] T009 \[S3906] Replace render-model boss frame and final-defense gating branches with boss and finale helpers with product-facing copy only in projected labels (`src/extensions/ai-rogue/runtime/render-model.ts`)
* [x] T010 \[S3906] Replace HUD final-defense gating with authored finale helpers while preserving objective and payload state display (`src/extensions/ai-rogue/runtime/render-hud.ts`)
* [x] T011 \[S3906] Replace renderer audio visible-boss reveal detection with boss helpers and keep transition-only request behavior (`src/extensions/ai-rogue/runtime/renderer-audio-adapter.ts`)
* [x] T012 \[S3906] Replace effects boss actor and target detection with boss helpers while preserving missing-metadata fallback behavior (`src/extensions/ai-rogue/runtime/effects.ts`)
* [x] T013 \[S3906] Replace combat boss audio actor and boss cue branching with boss helpers while preserving shield-pierce and metadata output (`src/extensions/ai-rogue/runtime/combat.ts`)
* [x] T014 \[S3906] Ensure boss audio family cue routing remains metadata-backed and Kernel Sentinel cue parity is preserved (`src/extensions/ai-rogue/runtime/audio.ts`)

***

## Testing (6 tasks)

* [x] T015 \[S3906] \[P] Add boss contract, Kernel Sentinel frame parity, and finale gating unit coverage (`src/extensions/ai-rogue/runtime/__tests__/boss-presentation.test.ts`)
* [x] T016 \[S3906] \[P] Update render model coverage for boss-spec frames and final-defense projection on authored finale levels (`src/extensions/ai-rogue/runtime/__tests__/render-model.test.ts`)
* [x] T017 \[S3906] \[P] Update audio adapter, combat, and audio tests for boss helper routing and Kernel Sentinel cue parity (`src/extensions/ai-rogue/runtime/__tests__/renderer-audio-adapter.test.ts`)
* [x] T018 \[S3906] \[P] Update content registry tests for finale boss contract validation and invalid boss references (`src/extensions/ai-rogue/runtime/content/__tests__/levels.test.ts`)
* [x] T019 \[S3906] Run focused Vitest boss, render, audio adapter, audio, combat, and content registry gates (`bunx vitest run 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 src/extensions/ai-rogue/runtime/__tests__/audio.test.ts src/extensions/ai-rogue/runtime/__tests__/combat.test.ts src/extensions/ai-rogue/runtime/content/__tests__/levels.test.ts`)
* [x] T020 \[S3906] Run typecheck, optional AI Rogue runtime route smoke if observable rendering changed, and ASCII/LF validation (`bun run typecheck`)

***

## 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-session06-boss-and-finale-contracts/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.
