/**
 * Recent Work Scanner
 *
 * Scans recently completed increments and tasks to detect what should be reopened
 * when users report issues.
 *
 * Part of smart reopen functionality (increment 0032)
 */
import { IncrementMetadata } from '../types/increment-metadata.js';
/**
 * Task match (task found in recent work)
 */
export interface TaskMatch {
    /** Task ID (e.g., "T-001") */
    id: string;
    /** Task title */
    title: string;
    /** Increment ID */
    incrementId: string;
    /** Task status */
    status: 'completed' | 'active' | 'pending';
    /** Completion date (if completed) */
    completedDate?: string;
    /** Task description/AC */
    description?: string;
}
/**
 * Recent work match (increment, task, or user story)
 */
export interface RecentWorkMatch {
    /** Type of match */
    type: 'increment' | 'task' | 'user-story';
    /** Item ID */
    id: string;
    /** Increment ID (for tasks/user stories) */
    incrementId: string;
    /** Item title */
    title: string;
    /** Completion date */
    completedDate: string;
    /** Relevance score (0-100) */
    relevanceScore: number;
    /** Matched keywords */
    matchedKeywords: string[];
    /** Match details (why it matched) */
    matchDetails?: string;
}
/**
 * Recent Work Scanner
 *
 * Provides smart detection of what should be reopened based on user reports
 */
export declare class RecentWorkScanner {
    /**
     * Scan increments completed in last N days
     *
     * @param days - Number of days to look back (default: 7)
     * @returns List of recently completed increments
     */
    static scanRecentIncrements(days?: number): IncrementMetadata[];
    /**
     * Scan active increments (always include in search)
     *
     * @returns List of active increments
     */
    static scanActiveIncrements(): IncrementMetadata[];
    /**
     * Scan tasks completed in last N days (across all increments)
     *
     * @param days - Number of days to look back (default: 7)
     * @returns List of recently completed tasks
     */
    static scanRecentTasks(days?: number): TaskMatch[];
    /**
     * Pattern match: Find items related to keywords
     *
     * @param keywords - List of keywords to match
     * @param days - Number of days to look back (default: 7)
     * @returns List of matches, sorted by relevance
     */
    static matchKeywords(keywords: string[], days?: number): RecentWorkMatch[];
    /**
     * Parse tasks from increment's tasks.md
     *
     * @param incrementId - Increment ID
     * @returns List of tasks
     */
    private static parseTasksFromIncrement;
    /**
     * Score increment match against keywords
     *
     * @param increment - Increment metadata
     * @param keywords - Keywords to match
     * @returns Match score and details
     */
    private static scoreIncrementMatch;
    /**
     * Score task match against keywords
     *
     * @param task - Task match
     * @param keywords - Keywords to match
     * @returns Match score and details
     */
    private static scoreTaskMatch;
    /**
     * Format matches for display
     *
     * @param matches - List of matches
     * @param maxResults - Maximum results to return (default: 5)
     * @returns Formatted string
     */
    static formatMatches(matches: RecentWorkMatch[], maxResults?: number): string;
    /**
     * Get "N days ago" string from date
     *
     * @param dateStr - ISO date string
     * @returns Human-readable string
     */
    private static getDaysAgo;
}
//# sourceMappingURL=recent-work-scanner.d.ts.map