feat(coordinator): a smarter planning prompt: uncapped measurement, CPU- or GPU-bound scenarios, cleaned up #172

Merged
HumanBean merged 1 commit from HumanBean/Beanstalk:feat/planner-prompt into main 2026-11-30 02:45:34 +00:00
Owner

What

A rewrite of the AI planner's prompt (coordinator/beanstalk/planner.py) so plans measure what the change actually affects. It changes only the prompt and the test assertions that quote it.

Why

At the game's default 60 fps cap every PC reports about 16.7 ms a frame on both sides, so frame-time comparisons can't show a change. On Longshot #2839 (a GPU-side page-table lookup), a maintainer had to spell out "uncapped, vsync off, so the GPU is the limit". The planner should do that unasked.

The new measurement step (METHOD step 4)

  • Uncapped: every scenario that measures frames sets frame_rate_cap = 6 and vsync = 2, unless the change is about the cap, pacing, vsync or dynamic resolution.
  • Fixed render size: quality_preset = 0 (never Auto), resolution never 0 (Auto is dynamic resolution), RX_VK_AUTO_TUNE = "0".
  • The side that limits:
    • GPU-side code: HOS_OUTPUT_RES = "2560x1440".
    • CPU-side code: HOS_OUTPUT_RES = "1280x720".
    • Unclear: one start at 1440p, measured at 100 %, then at 50 % (resolution = 4) with a live option step, so it costs no extra game start.
  • Rules: frame-time rules go on the measure whose limit is the changed code's side. gpu_passes / gpu_total_ms are offered to show a run really was GPU-bound.
  • Per-GPU sizes (4K on the biggest cards): the prompt says they can't be planned yet. Scenario settings apply to every tester, so this needs agent work later.

HOS_OUTPUT_RES takes effect headless: Longshot's host/nn_applet.c:169-171 reads it at boot, and only the handheld profile skips it. The headless present image is fixed at 1920x1080 (vk_main.cpp:2111), but that is not the size the game renders at. Without it the output is the game's 2560x1440, or the tester's screen when that is smaller, so pinning it also makes testers alike.

Cleanup

  • Schema ladder ("11 for…, 10 for…") replaced by schema = 11, always: check_plan accepts 11 for any plan and lowers it itself.
  • Order: goal, method, schema reference, checks before answering.
  • Repetition: the window/headless rules and several repeated tips are said once.
  • The untrue "fixed 1920x1080 output, can't be set" is gone.
  • Made true to the validator:
    • Picture comparisons need runs >= 2.
    • At most 24 settings.
    • A matrix key can't also be set in its scenarios.
    • One probe of each kind.
    • Names at most 24 characters.
    • RX_VK_GPU_PROFILE is forbidden.
    • Build variants, a cold cache and driver_warm count toward the time estimate.

The whole prompt is about the same length.

Not run locally

Written by a Claude agent and checked by another; nothing run on this PC (no local Beanstalk runs). CI's coordinator tests run test_planner.py. docs/test-plan.md lines 273 and 591 are now slightly stale (the method steps, the 1920x1080 claim), left for a docs follow-up.

🤖 Generated with Claude Code

## What A rewrite of the AI planner's prompt (`coordinator/beanstalk/planner.py`) so plans measure what the change actually affects. It changes only the prompt and the test assertions that quote it. ## Why At the game's default 60 fps cap every PC reports about 16.7 ms a frame on both sides, so frame-time comparisons can't show a change. On Longshot #2839 (a GPU-side page-table lookup), a maintainer had to spell out "uncapped, vsync off, so the GPU is the limit". The planner should do that unasked. ## The new measurement step (METHOD step 4) - **Uncapped:** every scenario that measures frames sets `frame_rate_cap = 6` and `vsync = 2`, unless the change is about the cap, pacing, vsync or dynamic resolution. - **Fixed render size:** `quality_preset = 0` (never Auto), `resolution` never 0 (Auto is dynamic resolution), `RX_VK_AUTO_TUNE = "0"`. - **The side that limits:** - GPU-side code: `HOS_OUTPUT_RES = "2560x1440"`. - CPU-side code: `HOS_OUTPUT_RES = "1280x720"`. - Unclear: one start at 1440p, measured at 100 %, then at 50 % (`resolution = 4`) with a live option step, so it costs no extra game start. - **Rules:** frame-time rules go on the measure whose limit is the changed code's side. `gpu_passes` / `gpu_total_ms` are offered to show a run really was GPU-bound. - **Per-GPU sizes (4K on the biggest cards):** the prompt says they can't be planned yet. Scenario settings apply to every tester, so this needs agent work later. `HOS_OUTPUT_RES` takes effect headless: Longshot's `host/nn_applet.c:169-171` reads it at boot, and only the handheld profile skips it. The headless present image is fixed at 1920x1080 (`vk_main.cpp:2111`), but that is not the size the game renders at. Without it the output is the game's 2560x1440, or the tester's screen when that is smaller, so pinning it also makes testers alike. ## Cleanup - **Schema ladder** ("11 for…, 10 for…") replaced by `schema = 11`, always: `check_plan` accepts 11 for any plan and lowers it itself. - **Order:** goal, method, schema reference, checks before answering. - **Repetition:** the window/headless rules and several repeated tips are said once. - **The untrue "fixed 1920x1080 output, can't be set"** is gone. - **Made true to the validator:** - Picture comparisons need runs >= 2. - At most 24 settings. - A matrix key can't also be set in its scenarios. - One probe of each kind. - Names at most 24 characters. - `RX_VK_GPU_PROFILE` is forbidden. - Build variants, a cold cache and `driver_warm` count toward the time estimate. The whole prompt is about the same length. ## Not run locally Written by a Claude agent and checked by another; nothing run on this PC (no local Beanstalk runs). CI's coordinator tests run `test_planner.py`. `docs/test-plan.md` lines 273 and 591 are now slightly stale (the method steps, the 1920x1080 claim), left for a docs follow-up. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(coordinator): a smarter planning prompt: uncapped measurement, CPU- or GPU-bound scenarios, cleaned up
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 6s
CI / Coordinator tests (pull_request) Has been cancelled
CI / Agent build and checks (pull_request) Has been cancelled
CI / Coordinator image (pull_request) Has been cancelled
cc03a99d4e
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member

Possibly related, for context:

  • PR #113 WIP: feat(agent): send the game's performance statistics when a plan asks — Open planner-adjacent work on performance-statistics probes and schema 10.
  • issue #88 The frame-time rule fails and passes PRs by chance, and the farm cannot see whether frame generation ran — Open issue documents capped timing measurements; this prompt adds uncapped scenarios.
Possibly related, for context: - PR #113 WIP: feat(agent): send the game's performance statistics when a plan asks — Open planner-adjacent work on performance-statistics probes and schema 10. - issue #88 The frame-time rule fails and passes PRs by chance, and the farm cannot see whether frame generation ran — Open issue documents capped timing measurements; this prompt adds uncapped scenarios.
HumanBean force-pushed feat/planner-prompt from cc03a99d4e
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 6s
CI / Workflow lint (actionlint) (pull_request) Successful in 6s
CI / Coordinator tests (pull_request) Has been cancelled
CI / Agent build and checks (pull_request) Has been cancelled
CI / Coordinator image (pull_request) Has been cancelled
to 617531e4b2
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 8s
CI / Workflow lint (actionlint) (pull_request) Successful in 8s
CI / Coordinator tests (pull_request) Failing after 1m54s
CI / Agent build and checks (pull_request) Successful in 2m33s
CI / Coordinator image (pull_request) Successful in 23s
2026-11-30 02:45:27 +00:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Beanstalk!172
No description provided.