# Sync

> |

- **Type:** Skill
- **Install:** `agentstack add skill-mifunedev-agro-sync`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [mifunedev](https://agentstack.voostack.com/s/mifunedev)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [mifunedev](https://github.com/mifunedev)
- **Source:** https://github.com/mifunedev/agro/tree/main/.agro/skills/sync
- **Website:** https://agro.mifune.dev

## Install

```sh
agentstack add skill-mifunedev-agro-sync
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# /sync — bidirectional origin↔upstream sync dispatcher

`/sync ` routes origin↔upstream sync operations. The first
whitespace-delimited token of `$ARGUMENTS` selects the subcommand; the
remainder is that subcommand's own argument string. Each subcommand's
full procedure lives in a reference doc under `references/` — read that
doc and follow it as the authoritative instructions.

The canonical topology (origin=operator fork, upstream=mifunedev
canonical) and the intentional divergences that every sync must preserve
live in `references/topology.md`. Read it before executing any subcommand.

## Subcommands

| Subcommand | Direction | Purpose | Procedure |
|---|---|---|---|
| `publish` | origin→upstream | Branch off upstream/development, merge-no-commit origin/development, sanitize private state, reconcile structure, eval-gate, draft PR to upstream | `references/publish.md` |
| `catchup` | upstream→origin | Cherry-pick the squash commit of a specific upstream feature onto origin/development; never `git merge upstream/development` | `references/catchup.md` |
| `status` | read-only | Invoke `/audit drift` and interpret its section (A) framework-drift output to report which direction is needed | inline — see below |

## Dispatch

```bash
ARGUMENTS="${ARGUMENTS:-}"
SUB="${ARGUMENTS%% *}"          # first token
REST="${ARGUMENTS#"$SUB"}"      # everything after it
REST="${REST# }"                # trim one leading space
```

Route on `$SUB`:

| `$SUB` | Action |
|--------|--------|
| `publish` | Read `references/publish.md`; execute it with `$REST` as its argument string. |
| `catchup` | Read `references/catchup.md`; execute it with `$REST` as its argument string. |
| `status` | Run the status procedure below. |
| anything else (incl. empty) | Print the usage line from `argument-hint` and stop. Do not guess. |

## Status procedure (inline)

The `status` subcommand is a thin wrapper around `/audit drift` — it does
NOT reimplement framework drift detection.

1. Invoke `/audit drift` and capture its full output.
2. Parse the section (A) summary line (`DRIFT-CHECK (A):` or `(A) Framework drift: OK`):
   - Origin N **behind** upstream AND N ahead = 0: report "catchup is available (N commits to port from upstream/development)".
   - Origin N **ahead** of upstream AND N behind = 0: report "publish is available (N commits to push to upstream/development)".
   - Both non-zero: report "bidirectional work needed — run `/sync catchup` to port upstream features first, then `/sync publish` to push origin's changes forward."
   - Both zero: report "in sync — no action needed."
3. Print the raw `/audit drift` section (A) output for operator context.

## Shared rules

These apply to all subcommands; the reference docs assume them.

- **Read topology first**: before any subcommand, read `references/topology.md`.
  It defines the origin/upstream remotes and the intentional divergences
  (Denver TZ, `client-slack-pi` rename, `.agro/skills` symlink) that must
  survive every sync intact.
- **This dispatcher composes /audit drift** for all framework drift detection
  (section A of `/audit drift`'s output). NEVER implement your own
  left-right divergence-count commands in this skill or the reference docs
  — `/audit drift` is the canonical owner of that detection logic.
- **This dispatcher composes /eval** as the oracle floor: both `publish` and
  `catchup` must pass `bash .agro/skills/eval/run.sh` (exit 0, no new
  REGRESSION rows) before the PR is promoted to ready.
- **This dispatcher composes /audit pr** for promotability: while the PR is
  still draft, require focused classifier JSON with `.draftStatus == "promotable"`
  and `.evidenceComplete == true` before undrafting. Drafts are never in the
  non-draft `ready` bucket.
- **This dispatcher composes /git** for branch/commit/PR/CHANGELOG conventions:
  the branch-naming, commit-type, PR-body, and CHANGELOG-format rules live in
  `.agro/skills/git/SKILL.md` and are not restated here.
- **Branch prefix**: `catchup` branches use `feat/-` per `/git`
  conventions (targeting `origin/development`). `publish` branches use the
  operational prefix `sync/publish-` (targeting `upstream/development`)
  — this is intentional and distinct from regular feature/task branches because
  the PR target is the upstream remote, not origin.
- **Draft-then-gate pattern**: always open the PR as draft first; promote to
  ready only after the eval suite is green and an immediately preceding
  `/audit pr  --repo  [--base ]` result has
  `.draftStatus == "promotable"` and complete evidence.
- **Eval oracle is non-negotiable**: a sync that breaks existing probes is not
  mergeable. Resolve conflicts until `bash .agro/skills/eval/run.sh` exits 0
  with no new REGRESSION rows.
- **No action in status mode**: `/sync status` is purely informational — it
  never stages, commits, or pushes.

## When NOT to use

- **`/audit drift`** directly — for a standalone read-only drift report with
  no intention to sync. `/sync status` wraps it; `/audit drift` is the raw tool.
- **`/release`** — for cutting a SemVer tag after upstream development is
  already clean. `/sync publish` brings the fork's changes in; `/release` then
  tags a release from the canonical `main` branch.
- **`/audit prs`** — for a bulk PR triage pass unrelated to syncing.

## See Also

- `references/publish.md` — full origin→upstream procedure
- `references/catchup.md` — full upstream→origin procedure
- `references/topology.md` — canonical topology + intentional divergences
- `.agro/skills/audit/references/drift.md` — framework drift detection (composed by status)
- `.agro/skills/eval/SKILL.md` — eval oracle (composed by publish + catchup)
- `.agro/skills/audit/references/pr.md` — focused draft promotability gate (composed by publish + catchup)
- `.agro/skills/git/SKILL.md` — branch/commit/PR/CHANGELOG conventions

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [mifunedev](https://github.com/mifunedev)
- **Source:** [mifunedev/agro](https://github.com/mifunedev/agro)
- **License:** Apache-2.0
- **Homepage:** https://agro.mifune.dev

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-mifunedev-agro-sync
- Seller: https://agentstack.voostack.com/s/mifunedev
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
