Christ righteousness has been imputed to us by God, this happens when He justifys us. Along with this a walkling in obedience to Him increases thsi righteousness. We grow in His likeness and image as we think His thoughts, meditating on His word, doing good works, but we are not saved by those works, non produce our own righteousness.