diff --git a/AGENTS.md b/AGENTS.md index bb98c7f..df63a22 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,15 @@ ## 设计约束 +"C:\Program Files\JetBrains\CLion 2026.1\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug --preset vs2022_debug +-S D:\ae\proj\Renderive -B D:\ae\proj\Renderive\cmake-build-vs2022_debug + +默认每次运行程序都通过CDB运行 D:\ae\ewdk\EWDK_22621_230929-1800\Program Files\Windows Kits\10\Debuggers\x64\cdb.exe + +D:\ae\tools 可能会有有用的工具 + +写函数 和模块使用下面的约定 [错误处理规范](./Error_handling_specification.md) +[命名约定](./Project_naming_conventions.md) 0. 跟你审计报告 就要大刀阔斧的改 一次性先把问题一次改完 在批量检查 要大步前进 1. 每个状态只能有一个权威来源,禁止在不同对象中重复保存并手工同步。 diff --git a/Project_naming_conventions.md b/Project_naming_conventions.md new file mode 100644 index 0000000..2dac19b --- /dev/null +++ b/Project_naming_conventions.md @@ -0,0 +1,58 @@ +# 项目命名规范 + +* 类型、结构体、枚举、Concept、类型别名:`Upper_Snake_Case` + +```cpp +Scene_Base +Frame_Request_Error +Renderable_Id +``` + +* 函数、参数、局部变量、常量:`lower_snake_case` + +```cpp +render_frame() +frame_count +default_capacity +``` + +* 成员变量:`lower_snake_case_` + +```cpp +scene_ +pending_exception_ +``` + +* 枚举值:`lower_snake_case` + +```cpp +enum class Frame_Request_Error { + none, + cancelled, + renderer_unavailable +}; +``` + +* 模板类型参数:`Upper_Snake_Case` + +```cpp +template +``` + +* 命名空间:`lower_snake_case` + +```cpp +namespace renderive::render_3d +``` + +* 文件名与主要类型一致:`Upper_Snake_Case` + +```text +Scene_Base.hpp +Gpu_Completion_Service.cpp +Low_Latency_Strategy.inl +``` + +* 内部实现统一使用 `detail` 命名空间。 + +**总规则:类型大写下划线,值和函数小写下划线,成员变量末尾加 `_`。** diff --git a/render_3D/AGENTS.md b/render_3D/AGENTS.md index 797c06b..5d9d45e 100644 --- a/render_3D/AGENTS.md +++ b/render_3D/AGENTS.md @@ -1,10 +1,2 @@ -"C:\Program Files\JetBrains\CLion 2026.1\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug --preset vs2022_debug --S D:\ae\proj\Renderive -B D:\ae\proj\Renderive\cmake-build-vs2022_debug - -默认每次运行程序都通过CDB运行 D:\ae\ewdk\EWDK_22621_230929-1800\Program Files\Windows Kits\10\Debuggers\x64\cdb.exe - -D:\ae\tools 可能会有有用的工具 - 运行前使用环境脚本 env.ps1 -[错误处理规范](../Error_handling_specification.md) \ No newline at end of file