/** * Canonical Instruction Loader * * Reads the canonical instruction source file from `.smartergpt/instructions/lex.md` * (or a custom path from config) and prepares it for projection. */ import { LexYaml } from "../config/lex-yaml-schema.js"; /** * Result of loading canonical instructions */ export interface CanonicalResult { /** Raw content of the canonical instruction file */ content: string; /** Absolute path to the canonical file */ path: string; /** Whether the file exists */ exists: boolean; /** SHA-256 hash of the content for idempotency checking */ hash: string; } /** * Load canonical instruction content from the repository * * @param repoRoot - Absolute path to the repository root * @param config - Optional LexYaml config to override default path * @returns CanonicalResult with content, path, existence, and hash * * @example * ```ts * const result = loadCanonicalInstructions('/path/to/repo'); * if (result.exists) { * console.log("Content hash:", result.hash); * console.log("Content:", result.content); * } else { * console.log("No canonical file at:", result.path); * } * ``` */ export declare function loadCanonicalInstructions(repoRoot: string, config?: LexYaml): CanonicalResult; /** * Compute SHA-256 hash of content for idempotency checking * * @param content - String content to hash * @returns Hex-encoded SHA-256 hash */ export declare function computeHash(content: string): string; /** * Get the default canonical instruction path * * @returns The default relative path for canonical instructions */ export declare function getDefaultCanonicalPath(): string;