/** * Three-tier deterministic sub-query planner for `investigate` * (investigate-pipeline lane, Ticket T2; DESIGN.md D2, ADR-0013). * * Tier resolution order: * 1. explicit — the query contains an unescaped `|`: split on the * SAME grammar `search --merge` uses; wins over `--context` with * a notice stating the override. * 2. context — a `--context` file is present: `deriveSubQueries` * over the parsed text, verbatim (no original prepend — context * mode owns the grid, mirroring `search --context`). An empty * derivation degrades to the original query. * 3. template — transforms of the bare question (see TEMPLATE * order below). * * Byte-stable everywhere: no clocks, no randomness, no * locale-dependent casing beyond `toLowerCase`. The unit has no * filesystem access — `loadContextText` is dependency-injected; * production wiring lives in the orchestrator command. */ /** * PR #264 R1 (owner-approved): explicit pipe plans are capped at 8 * sub-queries — the context tier's MAX_SUBQUERIES precedent. Exceeding * the cap fails loud with VALIDATION_ERROR (silent truncation rejected: * a truncated plan would silently under-bill the user's intent). */ export declare const MAX_EXPLICIT_SUBQUERIES = 8; export type PlannerTier = "explicit" | "context" | "template"; export interface PlanSubQueriesOptions { readonly query: string; /** `--context` file path; presence selects the context tier. */ readonly contextFile?: string; } export interface PlanSubQueriesDeps { /** * Injected context reader (production: the context-file io * adapter). The unit never touches the filesystem itself. */ loadContextText(filePath: string): Promise; } export interface SubQueryPlan { readonly subQueries: readonly string[]; readonly tier: PlannerTier; readonly notice?: string; } /** * Key-terms join for the template tier: lowercase the question, * tokenize via the shared Unicode tokenizer (issue #271 — ASCII input * keeps the legacy split byte-identically; non-ASCII segments are kept * whole with no ASCII length floor), drop stopwords and tokens outside * the context-file term bounds, preserve order, dedupe, join with * spaces. Only `toLowerCase` is applied (byte-stable, no locale). */ export declare function deriveTemplateTopic(query: string): string; /** * Resolve the sub-query plan for an investigation. Throws only on the * explicit-tier fail-loud cases (all fragments empty; > 8 fragments). */ export declare function planSubQueries(options: PlanSubQueriesOptions, deps: PlanSubQueriesDeps): Promise; //# sourceMappingURL=investigate-planner.d.ts.map