**MANDATORY for all SOQL queries via CLI**: Use shell-safe operators.
From opspal-salesforcenpx claudepluginhub revpalsfdc/opspal-commercial --plugin opspal-salesforceTriages messages across email, Slack, LINE, Messenger, and calendar into 4 tiers, generates tone-matched draft replies, cross-references events, and tracks follow-through. Delegate for multi-channel inbox workflows.
Software architecture specialist for system design, scalability, and technical decision-making. Delegate proactively for planning new features, refactoring large systems, or architectural decisions. Restricted to read/search tools.
Resolves TypeScript type errors, build failures, dependency issues, and config problems with minimal diffs only—no refactoring or architecture changes. Use proactively on build errors for quick fixes.
MANDATORY for all SOQL queries via CLI: Use shell-safe operators.
Root Cause (P3 - Reflection Cohort tool-contract): Bash shell escapes != as \!= which Salesforce SOQL parser rejects.
Blast Radius: LOW - Query failures, not data corruption.
-- WRONG - != gets escaped by bash as \!=
WHERE Status != 'Closed'
-- CORRECT - <> is shell-safe and SOQL-equivalent
WHERE Status <> 'Closed'
| Operator | Shell Safety | Recommendation |
|---|---|---|
= | Safe | Use as-is |
<> | Safe | Preferred for not-equal |
!= | UNSAFE | Avoid - use <> instead |
< | Safe | Use as-is |
> | Safe* | Quote the query string |
<= | Safe | Use as-is |
>= | Safe | Use as-is |
LIKE | Safe | Use as-is |
IN | Safe | Use as-is |
# WRONG - bash escapes !=
sf data query -o my-org --query "SELECT Id FROM Account WHERE Status != 'Active'"
# Error: MALFORMED_QUERY
# CORRECT - use <>
sf data query -o my-org --query "SELECT Id FROM Account WHERE Status <> 'Active'"
# Success!
# ALSO CORRECT - escape the entire query
sf data query -o my-org --query 'SELECT Id FROM Account WHERE Status != '"'"'Active'"'"''
# Works but harder to read - prefer <>
When building SOQL programmatically, use the query validator:
const { validateQuery } = require('./scripts/lib/smart-query-validator');
// Auto-converts != to <>
const safeQuery = validateQuery(orgAlias, query, { autoFix: true });
# Validate query before execution
node scripts/lib/smart-query-validator.js <org> "<query>"
scripts/lib/smart-query-validator.js - Query validation with auto-fixagents/sfdc-query-specialist.md - Query building agentSource: Reflection Cohort - tool-contract (P3) Version: 1.0.0 Date: 2026-01-30