summaryrefslogtreecommitdiff
path: root/skills/python
diff options
context:
space:
mode:
Diffstat (limited to 'skills/python')
-rw-r--r--skills/python/SKILL.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/skills/python/SKILL.md b/skills/python/SKILL.md
index 966a4fd..867d74c 100644
--- a/skills/python/SKILL.md
+++ b/skills/python/SKILL.md
@@ -13,7 +13,7 @@ description: Pythonコードを作成・実行・検証する。計算、デーã
- 小さな修正で`file_edit`の`patch` operationを使う場合、`patch` fieldにはJSON文字列`{"old_text":"置換前","new_text":"置換後"}`を渡す。unified diffや`@@`形式を渡さない。置換前文字列はfile内で正確に1回だけ一致させる。
4. 承認済みのPython executableを直接`process_run`し、cwdとargsを分ける。shell、launcher、環境探索Toolを経由しない。
5. 通常のscriptは`-I <script>`で実行する。単一test scriptは`unittest.main()`を持たせて`-I <test-script>`で実行するか、`-I -m unittest discover -s <test-directory> -p <pattern> -v`で明示的に探索する。isolated modeでimport不能になるfile pathを`-m unittest`へ直接渡さない。
-6. test codeでも`subprocess`、`multiprocessing`、`os.system`を使用しない。CLIはentry functionへ引数とI/Oを渡し、同一process内で検証する。
+6. CLIや並列処理の仕様を検証する必要があれば、Python標準ライブラリの`subprocess`や`multiprocessing`を使用できる。生成したDescendant Processは同じSandbox Process Treeに留め、breakawayや権限拡張を試さない。
7. 正常系に加え、重要な境界条件と失敗条件を決定的なtestで確認する。
8. stdout、stderr、exit codeを確認し、exit code 0と期待結果の両方を満たした場合だけ成功と報告する。
@@ -26,5 +26,5 @@ description: Pythonコードを作成・実行・検証する。計算、デーã
## Safety and Reporting
- Python executableまたは作業directoryの権限が不足している場合は迂回しない。
-- descendant processを生成するコードや、依頼されていないfilesystem/network操作を追加しない。
+- 必要のないDescendant Processや、依頼されていないfilesystem/network操作を追加しない。
- 最終応答では作成・変更したfile、実行したtest、exit code、主要結果、未検証事項を簡潔に示す。