/**
 * Work Item Matcher - Matches imported work items to discovered modules
 *
 * Used by Living Docs Builder to:
 * 1. Load work items from .specweave/docs/internal/specs/
 * 2. Match them to modules based on keywords and paths
 * 3. Generate priority queue for documentation focus
 */
import type { DiscoveryResult } from './discovery.js';
/**
 * Work item representation (from user story files)
 */
export interface WorkItem {
    /** ID (e.g., "US-001", "US-002E") */
    id: string;
    /** Feature ID (e.g., "FS-031") */
    featureId: string;
    /** Title */
    title: string;
    /** Description */
    description?: string;
    /** Status */
    status?: string;
    /** Priority */
    priority?: string;
    /** Original file path */
    filePath: string;
    /** External source if imported */
    externalSource?: 'github' | 'jira' | 'ado';
    /** External ID */
    externalId?: string;
    /** Keywords extracted from title and description */
    keywords: string[];
    /** Team name (extracted from folder structure or ADO area path) */
    team?: string;
    /** ADO area path (e.g., "Acme\\Inventory") */
    areaPath?: string;
}
/**
 * Match between work item and module
 */
export interface WorkItemMatch {
    /** Work item */
    workItem: WorkItem;
    /** Match score (0-100) */
    score: number;
    /** Reasons for match */
    reasons: string[];
}
/**
 * Module with matched work items
 */
export interface ModuleWorkItemMapping {
    /** Module name */
    moduleName: string;
    /** Module path */
    modulePath: string;
    /** Matched work items with scores */
    matches: WorkItemMatch[];
    /** Total work item count */
    workItemCount: number;
    /** Priority based on work item count */
    priority: 'critical' | 'high' | 'medium' | 'low';
    /** Documentation status */
    docStatus: 'complete' | 'partial' | 'none';
}
/**
 * Priority queue entry
 */
export interface PriorityQueueEntry {
    /** Module name */
    moduleName: string;
    /** Module path */
    modulePath: string;
    /** Work item count */
    workItemCount: number;
    /** Priority level */
    priority: 'critical' | 'high' | 'medium' | 'low';
    /** Top work items (up to 5) */
    topWorkItems: string[];
}
/**
 * Work item matching result
 */
export interface WorkItemMatchResult {
    /** Full mapping of modules to work items */
    moduleMap: Map<string, ModuleWorkItemMapping>;
    /** Priority queue sorted by work item count */
    priorityQueue: PriorityQueueEntry[];
    /** Work items that couldn't be matched */
    unmatchedItems: WorkItem[];
    /** Statistics */
    stats: {
        totalWorkItems: number;
        matchedWorkItems: number;
        unmatchedWorkItems: number;
        modulesWithWorkItems: number;
    };
}
/**
 * Progress callback
 */
export type MatcherProgressCallback = (phase: 'loading' | 'matching' | 'ranking', current: number, total: number) => void;
/**
 * Load imported work items from specs directory
 */
export declare function loadImportedWorkItems(projectPath: string, onProgress?: MatcherProgressCallback): Promise<WorkItem[]>;
/**
 * Match work items to discovered modules
 */
export declare function matchWorkItemsToModules(projectPath: string, discovery: DiscoveryResult, workItems: WorkItem[], onProgress?: MatcherProgressCallback): Promise<WorkItemMatchResult>;
/**
 * Save work item matching results to files
 */
export declare function saveMatchingResults(projectPath: string, result: WorkItemMatchResult): Promise<string[]>;
/**
 * Get match reason as human-readable string
 */
export declare function getMatchReason(match: WorkItemMatch): string;
//# sourceMappingURL=workitem-matcher.d.ts.map