This codebase is published from two GitHub repositories that MUST stay byte-for-byte identical on every branch:
| Repo | URL | Default branch |
|---|---|---|
| PerfectoMobileDev/claude-base | https://github.com/PerfectoMobileDev/claude-base | main |
| Blazemeter/claude-base | https://github.com/Blazemeter/claude-base | main |
Both repos belong to teams inside Perforce that consume the same Claude Code plugin marketplace. Drift between them is treated as a defect.
Every commit on every branch must appear on both repos. You push to one — the auto-sync workflow propagates to the other.
There is no source-of-truth designation. Both repos are first-class. The rule is symmetric: a push to either side propagates to the other.
Two GitHub Actions workflows enforce the rule. Both ship in .github/workflows/ and are present in BOTH repos (kept in sync along with everything else).
Triggers on every push and delete event on any branch. It:
- Detects which repo it is running in (
PerfectovsBlazemeter). - Computes the sibling URL.
- Force-pushes the affected ref to the sibling using the
SIBLING_SYNC_TOKENsecret.
git push with an unchanged SHA is a no-op on the sibling, so the workflow does not trigger an infinite ping-pong: the sibling's push-event handler sees that the ref didn't change and exits silently.
Triggers on every pull_request targeting main. It compares the current main of this repo against the current main of the sibling and fails the check if the sibling has commits not present here (out-of-band drift).
The check is required by branch protection on main. PRs cannot be merged while it is failing. If it fails, the recovery procedure is below.
The mirror is best-effort. Race conditions and outages do happen:
| Scenario | What happens | What to do |
|---|---|---|
| Two devs push to the two repos at the same time | Last writer wins; the earlier push is force-overwritten on the sibling | The losing commit is still in the local clone — re-push it |
SIBLING_SYNC_TOKEN is expired / revoked |
sync-to-sibling.yml fails on push |
Rotate the PAT (see "Required secrets" below); re-run the failed workflow |
| Sibling repo has had a direct admin push that the source missed | verify-sibling-sync.yml fails the next PR opened against main |
Pull the missing commits into this repo first, then re-open the PR |
| Workflow files themselves diverge (someone disables a workflow on one side) | Slow drift; next push from the other side will restore them | Treat workflow files as immutable except via PR to both repos simultaneously |
Both repos need a PAT stored as repository secret SIBLING_SYNC_TOKEN:
- Type: classic personal access token (or a fine-grained equivalent).
- Scopes:
repo,workflow. - SSO authorization: authorized for both
BlazemeterANDPerfectoMobileDevorganizations (each org has its own SAML grant — both must be approved on the same token). - Stored at:
- https://github.com/PerfectoMobileDev/claude-base/settings/secrets/actions →
SIBLING_SYNC_TOKEN - https://github.com/Blazemeter/claude-base/settings/secrets/actions →
SIBLING_SYNC_TOKEN
- https://github.com/PerfectoMobileDev/claude-base/settings/secrets/actions →
Rotate annually (or whenever the owning user leaves). The workflow exits 1 with a clear error when the token is missing or unauthorized.
On main in both repos:
- Settings → Branches → Add rule for
main. - Enable "Require status checks to pass before merging".
- Mark these checks as required:
Plugin marketplace validate / *(the existing 5-layer CI)Verify sibling sync / verify(fromverify-sibling-sync.yml)
- Enable "Require branches to be up to date before merging".
- (Recommended) Enable "Restrict pushes that create matching branches" so the only path to
mainis via PR.
Without these settings the sync is advisory. With them, drift becomes physically impossible to merge.
The check fails when the sibling has at least one commit on main that this repo does not. Two paths:
git remote add sibling https://github.com/<sibling-org>/claude-base.git
git fetch sibling main
git checkout main
git merge --ff-only sibling/main # fast-forward if possible
git push origin main # this triggers sync-to-sibling to mirror backRebase your PR branch on top and re-open.
# Identify the unwanted commit
git fetch sibling main
git log this-repo/main..sibling/main
# After confirming, force-overwrite the sibling main from this repo's authoritative state:
git push --force sibling main # uses SSO-authorized credentialsDocument the recovery in the PR description so reviewers know which side won.
Two-way mirror means anyone with merge rights on either repo can ship a change; no single "upstream" team blocks the other. The trade-off is the race-condition risk above, mitigated by branch protection + the strict verify check.
If at any point one side becomes the agreed source-of-truth, switch by:
- Disabling
sync-to-sibling.ymlon the non-truth side (setif: falseon the job). - Updating this document.
- The other side's workflow continues to propagate.
LINKED_REPOS.md is the contract. Any change to the linking model itself requires PRs to both repositories (the verify check will block otherwise). Treat it like a versioned spec.