From 2d277ec00b7135b6708f181ee2fe6701ace3eacf Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Fri, 25 Sep 2026 21:37:02 -0800 Subject: [PATCH] docs(agents): say where code shared between drivers goes (#28852) Agents put helpers used by several drivers of one type next to those drivers in src/drivers//, where the decoders they sit beside already live in src/lib/. Assisted-by: Claude:claude-opus-5-5 --- AGENTS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 3f32755ccd9..596ad09d74a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,3 +18,8 @@ simulation and Python tooling. - **Scoped guidance:** before editing or reviewing, read only the `.github/instructions/*.instructions.md` files whose `applyTo` patterns match the affected paths, plus any nested `AGENTS.md` along those paths. + +## Drivers + +- Code shared by several drivers of the same type (a protocol decoder, UART setup, a common filter) goes in `src/lib//`, e.g. `src/lib/rc/` for the RC drivers. +- `src/drivers//` (e.g. `src/drivers/rc/`, `src/drivers/distance_sensor/`) holds one directory per driver; do not put `.cpp`/`.h` files at that level.