docs(agents): add cpp-code-review skill
Add a code review skill with reference files for memory safety, concurrency, correctness idioms, false positives, cppreference lookup, and report format. Move the coding conventions from AGENTS.md into the skill's project-style reference so reviews enforce them. Co-authored-by: Qwen 3.8 27B <qwen3.8_27b-q3_k_xl@lmstudio.local>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# Project Conventions
|
||||
|
||||
## Coding Conventions
|
||||
|
||||
- **Language:** C++23
|
||||
- **Primitive types:** use fixed-width type aliases (`u32`, `i64`, ...) instead
|
||||
of `std::uint32_t` etc.
|
||||
- **Trailing return type** for function signatures (e.g. `auto fn() -> void`)
|
||||
- **4-space indentation**
|
||||
- **No semicolons after closing braces** for namespaces/classes
|
||||
- `auto` for obvious types (e.g. `auto main(...) -> int`)
|
||||
- **East const** (e.g. `char const*` not `const char*`)
|
||||
- **Trailing return type** for all function definitions, including operators
|
||||
(e.g. `auto operator=(T&&) noexcept -> T&`)
|
||||
- **Public members first** in class declarations, private members at the bottom
|
||||
- **Private data members** start with `m_` (e.g. `m_state`)
|
||||
- `<>` includes only for system headers (std, OS, etc.)
|
||||
- `""` includes for third-party dependencies (e.g. `fmt`, `nlohmann/json`)
|
||||
- **Naming:** `snake_case` for variables, functions, and classes
|
||||
- **Naming:** `SCREAMING_SNAKE_CASE` only for macros and constants
|
||||
- **Header extensions:** C++ headers use `.hpp`, C headers use `.h`
|
||||
- Include order:
|
||||
1. C++ standard library headers (`<chrono>`, `<vector>`, etc.)
|
||||
2. _(blank line)_
|
||||
3. C standard library headers (`<stdlib.h>`, `<string.h>`, etc.)
|
||||
4. _(blank line)_
|
||||
5. OS-specific headers (Windows API, POSIX, etc.)
|
||||
6. _(blank line)_
|
||||
7. Third-party dependencies (`"fmt/core.h"`, etc.)
|
||||
8. _(blank line)_
|
||||
9. Local/project headers
|
||||
Reference in New Issue
Block a user