whisper-money/database
Víctor Falcón 88b43dfb99 feat(ai): learn a forward rule from category corrections
When a user corrects a category the AI assigned, the system now records
the correction as a deterministic, forward-looking automation rule so the
same merchant — or the same distinctive description — is never
mis-categorized the same way again. The next matching transaction is
caught by the rule before the model ever runs, ending the
correct-it-every-time loop.

- New RuleOrigin::Correction: rules learned from corrections, protected
  from the AI self-heal and editable like any rule in settings.
- AiRuleLearner::learnFromCorrection keys on the merchant when present
  (stable as the description varies), otherwise on the description's
  distinctive tokens, guarded against over-broad description rules that
  could silently mis-file en masse.
- A key lives in exactly one correction rule, so changing your mind moves
  it to the new category. Correcting a transaction a prior correction
  rule categorized is also learnable, so correction rules stay fixable.
- Extract DescriptionTokenizer, shared by RuleSuggestionAggregator and the
  learner, removing the duplicated distinctive-token logic.
- TransactionMatcher::countMatchingAll backs the over-broad guard.
- The update endpoint returns the learned rule; the transactions table
  shows a toast with an instant Undo.
2026-06-29 16:52:58 +02:00
..
factories feat(ai): learn a forward rule from category corrections 2026-06-29 16:52:58 +02:00
migrations feat(dashboard): add accounts manager dialog with visibility toggle and reorder (#604) 2026-06-27 16:11:25 +00:00
seeders feat(banking): add Interactive Brokers sync via Flex Web Service (#581) 2026-06-23 11:39:24 +02:00
.gitignore Set up a fresh Laravel app 2025-11-07 12:01:36 +00:00