/**
 * Spec-to-Increment Mapper
 *
 * Maps permanent living docs specs to specific increment tasks.
 * Enables traceability: "Which increment implemented US-001?"
 */
export interface TaskInfo {
    id: string;
    title: string;
    incrementId: string;
    userStories: string[];
    githubIssue?: number;
    status?: 'pending' | 'in-progress' | 'completed';
}
export interface IncrementInfo {
    id: string;
    tasks: TaskInfo[];
    specId?: string;
}
export interface SpecIncrementMapping {
    specId: string;
    increments: IncrementInfo[];
    userStoryMappings: Record<string, TaskInfo[]>;
}
export interface TraceabilityReport {
    specId: string;
    totalUserStories: number;
    totalIncrements: number;
    totalTasks: number;
    coverage: number;
    unmappedUserStories: string[];
    mappingDetails: Record<string, {
        incrementId: string;
        taskIds: string[];
    }[]>;
}
export declare class SpecIncrementMapper {
    private rootDir;
    constructor(rootDir?: string);
    /**
     * Map a spec to all increments that implement it
     */
    mapSpecToIncrements(specId: string): Promise<SpecIncrementMapping>;
    /**
     * Find all increments that implement a specific user story
     */
    findIncrementsByUserStory(userStoryId: string): Promise<IncrementInfo[]>;
    /**
     * Get all tasks that implement a specific user story
     */
    getTasksForUserStory(userStoryId: string): Promise<TaskInfo[]>;
    /**
     * Update spec with increment links in frontmatter (Forward link)
     */
    updateSpecWithIncrementLinks(specId: string, incrementId: string): Promise<boolean>;
    /**
     * Update increment with spec link in frontmatter (Backward link)
     */
    updateIncrementWithSpecLink(incrementId: string, specId: string): Promise<boolean>;
    /**
     * Create bidirectional link between spec and increment (atomic operation)
     */
    createBidirectionalLink(specId: string, incrementId: string): Promise<{
        success: boolean;
        forwardLink: boolean;
        backwardLink: boolean;
    }>;
    /**
     * Get spec for a given increment (reverse lookup)
     */
    getSpecForIncrement(incrementId: string): Promise<string | null>;
    /**
     * Validate bidirectional links and detect broken references
     */
    validateLinks(): Promise<{
        valid: boolean;
        brokenForwardLinks: {
            specId: string;
            incrementId: string;
        }[];
        brokenBackwardLinks: {
            incrementId: string;
            specId: string;
        }[];
        orphanedIncrements: string[];
    }>;
    /**
     * Build complete traceability report for a spec
     */
    buildTraceabilityReport(specId: string): Promise<TraceabilityReport>;
    private findIncrementsForSpec;
    private getTasksFromIncrement;
    private extractTaskSection;
    private extractUserStoriesFromTask;
    private extractGithubIssue;
    private extractTaskStatus;
    private findSpecPath;
    private getUserStoriesFromSpec;
}
//# sourceMappingURL=spec-increment-mapper.d.ts.map