Status: done (2026-11-11)
Priority: 3
Size: S
Arch: fair
Phase: implement
Design ref: Exchange, goodwill and obligations (The gift: Goodwill and opinion, Allowance, Agreed 8 Nov); docs/architecture/target-v2.md, sections 4.4 (Opinion) and 5.1; VB-182’s plan.
Goal: Kim decided on 8 November that slice 1 books and shows goodwill only, and that it starts to act at the head of slice 4, where swaps need it. Switch on the curve that colours opinion (gratitude, by size) and allowance’s goodwill term, as a behaviour change of its own, measured before and after. Slice 4’s plan (VB-183) confirms or rewrites this task first.
Acceptance criteria:
opinionOf (sim/relations) gains goodwill’s term, from the balance alone (one number: Kim, 8 Nov), for a balance of s rations
(GOODWILL tunables, one set for every culture until the culture owns them): the debtor’s opinion of the creditor gains
+0.15 × s / (s + 20), fading as the balance decays. An old debt souring the creditor needs the debt’s age, which a balance does not keep:
it is left to stories (slice 7). reasonsOf names the term (“Owes us for help”), so the panel’s relations rows can show it.design.md, The gift, Allowance; Agreed 10 Nov): the giver’s opinion of the receiver (−1 to 1) times 10 rations, a tunable beside GOODWILL; switched on with the goodwill term and named among the parts of allowance on the panel.GOODWILL.acts true: allowance’s goodwill term adds what the giver owes the receiver and takes away what the receiver owes beyond limitDays (30) of its household’s need.tools/balance.js --scenario populous --seeds 3,7,11,42 --map small --years 15; tools/sim.js --report hunger and --report relations): gifts and their rations, households helped and refused, help from the store, hungry household-days, deaths from hunger, friendships and fallings out between kin; and whether households, not only averages, are better or worse off.opinionOf is hot (talk weighs it for every candidate), so measure talk and contacts with --report perf on small-y40 before and after and keep the term to one Map lookup.npm run verify’s hard checks pass, its targets reported with their residuals.
Notes:QUESTION_ARCHIVE.md, “Slice 4: two points left by its plan”; target-v2’s decision 30).design.md’s Allowance row (Agreed, 8 Nov) has no opinion term, and this task switches on goodwill’s only. VB-183 writes the opinion term (its size, a tight range) into the design and into this task or a new one, with a probe of the loop story, opinion, allowance, deal, story before slice 7 builds stories.QUESTION_ARCHIVE.md, VB-182, question 2).limitDays or the curve’s scale. At populous 7 and 42 (small, year 15), and a year on from small-y40 and medium-ref: 160 to 431
balances among 457 to 1,040 living, held by 112 to 222 pawns (at most 12 counterparts, against the cap of 32), so most of the opinion
reads this task adds find no map. Sizes: median 12 to 23 rations (4 to 8 days of the debtor household’s need), 90th percentile 71 to
96 (20 to 31 days). At the scale of 20 the debtor’s gratitude is +0.055 to +0.080 at the median and +0.12 at the 90th percentile, so
the curve still separates one gift from several. limitDays of 30 lies near one full ask (12 to 36 days), and 4 to 10% of balances
are over it: the term would cut a giver’s allowance only toward households already helped through more than one lean season. Measure
the same probe (VB-219’s scratch method: wrap book, passGoodwill and endGoodwill at load, as tools/perf.js wraps) after
switching on, since gratitude changes who talks to whom and so who marries and inherits.GOODWILL.acts is true; new tunables gratitude 0.15, scale 20, opinionRations 10. sim/relations: gratitude(st, pa, b), one Map lookup into the pawn’s goodwill, added in opinionAt and named in reasonsOf (“Owes us for help”). sim/exchange contributes allowance’s opinion term (“Opinion of them”, opinion times 10 rations); allowance’s order is now slack, goodwill, opinion, reserve. The panel shows the parts through explainAllowance, no page change. relations.js stays at its 400 lines by tighter comments.tests/record.js: the count of events on heirs 7’s pawns at 2.5 years went 73 to 72 (behaviour moved); its anchor hash is for the orchestrator.Populous, small map, seeds 3, 7, 11, 42, 15 years (scratch script: ledgers, record), before then after:
small-y40 one year, talk and contacts ms/day: with the term 18.2, 17.9, 18.1 and without 18.1, 19.4, 22.1 (noise bigger than the term: one Map lookup, only for pawns with a balance).npm test whole: only tests/record.js’s anchor hash fails (expected). npm run verify and medium-ref not run (night limits; no page change).
GOODWILL.acts; the reasons label is “Owes us for help” as the task wrote it, though it names the creditor’s side from the debtor’s view.