---
name: specialist-finder
display_name: Specialist Finder
description: "Activate when a CSM needs to find the right domain specialist for a customer issue — tracks every specialist you've worked with, their expertise areas, responsiveness, and past outcomes, then recommends the best fit for new cases based on your history AND other CSMs' experiences across the org. Also activates for 'who should I engage for [topic]', 'find a specialist for [issue]', 'who helped with [problem] before', 'specialist tracker', 'who you gonna call'."
icon: "📞"
trigger: specialist finder
inputs:
  - name: issue_description
    description: "The customer issue or topic you need specialist help with (e.g., 'S3 performance optimization', 'EKS security review', 'GPU capacity planning')"
    type: string
    required: true
  - name: customer_name
    description: "Customer account name — used to pull account-specific specialist history and find cross-customer patterns"
    type: string
    required: false
  - name: action
    description: "What to do — 'recommend' (find best specialist for this issue), 'tracker' (show your full specialist history), or 'rate' (log feedback on a specialist you worked with)"
    type: string
    required: false
    default: "recommend"
tools: [kg_search, search_all, file_rag_search]
depends-on: [html_design, highcharts]
---

## Overview

Specialist Finder is your personal domain specialist Rolodex + recommendation engine, supercharged with cross-customer intelligence from the Déjà Vu Engine and the Living Customer Brain. It doesn't just find specialists — it tells you WHO solved similar problems across the entire org, what account they solved it for, and whether that specialist is available for YOUR customer. It uses Phonetool to verify L7+ credentials and discovers peers in the same product org you haven't met.

**Three intelligence layers work together:**
1. **Your History** — Specialists you've personally worked with (Slack, email, calendar, KG)
2. **Déjà Vu Cross-Customer** — Specialists who solved similar problems for OTHER customers across the org. If a networking specialist fixed a cloud bursting issue for Customer X, they can help with Roblox too.
3. **Living Customer Brain** — The full specialist roster already engaged on the account, with context on what each person is working on and how active they are.

**Critical distinction:** Account Team members (AMs, CSMs, account SAs who organize meetings) are NOT specialists. A specialist is someone with deep domain expertise embedded in a specific AWS service or product org — typically L7+ (Principal, Sr. Manager, Director+).

## Workflow

### Step 1: Understand the Request
- **Mode:** agentic
- **Input:** `{{issue_description}}`, `{{customer_name}}`, `{{action}}`
- **Output:** Structured understanding: domain, issue type, urgency, customer context

Parse the issue to extract:
- **Domain/service area** (S3, EKS, networking, GPU, AI/ML, security, CDN, streaming, etc.)
- **Issue type** (performance, architecture, migration, troubleshooting, cost optimization, capacity planning, product evaluation)
- **Urgency level** (critical/high/medium/low)
- **Customer context** — if `{{customer_name}}` provided, this scopes all subsequent searches

### Step 2: Déjà Vu Cross-Customer Search
- **Mode:** agentic
- **Input:** Domain keywords + issue description
- **Output:** Specialists who solved similar problems for ANY customer
- **Validate:** Found relevant historical cases with specialist involvement
- **On failure:** Proceed to Step 3 with no cross-customer data

This is the power move — search across ALL customers to find who has solved this type of problem before:

1. **Search the Knowledge Graph** — `kg_search` with issue keywords, `include_edges=True`, limit 15
   - Look for: resolution events, technical deep dives, architecture reviews related to this domain
   - Extract: which specialists were involved (edges: "communicatedWith", "workedOn", "specialistFor")
   - Note which CUSTOMER each case was for — this is cross-customer intelligence

2. **Search All Indexed Content** — `search_all` with issue keywords + domain terms
   - Find: meeting summaries, email threads, Slack discussions where this type of problem was discussed
   - Extract: who provided the solution, which customer it was for, what the outcome was

3. **Search Slack Org-Wide** — Load `slack_builtin`, search broader channels (#aws-csm, #ags-namer-tech, #ags-us-csm-all, domain-specific TFC channels)
   - Look for: "who's the best person for [domain]?", specialist recommendations, thank-you shout-outs
   - Track: who gets recommended most often across the org for this domain

4. **Search Email** — Load `outlook_builtin`, search for domain keywords + "specialist" + "deep dive"
   - Find: meeting summaries that mention specialists by name for similar issues
   - Extract: specialist names, what they helped with, which customer

**For each case found, build a Cross-Customer Intelligence Card:**
- **Customer:** Which account was this for?
- **Problem:** What was the issue?
- **Specialist involved:** Name, alias, role
- **Outcome:** Resolved? How?
- **When:** How recent?
- **Relevance to current issue:** High/Medium/Low similarity score

### Step 3: Account-Specific Specialist History (Living Brain Integration)
- **Mode:** agentic
- **Input:** `{{customer_name}}` + domain keywords
- **Output:** Full specialist roster already engaged on this account

If `{{customer_name}}` is provided, pull the specialist history for this specific account:

1. **Knowledge Graph** — `kg_search` for the customer entity + specialist relationships
   - Find: all people with "specialistFor" or "potentialSpecialistFor" edges to this customer
   - Pull their verified profiles (title, org, domain, engagement history)

2. **Calendar Mining** — Search calendar for meetings with customer + domain keywords
   - Note: **Required attendees** on technical deep dives are likely specialists; **Optional/organizers** are likely AT
   - Track who was brought IN vs. who organized

3. **Slack/Email History** — Search customer channels for specialist @mentions and technical contributions

**Classify each person found:**
- **Domain Specialist** ✅ — Person from a service team org, L7+, brought in for domain expertise
- **Account Team** ❌ — AM, CSM, account SA who organizes meetings across topics (EXCLUDE from recommendations)

**Signals for classification:**
- Specialist pattern: appears across MULTIPLE customers for the SAME domain
- AT pattern: appears on MANY different topics for the SAME customer

### Step 4: Phonetool Verification & Org Discovery
- **Mode:** agentic
- **Tool:** Load `browser` skill
- **Input:** Aliases of potential specialists from Steps 2 and 3
- **Output:** Verified profiles with title, level, org, L7+ peers
- **Validate:** Phonetool page loads with profile data
- **On failure:** If Midway auth fails, ask user to authenticate. Proceed with unverified data.

For each potential specialist, browse Phonetool (`https://phonetool.amazon.com/users/{alias}`):

1. **Verify title and level** — Must be L7+: Principal, Sr. Manager, Director, VP, Distinguished
2. **Confirm org alignment** — Which AWS service org? Does it match the domain?
3. **Check communities** — Membership in relevant communities confirms expertise
4. **Mine the org chart** — Scan peers (other direct reports of same manager) for L7+ people with relevant titles. These are "dark horse" specialists the CSM hasn't worked with.
5. **Map the VP chain** — Useful for escalation paths and understanding organizational authority

### Step 5: Rank and Recommend (L7+ Only)
- **Mode:** agentic
- **Input:** Cross-customer cases + account history + Phonetool data
- **Output:** Top 3 specialist recommendations with cross-customer evidence

Score each specialist on:
- **Domain Match** (0-30) — Expertise fit, confirmed by Phonetool org and communities
- **Track Record** (0-25) — Past outcomes across ALL customers (cross-customer data from Déjà Vu), not just this account
- **Responsiveness** (0-20) — How quickly they typically engage
- **Availability Signal** (0-15) — Recent activity, current role still active
- **Relationship Strength** (0-10) — Worked together before? Warm intro possible?

**Cross-Customer Bonus:** If a specialist solved a similar problem for another customer, add +10 bonus to Track Record score and highlight this in the recommendation:
> "Tom Adamski solved a similar DX/IP assignment issue for [Customer X] 3 months ago. Success rate for this type of engagement: 90%."

Present top 3:
- **🥇 Top Recommendation** — Best overall match (verified L7+ specialist)
- **🥈 Strong Alternative** — Different angle or backup
- **🥉 Dark Horse** — L7+ peer from Phonetool org chart OR cross-customer discovery

For each, include:
- Name, alias, **verified title and org** (from Phonetool)
- **Cross-customer evidence:** "Solved [similar problem] for [other customer] on [date]"
- Why they're recommended for THIS specific issue
- Contact info (email, Slack, preferred method)
- Draft outreach message that references the cross-customer context
- **AT connectors** — which Account Team members can make a warm intro

### Step 6: Build the Specialist Dashboard
- **Mode:** deterministic
- **Tool:** Load `html_design` and `highcharts` skills
- **Input:** All specialist data + cross-customer intelligence
- **Output:** Interactive HTML dashboard

Create `artifacts/specialist-recommendation.html` with:

1. **Issue Summary** — What you need help with + customer context
2. **Top 3 Recommendations** — Cards with Phonetool-verified profiles, scores, cross-customer evidence, draft outreach
3. **Cross-Customer Intelligence Panel** (🆕 from Déjà Vu):
   - "Similar issues solved across the org" — table showing customer, problem, specialist, outcome
   - "Specialists with cross-customer experience in this domain" — who has solved this type of problem before?
4. **Account Specialist Roster** (🆕 from Living Brain):
   - Full grid of specialists already engaged on this customer account
   - Grouped by domain, with last engagement date and status
5. **Org Chart Context** — Where each recommended specialist sits in AWS org
6. **Org Peers** — Other L7+ people in the same product org (dark horse candidates)
7. **AT Connectors** — Account Team members who can make warm intros (clearly labeled as AT, not specialists)

For **"tracker"** action, create `artifacts/specialist-tracker.html` with:
1. Specialist Rolodex grouped by domain
2. Cross-customer engagement map (Highcharts network graph showing which specialists work across which customers)
3. Domain coverage gaps
4. Engagement timeline

### Step 7: Offer Follow-up Actions
- **Mode:** deterministic
- **Output:** Decision card

Options:
- **"📧 Draft outreach to top recommendation"** — with cross-customer context in the message
- **"🔮 Run Déjà Vu on this issue"** — deep search for how this exact problem was solved before
- **"🧠 Show full Customer Brain for [account]"** — pull the complete Living Brain dashboard
- **"📊 Show my full specialist tracker"** — all specialists across all domains
- **"⭐ Rate a recent specialist"** — log feedback for future recommendations
- **"🔍 Search a different domain"**

## Output

**For "recommend":** Interactive dashboard with L7+ verified specialist recommendations, cross-customer evidence ("they solved this for Customer X"), account specialist roster, Phonetool org chart, and draft outreach messages.

**For "tracker":** Full specialist Rolodex with cross-customer engagement map showing which specialists work across which customers.

## Lessons Learned

### Do
- Always run the cross-customer search (Step 2) — the best specialist for your problem may have solved the exact same thing for another customer last month
- Weight cross-customer evidence heavily — a specialist who solved this problem before is more valuable than one who just "works in the right org"
- Include the cross-customer context in the outreach message — "I understand you helped [Customer X] with a similar issue" is a much warmer intro than "Can you help with this?"
- Verify on Phonetool before recommending — titles and orgs change
- Only recommend L7+ — they have the depth and authority for complex issues
- Distinguish AT from specialists — AT organizes, specialists deliver expertise
- Browse the org chart for peers — the best specialist might be someone you haven't met

### Don't
- Don't recommend Account Team members as domain specialists
- Don't recommend below L7 unless no L7+ options exist (and flag it clearly)
- Don't skip the cross-customer search — it's the unique differentiator of this skill
- Don't confuse meeting organizers with meeting presenters
- Don't expose which other customer a specialist worked with unless it's publicly known — anonymize as needed ("a similar gaming customer")

### Common Failures
- **No cross-customer matches found:** Fall back to account-specific history + Phonetool org mining
- **Phonetool auth required:** Ask user to authenticate on Midway
- **Specialist has changed roles:** Phonetool shows current title — flag if different from expected
- **Can't classify AT vs Specialist:** Check Phonetool org — service team org = specialist, sales/account org = AT
- **Too many results from cross-customer search:** Filter to top 5 most similar cases by recency and domain match

### When to Ask the User
- When you can't access Phonetool (auth issue)
- When a person's role is ambiguous between AT and specialist
- When cross-customer evidence references a sensitive/competitive account — ask before including in outreach
- When multiple L7+ specialists have similar scores — ask what the CSM values most (speed vs depth vs cross-customer experience)