--- name: save description: Smart git checkpoint protocol. 8-phase safety-first commit workflow with secret scanning, conventional commits, push decision, and memory update. Use instead of raw git commit. argument-hint: [optional commit message override] allowed-tools: Bash, Read, Grep, Glob --- # /save — Syn_OS Smart Git Checkpoint Full session save protocol. Work through each phase in order. Do not skip phases. ## PHASE 1: Audit Current State Run in parallel: `git status`, `git diff HEAD --stat`, `git log --oneline -5` ## PHASE 2: Safety Gate (MANDATORY — never skip) **HARD BLOCK** (stop entirely): .env files, *.key/*.pem/*.p12/*.pfx/*.gpg, nucleus.key, vault contents **WARN AND ASK**: New internal docs with credentials, large binaries >1MB ## PHASE 3: Stage Files `git add -A` then verify staged set. ## PHASE 4: Generate Commit Message Conventional Commit format: `type(scope): summary` Types: feat, fix, security, docs, chore, ci, refactor, build, branding, agents, style Scopes: alfred, nucleus, iso-build, agents, branding, grimoire, arcanum, ci, docs, scripts, bevy, kernel Multi-commit detection: suggest splitting unrelated changes. ## PHASE 5: Commit Execute after message approval. ## PHASE 6: Post-Commit Intelligence Report Show commit, stat, session accomplishment summary. Flag version bumps, new crates, CVE fixes. ## PHASE 7: Push Decision Ask: **"Push to origin/main? [y/N]"** Never force-push without explicit instruction. ## PHASE 8: Update Memory Update git state in memory files. ## ABORT CONDITIONS Stop if: no changes, wrong branch, safety gate triggered, merge conflicts.