---
mode: subagent
---

<!-- SPDX-License-Identifier: MIT -->
<!-- SPDX-FileCopyrightText: 2025-2026 Marcus Quinn -->
# t1264.2: Create `repo-sync-helper.sh` — core script with enable/disable/status/check/logs commands. `check` scans all dirs in `git_parent_dirs`, finds git repos (has `.git/` and a remote), determines default branch, skips if dirty or not on default branch, runs `git pull --ff-only`. Logs results per-repo. Uses launchd on macOS (daily), cron on Linux. Follows auto-update-helper.sh patterns (lock, state file, logging).

## Origin

- **Created:** 2026-02-20
- **Session:** supervisor:pid:16767 (headless Claude CLI)
- **Created by:** ai-supervisor
- **Parent task:** t1264 — see [todo/tasks/t1264-brief.md](t1264-brief.md)
- **Commit:** c11c76ca370b0d4ddb682f50d9f7d23cf171a5b0 — "chore: add t1264 daily repo sync feature to backlog"

## What

Create `repo-sync-helper.sh` — core script with enable/disable/status/check/logs commands. `check` scans all dirs in `git_parent_dirs`, finds git repos (has `.git/` and a remote), determines default branch, skips if dirty or not on default branch, runs `git pull --ff-only`. Logs results per-repo. Uses launchd on macOS (daily), cron on Linux. Follows auto-update-helper.sh patterns (lock, state file, logging).

## Specification

```markdown
  - [ ] t1264.2 Create `repo-sync-helper.sh` — core script with enable/disable/status/check/logs commands. `check` scans all dirs in `git_parent_dirs`, finds git repos (has `.git/` and a remote), determines default branch, skips if dirty or not on default branch, runs `git pull --ff-only`. Logs results per-repo. Uses launchd on macOS (daily), cron on Linux. Follows auto-update-helper.sh patterns (lock, state file, logging). #auto-dispatch ~2h model:sonnet ref:GH#1986 assignee:marcusquinn started:2026-02-21T03:20:14Z
    - Notes: BLOCKED by supervisor: Stale state recovery (Phase 0.7/t1132): was evaluating with no live worker, retries exhausted (3/3, cause: eval_process_died)
```



## Supervisor Context

```
t1264.2|Create `repo-sync-helper.sh` — core script with enable/disable/status/check/logs commands. `check` scans all dirs in `git_parent_dirs`, finds git repos (has `.git/` and a remote), determines default branch, skips if dirty or not on default branch, runs `git pull --ff-only`. Logs results per-repo. Uses launchd on macOS (daily), cron on Linux. Follows auto-update-helper.sh patterns (lock, state file, logging). #auto-dispatch ~2h model:sonnet ref:GH#1986|pid:16767|2026-02-21T03:16:38Z|2026-02-21T03:50:08Z
```

## Acceptance Criteria

- [ ] Implementation matches the specification above
- [ ] Tests pass
- [ ] Lint clean

## Relevant Files

<!-- TODO: Add relevant file paths after codebase analysis -->
