
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
Let ellipse $E$:$\frac{{{x^2}}}{{{a^2}}}+\frac{{{y^2}}}{{{b^2}}}=1(a \gt b \gt 0)$ have its upper vertex $B$ and left focus $F$. And $B$ and $F$ are on the line $x-y+2=0$. <br/>$(1)$ Find the standard equation of $E$;<br/>$(2)$ If the line $l$ intersects $E$ at points $P$ and $Q$, and point $A\left(-1,1\right)$ is the midpoint of $PQ$, find the equation of line $l$.

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