/**
 * Enhanced Spec Loader
 *
 * Loads ALL specifications from living docs with full details:
 * - Feature hierarchies (FS-XXX -> US-XXX)
 * - User story details with acceptance criteria
 * - Status and completion information
 * - External tool references (GitHub/JIRA/ADO)
 * - Related increments
 */
import { Logger } from '../../../utils/logger.js';
/**
 * User story detail with full acceptance criteria
 */
export interface UserStoryDetail {
    id: string;
    title: string;
    description: string;
    acceptanceCriteria: AcceptanceCriterion[];
    priority: 'P0' | 'P1' | 'P2' | 'P3' | null;
    status: 'draft' | 'ready' | 'in_progress' | 'completed';
    project?: string;
    board?: string;
    externalRef?: ExternalReference;
    filePath: string;
}
export interface AcceptanceCriterion {
    id: string;
    description: string;
    completed: boolean;
}
export interface ExternalReference {
    provider: 'github' | 'jira' | 'ado';
    id: string;
    url?: string;
    status?: string;
}
/**
 * Enhanced feature spec with full hierarchy
 */
export interface EnhancedFeatureSpec {
    featureId: string;
    featureName: string;
    description: string;
    userStories: UserStoryDetail[];
    status: 'active' | 'completed' | 'archived';
    createdAt: string;
    completedAt?: string;
    externalRefs: ExternalReference[];
    relatedIncrements: string[];
    project?: string;
    board?: string;
    folderPath: string;
    totalACs: number;
    completedACs: number;
    completionPercentage: number;
}
/**
 * Full specs catalog with aggregated metrics
 */
export interface SpecsCatalog {
    features: EnhancedFeatureSpec[];
    totalFeatures: number;
    activeFeatures: number;
    completedFeatures: number;
    archivedFeatures: number;
    totalUserStories: number;
    totalACs: number;
    completedACs: number;
    overallCompletion: number;
    byProject: Map<string, EnhancedFeatureSpec[]>;
    byStatus: Map<string, EnhancedFeatureSpec[]>;
    loadedAt: string;
}
export interface SpecLoaderOptions {
    projectPath: string;
    logger?: Logger;
    includeArchived?: boolean;
}
/**
 * Enhanced spec loader that extracts full details from all specs
 */
export declare class EnhancedSpecLoader {
    private projectPath;
    private logger;
    private includeArchived;
    constructor(options: SpecLoaderOptions);
    /**
     * Load all specifications with full details
     */
    loadAllSpecs(): Promise<SpecsCatalog>;
    /**
     * Load a single feature with all its user stories
     */
    private loadFeature;
    /**
     * Load all user stories in a feature folder
     */
    private loadUserStories;
    /**
     * Load a single user story with acceptance criteria
     */
    private loadUserStory;
    /**
     * Extract acceptance criteria from user story content
     */
    private extractAcceptanceCriteria;
    /**
     * Extract priority from content or title
     */
    private extractPriority;
    /**
     * Determine user story status from content
     */
    private determineUserStoryStatus;
    /**
     * Extract external reference (GitHub/JIRA/ADO)
     */
    private extractExternalRef;
    /**
     * Find increments related to a feature
     */
    private findRelatedIncrements;
    /**
     * Extract frontmatter from markdown
     */
    private extractFrontmatter;
    /**
     * Extract title from markdown (first H1)
     */
    private extractTitle;
    /**
     * Extract description (first paragraph after title)
     */
    private extractDescription;
    /**
     * Extract user story description ("As a... I want... So that...")
     */
    private extractUserStoryDescription;
    /**
     * Extract a specific field like **Project**: value
     */
    private extractField;
    /**
     * Get file creation date
     */
    private getFileCreatedDate;
    /**
     * Get file modification date
     */
    private getFileModifiedDate;
    /**
     * Build the full catalog from loaded features
     */
    private buildCatalog;
    /**
     * Create empty catalog
     */
    private createEmptyCatalog;
}
//# sourceMappingURL=spec-loader.d.ts.map