/** * Structure Level Detector * * Detects whether the project uses 1-level or 2-level folder structure * for living docs specs: * * - 1-Level: internal/specs/{project}/FS-XXX/ * - 2-Level: internal/specs/{project}/{board}/FS-XXX/ * * 2-level is used when: * - ADO area path mapping is configured (project → area paths) * - JIRA board mapping is configured with multiple boards per project * - Umbrella with team-based organization * * @module utils/structure-level-detector */ /** * Structure level configuration */ export interface StructureLevelConfig { /** Whether this is 1-level or 2-level structure */ level: 1 | 2; /** Available projects (for 1-level) or top-level containers (for 2-level) */ projects: ProjectInfo[]; /** Available boards (only for 2-level) - organized by project */ boardsByProject?: Record; /** Detection reason for debugging */ detectionReason: string; /** Source of configuration */ source: 'ado-area-path' | 'jira-board' | 'workspace-repos' | 'umbrella-teams' | 'multi-project' | 'single-project' | 'existing-folders'; } /** * Project information */ export interface ProjectInfo { id: string; name: string; /** For 2-level: this is the ADO project or JIRA project key */ externalId?: string; } /** * Board information (for 2-level structures) */ export interface BoardInfo { id: string; name: string; /** Parent project ID */ projectId: string; /** Keywords for matching */ keywords?: string[]; /** ADO area path */ areaPath?: string; /** JIRA board ID */ jiraBoardId?: string; } /** * Validation result for spec.md project/board context */ export interface ProjectContextValidation { isValid: boolean; errors: string[]; warnings: string[]; /** Detected structure level */ structureLevel: 1 | 2; /** Parsed project from spec */ project?: string; /** Parsed board from spec (for 2-level) */ board?: string; /** Expected path where this spec will sync to */ expectedPath?: string; } /** * Detect structure level from configuration * * @param projectRoot - Path to project root * @returns Structure level configuration */ export declare function detectStructureLevel(projectRoot?: string): StructureLevelConfig; /** * Validate spec.md has required project/board context * * @param specContent - Content of spec.md file * @param projectRoot - Path to project root * @returns Validation result */ export declare function validateProjectContext(specContent: string, projectRoot?: string): ProjectContextValidation; /** * Get required fields for spec.md based on structure level * * @param projectRoot - Path to project root * @returns Object describing required fields */ export declare function getRequiredSpecFields(projectRoot?: string): { level: 1 | 2; requiredFields: string[]; optionalFields: string[]; projects: ProjectInfo[]; boardsByProject?: Record; }; /** * Normalize ID to kebab-case */ declare function normalizeId(name: string): string; export { normalizeId }; //# sourceMappingURL=structure-level-detector.d.ts.map