Skip to main content
Modern software projects rarely live in a single repository. You might have a React frontend, a Node.js API, a Python analytics service, and shared component libraries—all working together as one product. p0’s multi-repo workspaces let you work across all these repositories seamlessly, with the AI understanding context from your entire codebase.

Why multi-repo support matters

Instead of juggling multiple terminal windows, VS Code workspaces, and context switching between repos, p0 treats your entire project as a unified workspace:
  • Unified AI context - Claude sees your full stack, not just one repo
  • Cross-repo refactoring - Update API contracts and frontend clients together
  • Shared standards - Apply consistent coding standards across all repositories
  • Atomic sessions - Work on features that span multiple repos in one session
Workspace with multiple repositories displayed

Adding repositories

You can add repositories to your workspace in two ways:

During workspace creation

In the workspace creation wizard, the “Add repositories” step lets you browse and select GitHub repositories. You can:
  • Search your GitHub organizations
  • Select multiple repos at once
  • Preview repository details before adding
Adding repositories during workspace creation

From workspace settings

To add repositories after workspace creation:
  1. Open workspace settings (gear icon or Cmd+,)
  2. Navigate to the “Repositories” tab
  3. Click “Add Repository”
  4. Select repos from GitHub or paste a Git URL
  5. p0 clones the repo into your workspace
Adding repositories from workspace settings

Cross-repo context

When you start a session in a multi-repo workspace, Claude has access to all repositories. This enables powerful cross-repo operations: Example: API contract changes You ask Claude to add a new field to a user endpoint. Claude:
  1. Updates the API schema in backend-api/src/models/user.ts
  2. Modifies the API route handler
  3. Updates the TypeScript types in frontend/src/types/api.ts
  4. Adjusts UI components that display user data
All in one session, across two repositories. Example: Shared component updates You refactor a button component in your design system repo. Claude:
  1. Updates the component in design-system/src/Button.tsx
  2. Identifies all usages in web-app/ and admin-portal/ repos
  3. Updates import paths and prop usages across both consuming apps
  4. Updates documentation in the design system
The AI doesn’t need special instructions to work across repos—it automatically understands the relationships between your repositories based on imports, API calls, and shared code.

Worktree mappings

When you start a session, p0 creates a worktree for each repository in your workspace. This allows you to work on feature branches without affecting your main working directories.

Worktree structure

Each session gets its own worktree directory:
~/.purple-code/worktrees/{workspace-name}-wt-{session-id}/
├── frontend-app/           (git worktree on feature branch)
├── backend-api/            (git worktree on feature branch)
├── shared-components/      (git worktree on feature branch)
├── purple/                 (symlinked from workspace)
├── .claude/                (symlinked from workspace)
└── .workspace-root         (marker file)

How worktrees work

  • Isolated branches - Each repository gets its own feature branch for the session
  • Independent commits - Changes to each repo are committed separately
  • Shared workspace config - The purple/ and .claude/ directories are symlinked, so standards and session context are shared
  • Auto-cleanup - Worktrees are cleaned up when sessions end (branches can be preserved or deleted)
File explorer showing worktree directory structure
Each repository in the workspace gets its own git worktree branch. This means you can have feature/add-auth in your frontend repo and feature/add-auth in your backend repo—both managed in the same p0 session.

Repository management

From workspace settings, you can:
  • View all repos - See connected repositories, their remotes, and current branches
  • Add repos - Connect new repositories to the workspace
  • Remove repos - Disconnect repos (workspace copy is preserved)
  • Update remotes - Change Git URLs if repos are moved
  • Sync status - See which repos have pending changes or sync issues
Repository management in workspace settings

Best practices

Use the same feature branch name across repos when working on multi-repo features. This makes it easier to track related changes.
Use workspace coding standards to ensure consistency across all repositories. Set standards for API contracts, error handling, and shared patterns.
Work on different features in separate sessions, even within the same workspace. Each session creates isolated worktrees.

Next steps