Commit 9aeeede
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) <noreply@anthropic.com>1 parent c0cee06 commit 9aeeede
2 files changed
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
0 commit comments