{%- from "_macros.j2" import invoke, skill_ref with context -%}
---
name: {% if platform == "bob" %}evolve-lite:{% endif %}sync
description: Pull the latest guidelines from every configured repo (read- and write-scope).
---

# Sync Repos

## Overview

Pull the latest guidelines from every repo in `evolve.config.yaml`
`repos:` list — both `scope: read` (subscribe-only) and `scope: write`
(publish targets). Write-scope repos use a rebase strategy so any
unpushed local publish commits are preserved.

## Workflow

### Step 1: Run sync script

```bash
{{ invoke("sync", "sync.py") }}
```

### Step 2: Display summary

Show the script output to the user. If there are no repos configured,
tell them they can add one with `{{ skill_ref("subscribe") }}`. If there
are no changes, explain that everything is already up to date.

## Notes

- Read-scope repos are mirrored exactly via `git fetch` + `git reset --hard`
- Write-scope repos use `git fetch` + `git rebase` so unpushed local
  publish commits are preserved
- Sync results are logged to `.evolve/audit.log`
