/** * What a session leaves behind for whoever picks the work up. * * Resuming a session hands you its whole transcript, which is the wrong shape for the question you * actually have. You do not want to re-read forty turns; you want three things: what changed, what * was learned, and what is not finished. Those are the questions a colleague answers in a sentence * each when they hand over, and until now the only way to get them was to read everything and work * them out. * * Three decisions worth stating. * * It is derived, not asked for. A note the model is prompted to write is a note that gets written * when the model has attention to spare, which is not when a session ends — and a summary the model * composes about its own work is the least reliable summary available. Files changed, commands run, * findings recorded and plan steps left open are all facts already recorded; this reads them out. * * Unfinished means unfinished, not "probably fine". A plan step still open is unfinished. A test * command whose last run failed is unfinished. Nothing here softens either into a summary that * reads as success, because the whole value of a handover note is that it is honest about what is * still broken — a note that says "all done" about a red test is worse than no note. * * It is short by construction. Not a paragraph limit imposed on prose, but a shape: counted files, * named commands, listed steps. A handover that has to be read carefully has failed at being a * handover. */ import type { Finding } from './ledger.js'; /** One line of a handover: a fact, and the evidence it rests on. */ export interface HandoffNote { /** Files this session wrote, most-touched first. */ changed: Array<{ path: string; passes: number; }>; /** What it worked out that was not obvious — from the ledger, in this session's own words. */ learned: string[]; /** What is still open, and why it counts as open. */ unfinished: string[]; /** Commands that ended badly and were not seen to work afterwards. */ broken: Array<{ command: string; why: string; }>; } /** A trajectory event, as much of one as this needs. */ interface Event { t: string; name?: string; ok?: boolean; detail?: string; ms?: number; reason?: string; } /** A plan step, as much of one as this needs. */ interface Step { text: string; state: string; } /** * Reads a handover out of what a session actually did. * * `findings` are the ones this session recorded rather than the whole ledger: a handover is about * this stretch of work, and a note that repeats what was already known before it started is noise * dressed as a summary. */ export declare function handoffFrom(events: readonly Event[], plan?: readonly Step[], findings?: readonly Finding[]): HandoffNote; /** Whether there is anything worth writing down. */ export declare function worthSaying(note: HandoffNote): boolean; /** * The note as a person would read it. * * Each section is omitted when it is empty rather than printed with "none": a heading with nothing * under it teaches the reader to skim, and the sections that matter are the ones that are there. * * ## What is a summary and what is a record * * The findings section used to print every remembered note in full. Those notes are KONECK's own * working knowledge — they exist so the next run does not repeat a command that failed — and they * are written for a machine to match against, not for a person to read. Dumped at the end of a run * they are unreadable and of no use to the reader, which is exactly how it was reported. * * So they are counted, and the shortest couple are shown as examples if they are short enough to * be worth reading. The full text is not lost: it is in the ledger, which is where it was already * being kept before this printed anything. */ export declare function describeHandoff(note: HandoffNote, limit?: number): string | null; export {}; //# sourceMappingURL=handoff.d.ts.map