/** * A plan, written down before it is carried out. * * Plan mode already existed: read-only, and the model proposes rather than acts. What was missing * was the handover. The plan arrived in the transcript and then nothing happened — you had to * change mode yourself and ask again, from memory, for the thing you had just read. So the mode * produced a document nobody could act on without retyping its intent. * * Two things fix that. The plan goes to a file, so it can be read in an editor, kept, or handed * to somebody else. And the interface asks the obvious question straight afterwards: proceed, and * how. * * The file matters more than it looks. A plan is the one artefact of a session worth keeping when * the session itself is not — it is the thinking, separated from the doing. */ /** Where plans live. Beside the sessions and the config, not in the workspace being changed. */ export declare function plansDir(stateHome?: string): string; /** * A name for a plan file: three words and nothing else. * * `pick` is injected so the name can be asserted rather than observed — a random name is not a * thing a test can check the shape of twice. */ export declare function planName(pick?: (n: number) => number): string; /** * The plan as a document, rather than as a message. * * The heading and the date are for the version of this read a week later, out of the session it * came from, when "what was I going to do about the trim sourcing" is the only thing remembered. */ export declare function planDocument(text: string, opts: { goal?: string | null; at: number; }): string; /** * Write a plan to disk and return its path. * * Failure is returned rather than thrown: a plan that could not be saved is a smaller problem * than a turn that ended in an error because of it, and the plan itself is still on screen. */ export declare function savePlan(text: string, opts?: { goal?: string | null; at?: number; dir?: string; name?: string; }): Promise<{ path: string; } | { error: string; }>; /** What the model is told when a plan is approved, so it acts on the plan rather than re-planning. */ export declare const PROCEED_PROMPT: string; export interface PlanChoice { key: string; label: string; /** The mode to move into. `null` means stay in plan mode and take feedback instead. */ mode: 'auto' | 'edits' | null; } /** * What can be done with a finished plan. * * Two ways to say yes, because the difference between them is the whole question anyone has at * this moment: how much of this am I watching. And one way to say "not quite", which has to leave * the plan on screen and the mode alone — a plan sent back for changes is still a plan. */ export declare const PLAN_CHOICES: readonly PlanChoice[]; //# sourceMappingURL=plan-file.d.ts.map