Commit 5ee220a
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/PyAutoPrompt#7.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 7890975 commit 5ee220a
2 files changed
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
0 commit comments