lesson_record
Record mistakes, insights, patterns, or antipatterns for later retrieval; use same_as to mark repeats and count occurrences, and set near_miss to capture corrected errors before damage occurs.
Instructions
Record a lesson learned. Pass same_as= when this is a repeat of an already-recorded lesson: increments that lesson's occurrences, appends this description to it as a dated, capped repetition note, and creates no new row (unknown same_as id is an error, never a silent new entry). Escalates to rule at 3+ occurrences. Without same_as: increments occurrences only on an exact duplicate (same type + byte-identical description); otherwise creates a new lesson and, if an active lesson of the same type looks similar, returns it as similar_lesson_hint (a hint only — never auto-merged; re-record with same_as to merge). anlass records what triggered this entry: 'selbst' (you wrote it unprompted) or 'betreiber' (an explicit human instruction, e.g. "merk dir das") are SELF-REPORTED -- only as reliable as the caller. 'hook' and 'skript' are objective in principle, but note the enforcing Stop-hook never calls this tool itself -- it only forces you to run /learn, which then calls this normally, so 'hook' is still self-reported by that skill, not verified by the server. Default 'unbekannt' if omitted; an unknown value is rejected with the allowed list, nothing is written (applies even on a duplicate/same_as bump, where the existing row's anlass is left untouched anyway). SET beinahefehler=true FOR A NEAR MISS: something you caught and corrected BEFORE it did damage -- a wrong number you almost reported as evidence, a command you almost ran on the wrong file, a claim you almost made without checking. Record it in the same flow, do not wait for the end of the session: this class is the cheapest to learn from and the one that goes unrecorded, because a correction in the same breath feels like a work step, not a mistake. It is counted, not judged -- what gets counted is the error class and what caught it, never who made it. bemerkt_woran is then MANDATORY (what caught it); without it nothing is written.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| actor | No | Calling agent identity; else BEGOD_KNOWLEDGE_ACTOR or unknown | |
| kreis | No | Optional: restrict this lesson to one circle of people you belong to (BDW-E22). Empty (default) means everyone in your tenant. Set it AT CREATION. | |
| model | No | Calling model; else BEGOD_KNOWLEDGE_MODEL or unknown | |
| same_as | No | ID of an existing lesson this is a repeat of, e.g. 'L-6e48a9' | |
| session | No | Stable session ID; else BEGOD_KNOWLEDGE_SESSION or unknown | |
| occasion | No | What triggered this entry -- selbst/betreiber self-reported, hook/skript objective in principle (see tool description). Default 'unbekannt'. | unbekannt |
| projects | No | Affected projects | |
| severity | No | medium | |
| caught_by | No | What caught the near miss -- zahl (a number/output did not match expectation, no mechanism involved), test, waechter (hook/trigger/lint), gegenprobe (deliberate counter-check), wissen (a recalled lesson/node), betreiber (a human said so), zufall (noticed by chance while reading something else). Mandatory when beinahefehler=true. | |
| near_miss | No | Near miss: caught and corrected before any damage. Requires bemerkt_woran. | |
| node_path | No | Related knowledge node path | |
| prevention | No | ||
| resolution | No | ||
| root_cause | No | ||
| description | Yes |