From 1e7c9d9226b2868402a2e2d3c194aacc2c064d80 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 18 Aug 2026 10:09:34 +0200 Subject: [PATCH] Update AGENTS.md --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index 571f8203..72674e63 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -90,6 +90,7 @@ SnapRAID is designed to recover from an interruption, including `SIGKILL`, at an - **Naming**: Snake_case for functions, UPPER_CASE for macros/constants - **Indentation**: Tabs for indentation, no alignment (existing codebase style) - **Comments**: C-style `/** */` for multiline comments; C `/* first letter lowercase */` for single-line inline notes +- **Critical Comments**: Always add a comment at non-obvious critical points, especially around data-integrity invariants, crash recovery, fallback behavior, concurrency, and fatal versus best-effort error handling. Explain why the logic is required, not merely what the code does. - **Headers**: All `.h` files have include guards (`#ifndef __NAME_H`) - **Preferences**: Use 0 instead of NULL and '\0' - **Preferences**: Use prefix ++variable and --variable instead of postfix variable++ and variable-- where both are equivalent