/** * code-stats — a PURE, DETERMINISTIC code-statistics skill (zero LLM, zero * network, zero env). Same input → same output, ALWAYS. This is the * reproducible "骨架" beneath any semantic scoring: the numbers a performance * report cites that must survive being challenged (LinearB's one real * advantage is that its metadata metrics are reproducible — these match that * bar while adding per-file / per-path facts LinearB's metadata layer never * sees). * * Design contract: * - EVERY tool is a pure function of its arguments. No fetch, no env, no * clock, no randomness → byte-identical results on every run, unit-testable. * - Distinct from code-scan (linters/scanners, which DO run a tool) — this * only COUNTS/CLASSIFIES structured facts the caller already has (a * commit's changed-file list, a column of numbers). * - Used TWO ways (see engineering-insights): the collect node calls * `commit_facts` per commit to persist deterministic raw facts (file paths, * extension mix, size bucket) that would otherwise be thrown away; the * report agent calls `glob_hit` / `percentile` ON-DEMAND to compute * core-path coverage against the customer's own globs and to rank people * within a cohort (percentiles are reproducible and cross-team comparable — * the "universal" property a raw score lacks). */ export declare function sizeBucket(added: any, deleted: any): string; export declare function fileExtension(path: any): string; export declare function extKind(ext: any): any; /** * commit_facts — deterministic per-commit facts from its changed-file list. * `files` is [{ path|newPath|filename, additions?, deletions? }] (the shapes * gitlab_get_commit / github_get_commit already return). Pure. */ export declare function commitFacts(files: any, opts?: any): { filesChanged: number; filePaths: any[]; extCounts: any; kindCounts: any; additions: number; deletions: number; sizeBucket: string; largestFile: any; dirs: any[]; }; /** * glob_hit — how many of `paths` match ANY of `globs`. Deterministic. Supports * `**` (any depth), `*` (one segment, no slash), `?` (one char). The customer's * own core-path globs (e.g. "src/payment/**") are passed at REPORT time — this * makes "who works in the core" a reproducible number, not an LLM guess. */ export declare function globToRegExp(glob: any): RegExp; export declare function globHit(paths: any, globs: any): { total: number; hits: number; ratio: number; matched: string[]; }; /** * percentile — the reproducible, cross-team-comparable rank of `value` within * `values` (0-100, "% of the cohort at or below value"). Ties count at-or-below * (the standard cumulative rank). Empty cohort → null (undefined, not a lie). */ export declare function percentileRank(values: any, value: any): number; export declare const codeStatsSkill: any; export default codeStatsSkill;