feat(level-core): constraint ADT and resolved-project types
The type foundation for the leveling engine.
The Constraint ADT is a kind-tagged discriminated union — the interchange
format between blocks (which emit constraints) and the search (which
consumes them); assertNeverConstraint forces exhaustive handling so a new
variant cannot be silently dropped.
WorkingCalendar is backed by a Uint8Array working-day bitmap plus an
Int32Array prefix sum, the shape that makes working-day counting O(1).
ResolvedProject owns a default calendar id and a Map of calendars, so
per-task and per-resource calendars are first-class, and ResolvedResource
carries capacityPerDay. ResolvedTask holds structure only; scheduling
state lives on ScheduledTask. Schedule (makespan plus an annotations map
for per-block scores and telemetry) is kept separate from Failure, so a
failed placement is a distinct value rather than a malformed schedule.
WorkUnit is the largest independent work package and is resolved into a
by-id registry on ResolvedProject, giving unit definitions a single owner.