jaizendra-netizen / ai-sdr-review-router
PHP CLI and library: route AI-written outreach drafts to auto send or human review with simple rules you set (price mention, link count, confidence, first touch).
Package info
github.com/jaizendra-netizen/ai-sdr-review-router
Type:project
pkg:composer/jaizendra-netizen/ai-sdr-review-router
Requires
- php: >=8.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-30 00:16:55 UTC
README
PHP command line tool and library. Give it a CSV with one row per outreach draft written by an AI tool (the confidence score your drafting tool reports, whether the draft mentions a price, whether it is a first touch, and how many links it holds) and it sorts each draft into auto send or human review, and prints the reason. These are plain rules that you set, not a model: the tool never reads or judges the text of a draft, and the confidence score is whatever your own tool gave you. Rules run in this order and the first match wins: (1) mentions_price is yes, human review: mentions price; (2) links above --max-links, human review: too many links; (3) confidence below --min-confidence, human review: low confidence; (4) first_touch is yes and confidence below --first-touch-confidence, human review: first touch below its bar; (5) otherwise auto send. Every limit is set by you: the defaults of 0.8, 1 and 0.9 are only starting values, not recommendations. A confidence exactly equal to a limit passes. The totals show the share needing review as a percentage with 1 decimal, and a count per reason.
Part of the OneGTMLab free GTM tools. Background on the idea: AI SDR.
Install
composer require jaizendra-netizen/ai-sdr-review-router
Use
Input is a CSV with the columns draft_id, confidence, mentions_price, first_touch and links. Column names are matched without regard to case and may be in any order. confidence is a number from 0 to 1 written like 0.85; mentions_price and first_touch are yes or no (any case); links is a whole number of 0 or more; draft_id must be unique. Options --min-confidence N (default 0.8), --max-links N (default 1) and --first-touch-confidence N (default 0.9), all set by you. The command stops at the first bad row and names it. A bad confidence, yes or no, links count or option value, a duplicate draft_id, a missing column, a row with the wrong number of cells or a file with no drafts exits 1 with a message; an unreadable file, an unknown option or a missing argument exits 2.
$ php bin/ai-sdr-review-router sample.csv --min-confidence 0.8
draft-01 (confidence 0.95): auto send
draft-02 (confidence 0.92): human review: mentions price
draft-03 (confidence 0.88): human review: too many links
draft-04 (confidence 0.62): human review: low confidence
draft-05 (confidence 0.85): human review: first touch below its bar
draft-06 (confidence 0.80): auto send
draft-07 (confidence 0.97): human review: mentions price
draft-08 (confidence 0.81): human review: too many links
draft-09 (confidence 0.9): auto send
drafts: 9
auto send: 3
human review: 6
share needing review: 66.7%
per reason:
human review: mentions price: 2
human review: too many links: 2
human review: low confidence: 1
human review: first touch below its bar: 1
auto send: 3
Test
php tests/run.php
Offline, no network calls, no dependencies beyond the language runtime. MIT licensed.