import type { AutoCompactMode } from '../../../services/code/auto-compact-modes.js'; import { type BatchContextReminder } from '../../../services/batch/batch-context-reminder.js'; /** * The loop-hygiene verdict attached to every ACTIVE `skill.presence` read. * * Why it lives here instead of only in a SKILL.md body: the zero-pause * contract ("auto-compact is the skill's own action, never the user's") * was already written into `peaks-code/SKILL.md`, including an explicit * ban on the exact phrasing "prompt the user to run `/compact`" — and it * was still violated. A SKILL.md body is loaded once and is then * compacted away, so the rule stops governing at precisely the moment * context pressure makes it matter. `skill.presence` is the one call * EVERY skill makes on EVERY turn, in EVERY consumer project and EVERY * mode, so a value carried here cannot be forgotten, and no skill has to * be edited for the obligation to reach the model. * * READ-ONLY by contract. It probes and reports; it never compacts. * Executing `peaks code auto-compact` stays the skill's own action — a * side effect here would fire on every single turn. * * THE ONE WRITE. The batch reminder records the phase it last spoke in, * so the batch says its reminder once per phase instead of once per turn. * That marker is written only when the phase changed or when the batch * spoke, and it lives in the batch's own directory under the session — * never in the presence marker itself. * * Failure swallows to `null`: the hygiene verdict is advisory and must * never be able to break the presence read itself. * * THE BATCH REMINDER IS CARRIED HERE TOO. A batch's context reminder (the * ratio zone, the phase boundary) is another statement about the window, * and it reaches the model through the same carrier — so a batch sentence * cannot bypass the zero-pause contract by living somewhere else. The * sentence itself is built by the batch module (it owns the wording); it * is APPENDED here, and it states a fact rather than asking anybody to do * anything. */ export declare function buildContextVerdict(ratio: number, mode: AutoCompactMode, batch?: BatchContextReminder | null): { context: { ratioPct: string; action: string; mode: string; }; nextActions: string[]; }; export declare function contextVerdict(projectRoot: string): { context: { ratioPct: string; action: string; mode: string; } | null; nextActions: string[]; };