Protect repository history during AI-assisted and agentic coding by tagging a restore point before each session, forbidding history-rewriting operations, and verifying actual repo state before claiming anything about it. Use this whenever an AI agent (Claude Code or similar) is about to make changes to a git repository, whenever you are about to run or recommend git operations that could lose work, and whenever you are about to document or report the state of a repo. Triggers — "start a coding session", "let the agent edit", "rebase", "squash", "force push", "clean up history", "what's the state of the repo", "commit these changes". Push to use this whenever an autonomous…