Loading...
Loading...
Two-way sync between a local paper directory and an Overleaf project via the Overleaf Git bridge (Premium feature). Lets you keep ARIS audit/edit workflows on the local copy while collaborators edit in the Overleaf web UI. Token never touches the agent — user does the one-time auth via macOS Keychain. Use when user says "同步 overleaf", "overleaf sync", "推送到 overleaf", "connect overleaf", "Overleaf 桥接", "pull overleaf", "push overleaf", or wants to bridge their ARIS paper directory with an Overleaf project.
npx skill4agent add wanshuiyin/auto-claude-code-research-in-sleep overleaf-sync/paper-claim-audit/citation-audit/auto-paper-improvement-loop.git/configpaper-overleafpaper/paper/osxkeychainmanagercache┌─────────────────┐ git pull/push ┌─────────────────┐
│ Local paper/ │ ◄─── rsync ──── ► │ paper-overleaf/ │ ◄──► Overleaf web
│ (ARIS audits) │ │ (git bridge) │ (collaborators)
└─────────────────┘ └─────────────────┘paper-overleaf/paper/rsyncpullpushstatussetup <project-id>pre-commitpaper-overleaf/.git/hooks/olp_[A-Za-z0-9]{20,}Run this in your own terminal (NOT through me):
bash <ARIS_REPO>/tools/overleaf_setup.sh <project-id-or-url>
When it finishes, tell me "setup done" and I'll verify.cd paper-overleaf
git remote -v # must show URL WITHOUT token
git config --get credential.helper
git fetch && git log --oneline -3 # must succeed without prompting
ls .git/hooks/pre-commit # must exist
bash <ARIS_REPO>/tools/overleaf_audit.sh . # must report "Audit clean"paper-overleaf/paper/pushpullcd paper-overleaf && git pull --ff-only
# Show what changed since last pull
LAST=$(git rev-parse HEAD@{1})
git diff --stat $LAST..HEAD
git diff $LAST..HEAD -- 'sec/*.tex' # detailed view for prose changespaper/LrageLarge/paper-claim-audit/citation-audit| Hunk character | Action |
|---|---|
| Clean editorial improvement | Sync into |
| Numerical / claim change | Sync, then re-run |
New | Sync, then re-run |
| Half-sentence / obvious typo | Flag to user, do NOT auto-sync |
| New section / restructure | Stop, ask user before syncing |
# Sync only the files the user approved into local paper/
rsync -av paper-overleaf/sec/0.abstract.tex paper/sec/0.abstract.tex
# (or use Edit tool for surgical changes that skip half-sentences)pushpaper/# 1. Always pull first to surface remote drift
cd paper-overleaf && git pull --ff-only
# 2. If pull was a no-op, sync local paper → paper-overleaf
rsync -av --delete \
--exclude='.git' --exclude='.DS_Store' \
--exclude='*.aux' --exclude='*.log' --exclude='*.bbl' --exclude='*.blg' \
--exclude='*.fls' --exclude='*.fdb_latexmk' --exclude='*.out' \
--exclude='*.synctex.gz' --exclude='*.toc' \
paper/ paper-overleaf/
# 3. Show what would be pushed
git status --short
git diff --stat
# 4. Commit + push
git add -A
git commit -m "<descriptive message — what ARIS changed and why>"
git pushpaper-write: regenerated sec/3.assurance after audit cascade refactorcitation-audit: fix 14 metadata entries (madaan2023, lee2024, ...)paper-claim-audit: correct sec/5 numbers vs results/run_2026_04_19.jsonpushgit diff --statgit pushauto: truestatuscd paper-overleaf
git fetch
echo "=== Remote-vs-local divergence ==="
git log --oneline HEAD..origin/master # remote ahead
git log --oneline origin/master..HEAD # local ahead
echo "=== paper/ vs paper-overleaf/ divergence ==="
diff -rq --brief paper/ paper-overleaf/ 2>/dev/null \
| grep -v "Only in paper/.*\.\(aux\|log\|out\|fls\|fdb_latexmk\|bbl\|blg\|synctex\|toc\)" \
| grep -v "Only in paper-overleaf/.git" \
| grep -v "DS_Store"| Remote ahead? | paper/ vs paper-overleaf/ differ? | Meaning | Recommended action |
|---|---|---|---|
| No | No | Clean | Nothing to do |
| Yes | No | Overleaf has new edits | Run |
| No | Yes | Local ARIS edits unsynced | Run |
| Yes | Yes | Diverged — needs merge | Stop, surface to user, do NOT auto-resolve |
git pull --ff-onlygit pullgit reset --hardgit push --forcegit log origin/master ^HEADgit log HEAD ^origin/master| Layer | Guard | Where enforced |
|---|---|---|
| 1. Setup | | |
| 2. Input | Token is read by | |
| 3. Storage | Token goes straight into OS keychain via | |
| 4. Commits | | auto-installed by setup script |
| 5. Audit | | |
.env.netrctools/*.shgit remote -v401 Unauthorizedoverleaf_setup.shpaper//overleaf-sync pull/auto-paper-improvement-loop/paper-write/overleaf-sync pushstatuspaper-overleaf/paper/pullpush/paper-claim-audit/citation-audit\cite{...}/paper-compile