
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
Given the function $f(x)=\sin^{2}x+a\cos x+\frac{5}{8}a-\frac{3}{2}$, where $a\in\mathbb{R}$.

(1) When $a=1$, find the maximum value of the function $f(x)$;

(2) If for any $x$ in the interval $\left[0,\frac{\pi}{2}\right]$, $f(x)\leqslant 1$ holds, find the range of values for $a$.

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