実装計画
How PlanToCode enables confident adoption of AI coding agents through human-in-the-loop review, granular file-by-file plans, and clear handoff workflows.
Review and approve every plan before execution. File-by-file granularity keeps scope explicit and changes aligned with your requirements.
ヒューマンインザループガバナンス
PlanToCode keeps planning human-in-the-loop so you can review, edit, and decide when to hand off a plan for execution.
Plans are designed for a structured review workflow before any code modifications begin:
- レビュー:プランはMonacoエディタで開き、レビュアーは完全なシンタックスハイライトとプロフェッショナルな編集ツールですべての提案された変更を確認できます。
- 編集:You can directly modify steps, adjust approaches, add constraints, or remove risky operations using VS Code editing features.
- 変更をリクエスト:Generate alternative plans or merge drafts with custom instructions to converge on the approach you want.
- 承認:When you are ready, you can hand the plan off to a coding agent or developer for execution.
- Discard:If a draft isn't useful, you can delete it from the session list.
This workflow keeps execution aligned with the plan you reviewed and helps prevent surprise changes.
ファイル単位の詳細度
Implementation plans use a highly granular structure that breaks down development tasks on a file-by-file basis, with exact file paths corresponding to the project's repository structure. This granularity makes scope explicit before any code is touched.
プランの各ステップは、どのファイルが対象になるかを明示的に宣言します:
- 変更(特定の行範囲と変更内容の説明付き)
- 作成(完全なファイルパスと初期コンテンツ構造付き)
- 削除(正当性と依存関係分析付き)
- 参照(コンテキスト用だが変更なし)
Reviewers can immediately identify if critical legacy code will be modified, if breaking changes are proposed, or if the plan touches files that require additional scrutiny.
ファイル単位のアプローチは、承認されたプランをコーディングエージェントに正確に伝達することも可能にします。「認証システムを更新」のような曖昧な指示の代わりに、エージェントは正確な仕様を受け取ります:「src/auth/session_manager.rsの45-67行目を変更してトークンローテーションを追加、次の構造でsrc/auth/token_store.rsを作成...」
プランデータ構造
実装計画は、関連するメタデータと共に生のLLMレスポンスとして保存されます。レスポンステキストは生成されたまま正確に保存され、構造化されたメタデータはプランのコンテキストと使用状況を追跡します。
メタデータフィールド
- planTitle - プランの生成またはユーザー提供のタイトル
- summary - プランの人間が読める要約
- sessionName - プランを生成したセッションの名前
- isStructured - True for implementation_plan jobs; false for merge outputs
- isStreaming - 完了したプランではfalse(生成中はtrue)
- planData - agent_instructions(オプション)とsteps配列を含む
メタデータ例
{
"planTitle": "Authentication System Refactor",
"summary": "Implementation plan generated",
"sessionName": "my-project",
"isStructured": true,
"isStreaming": false,
"planData": {
"agent_instructions": null,
"steps": []
}
}実装計画の構造
ファイル単位の詳細度とメタデータを持つ実装計画のXML形式。
プランの由来
各プランは現在のセッションのバックグラウンドジョブに対応しています。パネルはプランデータを購読し、現在開いているプランを追跡し、以前のジョブと新しいジョブ間のナビゲーションを公開します。この動作はuseImplementationPlansLogicと周囲のパネルコンポーネント内にあります。
ImplementationPlanProcessorがプラン生成を処理します。関連ファイルを読み取り、オプションで選択されたルートディレクトリに基づいてディレクトリツリーを生成し、LLM用の統一プロンプトを組み立てます。
Plan responses are stored in the background_jobs table with metadata including planTitle, summary, sessionName, and token usage. The raw LLM response is preserved for review and debugging.
プランはリアルタイム進行状況イベントと共にLlmTaskRunnerを介してストリーミングされます。100kトークンを超えるプロンプトにはトークン警告がログに記録されますが、処理は完全なコンテンツで続行されます。
プラン生成パイプライン
ImplementationPlanProcessorは、ファイル内容のロード、コンテキストの構築、LLMタスクランナーを通じた結果のストリーミングによってプラン生成をオーケストレーションします。
Inputs: セッションコンテキスト、タスク説明、選択された関連ファイル、オプションのディレクトリツリー(include_project_structureフラグで設定可能)、外部調査用のWeb検索フラグ。
Prompt assembly: prompt_utils::build_unified_promptを使用して、タスクの説明、完全なファイル内容(切り捨てなし)、ディレクトリツリーを推定トークン数と共にモデル固有の形式に組み合わせます。
Output: 生のLLMレスポンスはJobResultData::Textとして保存されます。メタデータにはplanTitle、summary、トークン使用量、キャッシュ統計、実際のコストが含まれます。
Display: レスポンスは進行状況イベントを介してUIにストリーミングされます。プランはシンタックスハイライトとコピーアクションをサポートするMonacoベースのVirtualizedCodeViewerでレンダリングされます。
Monacoでプランをレビュー
プランコンテンツは、Monaco Editorをラップする共有VirtualizedCodeViewerを通じてレンダリングされます。ビューアは一般的な言語を自動検出し、クリップボードへのコピーアクションをサポートし、非常に大きなプランを仮想化し、文字数やシンタックス対応のハイライトなどのオプションメトリクスを提供します。
プランが開かれると、パネルはジョブ識別子でアクティブなプランを解決し、コンテンツをMonacoに渡し、レビュアーが現在開いているモーダルを失わずに隣接するジョブ間を移動できるようにします。
企業ガバナンスのためのコンテキストとメタデータ
パネルは、ファイル検出ワークフロー中に選択されたリポジトリルートを保存し、フォローアップアクションが同じスコープを再利用できるようにします。また、プロジェクトディレクトリや準備されたプロンプトコンテンツなどのプラン固有のメタデータも記録し、ワークフローを再計算せずにダウンストリームプロンプトを生成またはコピーできます。
トークン見積もりはプロンプトがコピーされる前に実行されます。パネルはプロジェクトディレクトリ、選択されたファイル、現在選択されているモデルでトークン見積もりコマンドを呼び出し、チームがモデル制限内に収まるようにシステムプロンプトとユーザープロンプトの両方の合計を表示します。
Plan metadata persists with each job so you can review which inputs were used (task description, selected roots/files, model settings) and compare drafts later.
複数のプランでの作業
Plans can be merged, deleted, or reopened later. The panel keeps a list of selected plan identifiers, manages a dedicated modal for terminal output tied to a plan, and exposes navigation helpers so reviewers can page through earlier plans without closing the viewer. Terminal access, prompt copy controls, and merge instructions all share the same job identifier so plan history stays consistent.
AIコーディングエージェントを安全に採用する準備はできましたか?
ヒューマンインザループ実装計画はPlanToCodeデスクトップアプリケーション内で利用できます。プラットフォーム用のビルドをダウンロードして、安全でガバナンスの効いたAI支援開発を体験しましょう。