Skip to main content

Module skill_memory

Module skill_memory 

Source
Expand description

Durable repair learning for the native loop — the “gets better over time” half.

The native loop repairs across iterations but, on its own, forgets everything the moment a session ends. This module wires car-memgine’s skill store in so that which repair approach worked for a given failure survives the session and can be recalled the next time the same failure shows up.

§Shape

A “repair skill” is a car-memgine skill whose trigger is keyed on a normalized failure signature — the failing check’s name plus a coarse error class (e.g. tests::test_failure, build::compile_error). The signature is stored both as a structured trigger (canonical, kind = "coder_repair") and echoed into task_keywords so the existing keyword-based find_skill matcher can recall it (structured-trigger dispatch is deferred in memgine — see SkillTrigger docs).

§Degradation

Memgine is never a hard dependency of a coder session. When the daemon runs standalone (shared_memgine = None), RepairMemory::disabled yields a handle whose every method is a cheap no-op. The loop never blocks on the memgine lock holding anything else, and a poisoned lock degrades to no-op rather than propagating a panic into the loop.

Structs§

FailureSignature
A normalized fingerprint of a failing check: the check name plus a coarse error class, so the same kind of failure recalls a prior fix even when the exact output differs run to run.
RepairMemory
Optional handle onto the shared memgine, used to remember and recall repair approaches. Cloning is cheap (Arc); None means learning is disabled and every method is a no-op.