Validation
The Validation module (lib/validation/) provides runtime validation for task drafts before they are submitted to the Triple-Write Orchestrator.Validation Files
Task Draft Validation
The validateTaskDraft() function checks:- Title is non-empty
- At least one time window is configured
- All time windows have valid start/end times (start before end)
- If location conditions exist, GPS coordinates are valid
- If penalty is configured, required fields are present
- If waiver is configured, deadline is positive
Time Slot Validation
The validateTimeSlot() function checks:- Start time is before end time
- Time window does not overlap with existing windows on the same day
- Slot-level conditions (if attached) have valid configurations