I don't think it is very practical to try to hide a standard modern CDI in such a small case, and in any case I think you'd have problems supplying it with smoothed 12 Volt power in sufficient quantity. You could reverse engineer the Magister itself - all that is required is experimenting with components, since the circuit is available.

If you have the behind-the-flywheel bits, which are difficult to make, the only requirement is to breadboard the parts that normally go in the round black module until they work. Just by spinning the flywheel, you'll find out what voltage is supplied by the feed coil. The diode was probably a feeble germanium item orginally, but an ordinary modern 1 Amp 1000 Volt silicon diode should be fine. The capacitor has to fit into the space ultimately, and this will determine its capacity, but you can find the required voltage rating by connecting your feed coil and diode to a high voltage-rating capacitor and measuring the steady-state voltage (typically 300 Volts for a CDI). That only leaves the ignition coil to fiddle with. Unfortunately tiny coils with a zillion turns on the secondary are a hassle to produce for experimenters, but once again, you would start off ignoring the size issue and testing to see what turns ratio is required (which depends in large part on what DC voltage you can develop on the capacitor). Many commercial CD units work with standard Kettering coils, which have a turns ratio of about 100:1 AFAIK. Once you know what works on the breadboard, you have to miniaturise, which requires ingenuity and cut-and-try techniques.