Self-improve: distill lessons from the journal
refineReview past errors and failed audits, distill evidence-backed lessons, and inject them into future work to fix recurring problems.
Instructions
The self-improvement loop (inspired by continual-harness agents). Call it in two steps. Step 1 - call WITHOUT lessons: it returns review material (recent errors, open problems, failed audits, repeated tool patterns, existing lessons). Study it and distill what should be done differently next time. Step 2 - call WITH lessons: each lesson must be small, actionable and evidence-backed (cite the journal events that prove it). Lessons are injected into future get_context recaps and work packages, so they actually change behavior. Use scope 'global' for lessons that apply to all future projects (e.g. 'Windows needs taskkill for process trees'), project scope for project-specific ones. Do NOT record duplicates of existing lessons. Good moments to refine: after a failed audit was fixed, after a tricky bug, at project completion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lessons | No | Omit on the first call to receive review material | |
| projectId | No | ||
| deactivateLessonIds | No | Ids of existing lessons that turned out wrong or obsolete |