341 lines
33 KiB
Markdown
341 lines
33 KiB
Markdown
# Workout Tracker — Project Specification
|
||
|
||
**Status:** Handoff candidate v0.2 — planning baseline; implementation begins only when approved
|
||
|
||
**Project type:** Personal, offline-first training planner and tracker
|
||
|
||
**Implementation:** React, Vite, React-Bootstrap, vanilla CSS/SCSS as needed
|
||
|
||
**Backend:** None in initial version; IndexedDB local persistence behind a storage adapter
|
||
|
||
**Primary devices:** Debian laptop/desktop browser; responsive mobile browser
|
||
**Maintainer workflow:** Codex CLI + `roborto-project-context`, Git, isolated per-task branches/worktrees
|
||
|
||
## TASK-015 planning overlay — 2026-11-04
|
||
|
||
TASK-015 is scoped in `docs/TASKS.md`; implementation awaits Captain approval. The current app and the earlier sections below describe the timer-free, aggregate-EMOM baseline. This overlay records the latest requested changes without claiming they are implemented.
|
||
|
||
- Exercise definitions describe supported equipment and applicable measurements, independent of prescription targets and performed values. Use the complete assignment matrix in `WORKOUT_ROUTINE.md` section 8. No fixed vest weight belongs in definitions. Dumbbells used as push-up handles do not contribute lifted resistance.
|
||
- Reusable UI derives controls from repetitions, repetitions per side, duration, duration per side, distance when applicable, EMOM reps per minute and equipment-specific loads. Bodyweight-only work has no external-weight fields; supported external resistance accepts explicit zero. Dumbbells are entered per dumbbell; bars include the bar's weight.
|
||
- Log each set/minute with independent load components, explicit completion and partial state. New EMOM records support per-minute reps/load and derived totals; old aggregate records must never be split into invented minutes. Keep previous-session suggestions distinct from actuals and preserve next-set weight defaults.
|
||
- Show compact name/target/equipment/rest information and applicable logging, with expandable available instructions, muscles, technique and local media/placeholders. Reduce repeated visible labels while retaining accessible names; stack at mobile width without horizontal scrolling. Preserve date navigation, Morning/Afternoon switching and the wall clock.
|
||
- Afternoon holds may record actual seconds (per side where applicable) without repetitions, weights or prescribed hold times. Daily hang is bodyweight-only with an editable initial two-minute **continuous** target, optional attempts and independent longest/cumulative totals. Do not treat cumulative duration as continuous success.
|
||
- Preserve historical records and local edits independently of metadata changes. Version new record schemas and JSON serialization; review IndexedDB v2 for an additive migration only where needed. Test old total-only/component records, existing goal overrides and old/new JSON round trips. TASK-009 still owns backup UI and import conflict policy; none exists in the current app.
|
||
- Dog-walk classification is bodyweight-only; restoring walks to the UI/seed/logs is outside this task. No straight-bar exercise is added merely to support the equipment vocabulary.
|
||
- Captain resolved the timer question on 2026-11-04: keep the app timer-free. Preserve the local wall clock and prescribed rest/EMOM guidance; no timers or audio are added (ADR-018).
|
||
|
||
Full acceptance tests, dependencies, ownership boundaries, likely files and implementation gates are recorded under TASK-015. Earlier 6/10 kg prescriptions remain distinguishable from definitions and actuals; their optional future display must never determine equipment controls or prefill performance.
|
||
|
||
## 1. Purpose and success criteria
|
||
|
||
Build a small, maintainable, private workout application that replaces the weekly schedule document. It should make it easy to see today's session, understand correct exercise technique, record performance and change the programme without editing React source.
|
||
|
||
A successful first version enables the user to:
|
||
1. See the complete seven-day plan and today's prescribed sessions using a weekday strip and exclusive Morning/Afternoon switch.
|
||
2. Open each exercise's instructions, muscles involved, equipment, and image(s), with offline availability.
|
||
3. Complete and log morning strength sessions and afternoon isometric holds. Monday and Friday mornings are labeled Full body stretch routine; specific stretches will be provided later.
|
||
4. Record one total repetition count and actual exercise-specific load for each EMOM exercise, and reps and exercise-specific load for each regular set.
|
||
5. Edit routine parameters through the UI; retain dated performance history and progress views, including total external-load volume without a time-based rate.
|
||
6. Back up and restore their own data without cloud accounts, analytics or external services.
|
||
|
||
### Out of scope for v1
|
||
|
||
- Authentication, registration, user profiles for multiple people.
|
||
- Flask/API/server database, cloud sync, background jobs, sharing/social features.
|
||
- Meal tracking, calorie estimation, automated coaching or training advice.
|
||
- Wearables and Apple/Google Health integrations.
|
||
- Generated exercise technique images without review, third-party hotlinked images, advertising, analytics or tracking SDKs.
|
||
- Automatic progressive-overload recommendations (manual review first).
|
||
|
||
## 2. Principles and constraints
|
||
|
||
- **Offline-first:** After the app has been loaded/installed, the UI, descriptions and images should remain usable without network connectivity. For a true PWA/offline reload, use a service worker and cache the app assets; development server operation alone is not an offline guarantee.
|
||
- **Private by default:** No account and no network transmission of workout records. No telemetry, ad networks, third-party font CDNs or remote image loading.
|
||
- **Editable routine:** Store prescribed programme separately from UI code. Changes made in-app must survive updates; historical sessions must retain what was actually performed even when the plan later changes.
|
||
- **No premature backend:** Keep storage behind an adapter to permit optional sync later without redoing the UI.
|
||
- **Transparent progress:** Track prescribed versus actual reps, load and duration; avoid made-up estimates.
|
||
- **Accessibility:** Keyboard navigation, clear focus states, readable text, screen-reader labels, reduced-motion respect and adequate touch targets.
|
||
- **Safety:** Show exercise descriptions as guidance rather than diagnosis. Allow pain/discomfort notes; do not force floor movements that hurt the user's prominent spine. Make vest load explicit per exercise.
|
||
- **Scope discipline:** Do not invent pages, new exercises or functionality beyond this spec without an approved decision/task.
|
||
|
||
## 3. Information architecture
|
||
|
||
Use **one responsive application** with these surfaces:
|
||
|
||
| Surface | Primary functions |
|
||
|---|---|
|
||
| **Today** | Current calendar day selected automatically; seven-day navigation strip; **Morning/Afternoon exclusive toggle**; show only selected period, not both stacked; strength recording |
|
||
| **Week** | Seven-day horizontal navigation strip and date navigation; changing weekday preserves selected Morning/Afternoon period |
|
||
| **Exercise detail** | Images, setup, step-by-step movement, technique cues, main/secondary muscles, equipment, common mistakes, variations, personal notes |
|
||
| **History & Progress** | Browse completed sessions by date; actual sets/reps/weights/times and notes; personal bests and basic trends, including longest continuous hang |
|
||
| **Plan editor** | Edit exercises, order, sets, rep ranges, the daily hang goal, weight presets, rest and session assignment |
|
||
| **Settings & data** | Export/import backup, unit preferences (kg), storage explanation, offline status |
|
||
|
||
Navigation should remain simple (top tabs or bottom navigation on mobile). Avoid creating an account or dashboard-heavy UI. **The day/period selector is the primary workout navigation**, not a page showing both periods. Weekday browsing alone must never create or complete a workout record.
|
||
|
||
### 3.1 Session view behavior (approved)
|
||
|
||
- Use a seven-day horizontal weekday strip, current calendar day selected initially; the user can navigate other actual dates for past/future weeks.
|
||
- Place a **Morning | Afternoon** segmented switch above the weekday strip. Only one period is displayed at a time; changing day preserves the period. Remember the last selected period locally.
|
||
- Morning contains the strength workout on five days and the Full body stretch routine heading, without exercise entries, on Monday/Friday. Afternoon contains the five isometric holds and daily hanging practice, with day-specific targets.
|
||
- Each exercise presents prescription and recorded progress, with access to an exercise detail panel (local images, form description).
|
||
- Viewing a day or changing the Morning/Afternoon toggle does **not** automatically start or mark a session complete.
|
||
|
||
## 4. Current programme — initial seed data
|
||
|
||
The following is **initial editable programme data**, not a permanent hardcoded schedule. Day order and exercise order are significant. Unless specified otherwise, exercises are performed in the **morning** and isometric holds in the **afternoon**.
|
||
|
||
### 4.1 Weekly structure
|
||
|
||
| Day | Morning | Afternoon |
|
||
|---|---|---|
|
||
| Monday | Full body stretch routine | Moderate isometric holds (RPE 5–6) |
|
||
| Tuesday | Pull 1 — Back + Core | Easy isometric holds (RPE 3–4) |
|
||
| Wednesday | Push 1 — Chest + Serratus | Easy isometric holds (RPE 3–4) |
|
||
| Thursday | Legs + Posterior Chain + Core | Easy isometric holds (RPE 3–4) |
|
||
| Friday | Full body stretch routine | Challenging isometric holds (RPE 6–7) |
|
||
| Saturday | Pull 2 — Biceps + Grip + Abs | Easy isometric holds (RPE 3–4) |
|
||
| Sunday | Push 2 — Shoulders + Triceps + Core | Easy isometric holds (RPE 3–4) |
|
||
|
||
No individual stretches or durations are specified for the Monday/Friday routine until the owner provides them.
|
||
|
||
### 4.2 Tuesday — Pull 1
|
||
|
||
| Order | Exercise | Prescription | Rest | Notes |
|
||
|---|---|---|---|---|
|
||
| 1 | Pull-ups | 10-minute EMOM; aim 3–4 reps/min | Until next minute | **6 kg vest.** Start at 4/min and drop to 3 as needed; work toward 4 reps each minute for 10 minutes. Occasionally switch to traditional sets. |
|
||
| 2 | EZ-bar bent-over rows | 4 × 8–12 | 2–3 min | Controlled torso position. |
|
||
| 3 | Single-arm dumbbell rows | 3–4 × 8–15 per side | 2 min | Alternative to previously easy shrugs. |
|
||
| 4 | Suitcase carries | 3 × 30–60 seconds per side | 1–2 min | Walk with weight on one side; avoid leaning. |
|
||
|
||
### 4.3 Wednesday — Push 1
|
||
|
||
| Order | Exercise | Prescription | Rest | Notes |
|
||
|---|---|---|---|---|
|
||
| 1 | Deep weighted push-ups using dumbbells as handles | 4 × 6–12 | 2–3 min | **10 kg vest.** Stable dumbbell handles; controlled depth. |
|
||
| 2 | Dumbbell floor flys | 3–4 × 8–15 | 2 min | Heavier standalone flys. **Floor press removed** from previous fly/press combination. Cushion back or modify if pressure on spine is uncomfortable. |
|
||
| 3 | Push-up plus | 2–3 × 12–20 | 1–2 min | Initially unweighted; full controlled scapular protraction; placed before final push-up exercise. |
|
||
| 4 | Feet-elevated weighted push-ups | 3 × 8–15 | 2–3 min | **10 kg vest.** |
|
||
|
||
### 4.4 Thursday — Legs
|
||
|
||
| Order | Exercise | Prescription | Rest | Notes |
|
||
|---|---|---|---|---|
|
||
| 1 | Bulgarian split squats | 4 × 8–12 per leg | 2–3 min | **10 kg vest + dumbbells.** |
|
||
| 2 | Single-leg Romanian deadlifts | 3–4 × 8–12 per leg | 2–3 min | Posterior chain and erector stabilization; use dumbbells as appropriate. |
|
||
| 3 | Squats | 4 × 8–12 | 2–3 min | **10 kg vest + dumbbells.** |
|
||
| 4 | Single-leg calf raises | 4 × 10–20 per leg | 2 min | Vest load as tolerated. |
|
||
| 5 | Front plank | 3 × 30–60 seconds | 1–2 min | Replaces supine weighted crunch because floor pressure on spine is uncomfortable. |
|
||
|
||
### 4.5 Saturday — Pull 2
|
||
|
||
| Order | Exercise | Prescription | Rest | Notes |
|
||
|---|---|---|---|---|
|
||
| 1 | Chin-ups | 10-minute EMOM; aim 3–4 reps/min | Until next minute | **6 kg vest.** Occasionally switch to conventional sets. |
|
||
| 2 | Hanging knee raises | 3 × 6–12 | 1–2 min | Controlled pelvic curl; avoid swinging; doubles as grip work. |
|
||
| 3 | Finger hangs | 2–3 sets, duration tracked | 1–2 min | Reduced from 4 sets because hanging knee raises add grip volume. |
|
||
| 4 | Single-arm preacher curls over a chair | 3–4 × 8–12 per arm | 2 min | |
|
||
| 5 | Hammer curls | 3 × 10–15 | 2 min | Replaces wrist curls; **EZ curls removed** to reduce redundant biceps work. |
|
||
|
||
### 4.6 Sunday — Push 2
|
||
|
||
| Order | Exercise | Prescription | Rest | Notes |
|
||
|---|---|---|---|---|
|
||
| 1 | Standing single-arm dumbbell shoulder press | 4 × 8–12 per arm | 2–3 min | |
|
||
| 2 | Leaning single-arm lateral raises | 3–4 × 10–15 per arm | 2 min | Full rep + half rep technique. |
|
||
| 3 | Bent-over rear-delt flys | 3 × 12–20 | 2 min | |
|
||
| 4 | Lying dumbbell triceps extensions | 3–4 × 8–15 | 2 min | Existing bed-supported variation; substitute standing if back/spine is uncomfortable. |
|
||
| 5 | Single-arm triceps extensions | **Optional** 2–3 × 10–15 | 2 min | |
|
||
| 6 | Side-plank hip raises | 3 × 10–20 per side | 1–2 min | |
|
||
|
||
### 4.7 Daily isometric routine — afternoon
|
||
|
||
Each row is **one hold**, without a prescribed time. Start at one round; optionally progress to two rounds if recovery is good. Do not show duration targets. The persistent local time clock remains visible.
|
||
|
||
| Exercise | Side guidance |
|
||
|---|---|
|
||
| Deep squat hold | — |
|
||
| 90/90 hip hold | Per side |
|
||
| Bird-dog hold | Per side |
|
||
| Single-leg balance | Per leg |
|
||
| Prone swimmer isometric | — |
|
||
|
||
Target intensity (RPE): Monday **5–6**; Tuesday–Thursday **3–4**; Friday **6–7**; Saturday–Sunday **3–4**. Bird-dog repetitions were removed from Tuesday because these holds occur daily.
|
||
|
||
### 4.8 Daily hanging practice — afternoon
|
||
|
||
- Hang from the pull-up bar **every day**, during the afternoon isometric session.
|
||
- Goal starts at **120 seconds** and can be changed in the app; it is a target, not an assumed current ability or default completed duration.
|
||
- Current successful continuous duration, number of attempts, and whether the initial two-minute goal is presently cumulative **are not specified**; do not invent these. Vest use may be added later but is not shown in the current daily-hang UI.
|
||
- Allow logging multiple attempts separately, in seconds, with **longest continuous hang** and **total cumulative hang time** computed independently. A 120-second cumulative total is not equivalent to one continuous 120-second hang.
|
||
- Keep Saturday finger hangs as distinct morning exercises, independent of the daily afternoon hang.
|
||
- Watch for accumulated grip, finger, elbow and shoulder fatigue; exercise logging must not force completion.
|
||
|
||
### 4.9 Global strength-training rules
|
||
|
||
- Usually **2 min** rest between sets, **2–3 min** for demanding compounds, **~3 min** between different exercises.
|
||
- EMOM remains a prescribed ten-minute protocol with a new start each minute. Record total performed reps and actual external weight for the exercise.
|
||
- Increase load or exercise difficulty after consistently reaching the top of a rep range with clean technique.
|
||
- Allow recording actual load, reps and time even when they differ from the plan.
|
||
- Morning resistance training takes priority over optional higher-effort afternoon sessions.
|
||
|
||
## 5. Exercise library and media
|
||
|
||
Each exercise has a stable `exerciseId` and human-readable name, category, equipment, main/secondary muscles, setup, numbered technique steps, form cues, common mistakes, regressions/progressions, safety notes, and an ordered list of local images (e.g. `start.webp`, `end.webp`).
|
||
|
||
**Image rules:**
|
||
- The app must be usable before illustrations are available; use a clear labeled placeholder.
|
||
- Images can be commissioned/created or sourced only with suitable rights; track origin/license in metadata.
|
||
- Do not hotlink remotely or bundle copied copyrighted imagery without permission.
|
||
- Illustrations should match the *actual variant* (e.g., vested push-ups on stable dumbbell handles, floor flys, hanging knee raises) and be reviewed for technique accuracy.
|
||
- Provide descriptive alt text and potentially two stages (start/end) for moving exercises.
|
||
- Images are part of app assets and update through normal Git deployments; personal exercise notes are user data.
|
||
|
||
## 6. Interaction and session flow
|
||
|
||
1. Default to **Today**, selecting its actual date and the last-used Morning/Afternoon period; show only that period.
|
||
2. Allow navigating to any date/day, not just a repeating abstract weekday; records are tied to actual local dates.
|
||
3. Tap an exercise to open details. For EMOM exercises, enter the **total** actual reps and relevant load. For regular strength exercises, enter actual reps and relevant load separately for each set. Show vest, dumbbell, and EZ-bar fields only where the exercise calls for them; mixed vest/dumbbell work needs both. Adding a set copies the previous set's entered weights but not its reps. Never mark prescribed values as performed automatically.
|
||
4. End the session with a compact summary (recorded sets, deviations and free-text notes) when session summaries are implemented.
|
||
5. Partial records remain saved, and future plan edits do not rewrite previously logged performance.
|
||
6. Check off isometric exercises without requiring times; log daily hang attempts in seconds and surface personal best and progress toward the current editable hang goal when extended recording is implemented.
|
||
7. Show previous performance and basic progress views without confusing prescribed and achieved values; retain previous records after routine edits.
|
||
|
||
### Suitcase-carry load recording — TASK-014 correction
|
||
|
||
Suitcase carries retain their prescribed duration per side and accept actual dumbbell kilograms per set, without requiring repetitions or inventing performed duration. Record one dumbbell's weight, with independent set values and next-set load copying. Save dated weight-only rows as `kind: load-sets`; no repetitions or rep-load volume are implied. Broader duration/per-side performance remains TASK-015.
|
||
|
||
### Plank vest recording — TASK-014 correction
|
||
|
||
Front planks and side-plank hip raises accept vest kilograms per set with no dumbbell/bar inputs or assumed vest weight. Front planks use the existing weight-only set shape without repetition entry; side-plank hip raises retain reps-per-side guidance and reps/load set recording. Different sets may use different loads or zero. Existing bodyweight-only records stay readable as prior totals; changing them to component weights requires an explicit action. Broader actual-duration logging remains separate work.
|
||
|
||
### Clock and recording behavior
|
||
|
||
- Show the current local time in the persistent app header across all views. It is a time-of-day display and does not record workout duration.
|
||
- Do not show workout, exercise, rest, or EMOM timers or audio cues.
|
||
- Keep EMOM duration and rest guidance as prescriptions only. One saved EMOM entry has total actual reps and the applicable load components; regular strength work has one saved rep/load row per performed set. A paired-dumbbell field means kilograms per dumbbell. Preserve older single-total entries without interpreting them as components.
|
||
- Browsing dates does not create workout records. Saving a strength entry writes the selected date and exercise only.
|
||
|
||
## 7. Local data architecture
|
||
|
||
Use **IndexedDB** for persistent routines, exercise definitions if editable, logs, notes and settings. Keep bundled seed routine and base exercise descriptions/images in versioned JSON/JS assets. Use `localStorage` only for small UI preferences if desired.
|
||
|
||
**Implementation approach:** use native IndexedDB behind a tested async storage/repository adapter, or a lightweight dependency such as `idb` if approved during implementation. React components must not call IndexedDB directly. Use indexed, date-scoped queries rather than saving one monolithic app object. Transactions must preserve consistency across session and set writes. Ensure useful error handling for quota failures, blocked upgrades and unavailable/private browser storage.
|
||
|
||
IndexedDB is **per browser profile and origin**, not a server database; a laptop and phone have separate records. Avoid making persistence depend on running Vite. Serve the built application from a stable origin for reliable data retention; a bundled PWA/service worker can enable offline reloads, subject to browser restrictions.
|
||
|
||
### Suggested entities
|
||
|
||
| Entity | Essential fields |
|
||
|---|---|
|
||
| `ExerciseDefinition` | `id`, `name`, `category`, `equipment`, `muscles`, `instructions`, `cues`, `warnings`, `imageAssets`, `version` |
|
||
| `Routine` | `id`, `name`, `version`, `effectiveDate`, `weeklySchedule` |
|
||
| `RoutineExercise` | `exerciseId`, `day`, `sessionType`, `order`, `sets`, `repMin`, `repMax`, `targetDurationSec`, `perSide`, `restSec`, `loadKg`, `optional`, `notes` |
|
||
| `RoutineOverride` | `dailyHangGoalSec` stored separately from the bundled seed |
|
||
| `StrengthEntry` | `date`, `exerciseId`, `kind` (`emom` or `sets`), EMOM `totalReps` and applicable `load` or regular `sets` with each set's `reps` and `load`; new records also retain derived `externalKg`, while older records may have only `externalKg` |
|
||
| `CompletedSet` | `exerciseId`, `sequence`, `reps`, `side`, `notes`, and load components (`vestKg`, `dumbbellKgEach` / `dumbbellKg`, `ezBarTotalKg`, `bodyweightOnly` when relevant); later work may support variable dumbbell counts |
|
||
| `HangAttempt` | `date`, `sessionId`, `exerciseId`, `attemptNumber`, `durationSec`, `completedAt`, `notes` (daily hangs distinct from Saturday finger hangs) |
|
||
| `BodyWeightLog` | `date`, `weightKg`, `notes` (optional entry) |
|
||
| `Settings` | `preferredUnit`, `dataSchemaVersion` |
|
||
|
||
The implementation may normalize or refine this model. **Do not treat the suggested shape as frozen API contracts.** TASK-014 now stores actual load components for the seeded strength exercises and derives total external kilograms; existing entries with only a total remain valid and unclassified. `dumbbellKgEach` represents each of two dumbbells; `dumbbellKg` represents one. TASK-005 may later support variable counts and additional recording. The 6 kg and 10 kg programme values are prescriptions, not assumed actuals.
|
||
|
||
### 7.1 Tracking requirements (v1, agreed)
|
||
|
||
1. Save regular strength sets independently with actual reps and external weight, including 0 kg for bodyweight-only work. Preserve partial records and separate them from prescription values.
|
||
2. For EMOM pull-ups and chin-ups, save **total actual repetitions and vest weight** for the exercise. Keep the ten-minute, one-minute-round prescription visible without timing or per-round logging. Support conventional-set sessions when the user switches training format.
|
||
3. For weighted push-ups, track vest load (initial prescription 10 kg); for applicable leg exercises record actual vest and dumbbell load separately. Dumbbell flys record kilograms per dumbbell, without a vest field. No made-up actual weights.
|
||
4. For daily hangs, track each timed attempt, longest single attempt, accumulated time across attempts, and progression toward the current editable goal (initially two minutes). Record Saturday finger-hang work separately.
|
||
5. For other timed workout activities (planks and carries), log **actual** duration rather than treating the prescribed value as achieved. Isometric holds do not require times. Per-side timing should remain distinguishable where relevant.
|
||
6. Later, suggest starting weights/reps from the previous matching exercise/session, but require user action before recording completion.
|
||
7. Show dated exercise history, previous vs current performance and straightforward progress charts/personal bests (particularly vest load, reps, hang duration, optional body weight). Do not fabricate missing data or equate different loading modes in comparisons.
|
||
8. Never rewrite completed history following routine edits, reseeding, changes to exercise definitions or app upgrades. Future routine edits only change future prescriptions.
|
||
9. Export all workouts, hang attempts, plan edits, and optional body-weight records to a **versioned JSON backup**; validate on import and ask before overwriting/merging existing records.
|
||
10. Avoid external analytics and automatic calorie estimates; training data remains local and private.
|
||
11. For a workout's **total external-load volume** (kg·reps), sum `actual reps × actual external kilograms moved` across recorded regular sets and EMOM totals. External load includes recorded vest mass, actual dumbbell mass times count, and EZ-bar total as applicable; it excludes body weight. Do not invent missing load components. Show the formula and raw total, and mark partial or incomplete data. Timed holds and hangs do not contribute rep-load volume. Do not calculate volume per minute.
|
||
|
||
### Data integrity and update rules
|
||
|
||
- Seed programme on first run only from `docs/WORKOUT_ROUTINE.md`-aligned bundled data; avoid overwriting edits during app upgrades. This document is authoritative for initial prescribed workout data, while subsequent in-app edits become authoritative locally.
|
||
- Use migrations on schema changes; retain old backups and test migration from prior versions.
|
||
- Workout history must be immutable in substance unless the user explicitly edits or deletes an entry.
|
||
- Show export/import controls for versioned JSON backups (with schema validation and import confirmation); consider CSV export for history later. Export must contain enough metadata to reimport into a new browser/profile. Include an explicit backup recommendation because site data can be cleared/evicted.
|
||
- Make clear that local data is **device/browser-specific** and can be lost if browser storage is cleared, browser data is evicted, or a profile is removed. Request persistent storage where supported, but **do not promise permanence**. Do not add intrusive backup reminders or subscription-like prompts. Only create user-initiated reminders if requested.
|
||
- Multi-device sync is **not available in v1**. Export/import is the manual transfer path; optional API sync is a future decision.
|
||
|
||
## 8. Visual and UX direction
|
||
|
||
- Calm, minimal, readable, keyboard-usable layout; neutral/dark styling with clear completion emphasis. Respect light/dark preference if feasible without a large theme system.
|
||
- The weekday strip and **Morning/Afternoon toggle** should be immediately visible. Display **only one selected session period** on screen, never both together.
|
||
- Exercise cards show: name, prescription, prescribed rest, load/vest preset, rep/weight entry for applicable strength work, and an expandable description/image view when details are implemented.
|
||
- The persistent local time clock remains legible at phone and desktop widths.
|
||
- Avoid busy gamification, badges/streaks and unnecessary dashboards.
|
||
- Responsive at mobile widths; no horizontal scrolling for primary interaction.
|
||
- Keep the content editable and data-centric, rather than a static copy of this document.
|
||
|
||
## 9. Release scope and development tasks
|
||
|
||
Use separate Codex tasks and isolated branches/worktrees in the repository context workflow. Suggested grouping:
|
||
|
||
| Task | Deliverable | Dependencies |
|
||
|---|---|---|
|
||
| T001 | Repo/bootstrap: Vite + React + React-Bootstrap; project context docs; lint/test scripts; basic responsive shell | None |
|
||
| T002 | Exercise definitions and accurate **seed** routine for all seven days; validation tests | T001 |
|
||
| T003 | Day navigation and exclusive Morning/Afternoon views; selected period persists | T002 |
|
||
| T004 | Exercise-detail screen and local media placeholders; accessibility | T002–T003 |
|
||
| T005 | Extend TASK-014 records with hangs, holds, other performance details and history-safe migrations | T014 |
|
||
| T006 | Superseded timer task; the local time clock and hang-goal editor remain | T003 |
|
||
| T014 | Remove timers; save EMOM total reps/weight and regular per-set reps/weight by date | T002–T003 |
|
||
| T007 | Routine editor: reorder, adjust prescription, optional exercises, persistence | T005 |
|
||
| T008 | History and progress views (hang PB, loads, reps, total external-load volume), responsive/accessibility polish, offline/PWA build, test pass and documentation | T004–T007, T014 |
|
||
| T009 (content) | Produce and review licensed/local exercise illustrations for the actual variants | T004; may run separately |
|
||
|
||
Do not implement all tasks as a single unreviewed change. Define task boundaries, run unit/integration tests and manually review the UI before merge.
|
||
|
||
## 10. Acceptance tests
|
||
|
||
- [ ] Today defaults to current local calendar date; seven-day strip works across weeks; exclusive Morning/Afternoon toggle remembers its state and does not show both periods at once.
|
||
- [ ] Monday and Friday mornings show “Full body stretch routine” with no invented exercise entries; afternoon holds and hangs remain.
|
||
- [ ] The local time clock remains prominent and readable at phone and desktop widths while navigating the app.
|
||
- [ ] Tuesday pull-ups and Saturday chin-ups retain the **10 × 60-second EMOM** prescription and 6 kg vest presets, while actual total reps and external weight are recorded once for each exercise.
|
||
- [ ] Wednesday flys have **no floor-press drop set**; push-up plus precedes feet-elevated push-ups.
|
||
- [ ] Thursday includes single-leg RDLs and front planks, **not weighted floor crunches**.
|
||
- [ ] Saturday includes hanging knee raises, 2–3 finger-hang sets, preacher curls and hammer curls; **no EZ curls or wrist curls**.
|
||
- [ ] Sunday includes optional single-arm triceps extensions and side-plank hip raises.
|
||
- [ ] Afternoon isometric holds show no time targets; day-specific effort guidance remains.
|
||
- [ ] Daily afternoon hangs appear all seven days with an initially **2:00 goal** that can be changed and survives reload, but no invented achieved value or vest detail; multiple attempts produce longest-continuous and cumulative totals independently. Saturday finger hangs remain separate.
|
||
- [ ] Weight presets on pull-ups/chin-ups (6 kg) and weighted push-ups/vested leg work (10 kg) display correctly; dumbbell loads are **not invented**.
|
||
- [ ] Users can enter vest and dumbbell loads separately, total EZ-bar load, per-side values, recorded reps, hold/carry durations, and optional body-weight entries.
|
||
- [ ] EMOM total reps and actual external weight, plus separate regular-set reps and weights, survive reload by date and exercise; prescribed values are never saved as performed automatically.
|
||
- [ ] Exercise-specific load components, hang attempts and untimed hold checkoffs can be extended without replacing existing strength records; old total-only entries remain available.
|
||
- [ ] Exercise history and simple progress charts display actual saved values; editing a future prescription leaves existing entries unchanged.
|
||
- [ ] Total external-load volume uses recorded reps and actual external weight without a time denominator; the display shows raw totals and flags partial or missing data.
|
||
- [ ] No workout, exercise, rest, or EMOM timer or audio control is present; the local time-of-day clock remains visible and updates across views.
|
||
- [ ] All exercise details work offline with useful text even if an image is absent.
|
||
- [ ] Routine edits persist after refresh/build updates and do not rewrite previous session logs.
|
||
- [ ] IndexedDB survives refresh/browser restart, saves partial sessions, and handles blocked/unavailable storage or upgrade errors clearly.
|
||
- [ ] Export → clear/test profile → import round-trip restores all records, including independent hang attempts, historical loads and plan edits.
|
||
- [ ] All major controls work with keyboard and on phone viewport.
|
||
- [ ] No login, API calls, analytics, third-party remote imagery or browser storage sync is required.
|
||
|
||
## 11. Open questions — not blockers to initial spec
|
||
|
||
1. **Where to deploy?** Laptop-local only initially, or self-hosted static site on your existing infrastructure? Both can use the same static build.
|
||
2. **Images:** Generate/review bespoke instructional illustrations or curate permissively licensed exercise drawings; both need review for exercise accuracy.
|
||
3. **Progress history:** Whether workout records should allow arbitrary additional sets and supersets in v1 or in a later version.
|
||
4. **Editor scope:** v1 should support modifying seeded routines; fully custom exercise creation may be a follow-up depending on implementation size.
|
||
5. **Synchronization:** Defer until a real multi-device need is confirmed; does not justify a backend now.
|
||
|
||
## 12. Handoff for Codex
|
||
|
||
1. Create/choose a dedicated repository for the workout app.
|
||
2. Run `roborto-project-context` for a **new** repository; follow its existing docs/task/decision conventions and consult `AGENTS.md` and `docs/*` before making changes.
|
||
3. Place this spec at `docs/SPEC.md` for application requirements and `docs/WORKOUT_ROUTINE.md` for the **authoritative initial training programme**. Verify both are consistent and promote unresolved choices to decisions only when needed.
|
||
4. Break implementation into tasks above or the closest matching project task format.
|
||
5. Implement one task per branch/worktree, verify tests/UI behavior, then review and merge.
|
||
6. Do not introduce Flask, cloud accounts, synchronization or additional exercises without an explicit decision.
|
||
|
||
---
|
||
|
||
*This is a design specification, not medical guidance. Adjust any exercise causing pain and seek clinical assessment for new or progressive spinal prominence, unexplained weight loss or persistent pain.*
|