From c2a1481aabd15e98efaf6ee856b7347b109d4458 Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Tue, 17 Feb 2026 11:46:59 -0500 Subject: [PATCH] docs: add destructive git operation safety rules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Never run destructive ops (reset --hard, rm, checkout/restore) without explicit user instruction - Never amend commits without explicit written approval 💘 Generated with Crush Assisted-by: GLM-5 via Crush --- AGENTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index b8a89d5..7d754c5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -326,6 +326,8 @@ git push origin main - **Delete unused/obsolete files** when refactors or feature removals make them irrelevant - **Quote git paths with brackets/parentheses** (e.g., `git add "src/app/[candidate]/**"`) to prevent shell glob/subshell expansion - **Use non-interactive git rebase** - set `GIT_EDITOR=: GIT_SEQUENCE_EDITOR=:` or pass `--no-edit` to avoid opening editors +- **NEVER run destructive git operations** (`git reset --hard`, `rm`, `git checkout`/`git restore` to older commits) unless user gives explicit written instruction - treat as catastrophic +- **NEVER amend commits** (`git commit --amend`) without explicit written approval from user - Update documentation when changing behavior - Follow existing code style - Use conventional commit messages