
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
In triangle $ABC$, with angles $\angle A$, $\angle B$, $\angle C$ opposite sides $a$, $b$, $c$ respectively, it is given that $\frac{-b+\sqrt{2}c}{\cos B} = \frac{a}{\cos A}$.
$(1)$ Find the magnitude of $\angle A$.
$(2)$ If $a=2$, find the maximum value of the area $S$ of triangle $ABC$.

Present the answer in LaTex format: \boxed{Your answer}
user