/**
 * Spec metadata parser for the auto-salvage hook.
 *
 * Specs authored by the user's MCP-cloud-spawn workflow follow a consistent
 * header format (see `specs/mcp-cloud-spawn/pr-*.md`):
 *
 *   # Spec: <title>
 *   Target repo: `cloud`
 *   Target branch: `feat/foo`
 *   Worktree: `/private/tmp/cloud-foo`
 *
 * The salvage hook needs these fields to know which repo / branch / worktree
 * to commit + push + open a PR against. This parser extracts each field
 * independently — a missing field returns `null` for that field, the caller
 * decides whether the overall spec is salvageable.
 */
export interface SpecMetadata {
    title: string | null;
    repo: string | null;
    branch: string | null;
    worktree: string | null;
}
/**
 * Parses spec metadata from the markdown body.
 *
 * Header lines are matched case-insensitively (so `Target Repo:` and
 * `target repo:` both work) and the value may be wrapped in backticks,
 * quotes, or bare text. Trailing whitespace is trimmed.
 *
 * Returns a partial record with each field independently nullable. The
 * caller checks `isSalvageableSpec` to decide whether to proceed.
 */
export declare function parseSpecMetadata(markdown: string): SpecMetadata;
/**
 * True when every required field for salvage is present and non-empty.
 *
 * We require repo + branch + worktree (the operational triple). Title is
 * recovered separately — when absent we fall back to a synthetic title in
 * the commit / PR builder.
 */
export declare function isSalvageableSpec(metadata: SpecMetadata): metadata is SpecMetadata & {
    repo: string;
    branch: string;
    worktree: string;
};
/**
 * Picks a sensible "feat(...): title" / "fix(...): title" PR title from the
 * spec H1 line. Heuristic: if the spec mentions "fix" / "bug" in the first
 * 500 chars we infer fix(...), otherwise feat(...). The scope is the repo
 * name. Falls back to the raw title if no scope can be inferred.
 */
export declare function inferPrTitle(metadata: SpecMetadata, markdown: string): string;
