
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 x\cos x+\cos^{2}x+a$.
(I) Write out the smallest positive period and the monotonically decreasing interval of the function;
(II) When $x\in\left[-\frac{\pi}{6},\frac{\pi}{3}\right]$, the sum of the maximum and minimum values of the function $f(x)$ is $\frac{3}{2}$. Find the analytical expression of $f(x)$;
(III) The graph of the function $f(x)$ that satisfies (II) is translated to the right by $\frac{\pi}{12}$ units, the abscissa is doubled while the ordinate remains unchanged, and then translated downward by $\frac{1}{2}$, resulting in the function $g(x)$. Find the area enclosed by the graph of $g(x)$, the positive semi-axis of $x$, and the line $x=\frac{\pi}{2}$.

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