So I'm reading a novel about the Sengoku period, and I've come across a sentence that just can't figure out. The context is that this guy (whose ancestor is a famous admiral) built a castle with a harbour, but then boat-building got banned by the shogun so he had to make it look like the harbour had been filled in. The sentence before this says the castle looked just like any other castle.
だが城の東側は海への眺望が開けており、重臣が塩見櫓の門を通るのは、一日の始まりにまず海上に異変がないかを見るという水軍の将を祖とする藩の心得と言われていた。
My translation so far (rough): However, on the east side of the castle, the view to the sea being open, the lord goes through the watchtower gate, at the beginning of the day checking that there have been no big changes at sea...
and here's where I get stuck. I don't understand how the という links this bit to the next bit.
Is it 'the act of checking whether there had been any changes at sea was said to be the knowledge of the clan whose ancestor was a naval commander'? If so, I think it's trying to say that they still watched the sea and therefore were still a naval clan even if it looked like they had no harbour, but I can't figure out the grammar. And it doesn't really seem right to be honest. Am I parsing the sentence wrong?
On a separate note, is the まず linked to the 始まりに meaning something like first thing in the morning, or is it linked to the がないか meaning 'hardly any changes'? It doesn't really affect the overall meaning, but it would be interesting to know what people think.