
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 $xOy$, given the point $P(2+\cos \alpha,\sin \alpha)$ where $\alpha$ is a parameter. Taking $O$ as the pole and the positive $x$-axis as the polar axis, construct a polar coordinate system with the same unit length, the polar equation of line $l$ is $\rho \sin (\theta + \frac{\pi}{4}) = 2 \sqrt{2}$.

$(1)$ Find the equation of the trajectory $C$ of point $P$ and the Cartesian equation of line $l$;
$(2)$ Find the maximum distance from the points on the curve $C$ to the line $l$.

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