You are W-GROUND (round 5). Goal: a town that stands on carved ground, with streets you can walk, houses wall to wall,
and every door free. Read omg/kit/building/CITY-LAYOUT.md first (section 5 is your spec, written from the operator's
review of 8 Oct 2026), then SETTLEMENT.md, settlement.mjs, settlement-render.mjs, TOWN.md.
LOOK first: /tmp/r5-shots/out/*.png (today's bugs: a-hill-aerial, c-hill-walk = road painted on a 30-degree slope,
e-wall-plot, i-village = a road ribbon hanging over grass), /tmp/wallblock.png (operator: a churchyard wall runs across
a house's front door, village / hill / seed 1), /tmp/r5-ref/streets.jpg (the operator's reference streets: paving from
facade to facade, continuous fronts, houses stepping up a climbing street, doors reached by 0-3 steps).

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

1. Carved ground. After roads, squares and plots are known, build a graded height field (plan.grade: a grid of 1 m
   cells over the settlement, natural terrain beyond) and make heightOf(plan) return it, so the terrain mesh, roads,
   houses, props, walls, colliders and the walker all stand on the same ground. Streets: flat ACROSS their width (the
   centre-line height, smoothed), grade ALONG them <= 12 % for main roads and streets (where the hill is steeper the
   centre-line profile is eased over a longer run; lanes may reach 20 %; stair lanes stay stairs and the steps land
   exactly on the graded ground at both ends). Squares: one plane or two to three terraces with steps between. House
   pads: flat at the plot's street floor under the footprint + 0.4 m. Blend to the natural slope over >= 3 m at <= 35
   degrees; where a cut or fill at a road edge or a plot side is higher than 1.0 m and no house covers it, a retaining
   wall (existing retaining_wall_2m atoms, kit medieval-walls) runs along it. The terrain mesh is fine enough to show it
   (1-2 m cells inside the wall ring, 4 m outside).
2. One ground, clean joins. Road ribbons and squares lie on the graded ground (no ribbon edge in the air, no grass
   poking through, no ribbon diving under grass); road ends merge into the road or square they meet and never stop in the
   void; a dead end stops at a plot or a wall. In towns and cities the paving reaches the house fronts (no grass verge
   between a street and its row); villages may keep verges. Fields and gardens follow the graded ground (no floating
   striped strip: see e-wall-plot.png).
3. Rows (CITY-LAYOUT section 5 + streets.jpg). In towns and cities, plots along a street side stand wall to wall
   (party walls both sides); a gap only as an alley 1.2-2 m wide every 4-8 houses or at a cross street; on a curve the
   fronts touch (the wedge opens at the back). Neighbouring fronts step in or out by 0-0.4 m (deterministic), rooflines
   differ (storeys vary by wealth as today). Pass o.w = the plot's exact frontage so the house fills it (FROZEN, W-HOUSES5
   implements it: the generator fits its bays to o.w); remove the shrink-bays loop for plots that pass o.w and keep it
   only as a fallback when makeSpec returns a different width (note a finding). Party flags: plot.party lists the sides
   that touch a neighbour. On a climbing street each house's floor steps with the street at its door; the party wall
   between two houses at different floors is the taller neighbour's wall (no gap, no floating).
4. Doors free. Nothing within 1.6 m in front of any door (street door, back door, barn door): no terrace, retaining,
   town, churchyard or garden wall, fence, stall, well, prop, tree or other plot; no wall crosses a plot front. When a
   wall would, it bends, stops short, or gets a gap. Test it on every tier x site for seeds 1-5.
5. Ground inputs per wall (FROZEN, W-HOUSES5 implements): o.ground = { back: [min, max], left: [min, max], right: [min, max] }
   in metres relative to the street floor (y = 0), measured on the graded ground along that wall's foot (use the spec's
   real footprint). Keep backGrade/backDoor as today (backGrade = ground at the back door). Also o.irregular (0..1: 0.2 for
   patrician/burgher, 0.5 craft, 0.8 cottage/hovel/barn; plus a little noise) and o.stepUp: the number of 0.17 m steps
   from the street to the door (0-3) when the street climbs across the door width.
6. Trades show (operator: "I almost only see one type of house: no markets, barns, bakeries, blacksmiths, taverns").
   In towns and cities every street with >= 8 houses has >= 1 trade (shop, bakery, smithy, tavern), corners favoured; a
   tavern on the square and one near a gate; smithies by the gates and in the suburbs; barns in villages, hamlets and
   suburbs (behind or between farm houses, gable or great door to a yard or the road). Pass the type: plot.use 'barn'
   now maps to style type 'barn' (W-HOUSES5 adds it; until it lands, keep the current fallback so nothing breaks).
   Stats: counts per use AND per archetype in the HUD.
Keep round 3/4 densities, the props law, the wealth rings and all existing guarantees (tests). Speed: plan + build time
for a city stays under 1.5x today's (measure: today city/plain/5 = ~400 ms plan, ~1000 ms build).
Local server port 8985, GPU probe FAL_PORT 8986. Evidence: tests (streets flat across within 0.05 m and <= 12 % along;
no door blocked; houses touch their neighbours in town rows except alleys; every road end joins something; ground
under every house pad flat), and GPU screenshots you LOOK at: town/hill/5 aerial + a walk up a climbing street + the
same village/hill/1 spot as /tmp/wallblock.png + city/plain/5 street. Save them under /tmp/w-ground-shots/.
Coordination: your worktree and ports are private. Do NOT take coord claims; never combine a coord command with other
commands in one shell call.
Time box: stop by 16:40 CET with what works committed (commit after each numbered item).
