pub struct DecisionRecord {
pub id: Option<Thing>,
pub decision_id: String,
pub commit_id: String,
pub task: String,
pub action: String,
pub rationale: String,
pub alternatives: Value,
pub confidence: f32,
pub outcome: Option<String>,
pub timestamp: DateTime<Utc>,
pub outcome_at: Option<DateTime<Utc>>,
}Expand description
Decision record - captures agent decisions with rationale and outcomes
Fields§
§id: Option<Thing>SurrealDB record ID
decision_id: StringUnique decision ID (UUID string)
commit_id: StringAssociated commit ID
task: StringTask/context this decision was about
action: StringWhat was decided/action taken
rationale: StringWhy this decision was made
alternatives: ValueAlternative options considered (JSON array)
confidence: f32Confidence level (0.0-1.0)
outcome: Option<String>Decision outcome
timestamp: DateTime<Utc>Decision timestamp
outcome_at: Option<DateTime<Utc>>When outcome was recorded (if any)
Implementations§
Source§impl DecisionRecord
impl DecisionRecord
Sourcepub fn new(
decision_id: String,
commit_id: String,
task: String,
action: String,
rationale: String,
confidence: f32,
) -> DecisionRecord
pub fn new( decision_id: String, commit_id: String, task: String, action: String, rationale: String, confidence: f32, ) -> DecisionRecord
Create a new decision record
Sourcepub fn with_alternatives(self, alternatives: Vec<String>) -> DecisionRecord
pub fn with_alternatives(self, alternatives: Vec<String>) -> DecisionRecord
Add alternatives to consider
Sourcepub fn with_outcome(self, outcome: String) -> DecisionRecord
pub fn with_outcome(self, outcome: String) -> DecisionRecord
Record the decision outcome
Trait Implementations§
Source§impl Clone for DecisionRecord
impl Clone for DecisionRecord
Source§fn clone(&self) -> DecisionRecord
fn clone(&self) -> DecisionRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecisionRecord
impl Debug for DecisionRecord
Source§impl<'de> Deserialize<'de> for DecisionRecord
impl<'de> Deserialize<'de> for DecisionRecord
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DecisionRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DecisionRecord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DecisionRecord
impl Serialize for DecisionRecord
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for DecisionRecord
impl RefUnwindSafe for DecisionRecord
impl Send for DecisionRecord
impl Sync for DecisionRecord
impl Unpin for DecisionRecord
impl UnsafeUnpin for DecisionRecord
impl UnwindSafe for DecisionRecord
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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