Layout Proposer (Graph VAE + Geometry Constructor), Domain Expert Engine with
Conditioned Geometry Constructor, Constraint Validation Engine, Multi-Criteria
Evaluation Engine and User Interactive Editor Module now replace the working
labels throughout. New page title and subtitle, "Configure the Design
Requirements" landing copy, and the four-stage SYSTEM WORKFLOW replacing Model
Flow. AppTest: zero exceptions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Light theme, larger type, zoning count fix, doors on utility and common bath
Interface converted to light (theme set in .streamlit/config.toml as well as
CSS so Streamlit's own widgets follow), with larger type throughout and the
editor canvas converted to match. Functional Zoning under-counted because
pooja_room and walk_in_closet had no band and were silently dropped - both are
now banded, so every room is judged. Doors are generated on the utility and
common washroom; only the passage stays without one. Connectivity graph and the
edited-plan comparison reduced in size.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sidebar is pinned to the viewport so the room key stays visible while scrolling
the gallery, and the key is set in larger type that fills the column. Gallery
tiles render text at 0.55 scale with dimensions omitted via a new `text_scale`
argument on draw_plan — full-size labels were larger than the rooms on a tile.
AppTest: zero exceptions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editor panels span the plan; edited-plan tables match the main format
Vastu "None" column was the literal label for the no-rule tier — now a dash,
with null guards added. Editor side columns stretch to the plan height. The
edited plan's break-up uses the same Metric/Weight/Score/Contribution table as
the Evaluation Metrics section, and its carpet table gains Before/After/Change
columns. AppTest: zero exceptions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Evaluation: one table + one expander; tidy the "What you can edit" panel
Evaluation Metrics is now one table with a single Break-up expander holding the
per-metric detail as tabs, instead of a table plus eleven expanders. The
editor's "What you can edit" card lists locked rooms one per row with the reason
beside each, instead of one run-on sentence.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the Ranked Comparison table directly under the plan gallery
The all-plans ranked table now follows the gallery immediately instead of
sitting at the bottom of the page.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editor now has a section heading, a LEFT legend panel and a RIGHT panel of three
cards: Show on Plan (walls/doors/windows toggles), What You Can Edit (lock and
resize rules as bullets) and Doors & Windows (sizes, presets, selected-opening
controls and a big Apply Changes button). The white shaded help box is removed.
The main evaluation table is now Metric / Weight / Score / Contribution, with
the AI-vs-Thinking-Model comparison in an expander.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
UI: legend into the sidebar, compact score column, carpet 2-col, downloads last
Legend moved to the sidebar (left of the whole gallery); the score column beside
the plan is compact so every metric fits the plan's height; carpet table cut to
Room + Carpet Area as a plain table; the edited section shows original vs edited
plan side by side with a scores table and the break-up underneath; all download
buttons collected into one Downloads section at the very end. AppTest: zero
exceptions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sidebar reduced to plot / road / plan type / Generate (rooms decided by type).
Header is solid navy on white text; average panel shows every metric; removed
Best-Plan-Improvement and the success banner; the selected plan shows scores +
a vertical legend on the left with the plans on the right; PNG/DXF download and
carpet area moved to the bottom; the edited-plan before/after is one table with
an expander. DXF fits room labels inside rooms and adds a north arrow + title
block on TEXT/TITLE layers. AppTest: zero exceptions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
DXF: fit room labels to their room, and make the sheet look professional
Label height is now derived from the room so text always fits (heights 0.34-
0.65 ft instead of up to 2 ft, zero overflow). Rooms show NAME / feet-inches
size / area; added a north arrow, a title block (plot size, road facing,
built-up area, rooms, layers) and dedicated TEXT and TITLE layers, with
drawing extents covering the whole sheet.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editor: fill the space beside the canvas with a reference side panel
Side panel beside the canvas with STANDARD SIZES (door 3.0', window 4.0' +
presets + opening rules) and ROOM COLOURS (legend moved here). Stacks on
narrow screens; sizes read from the editor's own constants.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
UI: plan gallery (all plans at once), cleaner sidebar, professional styling
Replaced the one-at-a-time plan dropdown with a gallery: all plans shown as
Thinking-Model thumbnails in a grid (fitness on each), click a tile to open
its full detail below. Thumbnails cached by geometry. Sidebar decluttered
(removed Floors and legacy weight sliders; Vastu rules into an expander) and
restyled for a professional look. Verified headless with AppTest: zero
exceptions through load, generate, gallery, and tile click.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
DXF exports walls/doors/windows and edits; opening rules, sizes, breakdown
The editor now returns {rooms, openings, walls}, so the DXF draws walls, door
swings and windows on their own layers using the edited rooms. Opening rules:
no door on passage/utility/common washroom, no balcony window, one window per
room; standard sizes (door 3.0', window 4.0') with preset buttons, a size
readout and Delete. Both washrooms are now PRIVATE for zoning. The edit
comparison gains a breakdown of each metric's weighted effect on the fitness,
and access-graph labels use leader lines. Generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Connectivity: directional access rules, clearer graph; doors on rooms only
Access is now directional — a step a->b exists only when a is in b's permitted
entry list — so a plan can no longer "reach" the passage by crossing a bedroom.
Entry rules are stated as an explicit table. The access graph uses small dots
with names beside them, solid lines for usable doorways and dotted red lines for
touching-but-illegal pairs. Doors are placed on every room; only the passage
carries none. Weight 0; generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editor: doors and windows are now movable, resizable, deletable
Openings are real objects stored against their room + wall side as {t, w}, so
they survive room moves/resizes. Click to select, drag to slide along the wall,
drag an end dot to resize, Delete to remove. Editor-only, never scored.
Verified in Node: correct placement and 504/504 clamp checks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fix DXF export (outlines missing), stray doors, and page jumping
DXF outlines were LWPOLYLINE (R14+) in a file declaring no version, so AutoCAD
dropped them and the export opened as labels only; they are now R12-safe LINE
entities with an explicit $ACADVER and two-line labels. Doors no longer fall
back to any shared wall, so no stray bedroom-to-bedroom doors. The editor only
re-sends its iframe height when it moves >8px, stopping the page jumping.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Connectivity graph: smaller figure, half-width, so it stops cropping
Shrank the access graph to a 3.4in figure in a half-width column with smaller
nodes/labels so it no longer spills off-screen.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Final plan: show Carpet Area table before download
A "Carpet Area (inside the walls)" expander on the final plan reports each
room's built-up vs carpet sqft using the editor's wall allowances. Display
only; scoring uses built-up areas.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editor: Doors and Windows overlays (all-rooms / none toggles)
Doors: one per room on its circulation-facing (or longest) shared wall, as a
white opening + swing arc. Windows: double-line on every exterior wall. Both
all-or-none, visual only; no model/scoring impact.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Connectivity: reachable only via circulation, not through private rooms
A room is reachable only from the circulation spine (living/dining/passage)
or a room-specific allowed neighbour, never by crossing an unrelated private
room. Access edges require a doorway-wide shared wall AND a permitted link;
BFS from the entry. Exceptions: Utility<-kitchen, Balcony<-bedrooms,
Pooja<-kitchen, attached bath<-its bedroom. Weight 0; generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
With Walls on, room labels show carpet (inside-wall) size instead of built-up:
minus half an inner wall (0.2') on shared sides, a full outer wall (0.75') on
outside sides. Editor display only; scoring/generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Calculation/display only. Adjacency final line clarifies "total possible" is
the max weighted score (not the pair count). Connectivity now exposes and
renders the access graph (nodes=rooms, edges=doorway walls; entry/reachable/
isolated colouring + verdict). Editor hides the green locked-adjacency lines
while the Walls overlay is on so walls look uniform. Generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editor: add Walk-in Closet as a fourth gap-fill room
Completes the user-choosable gap-fill set (Balcony / Study / Passage /
Walk-in Closet) with its own colour and label. Editor-only; the filled
room is scored normally on Apply (walk-in closet is un-ruled -> neutral).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editor: fix staircase spilling out of the plot + score edited plans
Staircase-out-of-box was an editor bug (generation is clean — 0/3154 rooms
outside the plot). The editor forced the staircase to a fixed 12'×10' on
load/drag/validate; for N/S-road plans the real staircase is 10'×12', so
forcing the width grew it past the plot edge. Fix keeps the plan's actual
staircase size. Edited plans are now scored with the finalised system and
compared before/after against the original optimised plan.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Editor-only. Inner walls are centred on shared boundaries (t/2 into each
room); outer walls hug the room-block and go fully inward. Toolbar toggle.
No model/scoring/render impact.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Zoning per-room bands (normalised), Vastu plain+weighted, size Deviation
Functional Zoning is now a per-room band check on the staircase-centroid
distance NORMALISED by the farthest staircase-to-corner distance (plot-size
independent): Common <= 0.40 / Transitional <= 0.55 / Private > 0.55, a room
Satisfied when in its ideal band or an adjacent one. Vastu table shows Tier
+ Counts + TOTAL and BOTH plain-compliance and weighted %. Room Size gains a
signed Deviation column and is documented as MAPE. Generation untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adjacency/Constraints/Room-Width tables rebuilt with Tier text, Status,
Counts, a TOTAL row and an explicit final-calc line; Aspect Ratio gains
its final calc; Connectivity gets its own per-room table. Constraints
dropped from SCORING: min_room_sizes, pooja_near_square, rooms_on_boundary
(the last stays enforced in the generation model). Plan render uses one
uniform, smaller, non-bold room label so text no longer spills. Editor
rectangles show only name + dimensions; lock reason and allowed actions
moved to a top info panel, labels un-bolded. Generation model untouched.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Aspect-ratio score: penalise from a perfect square, not from 1.8:1
Displayed aspect now scores 1.0 only at a true square and tapers
linearly to 0 across 1.0-2.5 (score = (2.5 - aspect) / 1.5), so aspect
1.05 reads 96.7% instead of a misleading 100%. Generation is untouched:
_passes_gates uses a private _gate_aspect_ok that keeps the historical
up-to-1.8:1 curve at the 0.795 threshold, so the SAME plans pass and
every BHK still yields 20 tagged plans.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Scoring-calculation & UI changes: staircase-centroid zoning, Required/Predicted room-size columns, room-width as its own metric, drop compactness+circulation (keep connectivity), remade vastu/adjacency tables, DXF/DWG note. Generation model untouched.
Fix template fallback on all road sides (stale gpt_planner import + hard gate emptying the population); gate now a preference with bath-safe fill and tier-aware ranking; All-Plans average-score panel
Finalised Scoring System: 5-tier vastu, weighted adjacency, 12+2 constraints, proportions-driven sizes, official fitness weights; plans ranked by the finalised fitness; per-metric calculation break-up in the UI
The SDK reports every network fault as a bare 'Connection error.'. Walk the
exception chain and probe DNS/TLS once after both attempts fail, so the logs
say whether it is DNS, egress/TLS, or the API itself. Adds diagnose_api.py.
Fix 2BHK never generating the master's attached bathroom
attached_bathroom is a core room, so it never appears in selected_optional;
the 2BHK generator filtered for it there and so always dropped it. Moved to
its required list, where 3BHK/4BHK already had it.
Hybrid layout engine, twelve evaluation metrics, 4BHK third washroom
- Deterministic backbone designs every plan with no API key; the optional
model proposer only adds structural variety on top. Both go through one
geometry engine and one scorer.
- Twelve evaluation metrics (core/metrics.py) with a room-size model
(core/size_model.py), surfaced in the app as an AI-generated vs optimised
comparison table.
- 4BHK now has three washrooms: common, one attached to the master, one
attached to bedroom_01 -- each verified to share a wall with its bedroom.
- torch/torchvision dropped from the image (optional pipeline only, imported
behind try/except), cutting ~2 GB from the build.
- Config is now LAYOUT_API_KEY / LAYOUT_MODEL / LAYOUT_TIMEOUT, with the
legacy variable still read as a fallback.
gpt_planner quality: fixed pooja, no strip rooms, loud failures
Pooja fixed-depth + narrow-column + box cap + column reorder (never beside a
washroom); depth ceilings kill strip rooms; GPT failures loud and never
cached; app shows which engine produced the plans.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GPT full authority: gpt_planner designs all 20 plans A-to-Z
GPT (gpt-5.2) designs every plan; a deterministic tiler renders it exactly
(no gaps/overlaps by construction) with tiling-safe fixes: staircase exactly
12x10 beside the living, tiny pooja never touching wet rooms, master =
biggest bedroom, every requested room present, no strip rooms. Imperfect
plans rank last instead of being rejected. Templates remain only as the
no-API-key fallback. Audited: 80/80 plans pass every rule on 40x60.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Show GPT-engine status; fix pooja gap without flattening variety
App shows whether GPT or templates is active. Pooja capped to a small niche
on every path with the freed space reclaimed; heavy gap-fill runs only when a
real gap remains so GPT's varied 100%-tiled plans aren't normalised.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Guarantee small pooja + present utility/study (template fallback too)
make_floorplan caps pooja to ~28 sqft on every path; build_from_template
protects and guarantees the user's selected optional rooms. Fixes the big
pooja and missing utility/study on the template fallback.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Oversized passages absorbed into rooms; strip-room / staircase-not-touching-
living become ranking penalties (best plans shown); staircase snap guarded so
it never swallows a neighbour; prompt tightened (staircase touches living,
wide-enough columns, thin passages). Verified 0 overlaps, all rooms, pooja NE.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Lock staircase to its fixed 12x10 size in GPT plans
The staircase is a fixed structural block; the light GPT render now snaps it
to 12x10 and never resizes it. Verified across plot sizes and road sides.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fully tile the flat (no gaps); realistic single passage
100% tiled plans (apartment flat, not a house): rooms grow into every void
and leftover interior pockets become one small passage (never on the outer
wall, never a dead-end). GPT prompt updated to tile the whole plate.
Verified 2BHK 30x40 & 3BHK 40x60: 100% fill, 0 overlaps, all rooms present,
pooja in NE, <=1 interior passage.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>