import type { EnforcerFinding, RedLineAudit } from '../types.js'; /** The suffix a stderr capture carries: the `2> name.err` redirect. */ export declare const ROOT_SCRATCH_CAPTURE_SUFFIX = ".err"; /** Which shape a root file matched. */ export type RootScratchShape = 'stderr-capture' | 'zero-byte'; /** One scratch artifact found at the project root. */ export interface RootScratchArtifact { /** The file name, as it sits at the root. */ readonly name: string; /** The shape it matched. */ readonly shape: RootScratchShape; /** The size in bytes; `0` for the zero-byte shape, `-1` when it could not be read. */ readonly size: number; } /** * Every scratch artifact at the project root. * * A root that cannot be read THROWS: a sweep that cannot look must not report * "clean", which is the one answer it is not entitled to give. */ export declare function findRootScratchArtifacts(input: { readonly projectRoot: string; }): readonly RootScratchArtifact[]; /** The catalog id the audit reports a root capture under. */ export declare const ROOT_SCRATCH_FINDING_ID = "rl-root-scratch-artifacts-001"; /** The rule text the audit reports a root capture under. */ export declare const ROOT_SCRATCH_RULE = "Root Scratch Artifacts: No Capture At The Project Root"; /** * The audit findings for the root sweep. * * One `fail` finding per artifact. A root that cannot be swept THROWS: the * audit reports a scanner failure rather than a clean sweep, because "clean" * is the one answer a sweep that could not look is not entitled to give. */ export declare function rootScratchFindings(input: { readonly projectRoot: string; }): readonly EnforcerFinding[]; /** * The audit envelope with the root sweep folded in. * * The sweep is merged where a command assembles its envelope, not inside * `runRedLinesAudit`: that module is at the repository's file-size ceiling, and * a line added there moves a ratcheted total UP. Both audit commands call this * one helper, so the two surfaces cannot drift apart. */ export declare function withRootScratchFindings(audit: RedLineAudit, projectRoot: string): RedLineAudit;