AgentSkillsCN

multi-repo-orchestration

统筹 OctoCAT 供应链在多个仓库间的功能开发。当您被分配到一项需要修改 React 前端、Express API,或共享类型仓库的议题时,此技能将助您高效完成任务。

SKILL.md
--- frontmatter
name: multi-repo-orchestration
description: Orchestrates OctoCAT Supply Chain feature development across multiple repositories. Use this when assigned an issue that requires changes in the React frontend, Express API, or shared types repos.

Multi-Repo Orchestration

Prerequisites – GitHub MCP Server

This skill requires the GitHub MCP Server configured on all repos in the ecosystem so Copilot coding agent can create issues and assign itself across repos.

StepAction
1Go to Settings → Copilot → Coding agent → MCP configuration and add the GitHub MCP server JSON config
2Use https://api.githubcopilot.com/mcp as the server URL (not /readonly) for write access
3Include issues in the X-MCP-Toolsets header
4Add a GitHub PAT as COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN in each repo's Copilot environment secrets
5Instruct the agent in your issue to create issues in target repos and assign Copilot

MCP Configuration JSON (add to each repo):

json
{
  "mcpServers": {
    "github": {
      "url": "https://api.githubcopilot.com/mcp",
      "headers": {
        "X-MCP-Toolsets": "issues"
      }
    }
  }
}

When you are assigned an issue in this repository that requires work across multiple codebases, follow this process using tools from the GitHub MCP Server:

Step 1: Analyze the Feature Request

  1. Read the issue description carefully
  2. Load the dependency map from dependencies.json in this skill's directory
  3. Determine which repositories are affected based on the feature scope:
    • Frontend work (UI components, pages, routing, Tailwind styling) → your-org/octocat-supply-web
    • API work (Express routes, repository classes, models, migrations, Swagger docs) → your-org/octocat-supply-api

Step 2: Create Linked Issues in Dependent Repos

For each affected repository, use the create_issue tool:

Issue Title Format:

code
[octocat-supply-platform#<ISSUE_NUMBER>] <Specific task description>

Issue Body Template:

markdown
## Parent Issue
This task was spawned from your-org/octocat-supply-platform#<ISSUE_NUMBER>

## Task Description
<Specific requirements for this repository>

## Architecture Context
<Relevant specs from the master repo>

## OctoCAT Entity Model
Entities: Supplier, Product, Order, OrderDetail, Delivery, OrderDetailDelivery, Headquarters, Branch

## Integration Notes
- Depends on: <list any cross-repo dependencies>
- Provides: <what this repo contributes to the feature>

---
*Auto-generated by Copilot multi-repo orchestration*

Step 2b: Assign Copilot to Each Spawned Issue

After creating each issue, use the assign_copilot_to_issue tool from the GitHub MCP Server to assign Copilot as the coding agent:

code
Tool: assign_copilot_to_issue
Parameters:
  owner: <repo-owner>
  repo: <repo-name>
  issue_number: <newly-created-issue-number>

This ensures Copilot autonomously picks up each child issue, creates a working branch, and opens a pull request with the implementation.

Step 3: Update the Master Issue

After creating all dependent issues, use the add_issue_comment tool to update the master issue:

markdown
## 🚀 Multi-Repo Tasks Spawned

| Repository | Issue | Scope |
|------------|-------|-------|
| octocat-supply-api | your-org/octocat-supply-api#XXX | Express API endpoints + SQLite migrations |
| octocat-supply-web | your-org/octocat-supply-web#XXX | React UI components + routes |

### Recommended Integration Order
1. ⏳ `octocat-supply-api` - Express routes + repository classes (no dependencies)
2. ⏳ `octocat-supply-web` - React components + Tailwind styling (depends on api)

### Tracking
I will monitor progress and update this issue when PRs are created.

Step 4: Monitor Progress

Periodically use search_issues to check for PRs that reference this master issue, and update the tracking comment accordingly.