Skip to main content

Crate semver_analyzer_llm

Crate semver_analyzer_llm 

Source
Expand description

LLM-based behavioral analysis for the semver-analyzer.

This crate implements the BehaviorAnalyzer trait from semver-analyzer-core. It provides:

  1. Agent-agnostic LLM invocation via --llm-command (goose, opencode, etc.)
  2. Template-constrained spec inference — prompts that produce FunctionSpec JSON
  3. Tier 1 structural spec comparison — mechanical comparison without LLM
  4. Tier 2 LLM fallback — for ambiguous notes diffs and fuzzy matches

§Usage

use semver_analyzer_llm::LlmBehaviorAnalyzer;

let analyzer = LlmBehaviorAnalyzer::new("goose run --no-session -q -t");
let spec = analyzer.infer_spec(&function_body, &signature)?;

Re-exports§

pub use invoke::FileApiChange;
pub use invoke::FileBehavioralChange;
pub use invoke::LlmConstantRenamePattern;
pub use invoke::LlmInterfaceRenameMapping;
pub use invoke::LlmSuffixRename;

Modules§

invoke
LLM command invocation and response parsing.

Structs§

LlmBehaviorAnalyzer
LLM-based implementation of BehaviorAnalyzer.