> 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/phases/phase_37/session_06_g7_player_animation.md).

# Session 06: G7 Player Animation

**Session ID**: `phase37-session06-g7-player-animation` **Status**: Complete **Estimated Tasks**: 20 **Estimated Duration**: 2-4 hours

***

## Objective

Decide whether G7 player animation can ship at 16x16 and wire it only if the downscale review proves it works in the runtime.

***

## Scope

### In Scope (MVP)

* Downscale-review generated side-facing and action player rows at runtime footprint.
* If they pass, crop idle, walk, Strike, Surge cast, hurt/recovery, and optional low-HP directional frames.
* If they fail, record G7 as redraw reference and leave the existing player frame family in place.
* Wire player movement and idle animation independently from simulation state only when direct use passes.
* Document the final decision with visual evidence.

### Out of Scope

* Changing player footprint, collision, movement rules, input rules, or combat balance.
* Shipping unreadable downscaled frames to avoid a no-op runtime result.
* Replacing the player family without focused browser proof.

***

## Prerequisites

* [x] Sessions 01-05 completed or their atlas/frame contracts are stable.
* [x] G7 source and alpha derivative are available under the generated visual asset directory.
* [x] Existing player rendering tests and runtime smoke checks are passing before edits.

***

## Source Inputs

| Asset            | Path                                                                                                       |
| ---------------- | ---------------------------------------------------------------------------------------------------------- |
| Source sheet     | `docs/ongoing-projects/generated/ai-rogue-visual-audio-assets/source/ai-rogue-player-animation-source.png` |
| Alpha derivative | `docs/ongoing-projects/generated/ai-rogue-visual-audio-assets/alpha/ai-rogue-player-animation-alpha.png`   |
| Crop manifest    | `docs/ongoing-projects/generated/ai-rogue-visual-audio-assets/crop-manifest.json`                          |

Side-facing frames need 16x16 downscale review before direct runtime use.

***

## Detailed Work

Review before wiring:

* Test whether the generated side-facing player rows remain readable at 16x16.
* If direct use passes, crop idle, walk, Strike, Surge cast, hurt/recovery, and optional low-HP frames per direction.
* If direct use fails, treat G7 as redraw reference and keep the existing player frame family until a tighter sheet exists.
* Wire player movement/idle animation separately from simulation state.
* This session may become a no-op runtime change if direct use fails. That is acceptable only when the rejection is documented with evidence.

***

## Likely Code Touchpoints

* `src/extensions/ai-rogue/runtime/renderer-sprites.ts`
* `src/extensions/ai-rogue/runtime/renderer.ts`
* `src/extensions/ai-rogue/runtime/effects.ts`

***

## Required Validation

* `scripts/extensions/ai-rogue/pack-visual-assets.py` if any G7 frames are accepted.
* `bun run typecheck`
* `bash scripts/check-asset-sizes.sh`
* Focused renderer tests or visual checks proving animation does not alter simulation behavior.
* `bunx playwright test tests/e2e/ai-rogue-runtime.spec.ts`
* `bunx playwright test tests/e2e/ai-rogue-mobile.spec.ts`
* Runtime evidence that accepted frames are readable at 16x16, or documented rejection evidence proving existing player rendering remains unchanged.

***

## Deliverables

1. Accepted or rejected G7 crop manifest entries with explicit downscale notes. Done: 32 rejected G7 candidates are recorded; zero G7 player frames are accepted.
2. Optional player animation frame mappings and refreshed atlas outputs. Done: direct runtime use was rejected, so atlas outputs and runtime mappings stay unchanged.
3. Renderer tests or visual checks proving animation does not alter simulation behavior. Done: focused runtime tests and desktop/mobile Playwright proof passed.
4. Updated visual asset documentation with the ship-or-redraw decision. Done: the G7 redraw-reference outcome is documented with review evidence.

***

## Success Criteria

* [x] Downscaled frames are reviewed and the decision is documented in the manifest and visual asset docs.
* [x] If wired, player animation is readable, footprint-stable, and simulation independent.
* [x] If rejected, existing player rendering remains unchanged and tests still pass.
* [x] The product outcome is proven end to end: either G7 animation visibly improves the player in real runtime play, or the phase explicitly avoids shipping weak visuals and records the redraw path.

## Implementation Closeout Evidence

Recorded on 2026-06-29:

* Generated the docs-only 16x16 G7 review image at `docs/extensions/ai-rogue/generated/ai-rogue-g7-player-downscale-review.png`.
* Rejected direct runtime use because the generated side-facing and action frames lose silhouette clarity at the current 16x16 footprint.
* Added 32 `rejected_g7_player_*` manifest records and no accepted G7 player records.
* Preserved gameplay/UI atlas outputs and the existing stable player frame contract.
* Proved the rejected branch with full Vitest, focused Vitest, desktop/mobile Playwright, typecheck, lint, asset-size validation, JSON checks, manifest invariants, whitespace checks, ASCII/LF checks, security review, behavioral review, and UI product-surface checks.
* No remote loading, hosted writes, collectors, analytics, public-demo bridge calls, save schema changes, WebGPU requirement, collision/footprint change, or deterministic simulation behavior change was introduced.

Completed workflow gates:

* `creview` reviewed and repaired all uncommitted changes.
* `validate` verified session completeness with PASS.
* `updateprd` marked Session 06 and Phase 37 complete.


---

# 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/phases/phase_37/session_06_g7_player_animation.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.
