Documentation
¶
Overview ¶
Package lesson turns recurring corrections into promotions to a durable owner (SPEC-ADDITIONS §11): it distills failures into governing classes and routes each to its smallest owner. Promoting to an executable owner is human-gated.
Index ¶
Constants ¶
const MinStrata = 2
MinStrata is how many distinct time strata (year-month) a failure class must recur across before it may be promoted (§11 temporal gate): promotion accretes a durable control, so it requires a pattern sustained across time, not a single-stratum burst — the same independence axis the routing-miss gate applies (§10.3).
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Lesson ¶
Lesson is a governing failure class and the instances that motivated it.
func Distill ¶
Distill groups failure notes by their governing class — the text before the first ':' — so a class that recurs becomes one candidate lesson. The result is sorted by class for stable output.
func (Lesson) Render ¶
Render produces the durable content for promoting the lesson to owner o (pure; the caller writes it). A decision is an ADR skeleton (§12) — the recurring class is the forcing context, the decision and its Easier/Harder trade-offs are left for a human to complete; any other materializing owner is avoid-this-class guidance carrying the recorded instances as evidence.
type Owner ¶
type Owner string
Owner is the durable place a lesson lands.
const ( OwnerContext Owner = "context" OwnerSkill Owner = "skill" OwnerDoc Owner = "doc" OwnerDecision Owner = "decision" OwnerCheck Owner = "check" OwnerInvariant Owner = "invariant" OwnerType Owner = "type" )
Owner values, from reversible (context) to executable (check/invariant/type).
func (Owner) Materializes ¶
Materializes reports whether promoting to o produces a routable §10 context unit the harness writes directly — the reversible content owners. A skill and the executable owners (check/invariant/type) need separate authoring, so they gate but are not auto-written.
func (Owner) RequiresApproval ¶
RequiresApproval reports whether promoting to o changes an executable control (check, invariant, or type) and therefore needs human approval (§11.2).