@@ -14,33 +14,23 @@ This directory is intended to be committed to dotfiles. It excludes or redacts s
1414## Intentionally not copied
1515
1616- ` ~/.pi/agent/sessions/ `
17+ - ` ~/.pi/agent/skills/ ` (managed by a separate project)
1718- package caches/install dirs such as ` npm/ ` , ` git/ ` , ` node_modules/ `
19+ - symlinks (not followed)
1820- files with sensitive-looking names
1921- API keys, tokens, cookies, OAuth material, and similar strings
20- - Files with syntax errors (validated with node --check)
2122
22- ## Restore modes
23+ ## Syntax validation
2324
24- Use ` /pi-restore ` or the ` pi_config_restore ` tool.
25+ - Loadable JS (` .js/.cjs/.mjs/.jsx ` ) is validated with ` node --check ` ; files with errors are skipped.
26+ - TypeScript sources are best-effort checked but never skipped on parse failure (kept with a warning).
2527
26- | Mode | Command | Behavior |
27- | ------| ---------| ----------|
28- | ** merge** (default) | ` /pi-restore ` or ` /pi-restore --merge ` | Restore new/updated files; keep local extras that are not in the backup |
29- | ** sync** | ` /pi-restore --sync ` | Restore + delete local extras so the machine is an exact mirror of the backup |
28+ ## Restore
3029
31- Guardrails (both modes) :
30+ Use ` /pi-restore ` or the ` pi_config_restore ` tool. Guardrails :
3231- Files modified locally since last backup are ** skipped** (not overwritten)
32+ - Local files not tracked in the backup manifest are ** skipped** (use ` --force ` )
33+ - ` settings.json ` is never auto-overwritten (the backup is a sanitized example); use ` --force ` to apply it
3334- A pre-restore snapshot is saved to ` ~/.pi/agent/.pre-restore-snapshot/ `
34- - Use ` --force ` to override divergence protection
35-
36- ### Keeping machines in sync
37-
38- ``` bash
39- # On the source machine (after changes):
40- /pi-backup
41- git commit && git push
42-
43- # On each other machine:
44- git pull
45- /pi-restore --sync
46- ```
35+ - ` /pi-restore-undo ` rolls back the most recent restore from that snapshot
36+ - ` --force ` overrides divergence/untracked protection; ` --prune ` mirrors the backup by removing local orphans
0 commit comments