
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
Let $f(x) = a\cos x - \left(x - \frac{\pi}{2}\right)\sin x$, where $x \in \left[0, \frac{\pi}{2}\right]$.  
$(1)$ When $a = -1$, find the range of the derivative ${f'}(x)$ of the function $f(x)$.  
$(2)$ If $f(x) \leq 0$ always holds, find the maximum value of the real number $a$.

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