This paper defends Michel Foucault's notion of archaeology of knowledge against the influential and putatively devastating criticism by Dreyfus and Rabinow that Foucault's archaeological project is based on an incoherent conception of the rules of the discursive practices it purports to study. I argue first that Foucault's considered view of these rules as simultaneously implicit and historically efficacious corresponds to a general requirement for the normative structure of a discursive practice. Then I argue that Foucault is entitled to that view despite the charges to the contrary by Dreyfus and Rabinow. I also explain in detail how the argument by Dreyfus and Rabinow arises from a misunderstanding of Foucault's archaeological project as transcendental inquiry, while archaeology of knowledge is, in fact, a diagnostic project. The result is a novel understanding of the notion of archaeology of knowledge that enables a reassessment of Foucault's philosophical work in connection with current debates regarding the relationship between reflection and practice in the structure of thought.