
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 line $y=-x+1$ intersects with the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1 (a > b > 0)$ at points $A$ and $B$.

$(1)$ If the eccentricity of the ellipse is $\frac{\sqrt{3}}{3}$ and the focal distance is $2$, find the standard equation of the ellipse;

$(2)$ If $OA \perp OB$ (where $O$ is the origin), when the eccentricity of the ellipse $e \in \left[\frac{1}{2}, \frac{\sqrt{2}}{2}\right]$, find the maximum length of the major axis of the ellipse.

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