The contracts package is the only thing others may import. Keep it to types, constants and
event names. Change it additively within a major version.
Put logic in shared/, keep screens thin. Sales’s live-update hook, CSV parser and formatting
are written once and used by the web and phone screens.
Server code follows controller → service → repository. The repository is the only place with
queries; the service holds the rules, including who may see what.
Workflows are deterministic.workers/workflows.ts imports only @antfabric/sdk-workflow and
activity types; database, notifications and events belong in activities.ts.
Everything the plugin does is declared in plugin.yaml. An undeclared event, notification,
workflow, permission or contract is refused.