import type { CodebaseIndex } from './codebase-indexer.js'; import type { Claim, ClaimSeverity } from '../types.js'; import type { IntentManifest, IntentFlow, DataEntity, AuthModel, FeatureGroup, IntentGap } from './intent-types.js'; /** * Select files most relevant for intent extraction. * Prioritizes routers, schemas, auth, middleware, entry points, and package.json. * Broader than inventory-extractor's selection — we want the full picture. */ export declare function selectIntentFiles(index: CodebaseIndex, maxFiles?: number): string[]; /** * Generate a deterministic gap ID from type + description. * Exported for testing and CLI usage. */ export declare function generateGapId(type: string, description: string): string; /** * Parse the LLM response into a partial IntentManifest (without version/timestamps). * Handles code fences, truncation, and type normalization. * Exported for testing. */ export declare function parseIntentResponse(rawText: string): { flows: IntentFlow[]; dataModel: DataEntity[]; authModel: AuthModel; featureMap: FeatureGroup[]; gaps: IntentGap[]; }; /** * Assign severity based on keyword matching. * First match wins; default is 'medium'. */ export declare function assignSeverity(text: string): ClaimSeverity; /** * Convert an IntentFlow into Claim[]. * Replaces the old behaviorsToClaims() with flow-aware claim derivation. * * Produces claims from: * 1. Each FlowStep (ID: {flow.id}-STEP-{order padded to 3}) * 2. successCriteria (ID: {flow.id}-SUCCESS) * 3. Each errorPath (ID: {flow.id}-ERR-{index+1 padded to 3}) * 4. Each gap (ID: {flow.id}-GAP-{index+1 padded to 3}) — optional */ export declare function flowToClaims(flow: IntentFlow, gaps?: IntentGap[]): Claim[]; /** * Extract application intent from a codebase. * Single LLM call that produces a raw IntentManifest. */ export declare function extractIntent(index: CodebaseIndex, onProgress?: (msg: string) => void): Promise<{ manifest: IntentManifest; rawResponse: string; inputTokens: number; outputTokens: number; }>;