| name | constraints-scheduling |
| description | Provides systematic approaches for solving constraint-based scheduling problems, such as finding meeting times that satisfy multiple participant availability windows, preferences, and existing calendar conflicts. This skill should be used when tasks involve scheduling with constraints, calendar conflict resolution, time slot optimization, or finding valid time windows across multiple inputs with hard and soft constraints. |
Constraints Scheduling
Overview
This skill provides guidance for solving constraint-based scheduling problems where the goal is to find time slots that satisfy multiple constraints from different sources (participant availability, existing calendars, preferences, etc.). It emphasizes systematic data extraction, programmatic verification, and proper handling of time granularity requirements.
Workflow
Phase 1: Input Verification and Data Extraction
Before any analysis, establish complete and verified data:
- Verify input file integrity first - Check that input files have not been modified and contain expected data before processing
- Extract complete data - Ensure all file contents are fully read (watch for truncation in tool outputs)
- Use appropriate parsers - For structured formats like ICS (iCalendar), use proper parsing libraries rather than manual text extraction
- Document extracted data - Create a clear summary of all extracted events, constraints, and preferences
Phase 2: Constraint Classification
Organize constraints into clear categories before searching for solutions:
Hard constraints (must be satisfied):
- Participant availability windows
- Existing calendar conflicts
- Required meeting duration
- Non-negotiable time restrictions
Soft constraints (preferences for tie-breaking):
- Preferred days of week
- Preferred times of day
- Buffer time preferences
- Other stated preferences
Edge case constraints:
- Boundary conditions (e.g., meeting ending exactly when lunch begins)
- Day-specific rules (e.g., early departure on certain days)
- Buffer requirements (e.g., no meetings after a certain time)
Phase 3: Systematic Solution Search
Implement a comprehensive search approach:
- Respect stated granularity - If the task specifies minute-level granularity, check all possible start times at that granularity (not just hour boundaries)
- Use programmatic verification - Write a script that encodes all constraints and systematically checks every possible time slot
- Single comprehensive script - Avoid duplicating work between manual analysis and code; trust programmatic verification
- Check earliest valid slot - When finding the "earliest" slot, ensure the search starts from the correct baseline and respects granularity
Phase 4: Verification
Before finalizing the solution:
- Verify against all hard constraints - Explicitly check each constraint against the selected time
- Document boundary conditions - For edge cases (meeting ending exactly at a constraint boundary), explicitly confirm validity
- Cross-reference with source data - Ensure the selected slot doesn't conflict with any extracted calendar events
- Verify output format - Ensure the output matches any specified format requirements
Common Pitfalls
Data Extraction Issues
- Truncated file reads - Tool outputs may truncate long files; always verify complete data extraction or use programmatic parsing
- Manual parsing errors - Avoid manually extracting structured data (like ICS events) when libraries exist
- Missing events - Incomplete calendar parsing can lead to scheduling conflicts
Granularity Mistakes
- Ignoring stated granularity - If minute-level granularity is required, checking only hourly slots may miss valid earlier times
- Boundary assumptions - A meeting at 10:00-11:00 and a constraint starting at 11:00 may or may not conflict depending on requirements
Analysis Disorganization
- Redundant manual analysis - Performing the same constraint checks manually multiple times wastes effort and introduces inconsistency
- Stream-of-consciousness reasoning - Jumping between days and constraints without structure increases error risk
- Late verification - Checking input integrity after analysis is complete, rather than before
Constraint Handling
- Treating soft constraints as hard - Preferences should be tie-breakers, not elimination criteria
- Missing edge cases - Day-specific rules, buffer requirements, and boundary conditions are easily overlooked
- Incomplete constraint enumeration - Failing to extract all constraints from input data
Verification Checklist
Before submitting a scheduling solution, verify:
- All input files were read completely without truncation
- Input file integrity was verified (not modified)
- All hard constraints are satisfied by the selected time
- No conflicts exist with any extracted calendar events
- Stated granularity requirements were respected in the search
- Edge cases and boundary conditions were explicitly checked
- Soft constraints were used appropriately for selection among valid options
- Output format matches requirements
Best Practices
- Start with programmatic approach - Immediately write a comprehensive script to parse inputs and check constraints rather than manual analysis
- Use proper libraries - For ICS files, use icalendar or similar libraries; for other structured formats, use appropriate parsers
- Structure analysis hierarchically - Organize by constraint category rather than jumping between different days or time slots
- Single source of truth - Trust programmatic verification; avoid duplicating analysis manually
- Explicit boundary handling - Document how boundary conditions are handled (inclusive vs exclusive endpoints)
- Complete search - When finding "earliest" or "best" slots, search all possibilities at the required granularity