Fix git sync: commit memory files before pull, push back to remote

- .gitignore: exclude runtime junk (.claude/, .cache/, .npm/) but track
  life/ and memory/ so agent knowledge persists across pod restarts
- CEO heartbeat: git add + commit local changes before pull --rebase,
  then push to persist memory files in the repo
- Fixes agents wasting turns debugging dirty working tree on every heartbeat

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-03-18 14:23:56 -04:00
parent ba68fcfeeb
commit ce5e524398
2 changed files with 28 additions and 1 deletions
+23
View File
@@ -1,3 +1,26 @@
# Agent runtime artifacts (transient, not worth tracking)
.claude/
.claude.json
.cache/
.config/
.local/
.npm/
.profile
.zshrc
.gitconfig
.kube/
# Editor swap files
*.swp
*.swo
# Secrets (never commit)
secrets/
*.pem
# Sync state (local only)
.last-synced-sha
# Node artifacts
node_modules/
bun.lock
+5 -1
View File
@@ -74,7 +74,11 @@ This repo (`/paperclip/privilegedescalation/agents`) is the canonical source of
#### 5a. Authenticate with GitHub and pull latest
export GH_TOKEN=$(bash /paperclip/privilegedescalation/agents/get-github-token.sh)
git -C /paperclip/privilegedescalation/agents pull origin main
cd /paperclip/privilegedescalation/agents
git add -A
git diff --cached --quiet || git commit -m "agent: memory and runtime updates $(date -u +%Y-%m-%dT%H:%M:%SZ)"
git pull --rebase origin main
git push origin main
#### 5b. Detect changes since last sync