From b458504043f2579ffc44eb3dab83cfc3dcef06b6 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sat, 31 Oct 2026 22:00:05 -0700 Subject: [PATCH 01/27] AutoStory: PR plan and progress for the three collector PRs Adds autostory/PR_PLAN.md (goal, ground rules, the tree of the shared core, FRLG MVP and BDSP MVP collectors, order of work, the user's decisions of 2026-11-01, open items) and autostory/PR_PROGRESS.md (live tree with status and the upstream queue), linked from AGENTS.md next to the BBQ plan. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- AGENTS.md | 3 ++ autostory/PR_PLAN.md | 93 ++++++++++++++++++++++++++++++++++++++++ autostory/PR_PROGRESS.md | 38 ++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 autostory/PR_PLAN.md create mode 100644 autostory/PR_PROGRESS.md diff --git a/AGENTS.md b/AGENTS.md index 28ad1a6439..b5d29c5321 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -286,6 +286,9 @@ change a reviewer will notice, so keep it where it clearly pays off. ### Plans and state: where to look first +- [autostory/PR_PLAN.md](autostory/PR_PLAN.md): how the AutoStory work (shared + navigation core, BDSP MVP, FRLG MVP) becomes three collector PRs and then upstream + PRs; live status in [autostory/PR_PROGRESS.md](autostory/PR_PROGRESS.md). - [pokemon_sv/MILESTONE_STATE.md](pokemon_sv/MILESTONE_STATE.md): current state of each milestone and the active lab run (owned by Codex). - [pokemon_sv/ROADMAP.md](pokemon_sv/ROADMAP.md): milestones ordered by payoff diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md new file mode 100644 index 0000000000..0478f3380b --- /dev/null +++ b/autostory/PR_PLAN.md @@ -0,0 +1,93 @@ +# AutoStory work → upstream PRs: the three collectors + +Written 2026-11-01 (user decisions of that day are in "Decisions"). Live status is in +[PR_PROGRESS.md](PR_PROGRESS.md). The BBQ equivalent is +[../pokemon_sv/PR_PLAN.md](../pokemon_sv/PR_PLAN.md); the rules for where PRs live are in +[../pokemon_sv/PR_WORKFLOW.md](../pokemon_sv/PR_WORKFLOW.md). + +## Goal + +Three fork PRs, each in the shape of fork #107 (a "collector"): a branch on a `base/*` copy +of upstream main, whose commits are the future upstream PRs, one concern each, in the order +they would go upstream. + +1. **Shared core** (`nav/shared`): what FRLG and BDSP both plan and run on. +2. **BDSP MVP** (`bdsp/mvp`): new game to Floaroma, minus the shared core, on Butters' #1717. +3. **FRLG MVP** (`frlg/mvp`): overworld navigation to Brock, minus the shared core. + +## Ground rules + +- **Rebuild from the existing PRs, do not merge their histories.** Each collector commit is the + source PR's three-dot diff (`git diff base...head`) applied on the collector, so + `git range-diff` against the source branch shows only the shared cmake and test-runner lines. +- **One commit = one future upstream PR**, about 400 changed lines or fewer where the code + allows it; map data and tests do not count. Commit titles are the PR titles. +- **The base is upstream main**, not fork main: `base/upstream-main` is a plain copy + (fast-forwarded, never rebased). BDSP's base adds Butters' #1717 head on top. +- **Upstream is serial**: at most two open there; the user publishes. Collectors and their + source PRs are fork drafts. Superseded PRs are closed by the user, not by an agent. +- **CRLF files stay CRLF** (`SerialPrograms/cmake/SourceFiles.cmake`, + `ComputerPrograms_UnitTestRunner.cpp`, most of CommonFramework). A diff the length of the + file is a line-ending accident. +- **Go slowly**: each collector is shown to the user before the next one starts. + +## Tree + +``` +base/upstream-main (copy of upstream main; refreshed to 147c0dbd8 on 2026-11-01) +├── nav/shared ............ collector 1, supersedes #72 #66 #108 #79 +│ S1 Common: MoveOnlyFunction (#72, +334, 5 files) +│ S2 Pokemon navigation: grid types + leg planner (#66, +733, 7 files) +│ S3 ScreenMachine + StepTrace (#108, +333, 5 files) +│ S4 Pokemon navigation: story checkpoints as events (#79, ~+1200, 6 files; its +│ MoveOnlyFunction copy is S1) +├── frlg/mvp (on nav/shared) ... collector 3, supersedes #67 (22 files, +3302) +│ F1 devtools: generate FRLG overworld maps as JSON; the JSON maps (pokefirered) +│ F2 FRLG: OverworldMap, Tile/Grid, named points and flag sets +│ F3 FRLG: route planning on the shared leg planner (route costs, steps) +│ F4 FRLG: LegWalker + overworld walk (D-pad legs, battle flash watcher) +│ F5 FRLG: player facing reader (standing sprites from the sheet) +└── base/bdsp-1717 = base/upstream-main + upstream #1717 head + nav/shared + └── bdsp/mvp ............ collector 2, supersedes #68 #109 #110 #111 (and the + B1 Pokemon navigation: TileGrid + MapSet lab branch bdsp/event-sandgem-center) + B2 BDSP AutoStory: walker (Walk, RouteWalk, waypoints, blocked taps) + B3 BDSP AutoStory: map data from the Diamond decomp (35 files) + MAPS.md + B4 BDSP AutoStory: segments 00/01, Sandgem Center events, route records + B5 BDSP AutoStory: tests (plans, records, detectors) + (Command File Runner and lab control stay in #107) +``` + +Sizes from 2026-11-01. BDSP's delta over #1717's current head (381c055ac): AutoStory ++23.6k/−11.2k (StorySegments 20 files, Utils 12, Data 35 files +2.7k, Tests +2k). It will need +a finer split than B1–B5 once rebuilt; decide after the shared and FRLG collectors land. + +## Order of work + +1. `nav/shared`: refresh the base, apply S1–S4, fork CI on three platforms, draft PR. Show. +2. `frlg/mvp`: from #67's 20 commits, regrouped as F1–F5, on `nav/shared`. Show. +3. `bdsp/mvp`: after fork #110 and #111 merge into `bdsp/event-sandgem-center` and its three + pre-existing CI failures are fixed (`std::lround` without `` in + `PokemonBDSP_AutoStory_Tests.cpp`, `int-in-bool-context` in `PokemonBDSP_AutoStoryTools.cpp`, + the `std::move_only_function` static assertion in `MoveOnlyFunction_Tests.cpp` on Windows + clang). Refresh the #1717 mirror (#54 is behind Butters' 2026-10-30 push) and build + `base/bdsp-1717`. Show. +4. The user closes the superseded PRs and publishes upstream from the queue in PR_PROGRESS.md. + +## Decisions (user, 2026-11-01) + +- #72 MoveOnlyFunction stays and is the shared collector's first commit (#79 keeps using it). +- #108 ScreenMachine/StepTrace is in the shared collector (BDSP uses it now, FRLG later). +- TileGrid/MapSet (#109) go into the BDSP collector, not the shared core, until FRLG adopts them. +- New collector PRs; the old PRs are closed as superseded (branches kept), as #107 did for + #105/#106. + +## Open items + +- `Pokemon_LegPlanner.h` on the BDSP lab branch is behind nav/core's "search steps" refactor + (79+/133−); the BDSP collector takes nav/core's version and re-checks the BDSP planner tests. +- #109's TileGrid is ~700 lines behind the lab branch (RobustPlanCosts, route costs): B1 is + rebuilt from the lab branch, not from #109. +- Upstream #1717 is Butters' open PR. B1–B5 cannot go upstream before it merges; the + alternative is PRs against Butters' branch. Decide with the user when the BDSP collector exists. +- Not part of the MVPs, stay separate: #81 naming screen, #62 system keyboard, #61 party check, + #86 bag detector tests, #107 lab tooling, #103 lab/main, #100/#78/#56 design notes, #85 notes. diff --git a/autostory/PR_PROGRESS.md b/autostory/PR_PROGRESS.md new file mode 100644 index 0000000000..7704ceaf38 --- /dev/null +++ b/autostory/PR_PROGRESS.md @@ -0,0 +1,38 @@ +# AutoStory PR progress + +Live status of [PR_PLAN.md](PR_PLAN.md). Update whenever a PR changes state. + +Legend: ✅ merged upstream · 🔵 open upstream · 🟢 fork draft, CI green · 🟡 fork draft, +CI pending or red · 🛠 branch in progress · ⬜ not started · ❌ closed + +Last updated: 2026-11-01 (after the user's four decisions; shared collector being built). + +``` +base/upstream-main +├── 🛠 nav/shared collector 1 ........................... S1–S4 being applied; CI to follow +│ sources: 🟡 #72 (87071ad59) · 🟡 #66 nav/core (dc9f1682f, build CI green, code +│ health red until main is merged in) · 🟢 #108 (6c8c83473) · 🟡 #79 (70e10070c) +├── ⬜ frlg/mvp collector 3 ............................. source 🟡 #67 frlg/brock-mvp (CI green) +└── ⬜ base/bdsp-1717 → ⬜ bdsp/mvp collector 2 ........ sources #68, #109, #110, #111, + lab branch bdsp/event-sandgem-center (7b24d871e; Ubuntu gcc and Windows clang red, + three pre-existing failures listed in PR_PLAN.md) + +Open fork PRs that stay as they are: #107 lab tooling (channel work landing), #103 lab/main, +#81, #62, #61, #86, #100, #78, #56, #85. +To close as superseded once each collector is accepted: #72 #66 #108 #79 → nav/shared; +#67 → frlg/mvp; #68 #109 #110 #111 → bdsp/mvp. +``` + +## Upstream queue (publish in this order; two open at a time) + +| # | PR | Source | State | +|---|---|---|---| +| 1 | S1 Common: MoveOnlyFunction | #72 | 🛠 in nav/shared | +| 2 | S2 Pokemon navigation: grid types and leg planner | #66 | 🛠 in nav/shared | +| 3 | S3 ScreenMachine + StepTrace | #108 | 🛠 in nav/shared | +| 4 | S4 Pokemon navigation: story checkpoints as events | #79 | 🛠 in nav/shared | +| 5–9 | F1–F5 FRLG overworld navigation | #67 | ⬜ | +| 10+ | B1–B5 BDSP AutoStory MVP | #68 and the lab branch | ⬜ blocked on upstream #1717 | + +Already upstream from this work: #1798 (AGENTS.md docs-site note), #1791, #1754 (BBQ). That is +three open; the shared queue starts when one of them merges or is closed. From 864428886981423ebf7e2d872cac495a9c9cea3b Mon Sep 17 00:00:00 2001 From: dayfine Date: Sat, 31 Oct 2026 22:10:10 -0700 Subject: [PATCH 02/27] AutoStory PR plan: std::format pass per collector commit Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index 0478f3380b..758f5f5013 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -29,6 +29,9 @@ they would go upstream. - **CRLF files stay CRLF** (`SerialPrograms/cmake/SourceFiles.cmake`, `ComputerPrograms_UnitTestRunner.cpp`, most of CommonFramework). A diff the length of the file is a line-ending accident. +- **`std::format` for multi-part messages** (AGENTS.md C++ style). Our code had none and + ~130 `std::to_string` chains; each collector commit converts its own sites with identical + output text (user, 2026-11-01). Butters' #1717 code is left as is. - **Go slowly**: each collector is shown to the user before the next one starts. ## Tree From 2f1fc45167c288fa250e98160dfc52c9ece12405 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sat, 31 Oct 2026 22:32:23 -0700 Subject: [PATCH 03/27] AutoStory PR progress: collector 1 is #114 Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PROGRESS.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/autostory/PR_PROGRESS.md b/autostory/PR_PROGRESS.md index 7704ceaf38..3675568a8f 100644 --- a/autostory/PR_PROGRESS.md +++ b/autostory/PR_PROGRESS.md @@ -5,13 +5,15 @@ Live status of [PR_PLAN.md](PR_PLAN.md). Update whenever a PR changes state. Legend: ✅ merged upstream · 🔵 open upstream · 🟢 fork draft, CI green · 🟡 fork draft, CI pending or red · 🛠 branch in progress · ⬜ not started · ❌ closed -Last updated: 2026-11-01 (after the user's four decisions; shared collector being built). +Last updated: 2026-11-01 05:40 (collector 1 open as #114, CI green; FRLG collector waits for the user's look at #114). ``` base/upstream-main -├── 🛠 nav/shared collector 1 ........................... S1–S4 being applied; CI to follow -│ sources: 🟡 #72 (87071ad59) · 🟡 #66 nav/core (dc9f1682f, build CI green, code -│ health red until main is merged in) · 🟢 #108 (6c8c83473) · 🟡 #79 (70e10070c) +├── 🟢 nav/shared collector 1 = fork #114 ............... 4 commits, CI green on Mac/Windows Clang/Ubuntu +│ S1 823f5318d MoveOnlyFunction (#72, +334) · S2 3209523a9 grid + leg planner (#66, +735) +│ S3 c246d3d56 ScreenMachine (#108, +333) · S4 f3a8943a3 story events (#79, +1204) +│ std::format pass applied inside S2/S4 (9 sites). Sources to close once accepted: +│ #72 (87071ad59) · #66 nav/core (dc9f1682f) · #108 (6c8c83473) · #79 (70e10070c) ├── ⬜ frlg/mvp collector 3 ............................. source 🟡 #67 frlg/brock-mvp (CI green) └── ⬜ base/bdsp-1717 → ⬜ bdsp/mvp collector 2 ........ sources #68, #109, #110, #111, lab branch bdsp/event-sandgem-center (7b24d871e; Ubuntu gcc and Windows clang red, @@ -19,7 +21,7 @@ base/upstream-main Open fork PRs that stay as they are: #107 lab tooling (channel work landing), #103 lab/main, #81, #62, #61, #86, #100, #78, #56, #85. -To close as superseded once each collector is accepted: #72 #66 #108 #79 → nav/shared; +To close as superseded once each collector is accepted: #72 #66 #108 #79 → #114; #67 → frlg/mvp; #68 #109 #110 #111 → bdsp/mvp. ``` @@ -27,10 +29,10 @@ To close as superseded once each collector is accepted: #72 #66 #108 #79 → nav | # | PR | Source | State | |---|---|---|---| -| 1 | S1 Common: MoveOnlyFunction | #72 | 🛠 in nav/shared | -| 2 | S2 Pokemon navigation: grid types and leg planner | #66 | 🛠 in nav/shared | -| 3 | S3 ScreenMachine + StepTrace | #108 | 🛠 in nav/shared | -| 4 | S4 Pokemon navigation: story checkpoints as events | #79 | 🛠 in nav/shared | +| 1 | S1 Common: MoveOnlyFunction | #72 | 🟢 #114 S1 | +| 2 | S2 Pokemon navigation: grid types and leg planner | #66 | 🟢 #114 S2 | +| 3 | S3 ScreenMachine + StepTrace | #108 | 🟢 #114 S3 | +| 4 | S4 Pokemon navigation: story checkpoints as events | #79 | 🟢 #114 S4 | | 5–9 | F1–F5 FRLG overworld navigation | #67 | ⬜ | | 10+ | B1–B5 BDSP AutoStory MVP | #68 and the lab branch | ⬜ blocked on upstream #1717 | From 6db5c575996cebde77508fa78ce7d7e8ef5bc427 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sat, 31 Oct 2026 23:12:59 -0700 Subject: [PATCH 04/27] AutoStory PR progress: #114 accepted, frlg/mvp started, BDSP merges Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PROGRESS.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/autostory/PR_PROGRESS.md b/autostory/PR_PROGRESS.md index 3675568a8f..895772d464 100644 --- a/autostory/PR_PROGRESS.md +++ b/autostory/PR_PROGRESS.md @@ -5,7 +5,7 @@ Live status of [PR_PLAN.md](PR_PLAN.md). Update whenever a PR changes state. Legend: ✅ merged upstream · 🔵 open upstream · 🟢 fork draft, CI green · 🟡 fork draft, CI pending or red · 🛠 branch in progress · ⬜ not started · ❌ closed -Last updated: 2026-11-01 05:40 (collector 1 open as #114, CI green; FRLG collector waits for the user's look at #114). +Last updated: 2026-11-01 06:30 (user accepted #114; frlg/mvp being built; #115 and #110 merged into the BDSP lab branch, #111 being merged with the base, #112 next). ``` base/upstream-main @@ -14,10 +14,10 @@ base/upstream-main │ S3 c246d3d56 ScreenMachine (#108, +333) · S4 f3a8943a3 story events (#79, +1204) │ std::format pass applied inside S2/S4 (9 sites). Sources to close once accepted: │ #72 (87071ad59) · #66 nav/core (dc9f1682f) · #108 (6c8c83473) · #79 (70e10070c) -├── ⬜ frlg/mvp collector 3 ............................. source 🟡 #67 frlg/brock-mvp (CI green) -└── ⬜ base/bdsp-1717 → ⬜ bdsp/mvp collector 2 ........ sources #68, #109, #110, #111, - lab branch bdsp/event-sandgem-center (7b24d871e; Ubuntu gcc and Windows clang red, - three pre-existing failures listed in PR_PLAN.md) +├── 🛠 frlg/mvp collector 3 (on nav/shared) ............. F0–F6 being cut from 🟢 #67 frlg/brock-mvp +└── ⬜ base/bdsp-1717 → ⬜ bdsp/mvp collector 2 ........ sources #68, #109 and the lab branch + bdsp/event-sandgem-center: ✅ #115 ci-fixes and ✅ #110 plan cap merged; 🟡 #111 decomp + grids (merging the base in); 🟡 #112 00.01–00.03 lines waits for #111 Open fork PRs that stay as they are: #107 lab tooling (channel work landing), #103 lab/main, #81, #62, #61, #86, #100, #78, #56, #85. @@ -38,3 +38,6 @@ To close as superseded once each collector is accepted: #72 #66 #108 #79 → #11 Already upstream from this work: #1798 (AGENTS.md docs-site note), #1791, #1754 (BBQ). That is three open; the shared queue starts when one of them merges or is closed. + +Lab branches (no PRs): `lab/main` = main + #107; `lab/bdsp` = bdsp/event-sandgem-center + #115 + +lab/main; `lab/frlg` = frlg/brock-mvp + lab/main. Rebuilt on the collectors when they exist. From a57566a2e4b0928b4b73e06a1eb4d81dc4f0f2e9 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sat, 31 Oct 2026 23:36:34 -0700 Subject: [PATCH 05/27] autostory PR tree: S1 MoveOnlyFunction merged upstream as #1810; base refreshed to b3673f2a9 Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 7 ++++--- autostory/PR_PROGRESS.md | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index 758f5f5013..a9f2c31f2b 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -37,13 +37,14 @@ they would go upstream. ## Tree ``` -base/upstream-main (copy of upstream main; refreshed to 147c0dbd8 on 2026-11-01) +base/upstream-main (copy of upstream main; refreshed to b3673f2a9 on 2026-11-01) ├── nav/shared ............ collector 1, supersedes #72 #66 #108 #79 -│ S1 Common: MoveOnlyFunction (#72, +334, 5 files) +│ S1 Common: MoveOnlyFunction ✅ merged upstream as #1810 (2026-11-01); nav/shared +│ merges the base back in, so S1 drops out of the diff │ S2 Pokemon navigation: grid types + leg planner (#66, +733, 7 files) │ S3 ScreenMachine + StepTrace (#108, +333, 5 files) │ S4 Pokemon navigation: story checkpoints as events (#79, ~+1200, 6 files; its -│ MoveOnlyFunction copy is S1) +│ MoveOnlyFunction is upstream now) ├── frlg/mvp (on nav/shared) ... collector 3, supersedes #67 (22 files, +3302) │ F1 devtools: generate FRLG overworld maps as JSON; the JSON maps (pokefirered) │ F2 FRLG: OverworldMap, Tile/Grid, named points and flag sets diff --git a/autostory/PR_PROGRESS.md b/autostory/PR_PROGRESS.md index 895772d464..8945ab5957 100644 --- a/autostory/PR_PROGRESS.md +++ b/autostory/PR_PROGRESS.md @@ -5,12 +5,12 @@ Live status of [PR_PLAN.md](PR_PLAN.md). Update whenever a PR changes state. Legend: ✅ merged upstream · 🔵 open upstream · 🟢 fork draft, CI green · 🟡 fork draft, CI pending or red · 🛠 branch in progress · ⬜ not started · ❌ closed -Last updated: 2026-11-01 06:30 (user accepted #114; frlg/mvp being built; #115 and #110 merged into the BDSP lab branch, #111 being merged with the base, #112 next). +Last updated: 2026-11-01 07:10 (S1 MoveOnlyFunction merged upstream as #1810; nav/shared gets a game-agnostic Pose commit and merges the new base in; frlg/mvp CI running; #115 and #110 merged into the BDSP lab branch; #111 carries #115's two missed fixes, #112 next). ``` base/upstream-main -├── 🟢 nav/shared collector 1 = fork #114 ............... 4 commits, CI green on Mac/Windows Clang/Ubuntu -│ S1 823f5318d MoveOnlyFunction (#72, +334) · S2 3209523a9 grid + leg planner (#66, +735) +├── 🟢 nav/shared collector 1 = fork #114 ............... S2–S4 + Pose commit 19a030374 + base merge +│ S1 823f5318d MoveOnlyFunction (#72) ✅ upstream #1810 · S2 3209523a9 grid + leg planner (#66, +735) │ S3 c246d3d56 ScreenMachine (#108, +333) · S4 f3a8943a3 story events (#79, +1204) │ std::format pass applied inside S2/S4 (9 sites). Sources to close once accepted: │ #72 (87071ad59) · #66 nav/core (dc9f1682f) · #108 (6c8c83473) · #79 (70e10070c) @@ -29,15 +29,15 @@ To close as superseded once each collector is accepted: #72 #66 #108 #79 → #11 | # | PR | Source | State | |---|---|---|---| -| 1 | S1 Common: MoveOnlyFunction | #72 | 🟢 #114 S1 | +| 1 | S1 Common: MoveOnlyFunction | #72 | ✅ upstream #1810, merged 2026-11-01 | | 2 | S2 Pokemon navigation: grid types and leg planner | #66 | 🟢 #114 S2 | | 3 | S3 ScreenMachine + StepTrace | #108 | 🟢 #114 S3 | | 4 | S4 Pokemon navigation: story checkpoints as events | #79 | 🟢 #114 S4 | | 5–9 | F1–F5 FRLG overworld navigation | #67 | ⬜ | | 10+ | B1–B5 BDSP AutoStory MVP | #68 and the lab branch | ⬜ blocked on upstream #1717 | -Already upstream from this work: #1798 (AGENTS.md docs-site note), #1791, #1754 (BBQ). That is -three open; the shared queue starts when one of them merges or is closed. +Already upstream from this work: #1810 (S1), #1798 (AGENTS.md docs-site note), #1791 all merged; +#1754 (BBQ) still open. One slot is free for the shared queue (S2 next), the user publishes. Lab branches (no PRs): `lab/main` = main + #107; `lab/bdsp` = bdsp/event-sandgem-center + #115 + lab/main; `lab/frlg` = frlg/brock-mvp + lab/main. Rebuilt on the collectors when they exist. From fe1066f71e7ef4c03547a1937292223bf844ff99 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 00:04:56 -0700 Subject: [PATCH 06/27] autostory PR tree: frlg/mvp is fork #117 Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PROGRESS.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autostory/PR_PROGRESS.md b/autostory/PR_PROGRESS.md index 8945ab5957..c8c75dcc03 100644 --- a/autostory/PR_PROGRESS.md +++ b/autostory/PR_PROGRESS.md @@ -14,7 +14,9 @@ base/upstream-main │ S3 c246d3d56 ScreenMachine (#108, +333) · S4 f3a8943a3 story events (#79, +1204) │ std::format pass applied inside S2/S4 (9 sites). Sources to close once accepted: │ #72 (87071ad59) · #66 nav/core (dc9f1682f) · #108 (6c8c83473) · #79 (70e10070c) -├── 🛠 frlg/mvp collector 3 (on nav/shared) ............. F0–F6 being cut from 🟢 #67 frlg/brock-mvp +├── 🟢 frlg/mvp collector 3 = fork #117 (on nav/shared) .. 6 commits, CI green; F0 dropped (BagDetector fix is +│ upstream #1771); order F1 maps generator, F2 maps as data, F3 route planning, F4 LegWalker (shared, +│ Pokemon/Navigation), F6 facing reader, F5 overworld walk. 19 to_string → std::format. Source to close: #67 └── ⬜ base/bdsp-1717 → ⬜ bdsp/mvp collector 2 ........ sources #68, #109 and the lab branch bdsp/event-sandgem-center: ✅ #115 ci-fixes and ✅ #110 plan cap merged; 🟡 #111 decomp grids (merging the base in); 🟡 #112 00.01–00.03 lines waits for #111 @@ -22,7 +24,7 @@ base/upstream-main Open fork PRs that stay as they are: #107 lab tooling (channel work landing), #103 lab/main, #81, #62, #61, #86, #100, #78, #56, #85. To close as superseded once each collector is accepted: #72 #66 #108 #79 → #114; -#67 → frlg/mvp; #68 #109 #110 #111 → bdsp/mvp. +#67 → #117; #68 #109 #110 #111 → bdsp/mvp; #116 → reworked in place (Lab run records). ``` ## Upstream queue (publish in this order; two open at a time) @@ -33,7 +35,7 @@ To close as superseded once each collector is accepted: #72 #66 #108 #79 → #11 | 2 | S2 Pokemon navigation: grid types and leg planner | #66 | 🟢 #114 S2 | | 3 | S3 ScreenMachine + StepTrace | #108 | 🟢 #114 S3 | | 4 | S4 Pokemon navigation: story checkpoints as events | #79 | 🟢 #114 S4 | -| 5–9 | F1–F5 FRLG overworld navigation | #67 | ⬜ | +| 5–10 | F1–F4, F6, F5 FRLG overworld navigation | #67 | 🟢 #117 | | 10+ | B1–B5 BDSP AutoStory MVP | #68 and the lab branch | ⬜ blocked on upstream #1717 | Already upstream from this work: #1810 (S1), #1798 (AGENTS.md docs-site note), #1791 all merged; From 4d0d863b9715560cc15732207faa74086192c689 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 00:46:34 -0700 Subject: [PATCH 07/27] =?UTF-8?q?autostory=20PR=20plan:=20F1=E2=80=93F6=20?= =?UTF-8?q?as=20on=20#117,=20the=20console-fix=20branch,=20B1=E2=80=93B5?= =?UTF-8?q?=20as=20the=20bdsp/mvp=20kit=20builds=20them?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 48 +++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index a9f2c31f2b..218c2bd954 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -45,19 +45,35 @@ base/upstream-main (copy of upstream main; refreshed to b3673f2a9 on 2026-11-01) │ S3 ScreenMachine + StepTrace (#108, +333, 5 files) │ S4 Pokemon navigation: story checkpoints as events (#79, ~+1200, 6 files; its │ MoveOnlyFunction is upstream now) -├── frlg/mvp (on nav/shared) ... collector 3, supersedes #67 (22 files, +3302) -│ F1 devtools: generate FRLG overworld maps as JSON; the JSON maps (pokefirered) -│ F2 FRLG: OverworldMap, Tile/Grid, named points and flag sets -│ F3 FRLG: route planning on the shared leg planner (route costs, steps) -│ F4 FRLG: LegWalker + overworld walk (D-pad legs, battle flash watcher) -│ F5 FRLG: player facing reader (standing sprites from the sheet) -└── base/bdsp-1717 = base/upstream-main + upstream #1717 head + nav/shared - └── bdsp/mvp ............ collector 2, supersedes #68 #109 #110 #111 (and the - B1 Pokemon navigation: TileGrid + MapSet lab branch bdsp/event-sandgem-center) - B2 BDSP AutoStory: walker (Walk, RouteWalk, waypoints, blocked taps) - B3 BDSP AutoStory: map data from the Diamond decomp (35 files) + MAPS.md - B4 BDSP AutoStory: segments 00/01, Sandgem Center events, route records - B5 BDSP AutoStory: tests (plans, records, detectors) +├── frlg/mvp = fork #117 (on nav/shared) ... collector 3, supersedes #67; 6 commits, +3304, CI green +│ F0 BagDetector fix: dropped, already upstream (#1771) +│ F1 cc3450b8a devtools: generate FRLG overworld maps as JSON from pokefirered (+203) +│ F2 e770e3fa7 FRLG: overworld maps as plain data (tiles, grid, named points, flags) (+978) +│ F3 d0bb032e7 FRLG: plan overworld routes with the shared leg planner (+835) +│ F4 b734805ce Pokemon navigation: leg walker with game-supplied movers/interrupts (+465) +│ F5 6952e6c5a FRLG: read which way the standing player faces (+314) +│ F6 ab9a22e0b FRLG: walk overworld routes with the leg walker (+ BattleFlashWatcher) (+509) +│ (facing reader before the walk: the walk includes it. 19 to_string → std::format) +│ └── frlg/walk-wild-legs (on frlg/mvp) ... fixes from the console B MVP run, to collect +│ 43ac578a0 watch for wild battles only on steps where one can start (grass/water) +│ f11a56672 never plan a hold into a sign moving north or south (maps get 'S' signs) +└── base/bdsp-1717 = base/upstream-main + upstream #1717 head 381c055ac + nav/shared + └── bdsp/mvp ............ collector 2, supersedes #68 #109 #110 #111 #112 and the lab + branch bdsp/event-sandgem-center; kit ready, waits for #111/#112 to merge (phase 3) + B1 Pokemon navigation: TileGrid + MapSet (+859; from the lab branch, ~700 lines + newer than #109; MapSet written LF; no tests here, they use BDSP data → B5) + B2 BDSP AutoStory: walker (Walk, RouteWalk + costs, Location banner, PokemonCenter, + NameListDetector, Menu/SelectionArrow tweaks) (+2,289) + B3 BDSP AutoStory: map data from the Diamond decomp (StoryMaps, RouteRecords, 15 maps, + MAPS.md) (+2,893) + B4 BDSP AutoStory: segments 00/01, Sandgem Center events, NewGame (+ SystemKeyboard- + Detector), AutoStory/Tools merged with Butters' newer #1717 head (~+9k/−6.5k): + our Segment 01 (Jubilife→Floaroma) replaces his 01 (user, 2026-11-01); his + PP budget kept; GCC fixes; DIAGNOSTIC options kept for run 3 + B5 BDSP AutoStory: tests (18: TileGrid parse/wall/plans, records, events, screenshots + skip when absent) (+2,088) + Rehearsal on the current tip: 5 commits, 71 files, +15,386/−4,189; Windows clang + builds and passes our tests; the only failures are #1717's two screenshot tests (Command File Runner and lab control stay in #107) ``` @@ -68,7 +84,8 @@ a finer split than B1–B5 once rebuilt; decide after the shared and FRLG collec ## Order of work 1. `nav/shared`: refresh the base, apply S1–S4, fork CI on three platforms, draft PR. Show. -2. `frlg/mvp`: from #67's 20 commits, regrouped as F1–F5, on `nav/shared`. Show. +2. ✅ `frlg/mvp` = fork #117: from #67, regrouped as F1–F6 on `nav/shared`. Console fixes go on + branches off it (`frlg/walk-wild-legs`) and are collected later. 3. `bdsp/mvp`: after fork #110 and #111 merge into `bdsp/event-sandgem-center` and its three pre-existing CI failures are fixed (`std::lround` without `` in `PokemonBDSP_AutoStory_Tests.cpp`, `int-in-bool-context` in `PokemonBDSP_AutoStoryTools.cpp`, @@ -93,5 +110,8 @@ a finer split than B1–B5 once rebuilt; decide after the shared and FRLG collec rebuilt from the lab branch, not from #109. - Upstream #1717 is Butters' open PR. B1–B5 cannot go upstream before it merges; the alternative is PRs against Butters' branch. Decide with the user when the BDSP collector exists. +- Butters notes for the BDSP collector (in its PR body): Segment 01 clash, his 0006, program + options not adopted, PP budget kept, save-prompt check, two GCC errors, two screenshot tests. + Pre-upstream: strip DIAGNOSTIC options, #1717 merges first, close #62. - Not part of the MVPs, stay separate: #81 naming screen, #62 system keyboard, #61 party check, #86 bag detector tests, #107 lab tooling, #103 lab/main, #100/#78/#56 design notes, #85 notes. From 369c158cf996181f2bf2e5083c98b2dd61edaa4a Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 01:05:57 -0700 Subject: [PATCH 08/27] PR plan: #118 walk-wild-legs opened Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index 218c2bd954..627f34461b 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -54,7 +54,7 @@ base/upstream-main (copy of upstream main; refreshed to b3673f2a9 on 2026-11-01) │ F5 6952e6c5a FRLG: read which way the standing player faces (+314) │ F6 ab9a22e0b FRLG: walk overworld routes with the leg walker (+ BattleFlashWatcher) (+509) │ (facing reader before the walk: the walk includes it. 19 to_string → std::format) -│ └── frlg/walk-wild-legs (on frlg/mvp) ... fixes from the console B MVP run, to collect +│ └── #118 frlg/walk-wild-legs (on frlg/mvp; wild legs 43ac578a0, signs f11a56672; CI green) ... fixes from the console B MVP run, to collect │ 43ac578a0 watch for wild battles only on steps where one can start (grass/water) │ f11a56672 never plan a hold into a sign moving north or south (maps get 'S' signs) └── base/bdsp-1717 = base/upstream-main + upstream #1717 head 381c055ac + nav/shared From 548a9b934c71aecff65a1adc61ec5151c47aa35a Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 01:06:24 -0800 Subject: [PATCH 09/27] PR plan: #119 and the FRLG AutoStory program branch Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index 627f34461b..f783a5b337 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -55,6 +55,8 @@ base/upstream-main (copy of upstream main; refreshed to b3673f2a9 on 2026-11-01) │ F6 ab9a22e0b FRLG: walk overworld routes with the leg walker (+ BattleFlashWatcher) (+509) │ (facing reader before the walk: the walk includes it. 19 to_string → std::format) │ └── #118 frlg/walk-wild-legs (on frlg/mvp; wild legs 43ac578a0, signs f11a56672; CI green) ... fixes from the console B MVP run, to collect +│ └── #119 frlg/walk-interrupt-recount (on #118): open wild legs a tile at a time (90ac25d3d); follow-ups: ledge stops, overworld check, warp fade vs battle, trainer battles +│ └── frlg/autostory-mvp (on #119, in progress): PokemonFRLG AutoStory program, 00.01–00.08 new game → Brock, from the by-hand run notes │ 43ac578a0 watch for wild battles only on steps where one can start (grass/water) │ f11a56672 never plan a hold into a sign moving north or south (maps get 'S' signs) └── base/bdsp-1717 = base/upstream-main + upstream #1717 head 381c055ac + nav/shared From 5385cfdfd659d8c4eb7b86cf114dfe68207d0243 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 09:13:02 -0800 Subject: [PATCH 10/27] PR plan: restack so each file changes only in the PR that added it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit LegPlanner's wild-step weighting moved from #119 to #114 (7008f8c67) and merged down #117 → #118 → #119 → #120; #120's diff is PokemonFRLG only. Adds #119, #120, #121 to the tree and a file-ownership table. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 95 ++++++++++++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 34 deletions(-) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index f783a5b337..6d25eb819f 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -38,47 +38,74 @@ they would go upstream. ``` base/upstream-main (copy of upstream main; refreshed to b3673f2a9 on 2026-11-01) -├── nav/shared ............ collector 1, supersedes #72 #66 #108 #79 +├── nav/shared = fork #114 (7008f8c67) ... collector 1, supersedes #72 #66 #108 #79 │ S1 Common: MoveOnlyFunction ✅ merged upstream as #1810 (2026-11-01); nav/shared │ merges the base back in, so S1 drops out of the diff │ S2 Pokemon navigation: grid types + leg planner (#66, +733, 7 files) │ S3 ScreenMachine + StepTrace (#108, +333, 5 files) -│ S4 Pokemon navigation: story checkpoints as events (#79, ~+1200, 6 files; its -│ MoveOnlyFunction is upstream now) -├── frlg/mvp = fork #117 (on nav/shared) ... collector 3, supersedes #67; 6 commits, +3304, CI green -│ F0 BagDetector fix: dropped, already upstream (#1771) -│ F1 cc3450b8a devtools: generate FRLG overworld maps as JSON from pokefirered (+203) -│ F2 e770e3fa7 FRLG: overworld maps as plain data (tiles, grid, named points, flags) (+978) -│ F3 d0bb032e7 FRLG: plan overworld routes with the shared leg planner (+835) -│ F4 b734805ce Pokemon navigation: leg walker with game-supplied movers/interrupts (+465) -│ F5 6952e6c5a FRLG: read which way the standing player faces (+314) -│ F6 ab9a22e0b FRLG: walk overworld routes with the leg walker (+ BattleFlashWatcher) (+509) -│ (facing reader before the walk: the walk includes it. 19 to_string → std::format) -│ └── #118 frlg/walk-wild-legs (on frlg/mvp; wild legs 43ac578a0, signs f11a56672; CI green) ... fixes from the console B MVP run, to collect -│ └── #119 frlg/walk-interrupt-recount (on #118): open wild legs a tile at a time (90ac25d3d); follow-ups: ledge stops, overworld check, warp fade vs battle, trainer battles -│ └── frlg/autostory-mvp (on #119, in progress): PokemonFRLG AutoStory program, 00.01–00.08 new game → Brock, from the by-hand run notes -│ 43ac578a0 watch for wild battles only on steps where one can start (grass/water) -│ f11a56672 never plan a hold into a sign moving north or south (maps get 'S' signs) +│ S4 Pokemon navigation: story checkpoints as events (#79, ~+1200, 6 files) +│ + story events take a game-defined position, a segment is a table of event +│ checkpoints, one JSON map schema and loader for both games (MapData, +│ StorySegments, TilePose) +│ S5 7008f8c67 Pokemon navigation: weigh open stops after a wild step (Step::wild, +│ Leg::wild, LegCosts::per_open_wild_stop, default 0; 4 toy-grid tests). Moved +│ from #119 (b4d1976a3) on 2026-11-01 +│ +│ ├── frlg/mvp = fork #117 (20291b6c8, merges nav/shared 7008f8c67) ... collector 3, +│ │ supersedes #67; F1–F6 as before, +3304 over nav/shared, 21 files +│ │ F0 BagDetector fix: dropped, already upstream (#1771) +│ │ F1 cc3450b8a devtools: generate FRLG overworld maps as JSON from pokefirered (+203) +│ │ F2 e770e3fa7 FRLG: overworld maps as plain data (tiles, grid, named points, flags) (+978) +│ │ F3 d0bb032e7 FRLG: plan overworld routes with the shared leg planner (+835) +│ │ F4 b734805ce Pokemon navigation: leg walker with game-supplied movers/interrupts (+465) +│ │ F5 6952e6c5a FRLG: read which way the standing player faces (+314) +│ │ F6 ab9a22e0b FRLG: walk overworld routes with the leg walker (+ BattleFlashWatcher) (+509) +│ │ └── #118 frlg/walk-wild-legs (d1afca983) ... wild legs 43ac578a0, signs f11a56672; +│ │ 7 FRLG Overworld files + frlg_maps.py, +139/−23 +│ │ └── #119 frlg/walk-interrupt-recount (08829d226) ... walker fixes from the Viridian +│ │ runs: open wild legs a tile at a time, ledge stops, overworld check, warp fade +│ │ vs battle, trainer battles, re-anchoring after a stopped leg. 12 files, +│ │ +1322/−78: FRLG Overworld + LegWalker (see "Who owns which file") +│ │ └── #120 frlg/autostory-mvp ... PokemonFRLG AutoStory, 00.01–00.08 new game → +│ │ Brock. Diff is PokemonFRLG only (19 files, AutoStory + BattleScreenDetector, +│ │ NamingScreenDetector, Panels, Tests, OverworldWalk 5 lines, cmake) +│ └── base/bdsp-1717 = base/upstream-main + upstream #1717 head 381c055ac + nav/shared - └── bdsp/mvp ............ collector 2, supersedes #68 #109 #110 #111 #112 and the lab - branch bdsp/event-sandgem-center; kit ready, waits for #111/#112 to merge (phase 3) - B1 Pokemon navigation: TileGrid + MapSet (+859; from the lab branch, ~700 lines - newer than #109; MapSet written LF; no tests here, they use BDSP data → B5) - B2 BDSP AutoStory: walker (Walk, RouteWalk + costs, Location banner, PokemonCenter, - NameListDetector, Menu/SelectionArrow tweaks) (+2,289) - B3 BDSP AutoStory: map data from the Diamond decomp (StoryMaps, RouteRecords, 15 maps, - MAPS.md) (+2,893) - B4 BDSP AutoStory: segments 00/01, Sandgem Center events, NewGame (+ SystemKeyboard- - Detector), AutoStory/Tools merged with Butters' newer #1717 head (~+9k/−6.5k): - our Segment 01 (Jubilife→Floaroma) replaces his 01 (user, 2026-11-01); his - PP budget kept; GCC fixes; DIAGNOSTIC options kept for run 3 - B5 BDSP AutoStory: tests (18: TileGrid parse/wall/plans, records, events, screenshots - skip when absent) (+2,088) - Rehearsal on the current tip: 5 commits, 71 files, +15,386/−4,189; Windows clang - builds and passes our tests; the only failures are #1717's two screenshot tests - (Command File Runner and lab control stay in #107) + └── bdsp/event-sandgem-center (lab line) ── #111 bdsp/maps-rederive + └── #121 bdsp/mvp-v3 (50edfb0e9) ... segments 00 and 01 as event tables, maps as + JSON; merges nav/shared at 5e3150565, #111 and #112. Its own 14 commits + change only PokemonBDSP files, SourceFiles.cmake and the new + devtools/maps/bdsp_maps.py. The shared files in its diff against #111 + (LegPlanner.h, Grid, StoryEvents, MapData, StorySegments, TilePose, the + removed old LegWalker copy, base/upstream-main's dpp/sockets/FRLG box) are + nav/shared's versions arriving through that merge: they leave #121's diff + once #111 has nav/shared. Not restructured yet; needs nav/shared 7008f8c67 + merged in (compiles: TileGrid.cpp and the BDSP planner tests checked with + -fsyntax-only) + └── bdsp/mvp collector (B1–B5), kit as before, waits for #111/#112 ``` +### Who owns which file (user, 2026-11-01) + +A file is changed only in the PR that added it, so a child PR shows only its own files. +Changes a child needs in a parent's file go to the parent as new commits, with tests there, +and are merged back down (merges only; no rebase, no force-push). + +| Files | Owner | +| --- | --- | +| Pokemon/Navigation: Grid, LegPlanner, MapData, StoryEvents, StorySegments, TilePose, Navigation_Tests.h; CommonTools/ScreenMachine | #114 nav/shared | +| Pokemon/Navigation: LegWalker (+ tests) | #117 frlg/mvp (added in F4; only FRLG uses it) | +| Pokemon/Navigation: TileGrid, MapSet | BDSP line (#109 → bdsp collector B1) | +| PokemonFRLG Overworld, BattleFlashWatcher, frlg_maps.py | #117, changed by #118/#119 as walker fixes | +| PokemonFRLG Programs/AutoStory, BattleScreenDetector, NamingScreenDetector | #120 | + +Open: #119 still changes LegWalker.{h,cpp,_Tests.cpp} (+390, all game-agnostic: tile-at-a-time +open legs, stop_on_interrupt, stop_if_blocked, settle, warps). Under the rule they go to +#117 (or to #114 if LegWalker moves there; proposal in the 2026-11-01 restack report: +keep it in #117 until BDSP adopts it, as with TileGrid/MapSet). #120's 5-line OverworldWalk +change (BattleDialogWatcher → BattleScreenWatcher) uses #120's new detector; it moves with +the detector if that goes down to #119. + Sizes from 2026-11-01. BDSP's delta over #1717's current head (381c055ac): AutoStory +23.6k/−11.2k (StorySegments 20 files, Utils 12, Data 35 files +2.7k, Tests +2k). It will need a finer split than B1–B5 once rebuilt; decide after the shared and FRLG collectors land. From 0cf3a9a5e945e815174b47d876b78ee02639c1db Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 09:34:20 -0800 Subject: [PATCH 11/27] PR plan: where the AutoStory maps live (Packages, and generated test data per game) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index 6d25eb819f..9fdae23fba 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -123,6 +123,27 @@ a finer split than B1–B5 once rebuilt; decide after the shared and FRLG collec `base/bdsp-1717`. Show. 4. The user closes the superseded PRs and publishes upstream from the queue in PR_PROGRESS.md. +## Where the maps live (2026-11-01) + +- **Program data: Packages.** `Resources/PokemonFRLG/Maps/*.json` (25) and + `Resources/PokemonBDSP/Maps/*.json` (16), each folder with a README (generated, how to + regenerate, schema). No fork of Packages exists, so the branch `autostory/maps` (3e5c46f) + is local, in a worktree of `~/Projects/Arduino-Source/Packages`; the user opens the + upstream PokemonAutomation/Packages PR. Plain `Resources/` files are not versioned + (`ResourceDownloadList.json` and `version.json` cover only the downloaded zips), so no + version bump is needed; the release takes Packages master when it is built, so the maps + must be on Packages master before the program PRs that load them ship. The BDSP files + are refreshed from the BDSP agent's final files after the C++-table → JSON migration. +- **Test data: one generated C++ file per game, in the code PR.** CI has no Packages maps. + Each generator writes the same JSON text, byte for byte, into a C++ file of raw string + literals (`--cpp `) and checks it against a fresh generation (`--cpp --check`). + FRLG: `frlg_maps.py --cpp` is in #117 (b2e6af2de); the file + `Overworld/PokemonFRLG_OverworldMapsTestData.{cpp,h}` (`test_overworld_maps()`) is in #118, + the first PR whose generator writes sign tiles, so it is added and regenerated only there. + #117's own route tests stay skipped in CI until the #118 → #117 fold is decided; #118's, + #119's and #120's map tests run in CI. BDSP: the same mechanism in `bdsp_maps.py`, + placed by the BDSP agent. + ## Decisions (user, 2026-11-01) - #72 MoveOnlyFunction stays and is the shared collector's first commit (#79 keeps using it). From 88e12feafd557ffc74daaf0bb252dfed64221cb6 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 09:42:59 -0800 Subject: [PATCH 12/27] PR plan: map test data as .json files built in by CMake Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index 9fdae23fba..36be3d09bf 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -134,15 +134,24 @@ a finer split than B1–B5 once rebuilt; decide after the shared and FRLG collec version bump is needed; the release takes Packages master when it is built, so the maps must be on Packages master before the program PRs that load them ship. The BDSP files are refreshed from the BDSP agent's final files after the C++-table → JSON migration. -- **Test data: one generated C++ file per game, in the code PR.** CI has no Packages maps. - Each generator writes the same JSON text, byte for byte, into a C++ file of raw string - literals (`--cpp `) and checks it against a fresh generation (`--cpp --check`). - FRLG: `frlg_maps.py --cpp` is in #117 (b2e6af2de); the file - `Overworld/PokemonFRLG_OverworldMapsTestData.{cpp,h}` (`test_overworld_maps()`) is in #118, - the first PR whose generator writes sign tiles, so it is added and regenerated only there. - #117's own route tests stay skipped in CI until the #118 → #117 fold is decided; #118's, - #119's and #120's map tests run in CI. BDSP: the same mechanism in `bdsp_maps.py`, - placed by the BDSP agent. +- **Test data: the same .json files in the repo, built in by CMake** (user, 2026-11-01: + "why don't we do actual json files?"). `SerialPrograms/cmake/EmbedTextFiles.cmake` + (`pa_embed_text_files()`, in #114 nav/shared b426f749f, with a self-test on + `Pokemon/Navigation/TestMaps/`) writes a C++ file into the build folder that returns each + `/*.json`'s name and text, split into literals of at most 16000 bytes for MSVC; + nothing generated is committed. Each game calls it once in `SerialPrograms/CMakeLists.txt`. + The generator's `--out --check` compares the committed files with a fresh + generation. + - FRLG: `--check` in #117 (a31833dd4). `Overworld/Maps/*.json` (25), the CMake call and + `PokemonFRLG_OverworldTestMaps.{h,cpp}` (`overworld_map_json()`, `test_overworld_maps()`) + in #118 (910c460df, 6fb5b39e8), the first PR whose generator writes sign tiles. #117's + own route tests stay skipped in CI until the #118 → #117 fold is decided; #118's, #119's + and #120's map tests run in CI. + - BDSP: the same helper, through BDSP's nav/shared merge; folder and placement by the + BDSP agent. + - Once the Packages PR lands, CI (which checks out Packages) has the runtime maps too. + Then the repo copy should be the single source: the Packages files are copied from it + (or generated by the same script and checked equal), never edited on their own. ## Decisions (user, 2026-11-01) From e0fc142883f860b77266684ebbeb332f18aa7ab1 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 09:45:04 -0800 Subject: [PATCH 13/27] PR plan: maps stay in the repo, built in; Packages later Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PLAN.md | 52 +++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index 36be3d09bf..c4a07da07b 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -125,33 +125,31 @@ a finer split than B1–B5 once rebuilt; decide after the shared and FRLG collec ## Where the maps live (2026-11-01) -- **Program data: Packages.** `Resources/PokemonFRLG/Maps/*.json` (25) and - `Resources/PokemonBDSP/Maps/*.json` (16), each folder with a README (generated, how to - regenerate, schema). No fork of Packages exists, so the branch `autostory/maps` (3e5c46f) - is local, in a worktree of `~/Projects/Arduino-Source/Packages`; the user opens the - upstream PokemonAutomation/Packages PR. Plain `Resources/` files are not versioned - (`ResourceDownloadList.json` and `version.json` cover only the downloaded zips), so no - version bump is needed; the release takes Packages master when it is built, so the maps - must be on Packages master before the program PRs that load them ship. The BDSP files - are refreshed from the BDSP agent's final files after the C++-table → JSON migration. -- **Test data: the same .json files in the repo, built in by CMake** (user, 2026-11-01: - "why don't we do actual json files?"). `SerialPrograms/cmake/EmbedTextFiles.cmake` - (`pa_embed_text_files()`, in #114 nav/shared b426f749f, with a self-test on - `Pokemon/Navigation/TestMaps/`) writes a C++ file into the build folder that returns each - `/*.json`'s name and text, split into literals of at most 16000 bytes for MSVC; - nothing generated is committed. Each game calls it once in `SerialPrograms/CMakeLists.txt`. - The generator's `--out --check` compares the committed files with a fresh - generation. - - FRLG: `--check` in #117 (a31833dd4). `Overworld/Maps/*.json` (25), the CMake call and - `PokemonFRLG_OverworldTestMaps.{h,cpp}` (`overworld_map_json()`, `test_overworld_maps()`) - in #118 (910c460df, 6fb5b39e8), the first PR whose generator writes sign tiles. #117's - own route tests stay skipped in CI until the #118 → #117 fold is decided; #118's, #119's - and #120's map tests run in CI. - - BDSP: the same helper, through BDSP's nav/shared merge; folder and placement by the - BDSP agent. - - Once the Packages PR lands, CI (which checks out Packages) has the runtime maps too. - Then the repo copy should be the single source: the Packages files are copied from it - (or generated by the same script and checked equal), never edited on their own. +User, 2026-11-01: "keep maps as local files now and add TODOs to move them to Packages when +ready", and "why don't we do actual json files?". + +- **In the repo, as .json files, built into the program.** The program and its tests read + one copy; a deploy needs no map files. + - `SerialPrograms/cmake/EmbedTextFiles.cmake` (`pa_embed_text_files()`, #114 nav/shared + b426f749f, self-test on `Pokemon/Navigation/TestMaps/`) writes a C++ file into the build + folder returning each `/*.json`'s name and text, split into literals of at most + 16000 bytes for MSVC; nothing generated is committed. Each game calls it once in + `SerialPrograms/CMakeLists.txt`. + - The generator writes the folder and checks it: `--out [--check]`. + - FRLG: `--check` in #117 (a31833dd4). `Overworld/Maps/*.json` (25) and the CMake call in + #118 (910c460df); `overworld_maps()` reads `overworld_map_json()` in #118 (42d7e0aca), + the first PR whose generator writes sign tiles. #117 still loads from Packages, so its + route tests stay skipped in CI until the #118 → #117 fold is decided. + - BDSP: the same helper through BDSP's nav/shared merge; folder and placement by the BDSP + agent. +- **Packages later.** TODOs at `overworld_map_json()` and in `frlg_maps.py`. A local, + unpushed Packages branch `autostory/maps` (worktree + `/Users/difan/.claude/jobs/bea871c7/tmp/wt-maps-packages`, 25 FRLG + 16 BDSP maps with + READMEs) is kept for that move. Plain `Resources/` files are not versioned + (`ResourceDownloadList.json`/`version.json` cover only the downloaded zips), so no version + bump. When the maps move, the repo copy should stay the single source the Packages files + are copied from (`--check` both), or the repo copy goes and the tests read Packages, which + CI checks out. ## Decisions (user, 2026-11-01) From 1e6b67ed7e86c71de04bb3dd15c59841f63c0375 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 12:09:09 -0800 Subject: [PATCH 14/27] AutoStory: demo PR plan after the FRLG proof of concept Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/DEMO_PLAN.md | 107 +++++++++++++++++++++++++++++++++++++++++ autostory/PR_PLAN.md | 2 + 2 files changed, 109 insertions(+) create mode 100644 autostory/DEMO_PLAN.md diff --git a/autostory/DEMO_PLAN.md b/autostory/DEMO_PLAN.md new file mode 100644 index 0000000000..69b958662b --- /dev/null +++ b/autostory/DEMO_PLAN.md @@ -0,0 +1,107 @@ +# AutoStory: from proof of concept to demo PRs + +Written 2026-11-01 13:00. The user paused console work after FRLG's proof of concept: "next step +is to have demo PRs in good shape and have a full fledged plan". [PR_PLAN.md](PR_PLAN.md) has +the older collector plan and the file-ownership rules; this file replaces its tree and order of +work. + +## Where we are + +- **FRLG proof of concept.** New game to the Boulder Badge on console B, in pieces: + - 00.01–00.06 in the morning run; + - 00.07, 00.08 and 00.09 on 2026-11-01 between 11:15 and 12:05. + - Brock was beaten in 4 turns with HP green and no Potions used. + - It is not yet 3/3 from a new game in one run. +- **BDSP.** New game to Floaroma passed on the v3 line earlier, with #1717 underneath. It is + being rebuilt without #1717 as #127 and #128. +- **Known walker bug, FRLG.** A wild battle in the middle of a leg can leave the player a tile + off the leg's line. "Walking to the wall again" then stops at the wrong wall, and nothing + notices. This failed the forest gate 4 times. + - On the passing run, the battles happened on the line, so nothing went wrong. + - A wall-ending leg never checks how far it walked. +- **Story simulations pass on both games** but don't model the walker; see "Walker simulator". + +## Target shape: three stacks on one shared core + +``` +base/upstream-main +└─ #114 nav/shared Pokemon navigation core: grid, leg planner, LegWalker (moving in from #117/#119), + │ shared route log, MapData/JSON maps, story events, ScreenMachine + ├─ #122 nav/story-steps shared story steps, retry policy, run options (Checks, language) + ├─ FRLG: #117 maps + planner → #118 walk interrupts → #119 recovery → #120 AutoStory to Brock + │ (#123 folds into #120: the table is written on the shared steps from the start) + └─ BDSP: #127 nav-v4 (maps, grids, StoryMaps, walker with injected battle handling) + → #128 autostory-v4 (program, segment 00/01 table on the shared steps, simulation) +tooling (separate): #107 lab tooling → #116 run records; #125 route pictures (devtools/maps) +``` + +Superseded once the new ones are in shape; the user closes them, with branches kept: +- BDSP: #111, #112, #121, #124, #68, #109, #54 (the #1717 mirror). +- FRLG: #67. + +## What "good shape" means for each PR + +1. **Only its own files.** `git diff parent...child --stat` shows nothing from a parent. Shared + code lives in #114 or #122. +2. **Reviewable size.** One concern per PR, about 400 changed lines excluding map data and tests. + Data tables are initializer lists. `std::format` for messages. +3. **Tests.** + - Unit tests for the new code. + - The story simulation for the program PRs. + - The walker simulator for the nav PRs, once it exists. + - Fork CI green on Mac, Windows clang and Ubuntu. +4. **Description.** 2–5 sentences, "Depends on #N" at the top, and one sentence on what was + checked on the console. +5. **Console evidence.** The last console run that covers the PR, recorded in PR_PROGRESS.md. + +## Work, in order + +1. **Shared core settles (#114, #122).** In progress, agent: + - LegWalker and the shared route log move into #114 and merge down the FRLG stack. + - Decide: keep #122 separate or fold it into #114. Recommend separate: it is a different + concern and can go upstream after #114. +2. **Walker simulator (#114) and the walker fixes (#119).** + - A grid world from the JSON maps that tracks the player's real tile and facing. + - Holds move one tile per tile time; walls, NPCs and warps stop the player. + - Seeded wild encounters on grass, with a detection lag; trainer sight from pokefirered. + - Assertion: every story route, across many seeds, ends on its planned tile or fails loudly. + - Model it on the measured behaviour: the m28 run's before/after screenshots of every step, + `DebugDumps/AutoStory/legs`. + - Then fix #119 against the failing simulated cases: + - the drift after a battle; + - a wall leg that stops far short of its length fails with a screenshot. +3. **FRLG stack in shape (#117–#120).** + - Fold #123 into #120. + - #120 keeps the 00.07/00.08 split, the save-card check on load, the Checks level and + language-free reads. + - Review each PR against "good shape". Check that #117's route tests run in CI (maps are + built in from #118; decide whether to fold #118's maps into #117). +4. **BDSP stack in shape (#127, #128).** In progress, agent: + - The walker moves to #127 with battle handling injected. + - Recorded stick holds are replaced by planned walks where maps exist. + - The simulation runs 00.00 → Floaroma in English and in Japanese. +5. **Console verification, after 2–4.** One train at a time on console B: + - FRLG 3/3 new game → Brock in one run each. + - BDSP v4 new game → Floaroma, 3/3, first on the replaced 00.00–00.05 walks. + - Each run gets route pictures (#125) and a run record (#116). +6. **Tooling PRs.** + - #116: retitle it as run records, attach route pictures to failed runs. + - #125: render route pictures as CI artifacts from the offline route tests. Not goldens. +7. **Gameplay plan (design; the user decides the targets).** + - Trainer sight, facing and type in the map schema; the planner scores sight lines and grass. + - Level targets per checkpoint. FRLG Squirtle, from the 2015 speedrun guide: 6 after Route 1, + 8 after the forest, 10 for Liam, 11 for Brock. + - Sammy is the only planned forest trainer. +8. **Upstream handoff (the user publishes; at most two open upstream).** + - Order: #114's parts (grid and planner, ScreenMachine, story events and maps), then #122, + then FRLG #117 → #120, then BDSP #127 → #128, then the tooling. + - Each is folded to one commit per upstream PR when handed over. + +## Decisions needed from the user + +- Fold #123 into #120 (recommended), or keep it as its own PR. +- Keep #122 separate from #114 (recommended), or fold it in. +- Fold #118's built-in maps into #117 so #117's route tests run in CI. +- Close the superseded PRs listed above once #127/#128 and the FRLG stack are in shape. +- Level targets and the trainer list per checkpoint. +- When to resume console runs: after steps 2–4, as proposed. diff --git a/autostory/PR_PLAN.md b/autostory/PR_PLAN.md index c4a07da07b..e75a456d0b 100644 --- a/autostory/PR_PLAN.md +++ b/autostory/PR_PLAN.md @@ -1,5 +1,7 @@ # AutoStory work → upstream PRs: the three collectors +> **Superseded on 2026-11-01 13:00 by [DEMO_PLAN.md](DEMO_PLAN.md)** for the tree and order of work. The file-ownership rules and map notes below still hold. + Written 2026-11-01 (user decisions of that day are in "Decisions"). Live status is in [PR_PROGRESS.md](PR_PROGRESS.md). The BBQ equivalent is [../pokemon_sv/PR_PLAN.md](../pokemon_sv/PR_PLAN.md); the rules for where PRs live are in From e455b7cb8ff4c9ed43ca3f696dd87bc181ae5239 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 12:14:16 -0800 Subject: [PATCH 15/27] AutoStory plan: SPEEDRUN / DEFAULT / SAFE run modes Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/DEMO_PLAN.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autostory/DEMO_PLAN.md b/autostory/DEMO_PLAN.md index 69b958662b..36970ad546 100644 --- a/autostory/DEMO_PLAN.md +++ b/autostory/DEMO_PLAN.md @@ -92,6 +92,15 @@ Superseded once the new ones are in shape; the user closes them, with branches k - Level targets per checkpoint. FRLG Squirtle, from the 2015 speedrun guide: 6 after Route 1, 8 after the forest, 10 for Liam, 11 for Brock. - Sammy is the only planned forest trainer. + - **Run modes (user, 2026-11-01):** SPEEDRUN / DEFAULT / SAFE. Strategy only (which + battles to take, flee or fight wild Pokémon, heal threshold, what to buy and when); the Checks + level (Thorough/Fast, screen verification) stays a separate option. SPEEDRUN follows + pokeguy's LeafGreen 1:59:34 (`pokemon_sv/FRLG_POKEGUY_15934_VIDEO_NOTES.md` on agents): + no Viridian shopping, flee every forest wild battle, Sammy L7→8, Liam to L11, Brock at + L11 with no Potion (survives at 1 HP), Water Gun at L13, first shopping in Pewter. + DEFAULT is today's table. SAFE heals at a threshold and takes extra wild battles to reach + the level targets. Not built now; the table should name these choices so a mode can + switch them. 8. **Upstream handoff (the user publishes; at most two open upstream).** - Order: #114's parts (grid and planner, ScreenMachine, story events and maps), then #122, then FRLG #117 → #120, then BDSP #127 → #128, then the tooling. From a1cf7594b7a78d753f4f6a60cfa75506235d9252 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 12:29:55 -0800 Subject: [PATCH 16/27] AutoStory plan: linear shared stack #43-#45 -> #114 -> #122, BDSP maps PR Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/DEMO_PLAN.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/autostory/DEMO_PLAN.md b/autostory/DEMO_PLAN.md index 36970ad546..4f6dcc1cb6 100644 --- a/autostory/DEMO_PLAN.md +++ b/autostory/DEMO_PLAN.md @@ -21,23 +21,33 @@ work. - A wall-ending leg never checks how far it walked. - **Story simulations pass on both games** but don't model the walker; see "Walker simulator". -## Target shape: three stacks on one shared core +## Target shape (user approved 2026-11-01): one linear shared stack, then the games ``` -base/upstream-main -└─ #114 nav/shared Pokemon navigation core: grid, leg planner, LegWalker (moving in from #117/#119), - │ shared route log, MapData/JSON maps, story events, ScreenMachine - ├─ #122 nav/story-steps shared story steps, retry policy, run options (Checks, language) - ├─ FRLG: #117 maps + planner → #118 walk interrupts → #119 recovery → #120 AutoStory to Brock - │ (#123 folds into #120: the table is written on the shared steps from the start) - └─ BDSP: #127 nav-v4 (maps, grids, StoryMaps, walker with injected battle handling) - → #128 autostory-v4 (program, segment 00/01 table on the shared steps, simulation) -tooling (separate): #107 lab tooling → #116 run records; #125 route pictures (devtools/maps) +upstream main (= fork main) +├─ #43 AutoStory: shared start/end select databases (SV refactor) +│ └─ #44 AutoStory: shared story index +│ └─ #45 AutoStory: AutoStoryStats to Pokemon/AutoStory +│ └─ #114 Pokemon navigation core: grid, leg planner, LegWalker, route log, JSON maps, +│ │ story events, ScreenMachine; walker simulator +│ └─ #122 shared story steps, retry policy, run options (checkpoint dropdowns from +│ │ #43/#44, stats from #45, Checks, language) +│ ├─ FRLG: #117 maps + planner → #118 walker → #119 recovery +│ │ → #120 FRLG AutoStory MVP, new game → Brock (#123 folded in) +│ └─ BDSP: maps-v4 (JSON maps only) → #127 story maps, route records +│ → #129 walker → [#128 split: actions, battle, inference] +│ → #128 BDSP AutoStory MVP, new game → Floaroma (table like FRLG's) +├─ #107 lab tooling → #116 run records +├─ #125 route pictures (devtools/maps) +└─ docs: #100 design → #130 FRLG events after Brock; #113 notes (this plan) ``` -Superseded once the new ones are in shape; the user closes them, with branches kept: +Superseded; the user closes them, with branches kept: - BDSP: #111, #112, #121, #124, #68, #109, #54 (the #1717 mirror). -- FRLG: #67. +- FRLG: #67, #123 (folded into #120). +- Docs: #126 (moved to #130). + +Upstream order: #43, #44, #45 (small SV refactors, a good first handoff), #114's parts, #122, FRLG, BDSP, then tooling. ## What "good shape" means for each PR From 83e3dbed71e84f9b320fc43b8f4240117fac3a84 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 13:05:33 -0800 Subject: [PATCH 17/27] AutoStory: FRLG code size by PR and estimates for the rest Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/DEMO_PLAN.md | 2 + autostory/FRLG_SIZING.md | 87 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 autostory/FRLG_SIZING.md diff --git a/autostory/DEMO_PLAN.md b/autostory/DEMO_PLAN.md index 4f6dcc1cb6..05adb0d304 100644 --- a/autostory/DEMO_PLAN.md +++ b/autostory/DEMO_PLAN.md @@ -5,6 +5,8 @@ is to have demo PRs in good shape and have a full fledged plan". [PR_PLAN.md](PR the older collector plan and the file-ownership rules; this file replaces its tree and order of work. +Sizes per PR, and estimates for what remains: [FRLG_SIZING.md](FRLG_SIZING.md). + ## Where we are - **FRLG proof of concept.** New game to the Boulder Badge on console B, in pieces: diff --git a/autostory/FRLG_SIZING.md b/autostory/FRLG_SIZING.md new file mode 100644 index 0000000000..5465766dd7 --- /dev/null +++ b/autostory/FRLG_SIZING.md @@ -0,0 +1,87 @@ +# FRLG AutoStory: code size by PR, and what remains + +Measured on 2026-11-01 at about 13:10, as `git diff --numstat parent...child` on the fork branches. +"Code" excludes tests, map data (JSON), docs and cmake. The FRLG chain is being restacked, so these +shapes are close to final, not final. The plan and PR tree are in [DEMO_PLAN.md](DEMO_PLAN.md). + +## 1. Prep work (small refactors before the shared core) + +| PR | What | Code | Tests | +|---|---|---|---| +| #43 | Shared start/end checkpoint dropdowns (SV refactor) | 56 | 0 | +| #44 | Shared story index | 33 | 99 | +| #45 | AutoStoryStats moved to Pokemon/AutoStory | 38 | 0 | +| **Total** | Ready to send upstream first | **127** | **99** | + +Outside the chain but related: #86 FRLG bag detector tests, and #61 FRLG party check (240 code, +263 tests), which belongs with the RNG work. + +## 2. Shared navigation and map infrastructure (#114) + +| Part | Code | Tests | +|---|---|---| +| Grid, route planner, LegWalker, MapData/JSON maps, route log, tile poses, map embedding | 1,813 | 1,010 | +| ScreenMachine / StepTrace | 329 | 0 | +| **#114 navigation part** | **~2,140** | **~1,010** (+151 lines of test maps) | + +## 3. Shared AutoStory infrastructure + +| PR | What | Code | Tests | +|---|---|---|---| +| #114 (story part) | Story events and segments as tables | 1,021 | 966 | +| #122 | Shared story steps, retry policy, run options (Checks, language, dropdowns, stats) | 838 | 637 | +| **Total** | | **~1,860** | **~1,600** | + +#114 holds both the navigation and the story-event code (~3.2k code). Upstream it could be split +in two: navigation first, then story events. + +## 4. FRLG game program (the MVP) + +| PR | What | Code | Tests | Map data | +|---|---|---|---|---| +| #117 | FRLG maps (generator + 25 JSON maps) and route planning | 3,249 | 821 | 3,194 | +| #118 | FRLG walker: steps, warps, grass, signs, ledges | 690 | 0 | | +| #119 | Finding the player again after an interrupted step | 739 | 436 | | +| #120 | FRLG AutoStory, new game → Brock: table, Mart and bag checks, save check, simulation | 3,124 | 837 | | +| **Total** | | **~7,800** | **~2,100** | **3,194** | + +#123 is fully merged into #120, shows no diff, and can be closed. #117 is large; splitting the +generator and maps from the planner is an option. + +## 5. Still needed for the MVP (estimates) + +| # | PR | Where | Size (code + tests) | +|---|---|---|---| +| a | Walker simulator: grid world, fake battles, believed vs real tile | #114 | ~400 + 400 | +| b | Walker fixes: drift after battles; fail a wall step that stops far short | #119 | ~150 + 200 | +| c | Run-record recorder (framework half of #116) | new PR on main | ~630 incl. tests | +| d | Run-event hooks: shared code and FRLG | #114, #120 | ~150 + 100 | +| e | Optionally split #117: maps and generator vs planner | existing code | 0 new | +| | **Total** | 2–3 new PRs plus commits on existing ones | **~1.3k code + ~1k tests** | + +Then the console check: FRLG 3/3, new game → Brock, in one run each. + +## 6. Later features (rough estimates) + +| Feature | PRs | Code + tests | Notes | +|---|---|---|---| +| Run modes SPEEDRUN / DEFAULT / SAFE | 3 | ~1.0k + 0.6k | (1) the mode option and strategy in #122; (2) FRLG level and party reading; (3) the FRLG speedrun route (no Viridian shopping, flee wild battles, Sammy only, Brock at level 11; pokeguy's 1:59:34 notes on the agents branch) | +| Trainer sight and level targets | 2 | ~0.6k + 0.4k | Trainer type, sight and facing in the map schema and generator; the planner scores sight lines and grass | +| RNG program integration | 2–3 | ~0.8k + 0.4k | AutoStory stops at a checkpoint and hands off to the RNG programs (#61, Ten Lines seeds), then resumes the story | +| Mail glitch / ACE and detours | 3–4 | ~1.5k + 0.6k | Builds on #81's naming-screen typer (722 code, 345 tests): mail-screen typing, the payload with verification, story detours to get the mail | +| Story after Brock (#130's outline, 92 rows) | ~10–15 | ~8–12k + 3–4k | About one PR per segment, 500–1,000 lines each, plus new event types (HMs, puzzles, the Silph Scope) | + +## Tooling, used by both games + +| PR | What | Size | +|---|---|---| +| #107 | Lab tooling: lab channel, Command File Runner, scripts | 2.4k code, 0.5k tests | +| #116 | Run records, about 3 PRs | ~1.5k | +| #125 | Route pictures (devtools/maps, Python) | 1.5k code, 0.4k tests | +| #131 | Agent integration: one lab CLI, MCP later; about 7 PRs | ~2k | + +## Summary + +The FRLG MVP is about 7.8k lines of game code on about 4.1k of shared code (navigation 2.1k plus +story engine 1.9k), with about 3.8k lines of tests. Finishing it needs roughly 1.3k more code plus +tests and one 3/3 console run. From 04718cdab794ca60ed332f7efb1df2747ee7c253 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 13:08:10 -0800 Subject: [PATCH 18/27] AutoStory notes: link every PR number Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/DEMO_PLAN.md | 60 +++++++++++++++++++++------------------- autostory/FRLG_SIZING.md | 54 ++++++++++++++++++------------------ 2 files changed, 58 insertions(+), 56 deletions(-) diff --git a/autostory/DEMO_PLAN.md b/autostory/DEMO_PLAN.md index 05adb0d304..27c40c91e8 100644 --- a/autostory/DEMO_PLAN.md +++ b/autostory/DEMO_PLAN.md @@ -14,8 +14,8 @@ Sizes per PR, and estimates for what remains: [FRLG_SIZING.md](FRLG_SIZING.md). - 00.07, 00.08 and 00.09 on 2026-11-01 between 11:15 and 12:05. - Brock was beaten in 4 turns with HP green and no Potions used. - It is not yet 3/3 from a new game in one run. -- **BDSP.** New game to Floaroma passed on the v3 line earlier, with #1717 underneath. It is - being rebuilt without #1717 as #127 and #128. +- **BDSP.** New game to Floaroma passed on the v3 line earlier, with [#1717](https://github.com/PokemonAutomation/Arduino-Source/pull/1717) underneath. It is + being rebuilt without [#1717](https://github.com/PokemonAutomation/Arduino-Source/pull/1717) as [#127](https://github.com/dayfine/Arduino-Source/pull/127) and [#128](https://github.com/dayfine/Arduino-Source/pull/128). - **Known walker bug, FRLG.** A wild battle in the middle of a leg can leave the player a tile off the leg's line. "Walking to the wall again" then stops at the wrong wall, and nothing notices. This failed the forest gate 4 times. @@ -44,17 +44,19 @@ upstream main (= fork main) └─ docs: #100 design → #130 FRLG events after Brock; #113 notes (this plan) ``` +PR links: [#43](https://github.com/dayfine/Arduino-Source/pull/43), [#44](https://github.com/dayfine/Arduino-Source/pull/44), [#45](https://github.com/dayfine/Arduino-Source/pull/45), [#100](https://github.com/dayfine/Arduino-Source/pull/100), [#107](https://github.com/dayfine/Arduino-Source/pull/107), [#113](https://github.com/dayfine/Arduino-Source/pull/113), [#114](https://github.com/dayfine/Arduino-Source/pull/114), [#116](https://github.com/dayfine/Arduino-Source/pull/116), [#117](https://github.com/dayfine/Arduino-Source/pull/117), [#118](https://github.com/dayfine/Arduino-Source/pull/118), [#119](https://github.com/dayfine/Arduino-Source/pull/119), [#120](https://github.com/dayfine/Arduino-Source/pull/120), [#122](https://github.com/dayfine/Arduino-Source/pull/122), [#123](https://github.com/dayfine/Arduino-Source/pull/123), [#125](https://github.com/dayfine/Arduino-Source/pull/125), [#127](https://github.com/dayfine/Arduino-Source/pull/127), [#128](https://github.com/dayfine/Arduino-Source/pull/128), [#129](https://github.com/dayfine/Arduino-Source/pull/129), [#130](https://github.com/dayfine/Arduino-Source/pull/130). + Superseded; the user closes them, with branches kept: -- BDSP: #111, #112, #121, #124, #68, #109, #54 (the #1717 mirror). -- FRLG: #67, #123 (folded into #120). -- Docs: #126 (moved to #130). +- BDSP: [#111](https://github.com/dayfine/Arduino-Source/pull/111), [#112](https://github.com/dayfine/Arduino-Source/pull/112), [#121](https://github.com/dayfine/Arduino-Source/pull/121), [#124](https://github.com/dayfine/Arduino-Source/pull/124), [#68](https://github.com/dayfine/Arduino-Source/pull/68), [#109](https://github.com/dayfine/Arduino-Source/pull/109), [#54](https://github.com/dayfine/Arduino-Source/pull/54) (the [#1717](https://github.com/PokemonAutomation/Arduino-Source/pull/1717) mirror). +- FRLG: [#67](https://github.com/dayfine/Arduino-Source/pull/67), [#123](https://github.com/dayfine/Arduino-Source/pull/123) (folded into [#120](https://github.com/dayfine/Arduino-Source/pull/120)). +- Docs: [#126](https://github.com/dayfine/Arduino-Source/pull/126) (moved to [#130](https://github.com/dayfine/Arduino-Source/pull/130)). -Upstream order: #43, #44, #45 (small SV refactors, a good first handoff), #114's parts, #122, FRLG, BDSP, then tooling. +Upstream order: [#43](https://github.com/dayfine/Arduino-Source/pull/43), [#44](https://github.com/dayfine/Arduino-Source/pull/44), [#45](https://github.com/dayfine/Arduino-Source/pull/45) (small SV refactors, a good first handoff), [#114](https://github.com/dayfine/Arduino-Source/pull/114)'s parts, [#122](https://github.com/dayfine/Arduino-Source/pull/122), FRLG, BDSP, then tooling. ## What "good shape" means for each PR 1. **Only its own files.** `git diff parent...child --stat` shows nothing from a parent. Shared - code lives in #114 or #122. + code lives in [#114](https://github.com/dayfine/Arduino-Source/pull/114) or [#122](https://github.com/dayfine/Arduino-Source/pull/122). 2. **Reviewable size.** One concern per PR, about 400 changed lines excluding map data and tests. Data tables are initializer lists. `std::format` for messages. 3. **Tests.** @@ -68,37 +70,37 @@ Upstream order: #43, #44, #45 (small SV refactors, a good first handoff), #114's ## Work, in order -1. **Shared core settles (#114, #122).** In progress, agent: - - LegWalker and the shared route log move into #114 and merge down the FRLG stack. - - Decide: keep #122 separate or fold it into #114. Recommend separate: it is a different - concern and can go upstream after #114. -2. **Walker simulator (#114) and the walker fixes (#119).** +1. **Shared core settles ([#114](https://github.com/dayfine/Arduino-Source/pull/114), [#122](https://github.com/dayfine/Arduino-Source/pull/122)).** In progress, agent: + - LegWalker and the shared route log move into [#114](https://github.com/dayfine/Arduino-Source/pull/114) and merge down the FRLG stack. + - Decide: keep [#122](https://github.com/dayfine/Arduino-Source/pull/122) separate or fold it into [#114](https://github.com/dayfine/Arduino-Source/pull/114). Recommend separate: it is a different + concern and can go upstream after [#114](https://github.com/dayfine/Arduino-Source/pull/114). +2. **Walker simulator ([#114](https://github.com/dayfine/Arduino-Source/pull/114)) and the walker fixes ([#119](https://github.com/dayfine/Arduino-Source/pull/119)).** - A grid world from the JSON maps that tracks the player's real tile and facing. - Holds move one tile per tile time; walls, NPCs and warps stop the player. - Seeded wild encounters on grass, with a detection lag; trainer sight from pokefirered. - Assertion: every story route, across many seeds, ends on its planned tile or fails loudly. - Model it on the measured behaviour: the m28 run's before/after screenshots of every step, `DebugDumps/AutoStory/legs`. - - Then fix #119 against the failing simulated cases: + - Then fix [#119](https://github.com/dayfine/Arduino-Source/pull/119) against the failing simulated cases: - the drift after a battle; - a wall leg that stops far short of its length fails with a screenshot. -3. **FRLG stack in shape (#117–#120).** - - Fold #123 into #120. - - #120 keeps the 00.07/00.08 split, the save-card check on load, the Checks level and +3. **FRLG stack in shape ([#117](https://github.com/dayfine/Arduino-Source/pull/117)–[#120](https://github.com/dayfine/Arduino-Source/pull/120)).** + - Fold [#123](https://github.com/dayfine/Arduino-Source/pull/123) into [#120](https://github.com/dayfine/Arduino-Source/pull/120). + - [#120](https://github.com/dayfine/Arduino-Source/pull/120) keeps the 00.07/00.08 split, the save-card check on load, the Checks level and language-free reads. - - Review each PR against "good shape". Check that #117's route tests run in CI (maps are - built in from #118; decide whether to fold #118's maps into #117). -4. **BDSP stack in shape (#127, #128).** In progress, agent: - - The walker moves to #127 with battle handling injected. + - Review each PR against "good shape". Check that [#117](https://github.com/dayfine/Arduino-Source/pull/117)'s route tests run in CI (maps are + built in from [#118](https://github.com/dayfine/Arduino-Source/pull/118); decide whether to fold [#118](https://github.com/dayfine/Arduino-Source/pull/118)'s maps into [#117](https://github.com/dayfine/Arduino-Source/pull/117)). +4. **BDSP stack in shape ([#127](https://github.com/dayfine/Arduino-Source/pull/127), [#128](https://github.com/dayfine/Arduino-Source/pull/128)).** In progress, agent: + - The walker moves to [#127](https://github.com/dayfine/Arduino-Source/pull/127) with battle handling injected. - Recorded stick holds are replaced by planned walks where maps exist. - The simulation runs 00.00 → Floaroma in English and in Japanese. 5. **Console verification, after 2–4.** One train at a time on console B: - FRLG 3/3 new game → Brock in one run each. - BDSP v4 new game → Floaroma, 3/3, first on the replaced 00.00–00.05 walks. - - Each run gets route pictures (#125) and a run record (#116). + - Each run gets route pictures ([#125](https://github.com/dayfine/Arduino-Source/pull/125)) and a run record ([#116](https://github.com/dayfine/Arduino-Source/pull/116)). 6. **Tooling PRs.** - - #116: retitle it as run records, attach route pictures to failed runs. - - #125: render route pictures as CI artifacts from the offline route tests. Not goldens. + - [#116](https://github.com/dayfine/Arduino-Source/pull/116): retitle it as run records, attach route pictures to failed runs. + - [#125](https://github.com/dayfine/Arduino-Source/pull/125): render route pictures as CI artifacts from the offline route tests. Not goldens. 7. **Gameplay plan (design; the user decides the targets).** - Trainer sight, facing and type in the map schema; the planner scores sight lines and grass. - Level targets per checkpoint. FRLG Squirtle, from the 2015 speedrun guide: 6 after Route 1, @@ -114,15 +116,15 @@ Upstream order: #43, #44, #45 (small SV refactors, a good first handoff), #114's the level targets. Not built now; the table should name these choices so a mode can switch them. 8. **Upstream handoff (the user publishes; at most two open upstream).** - - Order: #114's parts (grid and planner, ScreenMachine, story events and maps), then #122, - then FRLG #117 → #120, then BDSP #127 → #128, then the tooling. + - Order: [#114](https://github.com/dayfine/Arduino-Source/pull/114)'s parts (grid and planner, ScreenMachine, story events and maps), then [#122](https://github.com/dayfine/Arduino-Source/pull/122), + then FRLG [#117](https://github.com/dayfine/Arduino-Source/pull/117) → [#120](https://github.com/dayfine/Arduino-Source/pull/120), then BDSP [#127](https://github.com/dayfine/Arduino-Source/pull/127) → [#128](https://github.com/dayfine/Arduino-Source/pull/128), then the tooling. - Each is folded to one commit per upstream PR when handed over. ## Decisions needed from the user -- Fold #123 into #120 (recommended), or keep it as its own PR. -- Keep #122 separate from #114 (recommended), or fold it in. -- Fold #118's built-in maps into #117 so #117's route tests run in CI. -- Close the superseded PRs listed above once #127/#128 and the FRLG stack are in shape. +- Fold [#123](https://github.com/dayfine/Arduino-Source/pull/123) into [#120](https://github.com/dayfine/Arduino-Source/pull/120) (recommended), or keep it as its own PR. +- Keep [#122](https://github.com/dayfine/Arduino-Source/pull/122) separate from [#114](https://github.com/dayfine/Arduino-Source/pull/114) (recommended), or fold it in. +- Fold [#118](https://github.com/dayfine/Arduino-Source/pull/118)'s built-in maps into [#117](https://github.com/dayfine/Arduino-Source/pull/117) so [#117](https://github.com/dayfine/Arduino-Source/pull/117)'s route tests run in CI. +- Close the superseded PRs listed above once [#127](https://github.com/dayfine/Arduino-Source/pull/127)/#128 and the FRLG stack are in shape. - Level targets and the trainer list per checkpoint. - When to resume console runs: after steps 2–4, as proposed. diff --git a/autostory/FRLG_SIZING.md b/autostory/FRLG_SIZING.md index 5465766dd7..48aaac298f 100644 --- a/autostory/FRLG_SIZING.md +++ b/autostory/FRLG_SIZING.md @@ -8,55 +8,55 @@ shapes are close to final, not final. The plan and PR tree are in [DEMO_PLAN.md] | PR | What | Code | Tests | |---|---|---|---| -| #43 | Shared start/end checkpoint dropdowns (SV refactor) | 56 | 0 | -| #44 | Shared story index | 33 | 99 | -| #45 | AutoStoryStats moved to Pokemon/AutoStory | 38 | 0 | +| [#43](https://github.com/dayfine/Arduino-Source/pull/43) | Shared start/end checkpoint dropdowns (SV refactor) | 56 | 0 | +| [#44](https://github.com/dayfine/Arduino-Source/pull/44) | Shared story index | 33 | 99 | +| [#45](https://github.com/dayfine/Arduino-Source/pull/45) | AutoStoryStats moved to Pokemon/AutoStory | 38 | 0 | | **Total** | Ready to send upstream first | **127** | **99** | -Outside the chain but related: #86 FRLG bag detector tests, and #61 FRLG party check (240 code, +Outside the chain but related: [#86](https://github.com/dayfine/Arduino-Source/pull/86) FRLG bag detector tests, and [#61](https://github.com/dayfine/Arduino-Source/pull/61) FRLG party check (240 code, 263 tests), which belongs with the RNG work. -## 2. Shared navigation and map infrastructure (#114) +## 2. Shared navigation and map infrastructure ([#114](https://github.com/dayfine/Arduino-Source/pull/114)) | Part | Code | Tests | |---|---|---| | Grid, route planner, LegWalker, MapData/JSON maps, route log, tile poses, map embedding | 1,813 | 1,010 | | ScreenMachine / StepTrace | 329 | 0 | -| **#114 navigation part** | **~2,140** | **~1,010** (+151 lines of test maps) | +| **[#114](https://github.com/dayfine/Arduino-Source/pull/114) navigation part** | **~2,140** | **~1,010** (+151 lines of test maps) | ## 3. Shared AutoStory infrastructure | PR | What | Code | Tests | |---|---|---|---| -| #114 (story part) | Story events and segments as tables | 1,021 | 966 | -| #122 | Shared story steps, retry policy, run options (Checks, language, dropdowns, stats) | 838 | 637 | +| [#114](https://github.com/dayfine/Arduino-Source/pull/114) (story part) | Story events and segments as tables | 1,021 | 966 | +| [#122](https://github.com/dayfine/Arduino-Source/pull/122) | Shared story steps, retry policy, run options (Checks, language, dropdowns, stats) | 838 | 637 | | **Total** | | **~1,860** | **~1,600** | -#114 holds both the navigation and the story-event code (~3.2k code). Upstream it could be split +[#114](https://github.com/dayfine/Arduino-Source/pull/114) holds both the navigation and the story-event code (~3.2k code). Upstream it could be split in two: navigation first, then story events. ## 4. FRLG game program (the MVP) | PR | What | Code | Tests | Map data | |---|---|---|---|---| -| #117 | FRLG maps (generator + 25 JSON maps) and route planning | 3,249 | 821 | 3,194 | -| #118 | FRLG walker: steps, warps, grass, signs, ledges | 690 | 0 | | -| #119 | Finding the player again after an interrupted step | 739 | 436 | | -| #120 | FRLG AutoStory, new game → Brock: table, Mart and bag checks, save check, simulation | 3,124 | 837 | | +| [#117](https://github.com/dayfine/Arduino-Source/pull/117) | FRLG maps (generator + 25 JSON maps) and route planning | 3,249 | 821 | 3,194 | +| [#118](https://github.com/dayfine/Arduino-Source/pull/118) | FRLG walker: steps, warps, grass, signs, ledges | 690 | 0 | | +| [#119](https://github.com/dayfine/Arduino-Source/pull/119) | Finding the player again after an interrupted step | 739 | 436 | | +| [#120](https://github.com/dayfine/Arduino-Source/pull/120) | FRLG AutoStory, new game → Brock: table, Mart and bag checks, save check, simulation | 3,124 | 837 | | | **Total** | | **~7,800** | **~2,100** | **3,194** | -#123 is fully merged into #120, shows no diff, and can be closed. #117 is large; splitting the +[#123](https://github.com/dayfine/Arduino-Source/pull/123) is fully merged into [#120](https://github.com/dayfine/Arduino-Source/pull/120), shows no diff, and can be closed. [#117](https://github.com/dayfine/Arduino-Source/pull/117) is large; splitting the generator and maps from the planner is an option. ## 5. Still needed for the MVP (estimates) | # | PR | Where | Size (code + tests) | |---|---|---|---| -| a | Walker simulator: grid world, fake battles, believed vs real tile | #114 | ~400 + 400 | -| b | Walker fixes: drift after battles; fail a wall step that stops far short | #119 | ~150 + 200 | -| c | Run-record recorder (framework half of #116) | new PR on main | ~630 incl. tests | -| d | Run-event hooks: shared code and FRLG | #114, #120 | ~150 + 100 | -| e | Optionally split #117: maps and generator vs planner | existing code | 0 new | +| a | Walker simulator: grid world, fake battles, believed vs real tile | [#114](https://github.com/dayfine/Arduino-Source/pull/114) | ~400 + 400 | +| b | Walker fixes: drift after battles; fail a wall step that stops far short | [#119](https://github.com/dayfine/Arduino-Source/pull/119) | ~150 + 200 | +| c | Run-record recorder (framework half of [#116](https://github.com/dayfine/Arduino-Source/pull/116)) | new PR on main | ~630 incl. tests | +| d | Run-event hooks: shared code and FRLG | [#114](https://github.com/dayfine/Arduino-Source/pull/114), [#120](https://github.com/dayfine/Arduino-Source/pull/120) | ~150 + 100 | +| e | Optionally split [#117](https://github.com/dayfine/Arduino-Source/pull/117): maps and generator vs planner | existing code | 0 new | | | **Total** | 2–3 new PRs plus commits on existing ones | **~1.3k code + ~1k tests** | Then the console check: FRLG 3/3, new game → Brock, in one run each. @@ -65,20 +65,20 @@ Then the console check: FRLG 3/3, new game → Brock, in one run each. | Feature | PRs | Code + tests | Notes | |---|---|---|---| -| Run modes SPEEDRUN / DEFAULT / SAFE | 3 | ~1.0k + 0.6k | (1) the mode option and strategy in #122; (2) FRLG level and party reading; (3) the FRLG speedrun route (no Viridian shopping, flee wild battles, Sammy only, Brock at level 11; pokeguy's 1:59:34 notes on the agents branch) | +| Run modes SPEEDRUN / DEFAULT / SAFE | 3 | ~1.0k + 0.6k | (1) the mode option and strategy in [#122](https://github.com/dayfine/Arduino-Source/pull/122); (2) FRLG level and party reading; (3) the FRLG speedrun route (no Viridian shopping, flee wild battles, Sammy only, Brock at level 11; pokeguy's 1:59:34 notes on the agents branch) | | Trainer sight and level targets | 2 | ~0.6k + 0.4k | Trainer type, sight and facing in the map schema and generator; the planner scores sight lines and grass | -| RNG program integration | 2–3 | ~0.8k + 0.4k | AutoStory stops at a checkpoint and hands off to the RNG programs (#61, Ten Lines seeds), then resumes the story | -| Mail glitch / ACE and detours | 3–4 | ~1.5k + 0.6k | Builds on #81's naming-screen typer (722 code, 345 tests): mail-screen typing, the payload with verification, story detours to get the mail | -| Story after Brock (#130's outline, 92 rows) | ~10–15 | ~8–12k + 3–4k | About one PR per segment, 500–1,000 lines each, plus new event types (HMs, puzzles, the Silph Scope) | +| RNG program integration | 2–3 | ~0.8k + 0.4k | AutoStory stops at a checkpoint and hands off to the RNG programs ([#61](https://github.com/dayfine/Arduino-Source/pull/61), Ten Lines seeds), then resumes the story | +| Mail glitch / ACE and detours | 3–4 | ~1.5k + 0.6k | Builds on [#81](https://github.com/dayfine/Arduino-Source/pull/81)'s naming-screen typer (722 code, 345 tests): mail-screen typing, the payload with verification, story detours to get the mail | +| Story after Brock ([#130](https://github.com/dayfine/Arduino-Source/pull/130)'s outline, 92 rows) | ~10–15 | ~8–12k + 3–4k | About one PR per segment, 500–1,000 lines each, plus new event types (HMs, puzzles, the Silph Scope) | ## Tooling, used by both games | PR | What | Size | |---|---|---| -| #107 | Lab tooling: lab channel, Command File Runner, scripts | 2.4k code, 0.5k tests | -| #116 | Run records, about 3 PRs | ~1.5k | -| #125 | Route pictures (devtools/maps, Python) | 1.5k code, 0.4k tests | -| #131 | Agent integration: one lab CLI, MCP later; about 7 PRs | ~2k | +| [#107](https://github.com/dayfine/Arduino-Source/pull/107) | Lab tooling: lab channel, Command File Runner, scripts | 2.4k code, 0.5k tests | +| [#116](https://github.com/dayfine/Arduino-Source/pull/116) | Run records, about 3 PRs | ~1.5k | +| [#125](https://github.com/dayfine/Arduino-Source/pull/125) | Route pictures (devtools/maps, Python) | 1.5k code, 0.4k tests | +| [#131](https://github.com/dayfine/Arduino-Source/pull/131) | Agent integration: one lab CLI, MCP later; about 7 PRs | ~2k | ## Summary From a0382660997a3ddc1846825ea2eafe28d91a0225 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 13:11:37 -0800 Subject: [PATCH 19/27] FRLG sizing: logging (route log, checkpoint log, the grid-free gap) and the upstream split per PR Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/FRLG_SIZING.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/autostory/FRLG_SIZING.md b/autostory/FRLG_SIZING.md index 48aaac298f..0f487d52b2 100644 --- a/autostory/FRLG_SIZING.md +++ b/autostory/FRLG_SIZING.md @@ -22,8 +22,14 @@ Outside the chain but related: [#86](https://github.com/dayfine/Arduino-Source/p |---|---|---| | Grid, route planner, LegWalker, MapData/JSON maps, route log, tile poses, map embedding | 1,813 | 1,010 | | ScreenMachine / StepTrace | 329 | 0 | +| Shared route log (`Pokemon_RouteLog`: plan, step results, stops, re-anchors, arrivals; BDSP's lines lifted as they were) | incl. above | incl. above | | **[#114](https://github.com/dayfine/Arduino-Source/pull/114) navigation part** | **~2,140** | **~1,010** (+151 lines of test maps) | +Logging is split across the two halves: +- **Route log** (`Pokemon_RouteLog` in [#114](https://github.com/dayfine/Arduino-Source/pull/114)): one line format for a route walk in both games. FRLG calls it from 4 files on [#120](https://github.com/dayfine/Arduino-Source/pull/120)'s branch, BDSP from its walker in [#129](https://github.com/dayfine/Arduino-Source/pull/129). +- **Checkpoint and event log** (`[Segment]`, `[Checkpoint]`, `[Event]` in [#114](https://github.com/dayfine/Arduino-Source/pull/114)'s StoryEvents): shared by both games already. +- **Gap:** the route log is grid-bound: tiles, directions, tile counts. 3D games (SV, LA) have route legs too, but no tiles. Planned fix: a grid-free core (leg label, target, how it ended, how the end is known, and an optional position the game formats) with the grid lines as one form of it. The same records become [#116](https://github.com/dayfine/Arduino-Source/pull/116)'s run events, so the log and the run record carry one format. + ## 3. Shared AutoStory infrastructure | PR | What | Code | Tests | @@ -71,6 +77,26 @@ Then the console check: FRLG 3/3, new game → Brock, in one run each. | Mail glitch / ACE and detours | 3–4 | ~1.5k + 0.6k | Builds on [#81](https://github.com/dayfine/Arduino-Source/pull/81)'s naming-screen typer (722 code, 345 tests): mail-screen typing, the payload with verification, story detours to get the mail | | Story after Brock ([#130](https://github.com/dayfine/Arduino-Source/pull/130)'s outline, 92 rows) | ~10–15 | ~8–12k + 3–4k | About one PR per segment, 500–1,000 lines each, plus new event types (HMs, puzzles, the Silph Scope) | + +## How the current PRs break up for upstream + +Each fork PR above is a collector; upstream gets smaller PRs of about 400 changed lines of code or +less (tests and map data not counted), one concern each. + +| Fork PR | Upstream PRs | Split | +|---|---|---| +| [#43](https://github.com/dayfine/Arduino-Source/pull/43)–[#45](https://github.com/dayfine/Arduino-Source/pull/45) | 2–3 | [#43](https://github.com/dayfine/Arduino-Source/pull/43) with its own test; [#44](https://github.com/dayfine/Arduino-Source/pull/44); [#45](https://github.com/dayfine/Arduino-Source/pull/45) (or [#43](https://github.com/dayfine/Arduino-Source/pull/43)+[#44](https://github.com/dayfine/Arduino-Source/pull/44) as one) | +| [#114](https://github.com/dayfine/Arduino-Source/pull/114) | 5 | grid and route planner; ScreenMachine/StepTrace; MapData, JSON maps and embedding; LegWalker and the route log; story events and segments | +| [#122](https://github.com/dayfine/Arduino-Source/pull/122) | 2 | story steps and their builder; run options (dropdowns, stats, Checks, language) | +| [#117](https://github.com/dayfine/Arduino-Source/pull/117) | 2 | FRLG map generator and JSON maps (data); FRLG route planning and the facing reader | +| [#118](https://github.com/dayfine/Arduino-Source/pull/118) | 1 | the FRLG walker | +| [#119](https://github.com/dayfine/Arduino-Source/pull/119) | 1 | finding the player again | +| [#120](https://github.com/dayfine/Arduino-Source/pull/120) | 3 | program and story table with the simulation; Mart and bag checks; save-card check and language-free reads | +| MVP remainder (section 5) | 3–4 | walker simulator; walker fixes; run-record recorder; run-event hooks | +| **FRLG path total** | **~19–21** | upstream allows two open at a time, so this is a long serial queue | + +Tooling splits too: [#107](https://github.com/dayfine/Arduino-Source/pull/107) into about 3, [#116](https://github.com/dayfine/Arduino-Source/pull/116) into about 3, [#125](https://github.com/dayfine/Arduino-Source/pull/125) into 1–2, [#131](https://github.com/dayfine/Arduino-Source/pull/131) into about 7. + ## Tooling, used by both games | PR | What | Size | From 0dcf9e00d15dc3bef8dbc775b5e2ee62a5dea6eb Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 13:15:33 -0800 Subject: [PATCH 20/27] FRLG sizing: upstream PR tree (U1-U21) and queue Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/FRLG_SIZING.md | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/autostory/FRLG_SIZING.md b/autostory/FRLG_SIZING.md index 0f487d52b2..560edcaf1d 100644 --- a/autostory/FRLG_SIZING.md +++ b/autostory/FRLG_SIZING.md @@ -97,6 +97,56 @@ less (tests and map data not counted), one concern each. Tooling splits too: [#107](https://github.com/dayfine/Arduino-Source/pull/107) into about 3, [#116](https://github.com/dayfine/Arduino-Source/pull/116) into about 3, [#125](https://github.com/dayfine/Arduino-Source/pull/125) into 1–2, [#131](https://github.com/dayfine/Arduino-Source/pull/131) into about 7. + +## Upstream PR tree and queue for the FRLG path + +Each upstream PR is cut from the fork collector named in brackets. Upstream allows two open PRs +from us at a time, so the queue runs about two deep. Sizes are code lines, with tests in brackets. + +``` +upstream main +U1 AutoStory: shared start/end select database (+ its test) [#43] ~60 (+40) +└ U2 AutoStory: shared story index [#44] ~35 (+60) + └ U3 AutoStory: AutoStoryStats to Pokemon/AutoStory (move) [#45] ~40 + └ U4 Pokemon navigation: grid types + leg planner [#114] ~600 (+370) + ├ U5 ScreenMachine + StepTrace [#114] ~330 + └ U6 Map data: JSON maps, schema, loader, CMake embedding [#114] ~450 (+240, test maps) + └ U7 LegWalker + shared route log [#114] ~430 (+370) + └ U8 Story events and segments (checkpoint/event log) [#114] ~1,000 (+970) split 2 if asked + └ U9 Story steps + builder + executor interface [#122] ~500 (+400) + └ U10 Story run options: dropdowns, stats, checks, language [#122] ~340 (+240) + └ U11 FRLG: map generator + 25 JSON maps (data) [#117] ~200 (+3.2k data) + └ U12 FRLG: route planning + facing reader [#117] ~3,000 (+820) split 2-3 + └ U13 FRLG: walker (steps, warps, grass, signs, ledges) [#118] ~690 + └ U14 FRLG: find the player again [#119] ~740 (+440) + └ U15 Walker simulator (believed vs real tile) [new, [#114](https://github.com/dayfine/Arduino-Source/pull/114)] ~400 (+400) + └ U16 Walker fixes: drift, short wall steps [new, [#119](https://github.com/dayfine/Arduino-Source/pull/119)] ~150 (+200) + └ U17 FRLG AutoStory: program, table, simulation [#120] ~1,600 (+500) + ├ U18 FRLG: Mart and bag checks [#120] ~800 (+200) + └ U19 FRLG: save-card check, language-free reads [#120] ~700 (+140) +side branch from main: +U20 Run records: recorder (framework half of [#116](https://github.com/dayfine/Arduino-Source/pull/116)) [new] ~450 (+180) +└ U21 Run-event hooks in story events and FRLG [new] ~150 (+100) +``` + +U12 is the one PR far over the ~400-line target. It should split into the planner and the +facing reader, maybe three PRs, once its code is reviewed. U8 may need the same. + +**Queue** (two open at a time; the next opens when one merges): + +| Slot | Order | Notes | +|---|---|---| +| 1 | U1 → U2 → U3 | small, refactor-only, SV-only: the first handoff | +| 2 | U20 alongside U1–U3 | independent of the AutoStory chain | +| then | U4 → U5/U6 → U7 → U8 | the navigation core; U5 can go in parallel with U6 | +| then | U9 → U10 | the shared story steps | +| then | U11 → U12 → U13 → U14 | FRLG navigation | +| then | U15 → U16 | the walker simulator and fixes (needs the forest drift found first) | +| last | U17 → U18/U19, U21 | the FRLG MVP program; U18 and U19 can go in parallel | + +That's 21 PRs, at roughly one merged per week if review keeps up: a few months of queue. The +shape lets each PR be reviewed alone, and the FRLG MVP only lands at the end. + ## Tooling, used by both games | PR | What | Size | From 49069774b272214548a677ecfcafbe71a4c0be1e Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 13:28:51 -0800 Subject: [PATCH 21/27] FRLG sizing: parallel tracks (naming/keyboards, starter RNG, run records, tooling, BDSP) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/FRLG_SIZING.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/autostory/FRLG_SIZING.md b/autostory/FRLG_SIZING.md index 560edcaf1d..85074565f6 100644 --- a/autostory/FRLG_SIZING.md +++ b/autostory/FRLG_SIZING.md @@ -147,6 +147,20 @@ facing reader, maybe three PRs, once its code is reviewed. U8 may need the same. That's 21 PRs, at roughly one merged per week if review keeps up: a few months of queue. The shape lets each PR be reviewed alone, and the FRLG MVP only lands at the end. +### Parallel tracks (independent of the U1–U19 chain) + +These are based on main, not on the AutoStory chain, so they can be worked on and sent upstream in parallel: + +| Track | PRs | What | Joins the chain at | +|---|---|---|---| +| Naming / keyboards | [#81](https://github.com/dayfine/Arduino-Source/pull/81) FRLG naming-screen typer (722 code, 345 tests); [#62](https://github.com/dayfine/Arduino-Source/pull/62) Switch on-screen keyboard (BDSP names) | Type "Kosmos" and nicknames instead of picking a preset name | FRLG 00.01 (player and rival names) after U17; BDSP intro on [#128](https://github.com/dayfine/Arduino-Source/pull/128) | +| Starter RNG | [#61](https://github.com/dayfine/Arduino-Source/pull/61) party check (240 code, 263 tests) + a starter-RNG entry point (~300) | Use the existing FRLG GiftRng (starters are gifts) from AutoStory's save in front of Oak's table | a hand-off after 00.03/00.04 once U17 lands; the RNG program itself can be built and tested now from a manual save | +| Run records | U20 [#132](https://github.com/dayfine/Arduino-Source/pull/132) → U21 | Recorder, then hooks | U21 needs U8 and U17 | +| Tooling | [#107](https://github.com/dayfine/Arduino-Source/pull/107) → [#116](https://github.com/dayfine/Arduino-Source/pull/116), [#125](https://github.com/dayfine/Arduino-Source/pull/125), [#131](https://github.com/dayfine/Arduino-Source/pull/131) | Lab channel, run records, route pictures, lab CLI | none (dev only) | +| BDSP | maps-v4 → [#127](https://github.com/dayfine/Arduino-Source/pull/127) → [#129](https://github.com/dayfine/Arduino-Source/pull/129) → [#128](https://github.com/dayfine/Arduino-Source/pull/128) | BDSP AutoStory v4 | after U10 | + +With 3–4 upstream slots, a sensible mix is one slot for the chain, one for naming/RNG, and one for tooling or run records. + ## Tooling, used by both games | PR | What | Size | From 74e6a02abdd5ec71f6a4e7fee144e119533d2dfe Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 13:34:32 -0800 Subject: [PATCH 22/27] Plan: link the architecture doc (#133) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/DEMO_PLAN.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autostory/DEMO_PLAN.md b/autostory/DEMO_PLAN.md index 27c40c91e8..52707390be 100644 --- a/autostory/DEMO_PLAN.md +++ b/autostory/DEMO_PLAN.md @@ -7,6 +7,8 @@ work. Sizes per PR, and estimates for what remains: [FRLG_SIZING.md](FRLG_SIZING.md). +The approach (map-based, story as event tables, checks, interrupts, tests) is in [AutoStory-Architecture.md](https://github.com/dayfine/Arduino-Source/blob/docs/autostory-architecture/docs/design/AutoStory-Architecture.md) ([#133](https://github.com/dayfine/Arduino-Source/pull/133)). + ## Where we are - **FRLG proof of concept.** New game to the Boulder Badge on console B, in pieces: From 03e563170894739d1b738e05e82000be081921c0 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 13:49:49 -0800 Subject: [PATCH 23/27] Sizing: the game simulator is a parallel track, not in the MVP chain Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/FRLG_SIZING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autostory/FRLG_SIZING.md b/autostory/FRLG_SIZING.md index 85074565f6..accebdd35c 100644 --- a/autostory/FRLG_SIZING.md +++ b/autostory/FRLG_SIZING.md @@ -58,7 +58,7 @@ generator and maps from the planner is an option. | # | PR | Where | Size (code + tests) | |---|---|---|---| -| a | Walker simulator: grid world, fake battles, believed vs real tile | [#114](https://github.com/dayfine/Arduino-Source/pull/114) | ~400 + 400 | +| a | (moved to a parallel track: the game simulator) | [#114](https://github.com/dayfine/Arduino-Source/pull/114) | ~400 + 400 | | b | Walker fixes: drift after battles; fail a wall step that stops far short | [#119](https://github.com/dayfine/Arduino-Source/pull/119) | ~150 + 200 | | c | Run-record recorder (framework half of [#116](https://github.com/dayfine/Arduino-Source/pull/116)) | new PR on main | ~630 incl. tests | | d | Run-event hooks: shared code and FRLG | [#114](https://github.com/dayfine/Arduino-Source/pull/114), [#120](https://github.com/dayfine/Arduino-Source/pull/120) | ~150 + 100 | @@ -141,7 +141,7 @@ facing reader, maybe three PRs, once its code is reviewed. U8 may need the same. | then | U4 → U5/U6 → U7 → U8 | the navigation core; U5 can go in parallel with U6 | | then | U9 → U10 | the shared story steps | | then | U11 → U12 → U13 → U14 | FRLG navigation | -| then | U15 → U16 | the walker simulator and fixes (needs the forest drift found first) | +| then | U16 | the walker check (fails a wall step that stopped short) and fixes | | last | U17 → U18/U19, U21 | the FRLG MVP program; U18 and U19 can go in parallel | That's 21 PRs, at roughly one merged per week if review keeps up: a few months of queue. The @@ -155,6 +155,7 @@ These are based on main, not on the AutoStory chain, so they can be worked on an |---|---|---|---| | Naming / keyboards | [#81](https://github.com/dayfine/Arduino-Source/pull/81) FRLG naming-screen typer (722 code, 345 tests); [#62](https://github.com/dayfine/Arduino-Source/pull/62) Switch on-screen keyboard (BDSP names) | Type "Kosmos" and nicknames instead of picking a preset name | FRLG 00.01 (player and rival names) after U17; BDSP intro on [#128](https://github.com/dayfine/Arduino-Source/pull/128) | | Starter RNG | [#61](https://github.com/dayfine/Arduino-Source/pull/61) party check (240 code, 263 tests) + a starter-RNG entry point (~300) | Use the existing FRLG GiftRng (starters are gifts) from AutoStory's save in front of Oak's table | a hand-off after 00.03/00.04 once U17 lands; the RNG program itself can be built and tested now from a manual save | +| Game simulator | 2 PRs: (1) encounters, Repel, position; (2) HP, status, EXP, moves, whiteout, run-mode statistics | Seeded fake game with odds from the decomp; catches drift, exercises rare paths, sets level targets (architecture doc section 6a) | not blocking; core ~1.2k + 0.6k tests, per game ~0.5k + data | | Run records | U20 [#132](https://github.com/dayfine/Arduino-Source/pull/132) → U21 | Recorder, then hooks | U21 needs U8 and U17 | | Tooling | [#107](https://github.com/dayfine/Arduino-Source/pull/107) → [#116](https://github.com/dayfine/Arduino-Source/pull/116), [#125](https://github.com/dayfine/Arduino-Source/pull/125), [#131](https://github.com/dayfine/Arduino-Source/pull/131) | Lab channel, run records, route pictures, lab CLI | none (dev only) | | BDSP | maps-v4 → [#127](https://github.com/dayfine/Arduino-Source/pull/127) → [#129](https://github.com/dayfine/Arduino-Source/pull/129) → [#128](https://github.com/dayfine/Arduino-Source/pull/128) | BDSP AutoStory v4 | after U10 | From db3c67a9307d6366a24ee2587c94273a93763059 Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 13:50:52 -0800 Subject: [PATCH 24/27] AutoStory: milestones and issue drafts Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/MILESTONES.md | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 autostory/MILESTONES.md diff --git a/autostory/MILESTONES.md b/autostory/MILESTONES.md new file mode 100644 index 0000000000..5ca387b381 --- /dev/null +++ b/autostory/MILESTONES.md @@ -0,0 +1,68 @@ +# AutoStory milestones and issue drafts + +Drafts for one master tracking issue and one issue per milestone. They're not filed yet: where to +file them (upstream PokemonAutomation/Arduino-Source or the fork) is the user's call, and upstream +text is shown to the user before posting. Design: [AutoStory-Architecture.md](https://github.com/dayfine/Arduino-Source/blob/docs/autostory-architecture/docs/design/AutoStory-Architecture.md). +PR tree and sizes: [FRLG_SIZING.md](FRLG_SIZING.md), [DEMO_PLAN.md](DEMO_PLAN.md). + +## Master issue (draft) + +**Title:** AutoStory for FRLG and BDSP: map-based story programs (tracking) + +> This tracks a shared AutoStory engine for 2D-movement Pokemon games: story beats as tables, movement planned on maps generated from the decomps, every step checked on screen, and checkpoints that save and retry. FireRed reached the Boulder Badge from a new game on a Switch as a proof of concept; BDSP from a new game to Floaroma is being rebuilt on the same engine. Work lands as a queue of small PRs, two open at a time; each milestone below has its own issue with scope, PRs and the done check. +> +> - [ ] M1 Shared AutoStory and navigation core +> - [ ] M2 FireRed MVP: new game → Boulder Badge +> - [ ] M3 BDSP MVP: new game → Floaroma +> - [ ] M4 Run evidence and lab tooling +> - [ ] M5 Game simulator +> - [ ] M6 Run modes, trainer sight and level targets +> - [ ] M7 Names and starter RNG +> - [ ] M8 FireRed beyond Brock +> - [ ] M9 Other games: grid-free routes for 3D titles (later) + +## M1 Shared AutoStory and navigation core +- **Scope:** shared select database, story index and stats (SV refactors), grid and route planner, ScreenMachine/StepTrace, JSON maps and loader, LegWalker and the route log, story events and segments, story steps and run options (checkpoint dropdowns, Checks, language, attempts). +- **PRs:** U1–U10, from fork [#43](https://github.com/dayfine/Arduino-Source/pull/43), [#44](https://github.com/dayfine/Arduino-Source/pull/44), [#45](https://github.com/dayfine/Arduino-Source/pull/45), [#114](https://github.com/dayfine/Arduino-Source/pull/114), [#122](https://github.com/dayfine/Arduino-Source/pull/122). About 5k code, 3.3k tests. +- **Done when:** all merged upstream, with unit tests green on three platforms. No game behaviour changes except SV's dropdowns, which keep the same labels. +- **Follow-ups:** a joined multi-map view and coord events in the map schema (requested by BDSP). + +## M2 FireRed MVP: new game → Boulder Badge +- **Scope:** FRLG maps generated from pret/pokefirered (25 maps), route planning, the walker with interrupts and recovery, a position check that fails a wall step that stopped short, and the AutoStory program and table (00.01–00.09, with Mart and bag checks, the save-place check and language-free reads). +- **PRs:** U11–U19, from fork [#117](https://github.com/dayfine/Arduino-Source/pull/117), [#118](https://github.com/dayfine/Arduino-Source/pull/118), [#119](https://github.com/dayfine/Arduino-Source/pull/119), [#120](https://github.com/dayfine/Arduino-Source/pull/120). About 7.8k code, 2.1k tests, 3.2k map data. +- **Done when:** the story simulation passes, and the console goes 3/3 from a new game to Brock in one run each, with run records. +- **Known issue:** forest-gate position drift (4 failures on 2026-11-01, not reproduced in 52 legs); the position check catches the next one. + +## M3 BDSP MVP: new game → Floaroma +- **Scope:** BDSP JSON maps from pret/pokeplatinum, including interiors; story maps; the walker; actions, battle and screen readers; and the program with an FRLG-style table. No dependency on PokemonAutomation#1717; the pieces kept from it are credited. +- **PRs:** bdsp/maps-v4 → [#127](https://github.com/dayfine/Arduino-Source/pull/127) → [#129](https://github.com/dayfine/Arduino-Source/pull/129) → bdsp/actions-v4 → [#128](https://github.com/dayfine/Arduino-Source/pull/128). Replaces fork #111, #112, #121 and #124. +- **Done when:** the simulation passes in English and Japanese, and the console goes 3/3 from a new game (00.01–00.05 are new planned walks and need console proof). + +## M4 Run evidence and lab tooling +- **Scope:** run records (one folder per run: log, events, frames of failed attempts, build info), run-event hooks, route pictures (planned vs walked), the lab channel, and one lab CLI with guards (MCP optional later). Also the lab-channel fix: a window focus change cancels holds. +- **PRs:** [#132](https://github.com/dayfine/Arduino-Source/pull/132) (recorder), [#116](https://github.com/dayfine/Arduino-Source/pull/116) (lab half), [#107](https://github.com/dayfine/Arduino-Source/pull/107), [#125](https://github.com/dayfine/Arduino-Source/pull/125), [#131](https://github.com/dayfine/Arduino-Source/pull/131). +- **Done when:** a failed AutoStory run leaves a record with the failing attempt's frame, and a route picture can be drawn from that record. + +## M5 Game simulator +- **Scope:** a seeded fake game with odds from the decomp: encounters, Repel, battles (HP, status, EXP, level-ups, learn-move prompts), trainers, whiteouts, and the battle-detection lag. +- **PRs:** 2 (encounters, Repel and position; then the full battle model and run-mode statistics). About 1.2k code, 0.6k tests for the core, plus about 0.5k and data per game. +- **Done when:** every story route runs across 1,000+ seeds with no silent position errors, and per-checkpoint statistics are produced. Doesn't block M2 or M3. + +## M6 Run modes, trainer sight and level targets +- **Scope:** SPEEDRUN, DEFAULT and SAFE run modes (separate from Checks), trainer type, sight and facing in the map schema, the planner avoiding or seeking trainers, level targets per checkpoint, and the FRLG speedrun route (after pokeguy's LeafGreen 1:59:34). +- **PRs:** about 5. About 1.6k code, 1k tests. +- **Done when:** FRLG reaches Brock in each mode on the console, and the simulator's statistics match. + +## M7 Names and starter RNG +- **Scope:** typing names (FRLG naming screen [#81](https://github.com/dayfine/Arduino-Source/pull/81); BDSP Switch keyboard [#62](https://github.com/dayfine/Arduino-Source/pull/62)), with "Kosmos" as the lab default; and a starter-RNG hand-off from AutoStory to the FRLG gift RNG program ([#61](https://github.com/dayfine/Arduino-Source/pull/61) party check, plus an entry point). +- **PRs:** about 4–5. Can start now; it joins the story program after M2. +- **Done when:** AutoStory names the player and gets an RNG'd starter, then continues to Brock. + +## M8 FireRed beyond Brock +- **Scope:** segments from Pewter to the Hall of Fame, following the outline in [#130](https://github.com/dayfine/Arduino-Source/pull/130) (92 rows). Needs HMs and field moves, puzzles, party management, and the Silph Scope and Poke Flute events. +- **PRs:** about 10–15, one per segment. About 8–12k code, 3–4k tests. +- **Done when:** each segment passes 3/3 on the console; the Hall of Fame closes the milestone. + +## M9 Other games (later) +- **Scope:** a grid-free route log and position type, and adapters for 3D games (SV, LA) on the same story engine. +- **Done when:** one 3D-game segment runs on the shared steps. From b84bcd46c44e935cd931fa205f62436ff1a7962b Mon Sep 17 00:00:00 2001 From: dayfine Date: Sun, 1 Nov 2026 14:05:17 -0800 Subject: [PATCH 25/27] Milestones: M8 to the Hall of Fame; M10 options, M11 Sevii and Mewtwo, M12 full RNG Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/MILESTONES.md | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/autostory/MILESTONES.md b/autostory/MILESTONES.md index 5ca387b381..9a3774a266 100644 --- a/autostory/MILESTONES.md +++ b/autostory/MILESTONES.md @@ -18,8 +18,11 @@ PR tree and sizes: [FRLG_SIZING.md](FRLG_SIZING.md), [DEMO_PLAN.md](DEMO_PLAN.md > - [ ] M5 Game simulator > - [ ] M6 Run modes, trainer sight and level targets > - [ ] M7 Names and starter RNG -> - [ ] M8 FireRed beyond Brock +> - [ ] M8 FireRed end to end: new game → Hall of Fame > - [ ] M9 Other games: grid-free routes for 3D titles (later) +> - [ ] M10 FireRed end to end with options: other starters, choices, optional tasks +> - [ ] M11 FireRed end to end with the Sevii Islands and Mewtwo +> - [ ] M12 Full RNG integration ## M1 Shared AutoStory and navigation core - **Scope:** shared select database, story index and stats (SV refactors), grid and route planner, ScreenMachine/StepTrace, JSON maps and loader, LegWalker and the route log, story events and segments, story steps and run options (checkpoint dropdowns, Checks, language, attempts). @@ -58,11 +61,27 @@ PR tree and sizes: [FRLG_SIZING.md](FRLG_SIZING.md), [DEMO_PLAN.md](DEMO_PLAN.md - **PRs:** about 4–5. Can start now; it joins the story program after M2. - **Done when:** AutoStory names the player and gets an RNG'd starter, then continues to Brock. -## M8 FireRed beyond Brock +## M8 FireRed end to end: new game → Hall of Fame - **Scope:** segments from Pewter to the Hall of Fame, following the outline in [#130](https://github.com/dayfine/Arduino-Source/pull/130) (92 rows). Needs HMs and field moves, puzzles, party management, and the Silph Scope and Poke Flute events. - **PRs:** about 10–15, one per segment. About 8–12k code, 3–4k tests. -- **Done when:** each segment passes 3/3 on the console; the Hall of Fame closes the milestone. +- **Reuse:** the Elite Four and Champion segment builds on `EliteFourFarmer` and `PokemonLeagueDetectors`. +- **Done when:** each segment passes 3/3 on the console, and one run goes from a new game to the Hall of Fame with default choices. ## M9 Other games (later) -- **Scope:** a grid-free route log and position type, and adapters for 3D games (SV, LA) on the same story engine. +- **Scope:** a grid-free route log and position type, and adapters for 3D games (SwSh, LA) on the same story engine. - **Done when:** one 3D-game segment runs on the shared steps. + +## M10 FireRed end to end with options +- **Scope:** table rows that branch on a choice: the other two starters (rival teams change), gift picks such as the Mt. Moon fossil, and optional tasks (extra catches, items, side areas) a run can switch on. +- **PRs:** about 4–6, after M8. +- **Done when:** a new game → Hall of Fame run passes with each starter, and each optional task passes 3/3 in its segment. + +## M11 FireRed end to end with the Sevii Islands and Mewtwo +- **Scope:** the post-game story (Islands One to Seven, the Ruby and Sapphire, the Network Machine) and Cerulean Cave up to Mewtwo. +- **PRs:** about 6–8, after M8. Sevii maps come from the same pret/pokefirered generator. +- **Done when:** one run goes from the Hall of Fame save to Mewtwo caught, with each segment 3/3. + +## M12 Full RNG integration +- **Scope:** every RNG-able Pokemon on the way can be RNG'd in place: starter (M7), gifts (Lapras, Eevee, fossils), statics (Snorlax, legendary birds, Mewtwo) and the roaming dog, through `StarterRng`, `GiftRng`, `StaticRng`, `RoamingLegendaryRng` and the RNG navigation. AutoStory walks there and saves, the RNG program runs, AutoStory continues. Routines locked in program classes move to callable functions in small upstream PRs first. +- **PRs:** about 5–8, after M7; the post-game targets after M11. +- **Done when:** a full run with RNG switched on ends with each targeted Pokemon matching its RNG target. From ca77d4a291a26c943ca44ffe7c1e89430982cd40 Mon Sep 17 00:00:00 2001 From: dayfine Date: Mon, 2 Nov 2026 13:05:09 -0800 Subject: [PATCH 26/27] AutoStory PR progress: tree after the #1828 merge, upstream queue, tips Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PROGRESS.md | 123 ++++++++++++++++++++++++++++----------- 1 file changed, 88 insertions(+), 35 deletions(-) diff --git a/autostory/PR_PROGRESS.md b/autostory/PR_PROGRESS.md index c8c75dcc03..0aae683142 100644 --- a/autostory/PR_PROGRESS.md +++ b/autostory/PR_PROGRESS.md @@ -1,45 +1,98 @@ # AutoStory PR progress -Live status of [PR_PLAN.md](PR_PLAN.md). Update whenever a PR changes state. +Live status of [DEMO_PLAN.md](DEMO_PLAN.md) (the tree and order; [PR_PLAN.md](PR_PLAN.md) keeps the +file-ownership rules). Update whenever a PR changes state. -Legend: ✅ merged upstream · 🔵 open upstream · 🟢 fork draft, CI green · 🟡 fork draft, -CI pending or red · 🛠 branch in progress · ⬜ not started · ❌ closed +Legend: ✅ merged upstream · 🔵 open upstream · 🟢 fork draft, builds and tests pass · 🟡 fork draft, +CI pending, red, or needs a merge · 🧪 console-verified · ⬜ not started · ❌ closed -Last updated: 2026-11-01 07:10 (S1 MoveOnlyFunction merged upstream as #1810; nav/shared gets a game-agnostic Pose commit and merges the new base in; frlg/mvp CI running; #115 and #110 merged into the BDSP lab branch; #111 carries #115's two missed fixes, #112 next). +Last updated: 2026-11-02 (fork stack merged onto upstream #1828's reviewed version, 18 branches, +merges only, builds pass at #120/#167/#168/#173; seg01 got PR #175; #170 and #165 closed as superseded; +FRLG running shoes 00.10/00.11 in #118–#120, 00.11 run on console B at ~135 ms/tile). + +## Upstream (two open at a time; the user publishes) + +| Upstream | Fork source | State | Next | +|---|---|---|---| +| [#1828](https://github.com/PokemonAutomation/Arduino-Source/pull/1828) AutoStory: shared start/end select database and story index | `autostory/story-select` (= #43 + #44, plus review fixes) | 🔵 in review (jw098, sections/DLC answered 2026-11-02), CI green | — | +| [#1754](https://github.com/PokemonAutomation/Arduino-Source/pull/1754) PokemonSV: BBQ tests in their own file | #51 `bbq/tests-file` | 🔵 open | BBQ queue: ../pokemon_sv/PR_PLAN.md | +| (queued) Max Lair: test the current boss inference | #171 → then #172 the fix | 🟢 CI green, 3 platforms | when #1828 merges: fold into one commit, user publishes | +| (queued) BDSP: MenuDetector past NEW tags; ShortDialogDetector long first line | #152, upstream copy `bdsp/detectors-upstream` dc884fdac | 🟡 CI red only for 26 missing images | after [CLT #42](https://github.com/PokemonAutomation/CommandLineTests/pull/42) merges (adds the images) | +| [CommandLineTests #42](https://github.com/PokemonAutomation/CommandLineTests/pull/42) BDSP AutoStory intro screens (16 images) | CLT `bdsp/autostory-intro-screens` 68604b1 | 🔵 open, cc Developer-Butters | — | + +## Fork tree ``` +main (= upstream main, synced daily 07:00) +├─ 🟢 #43 autostory/r1-select-db ─ #44 r2-story-index (+ #1828's review version merged in) +│ └─ 🟢 #45 r3-shared-stats +│ └─ 🟢 #114 nav/shared (grid, planner, LegWalker, route log, JSON maps, ScreenMachine) +│ └─ 🟢 #122 nav/story-steps (shared story steps, retry policy, run options) +│ ├─ FRLG +│ │ └─ #117 frlg/mvp (maps + planner) +│ │ └─ #118 frlg/walk-wild-legs (walker; MoveSpeed RUN, [Speed] log) +│ │ └─ #119 frlg/walk-interrupt-recount (position recovery) +│ │ └─ 🧪 #120 frlg/autostory-mvp new game → Brock → Running Shoes +│ │ 00.01–00.09 run on console B (00.09 with CHECKS=fast; Brock's +│ │ speech by hand); 00.10 shoes by hand; 00.11 run 1/1 +│ └─ BDSP +│ └─ #134 bdsp/maps-v4 → #127 nav-v4 → #129 walk-v4 → #152 detectors-v4 +│ → #148 actions-v4 → 🧪 #128 autostory-v4 (new game → Floaroma, r85) +│ ├─ #175 autostory-v4-seg01 (01.05–01.10 on the maps; not on console) +│ │ └─ #173 shared-steps (named events → shared steps, to 01.03) +│ ├─ #167 sim (grid simulation for unit tests) +│ └─ #168 view-shift (tap counts need the view to scroll; console check due) +├─ #171 swsh/maxlair-boss-tests → #172 maxlair-boss-fix 🟢 CI green +├─ #169 fix/fatal-exception-message (FatalProgramException::message empty) — upstream candidate +├─ #61 frlg/party-room-check · #81 frlg/naming-screen · #62 switch/system-keyboard +├─ #125 devtools/route-pictures · #132 common/run-records · #60 docs/lab-build-disk +├─ #87–#91 common/move-only-* (MoveOnlyFunction migration stack) +├─ #39 prototype/sv-isolated-hunt +└─ BBQ: #51 → (#37 → #38 → #53 → #8 → …), #24/#30, #29, #33 — see ../pokemon_sv/PR_PLAN.md base/upstream-main -├── 🟢 nav/shared collector 1 = fork #114 ............... S2–S4 + Pose commit 19a030374 + base merge -│ S1 823f5318d MoveOnlyFunction (#72) ✅ upstream #1810 · S2 3209523a9 grid + leg planner (#66, +735) -│ S3 c246d3d56 ScreenMachine (#108, +333) · S4 f3a8943a3 story events (#79, +1204) -│ std::format pass applied inside S2/S4 (9 sites). Sources to close once accepted: -│ #72 (87071ad59) · #66 nav/core (dc9f1682f) · #108 (6c8c83473) · #79 (70e10070c) -├── 🟢 frlg/mvp collector 3 = fork #117 (on nav/shared) .. 6 commits, CI green; F0 dropped (BagDetector fix is -│ upstream #1771); order F1 maps generator, F2 maps as data, F3 route planning, F4 LegWalker (shared, -│ Pokemon/Navigation), F6 facing reader, F5 overworld walk. 19 to_string → std::format. Source to close: #67 -└── ⬜ base/bdsp-1717 → ⬜ bdsp/mvp collector 2 ........ sources #68, #109 and the lab branch - bdsp/event-sandgem-center: ✅ #115 ci-fixes and ✅ #110 plan cap merged; 🟡 #111 decomp - grids (merging the base in); 🟡 #112 00.01–00.03 lines waits for #111 - -Open fork PRs that stay as they are: #107 lab tooling (channel work landing), #103 lab/main, -#81, #62, #61, #86, #100, #78, #56, #85. -To close as superseded once each collector is accepted: #72 #66 #108 #79 → #114; -#67 → #117; #68 #109 #110 #111 → bdsp/mvp; #116 → reworked in place (Lab run records). +└─ #107 lab/tooling → #131 design/agent-integration +lab/main (#103, lab builds only) → #149 run-records-base → #116 · #150 run-records (both 24 behind lab/main, conflict; not in lab builds) +design/autostory (#100) → #130 FRLG events after Brock · #174 sections, postgame and DLC +agents → #85 lab navigation notes · #113 this plan · #176 LeafGreen WR video notes ``` -## Upstream queue (publish in this order; two open at a time) +## Waiting on the user -| # | PR | Source | State | -|---|---|---|---| -| 1 | S1 Common: MoveOnlyFunction | #72 | ✅ upstream #1810, merged 2026-11-01 | -| 2 | S2 Pokemon navigation: grid types and leg planner | #66 | 🟢 #114 S2 | -| 3 | S3 ScreenMachine + StepTrace | #108 | 🟢 #114 S3 | -| 4 | S4 Pokemon navigation: story checkpoints as events | #79 | 🟢 #114 S4 | -| 5–10 | F1–F4, F6, F5 FRLG overworld navigation | #67 | 🟢 #117 | -| 10+ | B1–B5 BDSP AutoStory MVP | #68 and the lab branch | ⬜ blocked on upstream #1717 | - -Already upstream from this work: #1810 (S1), #1798 (AGENTS.md docs-site note), #1791 all merged; -#1754 (BBQ) still open. One slot is free for the shared queue (S2 next), the user publishes. - -Lab branches (no PRs): `lab/main` = main + #107; `lab/bdsp` = bdsp/event-sandgem-center + #115 + -lab/main; `lab/frlg` = frlg/brock-mvp + lab/main. Rebuilt on the collectors when they exist. +- Upstream order once a slot frees: #171 (after #1828) and the detectors PR (after CLT #42). +- #169 upstream or not. + +## Known gaps + +- Fork drafts skip CI; the stack's CI runs only when dispatched. Last dispatched green: #171, + #172, `autostory/story-select`. +- #149/#150 (lab run records) lag lab/main by 24 commits and conflict; left until lab builds need them. +- FRLG open items: preferred move set + post-battle learn-prompt loop (#120), wall-tap check + log-only (#119), walker recovery after wild battles. + +## Tips (2026-11-02, after the #1828 merge) + +| PR | Branch | Tip | +|---|---|---| +| #44 | autostory/r2-story-index | 9ca64aa0c | +| #45 | autostory/r3-shared-stats | cee0b139b | +| #114 | nav/shared | 7cdb95bc8 | +| #122 | nav/story-steps | 371ac704d | +| #117 | frlg/mvp | fc901ecb4 | +| #118 | frlg/walk-wild-legs | b2e7d13dd | +| #119 | frlg/walk-interrupt-recount | f89a7bb21 | +| #120 | frlg/autostory-mvp | d621f7db1 | +| #134 | bdsp/maps-v4 | eb0df8510 | +| #127 | bdsp/nav-v4 | 71ad2b2fc | +| #129 | bdsp/walk-v4 | ace8659ca | +| #152 | bdsp/detectors-v4 | 0d4d23e23 | +| #148 | bdsp/actions-v4 | 1dd00bc3e | +| #128 | bdsp/autostory-v4 | 3a89c929e | +| #175 | bdsp/autostory-v4-seg01 | 098384a98 | +| #167 | bdsp/sim | 5ddac8976 | +| #168 | bdsp/view-shift | 7291808d2 | +| #173 | bdsp/shared-steps | 000326b46 | +| #61 | frlg/party-room-check | a5e50d152 | + +When #1828 gets another review round: merge `autostory/story-select` into #44 again and cascade the +same order (#45 → #114 → #122 → FRLG #117–#120 and BDSP #134 → … → #173). The conflicts live in +#44 (`Pokemon_AutoStorySelect.h`, `SourceFiles.cmake`) and #114 (`ComputerPrograms_UnitTestRunner.cpp`). From 87953ab1cb64f3583b9e8a53484768911444008a Mon Sep 17 00:00:00 2001 From: dayfine Date: Mon, 2 Nov 2026 15:03:50 -0800 Subject: [PATCH 27/27] AutoStory PR progress: 2026-11-02 15:10 PT, FRLG #177-#179, #180/#181, CI per tip Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E --- autostory/PR_PROGRESS.md | 114 ++++++++++++++++++++++++--------------- 1 file changed, 71 insertions(+), 43 deletions(-) diff --git a/autostory/PR_PROGRESS.md b/autostory/PR_PROGRESS.md index 0aae683142..217bb69fe6 100644 --- a/autostory/PR_PROGRESS.md +++ b/autostory/PR_PROGRESS.md @@ -6,19 +6,23 @@ file-ownership rules). Update whenever a PR changes state. Legend: ✅ merged upstream · 🔵 open upstream · 🟢 fork draft, builds and tests pass · 🟡 fork draft, CI pending, red, or needs a merge · 🧪 console-verified · ⬜ not started · ❌ closed -Last updated: 2026-11-02 (fork stack merged onto upstream #1828's reviewed version, 18 branches, -merges only, builds pass at #120/#167/#168/#173; seg01 got PR #175; #170 and #165 closed as superseded; -FRLG running shoes 00.10/00.11 in #118–#120, 00.11 run on console B at ~135 ms/tile). +Last updated: 2026-11-02 ~15:10 PT (FRLG #120 gained the save-overwrite fix, start-save check, +rival preset name and absolute options via OptionMenuReader; console B 14:33–14:38, build frlg-m34: +new game 00.01 → 00.04 first try, stopped for Starter RNG at Squirtle's ball; new drafts #177–#181). ## Upstream (two open at a time; the user publishes) | Upstream | Fork source | State | Next | |---|---|---|---| -| [#1828](https://github.com/PokemonAutomation/Arduino-Source/pull/1828) AutoStory: shared start/end select database and story index | `autostory/story-select` (= #43 + #44, plus review fixes) | 🔵 in review (jw098, sections/DLC answered 2026-11-02), CI green | — | -| [#1754](https://github.com/PokemonAutomation/Arduino-Source/pull/1754) PokemonSV: BBQ tests in their own file | #51 `bbq/tests-file` | 🔵 open | BBQ queue: ../pokemon_sv/PR_PLAN.md | -| (queued) Max Lair: test the current boss inference | #171 → then #172 the fix | 🟢 CI green, 3 platforms | when #1828 merges: fold into one commit, user publishes | +| [#1828](https://github.com/PokemonAutomation/Arduino-Source/pull/1828) AutoStory: shared start/end select database and story index | `autostory/story-select` 101f5744f (= #43 + #44, plus review fixes) | 🔵 jw098: "looks fine", sections answered; checks pass, mergeable | waiting for merge | +| [#1754](https://github.com/PokemonAutomation/Arduino-Source/pull/1754) PokemonSV: BBQ tests in their own file | #51 `bbq/tests-file` 9e681ce09 | 🔵 conflict fixed (upstream main merged in), mergeable; CI awaits maintainer approval | BBQ queue: ../pokemon_sv/PR_PLAN.md | +| (queued) Max Lair: test the current boss inference | #171 → then #172 the fix | 🟢 CI green, 3 platforms | when a slot frees: fold into one commit, user publishes | +| (queued) BBQ quest detector tests (redo of closed #1759, tests in the detector's own file like #1771) | #180 `sv/bbq-quest-detector-tests` | 🟡 16/16 via harness; CI running | when a slot frees; user posts | +| (candidate) FRLG: Ten Lines target search in the program | #181 `frlg/rng-target-search` | 🟡 reproduces all 50 rows of the user's LeafGreen artifact; CI running | **user decides:** Ten Lines is GPL; code written fresh from reading it | | (queued) BDSP: MenuDetector past NEW tags; ShortDialogDetector long first line | #152, upstream copy `bdsp/detectors-upstream` dc884fdac | 🟡 CI red only for 26 missing images | after [CLT #42](https://github.com/PokemonAutomation/CommandLineTests/pull/42) merges (adds the images) | -| [CommandLineTests #42](https://github.com/PokemonAutomation/CommandLineTests/pull/42) BDSP AutoStory intro screens (16 images) | CLT `bdsp/autostory-intro-screens` 68604b1 | 🔵 open, cc Developer-Butters | — | +| [CommandLineTests #42](https://github.com/PokemonAutomation/CommandLineTests/pull/42) BDSP AutoStory intro screens (16 images) | CLT `bdsp/autostory-intro-screens` 68604b1 | 🔵 open, no reviews | — | + +Recently merged upstream: #1810 (MoveOnlyFunction), #1791, #1798, #1771. Closed: #1767, #1759 (→ #180). ## Fork tree @@ -33,66 +37,90 @@ main (= upstream main, synced daily 07:00) │ │ └─ #118 frlg/walk-wild-legs (walker; MoveSpeed RUN, [Speed] log) │ │ └─ #119 frlg/walk-interrupt-recount (position recovery) │ │ └─ 🧪 #120 frlg/autostory-mvp new game → Brock → Running Shoes -│ │ 00.01–00.09 run on console B (00.09 with CHECKS=fast; Brock's -│ │ speech by hand); 00.10 shoes by hand; 00.11 run 1/1 +│ │ │ 00.01–00.11 run before; 11-02: 00.01–00.04 first try (frlg-m34). +│ │ │ CI red only for CLT image ItemListReader/ItemsPocket_Potion5_…png +│ │ └─ #177 frlg/autostory-player-name (typed player name) +│ │ └─ #178 frlg/autostory-sid-helper (SID Helper handoff) +│ │ └─ #179 frlg/autostory-starter-rng (Starter RNG handoff) │ └─ BDSP │ └─ #134 bdsp/maps-v4 → #127 nav-v4 → #129 walk-v4 → #152 detectors-v4 │ → #148 actions-v4 → 🧪 #128 autostory-v4 (new game → Floaroma, r85) │ ├─ #175 autostory-v4-seg01 (01.05–01.10 on the maps; not on console) -│ │ └─ #173 shared-steps (named events → shared steps, to 01.03) +│ │ └─ 🟡 #173 shared-steps (named events → shared steps, to 01.03; CI: sim test crash) │ ├─ #167 sim (grid simulation for unit tests) │ └─ #168 view-shift (tap counts need the view to scroll; console check due) ├─ #171 swsh/maxlair-boss-tests → #172 maxlair-boss-fix 🟢 CI green +├─ #180 sv/bbq-quest-detector-tests · #181 frlg/rng-target-search (upstream candidates) ├─ #169 fix/fatal-exception-message (FatalProgramException::message empty) — upstream candidate ├─ #61 frlg/party-room-check · #81 frlg/naming-screen · #62 switch/system-keyboard ├─ #125 devtools/route-pictures · #132 common/run-records · #60 docs/lab-build-disk -├─ #87–#91 common/move-only-* (MoveOnlyFunction migration stack) +├─ common/move-only-function (#1810 merged upstream as another commit) → #87–#91 migration stack ├─ #39 prototype/sv-isolated-hunt └─ BBQ: #51 → (#37 → #38 → #53 → #8 → …), #24/#30, #29, #33 — see ../pokemon_sv/PR_PLAN.md base/upstream-main -└─ #107 lab/tooling → #131 design/agent-integration +└─ 🟢 #107 lab/tooling (controller-ready guard; controller=ready on console B) → #131 design/agent-integration lab/main (#103, lab builds only) → #149 run-records-base → #116 · #150 run-records (both 24 behind lab/main, conflict; not in lab builds) -design/autostory (#100) → #130 FRLG events after Brock · #174 sections, postgame and DLC -agents → #85 lab navigation notes · #113 this plan · #176 LeafGreen WR video notes +design/autostory (#100) → #130 FRLG events after Brock (options reference; team plan per starter × + version: FR Lapras, LG Starmie via Super Rod) · #174 sections, postgame and DLC +agents → #85 lab navigation notes · #113 this plan · #176 FRLG demo plan (SID Helper, Starter RNG) ``` ## Waiting on the user -- Upstream order once a slot frees: #171 (after #1828) and the detectors PR (after CLT #42). -- #169 upstream or not. +- Upstream order once a slot frees: #171 (Max Lair), #180 (BBQ detector tests), the detectors PR + (after CLT #42). +- #181 upstream or not (Ten Lines is GPL; ours is written fresh from reading it). #169 upstream or not. ## Known gaps -- Fork drafts skip CI; the stack's CI runs only when dispatched. Last dispatched green: #171, - #172, `autostory/story-select`. -- #149/#150 (lab run records) lag lab/main by 24 commits and conflict; left until lab builds need them. +- Fork drafts skip CI; the stack's CI runs only when dispatched. +- #120 → #179: add `PokemonFRLG/ItemListReader/ItemsPocket_Potion5_Antidote3_ParlyzHeal1.png` to CLT + (only CI failure). BATTLE SCENE OFF not yet run on console. +- #173: Ubuntu CI aborts in "Simulation: a blackout in 00.04b's training resets to its save" (empty + `optional` dereferenced), besides the expected missing BDSP images. +- #87–#91 still sit on `common/move-only-function`, which upstream merged as a different commit (#1810). +- #7 `bbq/quest-detector-tests` is the closed #1759's branch, superseded by #180. +- BBQ children of #51 (#2, #7, #15, #19, #23, #37) are 54–63 commits behind it after #1754's merge. +- #131 is 1 behind #107; #149/#150 lag lab/main by 24 and conflict; left until lab builds need them. - FRLG open items: preferred move set + post-battle learn-prompt loop (#120), wall-tap check log-only (#119), walker recovery after wild battles. -## Tips (2026-11-02, after the #1828 merge) +## Tips (2026-11-02 ~15:10 PT; CI = last dispatched run at this tip) -| PR | Branch | Tip | -|---|---|---| -| #44 | autostory/r2-story-index | 9ca64aa0c | -| #45 | autostory/r3-shared-stats | cee0b139b | -| #114 | nav/shared | 7cdb95bc8 | -| #122 | nav/story-steps | 371ac704d | -| #117 | frlg/mvp | fc901ecb4 | -| #118 | frlg/walk-wild-legs | b2e7d13dd | -| #119 | frlg/walk-interrupt-recount | f89a7bb21 | -| #120 | frlg/autostory-mvp | d621f7db1 | -| #134 | bdsp/maps-v4 | eb0df8510 | -| #127 | bdsp/nav-v4 | 71ad2b2fc | -| #129 | bdsp/walk-v4 | ace8659ca | -| #152 | bdsp/detectors-v4 | 0d4d23e23 | -| #148 | bdsp/actions-v4 | 1dd00bc3e | -| #128 | bdsp/autostory-v4 | 3a89c929e | -| #175 | bdsp/autostory-v4-seg01 | 098384a98 | -| #167 | bdsp/sim | 5ddac8976 | -| #168 | bdsp/view-shift | 7291808d2 | -| #173 | bdsp/shared-steps | 000326b46 | -| #61 | frlg/party-room-check | a5e50d152 | +| PR | Branch | Tip | CI | +|---|---|---|---| +| #43 | autostory/r1-select-db | 8698f8c23 | green | +| #44 | autostory/r2-story-index | 9ca64aa0c | green | +| #45 | autostory/r3-shared-stats | cee0b139b | — | +| #114 | nav/shared | 7cdb95bc8 | Mac green, Windows running | +| #122 | nav/story-steps | 371ac704d | — | +| #117 | frlg/mvp | fc901ecb4 | — | +| #118 | frlg/walk-wild-legs | b2e7d13dd | — | +| #119 | frlg/walk-interrupt-recount | f89a7bb21 | — | +| #120 | frlg/autostory-mvp | fff4697e0 | red: 1 missing CLT image | +| #177 | frlg/autostory-player-name | 701564a50 | — | +| #178 | frlg/autostory-sid-helper | 53eb31ade | — | +| #179 | frlg/autostory-starter-rng | f1c2f6006 | red: same CLT image | +| #134 | bdsp/maps-v4 | eb0df8510 | — | +| #127 | bdsp/nav-v4 | 71ad2b2fc | — | +| #129 | bdsp/walk-v4 | ace8659ca | — | +| #152 | bdsp/detectors-v4 | 0d4d23e23 | — | +| #148 | bdsp/actions-v4 | 1dd00bc3e | green | +| #128 | bdsp/autostory-v4 | 3a89c929e | green | +| #175 | bdsp/autostory-v4-seg01 | 098384a98 | green | +| #167 | bdsp/sim | 5ddac8976 | green | +| #168 | bdsp/view-shift | 7291808d2 | green | +| #173 | bdsp/shared-steps | 000326b46 | red: sim test abort + images | +| #171 | swsh/maxlair-boss-tests | e819c821e | green | +| #172 | swsh/maxlair-boss-fix | 66f83197b | green | +| #180 | sv/bbq-quest-detector-tests | bab44cdc6 | running | +| #181 | frlg/rng-target-search | 9803ace69 | running (Code Health green) | +| #61 | frlg/party-room-check | a5e50d152 | green | +| #107 | lab/tooling | 2b3eac8c6 | green 3/3 | +| #130 | docs/frlg-future-events | 013ba413c | — | +| #51 | bbq/tests-file | 9e681ce09 | upstream: awaits approval | When #1828 gets another review round: merge `autostory/story-select` into #44 again and cascade the -same order (#45 → #114 → #122 → FRLG #117–#120 and BDSP #134 → … → #173). The conflicts live in -#44 (`Pokemon_AutoStorySelect.h`, `SourceFiles.cmake`) and #114 (`ComputerPrograms_UnitTestRunner.cpp`). +same order (#45 → #114 → #122 → FRLG #117–#120 → #177–#179 and BDSP #134 → … → #173). The conflicts +live in #44 (`Pokemon_AutoStorySelect.h`, `SourceFiles.cmake`) and #114 +(`ComputerPrograms_UnitTestRunner.cpp`).