Usul al-Kafi
Book 4:
The Book of Divine Proof
Chapter 46
God inspires the Imams
391. 3. Imam Jafar as-Sadiq (p): Whenever an Imam wants to know anything; God inspires him with the required knowledge.