import type { Trajectory, TrajectoryRow, TrajectoryState } from "./parser.js";
/**
 * Rows whose `Writable at` equals the given phase and whose state is not
 * yet `written` or beyond. These are tests the author should commit as
 * failing at phase start (before implementation work).
 */
export declare function getRowsWritableAt(trajectory: Trajectory, phase: number): TrajectoryRow[];
/**
 * Rows whose `Passes at` equals the given phase, regardless of current state.
 * These are the tests that must be in `passing` (or `skipped` with reason)
 * before the phase can close.
 */
export declare function getRowsPassingAt(trajectory: Trajectory, phase: number): TrajectoryRow[];
/**
 * Rows that block phase-close for the given phase. A row blocks if its
 * `Passes at` equals the phase AND its state is not one of the terminal
 * states (`passing`, `skipped`, `blocked` — blocked implies a tracked
 * investigation, not a silent fail).
 */
export declare function getRowsBlockingPhaseClose(trajectory: Trajectory, phase: number): TrajectoryRow[];
/**
 * Update the `State` column for a specific row ID in an impl.md body.
 * Returns the new body. The input must be the full impl body (after
 * frontmatter); the output is body markdown with exactly one cell changed.
 *
 * If the row ID is not found, returns the body unchanged.
 */
export declare function updateRowState(body: string, id: string, newState: TrajectoryState): string;
/**
 * Convenience: parse the body, compute blocking rows, and return error
 * messages suitable for a hook's stderr. Returns empty array if phase can
 * close cleanly.
 */
export declare function computePhaseCloseBlockers(body: string, phase: number): {
    row: TrajectoryRow;
    message: string;
}[];
/**
 * Convenience: nudge text for phase start. Returns a string listing rows
 * whose `Writable at` equals the phase and are not yet written, or null
 * if nothing needs authoring.
 */
export declare function getPhaseStartNudge(body: string, phase: number): string | null;
/**
 * Convenience: nudge text for near-phase-close. Returns a string listing
 * rows whose `Passes at` equals the phase but state is not yet `passing`
 * or `skipped`, or null if the trajectory for this phase is green.
 */
export declare function getPhaseCloseNudge(body: string, phase: number): string | null;
