/**
 * Increment External Reference Detector
 *
 * Scans ALL increment metadata.json files for `external_ref` fields
 * to prevent duplicate imports from external tools (GitHub/JIRA/ADO).
 *
 * @module increment-external-ref-detector
 * @since 1.0.272
 */
/**
 * Scan result for an existing external reference.
 */
export interface ExternalRefMatch {
    /** Increment ID that already has this external ref */
    incrementId: string;
    /** Lifecycle directory where the increment was found */
    location: 'active' | '_archive' | '_abandoned' | '_paused';
    /** The external_ref value from metadata.json */
    externalRef: string;
}
/**
 * Detects duplicate external references across all increment directories.
 *
 * Scans metadata.json files in:
 * - .specweave/increments/ (active)
 * - .specweave/increments/_archive/
 * - .specweave/increments/_abandoned/
 * - .specweave/increments/_paused/
 *
 * @example
 * ```typescript
 * const detector = new IncrementExternalRefDetector('/path/to/project');
 * const existing = detector.hasRef('github#owner/repo#123');
 * if (existing) {
 *   console.log(`Already imported as ${existing.incrementId}`);
 * }
 * ```
 */
export declare class IncrementExternalRefDetector {
    private projectRoot;
    constructor(projectRoot: string);
    /**
     * Build a map of all external references across all increments.
     *
     * @returns Map of external_ref → ExternalRefMatch
     */
    buildRefMap(): Map<string, ExternalRefMatch>;
    /**
     * Check if an external reference already exists in any increment.
     *
     * @param externalRef - External reference to check (e.g., "github#owner/repo#123")
     * @returns The match if found, null otherwise
     */
    hasRef(externalRef: string): ExternalRefMatch | null;
    /**
     * Check multiple external references at once (batch dedup).
     *
     * @param externalRefs - Array of external references to check
     * @returns Map of refs that already exist → their matches
     */
    checkRefs(externalRefs: string[]): Map<string, ExternalRefMatch>;
}
/**
 * Generate a canonical external_ref string from platform and issue details.
 *
 * @param platform - Source platform
 * @param identifier - Platform-specific identifier
 * @returns Canonical external_ref string
 *
 * @example
 * ```typescript
 * formatExternalRef('github', 'owner/repo', 123) → 'github#owner/repo#123'
 * formatExternalRef('jira', 'PROJ', 'PROJ-456')   → 'jira#PROJ#PROJ-456'
 * formatExternalRef('ado', 'org/project', 789)     → 'ado#org/project#789'
 * ```
 */
export declare function formatExternalRef(platform: 'github' | 'jira' | 'ado', context: string, issueId: string | number): string;
//# sourceMappingURL=increment-external-ref-detector.d.ts.map