Repository navigation
Put floor paint on the agent bridge - #1362
Merged
Merged
Conversation
HFPaintSystem gains calls in cell space with no screen or mouse in them: paint_cells, raise_cells, stamp_room and confirm_connectors, each writing the layer through the same primitives the Paint tool uses and reconciling the chunks it dirtied. The Rect stroke, its preview and the room stamp now share rect_cells(), and confirming a connector is one add_connector_defs(). Four bridge forms sit on the palette's paint entries: paint_rect, raise_rect, stamp_room and confirm_connector, with cell and layer param types, each one undo step through the dispatcher. hf_list_commands gives the paint entries the level's layers.
saworbit
enabled auto-merge (squash)
October 20, 2026 23:17
2 tasks
This was referenced Oct 20, 2026
saworbit
added a commit
that referenced
this pull request
Oct 20, 2026
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The palette's paint commands act on the tool's own memory and the mouse: Raise lifts the last stroke's cells, Stamp Room stamps the last rectangle's size at the hovered cell, Confirm Connector keeps the pending ghosts. Nothing took a layer and cells, so an agent could not paint. Spec:
docs/superpowers/specs/2026-10-21-floor-paint-bridge.md.Two layers:
HFPaintSystemcalls in cell space:paint_cells(layer, from, to, filled, material_id),raise_cells(layer, from, to, height),stamp_room(layer, at, width, depth, height),connector_candidates()/confirm_connectors(layer, from, to, to_layer), pluspaint_layer_at,find_paint_layeranddescribe_paint_layers. Each writes throughset_cell/set_cell_material/set_wall_height, consumes the dirtied chunks and reconciles them through the existing reconciler; with region streaming on, the rectangle's regions are loaded and pinned for the call. Limits: cells within 100000 of the origin, at most 65536 cells per rectangle, refused mid-stroke. One implementation: the rectangle's cells areHFPaintTool.rect_cells()(the Rect stroke, its preview and the room stamp use it), confirming isHFPaintTool.add_connector_defs()(whichconfirm_connector_ghosts()now calls), and the connector settings sync is one function.paint_rampcarriespaint_rect(layer,from,to,filled,material),paint_raisecarriesraise_rect(height),paint_roomcarriesstamp_room(at,width,depth,height),paint_confirm_connectorcarriesconfirm_connector(to_layer). New param typescell([x, z]) andlayer(index or name; absent is the level's active layer, which is level state). Answers carry the layer used, the rectangle,boundsin world metres on the floor's top, and cell, height and connector counts. Every run goes through_run_mutation, so each is oneMCP: ...step,hf_undoreverses it, and each may be anhf_batchop.hf_list_commandsgives each paint entrypaint_layers.Out of scope, written in the spec: the gesture strokes, mirror axes, inference cleanup, layer management, heightmaps and reading cells back.
Before / After Behavior
hf_run_command paint_rect,raise_rect,stamp_roomandconfirm_connectordo each in one undo step, and the listing says which layers the level has.Related Issue
Fixes #1299
Checks
test_paint_cells17/17,test_mcp_dispatcher_paint16/16,test_mcp_command_sweep1/1 (14 commands in 10 states),test_mcp_dispatcher_commands27/27 (the numeric-range test rewritten to take each entry's target count),test_paint13 scripts 181/181,test_command_registry10/10,test_undo_sweep,test_dirty_tags,test_bake_system;.durations.jsonentries for the two new scriptspaint_cells, the floor and wall assertions fail; restored, greentools/vibe/mcp/scenarios/paint.pyrun against a headless editor: 19 ok, nothing flaggedpytest hammerforge_mcp110 passed; ruff clean; CI's gdformat and gdlint commands pass;check_script_warnings.pycleanchangelog.d/, no edit to CHANGELOG.md