The particle ci is often used when replacing a prepositional phrase introduced by a [+ location].
Sei andato a Parigi questo weekend? No, non ci sono andato.
But why does the following example need the particle ne?
Sei andato al supermercato? Sì, ne sono appena uscito.
Does it have anything to do with the change in the verb uscire in the response, since uscire is often followed by di and ne usually replaces prepositional phrases that use di?