Repository navigation
Let an agent update or detach a structure - #1305
Merged
Merged
Conversation
update_structure and detach_structure on the bridge, named by generator_id. Settings not given keep the structure's values. hf_get_brushes gives each piece's structure, hf_batch takes $N.generator_id, and the toolbar offers Update and Detach for a selected piece.
3 tasks
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
An agent could build stairs, arches, spiral stairs and domes over the bridge, but every structure was frozen once built. There was no Update or Detach, and nothing an agent read said which brushes were a structure's pieces. Changing a radius meant deleting the pieces and building again, which loses the paint, names, brush entities and visgroups an Update keeps.
update_structureanddetach_structurethroughhf_run_command, named bygenerator_id. The id survives a rebuild; brush ids do not, since every Update gives every piece a new one.stepsleaveswidthandfillalone. It checks them ascreate_archdoes (unknown key, wrong type, out of range, an enum by label) and then withcan_build_generator(). A refusal says what the dock says, through one function now shared by both (HFGeneratorSystem.not_changed_text()).hf_undothe way back. What the dock would have warned about comes back in the answer:appearance_dropped,edits_replaced, and a warning when the pieces no longer agreed where the structure was.hf_get_brushes(and every brush in an answer) givesstructure: null, or thegenerator_id, type, piece index and settings. It is read through the generator record, not thehf_generator_idtag on the brush: a redone Detach leaves the tag behind, and a test that read the tag failed on exactly that.$N.generator_idinhf_batch, so one batch can build a structure and then update or detach it.hf_list_commandsgivesupdate_structurethe samesettings_by_typeascreate_arch.Design and pre-mortem:
docs/superpowers/specs/2026-10-17-structure-update-detach-design.md.Before / After Behavior
MCP: ...step. People get Update and Detach on the toolbar when a piece is selected.hf_get_brushesanswers throughstructure.Related Issue
Closes #1302
Checks
python tools/run_local_checks.pypasses (28 passed, 4 not run here as usual)--importtest_dock_undo_coverage.gd) is on main too, filed as [Tests] The leak gate misses orphans GUT reports per script #1307python tools/check_script_warnings.pypasseschangelog.d/git diff --checkis cleanstructuresMCP vibe scenario (14 checks, including a person's Ctrl+Z taking an update back andhf_undo/hf_redoof a Detach through the editor's undo manager), andcommandsstill passes. It runs in CI with the other headless scenarios.Each new test was checked against the bug it pins: with Update merging over the defaults, or the listing reading the raw tag, 8 of the 14 bridge tests fail.