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