
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 curve $C$ in the Cartesian coordinate system $xOy$ with the parametric equations $\begin{cases} x = 1 + \sqrt{3}\cos \theta \\ y = \sqrt{3}\sin \theta \end{cases}$ ($\theta$ is the parameter), and taking the origin $O$ as the pole and the positive half-axis of $x$ as the polar axis, a polar coordinate system is established.

$(1)$ Find the general equation and the polar equation of curve $C$;

$(2)$ The polar equation of line $l$ is $\rho \cos (\theta- \frac{\pi}{6}) = 3 \sqrt{3}$, the ray $OT$: $\theta = \frac{\pi}{3}(\rho > 0)$ intersects curve $C$ at point $A$ and line $l$ at point $B$, find the length of segment $AB$.

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