Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .claude/data/multi-repo/dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Multi-Repository Dependency Graph
# This file tracks which repositories depend on each other
#
# Usage:
# - Add your repositories under 'repositories:'
# - List dependencies in 'depends_on:' for each repo
# - Document exposed interfaces in 'exposes:'
#
# The skill uses this graph to:
# - Detect breaking changes before they propagate
# - Determine correct merge order for linked PRs
# - Identify affected repos when interfaces change

version: "1.0"
last_updated: null

# Repository dependency graph
# Format:
# org/repo-name:
# depends_on:
# - repo: org/other-repo
# type: api|library|schema|data
# version: ">=1.0" # semver constraint (optional)
# exposes:
# - type: api|library|schema|data
# name: Human-readable name
# contract: path/to/contract/file (optional)

repositories:
# Example:
#
# my-org/api-server:
# depends_on: []
# exposes:
# - type: api
# name: REST API v2
# contract: openapi.yaml
#
# my-org/web-client:
# depends_on:
# - repo: my-org/api-server
# type: api
# version: ">=2.0"
# exposes: []
47 changes: 47 additions & 0 deletions .claude/data/multi-repo/linked-prs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Linked Pull Request Sets
# Tracks PRs that should be merged together or in sequence
#
# Usage:
# - Each 'linked_set' groups related PRs across repos
# - 'merge_order' determines sequence (lower = earlier)
# - Status tracks progress: open -> approved -> merged

version: "1.0"

# Active linked PR sets
# Format:
# - id: unique-identifier
# description: What this set accomplishes
# created: ISO timestamp
# status: pending|merging|completed|failed
# prs:
# - repo: org/repo-name
# pr: PR number
# branch: branch name
# status: open|approved|merged|closed
# merge_order: 1, 2, 3...

linked_sets: []
# Example:
#
# linked_sets:
# - id: "oauth2-implementation"
# description: "OAuth2 authentication across all services"
# created: "2025-11-25T10:00:00Z"
# status: "pending"
# prs:
# - repo: my-org/api-server
# pr: 123
# branch: feat/oauth2-backend
# status: "approved"
# merge_order: 1
# - repo: my-org/web-client
# pr: 456
# branch: feat/oauth2-frontend
# status: "open"
# merge_order: 2
# - repo: my-org/mobile-app
# pr: 789
# branch: feat/oauth2-mobile
# status: "open"
# merge_order: 2
139 changes: 139 additions & 0 deletions .claude/skills/multi-repo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Multi-Repository Orchestration Skill

Coordinate atomic changes across multiple repositories when features span repo boundaries.

## Quick Start

1. **Initialize the dependency graph:**

```
"Initialize multi-repo dependencies for this project"
```

2. **Add a dependency:**

```
"Add dependency: my-org/web-client depends on my-org/api-server"
```

3. **Check for breaking changes:**

```
"Check if my current changes break any dependent repositories"
```

4. **Create linked PRs:**
```
"Create linked PRs for this feature across api-server and web-client"
```

## Directory Structure

```
.claude/
skills/multi-repo/
SKILL.md # Skill definition
README.md # This file
data/multi-repo/
dependencies.yaml # Repository dependency graph
linked-prs.yaml # Active linked PR sets
```

## Dependency Graph Example

```yaml
# .claude/data/multi-repo/dependencies.yaml
version: "1.0"
repositories:
my-org/api-server:
depends_on: []
exposes:
- type: api
name: REST API v2
contract: openapi.yaml

my-org/web-client:
depends_on:
- repo: my-org/api-server
type: api
version: ">=2.0"
exposes: []
```

## Common Use Cases

### Detecting Breaking Changes

Before modifying a public interface:

```
"I'm about to change the User schema in api-server.
What repos will be affected?"
```

The skill will:

1. Identify dependents from the graph
2. Check if they use the changed interface
3. Report impact and recommendations

### Coordinated Feature Release

For features spanning multiple repos:

```
"Implement feature X across api-server, web-client, and docs"
```

The skill will:

1. Create feature branches in each repo
2. Create PRs with cross-references
3. Track them as a linked set
4. Guide merge order based on dependencies

### Merge Coordination

When ready to merge a linked set:

```
"Merge the oauth2-implementation linked PRs"
```

The skill will:

1. Verify all PRs are approved
2. Merge in dependency order (upstream first)
3. Wait for CI between merges
4. Report completion status

## Integration

### With Worktree Manager

Uses worktree-manager for local multi-repo operations:

- Creates worktrees for each local repo
- Manages parallel development
- Cleans up after completion

### With PM Architect

For project management integration:

- Linked PRs map to workstream items
- Breaking changes feed into roadmap
- Cross-repo work tracked in backlog

## Limitations

- Dependency graph is workspace-local (not centralized)
- Requires `gh` CLI authentication for PR operations
- Breaking change detection is heuristic-based
- Circular dependencies not supported

## Philosophy

- **Ruthless Simplicity**: YAML files, no database
- **Zero-BS**: All operations work today
- **Modular**: Self-contained, optional PM integration
Loading
Loading