Skip to content

docs: ship usage-rules.md for AI coding assistants (#61) - #62

Merged
jimsynz merged 1 commit into
mainfrom
usage-rules
Jul 21, 2026
Merged

docs: ship usage-rules.md for AI coding assistants (#61)#62
jimsynz merged 1 commit into
mainfrom
usage-rules

Conversation

@jimsynz

@jimsynz jimsynz commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Closes #61. Implements proposal 0007 for bb_pid_controller.

Adds a single usage-rules.md at the repo root, matching the house style set by bb core and the bb_ik_dls exemplar. It points at core's rules (mix usage_rules.sync <file> bb:all) for framework basics and covers only what is PID-specific:

  • Wiring {BB.PID.Controller, opts} into the controllers DSL block (verified against source).
  • Options table: gains (kp/ki/kd/tau), output clamps, the setpoint/measurement/output topic+message+path triples, and rate; plus runtime-tunable gains via param([...]).
  • Anti-patterns: the simulation: :omit default (declared controllers do not start under simulation unless set to :mock/:start); the unique-source / non-empty-path / numeric-output-field init validations; and that this controller does not implement disarm/1 and keeps ticking regardless of safety state.

Packaging:

  • Adds {:usage_rules, "~> 1.2", only: [:dev], runtime: false}.
  • Adds an explicit files: list (the package had none) so usage-rules.md ships in the hex tarball while preserving the previous default contents.
  • Adds test/usage_rules_test.exs mirroring the exemplar.

mix.lock changes are limited to the single usage_rules entry.

Add a satellite-specific usage-rules.md covering how BB.PID.Controller is
wired into the controllers DSL block, its options, and the PID-specific
gotchas (simulation :omit default, unique setpoint/measurement sources, and
that it does not disarm). Package it in the hex tarball and add a test.

Implements proposal 0007 for bb_pid_controller.
@jimsynz
jimsynz merged commit ffa879f into main Jul 21, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ship usage-rules.md in bb_pid_controller (proposal 0007)

1 participant