docs: add AGENTS.md and gitignore AI agent local files

Add AGENTS.md as a cross-tool standard for AI coding agents with
pointers to in-tree docs, build verification commands, safety-critical
directory table, coding rules, and an agent decision framework.

Update docs/en/contribute/code.md with coding conventions enforced
during review (return early, no get/is prefixes, default member init,
no std:: in embedded code, no dynamic alloc after init).

Update docs/en/simulation/index.md with a "Choosing a Simulator"
section explaining when to use SIH vs Gazebo.

Gitignore tool-specific AI agent configs and local state for Claude
Code, Cursor, Windsurf, Aider, Cline, Continue.dev, Codex CLI,
Amazon Q, Augment, Cody, Junie, Tabnine, and Gemini.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche
2026-02-18 19:14:27 -08:00
parent 64e996b475
commit 9b552800ad
4 changed files with 107 additions and 0 deletions
+14
View File
@@ -86,6 +86,20 @@ private:
};
```
## Coding Conventions
The following conventions are enforced during code review:
- **Return early** to reduce nesting depth.
- **No `get`/`is` prefixes** on boolean methods: prefer `enabled()` over `isEnabled()`.
- **Default member initialization** in class headers, not constructors (e.g. `float _value{0.f};`).
- **Avoid `goto`.**
- **Prefer `++i`** over `i++`.
- **No `std::` containers or algorithms** in embedded (NuttX) code.
- **No dynamic memory allocation after init.**
Formatting source of truth: `Tools/astyle/astylerc`. Run `make format` to fix formatting project-wide, or `Tools/astyle/fix_code_style.sh <file>` for a single file.
## In-Source Documentation
PX4 developers are encouraged to create appropriate in-source documentation.