/**
 * SpecFrontmatterUpdater - Update spec.md YAML frontmatter
 *
 * Implements atomic updates to spec.md frontmatter while preserving all other fields.
 * Used to keep spec.md in sync with metadata.json during status transitions.
 *
 * Task: T-001
 * Increment: 0043-spec-md-desync-fix
 * User Stories: US-002
 * Acceptance Criteria: AC-US2-01, AC-US2-04
 */
import { IncrementStatus } from '../types/increment-metadata.js';
/**
 * Error thrown when spec.md frontmatter update fails
 */
export declare class SpecUpdateError extends Error {
    incrementId: string;
    originalError?: Error | undefined;
    constructor(message: string, incrementId: string, originalError?: Error | undefined);
}
/**
 * SpecFrontmatterUpdater - Manages spec.md YAML frontmatter updates
 *
 * Key Features:
 * - Atomic updates (temp file → rename pattern)
 * - Preserves all existing frontmatter fields
 * - Validates status against IncrementStatus enum
 * - Thread-safe writes
 *
 * Usage:
 * ```typescript
 * await SpecFrontmatterUpdater.updateStatus('0001-test', IncrementStatus.COMPLETED);
 * ```
 */
export declare class SpecFrontmatterUpdater {
    /**
     * Update spec.md YAML frontmatter status field
     *
     * Performs atomic update using temp file → rename pattern to prevent partial writes.
     * Preserves all other frontmatter fields.
     *
     * @param incrementId - Increment ID (e.g., "0001-test-increment")
     * @param status - New status value (must be valid IncrementStatus enum)
     * @throws {SpecUpdateError} If update fails or status invalid
     *
     * @example
     * ```typescript
     * await SpecFrontmatterUpdater.updateStatus('0001-test', IncrementStatus.COMPLETED);
     * ```
     *
     * AC-US2-01: Updates both metadata.json AND spec.md frontmatter
     * AC-US2-03: All status transitions update spec.md
     * AC-US2-04: Status field matches IncrementStatus enum values exactly
     */
    static updateStatus(incrementId: string, status: IncrementStatus): Promise<void>;
    /**
     * Read current status from spec.md frontmatter
     *
     * @param incrementId - Increment ID
     * @returns Current status value or null if missing
     *
     * AC-US2-02: Desync detection reads both files
     * AC-US2-04: Validates status is valid enum value
     */
    static readStatus(incrementId: string): Promise<IncrementStatus | null>;
    /**
     * Validate spec.md frontmatter status field
     *
     * @param incrementId - Increment ID
     * @returns true if validation passes
     * @throws {SpecUpdateError} If status invalid or missing
     *
     * AC-US2-02: Validation detects desyncs
     * AC-US2-04: Validates status matches IncrementStatus enum
     */
    static validate(incrementId: string): Promise<boolean>;
}
//# sourceMappingURL=spec-frontmatter-updater.d.ts.map