A functional toolkit for authoring resource-leveling algorithms — compose constraint and scoring blocks, enumerate feasible schedules

feat(level-core): O(1) working-day calendar arithmetic master

Working-day arithmetic over the bitmap calendar. countWorkingDays is an O(1) prefix-sum query (cumWorking[hi] - cumWorking[lo]) — the dominant operation in the scheduler. day-to-date conversion is DST-safe and round-trips exactly. resolveWorkingCalendar centralizes the per-task → project-default → first-available → throw fallback chain the schedulers share, and a null calendar yields a synthetic all-working calendar so a project with no calendars still resolves. Forward walks clamp at the horizon instead of running off the end of the bitmap.


+338
2 changed files