
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
In the rectangular coordinate system $(xOy)$, the parametric equations of circle $C$ are $\begin{cases} x=\sqrt{2}\cos \phi \\ y=\sqrt{2}(1+\sin \phi) \end{cases}$ ($\phi$ is the parameter), and in the polar coordinate system with the coordinate origin $O$ as the pole and the positive semi-axis of $x$ as the polar axis, the polar equation of line $l$ is $\rho = \frac{1}{\cos \theta - 2a \sin \theta}$.

(1) If line $l$ is tangent to circle $C$, find the value of the real number $a$.
(2) Point $P$ is a moving point on the circle, and $Q$ is the midpoint of $OP$. Find the polar equation of the trajectory of point $Q$.

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