# Shell Load Graph

Generated shell-load startup graph artifacts live under `artifacts/exports/rt3-1.06/`:

- `shell-load-subgraph.dot`
- `shell-load-subgraph.md`
- `setup-window-subgraph.dot`
- `setup-window-subgraph.md`
- `setup-window-submodes-depth5-subgraph.dot`
- `setup-window-submodes-depth5-subgraph.md`
- `setup-window-submodes-depth5-forward-subgraph.dot`
- `setup-window-submodes-depth5-forward-subgraph.md`
- `runtime-effect-service-depth7-subgraph.dot`
- `runtime-effect-service-depth7-subgraph.md`
- `runtime-effect-service-depth7-forward-subgraph.dot`
- `runtime-effect-service-depth7-forward-subgraph.md`

The current graph is intentionally bounded rather than whole-program:

- seed nodes:
  - `0x00438890` `shell_active_mode_run_profile_startup_and_load_dispatch`
  - `0x00482ec0` `shell_transition_mode`
- traversal:
  - note-address references in `function-map.csv`
  - depth `2`
  - backreferences enabled

This keeps the artifact useful for naming and branch comparison instead of exploding into generic
utility helpers.

The paired `Setup.win` graph is a narrower owner-family export:

- seeds:
  - `0x00504010` `shell_setup_window_construct`
  - `0x005033d0` `shell_setup_window_handle_message`
  - `0x00502c00` `shell_setup_window_select_launch_mode_and_apply_shell_state`
  - `0x00502910` `shell_setup_window_refresh_mode_dependent_lists`
  - `0x00502550` `shell_setup_window_refresh_selection_lists_and_summary_fields`
  - `0x00502220` `shell_setup_window_publish_selected_profile_labels_and_preview_surface`

Regenerate it with:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/shell-load-subgraph \
  --seed 0x00438890 \
  --seed 0x00482ec0 \
  --depth 2 \
  --include-backrefs \
  --title "Shell Load Startup Subgraph"
```

And for the narrower `Setup.win` graph:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/setup-window-subgraph \
  --seed 0x00504010 \
  --seed 0x005033d0 \
  --seed 0x00502c00 \
  --seed 0x00502910 \
  --seed 0x00502550 \
  --seed 0x00502220 \
  --depth 2 \
  --include-backrefs \
  --title "Setup Window Dispatch Subgraph"
```

The current exporter is intentionally note-driven:

- nodes come from `function-map.csv`
- edges come from address references embedded in notes
- so it is best used as a bounded reasoning aid over already-curated rows, not as a substitute for
  raw disassembly or xref recovery

There is now also a deeper `Setup.win` submode export:

- the backref-enabled depth-5 variant is exploratory and broad
  - seeds: the same constructor, dispatcher, selector, and refresh owners
  - depth: `5`
  - backrefs: enabled
  - current size: `369` nodes / `753` edges
- the forward-only depth-5 variant is the recommended artifact for submode work
  - seeds: the same constructor, dispatcher, selector, and refresh owners
  - depth: `5`
  - backrefs: disabled
  - current size: `126` nodes / `246` edges

Generate the exploratory backref-enabled graph with:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/setup-window-submodes-depth5-subgraph \
  --seed 0x00504010 \
  --seed 0x005033d0 \
  --seed 0x00502c00 \
  --seed 0x00502910 \
  --seed 0x005027b0 \
  --seed 0x00502550 \
  --seed 0x00502220 \
  --depth 5 \
  --include-backrefs \
  --title "Setup Window Submode Subgraph (Depth 5)"
```

Generate the narrower forward-only graph with:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/setup-window-submodes-depth5-forward-subgraph \
  --seed 0x00504010 \
  --seed 0x005033d0 \
  --seed 0x00502c00 \
  --seed 0x00502910 \
  --seed 0x005027b0 \
  --seed 0x00502550 \
  --seed 0x00502220 \
  --depth 5 \
  --title "Setup Window Submode Subgraph (Depth 5, Forward Only)"
```

There is now also a deeper runtime-effect export around the scenario event collection service loop:

- the backref-enabled depth-7 variant is exploratory and broad
  - seeds:
    - `0x004323a0` `scenario_runtime_effect_record_service_and_dispatch_linked_compact_effects`
    - `0x00431b20` `world_apply_compact_runtime_effect_record_to_resolved_targets`
    - `0x00430b50` `scenario_runtime_effect_record_build_followon_effect_from_compact_record_and_targets`
    - `0x00432ea0` `scenario_event_collection_allocate_runtime_effect_record_from_compact_payload`
  - depth: `7`
  - backrefs: enabled
  - current size: `525` nodes / `1235` edges
- the forward-only depth-7 variant is the recommended artifact for this branch
  - same seeds
  - depth: `7`
  - backrefs: disabled
  - current size: `293` nodes / `752` edges

Generate the exploratory backref-enabled graph with:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/runtime-effect-service-depth7-subgraph \
  --seed 0x004323a0 \
  --seed 0x00431b20 \
  --seed 0x00430b50 \
  --seed 0x00432ea0 \
  --depth 7 \
  --include-backrefs \
  --title "Scenario Runtime Effect Service Subgraph (Depth 7)"
```

Generate the narrower forward-only graph with:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/runtime-effect-service-depth7-forward-subgraph \
  --seed 0x004323a0 \
  --seed 0x00431b20 \
  --seed 0x00430b50 \
  --seed 0x00432ea0 \
  --depth 7 \
  --title "Scenario Runtime Effect Service Subgraph (Depth 7, Forward Only)"
```

There is now also a narrower startup-kind-`8` export for the ordinary bring-up lane:

- artifact:
  - `artifacts/exports/rt3-1.06/runtime-effect-kind8-startup-subgraph.{dot,md}`
- seeds:
  - `0x00444d92`
  - `0x00432f40`
  - `0x004323a0`
  - `0x00431b20`
  - `0x00433130`
- depth:
  - `5`
- current size:
  - `702` nodes / `2076` edges

Generate it with:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/runtime-effect-kind8-startup-subgraph \
  --seed 0x00444d92 \
  --seed 0x00432f40 \
  --seed 0x004323a0 \
  --seed 0x00431b20 \
  --seed 0x00433130 \
  --depth 5 \
  --title "Startup Kind-8 Runtime Effect Subgraph"
```

There is now also a smaller bringup-refresh export centered on the owner above that lane:

- artifact:
  - `artifacts/exports/rt3-1.06/world-entry-bringup-refresh-subgraph.{dot,md}`
- seeds:
  - `0x00443a50`
- depth:
  - `3`
- current size:
  - `343` nodes / `989` edges

Generate it with:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/world-entry-bringup-refresh-subgraph \
  --seed 0x00443a50 \
  --depth 3 \
  --title "World Entry Bringup Refresh Subgraph"
```

There is now also a saved-runtime-state loader export for the level below bringup:

- artifact:
  - `artifacts/exports/rt3-1.06/world-load-saved-runtime-state-subgraph.{dot,md}`
- seeds:
  - `0x00446d40`
- depth:
  - `3`
- current size:
  - `346` nodes / `934` edges

Generate it with:

```bash
python3 tools/py/export_function_subgraph.py \
  artifacts/exports/rt3-1.06/function-map.csv \
  artifacts/exports/rt3-1.06/world-load-saved-runtime-state-subgraph \
  --seed 0x00446d40 \
  --depth 3 \
  --title "World Load Saved Runtime State Subgraph"
```
