
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 an ellipse $C$: $\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1$ ($a > b > 0$) with eccentricity $e = \dfrac{\sqrt{6}}{3}$, and points $A$, $B$ on ellipse $C$, with $N(3,1)$ being the midpoint of segment $AB$.

$(1)$ Find the equation of line $AB$;

$(2)$ If the circle with diameter $AB$ is tangent to the line $\sqrt{2}x + y + 1 = 0$, find the equation of the ellipse.

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