/** * Triage from the command line: move an `inbox/` item to `backlog/` with its rank and run * mode, or to `hold/` parked or declined (autopilot-watcher-asks-person/AC-31..AC-33). * * The roadmap skill triaged by moving files and editing frontmatter by hand. The autopilot * watcher applies a person's triage answer with one command, and a hand edit is the step * an agent was seen fumbling (the reason `roadmap park` and `roadmap rank` exist), so the * three writes live here: the `run:` line and the history entry in one write before the * rename, then the rank through `planRank`, which renumbers the others. * * Every refusal is decided before the first write. Reads and writes the PRIMARY checkout's * roadmap, like every lookup that decides status. * * @module */ import { type RunMode } from './next.js'; import { type RoadmapItem } from './paths.js'; export declare const TRIAGE_TARGETS: readonly ["backlog", "park", "decline"]; export type TriageTarget = (typeof TRIAGE_TARGETS)[number]; export interface TriageOptions { rank?: number; run?: RunMode; reason?: string; /** ISO date for the history entry. */ at: string; } export type TriageResult = { ok: true; file: string; lines: string[]; } | { ok: false; detail: string; }; /** * Set an item's `run:` line, editing the frontmatter as text as `setPriorityLine` does; with * none, it is added as the last frontmatter line. * * @returns The new contents, or null when there is no frontmatter. */ export declare function setRunLine(raw: string, run: RunMode): string | null; /** Compared against names listed from disk, never joined into a path. */ export declare function matchesRef(item: RoadmapItem, ref: string): boolean; /** The reason of the item's last history entry, or null. */ export declare function lastReason(item: RoadmapItem): string | null; /** Move `ref` to `to`, refusing before any write (AC-31, AC-32, AC-33). */ export declare function triageItem(cwd: string, ref: string, to: TriageTarget, opts: TriageOptions): TriageResult; //# sourceMappingURL=triage.d.ts.map