Skip to content

FRLG AutoStory: every story checkpoint as an authored JSON plan - #314

Draft
dayfine wants to merge 7 commits into
frlg/stage8-rocktunnelfrom
frlg/story-json
Draft

dayfine wants to merge 7 commits into
frlg/stage8-rocktunnelfrom
frlg/story-json

Conversation

@dayfine

@dayfine dayfine commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Depends on #293 (base frlg/stage8-rocktunnel; the diff shows only this change).

The FRLG story was C++ tables with long design comments, and only 00.05 was an authored JSON plan. Now every checkpoint is a StoryData/frlg-<id>.plan.json in the same pokesim-authored-checkpoint/1 format as 00.05 and the #294 drafts, extended with sections (events stay numbered across them; the log line names the section, e.g. [Event] 00.28/12 [b1f_east] winston_line: start), notes on checkpoints, sections and events (the old comments, kept), once_per_save, and FRLG execution fields (supplies, live start, handoff). Unknown fields and variants FRLG can't run are rejected. 00.28 is split by area: route10_to_mouth, 1f_north, b1f_east, 1f_west, b1f_west, 1f_south, route10_south.

The first commit exports every C++ row to JSON and checks each loaded row against its C++ row, and the whole story's sim trace against the C++ table's; the second deletes the C++ rows and keeps that trace as a golden (ReplayData/frlg-story-sim-trace.json). On the headless runner, PokemonFRLG::AutoStory passed 402 (399 before) with the same 13 known image/Resources failures, the fault sweeps unchanged, and the shared Pokemon:: story and BDSP AutoStory suites all passed. Nothing ran on a console.

Update (merge of #312's core): the GAME steps with arguments now carry them in the step's args (#312), not in the variant string. variant is the action's name (mart, teach, pc, grind, grind_check, capture, fossil, level), a Mart's purchases are its items, and each action declares its args in the action table, so a plan with an unknown, mistyped or missing arg is rejected at load. The 18 such steps in the plans are converted. The merge also keeps section, notes and once_per_save on the core's step types, with event_log_line() taking the section as an optional argument. On the headless runner, the FRLG and Pokemon:: suites pass apart from the known image tests and the local Resources check, and the golden sim trace is unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss

dayfine and others added 4 commits November 9, 2026 18:26
The authored checkpoint format gains what the FRLG table uses: sections
(each event logged with its section), notes on checkpoints, sections and
events, once_per_save, and FRLG execution fields for supplies, live
start and handoff. Variants are checked against what FRLG's executor does.

StoryData/frlg-<id>.plan.json is each C++ row exported once (the export
test), split into sections, with the table's design comments as notes.
Tests compare every JSON row with its C++ row and the whole story's sim
trace with the C++ table's and a golden copy of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
story_checkpoints() is now load_authored_story(): every StoryData plan,
in order of id. The C++ row definitions are gone (the table's rows and
the VermilionGym, Celadon and Lavender row files); the step helpers and
map names stay for tests. The migration's C++ comparison and export
tests go with them; the golden sim trace stays, with tests that a plan
with unknown fields, variants or sections is rejected and that Rock
Tunnel's events are logged with their sections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine and others added 3 commits November 9, 2026 21:08
Takes the core's step types in Types/ and its story log; FRLG's section,
notes and once_per_save stay on the step, and event_log_line takes the
section as an optional argument, so lines without one are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
A GAME step's variant is now only its action's name (mart, teach, pc,
grind, grind_check, capture, fossil, level); what the action reads moves
to StoryStep::args, and a Mart's purchases to the step's items. Each
action declares its args in the action table, so lint_story_checkpoint()
checks every step against them, and each step reads its plan with
parse_<action>_step(). The story's plans are converted; the sim trace is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 10, 2026
#314 moved the GAME steps' arguments into args; the next commit moves
00.30's steps and the use_item and lift_floor actions over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
dayfine added a commit that referenced this pull request Nov 10, 2026
The use_item and lift_floor actions read their item and floors from
StoryStep::args and declare them in the action table, as #314's actions
do. 00.30's Mart and capture steps and the draft plans are converted;
the sim trace is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant