Utilities
Search the installed toolkit and the owning domain module before writing another helper.
Reuse
Why
A second deduplication helper creates a second set of edge cases to maintain. Domain-specific naming belongs around domain behavior, not around a replacement for an existing library operation.
Rules
MUST inspect massaman's installed exports before authoring generic collection, text, math, control, or matching utilities.[review]
MUST look for a domain-owned capability before adding a local helper for the same job.[review]
MUST import named functions from the smallest suitable library subpath.[review]
MUST avoid namespace imports of an entire utility library and avoid reimplementing supported operations.[review]
MAY use native non-mutatingmap,filter,find,some,every,reduce, andflatMapfor straightforward transforms.[review]
SHOULD prefer the toolkit's grouping, deduplication, and sorting functions to custom reductions.[review]
MUST obtain installation approval even when these docs recommend massaman or another library.[review]
[review]
Typechecks and behavioral tests establish supported pipeline contracts. Review checks reuse, named stages, resource concurrency, and dependency authorization.
Composition and async work
Why
Stages reveal where data changes shape. A collection of file reads or source fetches also needs a stated concurrency limit so work does not grow without bounds.
Rules
MUST use massaman'sfloworflowAsyncfor data transformations with at least three stages.[review]
SHOULD express an appropriate boundary-pipeline effect withtap.[review]
MUST give asynchronous collection helpers an explicit concurrency bound for external I/O.[review]
MUST avoid unbounded external work launched withPromise.all(items.map(...)).[review]
MAY replace a library helper on a measured hot path after documenting the measurement and obtaining approval.[review]
[review]
Typechecks and behavioral tests establish supported pipeline contracts. Review checks reuse, named stages, resource concurrency, and dependency authorization.
Enforcement
Typechecks and behavioral tests establish supported pipeline contracts. Review checks reuse, named stages, resource concurrency, and dependency authorization.