From 1dcefa8cedd9e7ef7d2ca48cc2472609af3f72e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 7 Jan 2026 01:04:57 +0100 Subject: [PATCH] feat(opencode): add commit command for Conventional Commits workflow --- .opencode/command/commit.md | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .opencode/command/commit.md diff --git a/.opencode/command/commit.md b/.opencode/command/commit.md new file mode 100644 index 0000000..753bbbf --- /dev/null +++ b/.opencode/command/commit.md @@ -0,0 +1,61 @@ +--- +agent: build +description: Commit changes with a concise and precise message +--- + +# Commit Command + +Create well-structured commits following Conventional Commits format. + +## Workflow + +1. **Analyze changes** + - Run: `git status`, `git diff --cached`, `git diff`, `git log -5 --oneline` + - Stage needed files with `git add` + - Exclude secrets and generated/large artifacts + +2. **Craft message** following format below + +3. **Confirm and commit** + - Show proposed message and ask confirmation + - Run: `git commit -m ""` then `git status` + - Do not commit without confirmation + - Do not force push or amend unless requested + - If a hook fails, report and suggest fixes + +## Message Format + +**Structure**: `(): ` + +**Type** (required): + +- `feat`, `fix`, `refactor`, `perf`, `docs`, `style`, `test`, `chore`, `ci`, + `build`, `revert` + +**Scope** (optional): + +- Strategy name: `quickadapter`, `ReforceXY` +- Component name if cross-strategy + +**Summary** (required): + +- ≤ 72 chars, imperative mood +- Focus on WHAT changed (the diff shows HOW) + +**Body** (optional): + +- Explain WHY (impact, context, reasoning) +- Add with second `-m` flag: `git commit -m "" -m ""` +- Reference issues if applicable + +**Breaking changes**: + +- Add `!` after scope: `feat(quickadapter)!: change API` + +## Examples + +``` +feat(quickadapter): add EarlyStopping callback for XGBoost 3.x API +fix(ReforceXY): correct LightGBM validation set naming in pruning +refactor: remove redundant comments in regressor initialization +``` -- 2.43.0