Repository navigation
Design: detail the Sword/Shield AutoStory work plan - #516
Conversation
dayfine
left a comment
There was a problem hiding this comment.
Reviewed SHA: f32c4c9
Verdict
NEEDS_REWORK
Design-doc review (Markdown only; CI, code health 0, no tabs, LF like the sibling docs). Claims were checked against fork main, nav/shared, autostory/engine, plza/story-base, the fork PR list and upstream PokemonAutomation#1207 at 32d506c27.
What checks out: PokemonAutomation#1207 is seven segments with save_from_overworld(), 20-30 s stick holds and the §2.4 segment contents; the §2.1 engine pieces (Pokemon/AutoStory/Engine/, StoryBackend::stick(), ZonePose, FakeStoryBackend, CommonTools/ScreenEvents/, feedback-driven SystemKeyboardTyping console-tested in BDSP and PLZA) exist on nav/shared; every §2.2 SwSh routine exists under VideoGames/PokemonSwSh/; PLZA's AutoStory/ has the Backend / Game / ScreenEvents / SceneMachine / Actions / Detectors / StoryData shape §5 copies. The Gate A / Gate B split and the pre-Leon endpoint are sound.
Major
-
§3 action table ignores the engine's adapter contract (
Pokemon/AutoStory/Engine/MIGRATION.mdonnav/shared). The engine has built-in kinds/names (mash,talk,talk_no_text,answer,yes,fight,save,legs,face) and hook kinds a game registers under the built-in kind and name (new_game,options,route,ready,heal,shop,train); "a replacement uses the built-in's kind and name". It says "Don't registersave: the engine owns the SAVE step; giveStoryGame::save", andreload,begin_attempt,interruptsareStoryGamehooks, not actions. The plan listssave_story_gameandreload_story_saveas registered actions, and 15 new names with no mapping:mash_scene_to_controlis the built-inmash;interactistalk/talk_no_text;choose_dialog_rowisanswer;set_story_optionsis theoptionshook;launch_fresh_save+language+appearance+name are thenew_gamehook;walk_to_landmark/walk_until_eventare aroutereplacement or GAME steps;fight_story_battleisfightoverStoryBackend::battle(). Also absent:spec.console_only(keyboard, menus: the engine refuses them off-console and never reloads for them), the"heading"reading (STORY_HEADING),StoryReaderUse::AFTER_CHECKPOINTreaders for postconditions, andStoryActionRegistry::lint. Rewrite §3 as "engine kind/name -> SwSh handler", move save/reload to aStoryGamehooks row, and mark the console-only ones. -
§2.1 claim "PLZA ... landmark-steered walks" is wrong.
PokemonLZA_AutoStoryMoves.h: "recorded turns and timed walks, the compass, a fast travel"; MIGRATION.md "Per game / PLZA": walks areTIMED_LEGSargs, turns arestick()after the camera recenter, the minimap arrow is theheadingreading. The only visual arrival isPlatformArrivalDetector(wait_for_platform,walk_to_prompt). So the §6 landmark walker has no precedent on the engine; say so, and say whether it is aroutereplacement withTIMED_LEGS-shaped args plus a landmark endpoint or a new arg shape (that decides whetherStoryStepJsonand the lint change, i.e. a shared-engine PR before S5). Also "proven structurally by PLZA": PLZA's adapter is open PR #354 (base #416 -> #448); name it. -
§11 "visual walking remains console-only offline" conflicts with the project's test rule. AGENTS.md (agents branch) "A console failure becomes a test first" and MIGRATION.md §5 "each console failure stays a red-first regression test". With no motion model, S5-S8 walk failures have no stated red test. Say what it is, e.g. the landmark reader replayed over the failure frames (#306) plus a
FakeStoryBackendscript with the observedheading/landmark readings reproducinglost; and note that #306 (frame replay) and #308 (failure capture) are OPEN onnav/grid-story-steps, not innav/shared, so S9 depends on them merging.
Medium
-
Existing landmark-alignment work not cited.
docs/design/AutoStory.md§4.3 documents PokemonAutomation#1717'smatch_landmarksloop (TM_CCOEFF_NORMED per landmark, margin over the best competitor, several landmarks must agree, fine then coarse pass, 3 consecutive hits, one-axis nudges, lost/give-up bounds, lighting pairs per hour).AutoStory-Lessons.mdr28: landmark scores fell to 0.41/0.60 after 3.5 h clock drift;AutoStory-Navigation-Stack.md"Drop the clock pin": pinning the Switch clock broke runs (r108). Galar's towns have a real-time day/night cycle, so §6 should adopt or reject that loop's shape and failure modes, and §9 item 9 should name r28 and settle day/night handling before S5, not as a support decision. -
Merged shared pieces the actions overlap but the plan does not name. #477
Pokemon_StoryLaunch(HOME -> overworld on a save; "never starts a new game"), solaunch_fresh_savesits after it andreload_story_saveis its job, not a new action; #479Pokemon_StoryFailureClassesfor S9's sweep; #474 shared story files / dev-folder override forStoryData/; PLZAControlsHintDetector+mash_to_move_hintsas the pattern for the §4.2 "early player-control cue" (the plan calls it the first detector risk with no precedent). -
§2.1 names the wrong thing about branches. "#114 ... #332 ... merged into their parent branches" is true but the usable fact is that
nav/sharedis the trunk carrying Engine/, ScreenEvents/, ScreenMachine/, the keyboard driver, failure classes and StoryLaunch, and the PLZA stack bases on it. Namenav/sharedas the base for S1+. Also BDSP and FRLG are not on the engine yet (MIGRATION.md order FRLG, BDSP, PLZA; noStoryGame/StoryEngineuse on the bdsp/* or frlg/* branches sampled); §2.1 reads as if three games already run on it. -
§5 layout path is PokemonAutomation#1207's pre-move path. SwSh lives at
SerialPrograms/Source/VideoGames/PokemonSwSh/onmain;PokemonSwSh/Programs/AutoStory/is where PokemonAutomation#1207 put it before the move. PLZA's shape also has*_AutoStoryTable.*,*_AutoStorySceneMachine.*,*_AutoStoryStepValidator.*and*_AutoStoryReadings.h, which the layout omits while routine 4 names a scene machine.
Minor
-
§2.2 names that do not grep.
DialogBoxDetector->BlackDialogBoxDetector/WhiteDialogBoxDetector(PokemonSwSh_DialogBoxDetector.h);StartBattle->StartBattleWatcher; "overworld mark tracker and trajectory table" ->OverworldTargetTracker,OverworldTrajectory,MarkFinder(Programs/OverworldBot/). R0 will grep these. -
Architecture doc now contradicts the plan it links. §8.1 "Rows are C++, maps are JSON" and §7 "Not covered yet: naming with a keyboard" are stale: checkpoints are JSON on the engine (MIGRATION.md §3) and the keyboard driver is #62, console-tested. Since this PR edits the architecture doc, add the one-line correction there.
-
Wording. §1 "This replaces the full scope of PokemonAutomation#1207" sits against the architecture's "offer the engine to its author rather than take it over" (which §10 repeats); "covers" says what is meant.
Map actions to the engine's kinds and names and StoryGame hooks, mark console_only ones; walks follow PLZA's TIMED_LEGS model with the final shape after R0; name nav/shared as the base, the merged shared pieces and the open PLZA adapter; cite PokemonAutomation#1717's landmark loop and r28/r108 for day/night; propose the red-first test for walk failures; fix detector names and the layout path; correct two stale lines in the architecture.
|
Review 5909529113 applied in 0b1cf53 (Markdown only; code health 0).
|
|
Reviewed updated SHA
|
The fresh start needs a typed no-save end for launch_story_game(): today a policy.new_game screen fails as launch_failed, which the plan no longer reads as the fresh-profile branch. Areas are carried per step in declared_after; no generic "pose" reader until R0 shows an area classifier, and only the station approach supplies one. Galar's towns and routes use story time before Champion, so Gate A lighting is characterized and the real-time matrix moves to the Wild Area slice. The walk-failure test states its coverage boundary and asserts nothing is dispatched after lost. The architecture doc now says checkpoints are JSON and exceptional beats are C++ handlers in both places.
|
Answers to the five questions, applied in 68761f5 (Markdown only; code health 0). Each claim was checked against
|
Base:
main. Parents: none. The diff shows only this documentation change.The AutoStory architecture names Sword/Shield as the first free-moving target but gives only the new-game-to-Wedgehurst milestone. This adds a SwSh work plan: Gate A ends at the first station approach and Gate B at the first Wild Area. It maps actions to the engine's kinds, names and
StoryGamehooks onnav/shared, and plans walks in PLZA's timed-leg model, with the final shape settled after R0. It also lists the detector and day/night research and splits the work into slices with acceptance gates. It treats PokemonAutomation#1207 as route evidence and corrects two stale lines in the architecture doc; Markdown only, code health 0.