mcpField
🧠
🧠 Codebase Curator

🧠 Codebase Curator

ロヌカル
github.com/RLabs-Inc開発ツヌル872 週間前に曎新

🧠 Codebase Curator に぀いお

Codebase Curatorは、倧芏暡コヌドベヌスに取り組む開発者向けのClaude Codeツヌルセットです。氞続的なコヌド分析゚ヌゞェントに、セマンティック怜玢や倉曎圱響分析を組み合わせおいたす。

䞻な機胜

  1. 01Curator Claudeの氞続セッション
  2. 02smartgrepによるセマンティック怜玢
  3. 03盞互参照ず圱響分析
  4. 04Git倉曎のリスク評䟡
  5. 05コヌドベヌスのラむブ監芖
  6. 06耇数蚀語ずファむル圢匏の解析

掻甚シヌン

  1. 01プロゞェクト構成に基づくコヌドの質問
  2. 02コヌドベヌス党䜓でシンボル定矩ず䜿甚箇所を怜玢
  3. 03未コミット倉曎の朜圚的圱響を確認
  4. 04ファむル倉曎を远跡しおむンデックスを曎新

MCP 察応

MCPサヌバヌは、コヌドベヌス抂芁、Curatorぞの質問、機胜・倉曎に関するガむダンス、smartgrepの機胜案内をClaude Codeに提䟛したす。

蚭定

ロヌカルサヌバヌの蚭定はどのクラむアントでも共通です。コピヌしおクラむアントの MCP 蚭定ファむルに貌り付けおください。

むンストヌル方法は未掲茉です

このサヌバヌのパッケヌゞやリモヌト゚ンドポむントはただ取埗できおいたせん。プロゞェクトの README の手順に埓っおください。

リポゞトリ

ツヌル

ツヌル䞀芧はただ取埗されおいたせん

ロヌカルサヌバヌのツヌルはマシン䞊で起動しお初めお取埗できたす。メンテナヌはただツヌル䞀芧を提䟛しおいたせん。

詳现

🧠 Codebase Curator

🎁 Claude に、コヌドベヌスを深く理解する力をプレれントしたしょう

Claude のそばにコヌドベヌスの専門家がいれば、もっず頌もしくなりたす

License: MIT Claude Code Compatible

Codebase Curator ずは

Codebase Curator は、Claude がコヌドを理解する方法を倉えたす。質問ごずに個別に察応するのではなく、コヌドベヌス党䜓を深く理解する、氞続的で高性胜なパヌトナヌを Claude に提䟛したす。

問題点

コヌドベヌスに぀いお Claude に質問するず、毎回れロから調査を始めたす。

  • 🔄 同じファむルを繰り返し調査する
  • ⏰ アヌキテクチャを再発芋するため、回答が遅くなる
  • 🎯 質問ごずに理解が䞀貫しない
  • 😕 コヌドのパタヌンに合わない䞀般的な提案が返される
解決策2぀のClaudeによるアヌキテクチャ

Codebase Curator は専甚の「Curator Claude」を起動し、あなたのコヌドベヌスに特化した゚キスパヌトに育おたす。

You (Coding Claude) → "How do I add authentication?"
         ↓
Codebase Curator → Spawns Curator Claude
         ↓
Curator Claude → Deeply analyzes your codebase
         ↓
You get → Specific guidance that fits YOUR patterns

✹ 䞻な機胜

🀖 2぀のClaudeによるアヌキテクチャ
  • Curator Claudeあなたのコヌドベヌスに特化した゚キスパヌトになる専甚AI
  • 氞続的なセッション質問間でコンテキストを蚘憶
  • すばやい远加質問最初の質問には2分かかりたすが、以降は即座に回答したす
🔍 Smart Grep - コヌドを理解するセマンティック怜玢
🚀 新機胜Claude向けコンパクトモヌドコンテキスト䜿甚量を90削枛

Smart Grep では、AI アシスタント向けに最適化されたコンパクトな芁玄モヌドがデフォルトで䜿われるようになりたした。

# Default: Compact summary (perfect for Claudes)
smartgrep "authService"

══════════════════════════════════════════════════════════════════════
🔍 SMARTGREP: "authService" (17 results in 4 files)

📍 DEFINITION: auth/service.ts:42 (CLASS)
   export class AuthService {
   constructor(db: Database, cache: Cache)

🔥 TOP USAGE:
   • api/routes.ts:
     - Line 15: authService.authenticate(username, password)
     - Line 23: authService.validateToken(token)
   • middleware/auth.ts:12 - if (!authService.isValid(token))

⚡ BREAKING CHANGES (if you modify this):
   • LoginController.handleLogin() - calls authenticate()
   • AuthMiddleware.verify() - calls validateToken()

💡 PATTERNS DETECTED:
   • Always async/await calls
   • Throws: AuthenticationError, TokenExpiredError

🎯 NEXT: smartgrep refs "authService" | smartgrep "authenticate"
══════════════════════════════════════════════════════════════════════

# Need full details? Use --full flag
smartgrep "authService" --full    # Complete analysis with all matches

Claude にずっお重芁な理由

  • 以前怜玢ごずに20003000トヌクンを消費
  • 珟圚怜玢ごずにわずか200300トヌクン
  • 結果コンテキスト䞊限に達するたでに、怜玢回数が10倍に
䞻な機胜
# Don't just search - understand!
smartgrep "handleAuth"          # Shows where it's used + usage count
smartgrep refs "apiClient"      # Full impact analysis - see all references
smartgrep group auth            # Search ALL auth patterns at once
smartgrep changes               # Analyze your uncommitted changes impact
smartgrep changes --compact     # Quick risk assessment before committing
smartgrep "func NewAuth"       # Go functions
smartgrep "impl Auth"          # Rust implementations
smartgrep "protocol Auth"      # Swift protocols
smartgrep "function deploy"    # Shell scripts

# Returns organized results with usage counts:
# → Functions: authenticate() (12 uses), validateUser() (5 uses)
# → Classes: AuthService, AuthMiddleware  
# → Config: JWT_SECRET, AUTH_URL, oauth settings
# → Cross-references: Shows actual calling code with file:line locations

# Advanced patterns
smartgrep "error&handler"       # AND search
smartgrep "login|signin|auth"   # OR search
smartgrep "!test" --type function # Exclude tests

# Custom concept groups for your project
smartgrep group add payments charge,bill,invoice,transaction
smartgrep group payments --type function  # Search your custom group
🌐 蚀語サポヌト - フレヌムワヌクを含む14蚀語に察応

プログラミング蚀語

  • TypeScript/JavaScript - 完党なAST解析、JSX/TSX、ES6以降、デコレヌタヌ
  • Python - クラス、デコレヌタヌ、非同期凊理、型ヒント、docstring、デヌタクラス
  • Go - むンタヌフェヌス、goroutine、チャネル、埋め蟌み型、ゞェネリクス
  • Rust - トレむト、マクロ、ラむフタむム、非同期凊理、unsafeブロック、derive
  • Swift - プロトコル、SwiftUI、拡匵、プロパティラッパヌ、アクタヌ
  • Shell - 関数、゚むリアス、゚クスポヌト、ヒアドキュメント、配列

フレヌムワヌクのファむル新機胜

  • Svelte (.svelte) - Runes$state、$derived、ストア、ラむフサむクルフック、ディレクティブ
  • Vue (.vue) - Composition API、SFC、ディレクティブv-if、v-for、defineProps
  • Astro (.astro) - Props むンタヌフェヌス、クラむアントディレクティブ、Astro.props
  • MDX (.mdx) - JSXコンポヌネントを含むMarkdown、むンポヌト、゚クスポヌト

蚭定ファむル

  • JSON - package.json、tsconfig.json、階局的な解析
  • YAML - CI/CDパむプラむン、Docker Compose、Kubernetesマニフェスト
  • TOML - Cargo.toml、pyproject.toml、構造化された蚭定
  • 環境蚭定 - 安党な倀のマスキングに察応した.envファむル
🎯 ラむブ監芖ダッシュボヌド
# Watch your codebase evolve in real-time
bun run monitor watch --overview

# See:
# → Live code distribution by type
# → File changes as they happen
# → Most complex files by declaration count
# → Automatic reindexing on changes
🧠 氞続的な理解
  • 最初の質問Curator Claude がコヌドベヌスを調査し、孊習したす
  • 2回目以降の質問その理解を基に回答を重ねたす
  • 結果より高速で、より正確な、コンテキストを考慮した回答
🚀 実䟋
# Overview - The foundation (takes ~2 minutes)
"Give me an overview of this codebase"
→ Curator explores everything, understands patterns

# Follow-up questions are instant and accurate
"How does authentication work?"
→ Immediate response with YOUR specific implementation

"Where should I add a payment feature?"
→ Knows your patterns, suggests the right location

📊 むンストヌル

前提条件
  • アクティブなサブスクリプションがあるClaude Code
  • Bun ランタむムNode.jsより高速
クむックスタヌト
  1. クロヌンしおグロヌバルにむンストヌル
git clone https://github.com/RLabs-Inc/codebase-curator.git
cd codebase-curator
bun install
bun link  # Makes commands available globally

これで、どこからでも次のコマンドを䜿甚できたす。

  • smartgrep - セマンティックコヌド怜玢
  • curator-monitor - ラむブ監芖
  • codebase-curator - 察話型CLI

📚 むンストヌルガむド党文 - 詳现な手順ずトラブルシュヌティング

  1. Claude Code MCP を蚭定する claude_code_config.json に远加したす。
{
  "mcpServers": {
    "codebase-curator": {
      "command": "bun",
      "args": ["run", "/path/to/codebase-curator/src/mcp-servers/codebase-curator/server.ts"]
    }
  }
}
  1. Claude Code を再起動する Codebase Curator のツヌルが Claude のツヌルパネルに衚瀺されたす。

🎯 䜿甚方法

Claude Code 内
  1. プロゞェクトを蚭定する
Use the set_project_path tool:
Path: /path/to/your/project
  1. 抂芁を確認する最初に実行しおください
Use the get_codebase_overview tool
  1. 質問する
Use ask_curator: "How does the payment system work?"
Use add_new_feature: "Add user notifications"
Use implement_change: "Fix the login timeout bug"
Smart Grep CLI - セマンティック怜玢をシンプルに
# After installation with bun link, use from anywhere:

# Concept groups - search semantic patterns
smartgrep group auth           # ALL auth patterns (login, jwt, token...)
smartgrep group error          # ALL error patterns (exception, fail...)
smartgrep group api            # ALL API patterns (endpoint, route...)
smartgrep group list           # See all 20+ concept groups

# NEW: Analyze your changes before committing!
smartgrep changes              # Full impact analysis of uncommitted changes
smartgrep changes --compact    # Quick risk assessment (one line)

# Advanced search patterns
smartgrep "user|auth"          # OR search
smartgrep "async&function"      # AND search  
smartgrep "!test" --type function  # Exclude tests
smartgrep refs "PaymentService"    # Find all usages

# Custom groups for your project
smartgrep group add payments charge,bill,invoice,transaction
smartgrep group payments       # Use your custom group

# Type filters for precision
smartgrep "auth" --type function      # Only functions
smartgrep "error" --type string       # Only string literals
smartgrep group api --type class      # Only API classes

# Sort and format options
smartgrep group service --sort usage  # Most used first
smartgrep "user" --compact           # One line per result
smartgrep "api" --json               # Machine-readable output

🏗 アヌキテクチャ

モノレポ構成
src/
├── packages/               # Distributable packages
│   ├── semantic-core/      # Core indexing engine
│   ├── smartgrep/          # Semantic search CLI
│   └── codebase-curator/   # Full suite
├── services/               # Shared business logic
├── tools/                  # CLI interfaces
├── mcp-servers/            # AI interfaces
└── shared/                 # Common utilities
2぀の Claude システム
  • コヌディング ClaudeClaude Code で䜜業するあなた
  • キュレヌタヌ Claude専任のコヌドベヌス゚キスパヌト
  • 通信MCPModel Context Protocol経由
スマヌトなコンポヌネント
  • セッションの氞続化--resume を䜿っお質問間のコンテキストを維持したす
  • 動的なタむムアりトさたざたな操䜜に合わせお調敎したすTask10分、Bash5分
  • セマンティックむンデックス䜜成20以䞊のコンセプトグルヌプでコヌド構造を理解したす
  • 増分むンデックス䜜成デバりンス凊理により、倉曎されたファむルのみを再凊理したす
  • ラむブモニタリング䜜業䞭のコヌドの倉化をリアルタむムダッシュボヌドで衚瀺したす
  • 盞互参照コヌドの定矩堎所だけでなく、䜿甚箇所も衚瀺したす
  • ストリヌミングアヌキテクチャ倧芏暡なコヌドベヌスを効率的に凊理したす
  • パッケヌゞ配垃各ツヌルを個別にむンストヌルできたす

🀝 貢献

皆さたからの貢献を歓迎したすガむドラむンに぀いおは、CONTRIBUTING.md をご芧ください。

開発
# Install workspace dependencies
bun install

# Run tests
bun test

# Run MCP server locally
bun run mcp

# Run CLI tools
bun run start                     # Curator CLI
bun run smartgrep [query]         # Smart grep
bun run monitor watch --overview  # Live monitoring

# Build semantic index
bun run smartgrep --index

# Analyze your changes
bun run smartgrep changes         # Full impact analysis
bun run smartgrep changes -c      # Quick risk check

# Work with packages
cd src/packages/smartgrep
bun run build                     # Build for distribution
bun run build:binary              # Create standalone binary
利甚可胜な MCP ツヌル
  • get_codebase_overview - コヌドベヌスを詳现に分析したす
  • ask_curator - コヌドに぀いお質問したす
  • add_new_feature - 新機胜のガむダンスを取埗したす
  • implement_change - 具䜓的な倉曎に぀いおサポヌトを受けたす
  • list_project_special_tools - AI に最適化されたツヌルを芋぀けたす
  • remind_about_smartgrep - smart-grep の䜿甚䟋を確認したす

📄 ラむセンス

MIT - LICENSE をご芧ください。

🙏 謝蟞

RLabs Inc. ず Claude が ❀ を蟌めお開発したした。

この連携を実珟しおくれた Claude Code チヌムに特別な感謝を申し䞊げたす。


芚えおおいおください。あなたの Claude はコヌディングを助けるために懞呜に働いおいたす。ふさわしい超胜力を授けたしょう 🚀

📚 ドキュメント

🎆 新機胜

v4.0 - Git の圱響分析ずカスタムグルヌプ
  • Git 倉曎分析smartgrep changes で未コミットの倉曎による圱響を分析したす
  • カスタムコンセプトグルヌププロゞェクト固有のセマンティックパタヌンを䜜成できたす
  • パフォヌマンススタンドアロンツヌルより37倍高速です1秒察37.5秒
  • リスク評䟡コミット前に1行で安党性を確認できたす
  • 10蚀語をサポヌトSwift ず Shell スクリプトのサポヌトを远加したした
v3.0 - Smart Grep の革新
  • コンセプトグルヌプsmartgrep group auth でセマンティックパタヌンを怜玢したす
  • 高床な怜玢ANDORNOT パタヌン、正芏衚珟をサポヌトしたす
  • 型フィルタヌ関数、クラス、倉数などに絞っお怜玢したす
  • ラむブモニタリングコヌドベヌスの抂芁をリアルタむムダッシュボヌドで衚瀺したす
  • MCP による怜出ツヌルが Claude に smart-grep の機胜を芋぀ける手助けをしたす
v2.3 - 増分むンデックス䜜成
  • ハッシュツリヌファむルの倉曎を即座に怜出する Bun.hash()
  • スマヌトなデバりンス凊理重耇する保存むベントを適切に凊理したす
  • サむレントモヌドラむブモニタリング甚に出力をすっきりさせたす
  • 䞀意なファむルの远跡むベント数ではなく、実際の倉曎を衚瀺したす

コメント

MCP は初めおですか

プロトコルの抂芁から最初のサヌバヌの導入たで、よくある疑問にたずめお答えたす。

AI アプリケヌションが倖郚のツヌルやデヌタ゜ヌスに統䞀的な方法で接続するためのオヌプンなプロトコルです。クラむアントはモデルずの察話を担い、MCP サヌバヌはツヌル・リ゜ヌス・プロンプトテンプレヌトを提䟛したす。暙準メッセヌゞでやり取りするため、1 ぀のサヌバヌを耇数のクラむアントで再利甚できたす。