
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 x - \sqrt{3}\cos x$. <br/>$(1)$ If $x \in \left[0, \frac{\pi}{2}\right]$ and $f(x) = \frac{2}{3}$, find the value of $\cos\left(\frac{2\pi}{3} + x\right)$; <br/>$(2)$ If the ordinate of the points on the graph of function $f(x)$ remains unchanged, the abscissa is shortened to $\frac{1}{2}$ of the original, and then the resulting graph is shifted to the left by $\frac{\pi}{4}$ units, obtaining the graph of $g(x)$. Find the minimum value of the function $g(x)$ on $\left[0, \frac{\pi}{2}\right]$.

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