pub struct LlmDraft {
pub summary: String,
pub target: String,
pub guidance: String,
pub evidence: Vec<String>,
pub confidence: f64,
pub lesson: String,
pub proposal: Option<Value>,
}Expand description
One DISCOVER draft as returned by the model. Unknown fields are dropped by serde; the engine further validates (cite-check, caps, target class, grounding, and independent verification before it is ever stored).
Fields§
§summary: String§target: String§guidance: String§evidence: Vec<String>§confidence: f64The model’s self-reported confidence 0.0–1.0 that this finding is both correct and materially useful (§5.1). Missing/garbled → 0.0 (rejected by the confidence floor), a safe default.
lesson: StringOptional authored lesson: one imperative rule the model proposes to record as a Fact grain. Empty (the default) keeps the draft advisory. A non-empty lesson makes the surviving recommendation applicable — through human review + apply only, never auto-apply — and the lesson text is folded into the GROUND claim and VERIFY summary so both gates judge exactly what an apply would write.
proposal: Option<Value>The generalized proposal vocabulary (§9.1): what change this draft asks
a reviewer to make. Held as raw JSON so one draft naming an unknown or
malformed kind degrades to advisory instead of dropping the whole
response — read it through LlmDraft::parsed_proposal.
Implementations§
Source§impl LlmDraft
impl LlmDraft
Sourcepub fn parsed_proposal(&self) -> Option<DraftProposal>
pub fn parsed_proposal(&self) -> Option<DraftProposal>
The proposal this draft makes, or None when it is advisory.
An explicit proposal decides on its own: if it names an unknown kind
or fails to parse, the draft is advisory rather than being quietly
re-read as something the model did not ask for. lesson is the
fallback only when no proposal was sent at all, which is what keeps
every transcript recorded before the vocabulary existed parsing — and
therefore keeps the published runs comparable.