Imprevista

Deploy Log

← Back to Deploy Log
|Marketing Bot|DEPLOYED

Add SKU classifier — segment deals before pricing (fixes blended fanouts) (#12)

Charles caught 6 fanout fact blocks that blended incompatible SKUs into one price range: complete rifles with lowers/parts (KAC SR-15 "$1,060-$3,000"), new with refurbished (Vortex AMG), optics-ready with

Charles caught 6 fanout fact blocks that blended incompatible SKUs into one price range: complete rifles with lowers/parts (KAC SR-15 "$1,060-$3,000"), new with refurbished (Vortex AMG), optics-ready with non-optics (CZ Shadow 2, Century AP5), and ammo priced per-clip instead of per-round (M855A1). A price stat over a heterogeneous population is meaningless.

Durable fix:

  • agents/gda/gsc-refresh/dealClassifier.js: parses each deal TITLE into

(category, condition, variant, ammo cents-per-round). Component words ("lower"/"upper"/"receiver"/"rail") always win over the bracket tag, so a "[Rifle] ... Lower Receiver" classifies as parts not rifle. Ammo only triggers on [Ammo] tag or a real CPR/rds-price signal — "30 Round" magazine capacity no longer false-positives. segmentDeals() groups into coherent buckets and computes stats PER bucket.

  • agent.js: enrichWithSegments() fetches recent-deals per opportunity and

attaches the segmented breakdown; dry-run output prints "SKU SEGMENTS (mixed — do NOT blend)" so the mistake is visible at the source before any content is written.

  • repost-corrected-fanouts.cjs: rejected the 6 blended drafts + reposted

segment-aware versions (e.g. KAC now leads with "only complete rifles count here"; M855A1 priced per round; MK18 flagged as parts-only).

  • tasks/lessons.md: captured the rule.

Verified: classifier splits KAC into parts(n=4 $1060-1099) + rifle(n=1 $2999); MK18 shows 3 parts buckets, no complete gun; corrected previews render the segmented copy.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files Changed

Commit:7f025a4