Samuel's authority is an important signifier for David. Something for him to look back on him when he is unsure later in his journey.
The Holy Spirit empowers David. he is no longer walking only in his own fallen strength and sight. If he chooses to remember and walk with God and seek help from his holy Spirit David will always have counsel and comfort and strengthening power. David's heart longed for God - throughout his life he did not forget to confide in and consult the Holy Spirit, he did not forget to cooperate with Him, to turn to Him in troubled times, to repent when sin got in the way. this was the key to David's success. Walking with God and taking hold of the wisdom and power that God's Spirit's presence confers. I really need to learn to do the same. To long for God with as much of my heart as David did with his.