Skip to main content

LearningConfig

Struct LearningConfig 

Source
pub struct LearningConfig {
Show 43 fields pub enabled: bool, pub auto_activate: bool, pub min_failures: u32, pub improve_threshold: f64, pub rollback_threshold: f64, pub min_evaluations: u32, pub max_versions: u32, pub cooldown_minutes: u64, pub correction_detection: bool, pub correction_confidence_threshold: f32, pub detector_mode: DetectorMode, pub judge_model: String, pub feedback_provider: ProviderName, pub judge_adaptive_low: f32, pub judge_adaptive_high: f32, pub correction_recall_limit: u32, pub correction_min_similarity: f32, pub auto_promote_min_uses: u32, pub auto_promote_threshold: f64, pub auto_demote_min_uses: u32, pub auto_demote_threshold: f64, pub cross_session_rollout: bool, pub min_sessions_before_promote: u32, pub min_sessions_before_demote: u32, pub max_auto_sections: u32, pub domain_success_gate: bool, pub arise_enabled: bool, pub arise_min_tool_calls: u32, pub arise_trace_provider: ProviderName, pub stem_enabled: bool, pub stem_min_occurrences: u32, pub stem_min_success_rate: f64, pub stem_provider: ProviderName, pub stem_retention_days: u32, pub stem_pattern_window_days: u32, pub erl_enabled: bool, pub erl_extract_provider: ProviderName, pub erl_max_heuristics_per_skill: u32, pub erl_dedup_threshold: f32, pub erl_min_confidence: f64, pub d2skill_enabled: bool, pub d2skill_max_corrections: u32, pub d2skill_provider: ProviderName,
}

Fields§

§enabled: bool§auto_activate: bool§min_failures: u32§improve_threshold: f64§rollback_threshold: f64§min_evaluations: u32§max_versions: u32§cooldown_minutes: u64§correction_detection: bool§correction_confidence_threshold: f32§detector_mode: DetectorMode

Detector strategy: “regex” (default) or “judge”.

§judge_model: String

Model for the judge detector (e.g. “claude-sonnet-4-6”). Empty = use primary provider.

§feedback_provider: ProviderName

Provider name from [[llm.providers]] for detector_mode = "model" (LlmClassifier).

Empty = use the primary provider. Named but not found in registry = log warning, degrade to regex-only. Never fails startup.

§judge_adaptive_low: f32

Regex confidence below this value is treated as “not a correction” — judge not invoked.

§judge_adaptive_high: f32

Regex confidence at or above this value is accepted without judge confirmation.

§correction_recall_limit: u32§correction_min_similarity: f32§auto_promote_min_uses: u32§auto_promote_threshold: f64§auto_demote_min_uses: u32§auto_demote_threshold: f64§cross_session_rollout: bool

When true, auto-promote and auto-demote decisions require the skill to have been used across at least min_sessions_before_promote (for promotion) or min_sessions_before_demote (for demotion) distinct conversation sessions. Prevents trust transitions from a single long session.

§min_sessions_before_promote: u32

Minimum number of distinct conversation_id values in skill_outcomes before auto-promotion is eligible. Only checked when cross_session_rollout = true.

§min_sessions_before_demote: u32

Minimum distinct sessions before auto-demotion when cross_session_rollout = true.

Default 1 (demotion can happen after a single bad session by default). Separate from min_sessions_before_promote because demotion should be fast (low threshold) while promotion benefits from conservative validation (higher threshold).

§max_auto_sections: u32

Maximum number of top-level content sections (markdown H2 headers) allowed in auto-generated skill bodies. Bodies exceeding this limit are rejected by validate_body_sections().

§domain_success_gate: bool

When true, auto-generated skill versions must pass a domain-conditioned evaluation before promotion. If the improved body drifts from the original skill’s domain, activation is skipped (the version is still saved for manual review).

§arise_enabled: bool

Enable ARISE trace-based skill improvement (disabled by default).

§arise_min_tool_calls: u32

Minimum tool calls in a turn to trigger ARISE trace improvement.

§arise_trace_provider: ProviderName

Provider name from [[llm.providers]] for ARISE trace summarization. Empty = fall back to primary provider.

§stem_enabled: bool

Enable STEM automatic tool pattern detection and skill generation (disabled by default).

§stem_min_occurrences: u32

Minimum occurrences of a tool sequence before generating a skill candidate.

§stem_min_success_rate: f64

Minimum success rate of the pattern before generating a skill candidate.

§stem_provider: ProviderName

Provider name from [[llm.providers]] for STEM skill generation. Empty = fall back to primary provider.

§stem_retention_days: u32

Days to retain rows in skill_usage_log before pruning.

§stem_pattern_window_days: u32

Window in days for pattern detection queries (limits scan cost on large tables).

§erl_enabled: bool

Enable ERL post-task heuristic extraction (disabled by default).

§erl_extract_provider: ProviderName

Provider name from [[llm.providers]] for ERL heuristic extraction. Empty = fall back to primary provider.

§erl_max_heuristics_per_skill: u32

Maximum heuristics prepended per skill at match time.

§erl_dedup_threshold: f32

Text similarity threshold (Jaccard) for heuristic deduplication. When exact text match exceeds this, increment use_count instead of inserting.

§erl_min_confidence: f64

Minimum confidence to include a heuristic at match time.

§d2skill_enabled: bool

Enable D2Skill step-level error correction (disabled by default).

Requires arise_enabled = true to populate corrections from ARISE traces. If d2skill_enabled = true and arise_enabled = false, existing corrections are still applied but no new ones are generated via ARISE.

§d2skill_max_corrections: u32

Maximum corrections to inject per failure event.

§d2skill_provider: ProviderName

Provider name from [[llm.providers]] for correction extraction from ARISE traces. Empty = fall back to primary provider.

Trait Implementations§

Source§

impl Clone for LearningConfig

Source§

fn clone(&self) -> LearningConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LearningConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for LearningConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for LearningConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for LearningConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,