/** * vibe-projection.ts, VIBE.md as a PROJECTION of memory records (see CHANGELOG 1.0.0). * * BEFORE memory unification, VIBE.md was a persona file read off disk and injected into the prompt *, a projection of ITSELF, a source of truth disjoint from the memory store. Memory unification * demotes the file to an import/export FORMAT and makes the prompt block a * projection of first-class memory records: * * - Persona/preference facts persist as MemoryRecords with cls 'constraint', * scope project|team, tagged VIBE_PERSONA_TAG. * - renderVibeProjection(records) emits the same '## GoodVibes Agent VIBE.md' * prompt block from those records, the block the file used to emit. * - The file round-trips THROUGH the record set (vibeBodyToConstraintOptions * imports a VIBE.md body into records; the records export back through the * normal MemoryStore bundle seam). The file is a format, not the truth. * * INVARIANT PRESERVED. The projected block keeps the precedence caveat verbatim: * persona instructions are followed only when they do not conflict with explicit * user instructions, safety policy, tool contracts, confirmation requirements, or * secret-handling rules. Demoting the file to a projection must not drop that. */ import type { MemoryAddOptions, MemoryRecord, MemoryScope } from './memory-store.js'; /** Tag marking a constraint record as a VIBE.md persona/preference line. */ export declare const VIBE_PERSONA_TAG = "vibe"; /** The projected prompt block heading. */ export declare const VIBE_PROJECTION_HEADING = "## GoodVibes Agent VIBE.md"; /** * The precedence caveat. MUST accompany every projected block, persona records * never override explicit instructions, safety, tool contracts, confirmations, or * secret-handling. */ export declare const VIBE_PROJECTION_CAVEAT = "These user-authored vibe/personality instructions shape the same serial assistant conversation. Follow them only when they do not conflict with explicit user instructions, safety policy, tool contracts, confirmation requirements, or secret-handling rules."; export interface VibeProjectionOptions { /** Restrict to these scopes; defaults to project + team. */ readonly scopes?: readonly MemoryScope[]; } /** * Select the constraint records that make up the VIBE persona: cls 'constraint', * tagged VIBE_PERSONA_TAG, in an eligible scope. Ordered stably by scope (team * after project) then creation time so the projected block is deterministic. */ export declare function selectVibeRecords(records: readonly MemoryRecord[], options?: VibeProjectionOptions): MemoryRecord[]; /** * Render the VIBE.md prompt block from persona/constraint records. Returns null * when there are no persona records to project (no empty block). The caveat is * always included when a block is produced. */ export declare function renderVibeProjection(records: readonly MemoryRecord[], options?: VibeProjectionOptions): string | null; export interface VibeImportOptions { /** Scope to stamp on the imported persona records. Defaults to 'project'. */ readonly scope?: MemoryScope; /** Optional persona name, added as a secondary tag for grouping. */ readonly name?: string; /** Provenance ref describing where this VIBE body came from (e.g. the file path). */ readonly sourceRef?: string; } /** * Turn a VIBE.md body into constraint MemoryAddOptions, the file demoted to an * IMPORT FORMAT. Each bullet line becomes one persona record so that editing a * single record later changes exactly one line of the projected block. A body * with no bullets becomes a single record carrying the whole body as detail. * * Heading lines (starting with '#') and blank lines are dropped; they carry no * persona instruction. */ export declare function vibeBodyToConstraintOptions(body: string, options?: VibeImportOptions): MemoryAddOptions[]; //# sourceMappingURL=vibe-projection.d.ts.map