Team Formation
It is a common model that teams go through a kind of cycle than can be described as forming, storming, norming, performing. It sounds like there is still some storming going on, and hopefully you will have some tools to move forward.
Team Composition
You mention the team is composed of ambitious twenty somethings. If you hired a team with no diversity, it should be expected that rather than find niches, a battle for king of the hill breaks out. If it is a team where only twenty somethings are welcome, perhaps they figure they have to move up or out by the time they are thirty. It may not apply to you specifically, but for managers with teams that get more competition that cooperation, take a good look at the hiring (and perhaps firing) strategy. Sew the wind, reap the whirlwind.
Managers vs. the Cherry Pickers
Traditional organizations used supervisors and managers to define projects and assign work. A person who was ambitious, fast, sloppy, doing only the first 20% of a task that won 80% of the recognition, was accountable to one person, potentially for their entire tenure with the company. You may not have precise control over how tasks are assigned, but I hope you can reassign tasks to make things more equitable. I particularly like to put broken code back in the hands of the person who broke it.
As soon as you can quantify what behavior must stop, you can discuss it perhaps at first obliquely to the team like "in the interest of the team, I don't want to see XYZ." When, I mean if, that doesn't work, you have set an expectation so you have context to talk to team members who ignore it directly. If you are a manager or a lead with position power, perhaps you have control over the team members through employee evaluations, hopefully via regular one-on-ones or less optimally, quarterly progress checks.
Mixed Messages about Teamwork
Generally, managers are drawn from the most ambitious people. People who may be too ambitious for the good of the team may rarely be disciplined, but instead promoted because they show an attitude that the manager wants to see more often. However, those type A and type double A managers need high performing type B workers to do the detailed work, so what happens before the pecking order is sorted out may not be pretty.
Researchers have observed a thing called the "Tiger Effect" or sometimes the "Superstar Effect" where when a star like Tiger Woods played, the rest of the field played less well. Many people have seen organizations that tolerate or reward the bragger, the grand stander, the cherry picker, create teams that are out of control and have low productivity. Another unintended consequence can be that in short order, the manager may compete with that person as a peer or have that person as a manager.
Ethics
The Association for Computer Machinery (ACM) and IEEE IEEE have a jointly developed code of ethics has some guidance on selfishly motivated behavior.
- COLLEAGUES - Software engineers shall be fair to and supportive of their colleagues.
which is pretty general, but they expand it to be more specific.
Principle 7: COLLEAGUES
Software engineers shall be fair to and supportive of their
colleagues. In particular, software engineers shall, as appropriate:
7.01. Encourage colleagues to adhere to this Code.
7.02. Assist colleagues in professional development.
7.03. Credit fully the work of others and refrain from taking undue credit.
7.04. Review the work of others in an objective, candid, and properly-documented way.
7.05. Give a fair hearing to the opinions, concerns, or complaints of a colleague.
7.06. Assist colleagues in being fully aware of current standard work practices including policies and procedures for protecting passwords,
files and other confidential information, and security measures in
general.
7.07. Not unfairly intervene in the career of any colleague; however, concern for the employer, the client or public interest may compel
software engineers, in good faith, to question the competence of a
colleague.
7.08. In situations outside of their own areas of competence, call upon the opinions of other professionals who have competence in that
area.