pub struct Lesson {Show 20 fields
pub id: String,
pub origin_ms: i64,
pub repo: String,
pub question: String,
pub situations: Vec<String>,
pub consequence: String,
pub support: u32,
pub episodes: Vec<String>,
pub history: Vec<Value>,
pub version: u32,
pub engineers: Vec<String>,
pub joined: BTreeMap<String, i64>,
pub area: String,
pub supersedes: Vec<String>,
pub source: String,
pub scope: Vec<String>,
pub overrides: String,
pub origin: String,
pub facets: Vec<String>,
pub reach: String,
}Expand description
A lesson as stored: the conscience’s Challenge plus provenance and consolidation state.
Append-only: a merge writes a new version with the same id; readers keep the latest.
Fields§
§id: String§origin_ms: i64§repo: String§question: String§situations: Vec<String>§consequence: String§support: u32§episodes: Vec<String>§history: Vec<Value>§version: u32§engineers: Vec<String>Engineers whose corrections this lesson was learned from, first contributor first.
joined: BTreeMap<String, i64>When each later engineer joined (ms of their first episode merged in): trust.rs counts a lesson’s outcomes for an engineer only from then on. The first contributor is absent.
area: StringKind of concern (trust.rs AREAS), set by the generalising model call; “other” if absent.
supersedes: Vec<String>Existing lessons this one replaces or contradicts; the conscience asks this one instead.
source: String“queen” for a queen answer (queen.rs), “import” for team knowledge read from a directory (assimilate_dir.rs), kept across merges; empty for learned lessons.
scope: Vec<String>Where the lesson applies, as names (systems, repos, services: “Orion”, “harbor_orion”). Empty:
wherever it matches. A scoped lesson is asked only when the drone’s context names one of them
(conscience.rs in_scope), so a team rule for one system never reaches another.
overrides: StringThe outside rule or idiom this lesson replaces, and why (“upstream petri-net-design seeds a budget
with a reset arc; Orion drains instead because …”). Lessons replace lessons via supersedes;
this names what is not a lesson (a vendored skill, upstream docs). Rendered with the question:
an override that does not name what it replaces loses to it (seen in an earlier eval).
origin: StringSource location of an imported lesson (path:line in the source repo); empty for learned ones.
facets: Vec<String>Alternative phrasings of the lesson for search (facets.rs): the concept without names, the symptom,
the action, the consequence, German, the identifiers as aliases. Each is its own BM25 document
(conscience.rs rank); never shown to a drone. Empty for lessons learned before facets existed.
reach: StringWho should hear the lesson (reach.rs): empty for the team, repo for its repo only, personal
for a lesson in the store’s local-only personal.jsonl, and for the tombstone that withdrew it
from lessons.jsonl.