14 Commits

Author SHA1 Message Date
bebc609091 Add one-off tasks/appointments feature
- DB: tasks table with scheduled_datetime, reminder_minutes_before, advance_notified, status
- API: CRUD routes GET/POST /api/tasks, PATCH/DELETE /api/tasks/<id>
- Scheduler: check_task_reminders() fires advance + at-time notifications, tracks advance_notified to prevent double-fire
- Bot: handle_task() with add/list/done/cancel/delete actions + datetime resolution helper
- AI: task interaction type + examples added to command_parser
- Web: task list page with overdue/notified color coding + new task form with datetime-local picker
- Nav: replaced Templates with Tasks in bottom nav

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 16:43:42 -06:00
95ebae6766 Add AI task composition for routines (bot + web client)
Users can now describe a goal and have AI auto-generate 4-7 ADHD-friendly
steps, which they can review and modify before saving.

- ai/ai_config.json: Add step_generator prompt and ai_compose examples
  to command_parser so bot recognises vague task descriptions
- api/routes/ai.py: New POST /api/ai/generate-steps endpoint — calls
  LLM via ai_parser, validates and sanitises returned steps
- api/main.py: Register new ai_routes module
- bot/commands/routines.py: Add ai_compose action — generates steps,
  shows numbered list with durations, uses existing yes/no confirm flow
- synculous-client/src/lib/api.ts: Add api.ai.generateSteps(goal)
- synculous-client/src/app/dashboard/routines/new/page.tsx: Add
  Generate with AI panel with collapsible textarea, loading spinner,
  and inline error; generated steps slot into existing editable list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 13:56:54 -06:00
9fb56edf74 Route general questions to knowledge base via LLM classification
The command parser was returning needs_clarification for advice/how-to
questions that didn't explicitly reference a book. Updated ai_config.json
to classify any question that isn't about meds or routines as a knowledge
query, added book hints for DBT vs ADHD, and added concrete examples
(e.g. "how do I do things I don't want to do?").

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 13:25:13 -06:00
8ac7a5129a fixed spamming i hope 2026-02-17 18:11:44 -06:00
123a7ce3e7 claude bugpass 2026-02-17 00:20:06 -06:00
382e62cee7 fix: add missing await in parse retry call 2026-02-16 12:40:25 -06:00
a53187d6a9 fix: make AI parser async to prevent Discord heartbeat blocking 2026-02-16 12:24:13 -06:00
0f270dbba2 Add knowledge base RAG module for book Q&A
- Create knowledge.py handler with dynamic book selection
- Support list/select/query actions for multiple books
- Implement vector search with cosine similarity
- Add knowledge detection to AI parser config
- Cache embeddings per-book for performance
2026-02-16 11:20:22 -06:00
20f995119c feat(bot): add delete action for medications and routines
- Added delete action to medications handler with confirmation flow
- Added delete action to routines handler with confirmation flow
- Updated AI config with delete examples for both meds and routines
- Added 'delete', 'remove', 'get rid of' to action recognition
2026-02-16 06:04:19 -06:00
c903363f6e feat(bot): comprehensive natural language command parsing
- Enhanced AI prompts with time/frequency conversion rules and 20+ examples
- Added smart medication name resolution and confirmation flows
- New medication commands: today, refills, snooze, adherence
- New routine commands: create_with_steps, add_steps, steps, schedule
- Added active session awareness with shortcuts (done, skip, pause, resume)
- Confirmation handling for destructive/create actions
- Improved help message with natural language examples
2026-02-16 05:53:40 -06:00
16d89d07f6 bug fixes 2026-02-16 05:34:27 -06:00
12bbc5c0b4 bot improvements 2026-02-16 04:49:31 -06:00
f8903f74cf discord bot fixes 2026-02-16 04:28:44 -06:00
25d05e0e86 first commit 2026-02-12 22:11:52 -06:00