Files
PX4-Autopilot/.github/instructions/parameters.instructions.md
T
Jacob Dahl 1ec22c2703 docs(agents): add parameter ownership and translation guidelines (#28937)
Moving logic between modules invites three mistakes, all made while
reworking the GNSS pipeline: the consumer keeps reading the moved
parameters, gets a duplicate parameter, or gets a hardcoded constant for
what was a separate, tunable concept. Translations also get written for
renames that never shipped in a release.

Assisted-by: Claude:claude-opus-5-5
2026-09-30 14:56:33 -06:00

1.1 KiB

applyTo
applyTo
src/**,ROMFS/**,boards/**

Parameter Guidelines

In addition to the core code review guidelines:

  • Each parameter has one owner: the module that owns the concept. Name and describe it by what that module does with it.
  • A module that needs another module's result consumes it on uORB instead of reading that module's thresholds and recomputing it. Shared vehicle configuration read by several modules (e.g. NAV_ACC_RAD) is existing practice; the rule targets coupling to another module's internal decisions.
  • No two parameters with the same meaning in different modules. Two concepts that shared one parameter are not duplicates: when logic moves between modules, split the parameter along the concepts, each named and described for its own role, rather than replacing one side with a hardcoded constant.
  • src/lib/parameters/param_translation.cpp is for parameters whose name or meaning differs from the last release. Renames and changes within the unreleased development window need no translation. When a released parameter splits into two, keep it and copy its value to the new one on import, so tuned setups keep both behaviours.