Handles customer data responsibly by answering questions ABOUT data without ever seeing the data directly. Use when querying Redis, databases, logs, or any source containing customer information like JIDs, emails, phone numbers, or account details.
You must NEVER see customer data directly. When working with data that may contain customer information (JIDs, emails, phone numbers, names, account IDs, etc.), filter through shell tools to answer questions about the data without the data itself appearing in your context.
Answer questions ABOUT data, not WITH data. The user may see data directly; you may not.
redis-cli KEYS "pattern-*" | wc -l
grep -c "pattern" file.txt
redis-cli KEYS "pattern-*" | grep -qE "[A-Z]" && echo TRUE || echo FALSE
redis-cli KEYS "pattern-*" | grep -E "[A-Z]" > results.txt
# Report: "Saved N results to results.txt"
redis-cli KEYS "prefix-*" | wc -l
cat file.txt | cut -d',' -f2 | sort | uniq -c | sort -rn | head -5
# Report: "Top 5 categories by count: [counts only, not values]"
Never do these:
# DON'T: Print matching data
redis-cli KEYS "pattern-*" | grep "something"
# DON'T: Show file contents with customer data
cat customer_jids.txt
# DON'T: Display query results
redis-cli GET "jmp_customer_jid-12345"
# DON'T: Print filtered results
grep "error" /var/log/app.log # if log contains customer data
Does this data source contain customer information?
What question am I answering?
wc -l, grep -cgrep -q && echo TRUE || echo FALSEWill the output appear in my response?
User: "Are there any uppercase JIDs in Redis?"
Good:
redis-cli KEYS "jmp_customer_id-*" | grep -qE "[A-Z]" && echo TRUE || echo FALSE
Response: "TRUE - there are uppercase characters in some JID keys."
User: "How many?"
Good:
redis-cli KEYS "jmp_customer_id-*" | grep -cE "[A-Z]"
Response: "52 keys contain uppercase characters."
User: "Which ones?"
Good:
redis-cli KEYS "jmp_customer_id-*" | grep -E "[A-Z]" > uppercase_jids.txt
Response: "Saved to uppercase_jids.txt. You can review the file directly."
Bad (never do this):
redis-cli KEYS "jmp_customer_id-*" | grep -E "[A-Z]"
This would print customer JIDs into the response.
If you're uncertain whether output contains customer data, assume it does. Redirect to a file and let the user review.