Skip to content
PersonalDeterministic monthly allocator · per-date constraints · Python/React verification

Work Schedule Planner — Scheduling That Surfaces Its Constraints

Sole designer, implementer, and verifier

2026-07-01 — present

A local-first work planner that combines recognized load, actual work, leave, and daily/weekly caps into one deterministic allocation contract, exposing infeasible targets as explicit gaps instead of forced over-allocation. CI runs 62 pytest and 9 Playwright end-to-end tests. The public implementation is a synthetic preview and does not modify an official attendance system.

Performance Metrics

Infeasible state
Before: Risk of forced allocationAfter: Shortfall hours and reason shown
hard limits preserved
Date-change scope
Before: Risk of full-month overwriteAfter: fixed date + remainder redistribution
preview and redistribution boundary

Problem Solving

1

Forced allocation above remaining capacity would hide an infeasible plan

Solution Process

Apply daily/weekly caps and fixed plans first, compute allocatable time, then return the remaining gap as an explicit state

Result

Preserves hard limits while displaying insufficient_slots and the remaining gap

2

A date override could unexpectedly overwrite the whole monthly plan

Solution Process

Lock the selected date first, preview conflicts, then deterministically redistribute only the remainder

Result

Shows change scope and conflict boundaries in preview without external writes

System architecture

Work Schedule Planner — Scheduling That Surfaces Its Constraints architecture diagram

Synthetic scenarios

Deterministic fixtures reproduce the code paths and boundaries without operational or personal data.

Expose an infeasible target as a gap
Expose an infeasible target as a gapWhen a synthetic monthly target exceeds remaining daily and weekly capacity, the planner preserves those caps and returns insufficient_slots with the remaining gap.
Lock one date and redistribute only the remainder
Lock one date and redistribute only the remainderIn a synthetic fixture, a user-fixed plan is locked first, conflicts are checked in preview, and only the remaining dates are recalculated.

Operating limits

The public implementation is a synthetic preview and does not modify an official attendance system.
The public case uses synthetic fixtures and contains no real work records.

Project Description

The planner normalizes monthly targets and per-date constraints, applies fixed plans first, and selectively activates only the dates needed for the remaining allocation. When capacity is insufficient, it preserves hard limits and returns the remaining gap and status. The date-override UI previews conflicts and excess while calculating redistribution of the remaining dates; the public implementation stops at this synthetic-fixture preview boundary.

Highlights

  • One allocator contract for fixed-plan priority, selective minimum activation, and hard-limit preservation
  • Infeasibility exposed as a remaining gap and reason
  • Date-override preview and redistribution calculation for remaining dates
  • Synthetic scenarios, public-boundary scan, and Python/Playwright CI

Tech Decisions

  • ▶Restored the existing _minimum_activation flow so minimum work remains a selective activation floor rather than a mandatory seed
  • ▶Kept the decision surface reproducible through URL/local state without adding external-system integration

Lessons Learned

  • •A planner must model infeasibility before optimizing, or it will distort reality.
  • •User overrides remain predictable when the fixed scope is separated from redistribution of the remainder.

Tech Stack

PythonReactTypeScriptFastAPIPlaywrightProperty TestingGitHub Actions