Status: done (2026-11-10) Priority: 2 Size: M Design ref: Traits, talk and stories; Exchange, goodwill and obligations (The gift: Goodwill and opinion). Kim, 10 Nov 2026 (code review). Goal: Opinion is kin standing plus timed memories, and nearly all memories come from talk, whose kind is drawn from the pair’s fixed compatibility: at the late fixtures the memories’ sum correlates 0.72 with compatibility, and the friend and fell-out events they cause are 83% of the record. Kim decided on 10 November that opinion is derived: kin standing, plus compatibility shown as two pawns grow familiar, plus memories of things that happened; that talk grows the tie only; and that only becoming close friends or enemies is an event. Acceptance criteria:
opinionOf(st, a, b) is the kin standing’s value (SOCIAL.situational, as today), plus affinity, SOCIAL.affinity.weight (0.6) × compat(st, a, b) × min(1, tieOf(st, a, b) / SOCIAL.affinity.known (16)), plus the memories of a’s record of b, clamped to -1..1. Goodwill’s gratitude stays slice 4’s (VB-220) and adds to the same sum.chat, goodTalk and crossWords leave SOCIAL.memories, and talk no longer calls remember. A talk still adds TIES.talk to both ties, still draws its kind from compatibility for the bubble (agent.talk.kind, the same draws from st.rng.talk), and still halts the two. bull, border and claim stay, and a new kind is added as they were.pawn.rel holds a record only while it holds a memory of an event; fadeRelations keeps its seasonal pass over what is left (name its cost at medium-ref in the PR: about 400 memories against 67,000). A load drops the three talk kinds from older records.SOCIAL.closeFriend is 0.45. A pawn’s record gets “Became close friends with” when its opinion of another reaches closeFriend, and “Became the enemy of” at enemy (-0.5), each left only SOCIAL.back past its line; friend (0.25) and dislike (-0.2) stay as the page’s labels and make no event. Since opinion now moves with the tie and not only at a remember, the band is checked where the tie changes (a talk, a job done together, the day’s hours at home, the season’s kin floor) and at remember: say in the PR where the band is kept and that no step walks all pairs for it (Rules for cost, 2). notable.js and tests/record.js follow.talkWeight and companyFor read the new opinion; companyFor takes the pawn’s tie scale once, as talkHour does.design.md: a row “Opinion” under Traits, talk and stories with the formula and Kim’s decision (Decided, 10 Nov), and The gift’s “Goodwill and opinion” row brought in line (gratitude adds to the derived sum). docs/architecture/modules.md and the @state line of pawn.rel follow. The open question on a “Worked together” memory (QUESTIONS.md, VB-039 and VB-106, question 2) gets a note that work together already grows the tie, which now carries it.small-y40 and medium-ref after a further 4 years each, and populous small at seeds 3, 7, 11, 42 for 15 years: per pawn of 12 and over, friends, close friends, disliked and enemies (median, 90th centile, share with none); events a living pawn-year by kind, and the record’s size; talks a day; living and households (the culture’s drift reads ties, which talk still feeds: say whether customs moved, node tools/bands.js). Expected from the fixtures as they stand: about 3 friends and 4 disliked a pawn, and enemies seldom without an event.node tools/bench.js before and after; “talk and contacts” (51 ms a game day at medium-ref) is expected to fall, with its residual reported against its share of the budget, since half of talk’s own time writes the two memories. tests/golden.json and tests/counters.json re-recorded, the changed entries listed.tests/lib/invariants.js): no memory of a kind outside SOCIAL.memories; a record’s band agrees with its opinion within back. npm run verify’s hard checks pass, its targets reported with their residuals.
Notes:fb35e75 on the published fixtures (made at 9f130e6), pawns of 12 and over. medium-ref (673): 30,942 relationship records, a median of 41 a pawn; about 67,000 memories, of them 298 border, 102 bull, 0 claim, the rest from talk. Over the records, the memories’ sum correlates 0.72 with compat and 0.15 with the tie (0.74 and 0.13 at small-y40). friend and fellOut are 58,503 of the record’s 70,125 entries (83%); 84,345 of 104,874 at small-y40 (80%).medium-ref, today: friends median 11, no close friend 26%, disliked median 4, no enemy 83%. Weight 0.6, known 16, lines unchanged: friends 3, no close friend 87%, disliked 4, no enemy 96%. Weight 0.6, known 8: friends 4, disliked 13, no enemy 42% (a pawn dislikes most of whom it knows). Weight 0.7, known 8: disliked 15, no enemy 25%. Close friend at 0.45, weight 0.6, known 16 (run later that day): 59% have no close friend at medium-ref and 57% at small-y40, against 87% and 88% at 0.6 and 26% and 30% today; the most a pawn has is 3 and 4.sim/relations.js); one at a time with VB-238.QUESTIONS.md, VB-240); the band is checked at the
points listed, for the pair touched only, with no pass over pairs and no daily pass over a pawn’s ties; a line crossed lazily (a tie or a
memory fading, a housemate leaving) is told when the pair is next touched, dated then; timings by paired, alternated runs
(tools/bench-paired.js), median and range, a target and not a gate.
Impact note (for the PR):src/sim/relations.js only writes. New state pawn.bands (Map of other id to 1 or -1, owner sim/relations, in
src/owners.json; saved as a Map); pawn.rel keeps records of event memories only ({mem}, no band). opinionOf now reads pawn.ties
(tieOf) and compat besides the standing and the memories; talkWeight and companyFor read it with the tie they already hold
(opinionAt), companyFor taking the pawn’s tie scale once. src/sim/rules.js: SOCIAL.affinity {weight 0.6, known 16},
closeFriend 0.45, the three talk kinds out of SOCIAL.memories. src/sim/records.js, src/sim/notable.js: the event kinds
closeFriend and enemy (kept SHORT, two years, as friend and fellOut were, which stay listed for older records). src/sim/saves.js:
the packed record’s band slot is written 0 and not read (format 3 kept, so the fixtures load); migrateTies drops the talk kinds of an
older save and sets its bands from the opinion now, silently (no burst of events after a load). No new coupling between systems; no new
module. tools/sim.js --report relations counts over whom a pawn knows (ties and records), as the records alone are now few.pawn.bands, written only by touch(st, a, b), called for the pair whose tie or memories just changed: a talk
(grow, both ways), a job finished together (workedTogether through grow), the day’s hours at home (dailyTies through grow, the
housemate pairs it already walks), the season’s kin floor (dailyTies, the near kin it already raises), remember, and the season’s
fadeRelations, which checks again the bands that exist (a few a pawn) and drops those to the dead. No step walks all pairs for it
(Rules for cost, 2), nor a pawn’s ties: each touch is one opinionOf on a pair a loop already visits. A band can be left (or, rarely,
entered) lazily, as a tie or memory fades or a housemate leaves; it is told at the pair’s next touch, dated then, and the season’s pass
bounds how long a band can stand stale.remembers (each one or two opinionOf and a memory write, and a record made for a new pair) and now does two
touches (one opinionOf each, no allocation). dailyTies adds two opinionOf per housemate pair with hours at home (about 3 a living
pawn-day, the tiePairs counter) and one per kin floor raised. fadeRelations at medium-ref: 447 memories in 447 records against 111,109
in 55,074 before (the task’s 67,000 was counted at the fixtures’ load), plus 588 bands, once a season.
Implementation:opinionAt(st, a, b, tie) = the standing’s value + affinity (SOCIAL.affinity.weight × compat × min(1, tie / known)) + the memories,
clamped to -1..1; opinionOf reads the tie with tieOf. bandOf(was, o) enters at closeFriend and enemy and leaves back past them.
touch writes “Became close friends with” (closeFriend) or “Became the enemy of” (enemy). talk draws its kind as before (the same
draws of st.rng.talk), writes no memory, grows both ties and touches both. forget clears the dead’s records and bands, and its own and
others’ entries for it reached through its records, bands and ties; a band of one it had no tie to goes at the season’s pass.reasonsOf lists the affinity as “Get on well” or “Do not get on” (the panel’s reason), beside the memories and the standing.fadeRelations copies the memories left with sift (the same rule as before, shared with the load’s migration); relations.js is at 400
lines, its limit: the next change there should first split goodwill (VB-217’s section, about 70 lines) into its own module.
Validation:tests/relations.js rewritten for the derived opinion (affinity half and whole; close friends through work together, told once;
left lazily and dropped at the season’s pass without news; an enemy from event memories, told once; reasons; a talk leaves no memory and
its bubble keeps its kind; company by affinity and memories); tests/succession.js makes its friend by tie and compatibility;
tests/record.js re-records the heirs-7 anchor (225 events to 75, hash f3b456df02d5628a: behaviour, not format; the friend and fell-out
events left) and its fold now folds close friends and enemies only.checkRel): no memory of a kind outside SOCIAL.memories; bands are 1 or -1, to another pawn, none for the dead; a band agrees
with its opinion within back plus the most opinion can drift between the season’s checks with nothing touching the pair (a season of a
tie’s affinity fading, of each memory fading, and a housemate’s standing lost: 0.31). Not met as written: “within back” alone cannot hold
with no pass over pairs, by the orchestrator’s rule above; with a daily pass over the bands (a few a pawn) it could.measure.js in the run’s scratchpad: per pawn of 12 and over, opinion of each living pawn it has a tie to or a record of; lines
0.25, 0.45, -0.2, -0.5 on both sides, so “before” counts close friends at 0.45, not the old 0.6; events of each year counted at its end, before
any fold; record and counts at the end). Before b14f8a4, after this branch:| Run | Friends (median / p90 / none) | Close friends | Disliked | Enemies | Events a pawn-year (all; friend+fellOut or closeFriend+enemy) | Record (entries, yearly counts) | Talks a day | Living, households | Memories (records) | |
|---|---|---|---|---|---|---|---|---|---|---|
| small-y40 | before | 10 / 15 / 0% | 3 / 7 / 6% | 4 / 8 / 8% | 0 / 1 / 87% | 5.339 (friend 2.395, fellOut 1.7811) | 114592, 2491 | 2504.7 | 663, 166 | 49592 (22142) |
| small-y40 | after | 2 / 4 / 8% | 0 / 1 / 61% | 1 / 3 / 37% | 0 / 0 / 96% | 1.278 (closeFriend 0.0453, enemy 0.0077) | 104067, 2466 | 2483.6 | 662, 167 | 103 (103) |
| medium-ref | before | 11 / 16 / 0% | 4 / 7 / 4% | 4 / 8 / 7% | 0 / 1 / 87% | 6.473 (friend 3.009, fellOut 2.1573) | 101406, 530 | 4165.7 | 1085, 240 | 111109 (55074) |
| medium-ref | after | 2 / 4 / 8% | 0 / 1 / 59% | 1 / 3 / 37% | 0 / 0 / 96% | 1.362 (closeFriend 0.0378, enemy 0.0072) | 80100, 500 | 4173.4 | 1086, 247 | 447 (447) |
| populous-small-3 | before | 11 / 15 / 0% | 4 / 7 / 5% | 4 / 8 / 4% | 0 / 1 / 83% | 5.476 (friend 2.62, fellOut 1.5643) | 32726, 328 | 1505.3 | 454, 115 | 30128 (12632) |
| populous-small-3 | after | 2 / 4 / 5% | 0 / 1 / 64% | 1 / 3 / 33% | 0 / 0 / 96% | 1.374 (closeFriend 0.0694, enemy 0.0094) | 8607, 98 | 1533 | 464, 114 | 29 (29) |
| populous-small-7 | before | 10 / 15 / 0% | 4 / 7 / 3% | 4 / 7 / 5% | 0 / 1 / 84% | 5.614 (friend 2.6998, fellOut 1.737) | 31632, 286 | 1485.3 | 399, 92 | 29275 (12503) |
| populous-small-7 | after | 2 / 4 / 6% | 1 / 2 / 46% | 1 / 3 / 25% | 0 / 0 / 98% | 1.234 (closeFriend 0.0705, enemy 0.0069) | 7382, 83 | 1505.5 | 431, 95 | 42 (42) |
| populous-small-11 | before | 11 / 15 / 0% | 4 / 8 / 2% | 4 / 7 / 4% | 0 / 1 / 87% | 5.12 (friend 2.4157, fellOut 1.4729) | 32293, 384 | 1612.2 | 472, 111 | 29668 (12070) |
| populous-small-11 | after | 2 / 4 / 5% | 0 / 2 / 60% | 1 / 4 / 26% | 0 / 0 / 97% | 1.292 (closeFriend 0.0606, enemy 0.0064) | 8499, 102 | 1631 | 474, 112 | 21 (21) |
| populous-small-42 | before | 12 / 16 / 0% | 5 / 8 / 3% | 4 / 8 / 3% | 0 / 1 / 84% | 5.69 (friend 2.8411, fellOut 1.6601) | 35639, 295 | 1654.5 | 488, 107 | 37053 (15651) |
| populous-small-42 | after | 3 / 4 / 4% | 1 / 2 / 44% | 1 / 3 / 29% | 0 / 0 / 96% | 1.262 (closeFriend 0.0792, enemy 0.0063) | 7993, 88 | 1606.7 | 459, 104 | 26 (26) |
Expected about 3 friends and 4 disliked a pawn: friends come out 2 (3 at seed 42), disliked 1. Enemies are seldom without an event (no enemy
for 96 to 98%; 0.006 to 0.009 enemy events a living pawn-year). The formula read on the fixtures as loaded (ties as they are now) gives the
same, friends 2 and disliked 1 at medium-ref and small-y40: the task’s note (3 and 4) cannot be reproduced from the ties read now (read
as stored weights, 4 and 8). With known 8 the fixtures give 3 and 3 to 4, and a trial run gives friends 3, disliked 3 to 4, no enemy 84 to
92%: proposed in QUESTIONS.md (VB-240), not built. The record: events a living pawn-year fall from 5.1-6.5 to 1.2-1.4; the friend and
fell-out events (4.2 to 5.2 a pawn-year, 80% of the record’s growth) give way to 0.04 to 0.09 close-friend and enemy events. The record of
populous small at 15 years is 7,400 to 8,600 entries against 31,600 to 35,600; at medium-ref after 4 years 80,100 against 101,406 (most
of it the fixture’s past). Talks a day unchanged within 2%. Living and households move by chance only (the runs diverge from the first
talk): +10, +32, +2, -29 living on the four seeds, small-y40 -1, medium-ref +1; households alike.
node tools/bands.js, full runs, against today’s record at 756c693 in docs/bench/bands.jsonl; this run’s record
was written to the scratchpad, not appended): 21 bands out of 50 against 22. Population at 30 years, populous small: 504 to 502, 542 to
587, 548 to 569, 705 to 625 (seeds 3, 7, 11, 42); births and marriages move with them (seed 42: marriages 199 to 178). Founders: 7 to 13,
26 to 38, 26 to 26, 24 to 22; heirs 20 to 18 and 12 to 12 (heirs 42 now ends with a second village: villages/heirs out). Hunger bands
were out before and stay out, by seed in both directions. No band moves beyond the spread of seeds. Customs: populous small seeds 7 and
42 after 15 years (tools/sim.js --report customs) adopt the same 14 customs before and after, with no change in the history; the
attitude aggregates differ by a few hundredths (one by 0.14 at seed 42), as runs that diverge do. The culture’s drift reads ties, which
talk still feeds as before: customs did not move.node tools/bench-paired.js --before <b14f8a4> --runs 3, medium-ref, a whole year a run, alternated): the mean a game day 171.7 ms (161.5 to 196.9)
before, 162.6 (159.0 to 188.0) after: noise. “talk and contacts” falls from 23.2% of the step (23.0 to 23.6) to 17.9% (17.8 to 18.2), about
39.8 ms to 29.1 ms a game day at the medians, against its 55 ms share of the budget: in, residual -25.9 ms (51 ms at the task’s
measurement). “daily life and births”, which holds dailyTies and its new touches, rises from 15.5% (15.1 to 16.2) to 18.4% (16.6 to 18.6),
about 26.6 to 29.9 ms against its 35 ms: in. The longest step 70.9 ms (40.4 to 91.5) before, 61.4 (49.3 to 66.1) after: noise, over its
60 ms target by 1.35 within the before range; the 99th centile step 9.5 to 10.6 ms. Per living pawn-day 0.169 to 0.160 ms: noise.pawn.bands is
new): founders 7 and 42, heirs 7 and 42, each at seed and years 1 to 3. Counters re-recorded as a ratchet, falls only: routeHit 5.293 to
5.271, talkWeighed 10.83 to 10.57, walkStep 114.26 to 113.66, idleStroll 5.664 to 5.623, companyWeighed 10.59 to 10.40, tiePairs
2.942 to 2.941, oppAsk 39.114 to 39.106, lookUpJob 5.591 to 5.582; the rises are left at their baselines (routeSearch, routeExpand,
walkPoint, matchBid within 10%, and routeRefresh out, below).src/page/ changed. The pawn panel’s reason line now shows the affinity (“Get on well”), which
tools/shot.js cannot open.
Targets (for the PR):npm run verify: 105 scripts pass, hard checks all green; 8 targets out against 6 at the base:
small-y5 (165,910 to 147,037) and rise at
small-y40 (532,833 to 567,372), as whom an idle pawn joins, and so where it walks, now follows affinity; no loop was added.medium-ref, mean 171.7 to 162.6 ms a game day (noise), “talk and contacts” 39.8 to 29.1 ms (in, -25.9 against its 55),
longest step 61.4 ms against 60 (+1.35, noise: before 70.9, range 40.4 to 91.5).QUESTION_ARCHIVE.md, VB-240): SOCIAL.affinity.known is 8, the weight and the lines unchanged. Set by the orchestrator after VB-282’s merge; the golden file and tests/record.js’s heirs-7 anchor (83 events) were re-recorded for the two together. The trial run’s numbers (3 friends, 3 to 4 disliked, no enemy 84 to 92%) are the agent’s, measured before VB-282; they were not measured again on the merged branch.