
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)= \sqrt {3}\sin \omega x\cdot \cos \omega x+\cos ^{2}\omega x- \frac{1}{2}(\omega > 0)$, its smallest positive period is $\frac{\pi}{2}$.  
$(I)$ Find the expression for $f(x)$.  
$(II)$ If the graph of the function $f(x)$ is translated right by $\frac{\pi}{8}$ units and then each point's x-coordinate is stretched to twice its original length (keeping the y-coordinate unchanged), we obtain the graph of the function $y=g(x)$. If the equation $g(x)+k=0$ has exactly one real solution in the interval $[0, \frac{\pi}{2}]$, find the range of the real number $k$.

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