
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)=\cos x(2\sqrt{3}\sin x-\cos x)-\frac{1}{2}\cos 2x+\frac{1}{2}$, $x\in R$.  
$(1)$ Find the smallest positive period and the interval of monotonic increase of $f(x)$;  
$(2)$ Find the sum of all real roots of the equation $f(x)=a$ $(-1 < a < 0)$ within the interval $\left[0,2\pi \right]$.

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