
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, with the origin O as the pole and the positive x-axis as the polar axis, a polar coordinate system is established. The polar coordinate of point P is $(1, \pi)$. Given the curve $C: \rho=2\sqrt{2}a\sin(\theta+ \frac{\pi}{4}) (a>0)$, and a line $l$ passes through point P, whose parametric equation is: 
$$
\begin{cases} 
x=m+ \frac{1}{2}t \\
y= \frac{\sqrt{3}}{2}t
\end{cases}
$$
($t$ is the parameter), and the line $l$ intersects the curve $C$ at points M and N.  
(1) Write the Cartesian coordinate equation of curve $C$ and the general equation of line $l$;  
(2) If $|PM|+|PN|=5$, find the value of $a$.

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