/** * The compliance findings stream: `.compliance.md`. * * Deliberately a different filename from `.review.md`. Findings files are * discovered in exactly one place — `loadFindings` in `commands/transition.ts`, * which filters on `f.endsWith('.review.md')` — so a compliance file cannot reach * `checkReviewGate`. That is what buys advisory-by-default for nothing: * `checkReviewGate` blocks on *any* critical open finding, pooled across artifacts, * and `Finding` has no control field, so a critical control finding living in a * review file would block a transition regardless of `compliance.enforce`. * * The grammar is the shared one in `../review/findings-parser.ts`, plus two * additions: * * - a `Control` bullet on a finding block, naming the control id; * - a `## Controls Checked` section whose lines record controls examined with no * issue found. * * The cleared list is a separate production because coverage is satisfiable two * ways: a finding carrying a control id, **or** an explicit no-issues line naming * it. A no-issues line is not a finding — it has no severity, status or suggestion — * so folding it into the finding grammar would mean inventing values for all three. * Without it, a phase where every control passes would write a file the parser reads * as empty, and the criterion would block on the whole applicable set. * * Requirements: compliance-packs/AC-62, AC-81 */ import type { Finding } from '../core/types.js'; import { type FindingsFileMeta } from '../review/findings-parser.js'; /** A review finding carrying the control it was raised against. */ export interface ComplianceFinding extends Finding { /** Regime control id, e.g. `CC8.1`. Absent when the author omitted it. */ control?: string; } /** A parsed compliance findings file. */ export interface ComplianceFindingsFile { meta: FindingsFileMeta; findings: ComplianceFinding[]; /** Control ids recorded as examined with no issue found. */ cleared: string[]; /** Problems worth surfacing that are not themselves findings. */ warnings: string[]; } /** The heading that introduces the cleared list. */ export declare const CLEARED_HEADING = "Controls Checked"; /** `.compliance.md` for an artifact name. */ export declare function complianceFindingsFilename(artifact: string): string; /** * Parse a compliance findings file. * * Never throws. A malformed section becomes a warning, because a compliance file * that fails to parse must degrade to "nothing is covered" — the conservative * direction — rather than break an unrelated transition. */ export declare function parseComplianceFindings(content: string): ComplianceFindingsFile; /** Ids a compliance file accounts for: raised against, or explicitly cleared. */ export declare function accountedControls(file: ComplianceFindingsFile): Set; /** * Render the scaffold of a compliance findings file. * * Lists every applicable control so the reviewing agent cannot forget one, and marks * each as pending rather than cleared — an unwritten file must never read as covered. */ export declare function renderComplianceScaffold(artifact: string, reviewer: string, controls: { id: string; requires: string; look_at: string; fails_when: string; }[], now?: Date): string; //# sourceMappingURL=findings.d.ts.map