/** * BoardMatcher - Intelligent board/area path matching for living docs sync * * Matches increments to the correct board/area path based on: * - Increment title and description keywords * - Area path names from config * - ChildRepo names/teams from umbrella config * - Configured keywords (areaPathMapping.mappings[].keywords) * * @see ADR-0178: Intelligent Board/Area Path Matching */ import { Logger } from '../../utils/logger.js'; /** * Information about an available board/area path */ export interface BoardInfo { /** Unique identifier (area path name, childRepo id, or folder name) */ id: string; /** Human-readable name */ name: string; /** Source of this board info */ source: 'areaPath' | 'areaPathMapping' | 'childRepo' | 'existing-folder' | 'multiProject'; /** ADO profile name (if from ADO config) */ adoProfile?: string; /** ADO project name (for 2-level folder structure: {project}/{areaPath}) */ adoProject?: string; /** Configured keywords for matching */ keywords?: string[]; /** Team name (from childRepo) */ team?: string; /** Full path in specs folder (if existing) */ specsPath?: string; } /** * Result of matching an increment against boards */ export interface BoardMatchResult { /** Board identifier */ boardId: string; /** Human-readable board name */ boardName: string; /** Confidence score (0-100) */ confidence: number; /** Terms that matched */ matchedTerms: string[]; /** Source of the match */ source: BoardInfo['source']; /** Match type explanation */ matchType: 'exact' | 'partial' | 'keyword' | 'fuzzy'; /** ADO project name (for 2-level folder structure: {project}/{boardId}) */ adoProject?: string; } /** * Decision from the matcher */ export interface MatchDecision { /** Whether user input is needed */ needsUserInput: boolean; /** Reason for the decision */ reason: string; /** Best match (if any) */ bestMatch?: BoardMatchResult; /** All matches sorted by confidence */ allMatches: BoardMatchResult[]; /** Available boards (for user selection) */ availableBoards: BoardInfo[]; } export declare class BoardMatcher { private projectRoot; private options; private config; private configLoaded; constructor(projectRoot: string, options?: { logger?: Logger; }); private get logger(); /** * Load config from project root */ private loadConfig; /** * Extract keywords from increment spec content * * Extracts meaningful words from: * - Title (# heading) * - Description (first paragraph) * - User stories (## US-XXX sections) * - Type field */ extractIncrementKeywords(specContent: string): string[]; /** * Add words from text to a Set */ private addWordsToSet; /** * Get all available boards from config */ getAvailableBoards(): Promise; /** * Normalize board ID to kebab-case */ private normalizeId; /** * Match increment content against available boards */ matchIncrement(incrementId: string, specContent: string): Promise; /** * Calculate match score for a board against keywords */ private calculateMatch; /** * Fuzzy match for common variations */ private fuzzyMatch; /** * Check if this is a utility/cross-cutting increment that shouldn't auto-match */ isUtilityIncrement(specContent: string): boolean; } //# sourceMappingURL=board-matcher.d.ts.map