We present the discovery and characterisation of two transiting planets observed by the Transiting Exoplanet Survey Satellite ( TESS ) orbiting the nearby ( d _ { \star } \approx 22 pc ) , bright ( J \approx 9 mag ) M3.5 dwarf LP 729–54 ( TOI–732 ) . We confirm both planets and their association with LP 729–54 via ground-based photometry and determine their masses using precise radial velocities measured with the CARMENES spectrograph . Precise stellar parameters determined from CARMENES high resolution spectra confirm that LP 729–54 is a mid-M dwarf with an effective temperature of T _ { \mathrm { eff } } = { 3360 } { \pm } { 51 } \mathrm { K } , a surface gravity of \log g _ { \star } = { 4.81 } { \pm } { 0.04 } \mathrm { ( cgs ) } , and an iron abundance of \mathrm { [ Fe / H ] } = { 0.09 } { \pm } { 0.16 } \mathrm { dex } , with an inferred mass of M _ { \star } = { 0.379 } { \pm } { 0.016 } \mathrm { M _ { \odot } } and a radius of R _ { \star } = { 0.382 } { \pm } { 0.012 } \mathrm { R _ { \odot } } . The ultra-short period planet LP 729–54 b ( P _ { \mathrm { b } } = 0.77 d ) with a radius of 1.35 ^ { +0.06 } _ { -0.06 } \mathrm { R _ { \oplus } } , a mass of 2.34 ^ { +0.24 } _ { -0.23 } \mathrm { M _ { \oplus } } , and a bulk density of 5.24 ^ { +0.94 } _ { -0.81 } { g cm ^ { -3 } } joins the population of Earth-size planets with rocky , terrestrial composition . The outer planet , LP 729–54 c , with an orbital period of 12.25 d , radius of 2.42 ^ { +0.10 } _ { -0.10 } \mathrm { R _ { \oplus } } , mass of 6.29 ^ { +0.63 } _ { -0.61 } \mathrm { M _ { \oplus } } , and mean density of 2.45 ^ { +0.44 } _ { -0.37 } { g cm ^ { -3 } } belongs to the population of dense sub-Neptunes . With the two planets located on opposite sides of the radius gap , this planetary system is an excellent target for testing planetary formation , evolution and atmospheric models . In particular , LP 729–54 c is an ideal object for atmospheric studies with the James Webb Space Telescope .