/**
 * Marker that opened the legacy agy "baked rules" block in `AGENTS.md`. Retained
 * here (after the agy AGENTS.md installer was removed) so the migration can
 * recognize and strip blocks written by older Lisa versions.
 */
export declare const LISA_RULES_START_MARKER = "<!-- LISA_RULES_START -->";
/** Marker that closed the legacy agy "baked rules" block in `AGENTS.md`. */
export declare const LISA_RULES_END_MARKER = "<!-- LISA_RULES_END -->";
/** Marker opening Lisa's bounded Antigravity project-learnings bridge. */
export declare const LISA_PROJECT_LEARNINGS_START_MARKER = "<!-- LISA_PROJECT_LEARNINGS_START -->";
/** Marker closing Lisa's bounded Antigravity project-learnings bridge. */
export declare const LISA_PROJECT_LEARNINGS_END_MARKER = "<!-- LISA_PROJECT_LEARNINGS_END -->";
export { LISA_HOST_RULES_END_MARKER, LISA_HOST_RULES_START_MARKER, buildHostRulesPointer, stripHostRulesPointer, } from "./host-rules-pointer.js";
/** Outcome of an instruction-files migration pass. */
export interface InstructionFilesMigrationResult {
    /** True when any file was created or modified. */
    readonly changed: boolean;
    /** Human-readable description of each action taken (empty when no-op). */
    readonly actions: readonly string[];
}
/** Outcome of the learnings-ledger relocation. */
export interface LearningsRelocationResult {
    /** True when the ledger was moved from its legacy to its new location. */
    readonly moved: boolean;
    /** Info line describing the completed move (present only when moved). */
    readonly action?: string;
    /**
     * Warning line when both the legacy and new ledgers exist. Neither file is
     * touched — a human reconciles — so re-runs keep surfacing it until resolved.
     */
    readonly warning?: string;
}
/**
 * Relocate the machine-managed learnings ledger from its legacy location (the
 * sibling of `projectRulesFile`, inside an auto-loaded rules tree) to the new
 * canonical `.lisa/PROJECT_LEARNINGS.md`. Runs during `lisa apply`/`doctor`
 * reconciliation.
 *
 * Move semantics (all idempotent):
 *   - legacy present, new absent → move byte-for-byte, remove the legacy file.
 *   - both present → do NOT clobber; keep both and warn once, naming both
 *     paths, so a human decides which to keep.
 *   - legacy absent (or already relocated) → quiet no-op.
 *
 * The move preserves bytes exactly (read buffer, write, unlink) rather than
 * trusting a same-filesystem rename, so it also works across mount boundaries.
 * @param destDir - Absolute path to the host project root.
 * @returns Whether the ledger moved, plus an info or warning line.
 */
export declare function relocateProjectLearningsLedger(destDir: string): Promise<LearningsRelocationResult>;
/** Options controlling the instruction-files migration. */
export interface MigrateInstructionFilesOptions {
    /**
     * Whether to create a `CLAUDE.md` pointer when none exists. Defaults to true
     * (doctor's behavior — a project should have a CLAUDE.md so Claude Code reads
     * the canonical AGENTS.md). Set false for harnesses that don't include Claude
     * (e.g. a codex-only `lisa apply`) so no stray `CLAUDE.md` is written; an
     * existing host-authored `CLAUDE.md` still gets the `@AGENTS.md` import either
     * way.
     */
    readonly createClaudePointer?: boolean;
    /**
     * Whether to reconcile the agy project-learnings bridge in `AGENTS.md`.
     * Defaults from `.lisa.config.json`: enabled only when the effective harness
     * includes agy.
     */
    readonly reconcileAgyProjectLearnings?: boolean;
    /**
     * Resolved project-relative learnings path. Defaults to the canonical
     * `.lisa/PROJECT_LEARNINGS.md` (or a validated `learnings.file` override).
     */
    readonly projectLearningsFile?: string;
    /**
     * Whether to relocate a legacy ledger as part of this pass. Defaults to true
     * (doctor's behavior). `lisa apply` sets this false because it already runs
     * the relocation in an earlier phase (before the create-only strategy seeds
     * an empty ledger), and re-running it here would re-emit the both-exist
     * warning a second time in the same run.
     */
    readonly relocateLearnings?: boolean;
}
/**
 * Remove a legacy agy `LISA_RULES_START..END` block from an AGENTS.md body,
 * collapsing the whitespace left behind. Returns the original string unchanged
 * when no well-formed block is present.
 * @param body - Existing `AGENTS.md` contents.
 * @returns The body with the Lisa-managed agy block removed.
 */
export declare function stripBakedAgyRulesBlock(body: string): string;
/**
 * Remove a managed project-learnings bridge from AGENTS.md. Malformed marker
 * pairs are left unchanged so Lisa never guesses which host bytes to delete.
 * @param body - Existing `AGENTS.md` contents.
 * @returns The body with the managed bridge removed, when a full block exists.
 */
export declare function stripAgyProjectLearningsBridge(body: string): string;
/**
 * Build the exact bounded Antigravity project-learnings bridge block.
 * @param projectLearningsFile - Project-relative resolved learnings path.
 * @returns Managed bridge block with surrounding markers.
 */
export declare function buildAgyProjectLearningsBridge(projectLearningsFile: string): string;
/**
 * Run the instruction-files migration against a host project root.
 * @param destDir - Absolute path to the host project root.
 * @param options - Migration options (see {@link MigrateInstructionFilesOptions}).
 * @returns Whether anything changed plus a description of each action.
 */
export declare function migrateInstructionFiles(destDir: string, options?: MigrateInstructionFilesOptions): Promise<InstructionFilesMigrationResult>;
//# sourceMappingURL=instruction-files-migration.d.ts.map