diskern-core has an ai feature with a trait, an error type, and a
working TemplateNarrator:
pub trait AiProvider: Send + Sync {
fn narrate(&self, findings: &[Finding]) -> Result<String, AiError>;
}
Nothing enables the feature, no frontend calls it, and no provider is
implemented — so the narration layer the README describes as
"AI narrates" does not exist in a build anyone can run.
The contract is already written and is the part worth keeping: the
provider gets findings the engine has already decided on and returns
prose. It cannot change a verdict, a score, or trigger an action, and
the app has to work identically with no provider configured. Any PR here
has to preserve that — narration is a view over the report, not a step
in the pipeline.
Roughly in order of usefulness:
- Wire
TemplateNarrator into the CLI behind --explain. No network,
no key, no new dependency — and it proves the seam works before
anyone builds a provider on it.
- An
OllamaProvider posting to http://localhost:11434. Local, free,
nothing leaves the machine.
- BYO-key providers, which need somewhere safe to keep a key and a
settings surface in the app — bigger, and worth its own issue.
Start at 1 if you want the smallest useful piece.
crates/diskern-core/src/ai.rs · crates/diskern-core/Cargo.toml:13
diskern-corehas anaifeature with a trait, an error type, and aworking
TemplateNarrator:Nothing enables the feature, no frontend calls it, and no provider is
implemented — so the narration layer the README describes as
"AI narrates" does not exist in a build anyone can run.
The contract is already written and is the part worth keeping: the
provider gets findings the engine has already decided on and returns
prose. It cannot change a verdict, a score, or trigger an action, and
the app has to work identically with no provider configured. Any PR here
has to preserve that — narration is a view over the report, not a step
in the pipeline.
Roughly in order of usefulness:
TemplateNarratorinto the CLI behind--explain. No network,no key, no new dependency — and it proves the seam works before
anyone builds a provider on it.
OllamaProviderposting tohttp://localhost:11434. Local, free,nothing leaves the machine.
settings surface in the app — bigger, and worth its own issue.
Start at 1 if you want the smallest useful piece.
crates/diskern-core/src/ai.rs·crates/diskern-core/Cargo.toml:13