
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 function $f\left(x\right)=x^{3}+ax^{2}+x+1$ achieves an extremum at $x=-1$. Find:<br/>$(1)$ The equation of the tangent line to $f\left(x\right)$ at $\left(0,f\left(0\right)\right)$;<br/>$(2)$ The maximum and minimum values of $f\left(x\right)$ on the interval $\left[-2,0\right]$.

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