[OCaml] High Intensity Training Online
refactor rename Plan to Workout_prescription, fold Workout into Logbook.Entry, split core into sub-libraries
Terminology: "Plan" was misleading — in HD1 a routine is a sequence of prescribed workouts (Workout A/B/C). Routine.Plan becomes a top-level Workout_prescription module, matching the *_prescription naming (Prescription, Set_group_prescription). Fold: the Workout module only bundled a prescription reference with start/end timestamps — which is exactly a logbook entry. Folded into Logbook.Entry; no Workout module remains. Mirrors the prior Pharo attempt (~/git/my-fitness-tracker: MFTWorkoutLog held prescription + start + finish). Rotation: switched from a completed-workout count to Routine.workout_after (find the last logged prescription, return the next in the cycle), per MFTRoutine>>workoutAfter: / MFTTrainee>>nextWorkoutPrescription. Dropped Routine.next_plan and Repository.completed_workouts. Sub-libraries: split lib/core into four dune libraries with enforced, acyclic dependencies, mirroring the earlier attempt's package tags (Base / Prescription / Logging): hito.core.vocabulary Units, Exercise, Set (leaf) hito.core.assessment Progression, Recovery -> vocabulary hito.core.prescription Prescription, Set_group_prescription, Workout_prescription, Routine -> vocabulary, assessment hito.core.logbook Set_group, Logbook -> the above Set lives in vocabulary (not logbook) because Progression consumes Set.Working.performance while Logbook consumes Progression — placing Set in logbook would cycle assessment against logbook. All four are (wrapped false) so modules keep their bare names across libraries; the Hito_core wrapper and its prefixes are gone. 62 tests green; opam lint clean.
Changed files
- bin/dune
- lib/app/dune
- lib/app/memory_repo.ml
- lib/app/repository.ml
- lib/app/repository.mli
- lib/app/service.ml
- lib/app/service.mli
- lib/core/assessment/dune
- lib/core/assessment/progression.ml
- lib/core/assessment/progression.mli
- lib/core/assessment/recovery.ml
- lib/core/assessment/recovery.mli
- lib/core/dune
- lib/core/exercise.ml
- lib/core/exercise.mli
- lib/core/logbook.ml
- lib/core/logbook.mli
- lib/core/logbook/dune
- lib/core/logbook/logbook.ml
- lib/core/logbook/logbook.mli
- lib/core/logbook/set_group.ml
- lib/core/logbook/set_group.mli
- lib/core/prescription.ml
- lib/core/prescription.mli
- lib/core/prescription/dune
- lib/core/prescription/prescription.ml
- lib/core/prescription/prescription.mli
- lib/core/prescription/routine.ml
- lib/core/prescription/routine.mli
- lib/core/prescription/set_group_prescription.ml
- lib/core/prescription/set_group_prescription.mli
- lib/core/prescription/workout_prescription.ml
- lib/core/prescription/workout_prescription.mli
- lib/core/progression.ml
- lib/core/progression.mli
- lib/core/recovery.ml
- lib/core/recovery.mli
- lib/core/routine.ml
- lib/core/routine.mli
- lib/core/set.ml
- lib/core/set.mli
- lib/core/set_group.ml
- lib/core/set_group.mli
- lib/core/set_group_prescription.ml
- lib/core/set_group_prescription.mli
- lib/core/units.ml
- lib/core/units.mli
- lib/core/vocabulary/dune
- lib/core/vocabulary/exercise.ml
- lib/core/vocabulary/exercise.mli
- lib/core/vocabulary/set.ml
- lib/core/vocabulary/set.mli
- lib/core/vocabulary/units.ml
- lib/core/vocabulary/units.mli
- lib/core/workout.ml
- lib/core/workout.mli
- lib/web/dune
- lib/web/pages.mli
- test/dune
- test/test_exercise.ml
- test/test_hito.ml
- test/test_logbook.ml
- test/test_prescription.ml
- test/test_progression.ml
- test/test_recovery.ml
- test/test_routine.ml
- test/test_set.ml
- test/test_set_group.ml
- test/test_set_group_prescription.ml
- test/test_units.ml
- test/test_workout.ml
- test/test_workout_prescription.ml