VB-720: Report and band: dung, tilth and the meadow ratio
Status: done (2026-11-21)
Priority: 3
Size: S
Arch: animals
Phase: implement
Design ref: design.md, Goods and the farming year (Yield over time; Soil); docs/review-yields.md (section 4); docs/review-yields.md (section 4.6)
Goal: The wrap-up VB-048 can read what tilth did: who gained it, whether fields that outran their meadows lost it, and how far populous drifted from its start at 0.
Acceptance criteria:
A report, node tools/sim.js ... --report soil (or a section of tools/balance.js, where soil already is; the task chooses and says why), answering --help: a year or a decade, and a farm class (no cattle, 1 to 2 head, 3 or more; and by cattle a field): fields, mean soil, mean tilth, loads spread a field-year to the cap and beyond it, loads rotted on the heap, grain reaped a field; a village: meadow tiles to field tiles, cattle a field, mean tilth. The yearly counts it needs are kept as the reports’ other yearly counts are (outside st, or folded into the yearly counts the record already keeps: Rules for cost 8 and 10), never as a new log line a load.
docs/commands.md gains its line; tests/review-tools.js or the tool’s own check covers its --help and one small run.
A band in tests/lib/bands.js, a report for the full runs (populous small, seeds 3, 7, 11, 42, 30 years; founders small, 50 years): the mean tilth of farms with cattle less that of farms without, at year 30, expected at 0.03 or more (reckoned: 0.054 at 2 loads a year from a start at 0, less the years a farm had no herd; the first measure sets the number, which only Kim changes after). And an assert on the reduced run if it can show it: a dunged field’s tilth is above an undunged one’s after the run’s years. Not run here where it appends to the shared record: the band is written and its first values are the night’s. (Written, not run: the night’s. Populous seeds measured below put the gain at year 30 at 0.025 to 0.037: near the 0.03 line.)
Numbers, in the task file and the PR, from the report itself at the seeds above (short seeds here; the long ones owed to VB-662): the table of the first criterion at years 10, 20 and 30, and one paragraph for the wrap-up VB-048 on the drift at populous from a start at tilth 0 (grain a field and growth, first decade against third) and on whether a village whose fields outran its meadows lost tilth (the meadow ratio against tilth, a village).
Cost: no counter added; the report derives loads spread from each field’s tilth moving, once a day outside the step (a counter at the load would give one island number, not a class’s). Deviation from “one increment a load”, chosen so the simulation is untouched.
No behaviour changes: node tools/same.js --base REF against the starting commit. src/ is untouched, so the run is the same.
Noted by VB-160, 16 November 2026.
Decisions (VB-720)
A report of its own, tools/soil.js, not tools/balance.js: it needs a daily walk and the farm classes by cattle kept that day; balance.js reads food by source.
Heap rot is the day’s share of the heap (SOIL.rot), summed; spread loads read from tilth moving, split to cap or beyond by field.surplus. Descriptions, no target.
Band tilth-gain (balancing, lo 0.03, hi 1; populous and founders full runs); reduced run asserts only gain > 0 (4 seeds: 0.006 to 0.012 at year 8).
Numbers (populous small, seeds 3/7/11/42, years 30, decade rows; tilth none / 1-2 / 3+): decade 1: 0.0023-0.0029 / 0.009-0.010 / 0.013-0.015; decade 2: 0.002-0.005 / 0.014-0.019 / 0.026-0.031; decade 3: 0.005-0.014 / 0.014-0.023 / 0.030-0.044. Loads a field-year, 3+: 1.0-1.3 to the cap, 0.5-0.8 beyond; rot 10-16 loads a farm-year at 3+, 0.2-0.9 for none. Grain a field, 3+ against none: 109-116 vs 101-120 (decade 1), 96-106 vs 86-96 (2), 96-109 vs 78-88 (3).
For VB-048: from tilth 0, 3+ farms gain about 0.015 a decade 1, 0.03 by 20, 0.04 by 30 (3% to 4% of harvest, near the reckoning); grain a field falls in every class over the thirty years (soil wear and the crowding, not tilth), but 3+ farms lose 10% and farms with no cattle 20-25%, so tilth plus dung keeps about 12% a field. Villages whose fields outran their meadows (under 0.5 meadow tiles a field; 3 to 7 a decade) held less tilth at decade 3 in seeds 7, 11 and 42 (0.0038, 0, 0 against 0.0164, 0.0176, 0.014), and more in seed 3 (0.0179 against 0.0144); the correlation of meadow ratio with tilth across villages is positive in 11 of 12 decade readings (0.05 to 0.70, one -0.04). So: they gain least, as the design says, though one seed in four shows otherwise.
Owed: founders small, 50 years, and the long seeds, VB-662.