In Acts 5:32, the Spirit has been given to those who obey God, so obedience to God is part of the way to receive the Spirit, however, Galatians 3:1-2 denies that works of the law are part of the way to receive the Spirit, therefore the phrase "works of the law" does not refer to anything that God has commanded, which is why we are not justified by obeying them. In Romans 3:27, Paul contrasted a law of works with a law of faith, so works of the law are of works, while he said in Romans 3:31 that our faith upholds God's law, so it is of faith, and a law that our faith upholds can't be referring to the same thing as the works of the law that are not of faith in Galatians 3:10-11.
The act of obedience which causes us to receive the Holy Spirit is
choosing to believe the gospel. Romans 10:16 - But they have not all
obeyed the gospel. For Isaiah says, “Lord, who has
believed our report?” Ephesians 1:13 - In Him you also trusted, after you heard the word of truth, the
gospel of your salvation; in whom also, having
believed, you were
sealed with the Holy Spirit of promise. Not to be confused with multiple acts of obedience/works which follow.
In regards to Romans 3:31, we uphold the law by putting our faith in the One who fulfilled all the righteous requirements of the law on our behalf and who offers us His perfect righteousness as a gift. (Romans 4:5-6) Christ is the culmination of the law so that there may be righteousness for everyone who believes. (Romans 10:4)
In context of Romans 2:13, Paul said:
Romans 2:6-7 He will render to each one according to his works: 7 to those who by patience in well-doing seek for glory and honor and immortality, he will give eternal life;
In regards to Romans 2:6-7, if one reads Romans 2:6-11 in isolation from the rest of the book of Romans, one might conclude that Paul was teaching salvation by works, which seems to be what you are teaching. However, as you read and study these passages, it's imperative to keep in mind that these verses do not describe how one becomes saved, but the way the saved (and unsaved) conduct their lives. These works done are the result of, not the means or basis of receiving salvation.
So patient continuance in well doing, seeking for glory, honor, and immortality; (vs. 7) is not at all set forth as the means of their procuring eternal life, but as a
description of those to whom God does render life eternal. *Notice that
ALL who receive eternal life are
described as such,
everyone who does good (vs. 10). Good deeds flow from a heart that is saved and evil deeds flow from a heart that is unsaved. Verse 8 - but to those who are self-seeking and do not obey the truth, but obey unrighteousness--indignation and wrath. *Notice that
ALL who do not receive eternal life are
described as such,
everyone who does evil (vs. 9).
What those passages convey is that though our deeds are judged by God, it's not the good deeds themselves which are the basis or means by which we obtain salvation, but the type of deeds expose whether or not our heart was saved. These deeds done out of faith are the fruit, but not the root of salvation. If Paul wanted to teach that we are saved by works, then he would have clearly stated that we are saved through faith
and works in Ephesians 2:8,9 and that we are justified by faith
and works in Romans 5:1 but that is clearly NOT what Paul said. *Also see (Romans 4:2-6; Titus 3:5; 2 Timothy 1:9 etc..).
So that confirms what Paul said in Romans 2:13. The fact that Paul criticized some Jews for their hypocrisy in Romans 2:17-24 does not change the truth of what he said in Romans 2:6-7 and 13.
What Paul said in Romans 2:6-11 doesn't change the truth of what he said in Romans 2:13 which confirms what I said.
In Romans 2:25-29, the way to recognize that a Gentile has a circumcised heart is by observing their obedience to God's law, which is the same way to tell for a Jew (Deuteronomy 30:6), and circumcision of the heart is a matter of the Spirit, which is in contrast with Acts 7:51-53, where those with uncircumcised hearts resist the Spirit and do not obey God's law, so Paul was by no means excluding either Jews or Gentiles from being doers of the law. Rather, in Romans 2:17-24, Paul was calling those Jews to repent from their hypocrisy and to act in line with what they teach.
It sounds to me like you are mixing the old covenant of law for the Jews with the gospel of grace for the body of Christ and adding your version of justification by the law/imperfect obedience to salvation through faith. Acts 7:51-53 is directed at Israel and they did not keep the law. How can people be doers of the law when they have not kept it? Nobody (except Jesus Christ) has flawlessly obeyed the law. The Israelites were continuously stumbling over the law. (Acts 15:1-5; 24-28; Romans 10:1-4) Salvation by grace plus law, faith plus works is a false gospel. (Galatians 1:6-9)
Paul notably did not say what you added.
What Paul said is not in line with your eisegesis.
Indeed, Gentiles were by nature obeying the law and Paul was calling the Jews to also obey.
Romans 2:14 - for when Gentiles, who do not have the law, by nature do the things in the law, these, although not having the law, are a law to themselves, 15 who show the work of the law written in their hearts, their conscience also bearing witness, and between themselves their thoughts accusing or else excusing them). This does not mean that the Gentiles perfectly obeyed the entire law.
Paul notably said nothing about the Jew being self-righteous or about them needing to have perfect obedience. They were hypocrites because they were doing what they spoke against. The law itself came with instructions for what to do when the people sinned,
Being self righteous and hypocritical is certainly implied. Romans 2:17 - Indeed you are called a Jew, and rest on the law, and make your boast in God, 18 and know His will, and approve the things that are excellent, being instructed out of the law, 19 and are confident that you yourself are a guide to the blind, a light to those who are in darkness, 20 an instructor of the foolish, a teacher of babes, having the form of knowledge and truth in the law. 21 You, therefore, who teach another, do you not teach yourself? You who preach that a man should not steal, do you steal? 22 You who say, “Do not commit adultery,” do you commit adultery? You who abhor idols, do you rob temples? 23 You who make your boast in the law, do you dishonor God through breaking the law? 24 For “the name of God is blasphemed among the Gentiles because of you,” as it is written.
so perfect obedience has never been a requirement for us.
It's a good thing because ONLY Jesus Christ has met that requirement.
Even if someone managed to have perfect obedience, they still wouldn't earn their justification as a wage by obeying God's law (Romans 4:4-5), so you trying to make Romans 2 about perfect obedience is completely missing the point.
Only Jesus Christ had perfect obedience, so NOBODY will be justified by the law. In regards to the law, perfect obedience is the standard so what point am I missing? Were the Israelites not being hypocrites? Were they not seeking justification by the law? In Romans 10:1, we read - Brethren, my heart’s desire and prayer to God for
Israel is that they
may be saved. 2 For I bear them witness that they have a
zeal for God, but not according to knowledge. 3 For they
being ignorant of God’s righteousness, and seeking to establish their own righteousness, have not submitted to the righteousness of God. 4 For
Christ is the end of the law for righteousness to everyone who believes.
In James 2:1-11, he was speaking to people who had already sinned by showing favoritism, so he was not telling them that they needed to have perfect obedience because that would have already been too late, and he was not discouraging them from trying to obey God's law, and he was not even speaking about justification, but rather he was encouraging them to repent and to do a better job of obeying God's law more consistently.
James 2:10 - "For whoever keeps the whole law and yet stumbles in one point, he has become guilty of all" is clear to me and the body of Christ is not under the law, but is under grace. (Romans 6:14) You seem to be hung up on the law. Are you Jewish?
Repentance doesn't change the fact that we do not have perfect obedience, so the fact that repentance has value demonstrates that we don't need to have perfect obedience, and the consistent call of the prophets was for repentance, not for perfect obedience. In Romans 3:21-22, it does not say that the Law and the Prophets testify that the righteousness of God comes through 100% perfect obedience, but rather the only way to become righteous that is testified about in the Law and the Prophets is through faith in Christ for all who believe. Nowhere does the Bible speak about needing to have 100% perfect obedience as a means of becoming justified before God or warn that we can't fail even once.
Is God's standard not 100% obedience? (Ecclesiastes 7:20; Romans 3:23; 6:23) Salvation does not come through perfect obedience because all have sinned and come short of the glory of God and the wages of sin is death, but the gift of God is eternal life through Jesus Christ our Lord.
In Roman 6:19-23, we are no longer to present ourselves as slaves of impurity, lawlessness, and sin, but are now to present ourselves as slaves of God and of righteousness leading to sanctification, an the goal of sanctification is eternal life in God, which is the gift of God, so obedience to God's law is the content of His gift of eternal life, which is in accordance with verses like Romans 2:6-7, Luke 10:25-28, Matthew 19:17, and Revelation 22:14, where obedience to God's law is required for eternal life, but again none of these verses say anything about perfect obedience.
Which law are you talking about? You are trying to add "imperfect obedience" to the law to salvation through faith. So how much imperfect obedience does it take? You are teaching salvation by faith + works which is a "different" gospel.
In Matthew 23:23, Jesus said that faith is one of the weightier matters of God's law, so obedience to it is the way to have faith in God.
Jesus was addressing the scribes and Pharisees here and was talking about the law of Moses. Are you under the law of Moses? Are you an Israelite who is under the old covenant of law?