/**
 * Feature ID Manager - Manages FS-XXX ID assignment based on creation date
 * Ensures no duplicate IDs and maintains consistent ordering
 *
 * v5.0.0: Unified Project Structure - Features now live in {project}/FS-XXX/
 * No more separate _features folder.
 *
 * NEW (v0.23.0 - T-043): Uses FSIDAllocator for advanced chronological allocation
 */
export interface FeatureInfo {
    originalId: string;
    assignedId: string;
    title: string;
    created: Date;
    incrementId?: string;
    projects?: string[];
}
export interface FeatureRegistry {
    features: Map<string, FeatureInfo>;
    nextId: number;
}
export declare class FeatureIDManager {
    private registry;
    private specsBaseDir;
    private incrementsDir;
    constructor(projectRoot: string);
    /**
     * Build registry by scanning all increments and existing features
     */
    buildRegistry(): Promise<void>;
    /**
     * Scan all increments to extract feature information
     */
    private scanIncrements;
    /**
     * Scan existing features from project folders
     * v5.0.0: Features now live in {project}/FS-XXX/ (not _features/)
     */
    private scanExistingFeatures;
    /**
     * Merge features and remove duplicates
     */
    private mergeFeatures;
    /**
     * Assign FS-XXX IDs based on strategy
     *
     * CRITICAL: For greenfield (FS-XXX), assigned ID = original ID
     * For brownfield (FS-YY-MM-DD-name), assigned ID = sequential
     */
    private assignFeatureIds;
    /**
     * Get assigned ID for a feature
     *
     * CRITICAL FIX (2025-11-26): Check for FS-XXXE collision before assigning FS-XXX
     */
    getAssignedId(originalId: string): string;
    /**
     * Get list of project folder names
     */
    private getProjectFolders;
    /**
     * Check if a feature ID already exists
     */
    hasFeature(originalId: string): boolean;
    /**
     * Get all registered features
     */
    getAllFeatures(): FeatureInfo[];
    /**
     * Normalize feature ID to consistent format
     *
     * CRITICAL: For greenfield, we use FS-XXX (sequential numbers)
     * For brownfield, we use FS-YY-MM-DD-name (date-based)
     */
    private normalizeFeatureId;
    /**
     * Get a consistent key for feature deduplication
     */
    private getFeatureKey;
    /**
     * Extract frontmatter from markdown content
     */
    private extractFrontmatter;
    /**
     * Save registry to disk for persistence
     */
    saveRegistry(): Promise<void>;
    /**
     * Load registry from disk
     */
    loadRegistry(): Promise<void>;
    /**
     * Allocate FS-ID for external work item using chronological allocation
     * NEW (v0.23.0 - T-043): Uses FSIdAllocator for intelligent allocation
     *
     * @param workItem - External work item metadata
     * @param projectRoot - Project root directory
     * @returns Allocated FS-ID (e.g., "FS-042E")
     */
    allocateExternalFeatureId(workItem: {
        externalId: string;
        title: string;
        createdAt: string;
        source: string;
        externalUrl?: string;
    }, projectRoot: string): Promise<string>;
    /**
     * Extract project IDs from per-US **Project**: fields
     * v0.34.1: New method for ADR-0140
     */
    private extractPerUSProjects;
}
//# sourceMappingURL=feature-id-manager.d.ts.map