AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
Claude Blog·2026年5月27日 09:00·約9分で読める

CodeRabbit が Claude を活用してエージェントオーケストレーションシステムを構築した方法

#Reasoning#Agent Orchestration#Claude Platform#Code Generation#Prompt Engineering
TL;DR

CodeRabbit は、AI コード生成前に構造化された計画フェーズを導入するエージェントオーケストレーションシステムを Claude を用いて構築し、テスト通過コードが意図した機能を実装していないという根本的な課題を解決している。

AI深層分析2026年6月12日 23:05
4
重要/ 5段階
深度40%
5
関連度30%
5
実用性20%
4
革新性10%
4

キーポイント

1

計画の質が生産物の質を決める

安価なコード生成コストが増えるほど、間違った方向に進むリスクのコストが高まるため、生成前に Claude を活用した構造化された計画フェーズを設けるアプローチを採用している。

2

開発者の暗黙知と AI のギャップ

熟練開発者は文書化されていない「自明な前提」を AI に期待しがちだが、これが曖昧なプロンプトとなり、AI が推測した実装が意図とズレる主要な失敗原因となっている。

3

Claude を用いたオーケストレーション層の構築

CodeRabbit は Claude Platform と Claude Code を活用し、コード生成前に要件を明確化・計画するエージェントオーケストレーションレイヤーを設計・実装した。

4

スケーラブルな検証と実績

このシステムは週に 200 万件の PR レビュー、15,000 社以上の顧客基盤で運用されており、コードがコンパイル・テストを通過しても機能しないという課題への実証済みの解決策を示している。

影響分析・編集コメントを表示

影響分析

この記事は、単なるコード補完ツールを超え、AI エージェントが「考える(プランニング)」能力を持つことで、実務レベルの信頼性を高める転換点を示しています。開発現場における AI の活用において、プロンプトエンジニアリングや計画プロセスの重要性を再認識させ、次世代の AI 開発ワークフローの標準的な構成要素として「事前計画フェーズ」が定着する可能性を示唆しています。

編集コメント

「コードが動くこと」と「意図した機能を実装すること」の乖離という、AI コーディングにおける本質的な課題に対し、Claude を活用して「計画フェーズ」を強化するアプローチは非常に示唆に富んでいます。

*当シリーズ「Claude を活用したスタートアップの取り組み」では、AI によって業界を変革するスタートアップ事例を紹介しています。本記事では、CodeRabbit がコード生成前に計画を行うエージェントオーケストレーション層をどのように構築したかを共有します。

クイック概要

社名

CodeRabbit

設立年

2023 年

創業者

Harjot Gill(CEO)

技術スタック

Claude Platform, Claude Code

スケール

15,000 社以上の顧客に対し、週あたり 200 万件の PR(プルリクエスト)レビューを実施

AI コーディングツールは、アイデアから動作するプロトタイプまでの時間を劇的に短縮しました。しかし、CodeRabbit という AI コードレビュープラットフォームでは、その処理能力の高まりに伴い別の傾向が浮き彫りになっています。それは、「コンパイルもテストも通過するが、チームが実際に意図した機能を実装していないコード」です。

CodeRabbit の AI 担当バイスプレジデントである David Loker は、この原因をモデルの上位段階に位置づけています。経験豊富な開発者は、コーディングエージェントが自分たちと同じ文脈を理解していると思い込み、自分たちにとって自明な要件を書き残すことを怠りがちです。その結果、コーディングエージェントは自分が妥当とみなしたもので隙間を埋めてしまいます。

そのギャップを埋めるために、CodeRabbit は Claude を活用して、コード生成の前に構造化された計画フェーズを実行するエージェントオーケストレーションシステム(agent orchestration system)の設計と構築を行いました。チームの仮説は、計画の質が出力の質を決定し、コード生成のコストが下がるほど、間違った方向へ進むコストが高くなるというものです。

AI コーディングにおける内部知識ギャップへの対応

CodeRabbit チームが顧客ベース全体で AI によって生成されたプルリクエスト(pull request)を調査した際、最も頻繁に発生する失敗モードは、コンパイルが成功しテストも通過するものの、本来解決すべき問題を解決できていないコードでした。

「開発者として経験を積むにつれ、私たちは知識を内面化します」と Loker は述べています。「それらのすべては私たちの頭の中にあり、他の開発者もそれを理解していると思い込んでしまいます。しかし、その前提を AI システムにも適用してしまい、それが暗黙的に理解していると仮定してしまうのです。私たちは、そのような仮定をしていることさえ気づいていません。

曖昧なプロンプト(prompt)は、基盤となるシステムに、それが妥当とみなすものでギャップを埋めさせることになります。その推測は、開発者が意図していたものとしばしば乖離します。

Loker は個人的な例を挙げています。サイドプロジェクトでメモリシステムを構築する際、すべてが動作するまでコーディングエージェントと何時間も反復作業を行いました。彼がその使い方をエージェントに尋ねたところ、指示にはユーザートークンを渡すように書かれていました。ログインページはありませんでした。彼はシステムにユーザーが必要だと指定していましたが、ユーザーがサインインする方法が必要だとは一言も述べていませんでした。エージェントはその隙間を埋め、何時間もかけた作業の成果物が玄関口のない製品となってしまいました。

「結局のところ、その上に多くのものを構築することになり、ずっと後になって問題があることに気づくことになります」と Loker は言います。「AI ワークフローでは、遅れた検証は非常に高価になる可能性があります。」

AI コーディングソリューションの前に動作するオーケストレーション層

CodeRabbit の対応策は、コード生成の前に計画システムを挿入することでした。これは複数の Claude モデルを調整して要件を分析し、構造化された実行プラン(何を構築すべきか、どのような制約を満たす必要があるかを定義する)を生成する前に前提条件を浮き彫りにします。

「この計画システムは、Claude Code の Plan Mode を置き換えるものではありません」と Loker は言います。「これは Claude Code 以前に起こるより高レベルなオーケストレーションであり、明確にする必要があるすべての事項を明確にし、行われているすべての前提条件を認識できるように、非常に狭く正しい方向へと導くものです。」

出力結果は、共同で作成された製品要件定義書(PRD)です。これは、チーム全体のステークホルダーによって文脈を完全に踏まえて作成され、検証され、実装開始前にレビューされた計画です。Claude Code はこの計画を引き継ぎ、それを基に詳細な実装計画を生成します。この計画は、何が決定され、なぜそう決まったのかを捉えた共有アーティファクトとなり、チームが手戻りを避けたり、後から出力が元の意図と一致していることを検証したり、新しいエンジニアのオンボーディングを支援したりする役割を果たします。

Claude モデルファミリー全体にわたるルーティング

CodeRabbit は、コストとレイテンシを最適化するために、各モデルティアをタスクの複雑さに合わせてマッチングさせています。Opus がオーケストレーションループを駆動し、問題理解や全体的な方向性の設定といった高レベルの戦略的作業を担当します。Sonnet はその出力を受け取り、構造化された計画ステップへと順序立てて展開します。Haiku は、文脈の集約や特定のツール使用など、狭い範囲に限定された操作を処理します。これは、質問が具体的すぎて小さなモデルでも十分に回答できる場合に該当します。

「あるタスクにおいて Haiku が Sonnet と同等以上の成果を出す場合、私たちは Haiku を使用します」と Loker 氏は述べています。「評価ハッチ(harness)が、Opus により多くの余地を与えることで計画の品質が向上することを示す場合は、その余地を与えます。私たちは推測はしません。」

計画品質のための評価ハッチの構築

CodeRabbit にはコードレビュー用の成熟した評価システムが存在しましたが、計画出力の評価を行うものは何もありませんでした。このインフラストラクチャを構築することは、それ自体が一つのプロジェクトとなりました。

システムは手動調整された例と手動検査から始まりました。チームは、計画の質の特定の次元を評価する LLM 判事(LLM judges)のライブラリを開発しました。最終的に計画がコードを生み出すため、生成されたコードが機能しているか、余分なスコープが含まれていないか、そしてそこに至るまでにどれほどのトークンが必要だったかを測定することもできました。計画ステップの有無で同じタスクを実行することで、計画自体の価値を切り離して評価する方法を得ました。

「その計画に適切な詳細レベルが何であるかは、私たちは気づいていませんでした」とローカー氏は述べています。細かすぎる計画は、コードベースが変化した瞬間に陳腐化しました。一方、高すぎた計画では、エージェントが仮定を埋める余地が残ってしまい、これはまさに計画層が解決しようとしていた元の問題そのものです。機能する抽象度のレベルを見つけるには反復が必要でしたが、それが評価ハーン(eval harness)によって可能になりました。

記述される前にエラーを検出する

AI ネイティブなコーディングワークフローでは、これまでコードレビューの段階で表面化していた多くの決定が、より早期の計画層で行われるようになりました。コード生成が始まる前にチームがレビューし合意できる計画を構築することで、ミスを早期に発見できます。

「私たちが Claude エコシステムを用いて構築したのは、組織全体の計画システムです」とローカー氏は言います。「計画自体が品質ゲートとなります。もしその計画の質を事前に本当に高く保つことができれば、下流への影響は非常に顕著になります。最終的には、はるかに優れたコードが得られるのです。」

CodeRabbit チームからのベストプラクティス

あなたは実際にどのような成果を創出しようとしており、それをどのように測定しますか?

AI に対する仕様に明示性を持つだけでなく、MPP(最大可能製品)において何を望むかも定義してください。

まだ暗黙のうちに残っている仮定は何ですか?

Claude に問いかけてください:何が不足しているのか?計画の一部が明示的な仕様ではなく、暗黙の仮定として現れていないか確認してください。

忘れられやすいワークフローやエッジケースはどのようなものですか?

あなたが考慮していない場所やケースを特定するよう、Claude に支援を求めてください。

ロールアウト前に出力が意図に合致していることをどうやって確認しますか?

作業の記録を作成してください:保存され再利用される計画アーティファクトの年表です。

Claude Platform を活用してスタートアップを構築しましょう。

原文を表示

*In our series,* *How startups build with Claude*, we highlight how startups are transforming their industries with AI. In this article, we share how CodeRabbit built an agent orchestration layer that plans before AI generates code.

AI coding tools have collapsed the time between idea and working prototype. CodeRabbit, an AI code review platform, has noticed a different trend climbing alongside that throughput: code that compiles and passes tests but doesn't do what the team actually meant to build.

David Loker, VP of AI at CodeRabbit, locates the cause upstream of the model. Experienced developers often assume coding agents understand the same context they do, so they don’t write down requirements that feel obvious to them. The coding agent then fills the gaps with whatever it considers plausible.

To close that gap, CodeRabbit used Claude to design and build an agent orchestration system that runs a structured planning phase before any code is generated. The team's working thesis is that planning quality determines output quality, and the cheaper code generation gets, the more expensive it becomes to move in the wrong direction.

Addressing the internal knowledge gap in AI coding

When the CodeRabbit team studied AI-generated pull requests across their customer base, the most frequent failure mode was code that compiled and passed tests, yet still didn't solve the problem it was built to solve.

"As we gain experience as developers, we internalize knowledge," Loker says. "All those things are in our head, and we assume other developers know them too. But then we make that assumption of the AI system as well, that it also implicitly understands. We're not even aware that we're assuming those things."

Vague prompts force the underlying system to fill gaps with whatever it considers plausible. That guess often diverges from what the developer had in mind.

Loker offers a personal example. While building a memory system on a side project, he spent hours iterating with a coding agent until everything ran. When he asked the agent how to use it, the instructions told him to pass in a user token. There was no login page. He had specified that the system required users but never said users needed a way to sign in. The agent filled the gap, and hours of work landed in a product missing a front door.

"What ends up happening is you build a lot more stuff on top of it, then much later you find there's a problem," Loker says. "In AI workflows, late validation can be very expensive."

An orchestration layer that runs before AI coding solutions

CodeRabbit's response was to insert a planning system in front of code generation. It coordinates multiple Claude models to analyze requirements and surface assumptions before producing a structured execution plan that defines what should be built and what constraints it needs to satisfy.

"This planning system is not meant to replace Claude Code's Plan Mode," Loker says. "It's a higher level orchestration that happens before Claude Code, to point it in a really narrow and right direction where everything that needs to be explicit is made explicit, and we are aware of all assumptions that are being made."

The output is a collaborative product requirements document (PRD): a plan created with full context, validated by stakeholders across the team, and reviewed before implementation starts. Claude Code picks up that plan and uses it to generate a fine-grained implementation plan. The plan becomes a shared artifact that captures what was decided and why, which not only helps teams avoid rework and validate later that the output matched the original intent, but also onboard new engineers.

Routing across the Claude model family

CodeRabbit matches each model tier to task complexity to optimize for cost and latency. Opus drives the orchestration loop and the higher-level strategic work of understanding the problem and setting overall direction. Sonnet takes that output and sequences it into structured planning steps. Haiku handles narrowly scoped operations like context distillation and targeted tool use, where the question is specific enough that a smaller model can answer it well.

"If Haiku does as well as Sonnet on a given task, we use Haiku," Loker says. "If the evaluation harness tells us the plan quality improves when we give Opus more room, we give it more room. We don't guess."

Building an eval harness for plan quality

CodeRabbit had a mature evaluation system for code review, but nothing for evaluating planning output. Building that infrastructure became its own project.

The system started with hand-tuned examples and manual inspection. The team developed a library of LLM judges that scored specific dimensions of plan quality. Because plans eventually produce code, the team could also measure whether the generated code worked, whether it contained extra scope, and how many tokens it took to get there. Running the same task with and without the planning step gave them a way to isolate the value of planning itself.

"We didn't realize what the right level of detail was going to be for that plan," Loker says. Plans that were too granular went stale the moment the codebase shifted. Plans that were too high-level left room for the agent to fill in assumptions, which was the original problem the planning layer was meant to solve. Finding the working level of abstraction took iteration, which is what the eval harness made possible.

Catching errors before any code gets written

In an AI-native coding workflow, many of the decisions that used to surface during code review are now made earlier, in the planning layer. Building a plan that the team can review and align on before code generation starts catches mistakes early.

"What we've built, using the Claude ecosystem, is a team-wide planning system," Loker says. "The plan itself becomes a quality gate. If we can make sure the quality of that plan is really good upfront, the downstream effect is very pronounced. You end up with a lot better code at the end of it."

Build your startup on the Claude Platform.

この記事をシェア

関連記事

TLDR AI★42026年6月19日 09:00

OpenAI、次週に GPT-5.6 モデルの公開を準備(2 分読了)

OpenAI は来週、GPT-5.6 のミニ版とプロ版を含む新モデルを発表する予定である。同社は 150 万トークンのコンテキストウィンドウ拡大やコーディング機能の強化、Codex の応答速度向上を主な改善点としており、米国規制の影響で Claude Fable 5 の提供が制限される Anthropic を価格面で下回る戦略を掲げている。

TLDR AI★32026年6月19日 09:00

リプレイバッファを用いた難問の再検討(8 分読了)

研究者がリプレイバッファという手法を再評価し、AI モデルの学習効率や複雑な問題解決能力を向上させる可能性について議論している。

MarkTechPost★42026年6月18日 11:28

OpenAI、専門家が作成した評価基準を用いた750タスクのライフサイエンス研究ベンチマーク「LifeSciBench」を公開

OpenAIは、生物学者が不確実な証拠に基づいて判断する現実の研究プロセスを模擬するため、専門家による評価基準付きで750件のタスクを含む新ベンチマーク「LifeSciBench」を発表した。

今日のまとめ

AI日報で今日の重要ニュースをまとめ読み

ニュース一覧に戻る元記事を読む