The attributes are your own classes. Each behavior is written and tested once, and the engine wraps it around every method that carries the attribute. Your domain code never imports the framework.
Performance
Zero cost for code without behaviors.
Under a microsecond for code with them. Every value is rounded up from docs/performance.md, which has the exact figures and how to reproduce them.
overhead0for methods and properties that no behavior selects
per call< 1 µsfor a call through its middleware, even with three behaviors stacked
kernel boot< 0.2 msto boot the kernel on a request
to weave≈ 1 sa 2,000-file app at deploy time, with 4 workers
Separate the concerns. Not the code.
Install it, write one behavior, and keep the rest of your code about your domain.