From 0a15e320f5a01f3aff203b789867ca4ef7872502 Mon Sep 17 00:00:00 2001 From: zk Date: Tue, 28 Apr 2026 20:15:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0hook=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .kiro/hooks/python-code-style-check.kiro.hook | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .kiro/hooks/python-code-style-check.kiro.hook diff --git a/.kiro/hooks/python-code-style-check.kiro.hook b/.kiro/hooks/python-code-style-check.kiro.hook new file mode 100644 index 0000000..f0acf4b --- /dev/null +++ b/.kiro/hooks/python-code-style-check.kiro.hook @@ -0,0 +1,16 @@ +{ + "enabled": true, + "name": "Python代码风格检查", + "description": "写 Python 代码前,提醒严格遵守 Python 端代码开发风格文档中的规范", + "version": "1", + "when": { + "type": "preToolUse", + "toolTypes": [ + "write" + ] + }, + "then": { + "type": "askAgent", + "prompt": "写 Python 代码前请严格遵守 offerpie_python_ai/.kiro/steering/代码开发风格文档.md 中的所有规范。特别注意:紧凑风格(链式调用尽量一行)、所有函数必须有类型注解、模块级 docstring 说明用途/依赖/使用表、异步规范(async/await)、AI 输出统一用 parse_llm_json 解析。" + } +} \ No newline at end of file