/** * v1.3.2 ยง10.3 โ€” map an external/adopted agent onto the SoloSquad taxonomy * (team + tier). Deterministic heuristic-first pass (this module); the LLM * fallback for genuinely ambiguous actors is a follow-up. The ETL default- * fallback pattern: known frontmatter wins, else keyword heuristic, else a * `default` team flagged low-confidence for human review. */ export type SsTeam = "product" | "engineering" | "design" | "marketing" | "chief"; export type SsTier = "leader" | "member"; export interface AgentMapping { team: SsTeam; tier: SsTier; /** high when frontmatter declared it or the name matched; low otherwise. */ confidence: "high" | "low"; source: "frontmatter" | "heuristic" | "default" | "llm"; } export interface AgentMapInput { name: string; frontmatterTeam?: string; frontmatterTier?: string; description?: string; } export declare function mapAgentToTaxonomy(input: AgentMapInput): AgentMapping; export interface AgentTeamCaller { /** Classify one actor; return null to defer to the heuristic default. */ classify(input: AgentMapInput): Promise<{ team: SsTeam; tier?: SsTier; } | null>; /** Diagnostic โ€” incremented per invocation. Tests assert 0 for confident actors. */ call_count?: number; } export interface MapAgentOpts { /** When set, actors the heuristic left at `default` are escalated to this caller. */ caller?: AgentTeamCaller; } /** * Heuristic-first map with an optional LLM escalation for ambiguous actors. * Confident actors (frontmatter/name/description match) never reach the caller, * so the model is consulted at most once per genuinely-unknown actor. A caller * error or an unrecognized team silently falls back to the heuristic default โ€” * adoption is never blocked on the LLM. */ export declare function mapAgentTeam(input: AgentMapInput, opts?: MapAgentOpts): Promise; /** Parse a team-classification reply (tolerant of prose around the JSON). */ export declare function parseTeamReply(raw: string): { team: SsTeam; tier?: SsTier; } | null; /** * Claude-backed caller. Constructed only when the user opts in * (`adopt --classify`); `runClaude` is imported lazily so the deterministic * path never pulls in the process runner. */ export declare function createClaudeAgentTeamCaller(cwd: string, timeoutMs?: number): AgentTeamCaller;