hzplan-build-floor-plan6.3 KB
View saved version →
---
name: hzplan-build-floor-plan
description: Create a usable new HZplan floor plan from user-supplied dimensions, a sketch, a reference image, or another plan while verifying structure, circulation, openings, and furniture in stages. Use when the user asks to build, draw, recreate, plan, furnish, or lay out a new home or storey in HZplan. Do not use for automatic image conversion or a narrow change to an existing HZplan plan; use the dedicated import workflow or hzplan-edit-floor-plan-safely instead.
---
# Build a HZplan floor plan
Build from evidence, expose uncertainty, and verify the structural plan before adding decorative detail. The user's explicit instructions take precedence over this workflow.
## Establish the source of truth
1. Identify whether the layout comes from written dimensions, a user-supplied image, a sketch, or an explicitly approximate brief.
2. Inspect every supplied image before making a plan write. Distinguish geometry that is visible or measured from geometry that is inferred.
3. If the user requests an accurate reconstruction of a named real building, fictional set, or other known place without supplying layout evidence, do not construct it from memory. Ask for a plan image or dimensions, or ask whether an approximate interpretation is acceptable.
4. Use only user-supplied, licensed, or public-domain plan inputs. Never scrape listing sites or other third-party sources for floor plans.
5. State a compact implementation plan and any material assumptions before the first write. Ask a question only when missing information would materially change the layout; otherwise make conservative, disclosed assumptions and proceed.
6. Respect requested review gates. If the user asks to approve walls and openings before furniture, stop at that boundary.
## Initialize authoring
1. Call `get_authoring_guide` once at the start of the authoring run. Treat it as the canonical source for current entity types, predicates, anchors, and geometry rules; do not rely on remembered syntax.
2. Call `create_plan`, then `create_storey` for each requested floor.
3. Author a fixed storey `size_mm` only when reliable dimensions define the full extent. Otherwise let the storey derive its extent from its walls.
4. Pass `storey_id` explicitly on every storey-scoped call. Work on one storey per batch.
## Plan for use, not only geometry
1. When the brief leaves room proportions, openings, circulation, or furniture placement to your judgement, read `references/room-planning-basics.md` before choosing the layout.
2. Treat its non-obstruction and circulation rules as default invariants. Treat its dimensions and room patterns as conservative design defaults, not universal regulations; explicit user needs and the applicable local standard take precedence.
3. Decide intended room connectivity and main circulation before placing openings. Preserve useful wall runs, then check door swings and approaches against furniture, fixtures, and other doors.
4. Place furniture only when realistic footprints and use zones fit. If the requested contents cannot fit without blocking access or overlapping working space, explain the conflict rather than forcing an unusable layout.
## Build the structure in stages
1. Create exterior and interior walls before openings, rooms, furniture, fixtures, or finishes.
2. Prefer `upsert_entities` for a coherent wall batch. Check the entire solver result; a rejected atomic batch persisted nothing.
3. Omit entity IDs when entities are independent and server-minted IDs are sufficient. Supply clear local IDs when an atomic batch must express relationships among entities created together. In both cases, treat every returned ID as authoritative. An ID-less create is not idempotent: if its outcome is uncertain, re-read the storey before retrying so the retry cannot create duplicates.
4. Create doors, windows, and other openings only after their hosting walls exist. Use returned wall IDs rather than guessed identifiers.
5
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 2 — file references are metadata, not package contents.
hzplan-edit-floor-plan-safely6.18 KB
View saved version →
---
name: hzplan-edit-floor-plan-safely
description: Make precise, usable, verified changes to an existing HZplan plan without dropping unrelated geometry, breaking circulation, or editing the wrong floor. Use when the user asks to move, resize, reconnect, rename, restyle, replace, or delete existing walls, openings, rooms, furniture, fixtures, finishes, illustrations, 3D assignments, or generated 3D assets. Do not use to construct a new plan from scratch; use hzplan-build-floor-plan instead.
---
# Edit a HZplan floor plan safely
Inspect before writing, preserve stated invariants, and verify the solved result. The user's explicit instructions take precedence over this workflow.
## Resolve the target
1. Resolve the plan and storey before changing anything. Use `list_plans` or `get_plan` only when necessary, then call `get_storey_plan` for the target floor.
2. Pass `storey_id` explicitly on every storey-scoped read and write, even when the server could infer it.
3. Treat IDs returned by HZplan as authoritative. Never infer an entity's floor from its local ID.
4. For object edits, call `get_object` when the current assertions or solved placement are not already present in the storey read.
5. Resolve human descriptions such as "bottom wall" from `resolved_geometry`, compass side, dimensions, and adjacency. If more than one entity still matches, ask the user to disambiguate before writing.
6. For geometry, attachment, opening, or surface-finish edits, call `get_authoring_guide` before writing. Skip it only when a dedicated simple tool's current schema fully defines the requested change.
## Preserve the user's invariants
1. Translate the request into a short list of targeted entities, requested changes, and properties that must remain fixed.
2. Do not alter a fixed length, width, height, host, gap, or attachment unless the user requested it or the change is required for feasibility. Disclose any required collateral change before applying it.
3. Use real millimetres directly. Never multiply or divide dimensions by the storey's informational scale factor.
4. Avoid moving unrelated geometry to make a requested edit appear successful.
## Protect spatial usability
1. When choosing a new opening, room arrangement, or furniture position rather than applying exact user-supplied geometry, read `references/room-planning-basics.md` before writing.
2. Preserve clear door openings and swings, continuous circulation, access to important windows, and working space in front of furniture, appliances, storage, and fixtures unless the user explicitly accepts a disclosed tradeoff.
3. Treat the reference's dimensions and room patterns as conservative defaults, not proof of compliance. For an accessibility or regulatory request, use the applicable jurisdiction and user requirements and do not claim certification.
4. If the requested edit cannot fit while preserving these conditions, report the conflict and ask which constraint may change rather than moving unrelated entities or creating an overlap.
## Choose the narrowest write
- Use `set_entity_assertions` to replace or add individual geometry assertions on an existing entity while preserving all other assertions.
- Use `remove_entity_assertions` to remove specific assertion keys while preserving the remainder.
- Use `set_entity_attributes` for passive metadata that must not affect the solver.
- Use the dedicated object tools for height, feature side, illustration, and existing 3D-asset assignment.
- Use `delete_object_3d_asset` only for an explicit request to remove a generated model. If HZplan reports that plans still reference it, identify those dependencies and ask before detaching them with `set_object_3d_asset`; never alter plans merely to make deletion succeed.
- Use `upsert_entity` for creation or a deliberate full replacement only. Before replacing an existing entity, read it and resend every assertion that must survive; omitted assertions are removed.
- Use `upsert_entities` for a re
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 2 — file references are metadata, not package contents.