There is history of science and there is philosophy of science. There is no science of science. The reason for this is that every formal method is limited (as can be demonstrated mathematically, in computability theory) and as a result, there is no formal or algorithmic way to produce arbitrary scientific knowledge. Every methodology of science must necessarily be incomplete. Therefore, the methodology of science involves creativity, i.e. the ability to go from one formal system to another, and the totality of these processes cannot be described within any single formal theory or algorithm.
As a result, the meta-discipline of science is a branch of philosophy and will remain so, and science develops historically. The meta-disciplines of science are thus necessarily inside the humanities, and will always remain so. There are no fixed laws describing what scientists do. Science, if understood as the description of systems following fixed laws, is not applicable to itself.