Skip to content

Commit subjects: a short imperative line generated separately from the run summary #3736

Closed

Description

@integry

Problem

Commits made by ProPR runs use the agent's first-person run summary as the commit subject, for example feat(ai): I fixed both selected findings, F1 and F2, and the unit and browser tests for them pass. In the 0.9.2 release check (finding G3, #3680 item 19):

  • 73% of subjects start with "I"; the median subject is 248 characters.
  • Every commit is prefixed feat(ai):, whatever it does.
  • When a sub-PR is squashed into an epic branch, the squash subject is the first paragraph of the first commit (checkRunHandler.ts, around lines 114–122 at the time of the check).

git log --oneline on main is therefore hard to scan, and the subject says how the run went, not what changed.

Wanted

  • The commit subject is a short imperative line that says what changed (target: 72 characters or fewer, no first person, no test-result report), generated separately from the run summary. The summary can stay in the commit body.
  • The conventional-commit type reflects the change (fix, feat, docs, chore, test, …) instead of always feat. The AI marker moves out of the subject into a commit trailer (ProPR-Agent: <agent alias>/<model>), so subjects read as ordinary conventional commits with no (ai) scope. (Default chosen on 2026-11-20; if the maintainer prefers the (ai) scope, it is a one-line change.)
  • The epic-branch squash subject follows the same rule, built from the sub-PR title, not from the first commit's first paragraph.
  • If generating the subject fails, fall back to the PR or issue title, never to the summary text.

Notes

Implementation notes

  • Find every place a commit or squash subject is built from the run summary (agent commit after a run, follow-up commits, the epic-branch squash in checkRunHandler.ts, merge-conflict resolution commits) and route them through one subject builder.
  • Generate the subject with the existing lightweight title/summary generation path (the one used for PR titles), with a hard cap of 72 characters and a deterministic fallback to the PR or issue title.
  • Infer the conventional-commit type from the change (changed paths and the issue/PR title); default to chore when unclear, never always feat.
  • Anything that parses commit subjects (changelog or release-notes tooling, tests, the feat(ai): prefix checks) must keep working with both old and new history.
  • Unit tests for the builder: first-person summary in, imperative subject out; over-long subject truncated at a word boundary; generation failure falls back to the title; type inference per path class; trailer present.
  • Add a CHANGELOG entry under Unreleased.

Activity

  1. propr-dev commented on Nov 20, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: claude
    • Model: claude-opus-5-5
    • Branch: 3736/claude-opus-5-5-commit-subjects-a-short-i-20261120-1619-d6d
    • Base Branch: main
    • Worktree: issue-3736-20261120-1619-claude-opus-5-5-d6d

    🔍 Track Task Execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions