npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

drivia-legion-ai

v2.0.0

Published

Drivia Legion AI — AI-powered lead generation + conversion engine. 15+ ed-tech personas, 10+ scraping sources, 6 sales psychology frameworks (Carnegie, Cialdini, Ziglar, Cardone, Covey, Voss), multi-AI fallback (Claude → Gemini → OpenAI), plain email form

Readme

@drivia/legion-ai

Drivia Legion AI — AI-powered lead generation + conversion engine for Drivia.

Private package. UNLICENSED. Do not distribute.

What It Does

Drivia Legion AI is the intelligence layer behind Drivia's automated outreach system. It:

  1. Scrapes 15+ ed-tech personas from Reddit, Dev.to, HN, Adzuna, Product Hunt, GitHub, RemoteOK, Arbeitnow
  2. Scores leads by purchase intent signal strength (keyword-based, 0–100)
  3. Tags leads into one of 15+ personas for hyper-personalized emails
  4. Writes AI emails using 6 sales psychology frameworks (Carnegie, Cialdini, Ziglar, Cardone, Covey, Voss)
  5. Tracks clicks with UTM attribution — see exactly who clicked which email
  6. Negotiates replies with multi-turn AI that drives to booking calls (never quotes prices)
  7. Multi-AI fallback — Claude → Gemini → OpenAI ensures 99.9% uptime
  8. Q-learning integration — reinforcement learning optimizes outreach strategy over time
  9. Plain email format — looks like a personal email from Wilson, not marketing spam

The 15+ Target Personas

| Tag | Persona | Pain Point | |-----|---------|------------| | upskilling | Upskilling Seeker | No clear learning path | | job_seeker | Job Seeker | Skills gap costing interviews | | career_change | Career Changer | No on-ramp into tech | | newsletter | Newsletter Builder | Audience growth too slow | | educator | Educator / Teacher | Overwhelmed by repetitive Q&A | | course_creator | Course Creator | Students not completing courses | | edtech_builder | Ed-Tech Builder | 18+ months to build AI learning infra | | personalization_accessibility | Personalization Champion | One-size-fits-all fails diverse learners | | ai_in_education | AI in Education | Generic LLMs not built for learning | | distribution | Content Creator | Content takes forever, growth is random | | corporate_training | Corporate Trainer / L&D | Onboarding slow, compliance painful | | homeschool | Homeschool Parent | Doing it alone is exhausting | | k12 | K-12 Administrator | Student engagement declining | | disability | Special Ed / Disability | IEP compliance overwhelming, tools don't adapt | | charter_school | Charter School Innovator | Need to differentiate from traditional | | healthcare | Healthcare / CE | CE credits and compliance are painful |

6 Sales Psychology Frameworks

| Framework | Author | When Used | |-----------|--------|-----------| | Carnegie | "How to Win Friends" | Educators, job seekers — empathy-first | | Cialdini | "Influence" | Newsletter, distribution — social proof + scarcity | | Ziglar | "Secrets of Closing" | Career changers — feel/felt/found technique | | Cardone | "Sell or Be Sold" | Ed-tech builders, corporate — assume the sale | | Covey | "7 Habits" | General — seek to understand first | | Voss | "Never Split the Difference" | Negotiations — tactical empathy + calibrated questions |

Negotiation Rules

The AI negotiation engine follows strict rules:

  • NEVER quotes prices — all pricing discussed on booking calls only
  • Always drives to booking — every reply ends with https://drivia.consulting/book
  • Under 80 words — casual, warm, confident tone
  • Multi-turn context — remembers full conversation history
  • Graceful unsubscribe — negative/spam replies handled with class

Usage

import {
  DRIVIA_PERSONAS,
  scoreLead,
  extractTags,
  filterHighValue,
  BOOKING_URL,
  AI_MODELS,
  NEGOTIATION_RULES,
} from "@drivia/legion-ai";

import { pickFramework } from "@drivia/legion-ai/frameworks";
import { REDDIT_SUBS, DEVTO_TAGS } from "@drivia/legion-ai/sources";

// Score a scraped post
const lead = scoreLead({
  name: "sarah_dev",
  source: "reddit",
  source_url: "https://reddit.com/r/cscareerquestions/...",
  source_title: "How do I break into AI without a CS degree?",
  source_body: "I've been trying to learn Python but don't know which course to take...",
});
// => { score: 75, tags: ["upskilling", "career_change", "ai_interest"], ... }

// Get all high-value leads (score >= 40)
const hotLeads = filterHighValue(leads, 40);

// Pick the right sales framework for this lead
const framework = pickFramework(lead.tags);
// => { name: "Ziglar+Carnegie", description: "Find their pain..." }

// Get persona config for a tag
import { getPersonaByTag } from "@drivia/legion-ai/personas";
const persona = getPersonaByTag("edtech_builder");
// => { emailAngle: "The AI learning infrastructure...", framework: "Cardone+Authority", ... }

Architecture

┌─────────────────────────────────────────────────────┐
│                  Drivia Legion AI                     │
├─────────────────────────────────────────────────────┤
│                                                       │
│  ┌─────────┐  ┌──────────┐  ┌──────────────────┐   │
│  │ Scraper  │→│ Scoring  │→│ Tag + Persona     │   │
│  │ (10+     │  │ Engine   │  │ Assignment        │   │
│  │ sources) │  │ (0-100)  │  │ (15+ personas)    │   │
│  └─────────┘  └──────────┘  └──────────────────┘   │
│       ↓                            ↓                  │
│  ┌─────────┐  ┌──────────┐  ┌──────────────────┐   │
│  │ Email   │→│ Hunter.io│→│ Verification      │   │
│  │ Enrich  │  │ + GitHub │  │ (bounce guard)    │   │
│  └─────────┘  └──────────┘  └──────────────────┘   │
│       ↓                            ↓                  │
│  ┌─────────┐  ┌──────────┐  ┌──────────────────┐   │
│  │ AI      │→│ Framework│→│ Send via Resend   │   │
│  │ Writer  │  │ Selector │  │ (plain personal)  │   │
│  │ (3 LLMs)│  │ (6 types)│  │ + BCC archive     │   │
│  └─────────┘  └──────────┘  └──────────────────┘   │
│       ↓                            ↓                  │
│  ┌─────────┐  ┌──────────┐  ┌──────────────────┐   │
│  │ Follow  │→│ Reply    │→│ AI Negotiation    │   │
│  │ Up (4   │  │ Detect   │  │ → Book Call       │   │
│  │ steps)  │  │ + Route  │  │ (never prices)    │   │
│  └─────────┘  └──────────┘  └──────────────────┘   │
│                                                       │
│  Supabase Edge Functions + pg_cron scheduling        │
│  Multi-AI: Claude → Gemini → OpenAI fallback         │
│  Q-Learning: Strategy optimization over time          │
└─────────────────────────────────────────────────────┘

Edge Functions

| Function | Purpose | |----------|---------| | lead-gen-agent | Main orchestrator: scrape → enrich → write → send → follow-up | | lead-scraper | High-volume parallel scraping (called per-source by cron) | | legion-ai-pipeline | Conversational email pipeline with A/B subjects + social proof | | lead-gen-negotiate | AI negotiation engine for inbound replies |

Changelog

v2.0.0 (2026-03-16)

Breaking Changes:

  • Removed DISCOUNT_LADDER and DRIVIA_PRICES — AI never quotes prices now
  • Negotiation drives exclusively to booking calls at drivia.consulting/book

New Features:

  • 6 new personas: corporate_training, homeschool, k12, disability, charter_school, healthcare
  • 6 sales psychology frameworks module (frameworks.ts)
  • Scraping sources module (sources.ts) with all Reddit, Dev.to, HN, Adzuna configs
  • Multi-AI fallback: Claude → Gemini 2.0 → OpenAI gpt-4o-mini
  • Follow-up time budgeting (110s) to prevent edge function timeouts
  • Plain personal email format (no branded headers)
  • Booking-first negotiation with master sales psychology prompt
  • Inbound email forwarding fix (replies now properly processed)
  • Unified email identity: [email protected] / reply.drivia.consulting

v1.0.0 (2025-12-15)

  • Initial release: 10 personas, scoring, discount ladder, UTM tracking