| name | bridge-sync |
| description | End-of-sprint batch-sync: pushes ALL pending scope:core + scope:org commits from the local user branch to BOTH upstreams (open-bridge + your org overlay) in one operation, with per-destination scrubbing and parallel PR creation. Complements /promote (per-commit) and /contribute (per-file) with a sprint-level workflow. Trigger: "/bridge-sync", "sync to upstreams", "push to both", "batch promote", "end-of-sprint sync", "sync all pending", "push everything to both repos". |
| metadata | {"scope":"core"} |
Bridge Sync โ Batch end-of-sprint upstream sync
/bridge-sync is the wide-net complement to /promote and /contribute.
| Skill | Granularity | Use case |
|---|
/promote | per-commit | "promote this batch of recent commits" |
/contribute | per-file | "scan for upstream-worthy files, adapt, PR" |
/bridge-sync | per-sprint | "push EVERYTHING pending to both upstreams now" |
Read the referenced file ONLY when triggered.
When to use
- End of a work-sprint, ready to publish all upstream-worthy changes at once
- After a refactor that touched many CORE+org files โ manual cherry-pick is tedious
- When
/promote has been deferred for days and there's a backlog
- When you want both
bks-lab/open-bridge and your org overlay updated in one operation
NOT for:
- A single commit (
/promote is leaner)
- File-level adaptation work (
/contribute --adapt does that)
- USER-only changes (those stay local)
Arguments
| Argument | Effect | Default |
|---|
(none) | Full sync to both upstreams | โ |
--dry-run | Show routing matrix, don't push | false |
--repo open-bridge | Sync only to open-bridge | both |
--repo <your-bridge> | Sync only to your org overlay | both |
--since <ref> | Sync commits since this ref (default: last sync tag) | last sync |
--no-scrub | Disable open-bridge scrubbing (DANGER โ only for emergency) | false |
Prerequisites
- Current branch must be
user/*. Refuses on development / main.
bridge-config.yaml.upstreams[] defines BOTH upstreams.
git remote has origin (your fork) + upstream (typically <your-org>/<your-bridge>).
- For open-bridge sync:
gh CLI authenticated with cross-fork PR rights.
Decision Tree
User wants to...
โโโ Full sync (default) โ references/workflow.md
โโโ Dry-run / preview routing โ references/workflow.md (stop after Step 4)
โโโ Sync only one repo โ references/workflow.md ยง --repo override
โโโ Configure scrub patterns โ rules/promote-safety.md per-repo blocklists
โโโ Tag the sync point โ references/workflow.md ยง sync-tag
โโโ PR merge fails after squash-merge โ references/pr-recovery-patterns.md
(stale-ancestor / non-fast-forward)
Safety
/bridge-sync runs a three-layer safety pipeline per destination
(see rules/promote-safety.md for the full rule):
scrub_rules.<dest> โ auto-rewrite during cherry-pick. Maps
personal/internal tokens (your username, org, hostnames) to
placeholders. Configured in bridge-config.yaml.promote.scrub_rules.
content_blocklist.<dest> โ hard-block scan after scrub. Hits
classify as scrubable (handled by layer 1), adaptable (defer for
/contribute --adapt), or personal-PII (refuse).
- Universal patterns โ private keys, API tokens, paths โ always
blocked regardless of destination.
A commit hitting an adaptable pattern doesn't block the whole sync โ
it gets routed as ๐ก in the matrix and deferred. The clean commits still
ship. --no-scrub only disables layer 1 (auto-rewrite); layers 2+3
always run.
Workflow recipes for conflict resolution (DU / UU / divergent structure),
MIXED-CU cherry-picks, and residual-leak fixup (git commit --fixup +
rebase --autosquash) live in references/workflow.md ยง Step 5.