Skip to content

Add multi-language Docker execution environment with planning-phase selection#109

Merged
notfolder merged 6 commits intomainfrom
copilot/update-docker-environment-setup
Nov 29, 2025
Merged

Add multi-language Docker execution environment with planning-phase selection#109
notfolder merged 6 commits intomainfrom
copilot/update-docker-environment-setup

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 29, 2025

  • リポジトリ構造と既存仕様の理解
  • 複数言語環境の詳細設計書(MULTI_LANGUAGE_ENVIRONMENT_SPECIFICATION.md)を作成
  • レビューフィードバック対応:
    • Dockerfileの削除(仕様書/設計書のみ)
    • system_prompt_command_executor.txt を元に戻す
    • docker-compose.yml を元に戻す
    • 環境選択を計画プロンプトに統合(別フェーズではなく)
    • 計画応答に選択環境が含まれるように変更
    • 設定を簡素化(イメージ名のみ)
    • 不要なセクション削除(運用ガイドライン、今後の拡張等)
    • 環境選択判断基準セクション削除
    • docker pull試行の記述削除
  • COMMAND_EXECUTOR_MCP_SPECIFICATION.mdの更新(参照追加のみ)
Original prompt

This section details on the original issue you should resolve

<issue_title>計画時に必要な言語環境を用意したイメージを選択して実行環境を起動する仕組み</issue_title>
<issue_description>pyhon、miniforge、node、java、goの各種言語用のイメージを使って計画時に環境選択出来る仕組みを考えて。
各言語用のそれぞれdockerファイルを作って、docker composeでダミープロファイルを指定してビルドだけしておき、そのdocker imageを実行計画時にllmにプロンプトとして環境のリストを渡して選択させ、環境を作るようにしたい。
現在の仕様はCOMMAND_EXECUTOR_MCP_SPECIFICATION.mdだが、これを変更したい。
変更用の詳細設計を別途生成するとともに、元の仕様を書き換えて欲しい

  • 現在はdocker起動後にgitコマンドを入れているが、あらかじめ各言語用イメージにgitとcommand executor mcpをインストールしておくようにし、すぐに起動出来るようにしたい
  • 現在はtask作成時にdocker コンテナを作成しているが、計画作成後にdockerイメージを選択してdockerコンテナを起動するようにしたい
  • command executor mcp用のシステムプロンプトに、実際に使う前に各言語のライブラリ導入(pythonなら必要なライブラリをpipで入れるなど)が必要である旨を追記

上記の様な仕様を日本語で詳細設計してください。設計はプログラムを書くのではなく、日本語で詳細を記述してください。
markdown形式で仕様を出力して。実装スケジュールは必要ありません。
</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 29, 2025 15:21
Co-authored-by: notfolder <20558197+notfolder@users.noreply.github.com>
… terminology

Co-authored-by: notfolder <20558197+notfolder@users.noreply.github.com>
Copilot AI changed the title [WIP] Update environment setup for various programming languages Add multi-language Docker execution environment with planning-phase selection Nov 29, 2025
Copilot AI requested a review from notfolder November 29, 2025 15:24
@notfolder
Copy link
Copy Markdown
Owner

今回は仕様書と設計書のみ作成するのでdockerファイルは削除してください

Copy link
Copy Markdown
Owner

@notfolder notfolder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot
レビューに従って修正して。
計画応答から環境情報を得て環境を用意するように見直して

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このファイルは変更しないでください

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

変更を取り消しました。コミット: 18735b9


#### 3.1.1 ベース構成

- ベースOS: Debian系またはAlpine(言語に応じて最適なものを選択)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ベースはOSではなく言語標準のイメージを選択

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

各言語ともに言語標準イメージをベースとして指定しました(例: python:3.11-slim-bookworm, node:20-slim, golang:1.22-bookworm等)。コミット: 18735b9

PC->>PC: 実行フェーズへ
```

### 6.2 環境選択プロンプト
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

計画作成プロンプトに環境選択情報を入れるようにしてください

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

計画プロンプトに環境リストと選択指示を含めるように変更しました。セクション6「計画プロンプトへの環境選択統合」を参照してください。コミット: 18735b9

participant EM as ExecutionEnvironmentManager

TH->>PC: タスク処理開始
PC->>LLM: 計画作成依頼
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

計画作成依頼に利用環境リストと環境選択プロンプトを入れてください

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

計画作成依頼に環境リストと選択プロンプトを含めるように変更しました。セクション6.2を参照してください。コミット: 18735b9


TH->>PC: タスク処理開始
PC->>LLM: 計画作成依頼
LLM-->>PC: 計画(JSON)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

計画に選択された環境が含まれるはずです

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

計画応答形式にselected_environmentフィールドを追加しました。セクション6.3を参照してください。コミット: 18735b9

environments:
python:
image: "coding-agent-executor-python:latest"
description: "Python 3.11 development environment with pip, pytest, black, flake8"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

各言語ともにイメージ名以外は不要では?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

設定を簡素化しました。環境名とイメージ名のマッピングのみになりました。セクション9.1を参照してください。コミット: 18735b9

指定されたイメージが存在しない場合:

1. エラーログを記録
2. `docker pull`を試行
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これは不要

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnvironmentInfoクラスを削除しました。環境名からイメージ名へのシンプルなマッピング(Dict[str, str])に変更しました。コミット: 18735b9

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker pullの試行は不要です。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker pullの試行を削除しました。イメージが存在しない場合はエラー終了するように変更しました。コミット: 2202cf0

docker compose --profile executor-build build --no-cache
```

### 12.2 監視項目
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この章は不要

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

運用ガイドライン章を削除しました。コミット: 18735b9


---

## 13. 今後の拡張
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この項目は不要

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

環境変数セクションを削除しました。コミット: 18735b9

- **環境キャッシュ**: 同一プロジェクトでの再利用時にイメージを再利用
- **環境プリウォーム**: よく使われる環境を事前に起動しておく

### 13.2 制限事項
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この章も不要

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今後の拡張章を削除しました。コミット: 18735b9

…tructure spec document to integrate environment selection into planning phase

Co-authored-by: notfolder <20558197+notfolder@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 29, 2025

今回は仕様書と設計書のみ作成するのでdockerファイルは削除してください

Dockerファイルを削除しました。仕様書と設計書のみ残しています。コミット: 18735b9

@copilot
レビューに従って修正して。
計画応答から環境情報を得て環境を用意するように見直して

仕様書を修正しました。環境選択は計画プロンプトに統合され、計画応答から選択環境を取得するフローに変更しました。コミット: 18735b9

Copy link
Copy Markdown
Owner

@notfolder notfolder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot レビューに従って修正して

- The task requirements
```

#### 6.2.2 環境選択の判断基準
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これは不要

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

セクション6.2.2(環境選択の判断基準)を削除しました。コミット: 2202cf0

| java | coding-agent-executor-java:latest | Java/Kotlin, Spring Boot |
| go | coding-agent-executor-go:latest | Go projects, CLI tools |

Select the environment based on:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これは不要

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

英語の選択基準テキストを削除しました。コミット: 2202cf0

指定されたイメージが存在しない場合:

1. エラーログを記録
2. `docker pull`を試行
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker pullの試行は不要です。

…ence per review feedback

Co-authored-by: notfolder <20558197+notfolder@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 29, 2025

@copilot レビューに従って修正して

レビューに従って修正しました。環境選択判断基準セクション、英語の選択基準テキスト、docker pull試行の記述を削除しました。コミット: 2202cf0

Copilot AI requested a review from notfolder November 29, 2025 16:54
@notfolder notfolder marked this pull request as ready for review November 29, 2025 16:57
@notfolder notfolder merged commit 6739078 into main Nov 29, 2025
@notfolder notfolder deleted the copilot/update-docker-environment-setup branch November 29, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

計画時に必要な言語環境を用意したイメージを選択して実行環境を起動する仕組み

2 participants