Heat the oven to 185C. In a food processor, pulse the onions, garlic, ginger and chillies a few times, until very finely chopped.
Pat dry the short ribs and lightly sprinkle them all over with salt and pepper. Put two tablespoons of oil in a large, cast-iron, ovenproof saucepan for which you have a lid, and heat on a medium-high flame. In batches of two, fry the short ribs until golden on all sides – about four minutes a batch – then transfer to a tray while you repeat with the rest.
Tip the onion mixture into the same pan, add the star anise and cardamom, and cook, stirring occasionally, for five minutes, or until softened. Add the tomato paste, ground spices, chopped tomatoes (reserve the grated ones), a teaspoon and a half of salt and a good grind of pepper, and cook for four minutes, until the tomatoes start to break down. Return the short ribs to the pan, add 1.1 litres cold water and bring to a boil. Cover, transfer to the oven and cook for three hours, stirring every now and then. Add the figs, and cook for 30 minutes more, until they have softened and the meat is tender and almost falling off the bone.
While the ribs are cooking, drain the beans and put them in a medium saucepan for which you have a lid. Pour over enough water to cover by about 4cm and bring to a boil on a medium-high heat. Lower the heat to medium and cook the beans for 60-70 minutes, or until they are soft but still retain their shape; add a teaspoon of salt for the last 15 minutes of cooking. When done, cover with a lid and set aside.
In a medium bowl, mix the chives with the remaining two tablespoons of oil, lemon juice, an eighth of a teaspoon of salt and a grind of pepper.
Lift the short ribs from the pan, and gently tug at the bones to pull them away from the meat (discard the bones). Put the pan on a medium-high heat and, once the contents are bubbling, add the spinach and stir until it has wilted – about three minutes. Add the grated tomato and remove from the heat.
To serve, drain the beans and discard their cooking liquid, then stir into the chive oil. Divide the sauce between four plates, and top first with the bean mixture and then the meat, reserving any extra ribs for seconds.