buyer-sentiment-watcher
pink
#202 / 601
NAME
buyer-sentiment-watcher — Score the new buyer message for sentiment; only the negative case escalates to the operator.
SYNOPSIS
id buyer-sentiment-watcher
tier pink
section §7. Pink — Sakura local (65 baseline, 131 post-matrix)
trigger event:new-buyer-message
tools sakura/decide
source new
DESCRIPTION
Cheap local classifier reads the tone first. Only the genuinely negative messages escalate to cloud reasoning for deeper read. Saves API spend on the everyday-friendly stuff.
Score the new buyer message for sentiment; only the negative case escalates to the operator.
MECHANISM
;;~ title "Buyer sentiment watcher" ;;~ author "lacuna" ;;~ version 1 ;;~ mode automation ;;~ flavor pink ;;~ id buyer-sentiment-watcher ;;~ trigger event:new-buyer-message ;;~ touches () ;;~ summary "Score the new buyer message for sentiment, surface anything heading negative." ;; On-device sentiment classifier. The score rides back as a symbol ;; ('positive / 'neutral / 'negative); only 'negative escalates the ;; thread to the operator with the message attached so a calmer human ;; can step in. (cart 'buyer-sentiment-watcher '((author . "lacuna") (version . 1) (read-only . #t))) (define (start ctx) (let ((message (ctx-get 'message ctx))) (if (null? message) (escalate 'missing-message null) (next 'classify ctx)))) (define (classify ctx) (let ((message (ctx-get 'message ctx))) (act 'sakura/decide (list 'task 'classify-sentiment message) 'check-result))) (define (check-result ctx) (let ((r (ctx-result ctx))) (cond ((null? r) (escalate 'sakura-empty null)) ((eq? r 'negative) (escalate 'buyer-upset (ctx-get 'message ctx))) ((eq? r 'positive) (next 'announce (ctx-set 'sentiment r ctx))) ((eq? r 'neutral) (next 'announce (ctx-set 'sentiment r ctx))) (else (escalate 'sakura-garbled null))))) (define (announce ctx) (done))
EXAMPLES
Example forthcoming —
docs/automations/examples.json entry editable in place.TIER
pink
Sakura local 8B · free · on-device
FITNESS
Ready
Fits any shop today — this one has no sample-size floor.
SEE ALSO
HISTORY
canonical source: curator/docs/AUTOMATIONS-CANONICAL.md · §7-pink-sakura-local-65-baseline-131-post-matrix
last regenerated: 2026-06-05 20:31 UTC (mechanical — edits land in the MD or sidecars, not here)
KNOWN BUGS
(none recorded — flag in AUTOMATIONS-CANONICAL.md or open an issue against the cart file)