BUILDZN / WORK
Sales call to CRM sync
Turn synthetic transcripts into grounded CRM diffs and follow-up drafts, with approval required for every write.

Synthetic data. This is a portfolio implementation with recorded command line runs. No customer data, paid model calls or hosting deployment were used.
Tests and demos use a deterministic mock provider. A Claude adapter sits behind the same interface; its live quality remains unmeasured.
Problem
Calls contain multiple speakers, missing facts and contradictory budgets or dates. A CRM update needs traceable evidence and review of the exact change to an existing record.
Architecture
1. Extract with provenance
A mock or Claude provider proposes supported fields with verbatim quotes and speaker labels. Field-specific checks reject unsupported evidence.
2. Merge all chunks
Long transcripts are processed in chunks. Overlap is merged by source statement, while separate conflicting statements remain flagged.
3. Show the exact diff
PostgreSQL stores the before/after proposal, evidence, ambiguity flags and base CRM version. Missing fields preserve existing values.
4. Approve and apply
The trusted operator approves a canonical diff hash. An optimistic version check, CRM write and audit commit atomically; repeated calls or applies reuse checkpoints.
Tradeoffs
- Grounding deliberately uses a limited English/Urdu phrase set. Unsupported language or values require review.
- Next week means the next Monday in the call timezone and is flagged as an interpretation.
Test results
30 distinct test cases passed in at least one appropriate environment. Zero failures in the linked CI run.
| Environment | Passed | Skipped |
|---|---|---|
| Native PostgreSQL | 30 | 0 |
| Embedded PostgreSQL | 30 | 0 |
No test cases were skipped in either environment.
Tests cover separate speakers, shared-company contacts, distant conflicts in a 4,000-line transcript, stale approvals, lost work and repeated applies.
Docker Compose built and ran the seeded demo from a fresh Actions checkout. These fixture measurements do not establish production accuracy, security certification or business outcomes.
Verified code: cc1bc499c73958e810218b9baee00d2c6fd3f8e0
Recorded demo output
Real stdout from the Docker demo in the linked CI run. All records, identities and messages are synthetic.
All data synthetic. No external CRM writes or messages.
Review diff: {
"contacts": {
"after": [
"Amina",
"Bilal"
],
"before": []
},
"nextStep": {
"after": "send proposal next week",
"before": null
},
"budgetMinor": {
"after": 1000000,
"before": 500000
},
"nextStepDate": {
"after": "2026-01-26",
"before": null
}
}
Flags: [ 'crm-contradiction:budgetMinor', 'vague-next-week:2026-01-26' ]
Follow-up draft: Synthetic follow-up draft. Proposed next step: send proposal next week. Review flags: crm-contradiction:budgetMinor, vague-next-week:2026-01-26.
Before approval CRM version: 1
Dry run: dry-run
Explicitly approved apply: applied
Retry: already-applied
Audit records: 1Read the recorded output in the repository ↗Known limits
- The CRM is a PostgreSQL-backed mock, with no real CRM writes or follow-up messages.
- Speaker labels must already be present; there is no audio transcription or diarization.
- Transcripts are limited to one million UTF-16 code units. Live Claude quality is unmeasured.