# Review Cleanup Notes

This project now separates current review surfaces from old diagnostic artifacts.
Use `docs/CLEANUP_INVENTORY.md` as the current cleanup bucket list before
deleting or consolidating additional artifacts.

## Current Defaults

- Map review uses only `row40_zero` tile indexing.
- Map review opens on `layer0` by default; use the occlusion foreground overlay checkbox to draw the same-index `map_*2` tile where CNS `layer1` has the `0x20` always-foreground bit. Low `layer1` bits remain directional collision flags, `0x10` is the actor-foot-position conditional foreground bit, and `0x40` is tracked separately as a animation-redraw flag.
- After CNS map assembly was confirmed, legacy map-render candidate/audit preview outputs were removed from the active web surface. Use `web/map_gallery.html` and `web/map_review.html` instead of `out/all_map_visual_audit.html`, `out/map_visual_audit.html`, or `out/map_render_review_gaps.html`.
- The old catch-all `monster_grid_review.html` surface is retired. Monster frames live in `web/monster_review.html`, field character frames in `web/field_character_review.html`, and UI/window/title CNS in `web/ui_window_review.html`.
- CNS `layer1` grid is metadata: low bits are directional collision flags, `0x20` selects where the same cell's `map_*2` foreground tile should always occlude the character, `0x10` selects actor-position-dependent foreground handling, and `0x40` marks cells that the EXE redraws for map animation. `0x60` is the `0x20 | 0x40` combination.
- Map tileset `map_*1` is an opaque ground layer. Foreground tilesets `map_*2` and `map_*3` use palette index 0 as PNG alpha.
- `diagnostic=1` no longer re-enables broken tile-index or visual candidates in `web/map_review.html`.
- Home hides diagnostic archive rows by default. Use the `진단 아카이브 표시` checkbox only when old raw reports are needed.
- Home keeps only the main battle formula/timeline/simulator entry points and
  field encounter producer/formation summaries.  Deep battle helper/effect
  proof pages remain available as evidence, but are reached through
  `web/static_analysis_remaining_work.html` or their owning review pages rather
  than direct home links.

## Archived Diagnostics

These files are retained as evidence/debug history, but should not be treated as current UI choices:

- `out/map_exit_candidates.*`
- `out/battle_enemy_candidates.json` / `.js` remain review data; the old direct `battle_enemy_candidates.html` page is not a current UI surface.
- `out/web_playtest_route.*`
- old map tile-index preview families under `out/map_render_review_tile_index_previews/`
- `out/candidate_*_browser_smoke.*` files are kept only when a current review page,
  completion audit, or active generator consumes them. Verifier-only smoke mirrors
  are regenerable scratch evidence and should be deleted when they no longer feed
  the active review surface.
- `out/transition_review_gaps.html`, `out/transition_review_gaps.json`, and `out/transition_review_gaps/` remain unresolved map-transition review evidence.
- `out/save_selector_*` and `out/runtime_selected_pointer_*` files remain selected-root/route-proof blocker evidence unless a newer consolidated proof replaces them.

Ignored raw runtime traces such as `out/opening_action_script_trace*.json`,
`out/opening_action_script_trace*_screens/`, and `out/*_webkitdriver.log` are
regenerable scratch output. They may be removed from the workspace whenever they
are not needed for an immediate analysis run.

## Removed Diagnostics

These scripts/output families were removed after their hypotheses were either confirmed elsewhere or retired:

- `web/demo/`
  - Retired until the confirmed runtime pieces are extracted into `web/engine/`.
    Use `web/game.html`, `web/hud_menu_preview.html`, and focused review pages for now.
- `web/runtime_map_layer0_viewport_match_review.html`
  - Removed from the active web surface.  The same diagnostic remains under
    `out/runtime_map_layer0_viewport_match_review.html` when runtime map-layer
    evidence is needed.
- `web/runtime_map_layer0_poll.html`
  - Removed from the active web surface.  The runtime poll evidence remains
    under `out/runtime_map_layer0_poll.json`; the out HTML poll viewer was
    retired after the viewport-match review began linking the JSON evidence.
- `web/battle_effect_visual_assertion_review.html`
- `web/battle_effect_pixel_oracle_plan.html`
- `web/battle_effect_capture_checklist.html`
- `web/battle_effect_pixel_compare_report.html`
  - Removed duplicate active-surface copies.  The canonical evidence pages
    remain under `out/`, and their generators now write only `out/` artifacts.
- `out/hud_menu_preview.html`
- `out/menu_right_panel_ui_review.html`
- `out/status_menu_ui_expression_review.html`
- `out/map_animation_execution_boundary_review.html`
  - Removed the duplicate `out/` HTML copy.  The active map-animation review
    hub is `web/map_animation_execution_boundary_review.html`.
- `web/menu_right_panel_ui_review.html`
  - Removed the standalone right-menu panel surface.  The right-menu JSON
    remains as evidence, and the active integrated surface is
    `web/hud_menu_preview.html`.
- `web/map_animation_*_review.html` leaf pages, except
  `web/map_animation_execution_boundary_review.html`
  - Removed from the active web surface.  The hub reads the corresponding
    `out/map_animation_*.json` evidence, so individual deep proof leaves no
    longer need separate HTML entry points.
- `out/selector_root_structure_review.html`
- `out/battle_skill_complete_pattern_review.html`
  - Removed duplicate `out/` HTML copies.  `selector_root` and battle skill
    complete pattern HTML now use the active `web/` surface; JSON/MD evidence
    remains under `out/`.
- `out/field_encounter_formation_opcode_cluster_review.html`
- `out/field_encounter_static_review.html`
- `out/field_encounter_formation_boundary_review.html`
- `out/field_step_encounter_boundary_review.html`
- `out/field_battle_resource_boundary_review.html`
- `out/field_encounter_formation_stream_review.html`
  - Removed duplicate `out/` HTML copies.  The field encounter/formation
    review surfaces are the corresponding `web/field_*` pages; JSON evidence
    remains under `out/`.
- `tools/evaluate_cns_frame_auto_counts.py`
- `tools/probe_monster_animation_slot_patterns.py`
- `tools/render_collision_candidate_gallery.py`
- `tools/render_collision_preview.py`
- `tools/render_map_candidate_gallery.py`
- `tools/summarize_map_render_family_default_audit.py`
- `out/cns_frame_auto_count_review.*`
- `out/monster_animation_slot_scan.*`
- `out/map_visual_audit.*`
- `out/all_map_visual_audit.*`
- `out/map_render_review_gaps.*`
- `out/map_layout_review_gaps.*`
- `out/map_collision_candidate_gallery.md`

## Naming Rule

Use `후보` only for genuinely unresolved original-game evidence. For browser-only implementations or old probes, prefer:

- `prototype`
- `trial`
- `진단`
- `미확정`
- `미연결`

Confirmed extraction or rendering paths should be named directly, for example `row40 0-based`, `WLK PCM`, `MLK MIDI`, `조립 완료 맵`, and `검토용 프레임 보드`.
