agentleFS
salmandevsalmandev/everything-gemini/skills/cross-repo-swarm-sync/SKILL.md

cross-repo-swarm-sync

Skill2 starsChanged 30 days agoApache-2.0View on GitHub

Coordinates distributed cross-repository multi-agent swarm synchronization, atomic dependency alignment, and cross-boundary git branch PR orchestration via Google Cloud Pub/Sub and Cloud Run.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every repository agent performs isolated git branching, code generation, and local test validation.

    line 63
  2. Distinctive:

    If all repository workers report verification success, the orchestrator issues atomic merge signals.

    line 66
  3. Distinctive:

    If any repository worker encounters test failures, all linked pull requests are automatically rolled back or held in draft state.

    line 67
  4. Very specific:

    Integrity Validation: Run everything-gemini test-skill cross-repo-swarm-sync.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cross-Repository Swarm Synchronization (cross-repo-swarm-sync)

Coordinates distributed multi-repository agent swarm synchronization, atomic dependency alignment, bidirectional contract schema propagation, and orchestrated cross-repository git branch workflows across frontends, backend microservices, and infrastructure-as-code repositories.


1. Architectural Topology: Cross-Repository Swarm Coordination

┌─────────────────────────────────────────────────────────────────────────────┐
│                   CROSS-REPOSITORY SWARM SYNC TOPOLOGY                      │
│                                                                             │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ 1. Global Multi-Repo Orchestrator (`cross-repo-orchestrator`)       │   │
│   │    • Scans multi-repository dependency graph & git submodule state  │   │
│   │    • Emits transactional coordination events via Cloud Pub/Sub      │   │
│   └──────────────────────────────────┬──────────────────────────────────┘   │
│                                      │                                      │
│                                      ▼                                      │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ 2. Asynchronous Event Mesh (Google Cloud Pub/Sub & Cloud Tasks)      │   │
│   │    • Topic: `agent-swarm-cross-repo-sync` (ordering keys enabled)   │   │
│   │    • Schema Registry: Protobuf v3 contracts & OpenAPI specifications│   │
│   └───────────────┬──────────────────┬──────────────────┬───────────────┘   │
│                   │                  │                  │                   │
│                   ▼                  ▼                  ▼                   │
│   ┌────────────────────────┐ ┌────────────────┐ ┌───────────────────────┐   │
│   │ Repo A: Core Services  │ │ Repo B: UI Web │ │ Repo C: Terraform K8s │   │
│   │ • Subagent Worker #1   │ │ • Subagent #2  │ │ • Subagent Worker #3  │   │
│   │ • Generates gRPC types │ │ • Updates SDK  │ │ • Configures Ingress  │   │
│   └───────────────┬────────┘ └────────┬───────┘ └───────────┬───────────┘   │
│                   │                   │                     │               │
│                   └───────────────────┼─────────────────────┘               │
│                                       ▼                                     │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ 3. Atomic Multi-Repo Verification & Branch Synchronization          │   │
│   │    • Two-Phase Commit (2PC) verification across all repository PRs  │   │
│   │    • Matrix E2E integration testing across linked feature branches  │   │
│   │    • Coordinated merge gating & rollback safety snapshots           │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────────────────┘

2. Core Operational Capabilities

A. Dynamic Repository Discovery & Dependency Matrix

  1. Workspace Manifest Registry:
    • Parses multi-workspace configurations (workspaces.json or .agents/repositories.json).
    • Identifies upstream/downstream contract dependencies across gRPC, OpenAPI, and shared schemas.
  2. Topological Order Execution:
    • Computes topological sort DAG over dependent repositories.
    • Enforces strict sequencing: upstream API definitions -> client SDK generation -> frontend components -> deployment manifests.

B. Two-Phase Commit (2PC) Swarm Gating

  1. Prepare Phase:
    • Every repository agent performs isolated git branching, code generation, and local test validation.
    • Posts a signed verification hash (READY_TO_MERGE) to the shared coordination ledger.
  2. Commit / Rollback Phase:
    • If all repository workers report verification success, the orchestrator issues atomic merge signals.
    • If any repository worker encounters test failures, all linked pull requests are automatically rolled back or held in draft state.

C. Cloud Pub/Sub Event Mesh Integration

  • Event Envelope:
    {
      "swarm_id": "swarm-20261023-e2e-sync",
      "phase": "PREPARE",
      "source_repo": "backend-auth-service",
      "target_repos": ["web-frontend", "infrastructure"],
      "schema_checksum": "sha256:4a8f9c...",
      "branch": "feat/gemini-live-duplex-auth",
      "timestamp": 1792764000
    }

3. Production Workflow & Recipes

Synchronizing Cross-Repo Pull Requests via CLI

# Analyze multi-repo sync state across active workspaces
everything-gemini cross-repo status --workspace /path/to/workspaces

# Dispatch distributed cross-repo sync with atomic two-phase commit
everything-gemini cross-repo sync \
  --repos "backend,frontend,infra" \
  --branch "feat/gemini-3.8-migration" \
  --max-usd 3.00 \
  --dry-run

Python SDK Multi-Repo Coordination Blueprint

from google_antigravity.swarm import CrossRepoSwarmCoordinator

coordinator = CrossRepoSwarmCoordinator(
    manifest_path="./workspaces.json",
    event_bus="pubsub://projects/enterprise-ai/topics/cross-repo-sync",
    model="gemini-3.8-thinking"
)

# Plan and dispatch distributed execution DAG
plan = coordinator.build_dag(goal="Upgrade Protobuf contracts and regenerate TypeScript client")
results = coordinator.execute_2pc(plan, timeout_seconds=600)
assert results.is_successful, f"Cross-repo sync aborted: {results.rollback_reason}"

4. Verification & Diagnostics

  • Integrity Validation: Run everything-gemini test-skill cross-repo-swarm-sync.
  • Traceparent Linking: Correlate W3C traceparent headers across all distributed worker logs.
  • Reference Links: See agents/cross-repo-orchestrator.md and skills/ephemeral-swarm-orchestrator/SKILL.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.