/** * CLAUDE.md hook injector — ensures CLAUDE.md contains an AIWG-managed * marker block with an `@AIWG.md` include. * * For provider=claude, AIWG.md still gets generated at project root the * same way as for other providers. The difference: claude reads CLAUDE.md * natively (not AGENTS.md), so we need a different bridge — a managed * block inside CLAUDE.md that pulls AIWG.md in via `@-mention`. * * Design: * - Marker block delimits AIWG-managed content; operator content outside * the block is never touched. * - If CLAUDE.md exists without the block, append the block to the end. * - If CLAUDE.md exists with the block, update the block in place. * - If CLAUDE.md does not exist, create a minimal CLAUDE.md with just * the marker block (operator will add their own content later). * - `--force` allows replacing the marker block content even when the * block has been operator-modified inside (with backup). * * @issue #1437 */ export declare const CLAUDE_HOOK_START = ""; export declare const CLAUDE_HOOK_END = ""; /** * The managed block that gets inserted into CLAUDE.md. Tells Claude Code * to load AIWG.md as the project context entry point. Kept short — the * actual context lives in AIWG.md. */ export declare function buildClaudeHookBlock(): string; export interface ClaudeHookOptions { /** Whether to back up operator-modified content before replacing the block */ force?: boolean; /** When true, refuse to update the block if it has drifted from canonical */ detectExistingFiles?: boolean; } export interface ClaudeHookResult { /** Path of CLAUDE.md (always set if any action attempted) */ claudeMdPath: string; /** What happened */ action: 'created' | 'inserted' | 'updated' | 'unchanged' | 'skipped'; /** Backup file path if --force replaced operator content */ backupPath?: string; /** Non-fatal warnings */ warnings: string[]; } /** * Ensure CLAUDE.md at projectPath contains the AIWG-managed marker block * pointing at AIWG.md. Returns a result describing what was done. */ export declare function ensureClaudeMdHook(projectPath: string, opts?: ClaudeHookOptions): Promise; //# sourceMappingURL=claude-hook.d.ts.map