Functions
Make required inputs, return values, and failure behavior visible at the call site.
Contracts
Why
Keyword-only parameters prevent two semantically different values from being swapped silently.
Rules
MUST usedeffor reusable named operations.[review]
MUST annotate public parameters and return values.[review]
MUST express predictable failure with a typed Result contract.[review]
MUST use keyword-only parameters for multi-field domain requests or a named immutable request value.[review]
MUST keep one responsibility per function.[review]
MUST avoid mutable default arguments.[review]
MAY use small lambdas as transform callbacks.[review]
MUST keep async functions at genuinely asynchronous boundaries.[review]
Example
[review]
Strict typechecks and configured lint establish signature contracts. Review checks responsibility and the need for async behavior.
Enforcement
Strict typechecks and configured lint establish signature contracts. Review checks responsibility and the need for async behavior.