Code in competition originally replaced by child (8)
I believe the answer is:
chivalry
'code in competition' is the definition.
Although both the answer and definition are singular nouns, I can't understand how they can define each other.
'originally replaced by child' is the wordplay.
I cannot really understand how this works, but
'child' could be 'ch' (abbreviation for child) and 'ch' is present in the answer.
This may be the basis of the clue (or it may be nonsense).
Can you help me to learn more?
(Other definitions for chivalry that I've seen before include "Knightly conduct" , "Courtesy and kind behaviour towards weaker people" , "Gallantry" , "Principles of medieval knighthood" , "Mediaeval knightly code" .)