You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Learning from incidents as a general loop: every incident ends with a routed lesson (check first, knowledge entry second) #53
ytstack has incident (production down, with a person), systematic-debugging (root cause) and lane-retro (sample finished lanes, turn mistakes into checks). Many incidents fall between these three: red main from a flaky test, a receipt that ticked a plan row too early or measured against the wrong denominator, a defect that only an independent review caught, a lane that killed a foreign process or stalled without a watcher, a coordinator who repeated an already-settled ask. None of these is a production incident, and lane-retro only samples about every fifth lane, so the lesson is easily lost. In one coordinator session on a large project, eight such incidents happened in a single day, and several were repeats of the same classes.
Proposal: an incident → lesson loop
A small, mandatory closing step that every one of these paths ends with (incident after mitigation, systematic-debugging after the root cause, finish-lane when a review blocked or a check went red, coordinate on a red main):
Classify the incident in one line: what happened, which class (flaky order, wrong evidence, missing watcher, process slip, capacity, ...).
Route the lesson, preferring a machine check: a test, a guard, a CI step or an alert. Only if no machine can check it, write a knowledge entry in the project's KNOWLEDGE.md (or the lane contract for agent behaviour). Never as one more sentence in AGENTS.md / CLAUDE.md, which matches the existing coordinate anti-pattern "I'll add a rule so that this does not happen again".
Record it in a dated retro file (e.g. .ytstack/archive/<date>/incident-retro.md): incident → lesson → where it now lives (check / entry / proposal), so repeats are visible.
Coordinator hook:coordinate keeps an open-lessons count in its status, and a lesson that is only a proposal goes to the person as part of the one daily question.
Possible tooling: ytstack-signals (or a sibling ytstack-lessons) with new, check (every recorded incident has a lesson with a target), and a frontier hook so lesson lanes can be dispatched like any other.
Why
The person's instruction that triggered this was simply "always learn from incidents". Today that depends on the agent remembering to do it, and after a compaction it does not.
changed the title [-]Incident → lesson loop: every incident ends with a routed lesson (check first, knowledge entry second)[/-][+]Learning from incidents as a general loop: every incident ends with a routed lesson (check first, knowledge entry second)[/+]on Nov 14, 2026
Scope clarification from the person who asked for this: the point is learning from incidents in general, as a standing behaviour of ytstack, not only for production incidents or the cases listed above. Any incident class (production, CI, evidence/receipts, review-caught defects, process slips of agents or the coordinator) should end in the same loop: classify → route the lesson (machine check first, knowledge entry second) → record → surface repeats. Ideally the loop is a shared step the existing skills call, so no path can skip it.
Shipped in 0.11.0 (M032, PR #67): skill ytstack:lesson (classify, machine check first, else KNOWLEDGE entry or proposal; never AGENTS.md/CLAUDE.md), kind: lesson in the signals ledger with counts and regressions, called by incident, systematic-debugging, finish-lane and coordinate; lesson lanes in the frontier; repeats per class in retro.
Activity
[-]Incident → lesson loop: every incident ends with a routed lesson (check first, knowledge entry second)[/-][+]Learning from incidents as a general loop: every incident ends with a routed lesson (check first, knowledge entry second)[/+]lx-0 commentedon Nov 14, 2026
Scope clarification from the person who asked for this: the point is learning from incidents in general, as a standing behaviour of ytstack, not only for production incidents or the cases listed above. Any incident class (production, CI, evidence/receipts, review-caught defects, process slips of agents or the coordinator) should end in the same loop: classify → route the lesson (machine check first, knowledge entry second) → record → surface repeats. Ideally the loop is a shared step the existing skills call, so no path can skip it.
M031: factory tools explicit (risk route from the host, coordinator f…
M032 + M033: incident to lesson loop, upstream feedback channel (#67)
lx-0 commentedon Nov 15, 2026
Shipped in 0.11.0 (M032, PR #67): skill
ytstack:lesson(classify, machine check first, else KNOWLEDGE entry or proposal; never AGENTS.md/CLAUDE.md),kind: lessonin the signals ledger with counts and regressions, called byincident,systematic-debugging,finish-laneandcoordinate; lesson lanes in the frontier; repeats per class inretro.🤖 Generated with Claude Code