Skip to main content

Module commit

Module commit 

Source
Expand description

Conventional-commit tool (deterministic scope + LLM analysis). Conventional-commit tool.

Produces atomic, conventional-commits-formatted commits from the working tree. The deterministic core (scope extraction, validation, Kahn topological ordering, message formatting) needs no LLM and is unit-tested; the CommitTool wraps it with optional LLM analysis via [oxi_ai::high_level::complete].

Ported from omp’s commit/ subsystem (~3,000 lines), keeping the deterministic heuristics verbatim and replacing the agentic pipeline with a single LLM analysis call plus a deterministic fallback.

Structs§

CommitGroup
One atomic commit group produced by split-commit planning.
CommitTool
Agent tool that produces conventional commits from the working tree.
ConventionalAnalysis
Result of conventional-commit analysis — the heart of every generated commit message.
ConventionalDetail
A single bullet point inside a conventional commit body.
NumstatEntry
One row of git diff --numstat output.
ScopeCandidate
A scope candidate derived from path analysis, ranked by weighted churn.

Enums§

ChangelogCategory
Keep-a-Changelog category for a single detail line.
CommitType
Conventional commit type, per the Conventional Commits specification.

Functions§

compute_dependency_order
Reorder groups in dependency order using Kahn’s algorithm.
extract_scope_candidates
Deterministically rank scope candidates from numstat by weighted line churn.
format_commit_message
Format a conventional commit message from an analysis and summary line.
is_excluded_file
Returns true if path is a lock file or other generated artifact that should be excluded from conventional-commit analysis.
is_wide_change
Returns true when the change set is too broad for a single scope.
normalize_summary
Best-effort normalisation of a summary so it satisfies validate_summary.
parse_numstat
Parse git diff --numstat output into NumstatEntry rows.
validate_scope
Validate a commit scope.
validate_summary
Validate a commit summary line.