Luther’s teaching: all the works of men, even the most sanctified, are sin;
though the just ought to believe that his works are sins, yet
he ought to be assured that they are not imputed.
Biblical argument:
James 2:14, 17 What good is it, my brothers, if someone
says he has faith but does not have works? Can that faith save
him?. . .  So also faith of itself, if it does not have works, is dead.
Church’s teaching: the Church believed and always taught what James
wrote in his letter--faith without works is dead, hence good works
follow from the faith of the believer.
Council of Trent’s teaching:
On Justification Chapter XVI Before men, therefore, who have
been justified in this manner,-whether they have preserved
uninterruptedly the grace received, or whether they have recovered
it when lost,-are to be set the words of the Apostle: Abound in
every good work, knowing that your labor is not in vain in the
Lord; for God is not unjust, that he should forget your work, and
the love which you have shown in his name; and, do not lose
your confidence, which hath a great reward.