Skip to content

[History] Imperative-rate calculation skips non-imperative samples #204

Description

@404-Page-Found

Description

The style-profile logic increments imperativeSampleCount only when the detected verb is already classified as imperative. That inflates the final imperativeRate, because non-imperative samples never enter the denominator.

Location

  • src/history/store.ts:119
  • src/history/store.ts:153

Problematic code

if (!verb.endsWith('ed') && !verb.endsWith('ing')) {
  imperativeCount++;
  imperativeSampleCount++;
}

Suggested fix

Increment imperativeSampleCount for every sample where a verb/first word is actually evaluated, then increment imperativeCount only for imperative-like cases.

Impact

The learned style profile can overstate how often a project uses imperative commit messages, which then affects prompt guidance and generated suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions