/** .claude/settings.json — only the slice we manage is typed; every unknown * key is preserved verbatim (never overwrite: git-workflow.md contract — * `bd setup claude` hooks and user hooks own entries here too). */ export interface HookCommand { type: 'command'; command: string; [k: string]: unknown; } export interface HookEntry { matcher?: string; hooks: HookCommand[]; [k: string]: unknown; } export interface ClaudeSettings { hooks?: Record; [k: string]: unknown; } export declare const SETTINGS_PATH = ".claude/settings.json"; /** The exact reminder command git-workflow.md registers (kept in sync with the * "Configure the PostToolUse review-reminder hook" section of that step). */ export declare const REVIEW_REMINDER_COMMAND: string; export interface HookSpec { id: string; event: 'SessionStart' | 'PreToolUse' | 'PostToolUse'; /** Substring marking an EQUIVALENT hook as already registered (the old * `grep -q ''` semantics, scoped to this event's commands). */ marker: string; entry: HookEntry; /** Human description used in report lines. */ describe: string; /** Null when installable; otherwise the explicit report line (D8: a missing * prerequisite is REPORTED, never a silent no-op). */ prerequisite: (projectRoot: string) => string | null; } export declare const HOOK_SPECS: HookSpec[]; export interface HookPlanItem { spec: HookSpec; action: 'add' | 'already-present' | 'skipped'; reason?: string; } export interface HookPlan { items: HookPlanItem[]; } /** Pure planning half — reused read-only by the adopt plan's ops-actions * preview (Task 18) so the plan can render exactly what install would do. */ export declare function planHooks(projectRoot: string, settings: ClaudeSettings): HookPlan; /** Pure merge half: append-only into the per-event arrays, everything else * untouched (the jq `(.hooks.X // []) + [entry]` semantics). */ export declare function applyHookPlan(settings: ClaudeSettings, plan: HookPlan): ClaudeSettings; export declare function readSettings(projectRoot: string): ClaudeSettings; /** Atomic write via the codebase-wide helper (temp file + rename, no torn * settings). Reuses `atomicWriteFile` from src/utils/fs.ts — do NOT hand-roll * temp-file-and-rename here. */ export declare function writeSettings(projectRoot: string, settings: ClaudeSettings): void; export interface HooksInstallResult { /** describe lines of hooks registered by this run. */ added: string[]; /** describe lines of hooks whose marker was already present. */ alreadyPresent: string[]; /** One entry per hook whose prerequisite is missing (explicit, D8). */ skipped: { hook: string; reason: string; }[]; settingsPath: string; changed: boolean; } /** The D8 primitive: idempotent deep-merge registration of the Claude Code * hooks. Consumed by `scaffold hooks install` (Task 13), the bootstrap arm * step (Task 15), and doctor's hook-reregistration fix (Task 16). */ export declare function installHooks(projectRoot: string): HooksInstallResult; //# sourceMappingURL=install.d.ts.map