feat: prototype lead-scoring module (ICP gate + intent + routing)#7
Open
bdevierno1 wants to merge 1 commit into
Open
feat: prototype lead-scoring module (ICP gate + intent + routing)#7bdevierno1 wants to merge 1 commit into
bdevierno1 wants to merge 1 commit into
Conversation
…trix) Encodes ICP Scoring Rubric and Lead-Scoring Model (Fit x Intent): - ICP gate: 6 positive attributes (+10 to +25) + 5 negative signals (-20 to -40) - Intent signals: 8 behavioral events with point values and decay windows - Routing matrix: all 6 Fit x Intent combinations with owner and SLA - Feature flag: LEAD_SCORING_ENABLED=1 (default off) + LEAD_SCORING_KILL_SWITCH - Endpoints: GET /status, GET /rubric, POST /score (503 when disabled) - 19 tests covering score math, band boundaries, routing, flag behavior Co-Authored-By: Vecna <noreply@vecna.ai>
4c8802b to
ddfb04f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
backend/app/services/lead_scorer.py— a self-contained lead-scoring module encoding the Vecna ICP Scoring Rubric and Fit × Intent model.Three public entry points:
score_fit(profile)score_intent(signals, now)evaluate_lead(profile, signals, now)ScoringResultICP positive signals encoded (firmographic + technographic):
ICP negative signals encoded:
Intent signals with per-signal decay windows (7–30 days):
pricing page visit, demo booked/attended, docs deep-read, competitor comparison, free-trial signup, repeat multi-contact, email open, unsubscribe (permanent).
Routing matrix (all 6 cells):
ae_same_daynurture_contentae_qualify_hardnurture_rescoreself_servesuppressWhy
Operationalises the ICP Scoring Rubric and Lead-Scoring Model as testable, deterministic Python — executable by API callers, background jobs, or the Vecna agent runtime.
How to verify
tests/test_api.pyfails to importfastapiin the local dev environment — this is a pre-existing issue unrelated to this PR (confirmed onmainbefore this branch).Out of scope
/api/leads/score) — deferred to follow-upRollback
Delete the two files; no migrations, no schema changes, no API surface changes.
🤖 Generated with Vecna
Co-Authored-By: Vecna noreply@vecna.ai