Commit 18b5458
docs: add Never-rewrite-history guard to CLAUDE.md / AGENTS.md
Append a `## Never rewrite history` section listing the destructive
history operations that NEVER apply on a remote-tracked repo, with
the canonical clean-working-tree sequence (`git fetch && reset --hard
origin/main && clean -fd`) as the only correct alternative.
Why: forensic sweep on 2026-04-27 found three workspace repos with no
merge base at all with origin — independent `git init`/"fresh start"
rewrites on different machines had produced identical content under
entirely different SHAs, costing ~41 commits of redundant local work.
This rule prevents that class of error structurally for both human
and AI agents.
Implements PyAutoLabs/PyAutoMind#7.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4242060 commit 18b5458
2 files changed
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
0 commit comments