
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: \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1 \left( a > b > 0 \right)$ with eccentricity $e=\frac{\sqrt{2}}{2}$ and focal distance of $2$.

$(1)$ Find the equation of ellipse $C$;

$(2)$ It is known that ellipse $C$ intersects with the line $x-y+m=0$ at two distinct points $M$ and $N$, and $|MN|=2$, find the value of the real number $m$.

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