/**
 * Lifecycle Hook Dispatcher
 *
 * Reads hooks config from config.json and dispatches configured actions
 * at lifecycle points (increment planned, task completed, increment done).
 *
 * All dispatches are:
 * - Non-blocking (fire-and-forget async)
 * - Error-isolated (catch + log, never crash)
 * - Skipped in test environment (process.env.VITEST)
 *
 * Part of increment 0298: Hook Lifecycle Wiring
 */
/**
 * Options for dispatch methods (internal use)
 */
export interface DispatchOptions {
    /** Bypass the test environment guard (for unit testing the dispatcher itself) */
    _bypassTestGuard?: boolean;
    /** When true, run direct sync regardless of sync.mode (used by specweave complete) */
    directSync?: boolean;
}
/**
 * Result from onIncrementDone with sync status details.
 * Callers can inspect this to display sync outcome to the user.
 */
export interface IncrementDoneResult {
    syncErrors: string[];
    syncSuccess: string[];
}
/**
 * Dispatches configured actions at lifecycle hook points.
 *
 * All dispatches are error-isolated (catch + log, never crash).
 * onIncrementDone is awaited by completeIncrement() for reliable post-closure sync.
 */
export declare class LifecycleHookDispatcher {
    /**
     * Dispatch post-increment-planning hooks.
     *
     * Checks hooks.post_increment_planning.auto_create_github_issue
     * and calls autoCreateExternalIssue if true.
     */
    static onIncrementPlanned(projectRoot: string, incrementId: string, options?: DispatchOptions): Promise<void>;
    /**
     * Dispatch post-task-completion hooks.
     *
     * Checks hooks.post_task_completion for:
     * - sync_tasks_md: triggers LivingDocsSync.syncIncrement
     * - external_tracker_sync: triggers SyncCoordinator.syncIncrementClosure
     */
    static onTaskCompleted(projectRoot: string, incrementId: string, options?: DispatchOptions & {
        taskId?: string;
    }): Promise<void>;
    /**
     * Dispatch post-increment-done hooks.
     *
     * Checks hooks.post_increment_done for:
     * - sync_living_docs: triggers LivingDocsSync.syncIncrement
     * - sync_to_github_project: triggers GitHubFeatureSync for the increment's feature
     * - close_github_issue: triggers SyncCoordinator.syncIncrementClosure
     * - update_living_docs_first: if true, living docs sync runs before closure
     */
    static onIncrementDone(projectRoot: string, incrementId: string, options?: DispatchOptions): Promise<IncrementDoneResult>;
    /**
     * Check if dispatch should be skipped (test environment guard)
     */
    private static shouldSkip;
    /**
     * Resolve increment directory path from incrementId.
     * Handles both full IDs ("0499-feature") and short IDs ("0499").
     */
    private static resolveIncrementDir;
    /**
     * Read sync.mode from config.json.
     * Returns 'queued' (default) or 'immediate' (legacy).
     */
    private static getSyncMode;
    /**
     * Read hooks configuration from config.json
     */
    private static readHooksConfig;
    /**
     * Update cross-references in existing living docs after feature specs are created.
     *
     * Lightweight post-sync step that:
     * 1. Updates specs/{project}/README.md with links to the new FS-XXX folder
     * 2. Logs verification of FEATURE.md existence
     *
     * This runs automatically so the link update doesn't depend on the AI skill step.
     */
    private static updateDocsLinks;
    /**
     * Log error without propagating.
     *
     * 0696 hotfix: when projectRoot is provided, also persist the error
     * (with full stack) to .specweave/logs/hooks.log. Both the directory
     * creation and the file append are wrapped in try/catch so a locked
     * filesystem or missing directory never blocks hook execution.
     */
    private static logError;
}
//# sourceMappingURL=LifecycleHookDispatcher.d.ts.map