Does there exist a book, website, or article that codifies the rules/ cultural norms/ ethics/ etiquette of outdoor climbing. Things like the first party to the base has dibs (as opposed to the first party that is ready to climb), stuck gear on a route is usually considered abandoned gear, yield to up hill traffic, refrain from providing unsolicited beta, yell rock if you drop something, etc.
There are no real codified rules in climbing itself. There is common sense and some mostly environmental regulations. Other than that you are free to do what you want. If you want a starting point take the articles on etiquette in climbing magazines or by alpine clubs
As Ben Crowell points out in his answer, rock climbing used to be a sport for a lot of misfits. This has changed quite a bit but rock climbing still is only loosely organized (compared to other sports like football). In essence there are no rules.
Of course common sense should apply. This is the basis for all the etiquette articles published in climbing magazines or the etiquette published by alpine clubs. Things like, "park only were it is allowed", were to leave feces, etc.
In addition to those basic rules that everyone should apply everywhere, local rules have developed, mostly as a consequence of environmental regulations. These are mostly access restrictions but also rules such as the use of metal protection (elbe river valley sandstone) or chalk. You will find informations on this in the guidebook but should also check websites of the organizations developing local crags. These rules are binding and disregard of them may cause the crag to be closed by authorities.
There are some more ethics that are not legally binding but will get you into trouble with the local community. These mainly affect the style of bolting a route (and are thus irrelevant for the average climber).
There are also different styles of climbing, and the expectations are different for the different styles, for practical reasons. In trad climbing, which wasn't originally distinguished from mountaineering, it was traditionally considered bad style for the leader to fall, basically because with hemp ropes it was dangerous as hell. Sport climbing upended this expectation.
Rather than expecting an authoritative, monolithic guide to manners and ethics, I'd suggest that you read entertaining books like Royal Robbins' autobiography and The trad climber's bible by John Long. The sport ultimately derives from mountaineering, and there's a lot of classic mountaineering literature that's fun to read and will bring up a lot of the ethical stuff in a very dramatic way, e.g., the expectation that you will be self-reliant but at the same time willing to give up on your own climbing goals in order to help a party that's in trouble.
yield to up hill traffic
This would be more like hiking or mountaineering ethics. Are you talking about people rapping down a multipitch route and running into others who are climbing it? On routes where this happens (as opposed to a separate walk-off or rap route), I would just say hi and discuss how to solve the problem. (On a single-pitch route, this shouldn't come up, because party B wouldn't start while they can see that party A is rapping down.)
Things like the first party to the base has dibs (as opposed to the first party that is ready to climb)
Not so sure this is a thing. I would just approach this by saying hi and discussing it.
stuck gear on a route is usually considered abandoned gear
Not so sure this is a thing either. It's more just that you would have no way to find the person who left it.