Renewable energy like solar power is crucial for the transition to more sustainable energy supply and use in the modern society. Buildings with rooftop solar panels form microgrids acting as prosumers and are usually not under the control of the regulated companies operating the public grids. Currently much work has focused on the self-consumption of individual microgrids. On the contrary, the CoSSMic system targets at a neighborhood of microgrids with the primary goal to maximize the self-consumption of the whole neighborhood by co-ordinating their energy use and storage. To address the challenge of the fluctuating and partly unpredictable nature of renewable energy, a novel hybrid control mechanism is proposed, where planning and scheduling based on predictions is supplemented by a reactive feedback loop to compensate the inability to predict accurately the rapid fluctuations in PV output due to passing clouds. To enable easy creation, evolution, and operation of the neighborhoods without the need for expensive central equipment and support, a Peer-to-Peer, multi agent, and negotiation based architecture has been designed and implemented to realize the control mechanism. Early evaluation has been based on user centered design and involvement, while final evaluation will be carried out using experiments and simulations based on one-year trials on two trial neighborhoods in Germany and Italy respectively.