Which spec defines generic vertex attrib

It seems to be ARB_vertex_program.

If that is correct, then why not introduce generic vertex attrib as a separate extension.

Why?
Generic attributes are only useful if you use shaders and in ARB_vertex_program AND in ARB_vertex_shader they are defined.