A compound of formula or a pharmaceutically acceptable salt thereof, wherein: (i) X is C-R 5; L is a covalent bond, -(CH 2) n -N(C 1-6 -alkyl)-, -(CH 2) n -NH-, -N(C 1-6 -alkyl)-(CH 2) p -, -NH-(CH 2) p -, -(CH 2) n -O-, -O-(CH 2) p -, -SO 2 -N(C 1-6 -alkyl)-, -SO 2 -NH-, -N(C 1-6 -alkyl)-SO 2 -, -NH-SO 2 -, carbonyl, -(CH 2) n -, -CHR 6 -, -CF 2 -(CH 2) n -, -(CH 2) p -CF 2 -, -(CH 2) n -S-, -S-(CH 2) p -, -SO 2 -, -C -NH-, -C -N(C 1-6 -alkyl)-, -NH-C - or -N(C 1-6 -alkyl)-C -; and A is: (i) C 6-14 -aryl substituted with R 7, R 8 and R 9; or (ii) 5-14 membered heteroaryl substituted with R 10, R 11 and R 12; or (ii) X is N; L is a covalent bond, -(CH 2) n -, -CHR 6 -, -SO 2 -, carbonyl, -N(C 1-6 -alkyl)-(CH 2) p -, -NH-(CH 2) p -, -O-(CH 2) p -, -CF 2 -CH 2 -, -N(C 1-6 -alkyl)-SO 2 -, -NH-SO 2 -, -NH-C - or -N(C 1-6 -alkyl)-C -; and A is: (i) C 6-14 -aryl substituted with R 7, R 8 and R 9; or (ii) 5-14 membered heteroaryl substituted with R 10, R 11 and R 12; or (iii) X is N; L is C 1-6 -alkoxycarbonyl, C 6-14 -aryloxycarbonyl or 5-14 membered heteroaryloxycarbonyl; and A is absent; B is a bicyclic spirocycle; R 1, R 2, R 3, R 4 and R 5 are independently hydrogen, halogen, hydroxy, C 1-6 -alkyl or halo-C 1-6 -alkyl; R 6 is C 6-14 -aryl or 5-14 membered heteroaryl; R 7, R 8, R 9, R 10, R 11 and R 12 are each at each occurrence independently hydrogen, hydroxy, C 1-6 -alkyl, halo-C 1-6 -alkyl, halogen, C 1-6 -alkoxy, halo-C 1-6 -alkoxy, SF 5, C 1-6 -alkylsulfonyl, cyano or a group C is 5-14 membered heteroaryl, 3-14 membered heterocyclyl or C 3-10 -cycloalkyl; R C1, R C2 and R C3 are each independently hydrogen, C 1-6 -alkyl, halo-C 1-6 -alkyl, oxo, halogen, hydroxy, C 1-6 -alkoxy or halo-C 1-6 -alkoxy; each occurrence of n is independently 0, 1, 2 or 3; and each occurrence of p is independently 1, 2 or 3. (i) X is C-R 5; L is a covalent bond, -(CH 2) n -N(C 1-6 -alkyl)-, -(CH 2) n -NH-, -N(C 1-6 -alkyl)-(CH 2) p -, -NH-(CH 2) p -, -(CH 2) n -O-, -O-(CH 2) p -, -SO 2 -N(C 1-6 -alkyl)-, -SO 2 -NH-, -N(C 1-6 -alkyl)-SO 2 -, -NH-SO 2 -, carbonyl, -(CH 2) n -, -CHR 6 -, -CF 2 -(CH 2) n -, -(CH 2) p -CF 2 -, -(CH 2) n -S-, -S-(CH 2) p -, -SO 2 -, -C -NH-, -C -N(C 1-6 -alkyl)-, -NH-C - or -N(C 1-6 -alkyl)-C -; and A is: (i) C 6-14 -aryl substituted with R 7, R 8 and R 9; or (ii) 5-14 membered heteroaryl substituted with R 10, R 11 and R 12; or X is C-R 5; L is a covalent bond, -(CH 2) n -N(C 1-6 -alkyl)-, -(CH 2) n -NH-, -N(C 1-6 -alkyl)-(CH 2) p -, -NH-(CH 2) p -, -(CH 2) n -O-, -O-(CH 2) p -, -SO 2 -N(C 1-6 -alkyl)-, -SO 2 -NH-, -N(C 1-6 -alkyl)-SO 2 -, -NH-SO 2 -, carbonyl, -(CH 2) n -, -CHR 6 -, -CF 2 -(CH 2) n -, -(CH 2) p -CF 2 -, -(CH 2) n -S-, -S-(CH 2) p -, -SO 2 -, -C -NH-, -C -N(C 1-6 -alkyl)-, -NH-C - or -N(C 1-6 -alkyl)-C -; and A is: (i) C 6-14 -aryl substituted with R 7, R 8 and R 9; or (ii) 5-14 membered heteroaryl substituted with R 10, R 11 and R 12; or (i) C 6-14 -aryl substituted with R 7, R 8 and R 9; or (ii) 5-14 membered heteroaryl substituted with R 10, R 11 and R 12; or (ii) X is N; L is a covalent bond, -(CH 2) n -, -CHR 6 -, -SO 2 -, carbonyl, -N(C 1-6 -alkyl)-(CH 2) p -, -NH-(CH 2) p -, -O-(CH 2) p -, -CF 2 -CH 2 -, -N(C 1-6 -alkyl)-SO 2 -, -NH-SO 2 -, -NH-C - or -N(C 1-6 -alkyl)-C -; and A is: (i) C 6-14 -aryl substituted with R 7, R 8 and R 9; or (ii) 5-14 membered heteroaryl substituted with R 10, R 11 and R 12; or X is N; L is a covalent bond, -(CH 2) n -, -CHR 6 -, -SO 2 -, carbonyl, -N(C 1-6 -alkyl)-(CH 2) p -, -NH-(CH 2) p -, -O-(CH 2) p -, -CF 2 -CH 2 -, -N(C 1-6 -alkyl)-SO 2 -, -NH-SO 2 -, -NH-C - or -N(C 1-6 -alkyl)-C -; and A is: (i) C 6-14 -aryl substituted with R 7, R 8 and R 9; or (ii) 5-14 membered heteroaryl substituted with R 10, R 11 and R 12; or (i) C 6-14 -aryl substituted with R 7, R 8 and R 9; or (ii) 5-14 membered heteroaryl substituted with R 10, R 11 and R 12; or (iii) X is N; L is C 1-6 -alkoxycarbonyl, C 6-14 -aryloxycarbonyl or 5-14 membered heteroaryloxycarbonyl; and A is absent; X is N; L is C 1-6 -alkoxycarbonyl, C 6-14 -aryloxycarbonyl or 5-14 membered heteroaryloxycarbonyl; and A is absent; B is a bicyclic spirocycle; R 1, R 2, R 3, R 4 and R 5 are independently hydrogen, halogen, hydroxy, C 1-6 -alkyl or halo-C 1-6 -alkyl; R 6 is C 6-14 -aryl or 5-14 membered heteroaryl; R 7, R 8, R 9, R 10, R 11 and R 12 are each at each occurrence independently hydrogen, hydroxy, C 1-6 -alkyl, halo-C 1-6 -alkyl, halogen, C 1-6 -alkoxy, halo-C 1-6 -alkoxy, SF 5, C 1-6 -alkylsulfonyl, cyano or a group C is 5-14 membered heteroaryl, 3-14 membered heterocyclyl or C 3-10 -cycloalkyl; R C1, R C2 and R C3 are each independently hydrogen, C 1-6 -alkyl, halo-C 1-6 -alkyl, oxo, halogen, hydroxy, C 1-6 -alkoxy or halo-C 1-6 -alkoxy; each occurrence of n is independently 0, 1, 2 or 3; and each occurrence of p is independently 1, 2 or 3.