
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 vectors $\overrightarrow{m}=(\sin x, -\sqrt{3})$ and $\overrightarrow{n}=(1, \cos x)$, and the function $f(x)=\overrightarrow{m} \cdot \overrightarrow{n}$.  
$(1)$ If $x \in [0, \frac{\pi}{2}]$ and $f(x)=\frac{2}{3}$, find the value of $\sin x$.  
$(2)$ If the abscissa of the points on the graph of the function $f(x)$ is reduced to half while keeping the ordinate unchanged, and then the resulting graph is shifted to the left by $\frac{\pi}{4}$ units, obtaining the graph of $g(x)$, find the range of the function $g(x)$ for $x \in [0, \frac{\pi}{2}]$.

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