Skip to content

v0.6.0 — Semantic Intelligence

Latest

Choose a tag to compare

@Sephyi Sephyi released this 07 Apr 20:32
v0.6.0
7163ef7

Stage your changes and run. CommitBee handles the rest — no configuration needed.

Defaults to Ollama with qwen3.5:4b out of the box.

What's New

UI/UX

  • Interactive message refinement — Added a "Refine" option to the candidate selection and confirmation menu. Users can provide feedback to the LLM (e.g., "more detail about the API change") to regenerate the message with natural language guidance.
  • Native clipboard support — Replaced external commands (pbcopy, xclip) with the arboard crate for a native, cross-platform clipboard implementation.
  • Interactive commit editing — Added an "Edit" option to the candidate selection and confirmation menu. Users can now refine the generated message using their system editor before committing.

Semantic Analysis

  • Full AST diffs for structs and enumsAstDiffer now supports structured diffing for structs, enums, classes, interfaces, and traits. Detects added/removed fields, changed variants, and type modifications.
  • Parent scope extraction — Methods inside impl, class, or trait blocks now show their parent in the prompt: CommitValidator > pub fn validate(...). Walks the AST tree through intermediate nodes (declaration_list, class_body). Verified across 7 languages (Rust, Python, TypeScript, Java, Go, Ruby, C#).
  • Import change detection — New IMPORTS CHANGED: prompt section shows added/removed import statements. Supports Rust use, JS/TS import, Python from/import, Node require(), and C/C++ #include. Capped at 10 entries.
  • Doc-vs-code distinctionSpanChangeKind enum classifies modified symbols as WhitespaceOnly, DocsOnly, Mixed, or Semantic. Doc-only changes suggest docs type. Modified symbols show [docs only] or [docs + code] suffix in the prompt.
  • Test file correlation — New RELATED FILES: prompt section shows when source files and their matching test files are both staged. Stem-based matching, capped at 5 entries.
  • Structural AST diffsAstDiffer compares old and new tree-sitter nodes for modified symbols, producing structured SymbolDiff descriptions (parameter added, return type changed, visibility changed, async toggled, body modified). Shown as STRUCTURED CHANGES: section in the prompt.
  • Whitespace-aware body comparison — Body diff uses character-stream stripping so reformatting doesn't produce false BodyModified results.
  • Structured changes in prompt — New STRUCTURED CHANGES: section in the LLM prompt shows concise one-line descriptions of what changed per symbol (e.g., CommitValidator::validate(): +param strict: bool, return bool → Result<()>, body modified). Omitted when no structural diffs exist.
  • Semantic markersAstDiffer now detects unsafe added/removed, #[derive()] changes, decorator additions/removals, export changes, mutability changes, and generic constraint changes. Shown as +unsafe, +derive(Debug, Clone), etc. in the STRUCTURED CHANGES section.

Type Inference

  • Test-to-code ratio — When >80% of additions are in test files, suggests test type even with source files present. Uses cross-multiplication to avoid integer truncation.

Change Intent Detection

  • Diff-based intent patterns — Scans added lines for error handling (Result, ?, Err()), test additions (#[test], assert!), logging (tracing::, debug!), and dependency updates. Shown as INTENT: section in the prompt with confidence scores.
  • Conservative type refinement — High-confidence performance optimization patterns can override the base type to perf.

Security

  • Accurate secret scan line numbers — The secret scanner now parses @@ hunk headers to report accurate source line numbers for potential secrets, instead of absolute diff line numbers.
  • API key validation orderingset-key, get-key, init, config, completions, and hook commands no longer require an API key to be present. CLI --provider flag now applies before keyring lookup.
  • Platform-native keyring backends — keyring v3 now uses macOS Keychain (apple-native), Windows Credential Manager (windows-native), and Linux Secret Service (linux-native) instead of a mock file-based backend.
  • SecretString for API keys — API keys stored as secrecy::SecretString in Config and provider structs. Memory zeroed on drop, never exposed except at HTTP header insertion.
  • Overflow checks in release buildsoverflow-checks = true added to release profile for ANSSI-FR compliance.

Performance

  • Optimized symbol dependency merging — Improved CommitSplitter performance for large commits by pre-indexing symbols and optimizing diff scanning.

Prompt Quality

  • Token budget rebalance — Symbol budget reduced from 30% to 20% when structural diffs are available, freeing space for the raw diff. SYSTEM_PROMPT updated to guide the LLM to prefer STRUCTURED CHANGES for signature details.
  • Unsafe constraint rule — When unsafe is added to a function, a CONSTRAINTS rule instructs the LLM to mention safety justification in the commit body.

Testing

  • 442 tests total (up from 367 at v0.5.0).

Install

cargo install commitbee

Or build from source:

git clone https://github.com/sephyi/commitbee.git
cd commitbee && cargo build --release

Full changelog: CHANGELOG.md