Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeadGate — Lead Quality Gate for Demand Generation, built by Brewcontent.ai

LeadGate

Lead Quality Gate for Demand Generation Built by Brewcontent.ai

2026 demand-gen research keeps landing on the same problem: teams are drowning in lead volume without proportional quality gains. 68% of marketers are increasing lead volume year over year, but only 32% say quality has improved to match. High-volume channels — content syndication, generic display, broad webinar promotions — quietly produce lots of MQLs that never convert to pipeline. And most teams skip the Sales-Accepted-Lead (SAL) checkpoint entirely, so marketing's definition of "qualified" and sales' definition never get reconciled until a rep is already annoyed in a CRM comment.

LeadGate is a small, focused CLI that scores a lead export against a configurable rubric — before a lead ever reaches a rep's queue:

  1. Fit — ICP match on industry, employee count, and excluded countries.
  2. Intent — engagement score, page views, and any required signals (demo requested, pricing page viewed, etc.) you define.
  3. Source quality — per-channel weighting, so a lead from a historically low-converting channel is scored accordingly (or auto-rejected via a blocklist).

Each lead gets a PASS / HOLD / REJECT verdict with specific reasons — plus an aggregate pass-rate-by-channel breakdown, so "which sources are wasting SDR time" has a number behind it instead of a hunch.

It also ships a diff command: score the same lead batch against marketing's MQL rubric and sales' SAL rubric side by side, and see exactly where the two definitions disagree.

Install

pip install -e .

Requires Python 3.9+.

Usage

Score a lead export against a rubric:

leadgate gate examples/leads.csv --rubric examples/mql_rubric.yaml

If your CSV headers don't match LeadGate's canonical field names (lead_id, source, industry, employee_count, country, engagement_score, page_views, plus any signal columns your rubric references), supply a column mapping:

leadgate gate my_hubspot_export.csv --rubric examples/mql_rubric.yaml --mapping examples/column_mapping.example.yaml

Export the full report as JSON (for a CI gate, a dashboard, or a scheduled Slack digest):

leadgate gate examples/leads.csv --rubric examples/mql_rubric.yaml --json report.json --quiet

Diff marketing's MQL bar against sales' SAL bar on the same batch:

leadgate diff examples/leads.csv \
  --marketing-rubric examples/mql_rubric.yaml \
  --sales-rubric examples/sal_rubric.yaml

Example output

LeadGate — Lead Quality Gate for demand generation
Built by Brewcontent.ai

Rubric: Marketing MQL Rubric   Leads scored: 10

                Gate Summary
┌─────────┬───────┬───────┐
│ Verdict │ Count │ Share │
├─────────┼───────┼───────┤
│ PASS    │ 5     │ 50%   │
│ HOLD    │ 2     │ 20%   │
│ REJECT  │ 3     │ 30%   │
└─────────┴───────┴───────┘

        Pass Rate by Source (worst first)
┌─────────────────────┬───────┬───────────┐
│ Source               │ Total │ Pass Rate │
├─────────────────────┼───────┼───────────┤
│ generic_display       │ 2     │ 0%        │
│ content_syndication   │ 2     │ 0%        │
│ webinar               │ 2     │ 50%       │
│ organic_search        │ 2     │ 100%      │
│ referral              │ 2     │ 100%      │
└─────────────────────┴───────┴───────────┘

Rubric format

A rubric is a plain YAML file — see examples/mql_rubric.yaml and examples/sal_rubric.yaml for fully commented examples:

name: "Marketing MQL Rubric"
fit:
  industries: ["SaaS", "Fintech"]
  employee_count_min: 20
  employee_count_max: 10000
  excluded_countries: []
intent:
  min_engagement_score: 30
  required_signals: []          # e.g. ["demo_requested"]
  min_page_views: 2
sources:
  weights:
    organic_search: 1.15
    content_syndication: 0.7
  blocklist: []                 # sources here always REJECT
thresholds:
  pass_score: 60
  hold_score: 40
weights:
  fit: 0.5
  intent: 0.5

Library usage

from leadgate import load_rubric, build_report
from leadgate.csv_loader import load_leads

rubric = load_rubric("rubric.yaml")
leads = load_leads("leads.csv")
report = build_report(leads, rubric)
print(report.pass_count, report.reject_count)

Methodology

All scoring is deterministic, local, and offline — no CRM API calls, no ML model, no data leaves your machine:

  • Fit checks industry allowlist membership, employee-count range, and excluded countries.
  • Intent scores engagement level, page views, and any rubric-defined required signals against configurable minimums.
  • Source weighting multiplies the composite score by a per-channel weight (or short-circuits straight to REJECT via the blocklist), so the "high-volume, low-quality channel" problem from the research is directly encoded, not left to a hunch.

Development

pip install -e ".[dev]"
pytest
ruff check src tests

CI runs the full test suite across Python 3.9–3.12 on every push (.github/workflows/ci.yml).

Roadmap ideas

  • Live CRM connectors (HubSpot, Salesforce) instead of CSV-only input
  • Statistical/ML-assisted scoring as an alternative to the rule-based rubric
  • A GitHub Action to gate a scheduled lead export automatically
  • Historical trend tracking (pass-rate by channel over time, not just a single snapshot)

License

MIT — see LICENSE.


Brewcontent.ai

Built by Brewcontent.ai

About

Lead Quality Gate for Demand Generation Built by Brewcontent.ai

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages