You are W-PLAN (round 4). Goal: the settlement planner follows the city layout model (omg/kit/building/CITY-LAYOUT.md:
read it all, it is your spec) so a town reads as rings of wealth with the right buildings in the right places, and
every door touches the ground on hills. Video frames for intuition: /tmp/medlay/sheet0.jpg ... sheet3.jpg (the city
being drawn ring by ring) and the transcript /tmp/medlay/transcript.txt.
Read: SETTLEMENT.md (incl. "Round 3 changes" and "4.9 The props law"), settlement.mjs, settlement-render.mjs, TOWN.md.

Files you own: omg/kit/building/settlement.mjs, omg/kit/building/settlement-render.mjs, test/settlement.test.mjs (+ a new
test/layout-model.test.mjs), SETTLEMENT.md (a "Round 4" section), browse/settlement.html (only if a toggle helps).
Do NOT touch styles/medieval.mjs (W-HOUSES owns it, in parallel).

1. Districts as rings of wealth (CITY-LAYOUT.md section 2): each house plot gets plot.archetype ('patrician' on the main
   square; 'burgher' / 'tower' (about 1 in 12, prefer street corners) along the main roads within ~0.35 R; 'craft' in
   the inner town; 'cottage' and some 'hovel' along the inner side of the wall and in villages/hamlets; 'hovel' in the
   suburbs), plot.wealth 0..1 (falls with distance from the square, plus noise), plot.trade (shops in core/inner:
   'boot' | 'pig' | 'key' | 'pretzel', bakeries 'pretzel'), plot.storeys (patrician 3-4, burgher 3, craft 2-3,
   cottage 1, hovel 1; villages lower overall). Variety must come from wealth and place: neighbours differ (never the
   same archetype + storeys + width three times in a row on one street side).
2. The church/cathedral at a CORNER of the main square (not in its middle), a pillory near the market hall and a well
   on the square (props law: new prop kinds 'pillory' (footprint 1.2 x 1.2) and 'well_wheel' (2.6 x 2.6), kit
   'medieval-town', grey box when missing), the tavern on the square when there is no market hall. A fish market (2-3
   stalls) near one gate, not on the main square. Orphanage/shelter: in towns and cities, one long plain plot in a far
   corner inside the wall next to the church or a garden (use='house', archetype 'craft', 3-4 bays wide, storeys 2).
3. Suburbs (towns and cities): outside each gate, along its road for 30-60 m: hovels, a smithy, a tannery-like barn,
   small vegetable plots (reuse fields), all through the props/plot laws (no overlap with roads, wall, water).
4. Doors on hills (operator, 8 Oct: "doors at 1st or 2nd floor level"): first SEE the bug: a GPU shot of a hill town
   (site hill, tier town, seed 5) close to the houses. Then: plot.y = the ground height at the street door, measured on
   the ROAD surface the player walks on (check the road mesh height in settlement-render against Hf; if they differ,
   fix so the door sill is within 0.35 m of the road), plot.backGrade = ground at the back wall centre - plot.y,
   plot.backDoor = false when another plot or the wall stands within 3 m behind the house (back-to-back rows have no
   back door) and otherwise true about 60 % of the time. Pass all new fields in the makeSpec overrides in
   settlement-render.mjs: { archetype, wealth, trade, storeys, backDoor, backGrade } (FROZEN interface; W-HOUSES
   implements them in parallel; until it lands makeSpec ignores unknown fields, so your tests must not depend on it).
5. Catalogue: styles/medieval.mjs will export catalogue(style, seed, n) -> [{ archetype, type, o, w, d }]. When the
   style has it, pick each plot's variant from it (archetype match, w <= plot width, then the closest width); else
   keep today's bays fitting. Guard with `typeof mod.catalogue === 'function'`.
Keep round 3 densities (TOWN.md budget table) and all props-law guarantees. Stats: add counts per archetype.
Local server port 8983, GPU probe FAL_PORT 8984. Evidence: tests (archetype rings: patrician only near the square,
hovels only near the wall or outside; church at a square corner; pillory + well present in towns/cities; suburbs outside
the wall ring and off roads; door law inputs: every plot has backGrade, backDoor false for back-to-back rows; existing
tests pass), GPU screenshots (city top view, hill town close view of doors before/after) that you LOOK at.
W-HOUSES has LANDED on main (read W-HOUSES-ROUND4.md and TYPES.md "round 4"): makeSpec already honours archetype,
wealth, trade, backDoor, backGrade, and styles/medieval.mjs exports catalogue(style, seed, n). Use them for real.
Coordination: your worktree and ports are private. Do NOT take coord claims (a first attempt died on the claim guard
and did nothing); never combine a coord command with other commands in one shell call.
Time box: stop by 12:40 CET with what works committed (commit early, after each numbered item).
