# commit-release > Safe commit and release workflow with auto-sync, changelog updates, and learning from failures - Author: gitwalter - Repository: gitwalter/antigravity-agent-factory - Version: 20260207165335 - Stars: 1 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/gitwalter/antigravity-agent-factory - Web: https://mule.run/skillshub/@@gitwalter/antigravity-agent-factory~commit-release:20260207165335 --- --- name: commit-release description: Safe commit and release workflow with auto-sync, changelog updates, and learning from failures type: skill category: workflow agents: [shell] knowledge: [workflow-patterns.json] mcp_servers: [git, filesystem] axioms: [A10] --- # Commit Release Skill ## Purpose Execute commits and releases safely, learning from every failure. This skill embodies **A10 (Learning)**: every failure is an opportunity to improve. ## Philosophy > "A failed commit teaches us more than a successful one - if we pay attention." Traditional commit workflows block developers with cryptic errors. This skill: - **Auto-fixes** what can be fixed (artifact sync, formatting) - **Only blocks** for unfixable issues (secrets, syntax errors) - **Documents lessons** from each failure to prevent recurrence ## When to Use | Trigger | Example | |---------|---------| | After implementation | "Commit all changes with a meaningful message" | | Feature complete | "Commit and push to remote" | | Multiple files changed | "Stage, sync, and commit" | | After CI failure | "Fix and recommit" | ## Prerequisites | Tool | Purpose | Check | |------|---------|-------| | `git` | Version control | `git --version` | | Python | Pre-commit scripts | Anaconda environment | | Pre-commit hook | Auto-sync | `scripts/git/install_hooks.py` | ## Workflow ```mermaid flowchart TD Start([Commit Request]) --> CheckFiles[Check Staged Files] CheckFiles --> HasChanges{Changes?} HasChanges -->|No| NoChanges([Nothing to commit]) HasChanges -->|Yes| RunSync[Run Artifact Sync] RunSync --> SyncOK{Sync OK?} SyncOK -->|No| AutoFix[Auto-fix & Restage] AutoFix --> RunSync SyncOK -->|Yes| ValidateSecrets[Validate No Secrets] ValidateSecrets --> SecretsFound{Secrets?} SecretsFound -->|Yes| Block([BLOCKED - Remove Secrets]) SecretsFound -->|No| ValidateSyntax[Validate JSON/YAML] ValidateSyntax --> SyntaxOK{Syntax OK?} SyntaxOK -->|No| FixSyntax[Fix Syntax Errors] FixSyntax --> ValidateSyntax SyntaxOK -->|Yes| UpdateChangelog[Update CHANGELOG] UpdateChangelog --> CreateMessage[Generate Commit Message] CreateMessage --> Commit[git commit] Commit --> CommitOK{Success?} CommitOK -->|No| LearnFailure[Document Failure Lesson] LearnFailure --> RetryOrEscalate{Can Retry?} RetryOrEscalate -->|Yes| RunSync RetryOrEscalate -->|No| Escalate([Escalate to Human]) CommitOK -->|Yes| PushRequested{Push Requested?} PushRequested -->|Yes| Push[git push] PushRequested -->|No| Complete([Commit Complete]) Push --> PushOK{Push OK?} PushOK -->|Yes| Complete PushOK -->|No| LearnFailure ``` ## Pre-Commit Checklist Before committing, ensure: ### 1. Artifact Sync ```powershell # Auto-sync all artifacts with fast counting (developer experience) C:\App\Anaconda\python.exe scripts/validation/sync_artifacts.py --sync --fast # For CI-accurate counting (slower, matches pytest exactly) C:\App\Anaconda\python.exe scripts/validation/sync_artifacts.py --sync ``` ### 2. Secrets Check ```powershell # Scan for secrets in staged files C:\App\Anaconda\python.exe scripts/validation/scan_secrets.py --staged ``` ### 3. JSON/YAML Validation ```powershell # Validate syntax in staged files git diff --cached --name-only --diff-filter=ACM | Select-String ".json$" | ForEach-Object { C:\App\Anaconda\python.exe -c "import json; json.load(open('$_', encoding='utf-8'))" } ``` ### 4. Update CHANGELOG ```powershell # Add entry under [Unreleased] section # Format: - Description of change (category) ``` ## Commit Message Format Use Conventional Commits: ``` ():