Parent
#2 (PRD: /timebox — LLM-assisted next-day timeboxing)
What to build
Make /timebox schedule generation resilient to LLM flakiness. Builds directly on the scheduler module from #5.
Behavior:
- When the structured-output call fails (API error, timeout, or output that fails Pydantic validation), automatically retry once. The retry may re-send the request as-is or include a corrective instruction — implementer's choice, but keep it to exactly one automatic retry.
- If the retry also fails: send the user a clear error message stating that scheduling failed and that they can send /done again to retry. The collected task buffer MUST remain intact and the conversation MUST remain in a state where /done re-triggers generation with the same tasks — the user never re-types their list.
- /cancel still aborts and clears the buffer from this state; the 30-minute inactivity timeout still applies.
- A subsequent successful /done clears the buffer and ends the session normally.
Extend the existing pytest suite (introduced in #5) with fake-LLM tests: first call fails → retry succeeds → valid schedule returned; both calls fail → error surfaced and caller can re-invoke with the same task list successfully. Test external behavior only.
Manual verification: point TIMEBOX_LLM_MODEL at a nonexistent model, run /timebox → tasks → /done, confirm the error message, then restore the model and confirm /done succeeds without re-entering tasks.
Acceptance criteria
Blocked by
Parent
#2 (PRD: /timebox — LLM-assisted next-day timeboxing)
What to build
Make /timebox schedule generation resilient to LLM flakiness. Builds directly on the scheduler module from #5.
Behavior:
Extend the existing pytest suite (introduced in #5) with fake-LLM tests: first call fails → retry succeeds → valid schedule returned; both calls fail → error surfaced and caller can re-invoke with the same task list successfully. Test external behavior only.
Manual verification: point TIMEBOX_LLM_MODEL at a nonexistent model, run /timebox → tasks → /done, confirm the error message, then restore the model and confirm /done succeeds without re-entering tasks.
Acceptance criteria
Blocked by