Status: done (2026-11-19) 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) Goal: Yields rise over a game only as the farmers earn it (Kim, 16 Nov): tilth, built by dung and fading over decades, replaces the cap that rose with a village’s age. Every field starts at 0 in every scenario, so the drift at populous is reported. Acceptance criteria:
TILTH in src/sim/rules.js, each value with its meaning in the comment: perLoad 0.0011 (what one load of manure adds to a field’s tilth), years 70 (the time constant, in game years, of its fading), max 0.4 (a bound for the invariant, which play should never reach). Proposed starting values (Kim, 16 Nov), estimates with no medieval Nordic source (docs/review-yields.md, 4.1).fd.tilth (the value when last set, 0 or more) and fd.tilthAt (the tick it was set), plain data, written only by sim/fields, with their @state line and their place in src/owners.json as fd.soil has. Every field starts at tilth 0, tilthAt the tick it is made or placed: a field broken (fresh ground or old, w.dev set or not) and every field a scenario places, in every scenario (Kim, 16 Nov: nothing at the start). Nothing is kept on the tile when a field is abandoned.tilthOf(st, fd) (the name is the task’s to choose): fd.tilth × exp(−(st.t − fd.tilthAt) / (TILTH.years × YEAR)), allocating nothing. It is called where dung is spread and where a field is reaped, and by tools, tests and the page; nowhere in a daily or per-step pass (Rules for cost 3), which a check asserts (the reader is not called during a day on which nothing is manured or reaped: a declared counter tilthRead in VB.COUNTERS, or the lint’s means if it has one).manureDone: for the n loads really spread, fd.tilth = tilthOf(st, fd) + n × TILTH.perLoad, fd.tilthAt = st.t, whatever the field’s soil. The soil’s rule is unchanged (+SOIL.perLoad a load to SOIL.cap, which stays 1.15).reaped: the harvest is multiplied by (1 + tilthOf(st, fd)), beside fd.soil; seed is unchanged. Every crop reads it alike (barley, rye, peas); hay does not (a meadow has no tilth).tests/lib/invariants.js (checkState): every field has finite tilth with 0 ≤ tilth ≤ TILTH.max and tilthAt ≤ st.t. Tilth is a level of the ground, not a stock that is carried or eaten, so it gets no line of its own in tools/stocks.js; the manure heap’s line says, at none, that neither soil nor tilth is raised (tests/review-tools.js passes).WORLD entry; tests/saves.js and tests/plaindata.js pass, and a run saved and loaded mid-year reaps the same harvest as one not saved. A save from before this task has fields without the two values: it is refused or read by the rule src/sim/saves.js already follows for a new field of state (a format step, as its formats 2 and 3 were), and the task file says which.tests/tiny.js, tests/lib/probe.js), with its line in tests/suites.js, reading the closed form without running the years: a field given 2 loads a year for 100 game years holds 0.117 ± 0.005, and for 40 years 0.067 ± 0.004; left 49 years without dung it holds half (± 0.01); two fields alike but for tilth 0 and 0.1 reap harvests in the ratio 1 to 1.1; a field never dunged stays at 0; a new field starts at 0.tools/sim.js, tools/balance.js), at populous small, seeds 3, 7, 11 and 42, 30 years, and founders small, the same seeds, 50 years: grain reaped a field and a household-year by decade; mean tilth of fields by decade, on farms with cattle and without; hungry household-days and hungry household-years; yearly growth (end / start)^(1 / years) − 1 a seed; and whether households, not only averages, are better off (the distribution of hungry days a household; who gains: farms with cattle, by herd size). The drift at populous is reported by name: since every field starts at 0, populous villages gain yield over their first decades; the reckoning is +3% of harvest at year 15 and +5% at year 30 on a field at 2 loads a year (docs/review-yields.md, 4.3), and the task says what was measured against it, in grain and in growth. The runs of 30 and 50 years are long: where the machine is shared, the short seeds are run here and the rest are noted as owed to VB-662, the criterion left unticked with its reason.perLoad and years are Kim’s proposed starting values and stay. If the numbers show a collapse or a defect, at most five short runs, seeds and map named, the values tried and what each gave in the task file; otherwise a row of docs/tuning.md.medium-ref (about 170 farms × 4 fields, an estimate) × at most one manuring and one reaping a year × one exp: some 1,500 reads a year, nothing daily, no loop added, no cache. Reported as counters, on a late save (node tools/sim.js --load FILE --years 1 --report perf); times are left to the nightly bench. tests/counters.js unchanged in structure but for the counter this task declares.node tests/run.js verify --verbose before and after; each target moved gets its line (before, after, residual, whether this change is the cause). The demography and balance bands move by design (more grain on stocked farms), and are reported, not re-recorded.@sys line of sim/fields and docs/architecture/modules.md and ownership.md kept current. sim/fields is checked against the lint’s length and width lines; if this takes it over, the split task is opened as AGENTS.md says. The page is not touched here (VB-719).sim/fields reads and writes fd.tilth and fd.tilthAt; no new coupling between systems (manure and reaping are both sim/fields); why fd.soil does not fit (it is bounded by a cap and moved within a year or two; tilth is unbounded but by dung, and moves over decades).Noted by VB-160, 16 November 2026.
st: moot at tilth 0), tilthOf (counter tilthRead, 0.02 a pawn-day at counters’ probe), gain in manureDone, effect in reaped; invariant; stocks line; tests/tilth.js.