Skip to content

Proposal 0014: handler-level argument introspection#14

Open
jimsynz wants to merge 1 commit into
mainfrom
proposal-0014-handler-argument-introspection
Open

Proposal 0014: handler-level argument introspection#14
jimsynz wants to merge 1 commit into
mainfrom
proposal-0014-handler-argument-introspection

Conversation

@jimsynz
Copy link
Copy Markdown
Contributor

@jimsynz jimsynz commented May 16, 2026

Optional c:BB.Command.arguments/0 callback so command handlers can advertise
their goal-map schema directly to the runtime, the LiveView dashboard, and any
other DSL-introspection-driven consumer.

DSL argument declarations on the consumer side remain authoritative — they
override or augment whatever the handler exposes — so existing robots stay
exactly as they are.

Why now

bb_examples/arm_commands ships three demo command handlers (Home,
MoveToPose, DemoCircle) for reuse across robots. Each consumer that
registers these handlers has to redeclare the same five-or-six argument
blocks per command in their own commands do block. The duplication
problem grows with each shared handler added.

Concrete examples are in the proposal body, plus discussion of merge
precedence, validation of the callback's return value, and a Won't Have section noting goal-map validation is a separate concern.

Renders cleanly, REUSE-compliant.

Optional `c:BB.Command.arguments/0` callback so command handlers can advertise
their goal-map schema directly. Consumers' DSL `argument` blocks remain
authoritative — they can override or augment what the handler exposes — so
existing robots are unaffected.

Motivated by the `bb_examples` work, where the same three demo command
handlers (Home, MoveToPose, DemoCircle) get registered in every consumer's
robot DSL, each one redeclaring the same six-or-so argument declarations.
With handler-level introspection the consumer just writes `handler …`,
allowed_states …` and the schema flows through.
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.

1 participant