/**
 * Reasoning-trace recall boost (issue #564 PR 3).
 *
 * Pure helpers for:
 * - detecting whether a user query looks like a problem-solving ask
 *   ("how do I…", "step by step", etc.)
 * - boosting stored reasoning_trace memories within a result list when that
 *   condition matches.
 *
 * Callers gate these helpers behind the `recallReasoningTraceBoostEnabled`
 * config flag (default false); the helpers themselves are also no-ops when
 * `enabled` is false so they can be safely chained into the recall pipeline.
 */
/**
 * Heuristic: does the incoming query read like the user wants a stored
 * solution chain (reasoning trace)?
 *
 * Positive signals:
 *  - starts with "how do I", "how can I", "how would I", "how to"
 *  - contains "step by step", "walk me through", "work through"
 *  - contains "reasoning", "think through", "figure out", "debug"
 *  - explicitly mentions "trace" or "chain of thought"
 *
 * This is intentionally conservative — the boost is OFF by default, so false
 * negatives are cheap, but false positives would shift retrieval for ordinary
 * queries on an opt-in install.
 */
declare function looksLikeProblemSolvingQuery(query: string): boolean;
/**
 * Minimal shape the boost helper needs to read from a recall result. Matches
 * QmdSearchResult as of issue #564 but kept structural so tests and future
 * callers don't have to import orchestrator-level types.
 */
interface BoostableResult {
    path: string;
    score: number;
    docid?: string;
}
/**
 * Path-based marker for memories that live in the dedicated
 * reasoning-traces/ subtree. Using a path segment keeps this cheap: no
 * frontmatter parsing or extra I/O is needed.
 */
declare function isReasoningTracePath(candidatePath: string): boolean;
/**
 * Default additive boost applied to a reasoning_trace candidate when the
 * current query looks like a problem-solving ask.
 *
 * Chosen to be roughly the same magnitude as the existing CATEGORY_BOOSTS
 * entry for reasoning_trace (0.09 in importance scoring), keeping the signal
 * visible but not overwhelming stronger lexical/vector matches.
 */
declare const DEFAULT_REASONING_TRACE_BOOST = 0.15;
interface ApplyReasoningTraceBoostOptions {
    enabled: boolean;
    query: string;
    boost?: number;
}
/**
 * Apply a score boost to results whose path sits under reasoning-traces/
 * when the query looks like a problem-solving ask. Returns a new array;
 * the input array is not mutated.
 *
 * Ordering policy: the helper walks the results in order, boosts every
 * matching reasoning trace in place, then promotes each boosted trace
 * upward PAST any non-boosted neighbor whose score is strictly lower
 * than the trace's boosted score. Non-matching results keep their
 * incoming relative order — so reranker-driven path ordering and any
 * other upstream nudges on non-trace items are preserved. We do NOT
 * re-sort the full list, which would wipe out rerank priority on
 * non-trace items (whose numeric scores may have been left stale by the
 * rerank pass). This matters because MMR runs immediately after and
 * truncates to a topN window — globally re-sorting would silently drop
 * reranker-promoted items below the cutoff.
 *
 * No-ops (returns a copy of the input unchanged) when:
 *  - `enabled` is false,
 *  - `query` is empty / not a problem-solving ask,
 *  - the result list contains no reasoning-trace paths.
 *
 * Note on legacy paths: this helper intentionally only matches paths
 * under the dedicated `reasoning-traces/` subtree introduced by PR 3.
 * Historical reasoning_trace memories (if any) written before that
 * subtree existed were routed to `facts/<date>/` and are NOT
 * boost-eligible. Operators upgrading across that boundary should run
 * the migration CLI or rewrite old paths before enabling the boost.
 */
declare function applyReasoningTraceBoost<R extends BoostableResult>(results: readonly R[], options: ApplyReasoningTraceBoostOptions): R[];

export { type ApplyReasoningTraceBoostOptions, type BoostableResult, DEFAULT_REASONING_TRACE_BOOST, applyReasoningTraceBoost, isReasoningTracePath, looksLikeProblemSolvingQuery };
