/** * Structural landmark signals (change: add-structural-landmark-salience). * * "Which functions are the structural anchors of this code, and *why*?" — answered * as a set of **labeled signals with raw evidence**, NOT a blended salience score. * A composite weighting (`hub*40 + orchestrator*20 + …`) would be deterministic but * arbitrary — a black box the agent must trust — which the north star (decision * c6d1ad07, "static analysis, not guessing") exists to keep out. So we hand the * agent the facts and let it rank by what its task needs. * * Every label is produced by an EXISTING deterministic classifier; no new threshold * or weighting constant is introduced here: * - `hub` → the precomputed `graph.hubFunctions` set (fanIn ≥ 5) * - `orchestrator`→ the god-function classifier (fanOut ≥ GOD_FUNCTION_FAN_OUT_THRESHOLD) * - `chokepoint` → the parameter-free conjunction `hub ∧ ¬orchestrator` * - `entrypoint` → the precomputed `graph.entryPoints` set * - `volatile` → the change-coupling `volatilityLevel` classifier (level ≠ low) * - `dead` → the dead-code reachability classifier (`deadCodeIds`) * * `volatile` (git churn) and `dead` (reachability + dep-graph) are derived from data * outside the in-memory graph, so the caller injects them via `opts`; the four pure * structural labels need only the graph. */ import type { SerializedCallGraph } from './call-graph.js'; export type LandmarkLabel = 'hub' | 'orchestrator' | 'chokepoint' | 'volatile' | 'entrypoint' | 'dead'; /** One earned label plus the raw evidence that earned it (no derived score). */ export interface LandmarkSignal { label: LandmarkLabel; evidence: Record; } /** A function that earned ≥ 1 structural-interest label. No `score` field by design. */ export interface Landmark { id: string; name: string; filePath: string; signals: LandmarkSignal[]; } export interface LandmarkSignalOptions { /** filePath → churn evidence, from change-coupling (a file is volatile when level ≠ low). */ volatilityByFile?: Map; /** Candidate dead-code node ids, from the reachability classifier (`deadCodeIds`). */ deadIds?: Set; } /** * Label each function with the structural-interest signals it earns. Returns only * functions with ≥ 1 label, each carrying its raw evidence — never a composite rank. */ export declare function computeLandmarkSignals(graph: SerializedCallGraph, opts?: LandmarkSignalOptions): Landmark[]; //# sourceMappingURL=landmark-signals.d.ts.map