Skip to content

getaero-io/gtm-eng-skills / engineering/warm-intro-scoring

warm-intro-scoring

Verified

FileKindSize
.gitignoreother121 B
GUIDE.mdmarkdown4.7 KB
LICENSEother1.1 KB
README.mdmarkdown8.0 KB
SKILL.mdskill md327 B
TESTING.mdmarkdown8.9 KB
UPSTREAM.mdmarkdown1.3 KB
assets/company-research.play.tsscript1021 B
assets/customer-db.sqlother2.7 KB
assets/evaluation-example.jsonconfig4.6 KB
assets/example.jsonconfig6.9 KB
assets/portfolio-focus.weights.jsonconfig32 B
assets/review.htmlother7.4 KB
assets/tuning-example.jsonconfig1.2 KB
assets/tuning.htmlother30.1 KB
check_all.pyscript1.4 KB
package-manifest.jsonconfig9.8 KB
plays/README.mdmarkdown18.2 KB
plays/check-report.pyscript1.8 KB
plays/check_all.pyscript1.6 KB
plays/check_parity.pyscript6.0 KB
plays/collect.play.tsscript4.0 KB
plays/collection.tsscript1.9 KB
plays/core.tsscript44.2 KB
plays/evaluation-contract.mdmarkdown3.4 KB
plays/evaluation.tsscript13.8 KB
plays/features.play.tsscript4.7 KB
plays/features.tsscript22.6 KB
plays/generatedtemplate.tsscript38.1 KB
plays/guardrails.tsscript948 B
plays/legacy.tsscript9.7 KB
plays/merge-payloads.pyscript8.6 KB
plays/parity-driver.tsscript995 B
plays/parity-evaluation.pyscript8.5 KB
plays/parity-reports.pyscript2.3 KB
plays/prepare-inputs.pyscript6.5 KB
plays/quality.tsscript3.8 KB
plays/read-sources.play.tsscript3.4 KB
plays/report-cli.tsscript590 B
plays/report.play.tsscript2.9 KB
plays/report.tsscript3.1 KB
plays/reports.tsscript5.7 KB
plays/research.play.tsscript1.6 KB
plays/review-uncertainty.play.tsscript5.5 KB
plays/score.play.tsscript2.3 KB
plays/snapshots.play.tsscript4.2 KB
plays/strict-json.tsscript1.8 KB
plays/sync-template.pyscript849 B
plays/uncertainty.tsscript4.9 KB
plays/validation.play.tsscript3.6 KB
references/adversarial-review.mdmarkdown7.0 KB
references/batch-collection.mdmarkdown5.1 KB
references/company-network.mdmarkdown5.8 KB
references/competitive-review.mdmarkdown8.8 KB
references/evaluation.mdmarkdown8.5 KB
references/evaluator-validation.mdmarkdown3.4 KB
references/evaluator.mdmarkdown7.9 KB
references/external-data.mdmarkdown4.0 KB
references/factor-test-matrix.mdmarkdown4.6 KB
references/factors.mdmarkdown6.1 KB
references/intro-drafts.mdmarkdown1.6 KB
references/pipeline.mdmarkdown7.6 KB
references/readable-output.mdmarkdown5.4 KB
references/research-brief.mdmarkdown2.4 KB
references/sources.mdmarkdown7.5 KB
references/tuning.mdmarkdown14.6 KB
scripts/audit_history.pyscript5.1 KB
scripts/check.pyscript5.1 KB
scripts/compare_versions.pyscript1.9 KB
scripts/evaluate.pyscript22.5 KB
scripts/package-skill.pyscript1.9 KB
scripts/portfolio.pyscript3.7 KB
scripts/quality.pyscript5.3 KB
scripts/recipe-demo.tsscript2.6 KB
scripts/render.pyscript1.6 KB
scripts/score.pyscript9.6 KB
scripts/temporal.pyscript2.2 KB
scripts/test_ask_handoff.pyscript2.1 KB
scripts/test_audit_history.pyscript2.7 KB
scripts/test_handoff_evaluate.pyscript9.1 KB
scripts/test_portfolio.pyscript3.6 KB
scripts/test_quality.pyscript3.1 KB
scripts/test_temporal.pyscript1.3 KB
scripts/test_tuning.pyscript14.1 KB
scripts/test_tuning_browser.cjsscript7.7 KB
scripts/test_version_parity.pyscript1.0 KB
scripts/tuning.pyscript10.9 KB
tests/adversarial.test.tsscript8.2 KB
tests/browser_e2e.cjsscript1.9 KB
tests/cloud_e2e.pyscript6.9 KB
tests/e2e-fixture.jsonconfig3.6 KB
tests/feature_parity.pyscript2.4 KB
tests/features.test.tsscript8.3 KB
tests/test_prepare_inputs.pyscript8.6 KB
tests/uncertainty.test.tsscript2.5 KB
vendor-manifest.jsonconfig748 B

plays/features.ts

View on GitHub
/* eslint-disable @typescript-eslint/no-explicit-any -- Ported JSON contract/parity boundary; runtime validators reject malformed values. */
import {DEFAULT_WEIGHTS as WEIGHTS, workOverlapValue} from './core';
/** Offline source-snapshot → evidence features. No network calls or database writes.
 * Snapshot IDs must be stable and include their namespace (for example conn:123).
 * Source locators point to retained profile observations. Unknown targets are retained
 * in coverage; they are never joined by name. Dates use conservative month/year bounds.
 * Funding edges alone never score: an exact domain + investor key primary source is required.
 */
export type Evidence = {id:string;source:string;observed_at:string;detail:string;[key:string]:unknown};
export type PartialDate = {year?:number|string;month?:string|number;text?:string};
export type Job = {companyId?:string|number;companyName?:string;position?:string;location?:string;startDate?:PartialDate;endDate?:PartialDate};
export type School = {schoolId?:string|number;schoolName?:string;startDate?:PartialDate;endDate?:PartialDate};
export type Snapshot = {id:string;first_name?:string;last_name?:string;linkedin_url:string;company?:string;title?:string;observed_at:string;source:string;experience?:Job[];education?:School[];domain?:string};
export type Target = {id?:string;name:string;linkedin_url:string;company:string;domain:string;title?:string};
export type FeatureInput = {
 as_of:string;profiles_checked_at:string;requester_name:string;requester_company?:string;connectors:Snapshot[];profiles:Snapshot[];targets:Target[];
 excluded_connector_urls?:string[];
 company_sizes?:{company_id:string;count:number;evidence:Evidence}[];
 funding_edges?:{target_domain:string;investor_key:string;investor_firm:string;investor_company_id?:string;investor_aliases?:string[];source:string;detail:string;observed_at:string}[];
 verified_firms?:{target_domain:string;investor_key:string;evidence:Evidence}[];
 /** Each shared investor is supported by the requester's seed and target portfolio sources. */
 owner_portfolio?:{target_domain:string;investor_name:string;seed_evidence:Evidence[];portfolio_evidence:Evidence}[];
 target_research?:Record<string,unknown[]>;
};
type Feature={value:number;evidence_ids:string[];explanation:string;timing_status:string;overlap_start?:string;overlap_end?:string;work_context?:Context};
type Context={company_size:number|null;same_function:boolean|null;same_location:boolean|null};
type Period=[string,string];
type Role={eid:string;cid:string|null;name:string;position:string;current:boolean;cons:Period|null;loose:Period|null;location:string|null;function:string|null;employee:boolean;board:boolean;investor:boolean;idx?:number;sid?:string|null;locator?:string};
type Person=Snapshot&{roles:Role[];schools:Role[];employees:Role[];boards:Role[];url_key:string|null;target?:Target};
type Overlap=[string,string,Role,Role];
const METROS:Record<string,string[]>={
 'San Francisco Bay Area':['san francisco bay area','san francisco','palo alto','mountain view','redwood city','sunnyvale','berkeley','san jose','menlo park','san mateo','oakland','cupertino','foster city','south san francisco'],
 'New York City metro':['new york city metropolitan area','greater new york city area','new york city','new york, new york','new york, ny','brooklyn, new york','brooklyn, ny','manhattan, new york'],
 'Boston metro':['greater boston','greater boston area','boston, massachusetts','boston, ma','cambridge, massachusetts','cambridge, ma'],
 'London metro':['london area, united kingdom','london, united kingdom','london, england','greater london, england'],
 'Chicago metro':['greater chicago area','chicago, illinois','chicago, il'],
 'Seattle metro':['greater seattle area','seattle, washington','seattle, wa'],
 'Toronto metro':['greater toronto area, canada','toronto, ontario'],
 'Los Angeles metro':['los angeles metropolitan area','greater los angeles area','los angeles, california','los angeles, ca'],
 'Austin metro':['austin, texas','austin, tx'],'Denver metro':['denver metropolitan area','denver, colorado','denver, co']};
export function canonicalLinkedIn(value:string):string|null {
 try {const u=new URL(value.includes('://')?value.trim():'https://'+value.trim());if(!/^(?:[a-z0-9-]+\.)?linkedin\.com$/i.test(u.hostname)||!['http:','https:'].includes(u.protocol))return null;const path=decodeURIComponent(u.pathname);if(/^\/in\/ACo[A-Za-z0-9_-]{8,}(?:\/|$)/.test(path))return null;const match=path.toLowerCase().match(/^\/in\/([^/]+)(?:\/(?:en|details\/(?:experience|education|skills)))?\/?$/);return match?.[1]||null;}catch{return null;}
}
export function metro(value?:string):string|null {const s=(value||'').trim().toLowerCase().replace(/\s+/g,' ');if(/\b(remote|global|worldwide|hybrid)\b/.test(s))return null;return Object.entries(METROS).find(([region,a])=>a.some(x=>{if(s===x)return true;if(!s.startsWith(x+','))return false;if(region==='San Francisco Bay Area'){const rest=s.slice(x.length+1).trim();return /^(california|ca|united states|usa|us)(?:,|$)/.test(rest);}return true;}))?.[0]||null;}
export function roleFunction(title?:string):string|null {
 const rules:[string,RegExp][]=[['revenue operations',/revops|revenue operations|sales operations|sales strategy.*operations|post-sales strategy.*operations/],['GTM engineering',/gtm engineer|gtm automation/],['engineering',/software engineer|enterprise architecture|engineering manager|lead software/],['data science',/data scien/],['product',/product manager/],['design',/\bdesigner\b/],['marketing',/marketing|director of growth|performance partnerships/],['sales',/\bsales\b|account executive/],['talent',/head of talent/],['monetization',/monetization/]];
 return rules.find(([,re])=>re.test((title||'').toLowerCase()))?.[0]||null;
}
export function isInvestorRole(title:string):boolean {
 return /^(?:(?:angel|seed|pre-seed|early[- ]stage|venture|strategic|lead|individual)\s+)?investor(?:\s*(?:\([^)]*\)|[,/&]\s*(?:advisor|board member)))?$/i.test(title.trim());
}
export function isEmployee(e:Job):boolean {const title=e.position||'';return !/^(various companies|self[- ]?employed|freelance|independent|stealth|none)$/i.test((e.companyName||'').trim())&&!!title.trim()&&(!/\b(board|advisor|adviser|advisory|angel|investor|mentor|member)\b/i.test(title)||/\b(co[- ]?founder|founder|CEO|CFO|CTO|COO|CRO|CMO|chief|president|vice president|head of|managing director)\b/i.test(title));}
export function employerIdentity(name:string):string {const words=name.normalize('NFKD').replace(/[^\x00-\x7F]/g,'').toLowerCase().replace(/[^\w\s]/g,' ').trim().split(/\s+/);const suffix=new Set('ag bv co company corp corporation gmbh inc incorporated limited llc ltd nv plc pte pty sa srl'.split(' '));while(words.length){if(suffix.has(words.at(-1)!)){words.pop();continue;}if(['i n c','l l c','l t d'].includes(words.slice(-3).join(' '))){words.splice(-3);continue;}break;}return words.join(' ');}
const min=(a:string,b:string)=>a<b?a:b,max=(a:string,b:string)=>a>b?a:b;
const duration=(p:Overlap)=>Date.parse(p[1])-Date.parse(p[0]);
function bounds(d?:PartialDate):Period|null {if(!d?.year)return null;const y=Number(d.year);if(!Number.isInteger(y)||y<1||y>9999)throw Error('Invalid profile year');const rawMonth=d.month;const m=rawMonth===undefined||rawMonth===''?0:/^\d+$/.test(String(rawMonth))?Number(rawMonth):['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'].indexOf(String(rawMonth).slice(0,3).toLowerCase())+1;if(rawMonth!==undefined&&rawMonth!==''&&(!Number.isInteger(m)||m<1||m>12))throw Error('Invalid profile month');const year=String(y).padStart(4,'0');return m?[`${year}-${String(m).padStart(2,'0')}-01`,`${year}-${String(m).padStart(2,'0')}-${new Date(Date.UTC(y,m,0)).getUTCDate()}`]:[year+'-01-01',year+'-12-31'];}
function intervals(start:PartialDate|undefined,end:PartialDate|undefined,current:boolean,observed:string):[Period|null,Period|null] {const s=bounds(start),e=current?[observed,observed] as Period:bounds(end);if(!s||!e)return[null,null];if(s[0]>e[1])throw Error('Reversed or future profile interval');const stop=min(e[0],observed);return[s[1]<=stop?[s[1],stop]:null,[s[0],min(e[1],observed)]];}
export function pairOverlap(a:Role[],b:Role[],key:'cid'|'sid'|'location'):[string,Overlap|null] {let best:Overlap|null=null,status='not_applicable';for(const x of a)for(const z of b){if(!x[key]||x[key]!==z[key])continue;if(x.cons&&z.cons){const s=max(x.cons[0],z.cons[0]),e=min(x.cons[1],z.cons[1]);if(s<=e){const q:Overlap=[s,e,x,z];if(!best||duration(q)>duration(best))best=q;continue;}}if(x.loose&&z.loose&&max(x.loose[0],z.loose[0])>min(x.loose[1],z.loose[1])){if(['not_applicable','non_overlap'].includes(status))status='non_overlap';}else status='unknown';}return best?['verified_overlap',best]:[status,null];}
function factor(c:Context):number {return workOverlapValue(c.company_size,c.same_function,c.same_location);}
const zero=(explanation='No verified source for this signal.',timing_status='unknown'):Feature=>({value:0,evidence_ids:[],explanation,timing_status});
const positive=(ids:string[],explanation:string,p?:Overlap):Feature=>({value:1,evidence_ids:ids,explanation,timing_status:p?'verified_overlap':'not_applicable',...(p?{overlap_start:p[0],overlap_end:p[1]}:{})});
const equalPair=(ids:string[],p:Overlap)=>ids.length===2&&new Set(ids).size===2&&ids.includes(p[2].eid)&&ids.includes(p[3].eid);
function validDate(d:string):boolean {return /^\d{4}-\d{2}-\d{2}$/.test(d)&&Number.isFinite(Date.parse(d))&&new Date(d).toISOString().slice(0,10)===d;}
/** Returns normalized-feature input plus coverage, including unresolved target records. */
export function buildFeatures(input:FeatureInput) {
 if(!validDate(input.as_of)||!validDate(input.profiles_checked_at)||input.profiles_checked_at>input.as_of)throw Error('Invalid observation cutoff');
 const registry=new Map<string,Evidence>();
 const put=(e:Evidence)=>{if(!e.id||!e.source||!validDate(e.observed_at)||e.observed_at>input.as_of)throw Error('Invalid or future evidence');const old=registry.get(e.id);if(old&&JSON.stringify(old)!==JSON.stringify(e))throw Error('Conflicting evidence ID: '+e.id);registry.set(e.id,e);return e.id;};
 function person(s:Snapshot):Person {
  if(!s.id||!s.source||!validDate(s.observed_at)||s.observed_at>input.profiles_checked_at)throw Error('Invalid profile observation');
  const roles=(s.experience||[]).map((e,i):Role=>{const name=(e.companyName||'').trim(),cid=String(e.companyId||'').trim(),eid='emp:'+s.id+':'+i,current=(e.endDate?.text||'').toLowerCase()==='present';const[cons,loose]=intervals(e.startDate,e.endDate,current,s.observed_at);
   put({id:eid,kind:'employment',subjects:[s.id],source:s.source+`.experience[${i}]`,observed_at:s.observed_at,detail:`Profile role at ${name||'unnamed employer'} (${e.startDate?.text??'?'} - ${e.endDate?.text??'?'}); LinkedIn companyId ${cid||'missing'}; month/year precision encoded conservatively.`});
   const location=metro(e.location);if(location)put({id:'location:'+s.id+':'+i,source:s.source+`.experience[${i}]`,observed_at:s.observed_at,detail:`Job location: ${e.location}. ${e.companyName} / ${e.position}. This does not establish residence or personal contact.`});
   return{eid,cid:cid&&!/stealth|self[- ]?employed|freelanc|confidential|independent consult|^none$/i.test(name)?cid:null,name,position:e.position||'',current,cons,loose,location,function:roleFunction(e.position),employee:isEmployee(e),board:/\bboard\b/i.test(e.position||''),investor:isInvestorRole(e.position||'')};});
  const schools=(s.education||[]).map((e,i):Role=>{const[cons,loose]=intervals(e.startDate,e.endDate,false,s.observed_at);return{eid:'',cid:null,sid:String(e.schoolId||'').trim()||null,name:e.schoolName||'',position:'',current:false,cons,loose,location:null,function:null,employee:false,board:false,investor:false,idx:i,locator:s.source+`.education[${i}]`};});
  const cur=roles.find(e=>e.current);return{...s,first_name:s.first_name||'?',last_name:s.last_name||'?',company:s.company||cur?.name||'',title:s.title||cur?.position||'',roles,schools,employees:roles.filter(e=>e.employee),boards:roles.filter(e=>e.board),url_key:canonicalLinkedIn(s.linkedin_url)};
 }
 // One real identity must not appear as several ranked connectors.
 const connectorUrls=new Map<string,string>();
 for(const contact of input.connectors){const url=canonicalLinkedIn(contact.linkedin_url);if(!url)throw Error('Invalid connector LinkedIn identity');const prior=connectorUrls.get(url);if(prior&&prior!==contact.id)throw Error('Duplicate connector LinkedIn identity');connectorUrls.set(url,contact.id);}
 const excluded=new Set((input.excluded_connector_urls||[]).map(url=>{const id=canonicalLinkedIn(url);if(!id)throw Error('Invalid excluded LinkedIn identity');return id;}));const seen=new Map<string,string>();const connectors:Person[]=[];
 for(const s of input.connectors){const signature=JSON.stringify(s);if(seen.has(s.id)){if(seen.get(s.id)!==signature)throw Error('Conflicting connector snapshot');continue;}seen.set(s.id,signature);if(excluded.has(canonicalLinkedIn(s.linkedin_url)!))continue;connectors.push(person(s));}
 const profileByUrl=new Map<string,Snapshot[]>();for(const s of input.profiles){const key=canonicalLinkedIn(s.linkedin_url);if(key)profileByUrl.set(key,[...(profileByUrl.get(key)||[]),s]);}
 const targets:Person[]=[],unresolved:{target:Target;reason:string}[]=[];const targetIds=new Set<string>();
 for(const t of input.targets){const url=canonicalLinkedIn(t.linkedin_url),matches=url?profileByUrl.get(url)||[]:[];if(matches.length!==1){unresolved.push({target:t,reason:matches.length?'ambiguous_profile':'missing_profile'});continue;}const s=matches[0];if(!t.domain?.trim()||!s.domain?.trim()||(s.domain||'').toLowerCase()!==t.domain.toLowerCase()){unresolved.push({target:{...t,title:t.title||s.title},reason:'account_domain_mismatch',domain_check:{status:!t.domain?.trim()?'missing_target_domain':!s.domain?.trim()?'missing_profile_domain':'different_domains',expected_domain:t.domain||null,profile_domain:s.domain||null,profile_id:s.id,profile_company:s.company||null,source:s.source,observed_at:s.observed_at}});continue;}if(targetIds.has(s.id)){unresolved.push({target:t,reason:'duplicate_target'});continue;}targetIds.add(s.id);targets.push({...person(s),target:t});}
 const sizeIds=new Set<string>();const sizes=new Map((input.company_sizes||[]).map(s=>{if(sizeIds.has(s.company_id))throw Error('Duplicate company size identity');sizeIds.add(s.company_id);return s;}).map(s=>{if(!Number.isInteger(s.count)||s.count<1)throw Error('Invalid company size');put(s.evidence);return[s.company_id,s] as const;}));
 const context=(a:Role,z:Role):Context=>{let size=sizes.get(a.cid||'')?.count??null;if(size!==null&&size<1000&&!(a.current&&z.current))size=null;return{company_size:size,same_function:a.function&&z.function?a.function===z.function:null,same_location:a.location&&z.location?a.location===z.location:null};};
 const edgesByDomain=new Map<string,NonNullable<FeatureInput['funding_edges']>>();
 for(const edge of input.funding_edges||[]){const key=edge.target_domain.toLowerCase();edgesByDomain.set(key,[...(edgesByDomain.get(key)||[]),edge]);}
 const normalizeDomain=(domain:string)=>domain.toLowerCase().replace(/^www\./,'').replace(/\/$/,'');
 const ownerByDomain=new Map<string,NonNullable<FeatureInput['owner_portfolio']>>();
 for(const edge of input.owner_portfolio||[]){const key=normalizeDomain(edge.target_domain);ownerByDomain.set(key,[...(ownerByDomain.get(key)||[]),edge]);}
 const firms=new Map((input.verified_firms||[]).map(v=>[v.target_domain+'|'+v.investor_key,v]));const paths:any[]=[];let selfExcluded=0;
 for(const t of targets)for(const c of connectors){if(c.id===t.id||(c.url_key&&c.url_key===t.url_key)){selfExcluded++;continue;}const target=t.target!,id=c.id+'->'+t.id;const f:Record<string,Feature>=Object.fromEntries(Object.keys(WEIGHTS).map(k=>[k,zero()]));
  f.direct_intro=zero('No dated introduction record was reviewed. Sheet labels and message counts do not prove an introduction.');f.relationship=zero('Requester relationship, recent reciprocal contact and willingness are not verified.');f.community_match=zero('No shared community membership was verified.');f.industry_match=zero('No specific industry match between distinct employers was verified on both sides.');
  const [ws,initialWorkOverlap]=pairOverlap(c.employees,t.employees,'cid');let wb=initialWorkOverlap;if(wb){const candidates:Overlap[]=[];for(const a of c.employees)for(const z of t.employees){const[,o]=pairOverlap([a],[z],'cid');if(o)candidates.push(o);}candidates.sort((a,b)=>{const nums=factor(context(a[2],a[3]))-factor(context(b[2],b[3]))||duration(a)-duration(b);if(nums)return nums;for(const[k,l]of[[a[1],b[1]],[a[2].eid,b[2].eid],[a[3].eid,b[3].eid]])if(k!==l)return k>l?1:-1;return 0;});wb=candidates.at(-1)!;}
  f.work_overlap=zero('No verified dated employee overlap at the same canonical company ID.',ws);if(wb){const a=wb[2],z=wb[3],ctx=context(a,z),ids=[a.eid,z.eid];if(ctx.company_size!==null)ids.push(sizes.get(a.cid!)!.evidence.id);f.work_overlap={...positive(ids,`Same employer: ${a.name}. Functions: ${a.function||'unknown'} / ${z.function||'unknown'}. Job locations: ${a.location||'unknown'} / ${z.location||'unknown'}. Work evidence uses ${factor(ctx)} of the selected weight. Company size is a snapshot; unknown size uses conservative tiers. This does not prove the people worked together.`,wb),work_context:ctx};}
  const[,cb]=pairOverlap(c.employees,t.employees,'location');if(cb){const a=cb[2],z=cb[3];f.city_overlap=positive([a.eid.replace(/^emp:/,'location:'),z.eid.replace(/^emp:/,'location:')],`Both profiles list operating jobs in ${a.location} during the dates shown. This does not prove residence or personal contact.`,cb);if(wb&&equalPair([a.eid,z.eid],wb)&&f.work_overlap.work_context?.same_location)f.city_overlap=zero('The same job locations already contribute to work overlap. No duplicate points.');}
  const[ss,sb]=pairOverlap(c.schools,t.schools,'sid');f.school_overlap=zero('No verified dated attendance at the same school ID.',ss);if(sb){const a=sb[2],z=sb[3],eid='school:'+id+':'+a.idx+':'+z.idx;put({id:eid,source:a.locator+' | '+z.locator,observed_at:max(c.observed_at,t.observed_at),detail:`Both list ${a.name} (school ID ${a.sid}); conservative overlap ${sb[0]} to ${sb[1]}. Same attendance is not proof of personal contact.`});f.school_overlap=positive([eid],`Same school: ${a.name}. Attendance dates overlap. Same cohort or personal contact is not verified.`,sb);}
  const ca=c.employees.find(e=>e.current&&e.function&&employerIdentity(e.name)===employerIdentity(c.company||'')),ta=t.employees.find(e=>e.current&&e.function&&employerIdentity(e.name)===employerIdentity(target.company));if(ca&&ta&&ca.function===ta.function){const ids=[ca.eid,ta.eid];if(!(wb&&equalPair(ids,wb)&&f.work_overlap.work_context?.same_function))f.role_industry=positive(ids,`Current roles share the ${ca.function} function. This is professional context, not proof of contact.`);}
  const[,bb]=pairOverlap(c.boards,t.boards,'cid');if(bb)f.board_overlap=positive([bb[2].eid,bb[3].eid],`Both list board roles at ${bb[2].name} with overlapping dates. Appointment details and personal contact need review.`,bb);
  const ti=t.employees.filter(e=>e.current&&e.name.toLowerCase()===target.company.toLowerCase()),ci=c.roles.filter(e=>e.investor&&e.cid&&!/^(various companies|self[- ]?employed|independent|stealth)$/i.test(e.name));const[,ib]=pairOverlap(ci,ti,'cid');if(ib)f.investor_role=positive([ib[2].eid,ib[3].eid],`${c.first_name} lists ${ib[2].position} at ${target.company}. Target employment dates overlap at the same company ID. Access and willingness still need confirmation.`,ib);
  const firm=employerIdentity(c.company||''),edge=(edgesByDomain.get(target.domain.toLowerCase())||[]).find(e=>!!firm&&[e.investor_firm,...e.investor_aliases||[]].some(x=>!!x&&employerIdentity(x)===firm));
  if(edge&&!ib){const verified=firms.get(edge.target_domain+'|'+edge.investor_key);const currentFirmRole=edge.investor_company_id&&c.employees.some(role=>role.current&&role.cid===edge.investor_company_id&&role.cons);if(verified&&currentFirmRole){const eid='inv:'+id;put({id:eid,source:edge.source+' | '+c.source.replace(/:live_profile\[0\]$/,':current_company'),observed_at:edge.observed_at,detail:edge.detail.replaceAll('{connector_company}',c.company||'').replaceAll('{target_company}',target.company)});put(verified.evidence);f.investor_portfolio=positive([eid,verified.evidence.id],"The connector's employer invested in the target account. This is a firm link, not proof of personal access.");}else f.investor_portfolio=zero("The cached funding record does not establish that the connector's employer invested in this target. A reviewed primary source and current dated role at the canonical investor company ID are required; no investor-context points.");}
  const owner=ownerByDomain.get(normalizeDomain(target.domain))||[];if(owner.length&&!ib){const eid='target-account-domain:'+t.id;put({id:eid,source:t.source.replace(/:live_profile\[0\]$/,':target_domain'),observed_at:t.observed_at,detail:`Target assigned to ${target.company} / ${target.domain}; canonical LinkedIn URL agrees with target sheet.`});const ids=[...f.investor_portfolio.evidence_ids,eid];for(const o of owner){if(!o.seed_evidence.length)throw Error('Missing requester investment source');for(const e of o.seed_evidence)ids.push(put(e));ids.push(put(o.portfolio_evidence));}const existing=f.investor_portfolio.value;f.investor_portfolio=positive([...new Set(ids)],`${input.requester_company||"The requester’s company"} and ${target.company} share disclosed investor context through ${[...new Set(owner.map(o=>o.investor_name))].sort().join(', ')}. This raises target priority for every connector. It does not verify this connector's personal access.`+(existing?" The connector's employer also has a disclosed investment link; context points are counted once.":''));}
  const baseline=Object.entries(f).reduce((sum,[k,v])=>sum+(v.work_context?Math.min(v.value,factor(v.work_context)):v.value)*WEIGHTS[k],0);
  paths.push({id,target_linkedin_url:"https://www.linkedin.com/in/"+t.url_key,connector_linkedin_url:"https://www.linkedin.com/in/"+c.url_key,target_id:t.id,target_name:target.name,target_company:target.company,target_title:target.title||t.title||'Unknown',connector_id:c.id,connector_name:(c.first_name+' '+c.last_name).trim(),connector_company:c.company||'Unknown',connector_title:c.title||'Unknown',requester_name:input.requester_name,baseline_score:baseline,review_status:'needs_confirmation',features:f});
 }
 return{baseline_note:'Default score for this run before weight changes.',as_of:input.as_of,profiles_checked_at:input.profiles_checked_at,requester_name:input.requester_name,paths,evidence:[...registry.values()],target_research:input.target_research||{},coverage:{target_contacts:input.targets.length,matched_profiles:targets.length,target_accounts:new Set(input.targets.map(t=>t.domain.toLowerCase())).size,connectors:connectors.length,paths:paths.length,self_pairs_excluded:selfExcluded,unresolved}};
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall