From ce550a127b7dc972651bd15b9f09979a2c38688f Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Wed, 12 Aug 2026 00:02:23 +0900 Subject: feat: harden Python workflow and structured planning Replace the uv-specific skill with a portable Python skill and rewrite the default user system prompt as a concise, structured Markdown execution policy. Normalize a single fenced structured-JSON response, retry invalid skill selection with think disabled, validate selected skill output, and make coding plans keep editing and verification in one task. Document the file_edit patch payload, expose that contract in the tool catalog, and convert malformed patch input into a retryable tool failure instead of terminating the agent task. Update configuration and runtime tests for the Python skill, exact tool catalog, structured-output retry, and implementation-and-verification planning guidance. Verified with 82 Agent.Core tests and an agent-mcp Python scheduling scenario with 49 passing unittest cases. --- skills/python/SKILL.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 skills/python/SKILL.md (limited to 'skills/python/SKILL.md') diff --git a/skills/python/SKILL.md b/skills/python/SKILL.md new file mode 100644 index 0000000..966a4fd --- /dev/null +++ b/skills/python/SKILL.md @@ -0,0 +1,30 @@ +--- +name: python +description: Pythonコードを作成・実行・検証する。計算、データ処理、自動化、CLI、試作、デバッグ、またはPython testを求められたときに使用する。 +--- + +# Python + +## Workflow + +1. 目的、入出力、作業directory、Python version、完了条件を確認する。 +2. 既存projectでは関連fileを先に読み、新規作成では標準ライブラリで満たせるか確認する。 +3. 複雑なコードは許可された作業directory内の`.py`へ保存する。`python -c`へ長いコードを埋め込まない。 + - 小さな修正で`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