pii-detector
pink
#187 / 601
NAME
pii-detector — Flag PII before it leaves the device. Matrix mod 2026-06-01: extended to gate Engram cloud-projection writes — PII never leaves device unless operator opts in.
SYNOPSIS
id pii-detector
tier pink
section §7. Pink — Sakura local (65 baseline, 131 post-matrix)
trigger event
tools pii_detect
source carry-forward
DESCRIPTION
Scan every outbound payload for likely names, addresses, emails, card numbers, IDs. Anything that smells personal gets a flag before the data leaves the device. Defense in depth — the model never sees what shouldn't leave.
Flag PII before it leaves the device. Matrix mod 2026-06-01: extended to gate Engram cloud-projection writes — PII never leaves device unless operator opts in.
MECHANISM
;;~ title "PII detector" ;;~ author "lacuna" ;;~ version 1 ;;~ mode automation ;;~ flavor pink ;;~ id pii-detector ;;~ touches () ;;~ summary "Flag PII before it leaves the device." ;; Flag PII before it leaves the device. ;; ;; Character loop. On-device Sakura only; never escalates to ;; cloud. The cart reads its seed from ctx and surfaces the ;; result back into the conversation via sakura/say or ;; sakura/decide. Calm voice, short, ~30 words. (cart 'pii-detector '((author . "lacuna") (version . 1) (read-only . #t))) (define (start ctx) (let ((seed (ctx-get 'seed ctx))) (if (null? seed) (next 'invoke ctx) (next 'invoke ctx)))) (define (invoke ctx) (let ((seed (ctx-get 'seed ctx))) (act 'sakura/decide (list 'task 'pii-detector seed) 'check-result))) (define (check-result ctx) (let ((r (ctx-result ctx))) (cond ((null? r) (escalate 'sakura-empty null)) ((eq? r 'rate-limited) (after 5 'invoke ctx)) (else (next 'announce (ctx-set 'output r ctx)))))) (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)