Relationships
#3265 Add swamp behaviour run as the preferred model-method command
Opened by stack72 · 10/11/2026· Shipped 10/12/2026
Summary
Make swamp behaviour run the preferred agent and user CLI for directly invoking a model method, while preserving the entire swamp model command group for backward compatibility.
Desired CLI
# Preferred
swamp behaviour run <model> <method>
swamp behaviour run @<type> <method> <definition>
# Existing syntax remains supported
swamp model method run <model> <method>
swamp model @<type> method run <method> <definition>behaviour is deliberately the requested British-English spelling.
Design
This is not a literal CLI alias. Aliasing model would yield swamp behaviour method run and would expose unrelated operations such as behaviour create. Instead, add a first-class top-level behaviour group with a single run command that delegates to the same model-method run application path.
Factor the current run command construction into a reusable factory/configurer and create independent run command instances for model method run and behaviour run. Do not attach one Cliffy Command instance to both paths: Cliffy reparents shared command instances.
Compatibility boundary
behaviour is an agent-facing presentation term for a model method invocation. It is not a new domain primitive. Keep all internal and persisted contracts unchanged, including:
- libswamp model-method run use case
- serve protocol and audit action
model.method.run - model locks, run tracking, data ownership, logs, and existing
modelterminology
Delivery details
- Register the new command in the root command tree so
swamp help behaviour run, structured CLI schema, and shell completion discover it. - Give
behaviour runthe same arguments, flags, local/remote behavior, JSON/log output, and direct-type semantics as the existing leaf command. - Preserve the legacy direct-type argument rewrite only for
swamp model @type method run ...; the new syntax needs no rewrite. - Add telemetry argument classification for
behaviour run. - Update preferred agent-facing guidance and executable examples (bundled Swamp/getting-started/issue-lifecycle skills, repo-generated agent guidance, and command suggestions). Retain legacy syntax in compatibility documentation where useful.
Acceptance criteria
swamp behaviour run <model> <method>has the same observable outcome asswamp model method run <model> <method>.swamp behaviour run @<type> <method> <definition>works locally and through--server.- All existing
modelcommands and both legacy run syntaxes remain unchanged. swamp help behaviour runreturns the complete schema and generated completions include the command.- Unit coverage verifies schema, argument/option parity, local and remote delegation, direct-type execution, telemetry redaction, and legacy compatibility. Add compiled-binary acceptance coverage in
swamp-uat.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.