blendtutor_core/llm/
mod.rs

1//! The LLM feedback layer: a pure prompt builder and the rig-core provider client
2//! that turns a model's structured tool call into a typed verdict.
3//!
4//! Three concerns, one submodule each (§4.1): `prompt` builds the
5//! injection-hardened prompt (pure, §2.1); `provider` is the closed set of LLM
6//! backends; `feedback` runs the request and maps the result to a [`Verdict`]
7//! (the only effectful part, §2.2). The split keeps the pure prompt core separate
8//! from the effectful request (§3.1). This layer owns prompt-build, provider-client
9//! construction, and the DTO → domain mapping; it does **not** run learner code or
10//! score evals — that is the [`runner`](crate::runner) and [`grade`](crate::grade)
11//! layers' job. See ADR-0006.
12//!
13//! The public names are re-exported here, so callers use `core::llm::build_prompt`,
14//! `core::llm::OPEN_CODE`, etc., without depending on the internal split.
15
16mod feedback;
17mod prompt;
18mod provider;
19
20pub use feedback::{FeedbackError, Verdict, request_feedback};
21pub use prompt::{
22    CHECKS_LABEL, CLOSE_CODE, ExecResults, OPEN_CODE, OUTPUT_LABEL, Prompt, Submission,
23    build_prompt,
24};
25pub use provider::ProviderChoice;