# CT Leader Intelligence — central-brain spec (2026-05-30)

**Status: DESIGN.** A CT-native automated intelligence for the **copy-leaders we
follow** — not token creators. One object per leader; one O(1) lookup on the hot
path returns the full playbook. Architecture mirrors the proven Snipping
creator-intel pattern (scorer → snapshot → hot-reload readers → event-driven
updates), re-pointed at *copy-trade wallets*.

Cold-start values are computed live in the dashboard's **🧠 Central
Intelligence** tab from this rerun's data.

---

## 1. The object — `leader-intelligence.json`

```json
{
  "generated_at": 1780150000,
  "leaders": {
    "<leader_base58>": {
      "tier": "PRIMARY|SECONDARY|PROBATION|BENCH",
      "size_mult": 1.0,
      "exit": { "mode":"FLIP|TRAIL|SWING", "tp":0, "tsl":33, "sl":24, "autosell":129,
                "ladder":{"enabled":false,"first_pct":30,"size_pct":34,"rungs":2} },
      "landing": { "target_dslot":8, "cu_price":84500, "tip_lamports":0, "lane":"durable_nonce_multirelay" },
      "evidence": { "pnl_30d":1847, "wr":62, "selectivity":4.0, "exit_n":2956,
                    "competitors":39, "winners":36, "updated":1780150000 }
    }
  }
}
```

The hot path reads **only** this (Rule 0 — no compute): `let pb =
intel.get(leader)` → size the buy by `tier/size_mult`, set CU/tip/lane from
`landing`, hand `exit` to the per-position manager (the existing
`PER_WALLET_EXIT` / S2 path). Unknown leader ⇒ BENCH (shadow, no capital).

## 2. The three layers + how each scores

### ① WHO + HOW MUCH — tier ladder  *(replaces S3 set + S3b re-screen)*
Recoverable ladder, event-driven (no time window), like the creator ladder:
`BENCH(0, shadow) ⇄ PROBATION(50%) ⇄ SECONDARY(75%) ⇄ PRIMARY(100%)`.
- **Score inputs (rolling):** realized copy-PnL, WR, **selectivity** (how clean
  the leader's feed is), **creator-clean** (E9 ≈ 0 — never a launch sniper),
  liveness/decay, single-exit fit.
- **Movement:** N losing sessions slide DOWN one rung; N winning climb UP;
  strikes reset on every move. A leader that goes dark → BENCH automatically.
- **Cold start:** the 22 COPY alphas at PRIMARY/SECONDARY (this rerun); the
  32 DON'T at BENCH/PROBATION.

### ② WHEN OUT — per-leader exit  *(S2 / PER_WALLET_EXIT, auto-derived)*
Each leader's own measured token behaviour → its exit config (the exit-recon
work, 30d). `tp=0` (arm trail from buy), `tsl`≈ measured give-back, `sl`≈
|p25 exit-ROI| trimmed, `autosell`≈1.5× p75 hold. Two species:
`FLIP` (hold ≤13s, tsl 5–8) vs `TRAIL` (peak +30–70%, tsl 25–35) vs `SWING`.
Re-derived on a rolling window. Wide-trail leaders get the `ladder` (D-1).

### ③ HOW TO LAND — competitive landing  *(L-5 CU + L-6 idx + D-7 + LAR, automated)*
**Goal: sit right behind the alpha's buy, ahead of the competing copiers.**
For each leader, from the copy-graph (who competes) + their infra (CU/tip/idx/
nonce/success) + the alpha's own landing slot:
- **target_dslot** = beat the *winning* competitors' p25 Δslot (land closer to
  the alpha than most profitable copiers),
- **cu_price** = winners' p75 CU + margin (outbid them into the slot),
- **tip** = winners' p75 tip + margin (durable-nonce ⇒ only the winner pays),
- **lane** = durable-nonce multi-relay (the path the winners use; ~99% land).

The dashboard shows the full **p25 · p50 · p75** for all competitors AND the
**winners-only recipe** per leader, plus the CT target row. (Cold start uses the
top-50 copiers as the competitor set; the live scorer widens it from the stream.)

## 3. Automation architecture (mirror Snipping's proven pattern)
- **Scorer** (one host / offline job): refresh `leader-intelligence.json` every
  N min. Slow signals (tier inputs, exit fingerprints, competitor recipe) from a
  nightly Dune pull; fast signals (live competitor landings, our own fills) from
  the gRPC stream. Atomic write.
- **Readers** (every host): hot-reload via the existing LAR/snapshot rsync-cron
  pattern. Boot-load on startup.
- **Event-driven updates** off the live stream: each CT fill outcome + each
  observed competitor landing feeds tier promote/demote, exit re-tune, and
  CU/tip-vs-competition adjustment — no time window, strikes reset on move.
- **Hot path:** single `DashMap::get(leader)` → the playbook. Zero compute,
  Rule-0 clean (the LaneDecision contract, re-used).

## 4. Maps to existing CT work
| Layer | Existing task | This adds |
|---|---|---|
| Tier ladder | S3 / S3b | automated, recoverable, event-driven (vs manual screen) |
| Per-leader exit | S2 / PER_WALLET_EXIT | auto-derived numbers from rolling exit-recon |
| Ladder rungs | D-1 | wide-trail leaders' first-rung-⅓ |
| CU / tip | L-5 / D-7 | per-leader, driven by live competitor recipe |
| Intra-slot | L-6 | target idx = beat winners' p25 |
| Routing | LAR | lane = durable-nonce multi-relay |
| Guards | RISK | unchanged (orthogonal) |

## 5. Caveats / gates (do not skip)
- **Exit numbers are SIM-first** (see `06-exit-calibration-spec.md`) — leader
  token-behaviour ≠ our realized fills; latency/slippage shift the geometry.
- **Landing target risks a tip arms-race** — "beat winners' p75" is bounded by
  durable-nonce (only the winner pays), but cap CU/tip and watch net-of-cost.
- **Cold-start competitor coverage is partial** — some leaders (e.g. low-overlap
  ones) have few/no competitors in the top-50 set; the live scorer fills this.
- **Net edge after our drag is still unproven** — the whole playbook is a
  hypothesis until SIM + a funded canary (RV-15).

## 6. Build sequence (proposed)
1. Reader: parse `leader-intelligence.json` → `MonitorCtx.leader_intel` (boot + hot-reload). Gate `LEADER_INTEL_ENABLED`, default-off, byte-identical when unset.
2. Wire `tier/size_mult` into the buy sizer; `exit` into PER_WALLET_EXIT; `landing` into the CU/tip/lane selection.
3. Scorer job: nightly Dune refresh (the queries in this rerun) + the live-stream event hooks.
4. SIM the exit + landing per-leader before any live size.
