
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 Cartesian coordinate system $xy$, the parametric equation of curve $C$ is given by 
\[
\begin{cases} 
x = 1 + 2\cos \alpha \\
y = 2\sin \alpha 
\end{cases}
\]
(where $\alpha$ is the parameter). Taking the origin $O$ as the pole and the non-negative half-axis of $x$ as the polar axis, we establish a polar coordinate system. The polar equation of line $l$ is 
\[
\theta = \frac{\pi}{4} \quad (\rho \in \mathbb{R}).
\]
(1) Find the polar equation of curve $C$ and the Cartesian equation of line $l$;  
(2) Assuming line $l$ intersects curve $C$ at points $A$ and $B$, find the length $|AB|$.

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