
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 $f(x)=|x-1|+|x+a|$, $g(a)=a^{2}-a-2$.
- $(1)$ When $a=3$, solve the inequality $f(x) > g(a)+2$ with respect to $x$;
- $(2)$ When $x\in[-a,1)$, it always holds that $f(x)\leqslant g(a)$, find the range of the real number $a$.

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