NLDClient-yudde/.kiro/steering/nld-ai-rules.md

37 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
inclusion: always
---
# Kiro 专属补充规则
> 通用编码规范、git 操作规则、项目结构等已在 `AGENTS.md` 中定义Kiro 会自动读取。
> 行为协议的权威定义在 `.ai/protocols/` 目录。
> 本文件仅包含 Kiro 独有的补充说明,不重复 `AGENTS.md` 中已有的内容。
## 技能引用
- 技能定义位于 `.ai/skills/`(同步副本在 `.kiro/skills/`
- 执行 git 操作前必须读取 `batch-git-ops` 技能的 SKILL.md
## Kiro 专属Error Handling
- Implement error handling using try-catch blocks where appropriate, especially for file I/O and network operations
- Use DebugUtil class for logging and debugging
- Utilize Unity's profiler and frame debugger to identify and resolve performance issues
## Kiro 专属UI Prefab 信息获取
当需要了解 UI Prefab 的结构和组件信息时,按以下步骤操作:
1. 通过 Unity MCP 调用 `extract_ui_prefab` 工具:
```
execute_custom_tool: { tool_name: "extract_ui_prefab", parameters: { prefab_path: "Assets/xxx/xxx.prefab" } }
```
2. 读取返回的 `json_path` 对应的 JSON 文件
3. 参考 `ExtractedPrefabs/README.md` 理解 JSON 格式含义
4. 基于 JSON 内容分析 UI 层级结构、组件类型和属性
**重要**:每次都需要先调用工具生成 JSON避免读取旧数据
## Kiro 专属:编译约定
- 修改 GamePlay 中的 `.cs` 代码后,需通过 Unity 菜单 `Tools/文件与路径/转换为Dll`(快捷键 F1编译生成 DLL
- 编译前须确保 NLDClient 和 GamePlay 仓库都已更新到最新