import type { DoctorCheck } from "./doctor.js";
import { type DetectedBlocker, type ReadinessDimensionInput, type ReadinessVerdict } from "./doctor-readiness-blockers.js";
import type { ReadinessDimensionRecord } from "./doctor-readiness-types.js";
export { CLAIM_EVIDENCE_UNAVAILABLE_REASON, SHIP_BLOCKER_IDS, assessProvabilityBlocker, assessReadiness, computeNarrowedClaim, detectShipBlockers, } from "./doctor-readiness-blockers.js";
export type { BlockerDetectionOptions, DetectedBlocker, ProvabilityAssessment, ReadinessAssessment, ReadinessDimensionInput, ReadinessVerdict, ShipBlockerId, } from "./doctor-readiness-blockers.js";
/**
 * Schema version stamped into `.lisa/readiness.json`. Bump only alongside a
 * deliberate shape change; readers key off this to stay forward-compatible.
 */
export declare const READINESS_SCHEMA_VERSION = 1;
/** The eight ownership dimension ids, in fixed render order. */
export declare const READINESS_DIMENSION_IDS: readonly string[];
/** The persisted `.lisa/readiness.json` shape (schema_version 1). */
export interface ReadinessReport {
    readonly schema_version: number;
    readonly generated_at: string;
    readonly lisa_version: string;
    readonly worker_signature: string;
    readonly verdict: ReadinessVerdict;
    readonly narrowed_claim: string | null;
    readonly blockers: readonly DetectedBlocker[];
    readonly blocker_count: number;
    readonly dimensions: readonly ReadinessDimensionRecord[];
}
/**
 * Resolve the single location every reader and writer uses for the persisted
 * readiness report. Centralizing the path here is intake decision O2's
 * mitigation: relocating the artifact (for example to
 * `wiki/state/agent-ready/readiness.json`) is a one-line change with no other
 * caller to update.
 * @param root - Project root to resolve the report under
 * @returns Absolute path to `.lisa/readiness.json`
 */
export declare function resolveReadinessReportPath(root: string): string;
/**
 * Assess repository readiness and persist the report to `.lisa/readiness.json`.
 *
 * This is the flag-gated collector `runDoctor` appends only when
 * `options.readiness` is true, so the default doctor path stays byte-identical.
 * It is warn-only per intake decision O1: it never returns `fail` and never
 * changes doctor's exit-code semantics — a standing blocker flips the readiness
 * verdict to `NOT_READY` but still emits a `warn` check, because the gate is on
 * the *claim*, not the *process*. Every dimension is reported (never silently
 * omitted), and a dimension whose evidence surface has not shipped yet renders
 * `SKIP` carrying the reason it was not assessed (#1898). Persistence is atomic and never throws — a write error degrades
 * the check to `warn` instead of aborting the run.
 * @param targetPath - Project path to assess and persist under
 * @returns Doctor check result
 */
export declare function checkRepositoryReadiness(targetPath: string): Promise<DoctorCheck>;
/**
 * Write the operator-facing headline for a readiness run, conclusion first.
 *
 * The reader at the gate is non-technical (`factory-model`), so the sentence
 * leads with what it means rather than burying it after the mechanics. When any
 * dimension was never assessed the headline says the readiness question is NOT
 * ESTABLISHED and states how much was skipped — silence is reported as silence,
 * never as health (#1897). Once every dimension has been assessed the
 * not-established caveat is dropped entirely, because a fully assessed run must
 * not carry a sentence contradicting its own verdict. The doctor renderer
 * already prefixes the check name, so this text does not repeat it.
 * @param verdict - The computed verdict for this run
 * @param dimensions - The per-dimension records for this run
 * @returns One operator-language clause, conclusion first, with no trailing period
 */
export declare function formatReadinessHeadline(verdict: ReadinessVerdict, dimensions: readonly ReadinessDimensionInput[]): string;
/**
 * Run one dimension's producer behind an error boundary. A producer that throws
 * degrades its own dimension to a stated-reason SKIP instead of aborting the
 * whole readiness check — losing one dimension is recoverable, losing the report
 * is not, and the operator is told which dimension failed and why.
 * @param id - The dimension id
 * @param targetPath - Project path to assess
 * @param produce - The dimension's producer
 * @returns The produced record, or a stated-reason SKIP on failure
 */
export declare function runDimensionProducer(id: string, targetPath: string, produce: DimensionProducer): Promise<ReadinessDimensionRecord>;
/**
 * Produce one dimension's record from the project path. Every producer is
 * offline by construction — readiness must be assessable with no network.
 */
export type DimensionProducer = (targetPath: string) => Promise<ReadinessDimensionRecord>;
/**
 * Atomically write the readiness report: write a sibling temp file, then rename
 * it into place so a reader never observes a partial document.
 *
 * The temp name carries a UUID, and that is the load-bearing part rather than a
 * flourish. It used to be a fixed `${reportPath}.tmp`, which meant two
 * concurrent `lisa doctor` runs in one checkout opened the SAME file: both
 * truncated it, both wrote from offset zero, and the first to finish renamed it
 * out from under the second — whose descriptor then pointed at the published
 * report, so its tail landed inside the document the first run had just
 * published. The rename was always atomic; the CONTENT being renamed was not,
 * which is precisely the property the paragraph above claims to buy.
 *
 * Concurrent doctor runs are the normal operating mode here, not an edge case:
 * six agents ran against this repository at once on 2026-08-24.
 *
 * `crypto.randomUUID()` rather than a pid or a timestamp, matching
 * `src/core/learnings-lock.ts`, which uses it for its owner token and its
 * quarantine path for exactly this reason. A pid collides across containers and
 * is reused after wraparound; a millisecond timestamp collides between two runs
 * started in the same tick, which is the case that matters most.
 * @param reportPath - Destination path
 * @param report - Report to persist
 */
export declare function persistReadinessReport(reportPath: string, report: ReadinessReport): Promise<void>;
//# sourceMappingURL=doctor-readiness.d.ts.map