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:
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
1---2name: constraints-scheduling-23description: 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.4---5
6# Constraints Scheduling
7
8## Overview
9
10This 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.
11
12## Workflow
13
14### Phase 1: Input Verification and Data Extraction
15
16Before any analysis, establish complete and verified data:
17
181. **Verify input file integrity first** - Check that input files have not been modified and contain expected data before processing
192. **Extract complete data** - Ensure all file contents are fully read (watch for truncation in tool outputs)
203. **Use appropriate parsers** - For structured formats like ICS (iCalendar), use proper parsing libraries rather than manual text extraction
214. **Document extracted data** - Create a clear summary of all extracted events, constraints, and preferences
22
23### Phase 2: Constraint Classification
24
25Organize constraints into clear categories before searching for solutions:
26
271. **Hard constraints** (must be satisfied):
28 - Participant availability windows
29 - Existing calendar conflicts
30 - Required meeting duration
31 - Non-negotiable time restrictions
32
332. **Soft constraints** (preferences for tie-breaking):
34 - Preferred days of week
35 - Preferred times of day
36 - Buffer time preferences
37 - Other stated preferences
38
393. **Edge case constraints**:
40 - Boundary conditions (e.g., meeting ending exactly when lunch begins)
41 - Day-specific rules (e.g., early departure on certain days)
42 - Buffer requirements (e.g., no meetings after a certain time)
43
44### Phase 3: Systematic Solution Search
45
46Implement a comprehensive search approach:
47
481. **Respect stated granularity** - If the task specifies minute-level granularity, check all possible start times at that granularity (not just hour boundaries)
492. **Use programmatic verification** - Write a script that encodes all constraints and systematically checks every possible time slot
503. **Single comprehensive script** - Avoid duplicating work between manual analysis and code; trust programmatic verification
514. **Check earliest valid slot** - When finding the "earliest" slot, ensure the search starts from the correct baseline and respects granularity
52
53### Phase 4: Verification
54
55Before finalizing the solution:
56
571. **Verify against all hard constraints** - Explicitly check each constraint against the selected time
582. **Document boundary conditions** - For edge cases (meeting ending exactly at a constraint boundary), explicitly confirm validity
593. **Cross-reference with source data** - Ensure the selected slot doesn't conflict with any extracted calendar events
604. **Verify output format** - Ensure the output matches any specified format requirements
61
62## Common Pitfalls
63
64### Data Extraction Issues
65
66- **Truncated file reads** - Tool outputs may truncate long files; always verify complete data extraction or use programmatic parsing
67- **Manual parsing errors** - Avoid manually extracting structured data (like ICS events) when libraries exist
68- **Missing events** - Incomplete calendar parsing can lead to scheduling conflicts
69
70### Granularity Mistakes
71
72- **Ignoring stated granularity** - If minute-level granularity is required, checking only hourly slots may miss valid earlier times
73- **Boundary assumptions** - A meeting at 10:00-11:00 and a constraint starting at 11:00 may or may not conflict depending on requirements
74
75### Analysis Disorganization
76
77- **Redundant manual analysis** - Performing the same constraint checks manually multiple times wastes effort and introduces inconsistency
78- **Stream-of-consciousness reasoning** - Jumping between days and constraints without structure increases error risk
79- **Late verification** - Checking input integrity after analysis is complete, rather than before
80
81### Constraint Handling
82
83- **Treating soft constraints as hard** - Preferences should be tie-breakers, not elimination criteria
84- **Missing edge cases** - Day-specific rules, buffer requirements, and boundary conditions are easily overlooked
85- **Incomplete constraint enumeration** - Failing to extract all constraints from input data
86
87## Verification Checklist
88
89Before submitting a scheduling solution, verify:
90
91- [ ] All input files were read completely without truncation
92- [ ] Input file integrity was verified (not modified)
93- [ ] All hard constraints are satisfied by the selected time
94- [ ] No conflicts exist with any extracted calendar events
95- [ ] Stated granularity requirements were respected in the search
96- [ ] Edge cases and boundary conditions were explicitly checked
97- [ ] Soft constraints were used appropriately for selection among valid options
98- [ ] Output format matches requirements
99
100## Best Practices
101
1021. **Start with programmatic approach** - Immediately write a comprehensive script to parse inputs and check constraints rather than manual analysis
1032. **Use proper libraries** - For ICS files, use icalendar or similar libraries; for other structured formats, use appropriate parsers
1043. **Structure analysis hierarchically** - Organize by constraint category rather than jumping between different days or time slots
1054. **Single source of truth** - Trust programmatic verification; avoid duplicating analysis manually
1065. **Explicit boundary handling** - Document how boundary conditions are handled (inclusive vs exclusive endpoints)
1076. **Complete search** - When finding "earliest" or "best" slots, search all possibilities at the required granularity