Skip to main content

Overview

Blocks can work across multiple repositories in a single request, enabling you to coordinate changes, analyze dependencies, and understand how different parts of your system interact. This is especially valuable for microservices architectures and polyrepo setups.

How It Works

When you mention multiple repositories in a request, Blocks will:
  1. Identify Repositories: Determine which repos are relevant to your request
  2. Access Multiple Codebases: Simultaneously examine code across repositories
  3. Understand Relationships: Map dependencies and interactions between services
  4. Coordinate Changes: Make changes across repos while maintaining consistency
  5. Create Multiple PRs: Generate pull requests for each affected repository

Using Multiple Repo Support

Cross-Repo Analysis

Understand how systems work together:
@blocks how does the frontend call the authentication service?
@blocks explain the data flow from the web app through the API to the database
@blocks what services depend on the user-service?

Cross-Repo Changes

Make coordinated updates:
@blocks update the API contract in both the backend and frontend repos
@blocks add a new feature that requires changes to the API, web app, and mobile app
@blocks refactor the authentication logic across all services

Dependency Management

Work with shared libraries:
@blocks update the shared-components package and migrate all apps using it
@blocks check which repos are using the deprecated helper function

Cross-Repo Investigation

Debug issues that span services:
@blocks investigate why payments are failing between the web app and payment-service
@blocks find where user permissions are checked across all repos

Specifying Repositories

Implicit References

Blocks can infer repositories from context:
@blocks compare authentication between web and mobile
# Automatically identifies web-app and mobile-app repos

Explicit References

Specify repositories directly:
@blocks in backend-api and frontend-web, update the user model
@blocks check user-service, auth-service, and api-gateway for rate limiting logic

Workspace Configuration

Configure your workspace to define logical groupings of repositories for easier reference. Learn more about Workspaces.

Common Multi-Repo Scenarios

Microservices Architecture

Coordinate changes across services:
@blocks add a new payment method to payment-service and update all clients
@blocks trace a request from API gateway through auth-service to user-service

Monorepo vs Polyrepo

Blocks works with both:
  • Monorepos: Access different packages and modules within a single repo
  • Polyrepos: Coordinate across separate repositories

Shared Libraries

Manage packages used by multiple projects:
@blocks update the design-system package and show which apps need updates
@blocks add a new utility to shared-utils and create usage examples

Best Practices

  • Be Explicit: When needed, clearly specify which repositories to work with
  • Understand Dependencies: Know how your repos relate before making cross-repo changes
  • Test Thoroughly: Cross-repo changes require careful testing across all affected services
  • Coordinate PRs: Review all related PRs together to ensure consistency
  • Document Relationships: Keep architecture diagrams updated as services evolve

Creating Coordinated PRs

When Blocks makes changes across multiple repos, it will:
  1. Create a separate PR for each repository
  2. Link related PRs together in descriptions
  3. Provide a summary of all changes
  4. Suggest a merge order if dependencies exist
@blocks add feature X that requires changes to api, web, and mobile repos
# Result: 3 PRs with linked descriptions and merge instructions

Integration Setup

Multiple Repo Support works automatically once you’ve connected your repositories through the GitHub integration.

Learn More