Gene openly admits to following Phineas's lead. Finny talks him into breaking the rules, shows him (if implicitly) how to behave, and governs the dynamic of their relationship. That's before his accident. After, Finny takes a more explicit role in crafting Gene's character. He literally tells him what to do, trains him, creates a new Gene that is somehow "a part of Phineas."