All notes
Original in English

Hörni, I think you should all add a version of this to your CLAUDE.md, AGENTS.md or equivalent. Even if you sync to git, this is an old practice that never gets old. Has helped me so many times. """ ## File Safety & Backup Policy

Before overwriting a protected file, create a timestamped backup. Backup creation is a mandatory prerequisite for the edit and must never be skipped, even for a one-line change. If the backup fails, abort the edit.

### What gets backed up

**Tier A - automatic, no permission needed.** The canonical control files, where a bad overwrite actually hurts: - `00_System/**` (README, Schemas/, Tools/, engine definitions, Project_Container_Spec) - every `INDEX.md`, every `04_Projects/**/_meta.md` - `CLAUDE.md` and `AGENTS.md`

**Tier B - opt-in, any working file.** Backups are NOT automatic for ordinary Repository notes, Inbox files, or anything outside Tier A. JJ can switch them on at any granularity by saying so: "back up before you edit," "safety on for this file/folder," or "safety on for this session." When on, the same mechanism applies until JJ turns it off or the session ends.

**Never backed up.** `03_Outputs/` (dated snapshots are immutable by convention - never edited in place; if an output must change, write a new dated file), `04_Projects/` content (sealed, own rules), `.obsidian/`, `.smart-env/` (tool-managed).

### How

1. Locate the existing file. 2. Write the backup to the quarantine folder, mirroring the original path:   `00_System/.backups/<original-relative-path>.bak.<YYYYMMDDHHMMSS>`   (local time, 14-digit timestamp). 3. Verify the backup exists. 4. Only then modify the original. 5. Multiple files changed = one backup each.

### Rules

- Never overwrite an existing backup. If the name already exists (two edits in  the same second), append `_2`, `_3`, ... - Preserve the original filename and extension inside the backup name. - The `.backups/` folder is quarantined: engines and the Librarian ignore it  exactly like `.obsidian/`. A file there is never routing drift. - Retention: prune backups older than 90 days OR keep the last 10 per file  (whichever happens first, and/or is safest given context).

When in doubt, create the backup.