/** * 0.19.0-alpha.7 (#64) — pure scoring + filtering helpers for the * refactor command. No IO; testable in isolation. */ import type { ProposalAssessment, RefactorProposal } from "./types.js"; /** * Compute the cost / benefit / benefit-per-cost numbers for one * proposal. Cost is `abs(estimatedLocDelta) * filesAffected.length` * (clamped to ≥1 so the ratio is finite for zero-cost edge cases). */ export declare function assessProposal(p: RefactorProposal): ProposalAssessment; /** * Match a single file path against a glob-ish scope pattern. Supports: * - exact match: "src/foo.ts" * - directory prefix: "src/" (matches anything under src/) * - star at the end: "src/components/*" (one segment after) * - double-star: "src/**" (any depth) * * Pure regex translation; no fs lookup. */ export declare function matchesScope(filePath: string, pattern: string): boolean; /** * Filter proposals to those whose `filesAffected` ALL match at least * one scope pattern. A proposal that touches even one out-of-scope * file is excluded entirely (boundedness rule — refactors stay * surgical). */ export declare function filterProposalsByScope(proposals: RefactorProposal[], scope: string[]): RefactorProposal[]; /** * Rank a list of proposals by benefit-per-cost (descending). Returns * a NEW array of [proposal, assessment] pairs; doesn't mutate input. * Stable for ties (preserves original order). */ export declare function rankProposals(proposals: RefactorProposal[]): Array<{ proposal: RefactorProposal; assessment: ProposalAssessment; }>; //# sourceMappingURL=score.d.ts.map