記事一覧へ
ハーネスがすべて:Cursor、Claude Code、Perplexity が実際に構築したもの
あなたが AI をうまく使えていないのは、適切なモデルを見つけていないからではありません。適切な環境を構築していないからです。
一部のチームがエージェントの書いたコードで何百万行も出荷している一方、別のチームが3ステップの命令に従うチャットボットを作るのに苦労している理由があります。その差はモデルではありません。それを取り囲むものの差です。
モデルはほぼ関係ありません。ハーネスがすべてです。
ハーネスとは、言語モデルが動作する完全に設計された環境を指します。呼び出せるツール、受け取る情報のフォーマット、履歴の圧縮と管理方法、エラーが連鎖する前にキャッチするガードレール、そして将来の自分に作業を引き渡しながら一貫性を失わないためのスキャフォールドを含む、すべてです。
## 研究から得られたエビデンス
プリンストン大学の SWE-agent 論文は、同じモデルがインターフェース設計によって劇的に異なる結果を出すことを実証しました。GPT-4 を標準的な bash シェルで使用した場合は問題の 3.97% を解決しましたが、同じモデルを専用の Agent-Computer Interface(ACI)と組み合わせた場合は 12.47% を解決しました——環境の変更だけで相対的に 64% 向上しました。
## 4つの ACI コンポーネント
**検索とナビゲーション**:検索結果を50件に上限設定することで、コンテキストの氾濫を防ぎ、エージェントを広範なクエリより特定性の高いものへ誘導します。
**ファイルビューア**:明示的な行番号と状態に基づいた位置情報を持つ100行表示により、数えたり計算したりするタスクを省いて認知負荷を下げます。
**リンティング付きファイルエディタ**:即時の構文検証により、問題が発生した瞬間にキャッチしてエラーの連鎖を防ぎます。
**コンテキスト管理**:5ターン以上前のやり取りをサマリーに折りたたむことで、限られたコンテキストリソースを管理しながら関連情報を保持します。
## Anthropic のマルチセッションアーキテクチャ
Anthropic は、ほとんどの実際のプロジェクトが単一のコンテキストウィンドウの容量を超えるという課題に対処するために、2エージェントシステムを開発しました。
初期化エージェントは3つの重要なアウトプットを作成します:
1. 開発環境を確立するスタートアップスクリプト
2. パス・フェイル状態ですべての要件を記録した包括的な機能リスト(JSONに格納)
3. 完了した作業とセッション状態を追跡する進捗ファイル
続くコーディングエージェントは機能を1つずつ処理し、git コミットと進捗更新でクリーンな状態を維持します。
機能リストは、エージェントがプロジェクトの完了状況を誤って推測するのを防ぎます。各機能には `passes` フィールドがあり、true か false のどちらかです。エージェントは機能が end-to-end で動作することを確認してからこのフィールドを更新するか、しないかです。曖昧さはありません。
## OpenAI の Codex 実装
5ヶ月間で、OpenAI のチームはエージェントが生成したコントリビューションのみで約100万行のコードを構築しました。最初は3名のエンジニアが1日あたり平均3.5件のプルリクエストを出していました。
主要なアーキテクチャ上の決定:
- **リポジトリ中心のドキュメント**:外部ドキュメントではなくリポジトリを信頼の源泉として扱い、モノリシックな命令ファイルの代わりにプログレッシブな開示を採用
- **アプリケーションの可読性**:git worktree ごとにアプリを起動可能にし、ブラウザ自動化と完全な可観測性スタック(ログ、メトリクス、トレース)をエージェントワークフローに直接組み込む
- **アーキテクチャの強制**:コードレビューではなくカスタムリンターと構造テストによってインバリアントを機械的に強制する
- **高スループットプロセス**:最小限のブロッキングマージゲートで運用し、テストのフレーキーさはブロッカーではなく追加実行で解決する
## 繰り返されるデザインパターン
**プログレッシブディスクロージャー**:エントリーポイントでは最小限の情報を提供し、深いコンテキストへのポインタを示す。認知の原則:プロンプトの冒頭で提示される情報は不均衡に大きな影響を持つ。
**分離の原則**:git worktree ごとに1エージェントを置くことで、並列エージェントの競合を防ぎながら、マージ前の分離した検証を可能にする。
**リポジトリエンコードされた知識**:すべての仕様、要件、制約は外部ドキュメントやチームの会話ではなく、機械可読なリポジトリファイルに存在しなければならない。
**機械的な制約強制**:アーキテクチャの整合性はコードレビューではなくリンターとテストに依存することで、高スループット開発を実現する。
**タイトなフィードバックループ**:編集時点でのエラーキャッチは、後のセッションで外部から発見されるエラーより劇的に優れている。
## パフォーマンスが低いシステムの診断フレームワーク
より良いモデルや長いプロンプトを求める代わりに、ハーネスエンジニアリングでは環境監査を推奨します:
- エージェントが何の情報にアクセスできていないか?
- どこで定期的にミスが起きているか、そして何のフィードバックがそれを防ぐか?
- 無関係なコンテキストはどこで推論を劣化させているか?
- どの制約が現在、機械的な強制ではなくエージェントの判断に依存しているか?
各質問は具体的なハーネス改善を特定します:欠けているツール、不十分なフィードバックメカニズム、コンテキスト管理戦略、制約強制システム。
## 最小限の有効ハーネス
基本的な実装に必要なコンポーネント:
1. セッションごとに読み書きされる永続的な進捗ファイル
2. 列挙され検証可能な完了基準を持つ構造化タスクリスト
3. 記述的なコミットを標準とするバージョン管理
4. ウェブアプリケーション向けのブラウザ自動化(ランタイムのみのバグを表面化するため)
## 戦略的な示唆
AI 駆動開発における長期的な競争優位は、モデルの選択ではなくハーネスのアーキテクチャにあります。モデルは考えるものです。ハーネスは、何について考えるかを扱うものです。
これはプラットフォームレイヤー(ウェブのための検索エンジン、モバイルのためのアプリストア)が根本的な能力の商品化にもかかわらず永続的な価値を獲得した歴史的なテクノロジーの転換と並行しています。

claude-workflowai-thinkingagent-ops
ハーネスこそがすべて:AIツールの本質
♥ 1,990↻ 272🔖 7,289👁 986,382
原文を表示 / Show original
The Harness Is Everything: What Cursor, Claude Code, and Perplexity Actually Built
You are not using AI wrong because you haven't found the right model. You are using AI wrong because you haven't built the right environment.
There is a reason some teams are shipping a million lines of agent-written code while others struggle to get a chatbot to follow a three-step instruction. The difference is not the model. The difference is what surrounds it.
The model is almost irrelevant. The harness is everything.
A harness represents the complete designed environment inside which a language model operates, including the tools it can call, the format of information it receives, how its history is compressed and managed, the guardrails that catch its mistakes before they cascade, and the scaffolding that allows it to hand off work to its future self without losing coherence.
Evidence from Research
The SWE-agent paper from Princeton demonstrated that identical models produced dramatically different results based on interface design. Using GPT-4 with a standard bash shell resolved 3.97% of issues, while the same model with a purpose-built Agent-Computer Interface (ACI) resolved 12.47% — a 64% relative improvement from environmental changes alone.
Four ACI Components
Search and Navigation: Capping search results at 50 matches prevents context flooding by forcing agents toward specificity rather than broad queries.
File Viewer: Displaying 100 lines with explicit line numbers and stateful positioning reduces cognitive load by eliminating counting and arithmetic tasks.
File Editor with Linting: Immediate syntax validation prevents cascading errors by catching problems at the moment of introduction.
Context Management: Collapsing observations older than five turns into summaries preserves relevant information while managing scarce context resources.
Anthropic's Multi-Session Architecture
Anthropic developed a two-agent system addressing the challenge that most real projects exceed single context window capacity.
An initializer agent creates three critical outputs:
1. A startup script establishing the development environment
2. A comprehensive feature list (stored as JSON) documenting all requirements with pass/fail status
3. A progress file tracking completed work and session state
Subsequent coding agents work one feature at a time, maintaining clean state through git commits and progress updates.
The feature list prevents agents from inferring project completeness incorrectly. Each feature has a passes field that is either true or false. An agent either updates this field after verifying a feature works end-to-end, or it does not. There is no ambiguity.
OpenAI's Codex Implementation
Over five months, OpenAI's team built approximately one million lines of code entirely through agent-generated contributions, with three engineers initially averaging 3.5 pull requests daily per engineer.
Key architectural decisions included:
- Repository-centric documentation: Treating the repository as the source of truth rather than external documents, with progressive disclosure replacing monolithic instruction files
- Application legibility: Making applications bootable per git worktree and wiring browser automation and full observability stacks (logs, metrics, traces) directly into agent workflows
- Architectural enforcement: Using custom linters and structural tests to enforce invariants mechanically rather than through code review
- High-throughput processes: Operating with minimal blocking merge gates, treating test flakes as solvable through follow-up runs rather than indefinite blockers
Repeating Design Patterns
Progressive disclosure: Provide minimum necessary information at entry points, with pointers to deeper context. The cognitive principle: information presented at the beginning of a prompt has disproportionate influence.
Isolation principle: One agent per git worktree prevents parallel agents from conflicting while allowing isolated validation before merging.
Repository-encoded knowledge: All specifications, requirements, and constraints must live in machine-readable repository files, not external documentation or team conversations.
Mechanical constraint enforcement: Architectural integrity relies on linters and tests rather than code review, enabling high-throughput development.
Tight feedback loops: Errors caught immediately at edit time dramatically outperform errors discovered externally in later sessions.
Diagnostic Framework for Underperforming Systems
Rather than seeking better models or longer prompts, harness engineering recommends an environment audit:
- What information does the agent lack access to?
- Where do mistakes regularly occur, and what feedback would prevent them?
- How does irrelevant context degrade reasoning?
- Which constraints currently depend on agent judgment rather than mechanical enforcement?
Each question identifies specific harness improvements: missing tools, insufficient feedback mechanisms, context management strategies, or constraint enforcement systems.
Minimal Effective Harness
For basic implementations, essential components include:
1. A persistent progress file read and written every session
2. A structured task list with enumerated, verifiable completion criteria
3. Version control with descriptive commits as standard practice
4. Browser automation for web applications (to surface runtime-only bugs)
Strategic Implications
Long-term competitive advantage in AI-driven development lies not in model selection but in harness architecture. The model is what thinks. The harness is what thinks about.
This parallels historical technology transitions where platform layers (search engines for the web, app stores for mobile) captured durable value despite underlying capability commoditization.