This is a truly weird bug.
If I enabled iCloud Keychain sync in Mavericks all of my Contacts would duplicate. One set would show up with the header of 'iCloud', the second (new) set would have the heading 'iCloud jf" where jf are my (true) initials.
The two sets appeared truly identical. Edits to one appeared in another. My iPhone Contacts were not affected.
If I turned off iCloud Keychain sync I could unclick Contacts in iCloud preferences and watch one set disappear. Then it would check itself back on. I unchecked again and a second set disappeared. Then I rechecked it and the first set of Contacts returned Lastly I reenabled iCloud Keychain and the second set of Contacts reappeared.
I think this bug is related in part to the .me to .iCloud transition. I say that because my iCloud account used the old '.me' domain. It's supposed to be interoperable with iCloud, but I guess it really isn't. I signed out of everything on my iMac and left iCloud, then restored using the '.icloud' domain. Now I have one set of Contacts and I have Keychain sync enabled.
Curiously, even after the fix, the Accounts setting in Contacts shows the .me suffix. I can't edit that, it claims to be inheriting from Preferences. iCloud support in Mavericks is a real hack. I probably can't wait for El Cap, will need to accept Yellowstone after next bugfix release.