import type { LanceStore, SearchResult, TotemConfigError as TotemConfigErrorClass } from '@mmnto/totem';
import type { StandardIssue } from '../adapters/issue-adapter.js';
export declare const MAX_LESSONS = 10;
export declare const MAX_LESSON_CHARS = 8000;
export { SPEC_SYSTEM_PROMPT } from './spec-templates.js';
export interface RetrievedContext {
    specs: SearchResult[];
    sessions: SearchResult[];
    code: SearchResult[];
    lessons: SearchResult[];
}
export declare function retrieveContext(query: string, store: LanceStore, linkedStores?: LanceStore[]): Promise<RetrievedContext>;
/**
 * Expand a spec search query with test-infrastructure keywords when the
 * original query mentions testing concepts.  This helps the vector search
 * surface existing helpers like `rule-tester.ts`.
 */
export declare function expandSpecQuery(query: string): string;
export interface ParsedInput {
    issue: StandardIssue | null;
    freeText: string | null;
}
export declare function assemblePrompt(inputs: ParsedInput[], context: RetrievedContext, systemPrompt: string): Promise<string>;
export interface SpecOptions {
    raw?: boolean;
    out?: string;
    stdout?: boolean;
    model?: string;
    fresh?: boolean;
}
/**
 * mmnto-ai/totem#1555: validate that --stdout and --out are not used together.
 * Run before any LLM call so a user-error surfaces in <50ms with no API cost.
 */
export declare function validateOutputOptions(options: Pick<SpecOptions, 'out' | 'stdout'>, TotemConfigErrorCtor: typeof TotemConfigErrorClass): void;
/**
 * Sanitize a free-form topic string for use as a filename stem. Replaces any
 * character outside `[a-zA-Z0-9_-]` with a single dash, collapses runs, and
 * trims leading/trailing dashes. Returns `''` for inputs that sanitize to
 * nothing — caller decides the fallback.
 */
export declare function sanitizeSpecFilename(input: string): string;
export interface ResolveSpecPathDeps {
    resolveGitRoot: (cwd: string) => string | null;
    pathJoin: (...parts: string[]) => string;
}
/**
 * Derive the default spec output path under `<gitRoot>/.totem/specs/<stem>.md`.
 * Returns `null` for ambiguous cases (multi-input, empty topic) — the caller
 * falls back to stdout with a hint.
 */
export declare function resolveDefaultSpecPath(parsedInputs: ParsedInput[], cwd: string, deps: ResolveSpecPathDeps): string | null;
export declare function specCommand(inputs: string[], options: SpecOptions): Promise<void>;
//# sourceMappingURL=spec.d.ts.map