npx claudepluginhub revpalsfdc/opspal-commercial --plugin opspal-coreTriages 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.
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.
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.
Execute comprehensive bidirectional sync testing between Salesforce and HubSpot using probe fields and stable Sync Anchors. Validate real-time sync behavior, detect ID drift from merges, and produce actionable guidance.
Objective: Verify environment before executing probes
Actions:
cd .claude-plugins/opspal-core
# Load configuration
node scripts/lib/wire-test-config-loader.js validate ./wire-test-config.json
# Run pre-flight checks
node scripts/lib/wire-test-validator.js preflight
Validation Checks:
sf org display)Decision Point: If pre-flight fails, STOP and provide setup guidance. Do NOT proceed to Phase 1.
Objective: Deploy required fields/properties if validation found gaps
Salesforce Field Deployment:
# Deploy fields for Account and Contact
node scripts/lib/wire-test-sf-operations.js deploy
# Verify deployment
node scripts/lib/wire-test-sf-operations.js verify Account
node scripts/lib/wire-test-sf-operations.js verify Contact
HubSpot Property Creation:
# Create properties for company and contact
node scripts/lib/wire-test-hubspot-properties.js setup-all
Post-Setup: Re-run Phase 0 validation to confirm all fields/properties created.
IMPORTANT: Remind user to configure connector mappings before proceeding:
Objective: Ensure all test records have stable Sync Anchor UUID
Salesforce Backfill:
# Backfill Account
node scripts/lib/wire-test-sf-operations.js backfill Account 200
# Backfill Contact
node scripts/lib/wire-test-sf-operations.js backfill Contact 200
HubSpot Backfill:
# Backfill company
node scripts/lib/wire-test-hubspot-operations.js backfill company 100
# Backfill contact
node scripts/lib/wire-test-hubspot-operations.js backfill contact 100
Critical: Wait 5-10 minutes after backfill for connector to sync Sync Anchors between systems before proceeding to Phase 3.
Objective: Toggle Wire Test fields and measure propagation lag
For each matched pair (determined by account_selectors in config):
Step 1: Query by Sync Anchor
# Salesforce
node scripts/lib/wire-test-sf-operations.js query-anchor Account <sync-anchor>
# HubSpot
node scripts/lib/wire-test-hubspot-operations.js search-anchor company <sync-anchor>
Step 2: Execute SF→HS Probe
// Implemented in wire-test-sf-operations.js
// 1. Read current Wire_Test_1__c value
// 2. Toggle value (true → false or false → true)
// 3. Set Wire_Test_Run_ID__c = runId
// 4. Set Wire_Test_Timestamp__c = now()
// 5. Update Salesforce record
// 6. Poll HubSpot by sync_anchor until wire_test_1 matches and wire_test_run_id matches
// 7. Record lag_seconds in ledger
Step 3: Execute HS→SF Probe
// Implemented in wire-test-hubspot-operations.js
// 1. Read current wire_test_2 value
// 2. Toggle value
// 3. Set wire_test_run_id = runId
// 4. Set wire_test_timestamp = now()
// 5. Update HubSpot record
// 6. Poll Salesforce by Sync_Anchor__c until Wire_Test_2__c matches and Wire_Test_Run_ID__c matches
// 7. Record lag_seconds in ledger
Step 4: Record Results in Ledger
# View ledger summary
node scripts/lib/wire-test-ledger.js summary <run-id>
# View probe results
node scripts/lib/wire-test-ledger.js probes <run-id>
Parallel Execution: For multiple pairs, execute probes in parallel (up to 5 concurrent) to reduce overall test time.
Objective: Identify one-to-many and many-to-one ID relationships
# Detect collisions for Account and Contact
node scripts/lib/wire-test-validator.js collisions Account Contact
Collision Types:
Output: JSON with collision details (IDs, Sync Anchors, counts)
Objective: Generate JSON, Markdown, and PDF reports with guidance
const Reporter = require('./scripts/lib/wire-test-reporter');
const Ledger = require('./scripts/lib/wire-test-ledger');
const config = require('./scripts/lib/wire-test-config-loader').load('./wire-test-config.json');
const ledger = new Ledger(config.run_id);
const reporter = new Reporter(config, ledger, {
collisions: collisionResults,
validation: validationResults
});
await reporter.generateAllReports('./wire-test-reports');
Outputs:
Report Sections:
Objective: Revert Wire Test field changes if configured
Only if revert_changes: true in config:
// For each tested sync anchor:
// 1. Read original Wire_Test_1__c and Wire_Test_2__c values from ledger
// 2. Restore to original values
// 3. Clear Wire_Test_Run_ID__c, Wire_Test_Timestamp__c
Note: Sync Anchors and ID history fields are NEVER reverted.
Salesforce Connectivity Error:
Action: Re-authenticate Salesforce org
Command: sf org login web --alias <org-alias>
HubSpot Connectivity Error:
Action: Verify HubSpot access token
Command: Check HUBSPOT_PRIVATE_APP_TOKEN in .env
Missing Fields/Properties:
Action: Run Phase 1 (Schema Setup) automatically
Guidance: Provide field deployment commands
Timeout (Exceeds SLA):
Complete Failure (Both Directions):
Partial Failure (One Direction):
Action: Provide deduplication guidance
Use Task tool for specialized operations:
Do NOT create new agents - all functionality exists in library scripts.
# 1. Configure test
cat > wire-test-config.json <<EOF
{
"run_id": "{{UUID}}",
"timestamp": "{{TIMESTAMP}}",
"sla_seconds": 240,
"polling_interval_seconds": 10,
"object_types": ["account", "contact"],
"account_selectors": [
{"type": "sfdc_account_id", "value": "001XXXXXXXXXXXXXXX"},
{"type": "domain", "value": "acme.com"}
],
"salesforce": {
"orgAlias": "production"
}
}
EOF
# 2. Run pre-flight validation
node scripts/lib/wire-test-validator.js preflight
# 3. If missing fields, deploy schema
node scripts/lib/wire-test-sf-operations.js deploy
node scripts/lib/wire-test-hubspot-properties.js setup-all
# 4. Backfill Sync Anchors
node scripts/lib/wire-test-sf-operations.js backfill Account 200
node scripts/lib/wire-test-hubspot-operations.js backfill company 100
# Wait 5 minutes for connector sync
# 5. Execute probes (orchestrate via custom script)
# 6. Detect collisions
node scripts/lib/wire-test-validator.js collisions Account
# 7. Generate reports
# (Use reporter library as shown in Phase 5)
Test Run is Successful When:
Test Run is Blocked When:
See templates/wire-test-config.template.json for full configuration options.
Required:
salesforce.orgAlias - Salesforce org to testaccount_selectors - Which accounts to testobject_types - Which objects to testOptional:
sla_seconds (default: 240)polling_interval_seconds (default: 10)sample_size_per_account (default: 20)revert_changes (default: true)dry_run (default: false)After test execution, provide:
Example User Message:
✅ Live Wire Sync Test Complete
Summary:
- Tested: 10 account pairs
- SF→HS: 9/10 passing (avg lag: 45s)
- HS→SF: 7/10 passing (avg lag: 62s)
- Collisions: 2 detected
Overall Health: ⚠️ WARNING
Top Actions:
1. Fix HS→SF sync for 3 accounts (check connector mapping)
2. Resolve 2 one-to-many collisions (dedupe SF records)
3. Optimize sync performance (avg lag >1 minute)
Reports:
- JSON: ./wire-test-reports/wire-test-report-2025-11-07-150405.json
- Markdown: ./wire-test-reports/wire-test-report-2025-11-07-150405.md
- PDF: ./wire-test-reports/wire-test-report-2025-11-07-150405.pdf
Version: 1.0.0 Last Updated: 2025-11-07 Maintained By: RevPal Engineering