/** Raw-line cap for `src/`, `scripts/` and `packages/` — including a `tests` directory inside a package. */ export declare const FILE_SIZE_CAP_DEFAULT = 300; /** Raw-line cap for the root `tests/` tree. A `tests/` dir inside a package keeps the 300 cap. */ export declare const FILE_SIZE_CAP_TESTS = 500; /** Directories the policy measures, relative to the project root. */ export declare const FILE_SIZE_SCOPE_DIRS: readonly ["src", "tests", "packages", "scripts"]; /** The extensions it measures. The same seven the lint scope admits. */ export declare const FILE_SIZE_SCOPE_EXTENSIONS: readonly ["ts", "tsx", "mts", "cts", "mjs", "cjs", "js"]; /** The unit, stated in the artifact that carries the number rather than in prose. */ export declare const FILE_SIZE_LINE_CONVENTION = "readFileSync(f,'utf8').split('\\n').length"; /** The two caps, as the census reports them. */ export type FileSizeCaps = { readonly defaultCap: number; readonly testsCap: number; }; /** The caps this policy defines right now. */ export declare function fileSizeCaps(): FileSizeCaps; /** Forward slashes, so a Windows-native path matches the same rule as a POSIX one. */ export declare function normalizePolicyPath(file: string): string; /** True when `file` ends in an extension the policy measures. */ export declare function hasPolicyExtension(file: string): boolean; /** True when `file` sits under one of the directories the policy measures. */ export declare function inFileSizeScope(file: string): boolean; /** * THE one definition of "a file the policy measures": under a scope directory AND * of a scope extension. Both consumers read this instead of each carrying its own * half of the rule. * * census enumerated its scope with `git ls-files ` plus the extension test, * while the scan measured EVERY changed non-exempt file at `fileSizeCapFor`'s * else-branch 300 — including paths in neither list. The two disagreed about the * same policy, and the disagreement was not harmless: an out-of-scope file (e.g. * under `.husky/`, or a `.json`) could redden a `request transition` at 300 lines * while contributing nothing to `fileSizeOverCap`, so there was no ratchet row to * descend and no split campaign that would ever clear it. Enforcement wider than * the declared scope is enforcement nobody can satisfy. */ export declare function isPolicyMeasuredFile(file: string): boolean; /** * The cap a path is measured against: 500 for the root `tests/` tree, 300 for * everything else in scope — including a `tests` directory inside a package, * which keeps its parent scope's cap by the reading decided 2026-09-30. * * PRECONDITION: `isPolicyMeasuredFile(file)`. The else-branch is `src`, * `packages` and `scripts` ONLY because that is what the policy decided; handed a * path outside the scope it would invent a cap for a file the row cannot see, so * callers must gate on the predicate above first (`file-size-scan.ts` does). */ export declare function fileSizeCapFor(file: string): number; /** * The policy's unit: raw lines counted by splitting on newlines. NOT `wc -l` — * see the header. A file with no trailing newline still counts its last line; * an empty file counts as one. */ export declare function countRawLines(content: string): number; /** The top-level directory a scoped path belongs to, as the census buckets it. */ export declare function fileSizeScopeBucket(file: string): string; /** The second scope's directories, relative to the project root. */ export declare const HOOKS_FILE_SIZE_SCOPE_DIRS: readonly [".husky"]; /** * The cap the hooks scope is measured against. It ALIASES `FILE_SIZE_CAP_DEFAULT` * rather than restating 300: the 300 is one decision ("may this file be committed * at this size?"), and a second literal here would be the second copy * `tests/unit/standards/file-size-cap.test.ts` exists to report. Aliasing does NOT * mean the hooks ceiling is unbound — the artifact records `hooksCap` as its own * input and `.husky/peaks-gate-file-size.mjs` re-derives it from a live census, so * re-deciding the default cap trips the hooks row's binding too, as a refusal * rather than as a silent re-baseline. */ export declare const FILE_SIZE_CAP_HOOKS = 300; /** The hooks scope's cap, in the shape the census reports it. */ export type HooksFileSizeCaps = { readonly hooksCap: number; }; /** The cap the hooks scope is measured against right now. */ export declare function hooksFileSizeCaps(): HooksFileSizeCaps; /** True when `file` sits under one of the hooks scope's directories. */ export declare function inHooksFileSizeScope(file: string): boolean; /** * A file the hooks rows measure: under a hooks directory AND of a scope extension. * The extension universe is the SAME seven as the main scope — it is one decision * about what counts as code, and the hooks binding reports it as its own field so a * change to it is named against both scopes. */ export declare function isHooksMeasuredFile(file: string): boolean;