AFAIK (this is all speculation at this point until the full SDK is released):
Joining in on a Pact of Cooperation (PoC) will net you positive relationship if you engage in trade, gifting, and other mutually beneficial diplomatic actions with that particular leader while under the PoC.
A Pact of Secrecy (PoS) is similar. When you and a leader form a PoS against a target leader, any positive diplomatic actions with the target leader will negatively affect your relations with the PoS leader while negative actions against the target leader will positively affect your relations with the PoS leader.
Edit -- TL;DR: Pact of Coop basically says "I'm going to help you" and if you do, +relationship. If you don't do anything, no affect. If you do anything against them, -relationship.
Pact of Secrecy means "I'm not going to help this target AI". If you don't help them or undermine them +relationship with the PoS'ed ally leader. If you do help the target AI, -relationship with the PoS'ed ally leader.