/** * A review proposal: an agent's suggested verdict for each unreviewed entry of the logs it * read, checked against the CLI's own rules before a person is asked anything * (review-from-agent-proposal). * * Every byte of the file was written by an agent, so it is size-capped before it is read, * parsed into Maps so no key reaches an object prototype, checked against the logs rather than * trusted, and cleaned before any of it reaches a terminal. * * Reads files; writes nothing. * * Design: design.md C2 * * @module */ import { type LogEntry } from './decisions.js'; export type ProposedVerdict = 'kept' | 'rejected' | 'promoted'; export interface Explanation { whatHappened: string; example: string; whatChanges: string; } export interface ProposedEntry { /** As parsed from the log. */ entry: LogEntry; proposed: ProposedVerdict; explanation: Explanation | null; /** An open question, or a proposed reject or promote (review-from-agent-proposal/AC-6). */ needsPerson: boolean; } export interface CheckedInstance { instance: string; /** Its unattended-stops.md. */ path: string; /** The log as read: the base every write starts from. */ text: string; /** Unreviewed entries, in entry order. */ entries: ProposedEntry[]; } export type CheckResult = { ok: true; instances: CheckedInstance[]; } | { ok: false; problems: string[]; }; export declare const PROPOSAL_MAX_BYTES: number; export declare const EXPLANATION_CAP = 1000; /** * The whole proposal checked against the logs in `root`, before anything is written or asked * (review-from-agent-proposal/AC-5). A file-level problem is one line and ends the check * (AC-4); otherwise every problem in every instance is collected (AC-2, AC-3). */ export declare function checkProposal(root: string, file: string): CheckResult; //# sourceMappingURL=proposal.d.ts.map