Skip to main content

Module trust

Module trust 

Source
Expand description

Trust per engineer × area, earned from outcomes (PLAN.md “Assimilation”, step 4).

Corrections are claims, not facts: engineers reverse themselves (in one real case the same day), and weak engineers exist. So a lesson’s pull on the conscience depends on how its authors’ earlier claims in the same area held up. Everything here is deterministic, costs 0 tokens and reads only the routed collective’s own store (lessons.jsonl and the outcomes.jsonl beside it): a private collective’s evidence never moves trust in a work one, and an off repo has none.

Local and shared evidence: followed and corrected come from this machine’s outcomes.jsonl plus the teammates’ results the mesh syncs as outcomes-team.jsonl (outcome.rs read_team: hashed sessions, each counted once), unless BORG_SHARE_OUTCOMES=off; superseded comes from the lessons and is shared. Teammates converge on the same trust once synced; results not yet synced, or kept local with BORG_SHARE_OUTCOMES=off, still make it differ, and borg trust says so.

Engineers are canonical (collective.rs “Engineers”): emails compare case-insensitively and the emails an engineers entry lists are one engineer, mapped when lessons are read. The aliases are this machine’s config, so a peer without them splits that engineer’s trust again.

Area: every lesson carries one of AREAS, set by the same model call that generalises its episode (learn.rs); lessons from before areas existed, or with an unknown area, are “other”.

Evidence per (engineer, area): for each lesson, each of its engineers (git user.email recorded at capture), in the lesson’s area, gets (an engineer who joined the lesson by a later merge only from sessions after they joined, so merging into a well-followed lesson inherits none of its earned trust)

  • followed, +1 per session: the conscience asked it and no correction of the same concern followed (outcome.rs asked_not_corrected);
  • corrected, −1 per session: asked, and the engineer still corrected the same concern (asked_then_corrected): the claim did not change what the drone did;
  • superseded, −2 once, when the supersession is settled: a later lesson replaced or contradicted it (supersedes) and is the same engineer reversing himself, or a queen answer, or the successor has been followed at least once. An unsettled contradiction by another engineer is a claim against a claim and costs nobody trust yet.

Formula (Laplace’s rule of succession, a Beta(1, 1) prior):

trust = (1 + followed) / (2 + followed + corrected + 2 · superseded)

No evidence gives the neutral 0.5; the value stays strictly inside (0, 1), so one event can never make an engineer infallible or silence them. A superseded claim counts as two failures: being reversed is direct evidence the claim was wrong, while a correction after asking may also mean the question was too generic. One followed session gives 2/3, one corrected 1/3, one reversal 1/4.

A lesson’s trust is the mean of its authors’ trust in its area (0.5 without known authors). The conscience multiplies BM25 relevance by trust / 0.5 on top of the outcome weight. A superseded lesson is hidden (successors) on a self-reversal, a queen answer, or when its successor is at least as trusted; the successor inherits its relevance. Otherwise both stay live and the conscience renders them as one disagreement with each side’s trust.

Structs§

Evidence
What one engineer’s claims in one area led to.
Trust
Trust of every (engineer, area) that authored a lesson in one store.

Constants§

AREAS
The kinds of concern a lesson can be about.
NEUTRAL
Baseline: trust without evidence, the middle of [0, 1].
OTHER

Functions§

area
The area raw names (case, spaces and underscores ignored), “other” for anything else.
main
borg trust [--dir DIR]: trust per engineer × area of the collective DIR (default: the current directory) routes to. Off and invalid configs show nothing.
of_store
The trust of the store at home (its lessons and outcomes, nothing else), engineers under this machine’s aliases.
of_store_with
of_store under explicit aliases.
successors
Every hidden lesson’s live successor (the end of its chain of hiding supersessions): hidden lessons are not asked, the successor is asked in their place. X hides Y when the supersession is decisive or X’s trust (Challenge::trust) is at least Y’s; otherwise both stay live and the conscience renders them as a disagreement. Per hidden lesson the newest successor wins.
summary
One line for borg status.
summary_with
summary under explicit aliases.
table
The table borg trust prints for one store.