
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 the function $f(x) = \cos(2x + \frac{2\pi}{3}) + 2\cos^2x$, where $x \in \mathbb{R}$.

(1) Find the smallest positive period of the function $f(x)$ and its intervals of monotonic decrease;  
(2) After shifting the graph of the function $f(x)$ to the right by $\frac{\pi}{3}$ units, we obtain the graph of the function $g(x)$. Find the range of the function $g(x)$ on the interval $[0, \frac{\pi}{2}]$.

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