# Implementation Plan: Candidate Scoring and Classification (HOT / WARM / WATCH)

## Goal Description
The objective of this task is to design and implement an evidence-based, domain-agnostic candidate scoring and classification engine. The engine evaluates raw candidate accounts and market signals against campaign-specific qualification parameters to classify candidates into three actionable tiers: **HOT**, **WARM**, and **WATCH**. 

For the **Pilot Campaign** (*Enterprise Software Licensing & Cost Optimization — Europe*), this scoring model will prioritize candidate companies based on verifiable evidence of licensing pain, urgency triggers (e.g., vendor renewal cycles, audits, M&A, cloud migration), enterprise scale, and decision-maker availability, directly feeding the MVP target of producing the first 10 high-quality Lead Cards.

---

## User Review Required

> [!IMPORTANT]
> **Domain-Agnostic Engine vs. Campaign Configuration**:
> The core scoring engine treats scoring criteria, weights, signal taxonomies, and threshold boundaries strictly as declarative configuration. No company names, vendor products, or regional parameters are hard-coded into the evaluation algorithms.

> [!NOTE]
> **Zero Autonomous Outreach**:
> Classification into `HOT` only queues candidates for Lead Card generation and manual human review; no external communication channels will be triggered.

---

## Open Questions

> [!NOTE]
> 1. **Threshold Calibration**: Would you prefer strict percentile-based categorization (e.g., Top 15% HOT, Next 35% WARM, remainder WATCH) or absolute score cutoffs (e.g., HOT $\ge 80$, WARM $\ge 50$, WATCH $< 50$)? The plan assumes absolute thresholds with confidence dampeners by default.
> 2. **Signal Decay Rate**: For timing and trigger events, what is the default decay horizon (e.g., signals older than 90 days losing 50% weight, older than 180 days dropping to baseline)?

---

## Architecture & Scoring Methodology

```mermaid
flowchart TD
    subgraph Input["Candidate Ingestion & Signals"]
        A["Candidate Account"] --> D["Evidence Normalizer"]
        B["Signal Events (Provenance & Dates)"] --> D
        C["Identified Roles / Contacts"] --> D
    end

    subgraph Config["Campaign Configuration (Pilot: Europe Licensing)"]
        CFG1["ICP Profile Weights (Fit)"]
        CFG2["Signal & Trigger Weights (Need & Urgency)"]
        CFG3["Role & Reachability Weights (Actionability)"]
        CFG4["Classification Thresholds"]
    end

    subgraph Engine["Domain-Agnostic Scoring Engine"]
        D --> E["Dimension 1: ICP Fit (0-100)"]
        D --> F["Dimension 2: Need & Trigger (0-100)"]
        D --> G["Dimension 3: Actionability (0-100)"]
        D --> H["Dimension 4: Evidence Confidence & Decay (0.0-1.0)"]

        CFG1 -.-> E
        CFG2 -.-> F
        CFG3 -.-> G

        E & F & G & H --> I["Composite Scoring Formula"]
        CFG4 -.-> J["Tier Classifier"]
        I --> J
    end

    subgraph Output["Classification Output"]
        J --> K["HOT (Priority for Lead Card MVP)"]
        J --> L["WARM (Nurture / Pipeline Monitoring)"]
        J --> M["WATCH (Track for Emerging Triggers)"]
        J --> N["DISQUALIFIED (Out of ICP / Irrelevant)"]
    end
```

---

## Scoring Dimensions (Engine Level)

Each candidate is evaluated across four core dimensions, parameterized by campaign configuration:

### 1. Fit Score ($S_{\text{fit}} \in [0, 100]$) — *Who they are*
Evaluates structural alignment with the Ideal Customer Profile (ICP):
- **Scale & Estate Complexity**: Revenue, employee headcount, multi-entity / multi-geography footprint.
- **Industry & Domain Vulnerability**: Propensity for high enterprise software spend and complex contractual obligations.
- **Geography**: Target operational footprint (Pilot: European headquarters or major European operating subsidiaries).

### 2. Need & Trigger Score ($S_{\text{need}} \in [0, 100]$) — *Why contact them now*
Evaluates evidence of concrete demand or commercial pressure:
- **Explicit Signal**: Public announcements of vendor restructuring, cost-reduction mandates, ERP migrations, M&A integrations, or vendor licensing disputes/audits.
- **Inferred Signal**: Tech stack footprint changes, job postings indicating software asset management (SAM) strain, cloud migrations, or contract anniversary milestones.
- **Timeliness / Urgency**: Recency of trigger event (e.g., trigger identified $\le 30$ days ago vs. $\ge 180$ days ago).

### 3. Actionability Score ($S_{\text{action}} \in [0, 100]$) — *Who to reach and how*
Evaluates reachability and operational clarity:
- **Decision-Maker Identification**: Confirmed presence of relevant budget holders (e.g., CIO, CFO, VP IT Procurement, Head of Vendor Management).
- **Value Proposition Match**: Clear alignment between identified pain and pilot service offerings (e.g., contract negotiation, SAM compliance audit prep, license rationalization).

### 4. Confidence & Provenance Multiplier ($C_{\text{prov}} \in [0.1, 1.0]$)
A penalty/discount factor based on signal reliability:
- Direct primary sources (regulatory filings, official press releases, official procurement portals): $1.0$.
- Secondary sources (industry news, verified job postings): $0.85$.
- Inferred or aggregate indicators: $0.6 - 0.7$.
- Signal age decay: Exponential decay based on days elapsed since signal observation date.

### Composite Score Formula
$$\text{Score}_{\text{composite}} = \left( w_{\text{fit}} \cdot S_{\text{fit}} + w_{\text{need}} \cdot S_{\text{need}} + w_{\text{action}} \cdot S_{\text{action}} \right) \times C_{\text{prov}}$$
*(Where $w_{\text{fit}} + w_{\text{need}} + w_{\text{action}} = 1.0$)*

---

## Tier Classification & Operational Definitions

| Tier | Score Range | Criteria Requirements | Operational Action |
| :--- | :--- | :--- | :--- |
| **HOT** | $\ge 75$ | • High ICP fit ($S_{\text{fit}} \ge 70$)<br>• Active trigger event $\le 90$ days old ($S_{\text{need}} \ge 70$)<br>• Identified target role / department<br>• Confirmed provenance | Immediate progression to **Lead Card Generation (MVP)**. Prioritized for manual verification. |
| **WARM** | $50 - 74$ | • Strong ICP fit ($S_{\text{fit}} \ge 60$)<br>• Moderate or latent need (e.g., planned migration, upcoming renewal in 6–12 months)<br>• Target role identified or identifiable | Placed in candidate pool for secondary enrichment or periodic monitoring until urgency increases. |
| **WATCH** | $30 - 49$ | • Meets baseline ICP criteria (European enterprise with relevant estate)<br>• No immediate active trigger or weak signal recency | Stored in monitoring queue. Scheduled for automated/periodic signal rescanning. |
| **DISQUALIFIED** | $< 30$ or Knockout | • Below minimum size threshold<br>• Irrelevant jurisdiction / non-European<br>• Confirmed long-term locked multi-year agreements or zero target vendors | Archived with exclusion rationale. Prevents duplicate scraping/processing. |

---

## Proposed Schema Definitions

### 1. Candidate Scoring Record Schema (`candidate_score.json`)
```json
{
  "candidate_id": "cand_eur_ent_042",
  "campaign_id": "pilot-enterprise-software-licensing-europe",
  "evaluated_at": "2026-10-08T13:45:00Z",
  "tier": "HOT",
  "composite_score": 82.4,
  "confidence_multiplier": 0.95,
  "dimension_breakdown": {
    "fit": {
      "score": 85.0,
      "weight": 0.35,
      "factors": [
        {"factor": "scale_revenue_tier", "value": "€1.2B", "points": 90},
        {"factor": "geography", "value": "DACH / Headquarters Germany", "points": 80}
      ]
    },
    "need_and_trigger": {
      "score": 82.0,
      "weight": 0.45,
      "factors": [
        {"factor": "trigger_type", "value": "Major Vendor Audit & Renewal Window", "points": 90},
        {"factor": "signal_recency_days", "value": 18, "decay_applied": 0.0}
      ]
    },
    "actionability": {
      "score": 78.0,
      "weight": 0.20,
      "factors": [
        {"factor": "target_role_coverage", "value": "VP IT Procurement & Head of SAM identified", "points": 85}
      ]
    }
  },
  "evidence_provenance": [
    {
      "signal_id": "sig_91823",
      "source_url": "https://example.com/press/annual-report-2025",
      "observed_date": "2026-09-20",
      "source_type": "official_financial_filing",
      "snippet": "Initiating comprehensive cost rationalization across enterprise software infrastructure..."
    }
  ],
  "classification_summary": "High-priority enterprise candidate undergoing active software estate rationalization with immediate executive target identified.",
  "recommended_next_step": "GENERATE_LEAD_CARD"
}
```

---

## Execution & Rollout Plan

### Phase 1: Engine Specification & Configuration Mapping
1. Define the configuration parameters for the pilot campaign (`pilot-campaign-definition-v1.md`), specifying:
   - Target revenue / employee thresholds.
   - Specific software licensing trigger signals (e.g., vendor renewal cycles, SAP S/4HANA transition deadlines, Broadcom/VMware renewals, Oracle licensing audits).
   - Target personas (CIO, CFO, VP Procurement, SAM Lead).
2. Set default weight distribution: Fit ($0.35$), Need & Trigger ($0.45$), Actionability ($0.20$).

### Phase 2: Scoring Execution on Initial Candidate Batch
1. Ingest candidate pool gathered for the pilot campaign.
2. Calculate dimension scores and apply provenance/recency decay.
3. Classify candidates into `HOT`, `WARM`, and `WATCH`.

### Phase 3: Selection & Quality Validation for MVP
1. Rank all `HOT` candidates by composite score.
2. Select the top 10 candidates to advance to **Lead Card Generation**.
3. Conduct manual review against the project acceptance criteria:
   - *Target: At least 5 of 10 must be verified as genuinely worth contacting.*
4. Record feedback to calibrate weights and thresholds for subsequent iterations.

---

## Verification Plan

### Automated Validation Checks
- **Schema & Provenance Compliance**: Ensure every scored candidate contains valid `source_url`, `observed_date`, and non-empty evidence snippets.
- **Domain Independence**: Validate that the scoring code relies solely on configuration models without hard-coded campaign names, industries, or vendors.
- **Deterministic Scoring**: Test that identical candidate inputs and configurations produce reproducible scores and tier assignments.

### Manual Review Checkpoints
- **Audit Top 10 `HOT` Candidates**: Manually verify whether each candidate demonstrates a clear current/emerging need, an applicable service match, an identified target role, and an immediate reason to contact now.
- **Threshold Sensitivity Review**: Confirm that candidates with stale signals (> 180 days) or missing decision-makers are properly demoted to `WARM` or `WATCH`.