You should be able to extent the floor out about 2 feet or so. You will have to check and make sure this still allows adequate headroom at the stairs below. Minimum required headroom is 80". After you have the floor, you just need to enclose it with walls, and then build a header into the existing wall where the shelf is. There may already be a header there that is suitable.