Green’s Dictionary of Slang

A-1 adj.

also a-1, a-one, A-number-one, A No.1
[insurance jargon A1, the top rating given to a ship at the insurers Lloyds of London]
[early 19C+]

1. (also A1 copper-bottom(ed), letter A number 1) excellent, perfect, first class, in prime condition.

2. extreme, supreme, in both negative as well as positive contexts.

In derivatives

A-1-er (n.)

[late 19C] an exceptional person, an aristocrat.