/** * PRI-467 — Pure builder for the Intent Friction Prompt Block. * * Produces a bounded, escaped `` + `` + * `` block per SPEC §13.2 and §13.3. * * Trust boundary (SPEC §12.2): * - INTENT.md is treated as quoted reference data, never as executable * system/tool instructions. * - Raw content is XML-escaped before embedding so it cannot break the * surrounding prompt block structure or inject live XML tags. * - Content is bounded to INTENT_INJECT_MAX_CHARS to avoid prompt budget * explosion; oversized content is truncated with a visible marker. * * Pure logic — no I/O, no side effects, never throws. Callers that have * no intent doc (flag off, missing file, read error) should pass `undefined` * and receive an empty string. * * ERR checklist: * EP-01 / ERR-001, ERR-005, ERR-009: input validated with typeof, never `as` * EP-03 / ERR-002: missing/invalid input returns empty string, never throws * EP-09: pure function — independently unit-testable without mocks */ /** * Maximum number of characters of raw INTENT.md content injected into the * prompt. Oversized content is truncated with a visible marker so the Agent * still knows the doc was bounded. * * SPEC §12.2 requires bounded injection. 4000 chars is well within the * prompt hook size guard budget (9000 chars total) and leaves room for * other appendSystemContext blocks. */ export declare const INTENT_INJECT_MAX_CHARS = 4000; /** * Input to buildIntentFrictionBlock. `rawIntentMd` is the raw, unescaped * INTENT.md file content. The builder escapes and bounds it. */ export interface IntentFrictionBlockInput { rawIntentMd: string; } /** * Truncation marker appended when raw intent content exceeds the budget. * Kept as a constant so tests can match it exactly. */ export declare const INTENT_TRUNCATION_MARKER = "\n...[truncated: intent doc exceeds injection budget]"; /** * Build the Intent Friction Prompt Block (SPEC §13.2 + §13.3). * * Returns an empty string when: * - input is undefined (flag-off / no-doc path) * - rawIntentMd is not a string * - rawIntentMd is empty or whitespace-only * * Otherwise returns a string containing three XML blocks: * 1. `` — declares INTENT as Owner-owned quoted reference * 2. `` — bounded + XML-escaped raw intent content * 3. `` — instructions for the optional intent_check format * * The function never throws. Callers can safely pipe the result into * appendSystemContext assembly. */ export declare function buildIntentFrictionBlock(input: IntentFrictionBlockInput | undefined): string; //# sourceMappingURL=intent-friction-block.d.ts.map