You are an AI agent that helps create well-formatted git commits specifically for the opencode-agents repository. This command handles the complete commit workflow including validation, testing, and pushing changes.
When the user runs this command, execute the following workflow:
Run these checks in parallel:
npm run test:openagent -- --smoke
npm run test:opencoder -- --smoke
git status --porcelain
git diff --cached
Validation Rules:
git status to see all untracked filesgit diff to see both staged and unstaged changesgit log --oneline -5 to see recent commit styleAuto-stage based on change type:
evals/framework/.opencode/agent/scripts/docs/.github/workflows/Never auto-stage:
node_modules/.env filestest_tmp/ or temporary directoriesevals/results/ (test results)Follow Conventional Commits (NO EMOJIS):
<type>(<scope>): <description>
[optional body]
Types for this repo:
feat - New features (agents, commands, tools)fix - Bug fixesrefactor - Code restructuring without behavior changetest - Test additions or modificationsdocs - Documentation updateschore - Maintenance tasks (dependencies, cleanup)ci - CI/CD pipeline changesperf - Performance improvementsScopes for this repo:
evals - Evaluation framework changesagents - Agent configuration changes (openagent, opencoder)subagents - Subagent changes (task-manager, coder, tester, etc.)commands - Slash command changescontext - Context file changesscripts - Build/test script changesci - GitHub Actions workflow changesdocs - Documentation changesExamples:
feat(evals): add parallel test execution support
fix(agents): correct delegation logic in openagent
refactor(evals): split test-runner into modular components
test(evals): add smoke tests for openagent
docs(readme): update installation instructions
chore(deps): upgrade evaluation framework dependencies
ci: add automatic version bumping workflow
git add <relevant-files>
git commit -m "<type>(<scope>): <description>"
git status # Verify commit succeeded
Ask user:
✅ Commit created: <commit-hash>
📝 Message: <commit-message>
Would you like to:
1. Push to remote (git push origin main)
2. Create another commit
3. Done
If user chooses push:
git push origin main
Then inform:
🚀 Pushed to remote!
This will trigger:
- GitHub Actions CI/CD workflow
- Smoke tests for openagent & opencoder
- Automatic version bumping (if feat/fix commit)
- CHANGELOG.md update
Commits trigger automatic version bumps:
feat: → minor bump (0.0.1 → 0.1.0)fix: → patch bump (0.0.1 → 0.0.2)feat!: or BREAKING CHANGE: → major bump (0.1.0 → 1.0.0)[alpha] in message → alpha bump (0.1.0-alpha.1 → 0.1.0-alpha.2)Before committing, verify these are in sync:
VERSION filepackage.json versionCHANGELOG.md (if manually updated)This repo may have pre-commit hooks that:
If hooks modify files:
⚠️ Smoke tests failed for <agent-name>
Failures:
<test-output>
Options:
1. Fix issues and retry
2. Run full test suite (npm run test:<agent>)
3. Proceed anyway (not recommended)
4. Cancel commit
What would you like to do?
ℹ️ No changes to commit. Working tree is clean.
Recent commits:
<git log --oneline -3>
Would you like to:
1. Check git status
2. View recent commits
3. Exit
⚠️ Merge conflicts detected. Please resolve conflicts first.
Conflicted files:
<list-files>
Run: git status
Feature Addition:
# 1. Run smoke tests
npm run test:openagent -- --smoke
npm run test:opencoder -- --smoke
# 2. Stage and commit
git add <files>
git commit -m "feat(evals): add new evaluation metric"
# 3. Push
git push origin main
Bug Fix:
git add <files>
git commit -m "fix(agents): correct delegation threshold logic"
git push origin main
Documentation:
git add docs/
git commit -m "docs(guides): update testing documentation"
git push origin main
Refactoring:
git add evals/framework/src/
git commit -m "refactor(evals): extract validation logic into separate module"
git push origin main
A successful commit should: