import { type ChecklistItem } from "./checklist-items.js"; export declare const CHECKLIST_RESULTS: readonly ["pass", "issues", "not-applicable"]; export type ChecklistResult = (typeof CHECKLIST_RESULTS)[number]; export type ChecklistStatus = "not-run" | "not-applicable" | "due" | "passed" | "needs-work"; export declare const SUMMARY_MAX = 300; export declare const FINDING_MAX = 300; export declare const EVIDENCE_MAX = 200; export declare const LIST_MAX = 10; export interface ChecklistEntry { readonly checkedAt: string; readonly commit: string | null; readonly uncommittedChanges: boolean; readonly result: ChecklistResult; readonly summary: string; readonly findings: readonly string[]; /** Findings the owner chose to leave as is, each with the reason. They don't block `pass`. */ readonly accepted: readonly string[]; readonly evidence: readonly string[]; } export interface ChecklistRecord { readonly version: 1; readonly items: Readonly>; } export type Result = { ok: true; value: T; } | { ok: false; error: E; }; export declare function checklistPath(cwd: string): string; /** * Read and validate the record. A missing file is an empty record; a file that * is not valid JSON (or not a version-1 record) is an error, so a write never * silently replaces a teammate's data. Invalid entries are dropped, not fatal. */ export declare function readChecklist(cwd: string, now: Date, signal?: AbortSignal): Promise>; /** Canonical JSON: ids sorted, fixed key order, 2-space indent, trailing newline. * `accepted` is written only when non-empty, so records without it stay unchanged. */ export declare function serializeChecklist(record: ChecklistRecord): string; /** Lock the whole read/merge/write transaction, then replace the record atomically. */ export declare function writeChecklistEntry(cwd: string, id: string, entry: ChecklistEntry, now: Date, signal?: AbortSignal): Promise>; export declare function checklistStatus(entry: ChecklistEntry | undefined, now: Date): ChecklistStatus; export interface ChecklistRow { readonly id: string; readonly group: ChecklistItem["group"]; readonly title: string; readonly description: string; readonly check: string; readonly skill: string | null; readonly setupCommand: string | null; readonly status: ChecklistStatus; readonly checkedAt: string | null; readonly commit: string | null; readonly uncommittedChanges: boolean; readonly result: ChecklistResult | null; readonly summary: string | null; readonly findings: readonly string[]; readonly accepted: readonly string[]; readonly evidence: readonly string[]; } /** Every item in list order, joined with its recorded entry and current status. */ export declare function checklistView(items: readonly ChecklistItem[], record: ChecklistRecord, now: Date): ChecklistRow[];