From cc6165947a82d2182df8accbc7b4adfe2606db9e Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Sat, 12 Sep 2026 20:22:29 +0900 Subject: chore: GitHub Copilot向け開発指示と専用エージェントを追加 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit リポジトリ全体へ自動適用される.github/copilot-instructions.mdを追加し、仕様書と設計書を正本とする作業手順、変更範囲の確認、文書同期、利用者差分の保護、明示依頼なしのコミット禁止を定義する。 SD 1.x、Python 3.11、uv、CUDA 13.2、FP16、VAE必須、ローカルモデル、LoRA共通適用、固定ControlNet、単一GPUジョブ、限定サイズとschedulerなど、実装時に維持すべきシステム要件を常時コンテキストとして固定する。MCP公開面を小さく保ち、設定をTOMLへ集約する既存方針も明文化する。 server、tools、service、config、model_manager、pipeline_factoryの責務境界を定義し、設定やMCP schemaを変更する際に実装、validation、contract test、関連文書を一組として更新するよう指示する。 Python実装、pytest、文書と設定例に対するパス別instructionsを追加する。GPU不要テストの分離、設定enumと異常系、MCP非公開項目、pipeline constructor option、Service routingとエラーsanitizeなど、領域ごとの確認事項を固定する。 設計から実装、テスト、文書同期まで担当するsd15-maintainerカスタムエージェントを追加し、全ツール利用、手動選択、自動推論の両方を有効化する。Ruff format/check、Pyright、pytest、git diff/statusを完了ゲートとして必須化し、GPU smoke test未実施時は自動テストと区別して報告させる。 検証: ruff check、ruff format --check、pyright、pytest(39 passed)、git diff --checkを実行済み。data/配下は引き続きGit管理対象外。 --- .github/instructions/tests.instructions.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/instructions/tests.instructions.md (limited to '.github/instructions/tests.instructions.md') diff --git a/.github/instructions/tests.instructions.md b/.github/instructions/tests.instructions.md new file mode 100644 index 0000000..64985c3 --- /dev/null +++ b/.github/instructions/tests.instructions.md @@ -0,0 +1,17 @@ +--- +applyTo: "tests/**/*.py" +--- + +# Test instructions + +- テストフレームワークはpytestとpytest-asyncioを使用する。 +- GPU不要の自動テストを標準とし、Diffusers、モデル、CUDAは小さなfakeまたはmonkeypatchで分離する。 +- 設定変更では、有効値、既定値、省略、旧値、未知値、境界値を必要に応じて表形式のparameterized testで + 検証する。 +- MCP変更ではTool数、名前、required/optional、enum、公開してはいけないプロパティ、返却contentを + 検証する。 +- pipeline構築変更では選択される実装クラス、`from_config`へ渡す元config、追加optionを検証する。 +- Service変更では全routing、単一ジョブ直列化、既知エラー分類、内部エラーのsanitizeを検証する。 +- 一時ファイルにはpytestの`tmp_path`を使用し、`data/`へfixtureや生成物を追加しない。 +- 時刻、ネットワーク、実モデルの有無に依存する不安定なテストを通常のテストスイートへ入れない。 +- バグ修正では、修正前に失敗し修正後に成功する回帰テストを追加する。 -- cgit v1.2.3