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:
- Lose context on commit conventions after several tool calls
- Default to casual commit messages when the task is "just fix this" rather than "create a new PR"
- 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
Problem
When asked to make multiple amendments to a PR in a single
/ocsession, 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:
fdc408fdocs(whats-new): add entry for v1.4.0-dev.33d305b2Removed AI chatter & deduped flat-threshold bullet.dac0e46Added anti-chatter rule to generator838814fAdded missing images + validation guard8029d79Fixed before plot, code cell, and after plotThe 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:
PYTRENDY_CIenv var, remote session behaviour docsThese 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.jsoninstructions preload themaintenanceskill (which contains commit conventions), but during a long multi-amendment session, the agent may:git commitProposed fix
The maintenance skill or system prompt should include a hard rule before any
git commit: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
/ocsessions follow Conventional Commits format