Skip to content

[Maintenance] OC agent commits don't follow Conventional Commits when amending in bulk #267

Description

@github-actions

Problem

When asked to make multiple amendments to a PR in a single /oc session, the agent creates commits that don't follow Conventional Commits format. The initial commit (usually workflow-generated) follows conventions, but subsequent amendment commits use casual messages.

Observed in PR #266

5 commits on the branch, only 1 follows Conventional Commits:

Commit Message Format
fdc408f docs(whats-new): add entry for v1.4.0-dev.3
3d305b2 Removed AI chatter & deduped flat-threshold bullet.
dac0e46 Added anti-chatter rule to generator
838814f Added missing images + validation guard
8029d79 Fixed before plot, code cell, and after plot

The 4 non-conforming commits all lack the required prefix (chore:, fix:, docs:, etc.).

Previous fix attempts

This was raised before in #241 and addressed by:

These fixed the initial commit (workflow-generated) but didn't fix amendment commits made by the agent mid-session.

Likely root cause

The agent's opencode.json instructions preload the maintenance skill (which contains commit conventions), but during a long multi-amendment session, the agent may:

  1. Lose context on commit conventions after several tool calls
  2. Default to casual commit messages when the task is "just fix this" rather than "create a new PR"
  3. Not re-read the skill instructions before each git commit

Proposed fix

The maintenance skill or system prompt should include a hard rule before any git commit:

Before every git commit, verify the message matches ^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+. If it doesn't, rewrite it.

This could be enforced at the tool level (pre-commit hook on the runner) or as a more prominent instruction in the skill content.

Acceptance Criteria

  • Amendment commits in multi-step /oc sessions follow Conventional Commits format
  • No manual post-hoc fixup needed for commit messages on auto-generated PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovement on already existing featuremaintenanceChore related tasks

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions