Acquisitions Dispatch Prompt Tester
Test the quo-handler dispatch prompt without sending real SMS.
How to Test
1. Score a message draft against Tier A benchmarks
const { scoreResponse, shouldReject } = require('/home/opsadmin/.openclaw/workspace/scripts/lib/response-scorer');
const { CATEGORIES } = require('/home/opsadmin/.openclaw/workspace/scripts/lib/conversation-classifier');
// Test a generated response
const result = scoreResponse('yessir', 'D', CATEGORIES.D);
console.log(result);
// { score: 100, issues: [], passed: true }
const result2 = scoreResponse('Certainly! I would be happy to help you with that. Would you prefer to schedule a showing on Thursday or Friday?', 'D', CATEGORIES.D);
console.log(result2);
// { score: 20, issues: ['AI filler detected', 'Forced question on acknowledgment category', 'Too long: 112 chars (target: 3-20)'], passed: false }2. Classify an inbound message
const { classify } = require('/home/opsadmin/.openclaw/workspace/scripts/lib/conversation-classifier');
const result = classify('ok sounds good', { gate: 3, relationship: 'active' });
console.log(result);
// { category: { id: 'D', name: 'acknowledgment', ... }, confidence: 0.9, reason: 'Short confirmation' }3. Compute gate state
const { computeGate, gatePromptLine } = require('/home/opsadmin/.openclaw/workspace/scripts/lib/gate-computer');
const result = computeGate({ property_address: '123 Main St', asking_price: 500000 });
console.log(gatePromptLine(result));
// "Gate 2 (Visual & Access). Still need: photos, access. Next ask: photos or how to get access"4. Get winning examples for a category
const { formatForPrompt } = require('/home/opsadmin/.openclaw/workspace/scripts/lib/winning-examples');
console.log(formatForPrompt('D_acknowledgment'));
// Real winning examples (Tier A, 84% response rate):
// - "yessir"
// - "copy"
// - "will do"
// - "on it"Test Scenarios
Run these to verify the dispatch prompt produces Tier A quality:
| Scenario | Inbound | Expected Category | Expected Response Style |
|---|---|---|---|
| CH confirms info | ”ok sounds good” | D (ack) | “copy” or “yessir” (3-20 chars) |
| CH sends details | ”123 Main St, asking $500k, 3bd/2ba, vacant” | B (details dump) | Stack 2-3 specific Qs (20-80 chars) |
| CH says deal sold | ”it just sold” | F (deal sold) | “what did it go for? any others?” (40-80 chars) |
| Price discussion | ”your offer is too low” | H (objection) | Short response or suggest call (20-80 chars) |
| Deep relationship | ”hey man whats up” | K (check-in) | Casual + pipeline ask (30-60 chars) |
| CH is spammy | ”????????” | L (boundary) | “i’ll get with you tomorrow am” (10-40 chars) |
Key Modules
| Module | Path | Purpose |
|---|---|---|
| conversation-classifier.js | scripts/lib/ | 13-category classification |
| gate-computer.js | scripts/lib/ | Gate 1-5 from deal fields |
| thread-context.js | scripts/lib/ | Fetch recent thread history |
| winning-examples.js | scripts/lib/ | Category-specific Tier A examples |
| response-scorer.js | scripts/lib/ | Score against benchmarks |
| winning-examples.json | data/ | Tier A examples (refreshed nightly) |