/**
 * BRAIN Reasoning — causal trace through task dependency chains.
 *
 * `reasonWhy(taskId)` walks upstream through a task's blocker chain,
 * enriching each node with related brain_decisions. Leaf tasks with
 * no further unresolved blockers are identified as root causes.
 *
 * @task T5390
 * @epic T5149
 */
import type { DataAccessor } from '../store/data-accessor.js';
import type { BrainDecisionNode } from './brain-row-types.js';
export interface BlockerNode {
    taskId: string;
    status: string;
    reason?: string;
    decisions: BrainDecisionNode[];
}
export interface CausalTrace {
    taskId: string;
    blockers: BlockerNode[];
    rootCauses: string[];
    depth: number;
}
/**
 * Build a causal trace for why a task is blocked.
 *
 * Walks upstream through `depends` fields, collecting unresolved blockers
 * and their associated brain decisions. Leaf blockers (no further unresolved
 * deps) are reported as root causes.
 */
export declare function reasonWhy(taskId: string, projectRoot: string, taskAccessor?: DataAccessor): Promise<CausalTrace>;
export interface SimilarEntry {
    id: string;
    distance: number;
    type: string;
    title: string;
    text: string;
}
/**
 * Find entries similar to a given brain.db entry.
 *
 * 1. Loads the source entry's text from brain.db.
 * 2. Calls searchSimilar() for vector-based similarity if embeddings exist.
 * 3. Falls back to FTS5 keyword search if no embeddings are available.
 * 4. Filters out the source entry itself.
 *
 * @param entryId - ID of the brain.db entry to find similar entries for
 * @param projectRoot - Project root directory
 * @param limit - Maximum results to return (default 10)
 * @returns Array of similar entries ranked by distance/relevance
 */
export declare function reasonSimilar(entryId: string, projectRoot: string, limit?: number): Promise<SimilarEntry[]>;
//# sourceMappingURL=brain-reasoning.d.ts.map