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:
Before doing anything, analyze the repo state:
# Check current branch and status
git status
git branch --show-current
# Check for workflow issues
git tag --sort=-v:refname | head -5 # Check recent tags
cat VERSION # Check current version
git log --oneline -5 # Check recent commits
# Check for stale automation branches
git branch -a | grep -E "chore/version-bump|docs/auto-sync" | wc -l
Intelligent Analysis:
chore/version-bump-* branchesdocs/auto-sync-* branchesPresent Analysis:
📊 Repo Health Check:
- Current branch: <branch>
- Version: <VERSION> | Latest tag: <tag>
- Stale branches: <count> automation branches
- Uncommitted changes: <count> files
[If issues detected:]
⚠️ Issues Found:
- Missing release for v<VERSION> (tag not created)
- <count> stale automation branches need cleanup
Would you like to:
1. Fix issues first (recommended)
2. Continue with commit
3. View detailed analysis
If user chooses "Fix issues":
create-release.yml workflow for missing tagsAsk user:
Would you like to run smoke tests before committing? (y/n)
- y: Run validation tests
- n: Skip directly to commit
If user chooses to run tests:
cd evals/framework && npm run eval:sdk -- --agent=core/openagent --pattern="**/smoke-test.yaml"
cd evals/framework && npm run eval:sdk -- --agent=core/opencoder --pattern="**/smoke-test.yaml"
Validation Rules:
git status to see all untracked filesgit diff to see both staged and unstaged changesgit log --oneline -5 to see recent commit style.github/workflows/ modified → Suggest workflow validationAuto-stage based on change type:
evals/framework/.opencode/agent/core/.opencode/agent/content/.opencode/agent/data/.opencode/agent/meta/.opencode/agent/subagents/.opencode/command/.opencode/context/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/core - Core agents (openagent, opencoder)agents/meta - Meta agents (system-builder, repo-manager)agents/content - Content category agents (copywriter, technical-writer)agents/data - Data category agents (data-analyst)subagents/core - Core subagents (task-manager, documentation, contextscout, externalscout)subagents/code - Code subagents (coder-agent, tester, reviewer, build-agent)subagents/development - Development specialist subagents (frontend-specialist, devops-specialist)subagents/system-builder - System builder subagents (domain-analyzer, agent-generator, context-organizer, workflow-designer, command-creator)subagents/utils - Utility subagents (image-specialist)commands - Slash command changescontext - Context file changesscripts - Build/test script changesci - GitHub Actions workflow changesdocs - Documentation changesregistry - Registry.json changesExamples:
feat(evals): add parallel test execution support
fix(agents/core): correct delegation logic in openagent
fix(subagents/development): update frontend-specialist validation rules
feat(agents/content): add new copywriter capabilities
feat(agents/meta): enhance system-builder with new templates
refactor(evals): split test-runner into modular components
test(evals): add smoke tests for openagent
feat(subagents/code): add build validation to build-agent
feat(subagents/system-builder): improve domain-analyzer pattern detection
docs(readme): update installation instructions
chore(deps): upgrade evaluation framework dependencies
feat(registry): add new agent categories
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 <branch>)
2. Create another commit
3. Done
If user chooses push:
git push origin <current-branch>
Then inform based on commit type:
For workflow changes (.github/workflows/):
🚀 Pushed workflow changes!
This will trigger:
- Workflow validation on PR
- Registry validation
- PR checks
⚠️ Important:
- New workflows won't run until merged to main
- Test workflows using workflow_dispatch if available
- Check GitHub Actions tab for workflow syntax errors
For feature/fix commits to main:
🚀 Pushed to main!
This will trigger:
- Post-merge version bump workflow
- Create version bump PR automatically
- Update VERSION, package.json, CHANGELOG.md
- After version bump PR merges → Create git tag & release
Expected flow:
1. Your commit merged ✅
2. Version bump PR created (automated)
3. Review & merge version bump PR
4. Git tag & GitHub release created automatically
For other commits:
🚀 Pushed to remote!
This will trigger:
- PR checks (if on feature branch)
- Registry validation
- Build & test validation
When committing workflow changes or when issues are detected, provide intelligent guidance:
1. Version & Release Sync
# Check if version and tags are in sync
VERSION=$(cat VERSION)
LATEST_TAG=$(git tag --sort=-v:refname | head -1)
if [ "v$VERSION" != "$LATEST_TAG" ]; then
echo "⚠️ Version mismatch detected!"
echo "VERSION file: $VERSION"
echo "Latest tag: $LATEST_TAG"
echo ""
echo "Would you like to:"
echo "1. Trigger create-release workflow to create v$VERSION tag/release"
echo "2. Manually create tag: git tag v$VERSION && git push origin v$VERSION"
echo "3. Ignore (version bump PR may be pending)"
fi
2. Stale Branch Cleanup
# Detect stale automation branches
STALE_BRANCHES=$(git branch -a | grep -E "chore/version-bump|docs/auto-sync" | wc -l)
if [ "$STALE_BRANCHES" -gt 3 ]; then
echo "🧹 Found $STALE_BRANCHES stale automation branches"
echo ""
echo "Would you like to clean them up?"
echo "1. Yes - delete merged automation branches"
echo "2. No - keep them"
echo "3. Show me the branches first"
fi
3. Workflow Health Check
# Check for common workflow issues
if [ -f .github/workflows/post-merge.yml.disabled ]; then
echo "ℹ️ Found disabled workflow: post-merge.yml.disabled"
echo "This workflow has been replaced by post-merge-pr.yml + create-release.yml"
echo ""
echo "Would you like to delete it? (cleanup)"
fi
# Check if create-release.yml exists
if [ ! -f .github/workflows/create-release.yml ]; then
echo "⚠️ Missing create-release.yml workflow"
echo "Tags and releases won't be created automatically!"
echo ""
echo "Would you like to create it?"
fi
4. Workflow Documentation
When new workflows are added, offer to update documentation:
✅ New workflow detected: <workflow-name>.yml
Would you like to:
1. Add entry to .github/workflows/WORKFLOW_AUDIT.md
2. Update navigation.md with workflow info
3. Skip documentation (do it later)
For workflow changes, always:
Commit message format for workflows:
ci(workflows): <what changed>
Why: <reason for change>
Impact: <what this affects>
Testing: <how to test>
Example:
ci(workflows): add automatic release creation workflow
Why: Version bumps were happening but tags/releases weren't being created
Impact: After version bump PRs merge, tags and releases will be created automatically
Testing: Manually trigger workflow with: gh workflow run create-release.yml
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 (cd evals/framework && npm run eval:sdk -- --agent=<category>/<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
Understanding the automation:
create-release.yml ✅ NEW
version-bump label)gh workflow run create-release.ymlpost-merge-pr.yml ✅ Active
version-bump or automated labelpr-checks.yml ✅ Active
validate-registry.yml ✅ Active
update-registry.yml ✅ Active
sync-docs.yml ✅ Active
validate-test-suites.yml ✅ Active
Workflow Flow for Version Bumps:
1. Merge feat/fix PR to main
↓
2. post-merge-pr.yml creates version bump PR
↓
3. Review & merge version bump PR
↓
4. create-release.yml creates tag & release
↓
5. Done! 🎉
Feature Addition:
# 1. Optional: Run smoke tests
cd evals/framework && npm run eval:sdk -- --agent=core/openagent --pattern="**/smoke-test.yaml"
# 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/core): 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: