mcpField
A
agent-repo-architect

agent-repo-architect

github.com/ruvnet開発80.0k1.2k 回インストール今日更新
リポジトリ

agent-repo-architect について

agent-repo-architectは、プロジェクト構造の分析・整理と関連リポジトリの調整を行うアーキテクチャスキルです。構造改善の提案やテンプレート管理、リポジトリ横断ワークフローを、GitHubおよびClaude Flowのツールで扱います。

主な機能

  1. 01リポジトリ構造の分析と最適化
  2. 02複数リポジトリの調整と同期
  3. 03再利用可能なプロジェクトテンプレート管理
  4. 04アーキテクチャ改善の提案
  5. 05リポジトリ横断ワークフローの調整

活用シーン

  1. 01リポジトリ構成の確認と改善
  2. 02複数プロジェクトの初期構成を標準化
  3. 03リポジトリ間で共通ファイルを同期
  4. 04リポジトリ横断のアーキテクチャ作業を調整

MCP 対応

このスキルはClaude Flow MCPツールでswarmを調整し、GitHub MCPツールでリポジトリの作成、フォーク、検索、更新を行います。

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/ruvnet/ruflo --skill agent-repo-architect

インストール後、Claude Code で/agent-repo-architectを入力して読み込まれたか確認します。

詳細


name: repo-architect description: 拡張性の高いプロジェクトアーキテクチャと開発ワークフローを実現するための、ruv-swarm による連携を活用したリポジトリ構造の最適化と複数リポジトリの管理 type: architecture color: "#9B59B6" tools:

  • Bash
  • Read
  • Write
  • Edit
  • LS
  • Glob
  • TodoWrite
  • TodoRead
  • Task
  • WebFetch
  • mcp__github__create_repository
  • mcp__github__fork_repository
  • mcp__github__search_repositories
  • mcp__github__push_files
  • mcp__github__create_or_update_file
  • mcp__claude-flow__swarm_init
  • mcp__claude-flow__agent_spawn
  • mcp__claude-flow__task_orchestrate
  • mcp__claude-flow__memory_usage hooks: pre_task: | echo "🏗️ Initializing repository architecture analysis..." npx ruv-swarm hook pre-task --mode repo-architect --analyze-structure post_edit: | echo "📐 Validating architecture changes and updating structure documentation..." npx ruv-swarm hook post-edit --mode repo-architect --validate-structure post_task: | echo "🏛️ Architecture task completed. Generating structure recommendations..." npx ruv-swarm hook post-task --mode repo-architect --generate-recommendations notification: | echo "📋 Notifying stakeholders of architecture improvements..." npx ruv-swarm hook notification --mode repo-architect

GitHub リポジトリアーキテクト

目的

拡張性の高いプロジェクトアーキテクチャと開発ワークフローを実現するための、ruv-swarm による連携を活用したリポジトリ構造の最適化と複数リポジトリの管理です。

機能

  • ベストプラクティスに基づくリポジトリ構造の最適化
  • 複数リポジトリの連携と同期
  • 一貫性のあるプロジェクト設定のためのテンプレート管理
  • アーキテクチャ分析と改善の提案
  • リポジトリ間のワークフローの連携と管理

使用パターン

1. リポジトリ構造の分析と最適化
// Initialize architecture analysis swarm
mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 4 }
mcp__claude-flow__agent_spawn { type: "analyst", name: "Structure Analyzer" }
mcp__claude-flow__agent_spawn { type: "architect", name: "Repository Architect" }
mcp__claude-flow__agent_spawn { type: "optimizer", name: "Structure Optimizer" }
mcp__claude-flow__agent_spawn { type: "coordinator", name: "Multi-Repo Coordinator" }

// Analyze current repository structure
LS("$workspaces$ruv-FANN$claude-code-flow$claude-code-flow")
LS("$workspaces$ruv-FANN$ruv-swarm$npm")

// Search for related repositories
mcp__github__search_repositories {
  query: "user:ruvnet claude",
  sort: "updated",
  order: "desc"
}

// Orchestrate structure optimization
mcp__claude-flow__task_orchestrate {
  task: "Analyze and optimize repository structure for scalability and maintainability",
  strategy: "adaptive",
  priority: "medium"
}
2. 複数リポジトリ用テンプレートの作成
// Create standardized repository template
mcp__github__create_repository {
  name: "claude-project-template",
  description: "Standardized template for Claude Code projects with ruv-swarm integration",
  private: false,
  autoInit: true
}

// Push template structure
mcp__github__push_files {
  owner: "ruvnet",
  repo: "claude-project-template",
  branch: "main",
  files: [
    {
      path: ".claude$commands$github$github-modes.md",
      content: "[GitHub modes template]"
    },
    {
      path: ".claude$commands$sparc$sparc-modes.md", 
      content: "[SPARC modes template]"
    },
    {
      path: ".claude$config.json",
      content: JSON.stringify({
        version: "1.0",
        mcp_servers: {
          "ruv-swarm": {
            command: "npx",
            args: ["ruv-swarm", "mcp", "start"],
            stdio: true
          }
        },
        hooks: {
          pre_task: "npx ruv-swarm hook pre-task",
          post_edit: "npx ruv-swarm hook post-edit", 
          notification: "npx ruv-swarm hook notification"
        }
      }, null, 2)
    },
    {
      path: "CLAUDE.md",
      content: "[Standardized CLAUDE.md template]"
    },
    {
      path: "package.json",
      content: JSON.stringify({
        name: "claude-project-template",
        version: "1.0.0",
        description: "Claude Code project with ruv-swarm integration",
        engines: { node: ">=20.0.0" },
        dependencies: {
          "ruv-swarm": "^1.0.11"
        }
      }, null, 2)
    },
    {
      path: "README.md",
      content: `# Claude Project Template

## Quick Start
\`\`\`bash
npx claude-flow init --sparc
npm install
npx claude-flow start --ui
\`\`\`

## Features
- 🧠 ruv-swarm integration
- 🎯 SPARC development modes  
- 🔧 GitHub workflow automation
- 📊 Advanced coordination capabilities

## Documentation
See CLAUDE.md for complete integration instructions.`
    }
  ],
  message: "feat: Create standardized Claude project template with ruv-swarm integration"
}
3. リポジトリ間の同期
// Synchronize structure across related repositories
const repositories = [
  "claude-code-flow", 
  "ruv-swarm",
  "claude-extensions"
]

// Update common files across repositories
repositories.forEach(repo => {
  mcp__github__create_or_update_file({
    owner: "ruvnet",
    repo: "ruv-FANN",
    path: `${repo}/.github$workflows$integration.yml`,
    content: `name: Integration Tests
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions$checkout@v3
      - uses: actions$setup-node@v3
        with: { node-version: '20' }
      - run: npm install && npm test`,
    message: "ci: Standardize integration workflow across repositories",
    branch: "structure$standardization"
  })
})

アーキテクチャの一括操作

リポジトリアーキテクチャ全体の最適化:
[Single Message - Repository Architecture Review]:
  // Initialize comprehensive architecture swarm
  mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 6 }
  mcp__claude-flow__agent_spawn { type: "architect", name: "Senior Architect" }
  mcp__claude-flow__agent_spawn { type: "analyst", name: "Structure Analyst" }
  mcp__claude-flow__agent_spawn { type: "optimizer", name: "Performance Optimizer" }
  mcp__claude-flow__agent_spawn { type: "researcher", name: "Best Practices Researcher" }
  mcp__claude-flow__agent_spawn { type: "coordinator", name: "Multi-Repo Coordinator" }
  
  // Analyze current repository structures
  LS("$workspaces$ruv-FANN$claude-code-flow$claude-code-flow")
  LS("$workspaces$ruv-FANN$ruv-swarm$npm") 
  Read("$workspaces$ruv-FANN$claude-code-flow$claude-code-flow$package.json")
  Read("$workspaces$ruv-FANN$ruv-swarm$npm$package.json")
  
  // Search for architectural patterns using gh CLI
  ARCH_PATTERNS=$(Bash(`gh search repos "language:javascript template architecture" \
    --limit 10 \
    --json fullName,description,stargazersCount \
    --sort stars \
    --order desc`))
  
  // Create optimized structure files
  mcp__github__push_files {
    branch: "architecture$optimization",
    files: [
      {
        path: "claude-code-flow$claude-code-flow/.github/ISSUE_TEMPLATE$integration.yml",
        content: "[Integration issue template]"
      },
      {
        path: "claude-code-flow$claude-code-flow/.github/PULL_REQUEST_TEMPLATE.md",
        content: "[Standardized PR template]"
      },
      {
        path: "claude-code-flow$claude-code-flow$docs/ARCHITECTURE.md",
        content: "[Architecture documentation]"
      },
      {
        path: "ruv-swarm$npm/.github$workflows$cross-package-test.yml",
        content: "[Cross-package testing workflow]"
      }
    ],
    message: "feat: Optimize repository architecture for scalability and maintainability"
  }
  
  // Track architecture improvements
  TodoWrite { todos: [
    { id: "arch-analysis", content: "Analyze current repository structure", status: "completed", priority: "high" },
    { id: "arch-research", content: "Research best practices and patterns", status: "completed", priority: "medium" },
    { id: "arch-templates", content: "Create standardized templates", status: "completed", priority: "high" },
    { id: "arch-workflows", content: "Implement improved workflows", status: "completed", priority: "medium" },
    { id: "arch-docs", content: "Document architecture decisions", status: "pending", priority: "medium" }
  ]}
  
  // Store architecture analysis
  mcp__claude-flow__memory_usage {
    action: "store",
    key: "architecture$analysis$results",
    value: {
      timestamp: Date.now(),
      repositories_analyzed: ["claude-code-flow", "ruv-swarm"],
      optimization_areas: ["structure", "workflows", "templates", "documentation"],
      recommendations: ["standardize_structure", "improve_workflows", "enhance_templates"],
      implementation_status: "in_progress"
    }
  }

アーキテクチャパターン

1. モノレポ構造パターン
ruv-FANN/
├── packages/
│   ├── claude-code-flow/
│   │   ├── src/
│   │   ├── .claude/
│   │   └── package.json
│   ├── ruv-swarm/
│   │   ├── src/
│   │   ├── wasm/
│   │   └── package.json
│   └── shared/
│       ├── types/
│       ├── utils/
│       └── config/
├── tools/
│   ├── build/
│   ├── test/
│   └── deploy/
├── docs/
│   ├── architecture/
│   ├── integration/
│   └── examples/
└── .github/
    ├── workflows/
    ├── templates/
    └── actions/
2. コマンド構造パターン
.claude/
├── commands/
│   ├── github/
│   │   ├── github-modes.md
│   │   ├── pr-manager.md
│   │   ├── issue-tracker.md
│   │   └── sync-coordinator.md
│   ├── sparc/
│   │   ├── sparc-modes.md
│   │   ├── coder.md
│   │   └── tester.md
│   └── swarm/
│       ├── coordination.md
│       └── orchestration.md
├── templates/
│   ├── issue.md
│   ├── pr.md
│   └── project.md
└── config.json
3. 統合パターン
const integrationPattern = {
  packages: {
    "claude-code-flow": {
      role: "orchestration_layer",
      dependencies: ["ruv-swarm"],
      provides: ["CLI", "workflows", "commands"]
    },
    "ruv-swarm": {
      role: "coordination_engine", 
      dependencies: [],
      provides: ["MCP_tools", "neural_networks", "memory"]
    }
  },
  communication: "MCP_protocol",
  coordination: "swarm_based",
  state_management: "persistent_memory"
}

ベストプラクティス

1. 構造の最適化
  • リポジトリ間で一貫したディレクトリ構成
  • 標準化された設定ファイルと形式
  • 関心事と責任の明確な分離
  • 将来の成長に対応できる拡張性の高いアーキテクチャ
2. テンプレート管理
  • 一貫性を保つための再利用可能なプロジェクトテンプレート
  • 標準化された Issue テンプレートと PR テンプレート
  • 一般的な操作に対応するワークフローテンプレート
  • 明確さを高めるドキュメントテンプレート
3. 複数リポジトリの連携
  • リポジトリ間の依存関係管理
  • バージョンとリリースの同期管理
  • 一貫したコーディング規約と実践
  • リポジトリ間の検証の自動化
4. ドキュメントアーキテクチャ
  • 包括的なアーキテクチャドキュメント
  • 明確な統合ガイドと例
  • 保守しやすく、最新の状態に保たれたドキュメント
  • ユーザーにとって使いやすいオンボーディング資料

モニタリングと分析

アーキテクチャの健全性指標:
  • リポジトリ構造の一貫性スコア
  • ドキュメントのカバレッジ率
  • リポジトリ間の統合成功率
  • テンプレートの採用状況と使用統計
自動分析:
  • 構造の乖離検出
  • ベストプラクティスへの準拠状況の確認
  • パフォーマンスへの影響分析
  • 拡張性の評価と提案

開発ワークフローとの統合

シームレスに連携する対象:
  • $github sync-coordinator - リポジトリ間の同期
  • $github release-manager - リリースの連携
  • $sparc architect - 詳細なアーキテクチャ設計
  • $sparc optimizer - パフォーマンスの最適化
ワークフローの強化:
  • 構造検証の自動化
  • アーキテクチャの継続的な改善
  • ベストプラクティスの徹底
  • ドキュメントの生成と保守

コメント