/**
 * Deterministic changeset probes used by the Ralph loop.
 *
 * The reviewer and debugger sub-agents both benefit from knowing exactly which
 * files were touched by the current work. We compute a diff relative to the
 * parent branch (auto-discovered, defaulting to main) so the changeset
 * includes BOTH committed and uncommitted changes — not just the working tree.
 *
 * Git command failures are captured — not swallowed — so downstream agents
 * can distinguish "nothing changed" from "git broke" and course-correct.
 */
/**
 * Discover the parent (base) branch for the current HEAD.
 *
 * Strategy:
 * 1. Find the merge-base between HEAD and each default-branch candidate.
 *    The candidate whose merge-base is closest to HEAD (fewest commits away)
 *    is the winner.
 * 2. If no candidate exists locally, fall back to "main".
 *
 * This handles the common case of feature branches off main/master without
 * requiring configuration.
 */
export declare function discoverBaseBranch(cwd?: string): Promise<string>;
/** The result of capturing the full changeset for a review. */
export interface BranchChangeset {
    /** The base branch the diff is relative to (e.g. "main") */
    baseBranch: string;
    /**
     * `git diff --stat` output showing files changed, insertions, deletions
     * relative to the merge-base with the parent branch. Includes both
     * committed AND uncommitted changes.
     */
    diffStat: string;
    /**
     * Short list of uncommitted working-tree changes (`git status -s`).
     * Useful for the reviewer to distinguish "already committed" from
     * "still in-flight".
     */
    uncommitted: string;
    /**
     * `git diff --name-status` output listing each changed file with its
     * status (A=added, M=modified, D=deleted, R=renamed).
     */
    nameStatus: string;
    /**
     * Human-readable error messages for any git commands that failed during
     * changeset capture. Empty when everything succeeded. Downstream prompts
     * surface these so the reviewing agent can course-correct (e.g. run the
     * git commands itself, or flag the gap as a finding).
     */
    errors: string[];
}
/**
 * Capture the full changeset for the current branch relative to its parent.
 *
 * Combines:
 * - `git diff <merge-base>..HEAD --stat` (committed changes)
 * - `git diff --stat` (uncommitted staged+unstaged changes)
 * - `git status -s` (working tree snapshot)
 *
 * Into a single {@link BranchChangeset} that gives the reviewer complete
 * visibility into everything this branch has done.
 *
 * Git failures are collected in {@link BranchChangeset.errors} rather than
 * swallowed, so downstream agents see exactly what broke and can compensate.
 */
export declare function captureBranchChangeset(cwd?: string): Promise<BranchChangeset>;
//# sourceMappingURL=git.d.ts.map