docs(skill): repair topology (doors/windows) from the access graph - #5
Merged
Conversation
Adding a door/window is choosing where — a design decision the core must not make (ADR 0005). So this is agent-layer guidance, not a code change. SKILL.md (and a pointer in the generated spec.llm.md / `arch spec`) now documents a concrete procedure for an agent to make every room reachable and every bedroom lit: - read describe --json (access.rooms[].reachable, room bbox/uses/adjacent, building extent = min/max of room boxes → a room edge on it is an exterior wall); - connect each unreachable room, priority: an exterior entrance into a cut-off living/kitchen > a door on the shared wall to a reachable non-bedroom > never route a bath only through a bedroom; - exact on-centerline `at` arithmetic for exterior doors, shared-wall doors, and bedroom windows; - re-run `arch repair` (furniture clears the new swings/landings) then `arch validate --strict` until ok:true; - addendum: an existing off-wall door/window (W_DOOR_OFF_WALL etc.) is a separate mis-coordinate — snap onto a wall or delete. Verified end-to-end on two ArchCanvas plans (broken AI plan -> repair + this procedure -> fully clean / all rooms reachable). No core code change; 466 tests still green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
⏱️ Benchmark (median ms, informational — not a gate)
|
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
Documents a verified agent-layer procedure for making every room reachable and every bedroom lit by adding doors/windows — the design choice the core deliberately won't make (a door's position is a choice among valid options; per ADR 0005 that belongs above
compile()). No core code change.arch repairfixes furniture; this closes the remaining gap — the topology faults (W_ROOM_UNREACHABLE,W_ROOM_DISCONNECTED,W_NO_ENTRANCE,W_BATH_VIA_BEDROOM,W_BEDROOM_NO_WINDOW) — by teaching the agent to drive off the factsdescribe --jsonalready exposes.The procedure (in
SKILL.md, pointer inarch spec)describe:access.rooms[].reachable, roombbox/uses/adjacent, building extent = min/max of room boxes (a room edge on it = exterior wall).atarithmetic for exterior doors, shared-wall doors, and bedroom windows.repair(furniture clears new swings/landings) →validate --strictuntilok: true.W_DOOR_OFF_WALLetc.) is a separate mis-coordinate — snap onto a wall or delete.Verified end-to-end (two different topologies)
repair→validate --strictok: true, fully clean.bed↔livingdoor + bedroom window → all rooms reachable, 2 entrances (residualW_DOOR_OFF_WALLis a pre-existing generator mis-coordinate — hence the addendum).This completes the loop: geometry-blind AI plan →
arch repair(furniture) + access-graph door/window procedure → a sound, fully-validated drawing.Verification: 466 tests still pass; no generated-file drift.
🤖 Generated with Claude Code