Inspiration
A single unexpected delay can disrupt an entire day. When a meeting runs overtime, people often have to manually rearrange their schedules while trying to protect important appointments, meet deadlines, and avoid creating even more conflicts. Traditional calendars show what is scheduled, but they do not necessarily help users recover when plans change.
I built PlanRescue to address this gap. The goal is to turn scheduling disruptions into manageable decisions by finding feasible alternatives, explaining their trade-offs, and keeping users in control of what actually changes.
What it does
PlanRescue is an AI-powered scheduling recovery assistant that helps users respond to unexpected disruptions.
A user can describe a problem in natural language, such as: "My meeting is running 40 minutes late. Fix my afternoon, but don't move my doctor's appointment or miss my project deadline."
PlanRescue analyzes the schedule, identifies conflicts, generates alternative recovery plans, and evaluates them against scheduling constraints and task deadlines.
Key capabilities include:
- Natural-language interaction: Translate everyday scheduling requests into structured disruption information.
- Conflict detection: Identify conflicts and scheduling constraints caused by a disruption.
- Intelligent recovery planning: Generate and rank alternative schedules using a deterministic recovery engine.
- Constraint protection: Respect protected commitments and evaluate deadline risks.
- Independent validation: Check proposed plans against hard constraints before presenting them as valid.
- Human-controlled execution: Let users review, approve, reject, and explicitly confirm a recovery plan before it changes the local schedule.
- Persistent history: Store recovery plans and action history so users can review previous decisions.
- Decision explainability: Show why a plan was recommended, what would change, and what trade-offs it involves.
- Exportable reports: Provide Markdown and JSON reports containing available plan details, validation findings, and lifecycle information.
The central principle is simple: PlanRescue recommends changes, explains their consequences, and leaves the final decision to the user.
How we built it
I designed PlanRescue around a combination of AI-based request interpretation and deterministic scheduling logic. The language model helps understand what the user wants, while the recovery engine handles feasibility, constraints, candidate ranking, and validation.
The project uses a modular architecture built around:
- TypeScript and Node.js for application logic and server-side functionality.
- The official MCP TypeScript SDK and Streamable HTTP for structured communication between the application and its tools.
- SQLite and
better-sqlite3for local persistence of calendar events, tasks, recovery plans, and action history. - Next.js and React for the user interface.
- Zod for structured input validation.
- Vitest for automated testing.
The workflow separates analysis from execution. First, PlanRescue retrieves relevant schedule and task information, analyzes the disruption, and generates candidate plans. The independent validator checks the candidates before users review them. If a user chooses to proceed, the application enforces the approval and confirmation workflow before applying the selected changes.
I also designed safeguards for stale recovery plans, repeated application requests, and failed transactions. These help prevent plans from being applied against outdated information or leaving the schedule partially modified after an execution failure.
The reporting functionality extends this workflow by making recovery decisions easier to inspect, understand, and share.
Challenges we ran into
One of the biggest challenges was balancing flexibility with correctness. A schedule can have several possible recovery plans, but a plan that looks convenient is not necessarily feasible. Protecting an important appointment, respecting a task deadline, and minimizing schedule disruption can sometimes conflict with one another.
Another challenge was separating the language model's interpretation from the system's scheduling decisions. Natural-language AI is useful for understanding requests, but it should not be solely responsible for determining whether a schedule is valid. This led to a design that combines AI-assisted interpretation with deterministic planning and independent validation.
Reliable execution introduced additional challenges. Recovery plans can become outdated when events or tasks change, repeated requests must not apply changes twice, and related database updates must remain consistent if an operation fails.
Finally, making the system explainable required more than displaying a recommended schedule. Users need to understand the proposed changes, the constraints considered, the score used to rank a plan, and the risks that remain.
Accomplishments that we're proud of
The most important accomplishment is the end-to-end approach: PlanRescue is designed to take a scheduling disruption from a natural-language request through conflict analysis, recovery planning, validation, user review, and controlled execution.
Other key accomplishments include:
- Separating AI-assisted interpretation from deterministic scheduling and validation.
- Designing a persistent recovery-plan lifecycle with explicit approval and application controls.
- Addressing stale plans, transactional consistency, and idempotent execution.
- Making protected commitments and deadline risks part of the recovery decision.
- Extending the system with decision reports that distinguish proposed changes from recorded execution outcomes.
- Establishing a testing strategy that checks not only successful scenarios but also invalid requests, infeasible schedules, stale plans, and execution failures.
Rather than treating rescheduling as a simple calendar-editing operation, PlanRescue approaches it as a decision-making problem in which the consequences of each change matter.
What we learned
Building PlanRescue reinforced that useful AI applications need more than a language model and an interface. They need reliable data flows, clearly defined constraints, verifiable logic, appropriate error handling, and predictable behavior when something goes wrong.
We also learned the importance of human oversight in automation. A system should not silently modify important commitments simply because it has generated a plausible plan. Recommendations, validation, approval, and execution should be distinct steps.
Another important lesson was the value of explainability. Users are more likely to trust a recommendation when they can see what changes, why the plan was selected, which constraints were respected, and what trade-offs remain.
Finally, testing edge cases early is essential. A system may work perfectly on an ordinary day but fail when there is no feasible recovery, when information becomes outdated, or when an operation is interrupted.
What's next for PlanRescue
The current project is a single-user local prototype that applies schedule changes to its own SQLite database. Its supported disruption type is event_overrun, with broader scheduling scenarios left for future development.
The next steps include:
- Integrating with external calendar providers such as Google Calendar and Microsoft Outlook, with appropriate permission and confirmation controls.
- Supporting additional disruption types, including travel delays and unexpected task overruns.
- Exploring multi-day replanning while preserving important constraints and deadlines.
- Improving personalization through user-defined scheduling preferences and recovery strategies.
- Expanding usability and accessibility testing.
- Strengthening the architecture for multi-user deployments and more demanding operational environments.
The long-term vision is to make PlanRescue a dependable scheduling recovery assistant that helps people adapt to change without losing control of their time, commitments, or decisions.
Built With
- artificial-intelligence
- better-sqlite3
- javascript
- llm
- mcp-sdk
- model-context-protocol-(mcp)
- next.js
- node.js
- openai-api
- react
- sqlite
- streamable-http
- typescript
- vitest
- zod
Log in or sign up for Devpost to join the conversation.