renforge

v0.7.6
io.github.alex-jordan547/renforge Checked 15 hours ago Published 13 days ago

Inspect, drive and debug a running Ren'Py game: state, screenshots, guarded clicks, saves, builds.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

renforge_info Renforge Info

Call this first. It returns the active project target (dashboard, "serve_default" or cwd), plus local runtime hints and RenForge version. Use this to determine the project path you should pass to project-scoped tools.

renforge_context Renforge Context

Return the same full payload as `renforge_info`, including active project discovery, dashboard/runtime hints, and RenForge version. This is an alias, not a reduced view.

renforge_inspect_image Renforge Inspect Image

Inspect a local image file and optionally crop/zoom it before returning PNG bytes. Use this for artifact review without launching the game.

ParameterTypeDescription
image_path *stringLocal image path to load and inspect.
crop_heightintegerOptional crop height in pixels; 0 keeps full height.
crop_widthintegerOptional crop width in pixels; 0 keeps full width.
crop_xintegerPixel offset from left for the crop rectangle origin.
crop_yintegerPixel offset from top for the crop rectangle origin.
scalenumberScale multiplier applied after crop; > 1 zooms in, < 1 zooms out.

renforge_inspect_project Renforge Inspect Project

Read-only static analysis of a Ren'Py project: scan metadata and file structure without starting the game engine. Use this for safe project triage before runtime actions.

ParameterTypeDescription
project_path *stringAbsolute or relative Ren'Py project root containing `game/`.

renforge_scan_project Renforge Scan Project

Search project scripts with bounded output. Use `sections`, `file_glob`, and `symbol` for focused indexing, then paginate with `offset` and `limit` for stable batches.

ParameterTypeDescription
project_path *stringProject root to index for static analysis.
file_globstringOptional filename glob filter for targeted scan files.
limitintegerMaximum items per page. Keep values bounded to avoid large payloads.
offsetintegerZero-based pagination offset for scan results.
sectionsOptional sections: `files`, `variables`, `graph`, `labels`, `jumps`, `calls`, `menus`, `characters`, `images`, and `unresolved_targets`.
symbolstringFilter matches for this symbol; empty keeps section-wide scan.

renforge_find_references Renforge Find References

Find symbol definitions and references across scripts and templates with the same pagination controls as scan. Useful before editing or renaming project identifiers.

ParameterTypeDescription
project_path *stringProject root where symbol references should be resolved.
symbol *stringSymbol name to resolve (for example label, define, or python identifier).
file_globstringOptional glob filter limiting candidate files.
limitintegerMaximum results to return; keep this bounded for large codebases.
offsetintegerZero-based pagination offset for matches.

renforge_parse_lint Renforge Parse Lint

Parse existing Ren'Py lint output text and return normalized diagnostics. This does not run Ren'Py, does not execute code, and does not touch the runtime.

ParameterTypeDescription
text *stringExisting Ren'Py lint output text to parse.

renforge_validate Renforge Validate

Run Ren'Py `lint` against a clean shadow copy of the project tree: no live session artifacts, optional staged bytes overlaid, and RenForge never publishes staged or copied bytes into the project. Lint executes the project's `init python` blocks with your privileges, so the shadow does not sandbox arbitrary writes made by project code. The shadow omits RenForge-injected files using `.renforge/control/artifacts.json` when available plus the known `zzrenforge_*` and `00renforge_session_*` prefixes. Linked directories are never copied byte-for-byte and are reported in `skipped_links`; a link under…

ParameterTypeDescription
project_path *stringRen'Py project root containing `game/`.
checksOptional checks. Only `["lint"]` is supported; any other value is rejected.
keep_shadowbooleanKeep the temporary shadow after validation and return `shadow_path`; cleanup then belongs to the caller.
stagedOptional overlay map from a project-relative (`game/script.rpy`) or game-relative (`script.rpy`) path to UTF-8 text. Staged bytes live only in the temporary shadow and count against shadow quotas.
timeoutnumberLint timeout in seconds. `0` derives `min(180, max(1, attestation_timeout*3))` (90 seconds by default); explicit values are clamped to 1-600.
versionstringRen'Py SDK version selector: `stable` (default) or an explicit version such as `8.5.3`. `stable` honors `RENPY_SDK_STABLE_VERSION`. The project tree is never searched for an SDK.

renforge_launch Renforge Launch

Start or attach a running game session with Live Editor enabled by default (pass editor=false for non-editor runtime launch). Launch starts the background startup flow, usually returning while startup is still in progress; poll `renforge_launch_status` and capture with `renforge_screenshot` before interaction. Saves and HOME default to the user's own; pass `savedir=temporary` (or set `RENFORGE_ISOLATION=temporary`) to isolate saves, persistent data, preferences, and HOME so the session does not read or write the user's normal Ren'Py state. The ready payload includes `session_id` and an `isolat…

ParameterTypeDescription
project_path *stringProject root passed to the launcher and runtime bridge.
audiostringAudio strategy: `auto`, `native`, `dummy`, or `none`; both `dummy` and `none` use SDL dummy audio.
cleanup_on_stopbooleanWhen true, stop removes only the disposable session directory created for isolated `savedir`/`home` (saves plus private HOME). Arbitrary save directories, explicit HOME paths, and existing user files…
displaystringDisplay strategy: `auto`, `native`, `xvfb`, or `external`. The accepted token `none` returns an error because Ren'Py requires a display surface.
editorbooleanEnable/disable live editor injection; default True for interactive work.
homestringProcess HOME for the launched game. Omitted, empty, or `auto` follows `savedir`: a private directory for `savedir=temporary`, so preferences and `~/.renpy` writes miss the user's files, otherwise the…
languageOptional Ren'Py language code set as `RENPY_LANGUAGE` for a fresh game process. Ren'Py persists it as `preferences.language`, so this changes the stored preference, not just one session; for verificat…
persistentstringPersistent state follows the selected save directory. Omitted or `auto` selects `empty` for a fresh temporary directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; it…
preferencesstringPreferences share Ren'Py's persistent storage. Omitted or `auto` selects `empty` for a fresh temporary save directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; prefe…
savedirstringSave location. `temporary` isolates the session: saves, persistent data, preferences, and HOME go to a disposable folder, so the game cannot read or write the user's normal Ren'Py saves. Omitted, empt…
timeoutnumberRen'Py background startup deadline in seconds (0 uses the launcher default). This does not control the MCP response wait; poll `renforge_launch_status` after a `starting` result.
versionstringLauncher version selector, either `stable` or an explicit semantic version (for example `8.5.3`).
warpstringOptional Ren'Py `file.rpy:line` startup target; this launch tool does not resolve label names. A warp launch replaces a running game like `renforge_jump`: with every isolation knob omitted or `auto`,…

renforge_launch_status Renforge Launch Status

Poll launch progress and return `idle`, `starting`, `ready`, `failed`, `closing`, or `closed`. Use after any launch start when the first call has not returned an immediate ready state. A ready payload repeats `session_id` and the `isolation` object from launch (only `isolation` for a game started by another process).

ParameterTypeDescription
project_path *stringProject root currently being launched or running.

renforge_jump Renforge Jump

Restart into a specific label/file position and keep interacting in a fresh game session. If needed, this may download and cache the required SDK before restart. Isolation matches `renforge_launch` (opt in with `savedir=temporary`). With every isolation knob omitted or `auto`, a relaunch that replaces an isolated game this server (or its dashboard) owns stays isolated; it still gets a fresh session, so slots imported into the old one are not carried over. Use for deterministic positioning before scripted checks.

ParameterTypeDescription
project_path *stringProject root containing the target game.
target *stringLabel name or `file:line` destination for relaunch.
homestringProcess HOME for the launched game. Omitted, empty, or `auto` follows `savedir`: a private directory for `savedir=temporary`, so preferences and `~/.renpy` writes miss the user's files, otherwise the…
persistentstringPersistent state follows the selected save directory. Omitted or `auto` selects `empty` for a fresh temporary directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; it…
preferencesstringPreferences share Ren'Py's persistent storage. Omitted or `auto` selects `empty` for a fresh temporary save directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; prefe…
savedirstringSave location. `temporary` isolates the session: saves, persistent data, preferences, and HOME go to a disposable folder, so the game cannot read or write the user's normal Ren'Py saves. Omitted, empt…
versionstringRuntime version to use when restarting at target.

renforge_new_game Renforge New Game

Restart at `start` and begin a new story progression. This may download and cache the required SDK before the fresh launch. Isolation matches `renforge_launch` (opt in with `savedir=temporary`). With every isolation knob omitted or `auto`, a relaunch that replaces an isolated game this server (or its dashboard) owns stays isolated; it still gets a fresh session, so slots imported into the old one are not carried over. Prefer this for clean scenario entry rather than reusing unstable runtime state.

ParameterTypeDescription
project_path *stringProject root containing the game to restart.
homestringProcess HOME for the launched game. Omitted, empty, or `auto` follows `savedir`: a private directory for `savedir=temporary`, so preferences and `~/.renpy` writes miss the user's files, otherwise the…
persistentstringPersistent state follows the selected save directory. Omitted or `auto` selects `empty` for a fresh temporary directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; it…
preferencesstringPreferences share Ren'Py's persistent storage. Omitted or `auto` selects `empty` for a fresh temporary save directory and `existing` for a reused directory. `empty` requires `savedir=temporary`; prefe…
savedirstringSave location. `temporary` isolates the session: saves, persistent data, preferences, and HOME go to a disposable folder, so the game cannot read or write the user's normal Ren'Py saves. Omitted, empt…
versionstringRuntime version used for the fresh launch.

renforge_stop Renforge Stop

Stop the live runtime and cleanup the launch/session state. Running games may be interrupted, and active quick-save/lock state should be considered volatile after stop.

ParameterTypeDescription
project_path *stringProject root whose active launch should be stopped.

renforge_game_state Renforge Game State

Read full live state for debugging and monitoring. Use this before/after interactions to verify state deltas without changing variables directly. Request optional sections such as `metrics` and `audio`.

ParameterTypeDescription
project_path *stringProject root with an active live session.
includeOptional sections to include in addition to default state (for example metrics, audio).

renforge_game_state_compact Renforge Game State Compact

Read bounded live state with explicit variable limits and payload caps for large sessions. Use this in loops and scripts to keep responses predictable.

ParameterTypeDescription
project_path *stringProject root with an active live session.
max_depthintegerMaximum object nesting depth to serialize, from 0 through 20.
max_itemsintegerMaximum variable count before trimming, from 1 through 10000.
max_output_bytesintegerPayload cap in bytes, from 64 through 2000000.
state_profilestringCompact shape policy: `minimal`, `interaction`, `debug`, or `full`.
variable_namesRestrict output to these variable names.
variable_prefixstringFilter variable names by this prefix.

renforge_inspect_screen Renforge Inspect Screen

Inspect a named active screen, including layer, scope and arguments. Useful for branch verification before choosing click or hover selectors.

ParameterTypeDescription
name *stringScreen name to inspect in the live bridge state.
project_path *stringProject root with active game session.

renforge_eval Renforge Eval

Evaluate an arbitrary Python expression in the running store namespace. This may call project functions and mutate runtime state or access the filesystem, start processes, and use the network with the game process's permissions. Prefer `renforge_get_var` for plain reads and use this only for controlled diagnostics. Pass `authorize=true` when `RENFORGE_POLICY=enforce`, unless this operation is allowlisted.

ParameterTypeDescription
expr *stringPython expression to evaluate in the store namespace.
project_path *stringProject root with active live session.
authorizebooleanExplicitly authorize this open-world expression when `RENFORGE_POLICY=enforce`.

renforge_set_var Renforge Set Var

Write a game variable directly in the live store namespace. This mutates state immediately and should be used after validating the current state snapshot.

ParameterTypeDescription
name *stringVariable name to set.
project_path *stringProject root with active live session.
value *Value to write to the variable (JSON-compatible serializable object).

renforge_get_var Renforge Get Var

Read one named variable from the live store. JSON-safe values are returned as-is; other objects are replaced by a type label without calling conversion hooks such as `__repr__`. Resolving the name can still run a store property getter. Prefer this over `renforge_eval` when you only need a named lookup.

ParameterTypeDescription
name *stringVariable name to read.
project_path *stringProject root with active live session.

renforge_poll_events Renforge Poll Events

Read queued runtime events since a stream index. Use this for deterministic event-driven debugging instead of polling live UI repeatedly.

ParameterTypeDescription
project_path *stringProject root with active live session.
sinceintegerExclusive cursor position for pagination of event history.

renforge_get_errors Renforge Get Errors

Read recent runtime and bridge errors. Run this after risky actions or after a stop to confirm the game did not crash with hidden diagnostics.

ParameterTypeDescription
project_path *stringProject root; this can still read bounded crash files after the runtime stops.
sinceintegerExclusive cursor for paginating older logs/diagnostics.

renforge_wait_until Renforge Wait Until

Wait for one stable condition (`label`, `screen`, or `expr`). Prefer `label` or `screen` when possible; `expr` is arbitrary Python evaluated repeatedly in the store namespace and may mutate game state, access the filesystem, start processes, or use the network with the game process's permissions. Keep timeout bounded.

ParameterTypeDescription
project_path *stringProject root with active live session.
exprExpression condition to evaluate and await success. Evaluated repeatedly during waiting.
includeOptional fields to include in compact state output.
intervalnumberPolling interval in seconds.
labelTarget label to wait for; provide either label, screen, or expression.
max_depthintegerMaximum object nesting depth in compact state, from 0 through 20.
max_itemsintegerMaximum list/map items in compact state, from 1 through 10000.
max_output_bytesintegerPayload cap for the result, from 64 through 2000000 bytes.
screenTarget screen name to wait for.
state_profilestringReturned state shape: `minimal`, `interaction`, `debug`, or `full`.
timeoutnumberMaximum wait time, a finite value between 0 and 120 seconds.

renforge_advance Renforge Advance

Advance one dialogue event from the currently active queue. Prefer `renforge_control(action="advance")` only when you intentionally need control-command consistency with other navigation actions.

ParameterTypeDescription
project_path *stringProject root of the running live session.

renforge_control Renforge Control

Run a runtime control action (`advance`, `rollback`, `toggle_skip`, `toggle_auto`, `toggle_afm`, `game_menu`, `hide_windows`, `quick_save`, `quick_load`, `reload_script`, `restart_interaction`, `quit`). Use `quick_load` with care: it replaces live state. `quit` stops the active game session. `renforge_advance` is a narrower alternative for pure advance actions. Destructive actions require `authorize=true` when `RENFORGE_POLICY=enforce`.

ParameterTypeDescription
action *stringControl verb name to execute.
project_path *stringProject root with running live session.
authorizebooleanExplicitly authorize destructive actions when `RENFORGE_POLICY=enforce`; ignored for lower-risk actions.
effect_timeoutnumberMaximum seconds to wait when `wait_for_effect` is enabled.
interaction_idstringOptional interaction correlation id used for safety checks and logs.
wait_for_effectbooleanWait until bridge reports visible state effect before returning.

renforge_send_input Renforge Send Input

Send exactly one input command path (text, key, or scroll object) into the live game. Keep calls scoped and single-purpose; for deterministic workflows prefer one action per invocation.

ParameterTypeDescription
project_path *stringProject root with active live session.
keyReadable named key such as `enter`, `esc`, an arrow, `pageup`, `pagedown`, `backspace`, `delete`, `home`, `end`, `space`, `tab`, or a function key.
scrollLogical-coordinate object `{"x": number, "y": number, "direction": "up"|"down", "amount": integer?}`.
submitbooleanPress Enter after injected text; only valid with text input, not key or scroll.
textText to inject as character-by-character text input.

renforge_saves Renforge Saves

List, load, save, or import named slots in a single command family. `list` reads the running (usually isolated) session; `list_user` observes host slots in the host Ren'Py save folder and `game/saves` without a running game and never writes. `import` copies selected host slots into the isolated session savedir (never bind-mounts the user tree) and is refused unless the session was launched with `savedir=temporary`. `load` replaces live state and `save` can overwrite the chosen slot. Verify slot names before mutating gameplay progress. `load` requires `authorize=true` when `RENFORGE_POLICY=enfo…

ParameterTypeDescription
action *stringOne of `list`, `list_user`, `import`, `load`, or `save`.
project_path *stringProject root of the live game (or of the project whose host saves should be listed or imported).
authorizebooleanExplicitly authorize `load` when `RENFORGE_POLICY=enforce`; ignored for list, list_user, import, and save.
extra_infoOptional save metadata for save actions.
patternOptional glob for `list_user` or `import`, matched against the whole slot name: `*` any run of characters, `?` one character, `[ab]` one of a set (for example `1-*` or `auto-?`). At most 256 character…
regexpOptional regex filter for `list`, applied by Ren'Py's `renpy.list_slots` in the game.
slotSlot label used by save/load/import. Import also accepts `slots` or `pattern`.
slotsOptional list of host slot names to copy for `import` (at most 1000 names of at most 256 characters).

renforge_list_choices Renforge List Choices

List on-screen menu choices with index and text ordering. Call before `renforge_select_choice` to pick valid entries for the current menu state.

ParameterTypeDescription
project_path *stringProject root of the running live session.

renforge_select_choice Renforge Select Choice

Select a menu choice by case-insensitive text or zero-based index. Text matching prefers an exact match, then uses the shortest case-insensitive substring match. Use list output first to avoid ambiguous partial text.

ParameterTypeDescription
project_path *stringProject root of the running live session.
indexZero-based choice index fallback when text is omitted.
textVisible text to match; preferred over index.

renforge_list_ui_elements Renforge List Ui Elements

List focusable UI elements with bounds and element metadata. Use this first for semantic interaction planning; it is narrower than a full scene readout and aligned to click/hover workflows.

ParameterTypeDescription
project_path *stringProject root with active live session.
element_typestringOptional element type/class filter (for example button, label).
screenstringOptional active screen filter.
textstringOptional text filter to narrow focusable candidates.

renforge_click_element Renforge Click Element

Click a semantic UI element by text/id/screen (preferred). Falls back safely through fresh frame guards and returns focus hints when another element captures the hit test. Use `renforge_click_at` only as coordinate fallback.

ParameterTypeDescription
project_path *stringProject root with active live session.
effect_timeoutnumberHow long to wait when `wait_for_effect` is true.
element_idstringExact control id override when text is unstable.
exactbooleanEnable strict text matching.
expected_frame_idstringOptional frame id from a recent scene/listing call; when supplied it rejects a stale frame.
interaction_idstringOptional interaction correlation id for logs/troubleshooting.
screenstringOptional screen name filter to scope semantic lookup.
textstringPreferred visible text matcher for the target control.
wait_for_effectbooleanWait for a visual effect/state update before returning.

renforge_hover_element Renforge Hover Element

Move cursor over a semantic control by text/id/screen. Prefer this before click when checking hover states or tooltips.

ParameterTypeDescription
project_path *stringProject root with active live session.
element_idstringElement id matcher for precise targeting.
exactbooleanRequire exact text match.
expected_frame_idstringFrame id expected from recent scene/listing calls.
screenstringScreen filter for ambiguous UI states.
textstringText matcher for the control to hover.

renforge_get_ui_element_bounds Renforge Get Ui Element Bounds

Resolve semantic element bounds without clicking. Use this after list output to verify target geometry before any pointer action.

ParameterTypeDescription
project_path *stringProject root with active live session.
element_idstringElement id matcher for a precise target.
exactbooleanRequire exact text matching.
expected_frame_idstringOptional frame guard token for freshness.
screenstringOptional screen filter for targeted lookup.
textstringText matcher for the element.

renforge_editor Renforge Editor

Drive the in-game Live Editor with public actions `status`, `select`, and `save`. `select` uses the overlay hit path in `logical` or `screenshot` coordinates. `save` is the overlay Save (reload + attest), not a silent source write. `save` with `dry_run=true` returns a unified source diff and applies nothing: it skips shadow validation, publish, reload, and attestation, and creates no transaction. Never call private `editor_task0_*` handlers.

ParameterTypeDescription
action *stringOne of `status`, `select`, or `save`.
project_path *stringProject root with an active live session and Live Editor.
coordinate_spacestring`logical` (default) or `screenshot` coordinates.
dry_runboolean`save` only. Preview the source diff without writing, linting, reloading, or creating a transaction. Cannot be combined with x/y.
expected_frame_idstringOptional frame id from a recent screenshot or listing; rejects a stale frame.
xRequired for `select`. Optional destination for `save` when applying a move.
yRequired for `select`. Optional destination for `save` when applying a move.

renforge_click_at Renforge Click At

Click a coordinate in screenshot or logical space. Use semantic click first (`renforge_click_element`) and fall back when text/id selectors are unavailable. Combine with coordinate space and frame/state guards.

ParameterTypeDescription
project_path *stringProject root with active live session.
x *numberHorizontal coordinate in selected coordinate space.
y *numberVertical coordinate in selected coordinate space.
coordinate_spacestring`logical` (default) or `screenshot` coordinates.
expected_frame_idstringFrame id that must match for safety checks.
expected_stateOptional expected runtime state dictionary before click.

renforge_get_displayable_bounds Renforge Get Displayable Bounds

Read placement bounds for a rendered displayable tag by tag name. Use this to diagnose layout changes or anchor calculations before moving elements.

ParameterTypeDescription
project_path *stringProject root with active live session.
tag *stringDisplayable tag name to resolve.
layerstringOptional Ren'Py layer override.

renforge_position_element Renforge Position Element

Reposition a shown image tag live and return new logical bounds. This mutates runtime placement only; after converging with scene/measure tools, write the final values into the `.rpy` source.

ParameterTypeDescription
project_path *stringProject root with active live session.
tag *stringDisplayable tag to reposition.
layerstringOptional Ren'Py layer override.
rotateRotation in degrees.
xalignAlternative x alignment offset.
xanchorAnchor point for x placement (0..1).
xoffsetRelative x offset in pixels.
xposX position: an integer is absolute logical pixels; a float is a screen fraction (for example 0.5).
yalignAlternative y alignment offset.
yanchorAnchor point for y placement (0..1).
yoffsetRelative y offset in pixels.
yposY position: an integer is absolute logical pixels; a float is a screen fraction (for example 0.5).
zoomScale factor for the displayable.

renforge_hit_test Renforge Hit Test

Inspect which interactive nodes sit under a coordinate. Use this when click targets look stale or overlays may absorb events, and prefer semantic selectors once ambiguity is resolved.

ParameterTypeDescription
project_path *stringProject root with active live session.
x *numberX coordinate for hit testing.
y *numberY coordinate for hit testing.
coordinate_spacestringCoordinate system for the test point (`logical` or `screenshot`).

renforge_diff_screenshots Renforge Diff Screenshots

Diff two PNG frames and return whether pixels changed plus the minimal changed rectangle. Use for regression checks between pre/post actions.

ParameterTypeDescription
before_path *stringPath to baseline PNG file.
project_path *stringProject root used for path resolution of before/after images.
after_pathstringPath to comparison PNG; omit to compare against current live frame.
thresholdintegerPixel-difference threshold; higher values reduce sensitivity.

renforge_scene_tree Renforge Scene Tree

Read the full scene graph (logical scene data). Unlike `renforge_list_ui_elements` this is broad and includes non-focusable nodes, so use it for full-tree inspection when semantic selectors are ambiguous. `save_as` or `diff_against` may create `.renforge/scenes/`; `save_as` writes and overwrites the named JSON snapshot. Omit both options for read-only inspection. With `include=["overflow"]` only `text`, `button`, and `input` nodes get an overflow verdict: the effective ceiling is the tighter of the widget's absolute `xmaximum`/`ymaximum` (minus integer padding and margins) and the child text's…

ParameterTypeDescription
project_path *stringProject root with active live session.
detailstringDetail granularity (`semantic`, `layout`, or `raw`) for scene nodes.
diff_againststringOptional snapshot name for diff context; compare against existing `.renforge/scenes/<name>.json` entry.
formatstringReturn format (`json` or `wireframe`).
idsOptional element id filters.
includeOptional expensive node properties: `color`, `style`, and `overflow`.
layersOptional layer filters.
max_itemsintegerMaximum total nodes, from 1 through 10000.
max_output_bytesintegerPayload cap, from 64 through 2000000 bytes.
max_output_depthintegerMaximum traversal depth before truncation, from 0 through 20.
save_asstringOptional snapshot name saved under `.renforge/scenes/<name>.json`; reusing a name overwrites it.
screenstringOptional active screen filter.
typesOptional node type filters.

renforge_measure Renforge Measure

Measure geometry between scene nodes without visual inspection. `contrast` samples the live frame and reports a WCAG ratio. Use this to detect layout drift after positional edits.

ParameterTypeDescription
action *stringOne of `align`, `gap`, `distribute`, `center`, `overlap`, `fit`, or `contrast`.
project_path *stringProject root with active live session.
targets *arrayScene node `id` strings or literal bounds objects `{"x": number, "y": number, "width": number, "height": number}`.
toleranceOptional tolerance; adds a pass verdict (for contrast, the minimum WCAG ratio).
withinOptional scene node id or literal `{x,y,width,height}` bounds used as the containing region.

renforge_screenshot Renforge Screenshot

Capture the current live frame and return an in-memory image response (no persistent file write). Use this to inspect UI state before clicks or scenario actions.

ParameterTypeDescription
project_path *stringProject root with active live session.
crop_heightintegerCrop height; 0 disables cropping in Y.
crop_widthintegerCrop width; 0 disables cropping in X.
crop_xintegerCrop origin x in logical coordinates.
crop_yintegerCrop origin y in logical coordinates.
crosshair_xintegerCrosshair x coordinate; both x/y must be set together.
crosshair_yintegerCrosshair y coordinate; both x/y must be set together.
gridintegerGuide overlay grid spacing in pixels.
heightintegerTarget capture height. Set one axis and keep aspect ratio via runtime logic.
rulersbooleanDraw rulers along frame edges for measurement.
scalenumberScale factor applied after crop/resize.
widthintegerTarget capture width. Set one axis and keep aspect ratio via runtime logic.

renforge_capture_screenshot Renforge Capture Screenshot

Persist the current frame under `.renforge/captures/` and return the output path plus hash. This writes disk and may overwrite an existing name.

ParameterTypeDescription
project_path *stringProject root with active live session.
crop_heightintegerCrop height; 0 disables cropping in Y.
crop_widthintegerCrop width; 0 disables cropping in X.
crop_xintegerCrop origin x in logical coordinates.
crop_yintegerCrop origin y in logical coordinates.
crosshair_xintegerCrosshair x coordinate; both x/y must be set together.
crosshair_yintegerCrosshair y coordinate; both x/y must be set together.
gridintegerGuide overlay grid spacing in pixels.
heightintegerTarget capture height.
namestringCapture base filename (letters, digits, dot, dash, underscore).
rulersbooleanDraw rulers along frame edges for measurement.
scalenumberScale factor applied after crop/resize.
widthintegerTarget capture width.

renforge_estimate_translation Renforge Estimate Translation

Estimate geometric translation between two images for visual text alignment workflows. This is file-only and read-only.

ParameterTypeDescription
after_path *stringPath to comparison image.
before_path *stringPath to baseline image.
max_shiftintegerMaximum per-axis shift considered during matching.
region_heightintegerOptional crop region height.
region_widthintegerOptional crop region width.
region_xintegerOptional crop region X origin.
region_yintegerOptional crop region Y origin.
thresholdintegerSimilarity threshold for matching pixels.

renforge_find_image_on_screen Renforge Find Image On Screen

Find a template image on the current frame and return matches with bounds in screenshot coordinates. Use this to close the control loop after screenshot capture and click fallback.

ParameterTypeDescription
project_path *stringProject root with active live session.
template_path *stringTemplate image path relative to project or absolute.
max_matchesintegerMaximum number of matches to return.
region_heightintegerOptional region height; set width/height together.
region_widthintegerOptional region width; set width/height together.
region_xintegerOptional region x origin to limit search area.
region_yintegerOptional region y origin to limit search area.
thresholdnumberMatch confidence threshold.

renforge_run_scenario Renforge Run Scenario

Run a scripted scenario pipeline of multiple interaction steps in one call and return grouped diagnostics. `eval`, `assert`, and expression-based `wait` steps execute arbitrary Python that may mutate state, access the filesystem, start processes, or use the network. Validate expectations and review capture output on failure. Destructive or open-world steps require `authorize=true` when `RENFORGE_POLICY=enforce`.

renforge_autopilot Renforge Autopilot

Auto-play branches by stopping any current manual session and launching a fresh session for every replay. It writes incremental progress to `.renforge/autopilot.json` and may download/cache the required SDK. Best for broad checks; not deterministic and potentially expensive.

ParameterTypeDescription
project_path *stringProject root for the live session.
max_runsintegerMaximum scenario runs before stopping.
max_stepsintegerMaximum steps per run.

renforge_assets Renforge Assets

Run static asset validation and return missing/orphaned image or audio references. Useful before build and before submitting translation/build changes.

ParameterTypeDescription
project_path *stringProject root to inspect.

renforge_languages Renforge Languages

List translation languages currently present under `game/tl/`. Use this before generating or exporting localized files.

ParameterTypeDescription
project_path *stringProject root for translation inventory.

renforge_translation_stats Renforge Translation Stats

Compute missing/covered translation stats for a language before generation. Run this first, then gate calls to translation generation. This may download and cache the required SDK before analysis.

ParameterTypeDescription
language *stringLanguage code or name under `game/tl/`.
project_path *stringProject root to analyze.

renforge_generate_translations Renforge Generate Translations

Generate or update translation files under `game/tl/<language>/`. This may download and cache the SDK before writing output. It writes files, so treat it as destructive when run against production trees and prefer checking stats first.

ParameterTypeDescription
language *stringLanguage code/name to generate.
project_path *stringProject root to write translation files for.

renforge_export_dialogue Renforge Export Dialogue

Export dialogue for translators or external tooling. This may download and cache the SDK, then writes and overwrites `dialogue.txt` at the project root.

ParameterTypeDescription
project_path *stringProject root whose dialogue should be exported.
languagestringOptional language variant to export.

renforge_web_build Renforge Web Build

Run the Ren'Py web build pipeline and write browser assets. It may download/cache the Ren'Py SDK, but requires the separately installed Web DLC and does not download external toolchains or the Web DLC. Destination controls output.

ParameterTypeDescription
project_path *stringProject root for build output.
destinationstringOptional output directory override.

renforge_distribute Renforge Distribute

Build desktop distribution packages and write them to destination. This executes packaging toolchains and may download and cache the SDK; it can be slow or destructive when output paths are reused.

ParameterTypeDescription
project_path *stringProject root to package.
destinationstringOptional output directory override.
packagestringPackage target (for example `pc`, `mac`, `linux`).

renforge_search_docs Renforge Search Docs

Search local Ren'Py documentation snippets by keyword before opening results. Use this to identify canonical topic IDs before `renforge_get_doc`. This may download and cache the SDK when docs are not already available.

ParameterTypeDescription
query *stringSearch query for Ren'Py documentation corpus.

renforge_get_doc Renforge Get Doc

Read a single Ren'Py documentation topic. For discovery, run `renforge_search_docs` and `renforge_list_docs` first to avoid guessing IDs. This may download and cache the SDK before resolving doc content.

ParameterTypeDescription
topic *stringTopic identifier or slug in the doc catalog.

renforge_list_docs Renforge List Docs

List available Ren'Py documentation topics. Use this as the discovery step before any topic-specific docs read. This may download and cache the SDK if docs are not already available.