/**
 * Story Router
 *
 * Routes user stories to repos by prefix matching.
 * Format: US-{PREFIX}-{NUM} → matches repo with that prefix.
 * Falls back to first repo (or custom default) when no match.
 */
/**
 * Minimal repo shape the prefix router needs: an `id` and an optional `prefix`.
 * Both legacy `ChildRepoConfig` and the v3.0 `WorkspaceRepo` satisfy this, so
 * routing is decoupled from the config source-of-truth (0865 T-005).
 */
export interface PrefixRoutableRepo {
    id: string;
    prefix?: string;
}
export interface StoryRoutingResult {
    /** Matched repo ID, or null if no repos available */
    repoId: string | null;
    /** Whether routing was an explicit prefix match */
    matched: boolean;
    /** Reason for routing decision (useful for debugging) */
    reason: string;
}
/**
 * Extract prefix from a user story ID.
 *
 * Supports: US-FE-001, US-SHARED-042, us-be-007 (case-insensitive)
 * Returns null for: US-001 (no prefix), STORY-123 (wrong format)
 *
 * @param storyId - The story identifier (e.g., "US-FE-001")
 * @returns Extracted prefix in uppercase, or null
 */
export declare function extractPrefix(storyId: string): string | null;
/**
 * Route a user story to a repo by prefix matching.
 *
 * @param storyId - Story identifier (e.g., "US-FE-001")
 * @param childRepos - Available repos with prefix config
 * @param defaultRepoId - Optional explicit default repo ID
 * @returns Routing result with repoId, matched flag, and reason
 */
export declare function routeByPrefix(storyId: string, childRepos: PrefixRoutableRepo[], defaultRepoId?: string): StoryRoutingResult;
//# sourceMappingURL=story-router.d.ts.map