> 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/phase34-session03-simulation-correctness-and-scenario-gate/tasks.md).

# Task Checklist

**Session ID**: `phase34-session03-simulation-correctness-and-scenario-gate` **Total Tasks**: 20 **Estimated Duration**: 3-4 hours **Created**: 2026-06-26

***

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

***

## Progress Summary

| Metric              | Value   |
| ------------------- | ------- |
| Tasks Completed     | 20 / 20 |
| Estimated Remaining | 0 hours |
| Blockers            | 0       |

***

## Setup (3 tasks)

* [x] T001 \[S3403] Verify Phase 34 Session 01 and 02 prerequisite evidence and current active scope (`.spec_system/PRD/phase_34/session_03_simulation_correctness_and_scenario_gate.md`)
* [x] T002 \[S3403] Inspect current AR-D2-001 and AR-D1-002 source paths plus the existing combat e2e fixture dependency (`.spec_system/PRD/phase_35/PRD_phase_35.md`)
* [x] T003 \[S3403] Create implementation notes scaffold for simulation correctness, scenario-gate evidence, and deterministic-behavior notes (`.spec_system/specs/phase34-session03-simulation-correctness-and-scenario-gate/implementation-notes.md`)

***

## Foundation (5 tasks)

* [x] T004 \[S3403] Add a shared turn-start status helper and lethal no-action finalization path with deterministic loss event ordering (`src/extensions/ai-rogue/runtime/simulation.ts`)
* [x] T005 \[S3403] Refactor Movement and Strike to use the shared turn-start helper while preserving existing lethal loss/no-action behavior (`src/extensions/ai-rogue/runtime/simulation.ts`)
* [x] T006 \[S3403] Refactor Surge to guard lethal turn-start defeat before shard spend, pulse attacks, rewards, threat clearing, and enemy turns (`src/extensions/ai-rogue/runtime/simulation.ts`)
* [x] T007 \[S3403] Refactor Protocol to guard lethal turn-start defeat before protocol queue mutation and every protocol branch with exhaustive protocol handling (`src/extensions/ai-rogue/runtime/simulation.ts`)
* [x] T008 \[S3403] Update runtime scenario type and comments so combat fixtures are internal/test-only and generated runs remain the declared default (`src/extensions/ai-rogue/runtime/types.ts`)

***

## Implementation (5 tasks)

* [x] T009 \[S3403] Remove browser query scenario selection from the Play route with validated generated fallback and product-facing copy only (`src/extensions/ai-rogue/views/play-view.tsx`)
* [x] T010 \[S3403] Wire any deterministic combat scenario selection through a local/test-only mount path with generated fallback on unavailable or invalid input (`src/extensions/ai-rogue/views/runtime-canvas.tsx`)
* [x] T011 \[S3403] Preserve renderer start/reset/restart behavior so internal combat fixture creation is explicit and generated scenario remains default (`src/extensions/ai-rogue/runtime/renderer.ts`)
* [x] T012 \[S3403] Update AI Rogue developer docs that mention `scenario=combat` to describe the test-only fixture path instead of a product route query (`docs/extensions/ai-rogue/playtest-notes.md`)
* [x] T013 \[S3403] Update run-loop notes and implementation notes with AR-D2-001, AR-D1-002, deterministic behavior, and public-demo boundary evidence (`docs/extensions/ai-rogue/run-loop-rebuild-notes.md`)

***

## Testing (7 tasks)

* [x] T014 \[S3403] \[P] Update lethal turn-start command matrix tests for Movement, Strike, Surge, and every Protocol branch (`src/extensions/ai-rogue/runtime/__tests__/status-expanded.test.ts`)
* [x] T015 \[S3403] \[P] Add deterministic generated-run regression coverage for unaffected non-lethal command behavior (`src/extensions/ai-rogue/runtime/__tests__/simulation.test.ts`)
* [x] T016 \[S3403] \[P] Update runtime canvas tests for generated default and explicit local/test scenario mount behavior (`src/extensions/ai-rogue/__tests__/runtime-canvas.test.tsx`)
* [x] T017 \[S3403] \[P] Replace Playwright `?scenario=combat` usage with the local/test fixture hook and add proof the product query is ignored (`tests/e2e/ai-rogue-runtime.spec.ts`)
* [x] T018 \[S3403] Run focused AI Rogue unit checks and record exact pass/fail evidence (`package.json`)
* [x] T019 \[S3403] Run AI Rogue runtime Playwright coverage or record exact local-browser blocker (`tests/e2e/ai-rogue-runtime.spec.ts`)
* [x] T020 \[S3403] Run typecheck, lint, format check, ASCII/LF validation, and no public-demo bridge or hosted-write spot checks (`.spec_system/specs/phase34-session03-simulation-correctness-and-scenario-gate/implementation-notes.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 `implement` to start 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/phase34-session03-simulation-correctness-and-scenario-gate/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.
