/**
 * Reconcile Manager
 *
 * Handles post-merge increment ID collision resolution.
 * When multiple developers create increments with the same ID on different branches,
 * this manager detects collisions and renumbers the "later" increments.
 *
 * Updates:
 * - Increment folder name
 * - metadata.json
 * - spec.md frontmatter
 * - Living docs (FS-XXX folders)
 * - External tools (GitHub, JIRA, ADO)
 */
export interface IncrementInfo {
    id: string;
    baseNumber: number;
    isExternal: boolean;
    folder: string;
    absolutePath: string;
    modifiedDate: Date;
    createdDate?: Date;
    status?: string;
    metadata?: Record<string, unknown>;
}
export interface Collision {
    baseNumber: number;
    increments: IncrementInfo[];
    winner: IncrementInfo;
    toRenumber: IncrementInfo[];
}
export interface RenumberOperation {
    increment: IncrementInfo;
    oldId: string;
    newId: string;
    oldFeatureId: string;
    newFeatureId: string;
    updatedReferences: UpdatedReference[];
}
export interface UpdatedReference {
    type: 'metadata' | 'spec' | 'living-docs' | 'github' | 'jira' | 'ado' | 'cross-reference';
    path?: string;
    details: string;
    success: boolean;
    error?: string;
}
export interface ReconcileResult {
    collisionsFound: number;
    incrementsRenumbered: number;
    operations: RenumberOperation[];
    errors: string[];
    reportPath?: string;
}
export interface ReconcileOptions {
    dryRun?: boolean;
    force?: boolean;
    byCommit?: boolean;
    incrementNumber?: string;
}
export declare class ReconcileManager {
    private projectRoot;
    private incrementsDir;
    private livingDocsDir;
    constructor(projectRoot: string);
    /**
     * Main entry point - detect and fix ID collisions
     */
    reconcile(options?: ReconcileOptions): Promise<ReconcileResult>;
    /**
     * Scan all increment directories
     */
    private scanAllIncrements;
    /**
     * Get detailed info about an increment
     */
    private getIncrementInfo;
    /**
     * Detect collisions (same base number)
     */
    private detectCollisions;
    /**
     * Renumber a single increment
     */
    private renumberIncrement;
    /**
     * Derive feature ID from increment ID
     * e.g., "0001E-auth-feature" → "FS-001E"
     */
    private deriveFeatureId;
    /**
     * Update metadata.json with new ID
     */
    private updateMetadataJson;
    /**
     * Update spec.md frontmatter
     */
    private updateSpecFrontmatter;
    /**
     * Rename living docs folder (FS-XXX)
     */
    private renameLivingDocsFolder;
    /**
     * Update external tools (GitHub, JIRA, ADO)
     */
    private updateExternalTools;
    /**
     * Update GitHub issue titles and milestone
     */
    private updateGitHubReferences;
    /**
     * Update JIRA issue summary (title)
     */
    private updateJiraReferences;
    /**
     * Update ADO work item title
     */
    private updateAdoReferences;
    /**
     * Generate reconcile report
     */
    private generateReport;
    /**
     * Get collision summary for display
     */
    getCollisionSummary(incrementNumber?: string): Promise<{
        collisions: Collision[];
        summary: string;
    }>;
}
export declare function createReconcileManager(projectRoot: string): ReconcileManager;
//# sourceMappingURL=reconcile-manager.d.ts.map