Skip to content

[Maintenance] OC agent commits violate Conventional Commits format despite maintenance skill availability #253

Description

@RussellSB

Problem

When the OpenCode (OC) agent makes commits on PRs, it sometimes uses non-conventional commit messages (e.g. Fixed link. Issues need gh auth.) instead of following the Conventional Commits format (fix:, chore:, etc.) enforced by lint-pr-title.yml.

This was observed in PR #232 where the agent committed with messages like:

  • Fixed link. Issues need gh auth.

Expected behaviour

All commits should follow Conventional Commits format, as documented in the maintenance skill:

  • fix:, feat:, chore:, ci:, docs:, refactor:, etc.
  • Lowercase, imperative, <72 chars, no trailing period

Why this matters

  • lint-pr-title.yml rejects PR titles not matching ^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+
  • semantic-release maps commit prefixes to version bumps — wrong prefix = wrong release behaviour
  • Non-conventional commits create noisy git history

Theoretical root causes

  1. Skill not loaded before committing — The maintenance skill contains commit conventions but may not be loaded before the agent makes its first commit. The skill is loaded on-demand via skill({ name: "maintenance" }), not automatically.

  2. Agent defaults to natural language — Without the skill in context, the agent falls back to casual commit messages like it would in any other project.

  3. System prompt doesn't enforce conventions — The OC agent's system prompt may not include a hard instruction to always follow Conventional Commits format.

Proposed investigation

  1. Review the OC agent's system prompt and session initialization to check if commit conventions are enforced
  2. Check whether the maintenance skill is auto-loaded or must be triggered manually
  3. Consider adding Conventional Commits rules directly to the system prompt (not just in the skill)
  4. Review PR docs(whats-new): add what's new entry for v1.4.0-dev.1 #232's commit history to confirm which commits violated the format

Branch target

Targets main, not develop:

git checkout -b ci/oc-commit-convention-enforcement origin/main

Commit type note

Use chore: or ci: prefix — not fix: or feat: — to avoid triggering a semantic-release bump.

Acceptance criteria

  • All OC agent commits follow Conventional Commits format
  • Root cause identified (skill not loaded vs system prompt gap)
  • Prevention mechanism in place (system prompt or skill auto-load)
  • Commit uses chore: or ci: prefix

Backlinks

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