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

Flex — Constraint-Explicit Work Planner

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.

System Architecture

Flex — Constraint-Explicit Work Planner architecture diagram

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

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.

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

Performance Metrics

Performance MetricsBeforeAfter
Infeasible stateRisk of forced allocationinsufficient_slots + gap (hard limits preserved)
Date-change scopeRisk of full-month overwritefixed date + remainder redistribution (preview and redistribution boundary)

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