colinislit
4b759c9b3d
feat(cortex): Epic 4 - Nudge MVP (Layer 3) complete
Proactive suggestions after successful actions - proof of concept.
E4.S1 - Protocol Rules (lib/cortex/nudge.ts)
- ProtocolRule and ProtocolCondition types
- Condition operators: equals, contains, matches, exists
- 2 hardcoded rules: wondzorg-controle, medicatie-controle
E4.S2 - evaluateNudge Function
- evaluateNudge(input) returns NudgeSuggestion[]
- checkCondition() helper for rule matching
- Priority sorting (high → medium → low)
E4.S3 - NudgeToast Component
- Countdown progress bar with auto-dismiss (5 min)
- Priority-based styling (low/medium/high)
- Accept and dismiss buttons
- Framer Motion animations
E4.S4 - Integration
- NudgeToast rendered in CommandCenter (fixed position)
- Trigger added in DagnotatieBlock after successful save
- Accept opens corresponding artifact with prefilled data
Demo flow:
1. Create dagnotitie with "wond" in content
2. Save → NudgeToast appears
3. Click "Ja, inplannen" → Appointment artifact opens
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 12:42:49 +01:00
..
2025-12-27 17:44:09 +01:00
2025-12-31 10:08:22 +01:00
2025-12-31 12:46:35 +01:00
2025-11-15 23:59:38 +01:00
2026-01-01 12:42:49 +01:00
2025-12-12 13:29:59 +01:00
2025-12-02 13:37:45 +01:00
2025-11-23 12:20:14 +01:00
2026-01-01 10:56:34 +01:00
2025-12-12 13:29:59 +01:00
2025-11-24 14:14:06 +01:00
2025-12-08 11:19:48 +01:00
2025-11-25 13:37:00 +01:00
2025-12-27 18:38:45 +01:00
2025-11-15 22:06:48 +01:00